imeik-bizui 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,9 @@ export default {
28
28
  uploadAttrs: {
29
29
  isView: this.attrs.isView,
30
30
  extraUrlKey: 'url',
31
- extraNameKey: 'name'
31
+ extraNameKey: 'name',
32
+ showDiff: this.attrs.showDiff || false,
33
+ diffValue: this.attrs.diffValue
32
34
  }
33
35
  }
34
36
  },
@@ -1,19 +1,10 @@
1
1
  <template>
2
2
  <div :class="!attrs.isView ? 'w-full' : 'inline'">
3
- <span v-if="attrs.isView" :title="myLabel">{{ myLabel }}</span>
4
- <el-cascader
5
- v-else
6
- v-model="myValue"
7
- :multiple="multiple"
8
- :props="props"
9
- :options="options"
10
- class="w-full"
11
- clearable
12
- filterable
13
- v-bind="$attrs"
14
- @change="onUpdate"
15
- v-on="listeners"
16
- ></el-cascader>
3
+ <div v-if="attrs.isView">
4
+ <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="myLabel" :no-absolute="true" :new-value="diffValue" />
5
+ <span :title="myLabel">{{ myLabel }}</span>
6
+ </div>
7
+ <el-cascader v-else v-model="myValue" :multiple="multiple" :props="props" :options="options" class="w-full" clearable filterable v-bind="$attrs" @change="onUpdate" v-on="listeners"></el-cascader>
17
8
  </div>
18
9
  </template>
19
10
 
@@ -57,6 +48,12 @@ export default {
57
48
  }
58
49
  },
59
50
  computed: {
51
+ showDiff() {
52
+ return this.attrs.showDiff || false
53
+ },
54
+ diffValue() {
55
+ return this.attrs.diffValue
56
+ },
60
57
  /**
61
58
  * props
62
59
  */
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <span>
3
3
  <div v-if="attrs.isView">
4
- {{ showDiff }}
5
4
  <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="formatedValue" :no-absolute="true" :new-value="newFormatedValue" />
6
5
  <span v-else>{{ formatedValue || '-' }}</span>
7
6
  </div>
@@ -374,6 +374,7 @@ export default {
374
374
  const hasCurrentRole = data.roleList.find((item) => item.value === data.doctorLevel)
375
375
  if (hasCurrentRole) {
376
376
  this.$set(data, 'doctorLevel', hasCurrentRole.value)
377
+ this.changeDoctorLevel(data)
377
378
  return
378
379
  } else {
379
380
  this.$set(data, 'doctorLevel', '')
@@ -383,6 +384,7 @@ export default {
383
384
  // 如果当前选择的专家角色只有一个,则直接写入角色级别
384
385
  if (data.roleList.length === 1) {
385
386
  this.$set(data, 'doctorLevel', data.roleList[0].value)
387
+ this.changeDoctorLevel(data)
386
388
  this.getSceneList(data)
387
389
  }
388
390
  },
@@ -30,6 +30,12 @@ export default {
30
30
  }
31
31
  },
32
32
  computed: {
33
+ showDiff() {
34
+ return this.attrs.showDiff || false
35
+ },
36
+ diffValue() {
37
+ return this.attrs.diffValue
38
+ },
33
39
  /**
34
40
  * 标签视图类型
35
41
  */
@@ -125,7 +131,9 @@ export default {
125
131
  multiple: this.isMultiple,
126
132
  serverUrl: this.tagValueUrl,
127
133
  optionFilterValues: this.optionFilterValues,
128
- isView: this.attrs?.isView
134
+ isView: this.attrs?.isView,
135
+ showDiff: this.showDiff,
136
+ diffValue: this.diffValue
129
137
  }
130
138
  }
131
139
  },