imeik-bizui 1.6.0 → 1.6.2

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.
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <span>
3
- <span v-if="attrs.isView">{{ formatedValue || '-' }}</span>
3
+ <div v-if="attrs.isView">
4
+ {{ showDiff }}
5
+ <ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="formatedValue" :no-absolute="true" :new-value="newFormatedValue" />
6
+ <span v-else>{{ formatedValue || '-' }}</span>
7
+ </div>
4
8
  <el-date-picker
5
9
  v-else
6
10
  v-bind="attrs"
@@ -137,11 +141,28 @@ export default {
137
141
  return 'yyyy-MM-dd'
138
142
  }
139
143
  },
144
+ showDiff() {
145
+ return this.attrs.showDiff || false
146
+ },
147
+ diffValue() {
148
+ return this.attrs.diffValue || undefined
149
+ },
140
150
 
141
151
  /**
142
152
  * 格式化后的值
143
153
  */
144
154
  formatedValue() {
155
+ if (Array.isArray(this.diffValue)) {
156
+ return this.diffValue.map((item) => moment(item).format(this.momentFormat)).join('~')
157
+ } else {
158
+ if (this.diffValue) {
159
+ return moment(this.diffValue).format(this.momentFormat)
160
+ } else {
161
+ return '-'
162
+ }
163
+ }
164
+ },
165
+ newFormatedValue() {
145
166
  if (Array.isArray(this.myValue)) {
146
167
  return this.myValue.map((item) => moment(item).format(this.momentFormat)).join('~')
147
168
  } else {
@@ -22,11 +22,13 @@
22
22
  <template slot="otherInfo" slot-scope="{ row }">
23
23
  <div class="expertOther">
24
24
  <p v-if="!row.doctorNumber">-</p>
25
- <ImOneLineDot :text="row.doctorNumber">专家编号:{{ row.doctorNumber }}</ImOneLineDot>
26
- <ImOneLineDot :text="formatPhone(row.doctorPhone)">手机号:{{ formatPhone(row.doctorPhone) }}</ImOneLineDot>
27
- <ImOneLineDot :text="row.doctorType">类型:{{ row.doctorType }}</ImOneLineDot>
28
- <ImOneLineDot :text="row.doctorPosition">职业:{{ row.doctorPosition }}</ImOneLineDot>
29
- <ImOneLineDot :text="row.doctorPost">职称:{{ row.doctorPost }}</ImOneLineDot>
25
+ <div v-else>
26
+ <ImOneLineDot :text="row.doctorNumber">专家编号:{{ row.doctorNumber }}</ImOneLineDot>
27
+ <ImOneLineDot :text="formatPhone(row.doctorPhone)">手机号:{{ formatPhone(row.doctorPhone) }}</ImOneLineDot>
28
+ <ImOneLineDot :text="row.doctorType">类型:{{ row.doctorType }}</ImOneLineDot>
29
+ <ImOneLineDot :text="row.doctorPosition">职业:{{ row.doctorPosition }}</ImOneLineDot>
30
+ <ImOneLineDot :text="row.doctorPost">职称:{{ row.doctorPost }}</ImOneLineDot>
31
+ </div>
30
32
  </div>
31
33
  </template>
32
34
  <!-- 角色等级 -->
@@ -417,7 +419,7 @@ export default {
417
419
  if (!type) {
418
420
  this.$set(row, 'doctorServiceSceneCode', '')
419
421
  this.$set(row, 'describe', '')
420
- row.roleList = doctorInfo.doctorRoleInfoList.map(item => ({ value: item.roleCode, label: item.roleName }))
422
+ row.roleList = doctorInfo.doctorRoleInfoList.map((item) => ({ value: item.roleCode, label: item.roleName }))
421
423
  this.setDefaultRoleInfo(row)
422
424
  }
423
425
  },