<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>
|