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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
    <div id="detailContent">
        <el-col :span="8" v-if="svalue.length > 10 ? true : false" style="box-sizing:border-box;padding-right:60px">
            <el-form-item :label="config.filedDescription+':'">
                <!-- <el-tooltip class="toolTip" effect="dark" :content="svalue" placement="top" > -->
                <!-- <el-button class="toolTip"> -->
                    <!-- <el-input class="toolTipInput" v-model="svalue" readonly></el-input> -->
                    <p class="content">{{svalue === '' ? '--' : svalue}}</p>
                <!-- </el-button> -->
            <!-- </el-tooltip> -->
            </el-form-item>
        </el-col>
        <el-col :span="8" v-else style="box-sizing:border-box;padding-right:60px">
            <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>
    </div>
</template>
 
<script>
import { projectQrycondition } from '@/api/area'
export default {
  props: ['config', 'value'],
  data: function() {
    return {
            svalue: '',
    }
  },
  watch: {
    value: {
      immediate: true,
      handler(newVal) {
        this.svalue = newVal
        if (this.config.type === 'select' && !this._.isEmpty(newVal)) {
          this.selectLoad(newVal)
        }
      }
    }
  },
  methods: {
    async selectLoad(value) {        
      let params = { conditionName: this.config.codeNo }
            let res = await projectQrycondition(params)
            // 按揭银行有多个时处理
            if (value.includes(',')) {
                this.svalue = ''
                let arr = value.split(',')
                arr.map(item => {
                    for ( let key in res.result ) {
                        if (res.result[key].value === item) {
                            this.svalue = this.svalue + res.result[key].valueDesc + ','
                        }
                    }
                })
                this.svalue = this.svalue.slice(0,-1)
            }
      this.svalue = this._.find(res.result, { value: value }).valueDesc
    }
  }
}
</script>
 
<style lang="stylus" scoped>
#detailContent
  >>> .el-form-item
    height 48px
    margin-bottom 0px
.el-col-8 {
    @media only screen and (max-width: 1460px) {
            width calc(100% / 2 )
    }
}
.content
  // min-width 220px
  word-wrap break-word
  line-height 16px
    box-sizing border-box
    padding-right 60px
 
</style>