n20-common-lib 2.12.3 → 2.12.5
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/package.json
CHANGED
|
@@ -154,7 +154,9 @@ export default {
|
|
|
154
154
|
},
|
|
155
155
|
get() {
|
|
156
156
|
if (this.value) {
|
|
157
|
-
return `${dayjs(this.value.startDate).year()} 年
|
|
157
|
+
return `${dayjs(this.value.startDate).year()} 年 第${this.getChinese(
|
|
158
|
+
dayjs(this.value.endDate).quarter()
|
|
159
|
+
)}季度`
|
|
158
160
|
} else {
|
|
159
161
|
return this.value
|
|
160
162
|
}
|
|
@@ -166,6 +168,26 @@ export default {
|
|
|
166
168
|
// this.getDefaultTime()
|
|
167
169
|
},
|
|
168
170
|
methods: {
|
|
171
|
+
getChinese(val) {
|
|
172
|
+
let value = ''
|
|
173
|
+
switch (val) {
|
|
174
|
+
case 1:
|
|
175
|
+
value = '一'
|
|
176
|
+
break
|
|
177
|
+
case 2:
|
|
178
|
+
value = '二'
|
|
179
|
+
break
|
|
180
|
+
case 3:
|
|
181
|
+
value = '三'
|
|
182
|
+
break
|
|
183
|
+
case 4:
|
|
184
|
+
value = '四'
|
|
185
|
+
break
|
|
186
|
+
default:
|
|
187
|
+
break
|
|
188
|
+
}
|
|
189
|
+
return value
|
|
190
|
+
},
|
|
169
191
|
prev() {
|
|
170
192
|
this.year = this.year * 1 - 1
|
|
171
193
|
},
|
|
@@ -123,6 +123,10 @@ export default {
|
|
|
123
123
|
load: {
|
|
124
124
|
type: Function,
|
|
125
125
|
default: undefined
|
|
126
|
+
},
|
|
127
|
+
bigData: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: false
|
|
126
130
|
}
|
|
127
131
|
},
|
|
128
132
|
data() {
|
|
@@ -153,16 +157,17 @@ export default {
|
|
|
153
157
|
}
|
|
154
158
|
return
|
|
155
159
|
}
|
|
156
|
-
|
|
157
160
|
let dataList = []
|
|
158
161
|
forEachs(this.data, (d) => dataList.push(d), this.props.children)
|
|
159
|
-
|
|
160
162
|
if (!this.multiple) {
|
|
161
163
|
let valueObj = dataList.find((d) => d[this.props.value] === val)
|
|
162
164
|
this.wCdList = valueObj ? [valueObj] : []
|
|
163
165
|
this.$refs['tree']?.setCurrentKey(val)
|
|
164
166
|
} else {
|
|
165
167
|
this.wCdList = dataList.filter((d) => val.includes(d[this.props.value]))
|
|
168
|
+
if (this.bigData && this.wCdList.length > 0) {
|
|
169
|
+
this.wCdList = this.wCdList.slice(0, 1)
|
|
170
|
+
}
|
|
166
171
|
this.$refs['tree']?.setCheckedKeys(val)
|
|
167
172
|
}
|
|
168
173
|
},
|
|
@@ -215,7 +220,6 @@ export default {
|
|
|
215
220
|
nodeClick(data) {
|
|
216
221
|
if (!this.multiple && !data.disabled) {
|
|
217
222
|
this.lazy && (this.tCdList = [data])
|
|
218
|
-
|
|
219
223
|
let vK = this.props.value
|
|
220
224
|
this.$emit('input', data[vK])
|
|
221
225
|
this.$emit('change', data[vK], data)
|