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