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
| <template>
| <el-col :md="mdSize" :lg="lgSize" v-if="inputConfig.visible" id="detailContent">
| <el-form-item :label="inputConfig.filedDescription + ':'">
| <!-- <el-input :type="isTextArea" :rows="rows" v-model="inputConfig.value" readonly="readonly"></el-input> -->
| <p class="content">{{inputConfig.value === '' ? '--' :inputConfig.value}}</p>
| </el-form-item>
| </el-col>
| </template>
|
| <script>
| import { enterpriseQryCondition } from '@/api/area/enterprise'
| export default {
| props: ['config', 'isTextArea', 'rows'],
| data: function() {
| return {
| mdSize: 12,
| lgSize: 8
| }
| },
| computed: {
| inputConfig() {
| return this.config
| },
| 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: this.config.codeNo }
| enterpriseQryCondition(params).then(res => {
| let result = res.result
| this.config.value = this._.find(result, { value: this.config.value }).valueDesc
| })
| }
| }
| },
| 'isTextArea': {
| immediate: true,
| handler(newVal) {
| if (newVal === 'textarea') {
| this.mdSize = 24
| this.lgSize = 24
| }
| }
| }
| }
| }
| </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>
|
|