zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
  <el-col :md="12" :lg="size" v-if="config.visible" id="detailContent">
    <el-form-item :label="config.filedDescription + ':'">
      <!-- <el-input v-model="svalue" readonly></el-input> -->
      <p class="content">{{svalue === '' ?'--' :svalue }}</p>
    </el-form-item>
  </el-col>
</template>
 
<script>
import { channelCode } from '@/api/area/partner'
export default {
  props: ['config', 'value', 'isTextArea'],
  data: function() {
    return {
      svalue: ''
    }
  },
  computed: {
    // textarea内容独占一行
    size() {
      if (this.isTextArea) {
        return 24
      } else {
        return 8
      }
    }
  },
  watch: {
    'config.codeNo': {
      immediate: true,
      handler(newVal) {
        if (!this._.isEmpty(newVal) && !this._.isEmpty(this.config.value)) {
          let params = { conditionName: newVal }
          channelCode(params).then(res => {
            this.svalue = this._.find(res.result, { value: this.config.value }).valueDesc
          })
        } else {
          this.svalue = this.config.value
        }
      }
    }
  }
}
</script>
 
<style lang="stylus" scoped>
#detailContent
  >>> .el-form-item
    height 48px
    margin-bottom 0px
.content
  // width 220px
  word-wrap break-word
  line-height 16px
</style>