imeik-bizui 1.6.8 → 1.7.0
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.
- package/dist/bizui/src/FieldApplyDeparmentSelect/index.vue +24 -1
- package/dist/bizui/src/FieldDateSelect/index.vue +3 -6
- package/dist/imeik-bizui.common.js +127 -103
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +1 -1
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +127 -103
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +4 -4
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="!attrs.isView ? 'w-full' : 'inline'">
|
|
3
|
-
<
|
|
3
|
+
<div v-if="attrs.isView">
|
|
4
|
+
<ImDiffText v-if="showDiff" :show-diff="showDiff" :old-value="myValueName" :no-absolute="true" :new-value="newMyValueName" />
|
|
5
|
+
<span v-else :title="myValueName">{{ myValueName || '-' }}</span>
|
|
6
|
+
</div>
|
|
4
7
|
<el-cascader
|
|
5
8
|
v-else
|
|
6
9
|
:key="keyValue"
|
|
@@ -54,6 +57,12 @@ export default {
|
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
59
|
computed: {
|
|
60
|
+
showDiff() {
|
|
61
|
+
return this.attrs.showDiff || false
|
|
62
|
+
},
|
|
63
|
+
diffValue() {
|
|
64
|
+
return this.attrs.diffValue || undefined
|
|
65
|
+
},
|
|
57
66
|
dicValue() {
|
|
58
67
|
return this.$bizui.userInfo.departmentCode
|
|
59
68
|
},
|
|
@@ -85,6 +94,20 @@ export default {
|
|
|
85
94
|
return this.myValue ? this.getAllLabel(this.options, this.myValue) : ''
|
|
86
95
|
}
|
|
87
96
|
},
|
|
97
|
+
newMyValueName() {
|
|
98
|
+
if (this.attrs.multiple) {
|
|
99
|
+
return this.diffValue && this.diffValue.length
|
|
100
|
+
? this.diffValue
|
|
101
|
+
.map((item) => {
|
|
102
|
+
return this.getLabel(this.options, item)
|
|
103
|
+
})
|
|
104
|
+
.join(',')
|
|
105
|
+
: ''
|
|
106
|
+
} else {
|
|
107
|
+
// 如果是单选 就获取全部路径的值
|
|
108
|
+
return this.diffValue ? this.getAllLabel(this.options, this.diffValue) : ''
|
|
109
|
+
}
|
|
110
|
+
},
|
|
88
111
|
myValueOrgCode() {
|
|
89
112
|
if (this.attrs.multiple) {
|
|
90
113
|
return this.myValue && this.myValue.length
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
150
150
|
/**
|
|
151
151
|
* 格式化后的值
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
newFormatedValue() {
|
|
154
154
|
if (Array.isArray(this.diffValue)) {
|
|
155
155
|
return this.diffValue.map((item) => moment(item).format(this.momentFormat)).join('~')
|
|
156
156
|
} else {
|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
|
-
|
|
164
|
+
formatedValue() {
|
|
165
165
|
if (Array.isArray(this.myValue)) {
|
|
166
166
|
return this.myValue.map((item) => moment(item).format(this.momentFormat)).join('~')
|
|
167
167
|
} else {
|
|
@@ -225,10 +225,7 @@ export default {
|
|
|
225
225
|
timeFormat(val) {
|
|
226
226
|
if (this.isRange) {
|
|
227
227
|
if (Array.isArray(val) && val.length === 2) {
|
|
228
|
-
return [
|
|
229
|
-
moment(val[0]).format(this.momentFormat),
|
|
230
|
-
moment(val[1]).format(this.momentFormat)
|
|
231
|
-
]
|
|
228
|
+
return [moment(val[0]).format(this.momentFormat), moment(val[1]).format(this.momentFormat)]
|
|
232
229
|
} else {
|
|
233
230
|
return []
|
|
234
231
|
}
|