@utogether/utils 3.0.0-beta.28 → 3.0.0-beta.29
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/pkg/useRender.d.ts +5 -0
- package/dist/utils.es.js +609 -566
- package/dist/utils.umd.js +1 -1
- package/package.json +1 -2
package/dist/utils.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var S = (a, l, o) =>
|
|
2
|
+
var j = (a, l, o) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
|
|
3
|
+
var S = (a, l, o) => j(a, typeof l != "symbol" ? l + "" : l, o);
|
|
4
4
|
import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, merge, has } from "xe-utils";
|
|
@@ -77,11 +77,11 @@ function stringifyAttributes(a) {
|
|
|
77
77
|
}
|
|
78
78
|
function get(a, l, o) {
|
|
79
79
|
const h = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
|
|
80
|
-
let
|
|
81
|
-
for (; (
|
|
80
|
+
let e;
|
|
81
|
+
for (; (e = h.exec(document.cookie)) != null; )
|
|
82
82
|
try {
|
|
83
|
-
const i = o(
|
|
84
|
-
if (r[i] = l(
|
|
83
|
+
const i = o(e[1]);
|
|
84
|
+
if (r[i] = l(e[2], i), a === i)
|
|
85
85
|
break;
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
@@ -111,8 +111,8 @@ function removeCookie(a, l = DEFAULT_ATTRIBUTES) {
|
|
|
111
111
|
}
|
|
112
112
|
function init(a, l) {
|
|
113
113
|
const o = {
|
|
114
|
-
set: function(r,
|
|
115
|
-
return setCookie(r,
|
|
114
|
+
set: function(r, e, i) {
|
|
115
|
+
return setCookie(r, e, Object.assign({}, this.attributes, i), {
|
|
116
116
|
encodeValue: this.converter.write
|
|
117
117
|
});
|
|
118
118
|
},
|
|
@@ -122,8 +122,8 @@ function init(a, l) {
|
|
|
122
122
|
if (r != null)
|
|
123
123
|
return getCookie(r, this.converter.read);
|
|
124
124
|
},
|
|
125
|
-
remove: function(r,
|
|
126
|
-
removeCookie(r, Object.assign({}, this.attributes,
|
|
125
|
+
remove: function(r, e) {
|
|
126
|
+
removeCookie(r, Object.assign({}, this.attributes, e));
|
|
127
127
|
},
|
|
128
128
|
withAttributes: function(r) {
|
|
129
129
|
return init(this.converter, Object.assign({}, this.attributes, r));
|
|
@@ -196,55 +196,55 @@ const VxetableRender = (VXETable, {
|
|
|
196
196
|
row: h,
|
|
197
197
|
column: r
|
|
198
198
|
} = l, {
|
|
199
|
-
options:
|
|
199
|
+
options: e,
|
|
200
200
|
props: i,
|
|
201
|
-
optionProps:
|
|
202
|
-
events:
|
|
201
|
+
optionProps: t = {},
|
|
202
|
+
events: c
|
|
203
203
|
} = a, {
|
|
204
|
-
label:
|
|
204
|
+
label: Z = "label",
|
|
205
205
|
value: d = "value"
|
|
206
|
-
} =
|
|
207
|
-
loading:
|
|
208
|
-
multiple:
|
|
209
|
-
mapField:
|
|
210
|
-
} = i,
|
|
211
|
-
|
|
212
|
-
function
|
|
213
|
-
|
|
206
|
+
} = t, {
|
|
207
|
+
loading: n = !1,
|
|
208
|
+
multiple: f,
|
|
209
|
+
mapField: H
|
|
210
|
+
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
211
|
+
m.setDefaultValue(i, h, r.field);
|
|
212
|
+
function u(V) {
|
|
213
|
+
m.remote(V, r.field, a);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
215
|
+
function M(V) {
|
|
216
|
+
m.selectChange(V, h, r.field, a, {
|
|
217
217
|
column: r,
|
|
218
218
|
datasource: "row"
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
function C(V) {
|
|
222
|
-
|
|
222
|
+
c != null && c.input && c.input(l, V);
|
|
223
223
|
}
|
|
224
224
|
function A() {
|
|
225
|
-
|
|
225
|
+
m.clear(h, r.field, H, c, "row");
|
|
226
226
|
}
|
|
227
227
|
function w() {
|
|
228
|
-
!
|
|
228
|
+
!e.length && u(""), c != null && c.focus && c.focus(l, r.field);
|
|
229
229
|
}
|
|
230
230
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
231
|
-
modelValue: h[
|
|
232
|
-
"onUpdate:modelValue": (V) => h[
|
|
231
|
+
modelValue: h[s],
|
|
232
|
+
"onUpdate:modelValue": (V) => h[s] = V,
|
|
233
233
|
filterable: !0,
|
|
234
234
|
remote: !0,
|
|
235
235
|
clearable: !0,
|
|
236
236
|
placeholder: "请录入关键字搜索",
|
|
237
237
|
style: "width: 100%",
|
|
238
|
-
"remote-method":
|
|
239
|
-
loading:
|
|
238
|
+
"remote-method": u,
|
|
239
|
+
loading: n
|
|
240
240
|
}, i, {
|
|
241
241
|
onFocus: () => w(),
|
|
242
|
-
onChange: (V) =>
|
|
242
|
+
onChange: (V) => M(V),
|
|
243
243
|
onClear: () => A(),
|
|
244
244
|
onInput: (V) => C(V)
|
|
245
|
-
}), _isSlot(o =
|
|
245
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
246
246
|
key: V[d],
|
|
247
|
-
label: V[
|
|
247
|
+
label: V[Z],
|
|
248
248
|
value: V[d]
|
|
249
249
|
}, null))) ? o : {
|
|
250
250
|
default: () => [o]
|
|
@@ -256,55 +256,55 @@ const VxetableRender = (VXETable, {
|
|
|
256
256
|
row: h,
|
|
257
257
|
column: r
|
|
258
258
|
} = l, {
|
|
259
|
-
options:
|
|
259
|
+
options: e,
|
|
260
260
|
props: i,
|
|
261
|
-
optionProps:
|
|
262
|
-
events:
|
|
261
|
+
optionProps: t = {},
|
|
262
|
+
events: c
|
|
263
263
|
} = a, {
|
|
264
|
-
label:
|
|
264
|
+
label: Z = "label",
|
|
265
265
|
value: d = "value"
|
|
266
|
-
} =
|
|
267
|
-
loading:
|
|
268
|
-
multiple:
|
|
269
|
-
mapField:
|
|
270
|
-
} = i,
|
|
271
|
-
|
|
272
|
-
function
|
|
273
|
-
|
|
266
|
+
} = t, {
|
|
267
|
+
loading: n = !1,
|
|
268
|
+
multiple: f,
|
|
269
|
+
mapField: H
|
|
270
|
+
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
271
|
+
m.setDefaultValue(i, h, r.field);
|
|
272
|
+
function u(V) {
|
|
273
|
+
m.remote(V, r.field, a);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
275
|
+
function M(V) {
|
|
276
|
+
m.selectChange(V, h, r.field, a, {
|
|
277
277
|
column: r,
|
|
278
278
|
datasource: "row"
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function C(V) {
|
|
282
|
-
|
|
282
|
+
c != null && c.input && c.input(l, V);
|
|
283
283
|
}
|
|
284
284
|
function A() {
|
|
285
|
-
|
|
285
|
+
m.clear(h, r.field, H, c, "row");
|
|
286
286
|
}
|
|
287
287
|
function w() {
|
|
288
|
-
!
|
|
288
|
+
!e.length && u(""), c != null && c.focus && c.focus(l, r.field);
|
|
289
289
|
}
|
|
290
290
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
291
|
-
modelValue: h[
|
|
292
|
-
"onUpdate:modelValue": (V) => h[
|
|
291
|
+
modelValue: h[s],
|
|
292
|
+
"onUpdate:modelValue": (V) => h[s] = V,
|
|
293
293
|
filterable: !0,
|
|
294
294
|
remote: !0,
|
|
295
295
|
clearable: !0,
|
|
296
296
|
placeholder: "请录入关键字搜索",
|
|
297
297
|
style: "width: 100%",
|
|
298
|
-
"remote-method":
|
|
299
|
-
loading:
|
|
298
|
+
"remote-method": u,
|
|
299
|
+
loading: n
|
|
300
300
|
}, i, {
|
|
301
301
|
onFocus: () => w(),
|
|
302
|
-
onChange: (V) =>
|
|
302
|
+
onChange: (V) => M(V),
|
|
303
303
|
onClear: () => A(),
|
|
304
304
|
onInput: (V) => C(V)
|
|
305
|
-
}), _isSlot(o =
|
|
305
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
306
306
|
key: V[d],
|
|
307
|
-
label: V[
|
|
307
|
+
label: V[Z],
|
|
308
308
|
value: V[d]
|
|
309
309
|
}, null))) ? o : {
|
|
310
310
|
default: () => [o]
|
|
@@ -330,54 +330,54 @@ const VxetableRender = (VXETable, {
|
|
|
330
330
|
data: h,
|
|
331
331
|
field: r
|
|
332
332
|
} = l, {
|
|
333
|
-
options:
|
|
333
|
+
options: e,
|
|
334
334
|
props: i,
|
|
335
|
-
optionProps:
|
|
336
|
-
events:
|
|
335
|
+
optionProps: t = {},
|
|
336
|
+
events: c
|
|
337
337
|
} = a, {
|
|
338
|
-
label:
|
|
338
|
+
label: Z = "label",
|
|
339
339
|
value: d = "value"
|
|
340
|
-
} =
|
|
341
|
-
mapField:
|
|
342
|
-
multiple:
|
|
343
|
-
loading:
|
|
344
|
-
} = i,
|
|
345
|
-
|
|
346
|
-
async function
|
|
347
|
-
|
|
340
|
+
} = t, {
|
|
341
|
+
mapField: n,
|
|
342
|
+
multiple: f,
|
|
343
|
+
loading: H = !1
|
|
344
|
+
} = i, m = useComponent(), s = f ? `_${r}` : r;
|
|
345
|
+
m.setDefaultValue(i, h, r);
|
|
346
|
+
async function u(V) {
|
|
347
|
+
m.remote(V, r, a);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
349
|
+
function M(V) {
|
|
350
|
+
m.selectChange(V, h, r, a, {
|
|
351
351
|
datasource: "data"
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
function C(V) {
|
|
355
|
-
|
|
355
|
+
c != null && c.input && c.input(l, V);
|
|
356
356
|
}
|
|
357
357
|
function A() {
|
|
358
|
-
|
|
358
|
+
m.clear(h, r, n, c, "data");
|
|
359
359
|
}
|
|
360
360
|
function w() {
|
|
361
|
-
!
|
|
361
|
+
!e.length && u(""), c != null && c.focus && c.focus(l);
|
|
362
362
|
}
|
|
363
363
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
364
|
-
modelValue: h[
|
|
365
|
-
"onUpdate:modelValue": (V) => h[
|
|
364
|
+
modelValue: h[s],
|
|
365
|
+
"onUpdate:modelValue": (V) => h[s] = V,
|
|
366
366
|
filterable: !0,
|
|
367
367
|
remote: !0,
|
|
368
368
|
clearable: !0,
|
|
369
369
|
style: "width: 100%",
|
|
370
370
|
placeholder: "请录入关键字搜索",
|
|
371
|
-
loading:
|
|
372
|
-
"remote-method":
|
|
371
|
+
loading: H,
|
|
372
|
+
"remote-method": u
|
|
373
373
|
}, i, {
|
|
374
374
|
onFocus: () => w(),
|
|
375
|
-
onChange: (V) =>
|
|
375
|
+
onChange: (V) => M(V),
|
|
376
376
|
onClear: () => A(),
|
|
377
377
|
onInput: () => C()
|
|
378
|
-
}), _isSlot(o =
|
|
378
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
379
379
|
key: V[d],
|
|
380
|
-
label: V[
|
|
380
|
+
label: V[Z],
|
|
381
381
|
value: V[d]
|
|
382
382
|
}, null))) ? o : {
|
|
383
383
|
default: () => [o]
|
|
@@ -392,31 +392,31 @@ const VxetableRender = (VXETable, {
|
|
|
392
392
|
props: r
|
|
393
393
|
} = a;
|
|
394
394
|
r != null && r.defaultValue && !o[h] && (o[h] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
|
|
395
|
-
const
|
|
395
|
+
const e = /* @__PURE__ */ new Date(), i = [{
|
|
396
396
|
text: i18n("message.udp.today", !0),
|
|
397
|
-
value: () => [
|
|
397
|
+
value: () => [t(1, "day"), e]
|
|
398
398
|
}, {
|
|
399
399
|
text: i18n("message.udp.yesterday", !0),
|
|
400
|
-
value: () => [
|
|
400
|
+
value: () => [t(2, "day"), t(2, "day")]
|
|
401
401
|
}, {
|
|
402
402
|
text: i18n("message.udp.lastWeek", !0),
|
|
403
|
-
value: () => [
|
|
403
|
+
value: () => [t(7, "day"), e]
|
|
404
404
|
}, {
|
|
405
405
|
text: i18n("message.udp.lastMonth", !0),
|
|
406
|
-
value: () => [
|
|
406
|
+
value: () => [t(1, "month"), e]
|
|
407
407
|
}, {
|
|
408
408
|
text: i18n("message.udp.threeMonth", !0),
|
|
409
|
-
value: () => [
|
|
409
|
+
value: () => [t(3, "month"), e]
|
|
410
410
|
}, {
|
|
411
411
|
text: i18n("message.udp.halfYear", !0),
|
|
412
|
-
value: () => [
|
|
412
|
+
value: () => [t(6, "month"), e]
|
|
413
413
|
}, {
|
|
414
414
|
text: i18n("message.udp.anniversary", !0),
|
|
415
|
-
value: () => [
|
|
416
|
-
}],
|
|
415
|
+
value: () => [t(1, "year"), e]
|
|
416
|
+
}], t = (c, Z) => dayjs().subtract(c, Z).add("1", "day").format();
|
|
417
417
|
return [createVNode(resolveComponent("el-date-picker"), mergeProps({
|
|
418
418
|
modelValue: o[h],
|
|
419
|
-
"onUpdate:modelValue": (
|
|
419
|
+
"onUpdate:modelValue": (c) => o[h] = c,
|
|
420
420
|
type: (r == null ? void 0 : r.type) || "daterange",
|
|
421
421
|
shortcuts: i,
|
|
422
422
|
style: "width: 100%",
|
|
@@ -432,45 +432,40 @@ const VxetableRender = (VXETable, {
|
|
|
432
432
|
row: h,
|
|
433
433
|
column: r
|
|
434
434
|
} = l, {
|
|
435
|
-
options:
|
|
435
|
+
options: e,
|
|
436
436
|
props: i,
|
|
437
|
-
optionProps:
|
|
438
|
-
events:
|
|
437
|
+
optionProps: t = {},
|
|
438
|
+
events: c
|
|
439
439
|
} = a, {
|
|
440
|
-
label:
|
|
441
|
-
value: d = "value"
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
mapField:
|
|
445
|
-
} = i,
|
|
446
|
-
i
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
[t]: n
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
function H(n) {
|
|
453
|
-
u.selectChange(n, h, r.field, a, {
|
|
440
|
+
label: Z = "label",
|
|
441
|
+
value: d = "value"
|
|
442
|
+
} = t, {
|
|
443
|
+
multiple: n,
|
|
444
|
+
mapField: f
|
|
445
|
+
} = i, H = useComponent(), m = n ? `_${r.field}` : r.field;
|
|
446
|
+
H.setDefaultValue(i, h, r.field);
|
|
447
|
+
function s(M) {
|
|
448
|
+
H.selectChange(M, h, r.field, a, {
|
|
454
449
|
column: r,
|
|
455
450
|
datasource: "row"
|
|
456
451
|
});
|
|
457
452
|
}
|
|
458
|
-
function
|
|
459
|
-
|
|
453
|
+
function u() {
|
|
454
|
+
H.clear(h, r.field, f, c, "row");
|
|
460
455
|
}
|
|
461
456
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
462
|
-
modelValue: h[
|
|
463
|
-
"onUpdate:modelValue": (
|
|
457
|
+
modelValue: h[m],
|
|
458
|
+
"onUpdate:modelValue": (M) => h[m] = M,
|
|
464
459
|
filterable: !0,
|
|
465
460
|
clearable: !0
|
|
466
461
|
}, i, {
|
|
467
462
|
style: "width: 100%",
|
|
468
|
-
onChange: (
|
|
469
|
-
onClear: () =>
|
|
470
|
-
}), _isSlot(o =
|
|
471
|
-
key:
|
|
472
|
-
label:
|
|
473
|
-
value:
|
|
463
|
+
onChange: (M) => s(M),
|
|
464
|
+
onClear: () => u()
|
|
465
|
+
}), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
|
|
466
|
+
key: M[d],
|
|
467
|
+
label: M[Z],
|
|
468
|
+
value: M[d]
|
|
474
469
|
}, null))) ? o : {
|
|
475
470
|
default: () => [o]
|
|
476
471
|
})];
|
|
@@ -481,45 +476,41 @@ const VxetableRender = (VXETable, {
|
|
|
481
476
|
row: h,
|
|
482
477
|
column: r
|
|
483
478
|
} = l, {
|
|
484
|
-
options:
|
|
479
|
+
options: e,
|
|
485
480
|
props: i,
|
|
486
|
-
optionProps:
|
|
487
|
-
events:
|
|
481
|
+
optionProps: t = {},
|
|
482
|
+
events: c
|
|
488
483
|
} = a, {
|
|
489
|
-
label:
|
|
484
|
+
label: Z = "label",
|
|
490
485
|
value: d = "value",
|
|
491
|
-
extLabel:
|
|
492
|
-
} =
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
i
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
});
|
|
500
|
-
});
|
|
501
|
-
function H(n) {
|
|
502
|
-
u.selectChange(n, h, r.field, a, {
|
|
486
|
+
extLabel: n
|
|
487
|
+
} = t, {
|
|
488
|
+
multiple: f,
|
|
489
|
+
mapField: H
|
|
490
|
+
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
491
|
+
m.setDefaultValue(i, h, r.field);
|
|
492
|
+
function u(C) {
|
|
493
|
+
m.selectChange(C, h, r.field, a, {
|
|
503
494
|
column: r,
|
|
504
495
|
datasource: "row"
|
|
505
496
|
});
|
|
506
497
|
}
|
|
507
|
-
function
|
|
508
|
-
|
|
498
|
+
function M() {
|
|
499
|
+
m.clear(h, r.field, H, c, "row");
|
|
509
500
|
}
|
|
510
501
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
511
|
-
modelValue: h[
|
|
512
|
-
"onUpdate:modelValue": (
|
|
502
|
+
modelValue: h[s],
|
|
503
|
+
"onUpdate:modelValue": (C) => h[s] = C,
|
|
513
504
|
filterable: !0,
|
|
514
505
|
clearable: !0
|
|
515
506
|
}, i, {
|
|
516
507
|
style: "width: 100%",
|
|
517
|
-
onChange: (
|
|
518
|
-
onClear: () =>
|
|
519
|
-
}), _isSlot(o =
|
|
520
|
-
key:
|
|
521
|
-
label:
|
|
522
|
-
value:
|
|
508
|
+
onChange: (C) => u(C),
|
|
509
|
+
onClear: () => M()
|
|
510
|
+
}), _isSlot(o = e.map((C) => createVNode(resolveComponent("el-option"), {
|
|
511
|
+
key: C[d],
|
|
512
|
+
label: n && C[n] ? C[d] : C[Z],
|
|
513
|
+
value: C[d]
|
|
523
514
|
}, null))) ? o : {
|
|
524
515
|
default: () => [o]
|
|
525
516
|
})];
|
|
@@ -550,39 +541,39 @@ const VxetableRender = (VXETable, {
|
|
|
550
541
|
data: h,
|
|
551
542
|
field: r
|
|
552
543
|
} = l, {
|
|
553
|
-
options:
|
|
544
|
+
options: e,
|
|
554
545
|
props: i,
|
|
555
|
-
optionProps:
|
|
556
|
-
events:
|
|
546
|
+
optionProps: t = {},
|
|
547
|
+
events: c
|
|
557
548
|
} = a, {
|
|
558
|
-
label:
|
|
549
|
+
label: Z = "label",
|
|
559
550
|
value: d = "value"
|
|
560
|
-
} =
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
} = i;
|
|
564
|
-
|
|
565
|
-
function
|
|
566
|
-
|
|
551
|
+
} = t, n = useComponent(), {
|
|
552
|
+
mapField: f,
|
|
553
|
+
multiple: H
|
|
554
|
+
} = i, m = H ? `_${r}` : r;
|
|
555
|
+
n.setDefaultValue(i, h, r);
|
|
556
|
+
function s(M) {
|
|
557
|
+
n.selectChange(M, h, r, a, {
|
|
567
558
|
datasource: "data"
|
|
568
559
|
});
|
|
569
560
|
}
|
|
570
|
-
function
|
|
571
|
-
|
|
561
|
+
function u() {
|
|
562
|
+
n.clear(h, r, f, c, "data");
|
|
572
563
|
}
|
|
573
564
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
574
|
-
modelValue: h[
|
|
575
|
-
"onUpdate:modelValue": (
|
|
565
|
+
modelValue: h[m],
|
|
566
|
+
"onUpdate:modelValue": (M) => h[m] = M,
|
|
576
567
|
filterable: !0,
|
|
577
568
|
clearable: !0,
|
|
578
569
|
style: "width: 100%"
|
|
579
570
|
}, i, {
|
|
580
|
-
onChange: (
|
|
581
|
-
onClear: () =>
|
|
582
|
-
}), _isSlot(o =
|
|
583
|
-
key:
|
|
584
|
-
label:
|
|
585
|
-
value:
|
|
571
|
+
onChange: (M) => s(M),
|
|
572
|
+
onClear: () => u()
|
|
573
|
+
}), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
|
|
574
|
+
key: M[d],
|
|
575
|
+
label: M[Z],
|
|
576
|
+
value: M[d]
|
|
586
577
|
}, null))) ? o : {
|
|
587
578
|
default: () => [o]
|
|
588
579
|
})];
|
|
@@ -594,51 +585,51 @@ const VxetableRender = (VXETable, {
|
|
|
594
585
|
field: h
|
|
595
586
|
} = l, {
|
|
596
587
|
props: r,
|
|
597
|
-
events:
|
|
588
|
+
events: e
|
|
598
589
|
} = a, i = useComponent(), {
|
|
599
|
-
defaultValues:
|
|
600
|
-
mapField:
|
|
590
|
+
defaultValues: t,
|
|
591
|
+
mapField: c
|
|
601
592
|
} = r;
|
|
602
|
-
|
|
603
|
-
function
|
|
593
|
+
t && (o[h] = t);
|
|
594
|
+
function Z(n, f) {
|
|
604
595
|
const {
|
|
605
|
-
mapField:
|
|
606
|
-
field:
|
|
607
|
-
displayName:
|
|
608
|
-
multiple:
|
|
596
|
+
mapField: H,
|
|
597
|
+
field: m,
|
|
598
|
+
displayName: s,
|
|
599
|
+
multiple: u
|
|
609
600
|
} = r;
|
|
610
|
-
if (
|
|
611
|
-
if (
|
|
601
|
+
if (u) {
|
|
602
|
+
if (u) {
|
|
612
603
|
const C = {};
|
|
613
|
-
o[
|
|
614
|
-
for (const V in
|
|
615
|
-
C[V] = A ? C[V] + "," + w[
|
|
616
|
-
return A = A ? A + "," + w[
|
|
604
|
+
o[s || m] = n.reduce((A, w) => {
|
|
605
|
+
for (const V in H)
|
|
606
|
+
C[V] = A ? C[V] + "," + w[H[V]] : w[H[V]];
|
|
607
|
+
return A = A ? A + "," + w[s || m] : w[s || m], A;
|
|
617
608
|
}, ""), Object.assign(o, C);
|
|
618
609
|
}
|
|
619
610
|
} else {
|
|
620
611
|
const C = {
|
|
621
|
-
[
|
|
612
|
+
[s || m]: n[f || s || m]
|
|
622
613
|
};
|
|
623
|
-
for (const A in
|
|
624
|
-
C[A] =
|
|
614
|
+
for (const A in H)
|
|
615
|
+
C[A] = n[H[A]];
|
|
625
616
|
Object.assign(o, C);
|
|
626
617
|
}
|
|
627
|
-
const
|
|
618
|
+
const M = {
|
|
628
619
|
data: o,
|
|
629
|
-
options:
|
|
630
|
-
field:
|
|
620
|
+
options: n,
|
|
621
|
+
field: m
|
|
631
622
|
};
|
|
632
|
-
|
|
623
|
+
e != null && e.change && e.change(M);
|
|
633
624
|
}
|
|
634
625
|
function d() {
|
|
635
|
-
i.clear(o, h,
|
|
626
|
+
i.clear(o, h, c, e, "data");
|
|
636
627
|
}
|
|
637
628
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
638
629
|
record: o
|
|
639
630
|
}, r, {
|
|
640
631
|
mode: "vxe",
|
|
641
|
-
onChange: (
|
|
632
|
+
onChange: (n, f) => Z(n, f),
|
|
642
633
|
onClear: () => d()
|
|
643
634
|
}), null)];
|
|
644
635
|
},
|
|
@@ -649,40 +640,40 @@ const VxetableRender = (VXETable, {
|
|
|
649
640
|
column: h
|
|
650
641
|
} = l, {
|
|
651
642
|
props: r,
|
|
652
|
-
events:
|
|
643
|
+
events: e
|
|
653
644
|
} = a, i = useComponent();
|
|
654
|
-
function Z
|
|
645
|
+
function t(Z, d) {
|
|
655
646
|
const {
|
|
656
|
-
mapField:
|
|
657
|
-
field:
|
|
658
|
-
displayName:
|
|
659
|
-
multiple:
|
|
647
|
+
mapField: n,
|
|
648
|
+
field: f,
|
|
649
|
+
displayName: H,
|
|
650
|
+
multiple: m
|
|
660
651
|
} = r;
|
|
661
|
-
if (!
|
|
662
|
-
const
|
|
663
|
-
[
|
|
652
|
+
if (!m) {
|
|
653
|
+
const u = {
|
|
654
|
+
[H || f]: Z[d || H || f]
|
|
664
655
|
};
|
|
665
|
-
for (const
|
|
666
|
-
|
|
667
|
-
Object.assign(o,
|
|
656
|
+
for (const M in n)
|
|
657
|
+
u[M] = Z[n[M]];
|
|
658
|
+
Object.assign(o, u);
|
|
668
659
|
}
|
|
669
|
-
const
|
|
660
|
+
const s = {
|
|
670
661
|
row: o,
|
|
671
|
-
options:
|
|
662
|
+
options: Z,
|
|
672
663
|
field: h.field
|
|
673
664
|
};
|
|
674
|
-
|
|
665
|
+
e != null && e.change && e.change(s);
|
|
675
666
|
}
|
|
676
|
-
function
|
|
677
|
-
i.clear(o, h.field, mapField,
|
|
667
|
+
function c() {
|
|
668
|
+
i.clear(o, h.field, mapField, e, "row");
|
|
678
669
|
}
|
|
679
670
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
680
671
|
record: o,
|
|
681
672
|
mode: "vxe",
|
|
682
673
|
transfer: !0
|
|
683
674
|
}, r, {
|
|
684
|
-
onChange: (
|
|
685
|
-
onClear: () =>
|
|
675
|
+
onChange: (Z, d) => t(Z, d),
|
|
676
|
+
onClear: () => c()
|
|
686
677
|
}), null)];
|
|
687
678
|
},
|
|
688
679
|
// 单元格默认
|
|
@@ -692,39 +683,39 @@ const VxetableRender = (VXETable, {
|
|
|
692
683
|
column: h
|
|
693
684
|
} = l, {
|
|
694
685
|
props: r,
|
|
695
|
-
events:
|
|
686
|
+
events: e
|
|
696
687
|
} = a, i = useComponent();
|
|
697
|
-
function Z
|
|
688
|
+
function t(Z, d) {
|
|
698
689
|
const {
|
|
699
|
-
mapField:
|
|
700
|
-
field:
|
|
701
|
-
displayName:
|
|
702
|
-
multiple:
|
|
690
|
+
mapField: n,
|
|
691
|
+
field: f,
|
|
692
|
+
displayName: H,
|
|
693
|
+
multiple: m
|
|
703
694
|
} = r;
|
|
704
|
-
if (!
|
|
705
|
-
const
|
|
706
|
-
[
|
|
695
|
+
if (!m) {
|
|
696
|
+
const u = {
|
|
697
|
+
[H || f]: Z[d || H || f]
|
|
707
698
|
};
|
|
708
|
-
for (const
|
|
709
|
-
|
|
710
|
-
Object.assign(o,
|
|
699
|
+
for (const M in n)
|
|
700
|
+
u[M] = Z[n[M]];
|
|
701
|
+
Object.assign(o, u);
|
|
711
702
|
}
|
|
712
|
-
const
|
|
703
|
+
const s = {
|
|
713
704
|
row: o,
|
|
714
|
-
options:
|
|
705
|
+
options: Z,
|
|
715
706
|
field: h.field
|
|
716
707
|
};
|
|
717
|
-
|
|
708
|
+
e != null && e.change && e.change(s);
|
|
718
709
|
}
|
|
719
|
-
function
|
|
720
|
-
i.clear(o, h.field, mapField,
|
|
710
|
+
function c() {
|
|
711
|
+
i.clear(o, h.field, mapField, e, "row");
|
|
721
712
|
}
|
|
722
713
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
723
714
|
record: o,
|
|
724
715
|
mode: "ele"
|
|
725
716
|
}, r, {
|
|
726
|
-
onChange: (
|
|
727
|
-
onClear: () =>
|
|
717
|
+
onChange: (Z, d) => t(Z, d),
|
|
718
|
+
onClear: () => c()
|
|
728
719
|
}), null)];
|
|
729
720
|
},
|
|
730
721
|
// 可编辑显示模板
|
|
@@ -736,22 +727,62 @@ const VxetableRender = (VXETable, {
|
|
|
736
727
|
return [createVNode("span", null, [o[h.field]])];
|
|
737
728
|
}
|
|
738
729
|
}), VXETable.renderer.add("#upload", {
|
|
730
|
+
renderTableEdit(a, l) {
|
|
731
|
+
const {
|
|
732
|
+
row: o,
|
|
733
|
+
column: h
|
|
734
|
+
} = l, {
|
|
735
|
+
props: r,
|
|
736
|
+
events: e
|
|
737
|
+
} = a;
|
|
738
|
+
function i(t, c) {
|
|
739
|
+
o[h.field] = "", e != null && e.remove && (e == null || e.remove(t, c));
|
|
740
|
+
}
|
|
741
|
+
return [createVNode(resolveComponent("form-upload"), mergeProps({
|
|
742
|
+
record: o,
|
|
743
|
+
field: h.field,
|
|
744
|
+
size: "mini"
|
|
745
|
+
}, r, {
|
|
746
|
+
"render-mode": "column",
|
|
747
|
+
"data-status": "edit",
|
|
748
|
+
onRemove: (t, c) => i(t, c)
|
|
749
|
+
}), null)];
|
|
750
|
+
},
|
|
751
|
+
// 可编辑显示模板
|
|
752
|
+
renderTableCell(a, l) {
|
|
753
|
+
const {
|
|
754
|
+
row: o,
|
|
755
|
+
column: h
|
|
756
|
+
} = l, {
|
|
757
|
+
props: r
|
|
758
|
+
} = a;
|
|
759
|
+
return [createVNode(resolveComponent("form-upload"), mergeProps({
|
|
760
|
+
record: o,
|
|
761
|
+
field: h.field,
|
|
762
|
+
size: "mini"
|
|
763
|
+
}, r, {
|
|
764
|
+
mode: "image",
|
|
765
|
+
"render-mode": "column",
|
|
766
|
+
"data-status": "detail"
|
|
767
|
+
}), null)];
|
|
768
|
+
},
|
|
739
769
|
renderItemContent(a, l) {
|
|
740
770
|
const {
|
|
741
771
|
data: o,
|
|
742
772
|
field: h
|
|
743
773
|
} = l, {
|
|
744
774
|
props: r,
|
|
745
|
-
events:
|
|
775
|
+
events: e
|
|
746
776
|
} = a;
|
|
747
|
-
function i() {
|
|
748
|
-
o[h] = "",
|
|
777
|
+
function i(t, c) {
|
|
778
|
+
o[h] = "", e != null && e.remove && (e == null || e.remove(t, c));
|
|
749
779
|
}
|
|
750
780
|
return [createVNode(resolveComponent("form-upload"), mergeProps({
|
|
751
781
|
record: o,
|
|
752
|
-
field: h
|
|
782
|
+
field: h,
|
|
783
|
+
mode: "image"
|
|
753
784
|
}, r, {
|
|
754
|
-
|
|
785
|
+
onRemove: (t, c) => i(t, c)
|
|
755
786
|
}), null)];
|
|
756
787
|
}
|
|
757
788
|
}), VXETable.renderer.add("#tag", {
|
|
@@ -763,17 +794,17 @@ const VxetableRender = (VXETable, {
|
|
|
763
794
|
column: r
|
|
764
795
|
} = l, {
|
|
765
796
|
props: {
|
|
766
|
-
code:
|
|
797
|
+
code: e,
|
|
767
798
|
tagMap: i
|
|
768
799
|
}
|
|
769
800
|
} = a;
|
|
770
|
-
function
|
|
801
|
+
function t() {
|
|
771
802
|
return h[r.field] ? i[h[r.field]] : null;
|
|
772
803
|
}
|
|
773
804
|
return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
|
|
774
805
|
effect: "dark",
|
|
775
|
-
type:
|
|
776
|
-
}, _isSlot(o = getValue(
|
|
806
|
+
type: t()
|
|
807
|
+
}, _isSlot(o = getValue(e, h[r.field])) ? o : {
|
|
777
808
|
default: () => [o]
|
|
778
809
|
}) : null];
|
|
779
810
|
}
|
|
@@ -785,29 +816,29 @@ const VxetableRender = (VXETable, {
|
|
|
785
816
|
} = l, {
|
|
786
817
|
props: {
|
|
787
818
|
code: r,
|
|
788
|
-
activeValue:
|
|
819
|
+
activeValue: e,
|
|
789
820
|
inactiveValue: i
|
|
790
821
|
},
|
|
791
|
-
events:
|
|
822
|
+
events: t
|
|
792
823
|
} = a;
|
|
793
|
-
function
|
|
824
|
+
function c(Z) {
|
|
794
825
|
const d = {
|
|
795
826
|
row: o,
|
|
796
827
|
column: h,
|
|
797
|
-
value:
|
|
828
|
+
value: Z
|
|
798
829
|
};
|
|
799
|
-
|
|
830
|
+
t != null && t.change && t.change(d);
|
|
800
831
|
}
|
|
801
832
|
return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
|
|
802
833
|
modelValue: o[h.field],
|
|
803
|
-
"onUpdate:modelValue": (
|
|
834
|
+
"onUpdate:modelValue": (Z) => o[h.field] = Z,
|
|
804
835
|
"inline-prompt": !0,
|
|
805
836
|
size: "large",
|
|
806
837
|
style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
|
|
807
838
|
}, a.props, {
|
|
808
|
-
"active-text": getValue(r,
|
|
839
|
+
"active-text": getValue(r, e),
|
|
809
840
|
"inactive-text": getValue(r, i),
|
|
810
|
-
onChange: (
|
|
841
|
+
onChange: (Z) => c(Z)
|
|
811
842
|
}), null) : null];
|
|
812
843
|
}
|
|
813
844
|
}), VXETable.renderer.add("#iconSelect", {
|
|
@@ -850,19 +881,19 @@ const VxetableRender = (VXETable, {
|
|
|
850
881
|
column: h
|
|
851
882
|
} = l, {
|
|
852
883
|
props: r,
|
|
853
|
-
sourceData:
|
|
884
|
+
sourceData: e,
|
|
854
885
|
events: i
|
|
855
886
|
} = a;
|
|
856
887
|
return [createVNode(resolveComponent("el-tree-select"), mergeProps({
|
|
857
888
|
modelValue: o[h.field],
|
|
858
|
-
"onUpdate:modelValue": (
|
|
859
|
-
data:
|
|
889
|
+
"onUpdate:modelValue": (t) => o[h.field] = t,
|
|
890
|
+
data: e,
|
|
860
891
|
"check-strictly": !0
|
|
861
892
|
}, r, {
|
|
862
893
|
filterable: !0,
|
|
863
|
-
onCheckChange: (
|
|
864
|
-
onNodeClick: (
|
|
865
|
-
onCurrentChange: (
|
|
894
|
+
onCheckChange: (t, c, Z) => onCheckChange(t, c, Z, i),
|
|
895
|
+
onNodeClick: (t, c, Z) => onNodeClick(t, c, Z, i),
|
|
896
|
+
onCurrentChange: (t, c) => onCurrentChange(t, c, i)
|
|
866
897
|
}), null)];
|
|
867
898
|
},
|
|
868
899
|
renderTableCell(a, l) {
|
|
@@ -871,14 +902,14 @@ const VxetableRender = (VXETable, {
|
|
|
871
902
|
column: h
|
|
872
903
|
} = l, {
|
|
873
904
|
sourceData: r,
|
|
874
|
-
props:
|
|
905
|
+
props: e = {}
|
|
875
906
|
} = a, {
|
|
876
907
|
children: i = "children",
|
|
877
|
-
label:
|
|
878
|
-
} =
|
|
908
|
+
label: t = "label"
|
|
909
|
+
} = e, c = findTree(r, (Z) => Z.value === o[h.field], {
|
|
879
910
|
children: i
|
|
880
911
|
});
|
|
881
|
-
return
|
|
912
|
+
return c ? [createVNode("span", null, [c.item[t]])] : null;
|
|
882
913
|
},
|
|
883
914
|
renderItemContent(a, l) {
|
|
884
915
|
const {
|
|
@@ -886,96 +917,96 @@ const VxetableRender = (VXETable, {
|
|
|
886
917
|
field: h
|
|
887
918
|
} = l, {
|
|
888
919
|
props: r,
|
|
889
|
-
sourceData:
|
|
920
|
+
sourceData: e,
|
|
890
921
|
events: i
|
|
891
922
|
} = a;
|
|
892
923
|
return [createVNode(resolveComponent("el-tree-select"), mergeProps({
|
|
893
924
|
modelValue: o[h],
|
|
894
|
-
"onUpdate:modelValue": (
|
|
895
|
-
data:
|
|
925
|
+
"onUpdate:modelValue": (t) => o[h] = t,
|
|
926
|
+
data: e,
|
|
896
927
|
"check-strictly": !0
|
|
897
928
|
}, r, {
|
|
898
929
|
filterable: !0,
|
|
899
|
-
onCheckChange: (
|
|
900
|
-
onNodeClick: (
|
|
901
|
-
onCurrentChange: (
|
|
930
|
+
onCheckChange: (t, c, Z) => onCheckChange(t, c, Z, i),
|
|
931
|
+
onNodeClick: (t, c, Z) => onNodeClick(t, c, Z, i),
|
|
932
|
+
onCurrentChange: (t, c) => onCurrentChange(t, c, i)
|
|
902
933
|
}), null)];
|
|
903
934
|
}
|
|
904
935
|
});
|
|
905
936
|
const useComponent = () => ({
|
|
906
|
-
clear: (r,
|
|
907
|
-
if (r[
|
|
908
|
-
for (const
|
|
909
|
-
r[
|
|
910
|
-
|
|
911
|
-
[
|
|
912
|
-
field:
|
|
937
|
+
clear: (r, e, i, t, c) => {
|
|
938
|
+
if (r[e] = null, !isEmpty(i))
|
|
939
|
+
for (const Z in i)
|
|
940
|
+
r[Z] = null;
|
|
941
|
+
t != null && t.clear && t.clear({
|
|
942
|
+
[c]: r,
|
|
943
|
+
field: e
|
|
913
944
|
});
|
|
914
945
|
},
|
|
915
|
-
remote: async (r,
|
|
946
|
+
remote: async (r, e, i) => {
|
|
916
947
|
const {
|
|
917
|
-
options:
|
|
918
|
-
props:
|
|
919
|
-
events:
|
|
948
|
+
options: t,
|
|
949
|
+
props: c,
|
|
950
|
+
events: Z
|
|
920
951
|
} = i, {
|
|
921
952
|
fetchField: d,
|
|
922
|
-
url:
|
|
923
|
-
defaultParams:
|
|
924
|
-
method:
|
|
925
|
-
} =
|
|
953
|
+
url: n,
|
|
954
|
+
defaultParams: f = {},
|
|
955
|
+
method: H = "get"
|
|
956
|
+
} = c, m = getCookieParam(), s = Object.assign({
|
|
926
957
|
pageSize: 20,
|
|
927
958
|
pageNum: 1,
|
|
928
|
-
...
|
|
929
|
-
...
|
|
959
|
+
...m,
|
|
960
|
+
...f
|
|
930
961
|
}, {
|
|
931
|
-
[d ||
|
|
962
|
+
[d || e]: r
|
|
932
963
|
});
|
|
933
|
-
if (
|
|
934
|
-
let
|
|
964
|
+
if (c.loading) return;
|
|
965
|
+
let u;
|
|
935
966
|
try {
|
|
936
|
-
|
|
967
|
+
t.length = 0, c.loading = !0, u = await serviceApi[H](n, s), Z != null && Z.filterMethod ? t.push(...Z.filterMethod(u.list || u)) : u && (u.list ? t.push(...u.list) : t.push(...u));
|
|
937
968
|
} finally {
|
|
938
|
-
|
|
969
|
+
c.loading = !1;
|
|
939
970
|
}
|
|
940
971
|
},
|
|
941
|
-
selectChange: (r,
|
|
942
|
-
let
|
|
972
|
+
selectChange: (r, e, i, t, c) => {
|
|
973
|
+
let Z = null;
|
|
943
974
|
const {
|
|
944
975
|
datasource: d
|
|
945
|
-
} =
|
|
946
|
-
options:
|
|
947
|
-
props:
|
|
948
|
-
optionProps:
|
|
949
|
-
events:
|
|
950
|
-
} =
|
|
951
|
-
[d]:
|
|
976
|
+
} = c, {
|
|
977
|
+
options: n,
|
|
978
|
+
props: f,
|
|
979
|
+
optionProps: H = {},
|
|
980
|
+
events: m
|
|
981
|
+
} = t, s = {
|
|
982
|
+
[d]: e,
|
|
952
983
|
field: i
|
|
953
984
|
};
|
|
954
|
-
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
const A =
|
|
958
|
-
|
|
959
|
-
}),
|
|
960
|
-
}), Object.assign(
|
|
961
|
-
options:
|
|
962
|
-
})) : (
|
|
963
|
-
|
|
964
|
-
}), Object.assign(
|
|
965
|
-
option:
|
|
966
|
-
})), d === "row" && Object.assign(
|
|
967
|
-
column:
|
|
968
|
-
}),
|
|
969
|
-
},
|
|
970
|
-
setDefaultValue: (r,
|
|
985
|
+
e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), Z = [], r.forEach((u) => {
|
|
986
|
+
const M = n.find((C) => u === C[H == null ? void 0 : H.value]);
|
|
987
|
+
M && !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((C) => {
|
|
988
|
+
const A = M[f.mapField[C]], w = e[C] ? e[C].toString() : "";
|
|
989
|
+
e[C] = w && !w.includes(A) ? `${w},${A}` : A;
|
|
990
|
+
}), M && Z.push(M);
|
|
991
|
+
}), Object.assign(s, {
|
|
992
|
+
options: Z
|
|
993
|
+
})) : (e[i] = f != null && f.multiple ? null : r, Z = n.find((u) => r === u[H == null ? void 0 : H.value]), !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((u) => {
|
|
994
|
+
e[u] = Z ? Z[f.mapField[u]] : null;
|
|
995
|
+
}), Object.assign(s, {
|
|
996
|
+
option: Z
|
|
997
|
+
})), d === "row" && Object.assign(s, {
|
|
998
|
+
column: c.column
|
|
999
|
+
}), m != null && m.change && m.change(s);
|
|
1000
|
+
},
|
|
1001
|
+
setDefaultValue: (r, e, i) => {
|
|
971
1002
|
var d;
|
|
972
1003
|
const {
|
|
973
|
-
multiple:
|
|
974
|
-
defaultValue:
|
|
975
|
-
} = r,
|
|
976
|
-
!
|
|
977
|
-
|
|
978
|
-
})), !
|
|
1004
|
+
multiple: t,
|
|
1005
|
+
defaultValue: c
|
|
1006
|
+
} = r, Z = t ? `_${i}` : i;
|
|
1007
|
+
!e[i] && c && (e[i] = c, isPlainObject(c) && Object.keys(c).forEach((f) => {
|
|
1008
|
+
e[f] = e[f] || c[f];
|
|
1009
|
+
})), !e[Z] && e[i] && (e[Z] = t ? (d = e[i]) == null ? void 0 : d.split(",") : e[i]);
|
|
979
1010
|
}
|
|
980
1011
|
}), onCheckChange = (a, l, o, h) => {
|
|
981
1012
|
console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
|
|
@@ -986,7 +1017,7 @@ const VxetableRender = (VXETable, {
|
|
|
986
1017
|
};
|
|
987
1018
|
function getValue(a, l) {
|
|
988
1019
|
var o, h, r;
|
|
989
|
-
return !l || !a || !dict ? l : (r = (h = (o = dict[a]) == null ? void 0 : o.children) == null ? void 0 : h.find((
|
|
1020
|
+
return !l || !a || !dict ? l : (r = (h = (o = dict[a]) == null ? void 0 : o.children) == null ? void 0 : h.find((e) => e.dictCode === l)) == null ? void 0 : r.dictName;
|
|
990
1021
|
}
|
|
991
1022
|
return VXETable;
|
|
992
1023
|
}, getCookieParam = () => {
|
|
@@ -1000,12 +1031,12 @@ const VxetableRender = (VXETable, {
|
|
|
1000
1031
|
}, removeClass = (a, l, o) => {
|
|
1001
1032
|
var h, r;
|
|
1002
1033
|
if (hasClass(a, l)) {
|
|
1003
|
-
const
|
|
1004
|
-
a.className = (h = a.className) == null ? void 0 : h.replace(
|
|
1034
|
+
const e = new RegExp("(\\s|^)" + l + "(\\s|$)");
|
|
1035
|
+
a.className = (h = a.className) == null ? void 0 : h.replace(e, " ").trim();
|
|
1005
1036
|
}
|
|
1006
1037
|
if (o && hasClass(a, o)) {
|
|
1007
|
-
const
|
|
1008
|
-
a.className = (r = a.className) == null ? void 0 : r.replace(
|
|
1038
|
+
const e = new RegExp("(\\s|^)" + o + "(\\s|$)");
|
|
1039
|
+
a.className = (r = a.className) == null ? void 0 : r.replace(e, " ").trim();
|
|
1009
1040
|
}
|
|
1010
1041
|
}, toggleClass = (a, l, o) => {
|
|
1011
1042
|
const h = o || document.body;
|
|
@@ -1040,45 +1071,45 @@ const openLink = (a) => {
|
|
|
1040
1071
|
}, domSymbol = Symbol("watermark-dom");
|
|
1041
1072
|
function useWatermark(a = ref(document.body)) {
|
|
1042
1073
|
const l = useRafThrottle(function() {
|
|
1043
|
-
const
|
|
1044
|
-
if (!
|
|
1045
|
-
const { clientHeight: d, clientWidth:
|
|
1046
|
-
i({ height: d, width:
|
|
1074
|
+
const Z = unref(a);
|
|
1075
|
+
if (!Z) return;
|
|
1076
|
+
const { clientHeight: d, clientWidth: n } = Z;
|
|
1077
|
+
i({ height: d, width: n });
|
|
1047
1078
|
}), o = domSymbol.toString(), h = shallowRef(), r = () => {
|
|
1048
|
-
const
|
|
1079
|
+
const Z = unref(h);
|
|
1049
1080
|
h.value = void 0;
|
|
1050
1081
|
const d = unref(a);
|
|
1051
|
-
d && (
|
|
1082
|
+
d && (Z && d.removeChild(Z), removeResizeListener(d, l));
|
|
1052
1083
|
};
|
|
1053
|
-
function
|
|
1054
|
-
const
|
|
1055
|
-
Object.assign(
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1084
|
+
function e(Z, d) {
|
|
1085
|
+
const n = document.createElement("canvas"), f = 260, H = 180;
|
|
1086
|
+
Object.assign(n, { width: f, height: H });
|
|
1087
|
+
const m = n.getContext("2d");
|
|
1088
|
+
return m && (m.rotate(-20 * Math.PI / 120), m.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", m.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", m.textAlign = "left", m.textBaseline = "middle", m.fillText(Z, f / 20, H)), n.toDataURL("image/png");
|
|
1058
1089
|
}
|
|
1059
|
-
function i(
|
|
1090
|
+
function i(Z = {}) {
|
|
1060
1091
|
const d = unref(h);
|
|
1061
|
-
d && (isUndefined(
|
|
1062
|
-
|
|
1063
|
-
|
|
1092
|
+
d && (isUndefined(Z.width) || (d.style.width = `${Z.width}px`), isUndefined(Z.height) || (d.style.height = `${Z.height}px`), isUndefined(Z.str) || (d.style.background = `url(${e(
|
|
1093
|
+
Z.str,
|
|
1094
|
+
Z.attr
|
|
1064
1095
|
)}) left top repeat`));
|
|
1065
1096
|
}
|
|
1066
|
-
const
|
|
1097
|
+
const t = (Z, d) => {
|
|
1067
1098
|
if (unref(h))
|
|
1068
|
-
return i({ str:
|
|
1069
|
-
const
|
|
1070
|
-
h.value =
|
|
1071
|
-
const
|
|
1072
|
-
if (!
|
|
1073
|
-
const { clientHeight:
|
|
1074
|
-
return i({ str:
|
|
1099
|
+
return i({ str: Z, attr: d }), o;
|
|
1100
|
+
const n = document.createElement("div");
|
|
1101
|
+
h.value = n, n.id = o, n.style.pointerEvents = "none", n.style.top = "0px", n.style.left = "0px", n.style.position = "absolute", n.style.zIndex = "100000";
|
|
1102
|
+
const f = unref(a);
|
|
1103
|
+
if (!f) return o;
|
|
1104
|
+
const { clientHeight: H, clientWidth: m } = f;
|
|
1105
|
+
return i({ str: Z, width: m, height: H, attr: d }), f.appendChild(n), o;
|
|
1075
1106
|
};
|
|
1076
|
-
function
|
|
1077
|
-
Z
|
|
1107
|
+
function c(Z, d) {
|
|
1108
|
+
t(Z, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
|
|
1078
1109
|
r();
|
|
1079
1110
|
});
|
|
1080
1111
|
}
|
|
1081
|
-
return { setWatermark:
|
|
1112
|
+
return { setWatermark: c, clear: r };
|
|
1082
1113
|
}
|
|
1083
1114
|
const DEFAULT_EXCLUDE_KEYS = ["class", "style"], LISTENER_PREFIX = /^on[A-Z]/;
|
|
1084
1115
|
function entries(a) {
|
|
@@ -1087,43 +1118,43 @@ function entries(a) {
|
|
|
1087
1118
|
function useAttrs(a = {}) {
|
|
1088
1119
|
const l = getCurrentInstance();
|
|
1089
1120
|
if (!l) return {};
|
|
1090
|
-
const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}),
|
|
1121
|
+
const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), e = h.concat(DEFAULT_EXCLUDE_KEYS);
|
|
1091
1122
|
return l.attrs = reactive(l.attrs), watchEffect(() => {
|
|
1092
|
-
const i = entries(l.attrs).reduce((
|
|
1123
|
+
const i = entries(l.attrs).reduce((t, [c, Z]) => (!e.includes(c) && !(o && LISTENER_PREFIX.test(c)) && (t[c] = Z), t), {});
|
|
1093
1124
|
r.value = i;
|
|
1094
1125
|
}), r;
|
|
1095
1126
|
}
|
|
1096
1127
|
const useRender = () => {
|
|
1097
|
-
const a = { value: "dictCode", label: "dictName" }, l = (v,
|
|
1128
|
+
const a = { value: "dictCode", label: "dictName" }, l = (v, p) => {
|
|
1098
1129
|
var N;
|
|
1099
|
-
const
|
|
1100
|
-
let
|
|
1130
|
+
const b = k(p);
|
|
1131
|
+
let y = {
|
|
1101
1132
|
clearable: !0,
|
|
1102
1133
|
disabled: !1,
|
|
1103
1134
|
showValue: !1,
|
|
1104
1135
|
placeholder: null
|
|
1105
1136
|
}, L, x;
|
|
1106
|
-
isObject(v) ? (
|
|
1137
|
+
isObject(v) ? (y = Object.assign(y, v), L = v.defaultValue, x = v == null ? void 0 : v.code) : x = v;
|
|
1107
1138
|
const D = (N = storageLocal.getItem("kLov")[x]) == null ? void 0 : N.children, F = D ? D.filter((E) => E.enabled === "1") : [];
|
|
1108
1139
|
return {
|
|
1109
1140
|
name: "#select",
|
|
1110
1141
|
optionProps: a,
|
|
1111
1142
|
options: F,
|
|
1112
|
-
props:
|
|
1143
|
+
props: y,
|
|
1113
1144
|
defaultValue: L,
|
|
1114
|
-
events:
|
|
1145
|
+
events: b
|
|
1115
1146
|
};
|
|
1116
|
-
}, o = (v,
|
|
1117
|
-
const
|
|
1147
|
+
}, o = (v, p) => {
|
|
1148
|
+
const b = k(p);
|
|
1118
1149
|
return {
|
|
1119
1150
|
name: "#SuSelect",
|
|
1120
1151
|
optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
|
|
1121
1152
|
props: v == null ? void 0 : v.props,
|
|
1122
1153
|
options: (v == null ? void 0 : v.options) || [],
|
|
1123
|
-
events:
|
|
1154
|
+
events: b
|
|
1124
1155
|
};
|
|
1125
|
-
}, h = (v,
|
|
1126
|
-
const
|
|
1156
|
+
}, h = (v, p) => {
|
|
1157
|
+
const b = {
|
|
1127
1158
|
optionProps: { extLabel: "userName", value: "employeeName" },
|
|
1128
1159
|
props: {
|
|
1129
1160
|
attrs: { disabled: v == null ? void 0 : v.disabled },
|
|
@@ -1135,9 +1166,9 @@ const useRender = () => {
|
|
|
1135
1166
|
fetchField: "employeeName"
|
|
1136
1167
|
}
|
|
1137
1168
|
};
|
|
1138
|
-
return o(
|
|
1169
|
+
return o(b, p);
|
|
1139
1170
|
}, r = (v) => {
|
|
1140
|
-
const
|
|
1171
|
+
const p = {
|
|
1141
1172
|
optionProps: { extLabel: "userName", value: "name" },
|
|
1142
1173
|
props: {
|
|
1143
1174
|
code: "sys/listUsers",
|
|
@@ -1146,12 +1177,12 @@ const useRender = () => {
|
|
|
1146
1177
|
mapField: v == null ? void 0 : v.mapField
|
|
1147
1178
|
}
|
|
1148
1179
|
};
|
|
1149
|
-
return o(
|
|
1150
|
-
},
|
|
1151
|
-
const
|
|
1180
|
+
return o(p);
|
|
1181
|
+
}, e = (v, p) => {
|
|
1182
|
+
const b = {
|
|
1152
1183
|
label: "organizationName",
|
|
1153
1184
|
value: (v == null ? void 0 : v.field) || "organizationName"
|
|
1154
|
-
},
|
|
1185
|
+
}, y = {
|
|
1155
1186
|
mapField: {},
|
|
1156
1187
|
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1157
1188
|
url: "/uums/cusOrganization",
|
|
@@ -1160,50 +1191,50 @@ const useRender = () => {
|
|
|
1160
1191
|
organizationId: "id",
|
|
1161
1192
|
organizationCode: "organizationCode"
|
|
1162
1193
|
};
|
|
1163
|
-
return Object.assign(
|
|
1164
|
-
}, i = (v,
|
|
1165
|
-
const
|
|
1194
|
+
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: y, optionProps: b, options: [], methods: p };
|
|
1195
|
+
}, i = (v, p) => {
|
|
1196
|
+
const b = {
|
|
1166
1197
|
label: "orgName",
|
|
1167
1198
|
value: (v == null ? void 0 : v.field) || "orgName"
|
|
1168
|
-
},
|
|
1199
|
+
}, y = {
|
|
1169
1200
|
mapField: {},
|
|
1170
1201
|
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1171
1202
|
url: "/uums/org",
|
|
1172
1203
|
fetchField: "orgName"
|
|
1173
1204
|
}, L = { orgId: "id", orgCode: "orgCode" };
|
|
1174
|
-
return Object.assign(
|
|
1175
|
-
},
|
|
1176
|
-
const
|
|
1205
|
+
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: y, optionProps: b, options: [], methods: p };
|
|
1206
|
+
}, t = (v, p) => {
|
|
1207
|
+
const b = Object.assign({ disabled: !1 }, v), y = b == null ? void 0 : b.defaultValue;
|
|
1177
1208
|
return {
|
|
1178
1209
|
name: "VxeInput",
|
|
1179
|
-
props:
|
|
1180
|
-
defaultValue:
|
|
1181
|
-
events: k(
|
|
1210
|
+
props: b,
|
|
1211
|
+
defaultValue: y,
|
|
1212
|
+
events: k(p)
|
|
1182
1213
|
};
|
|
1183
|
-
},
|
|
1184
|
-
const
|
|
1214
|
+
}, c = (v, p) => {
|
|
1215
|
+
const b = Object.assign({ disabled: !1, rows: 3 }, v), y = b == null ? void 0 : b.defaultValue;
|
|
1185
1216
|
return {
|
|
1186
|
-
name: "
|
|
1187
|
-
props:
|
|
1188
|
-
defaultValue:
|
|
1189
|
-
events: k(
|
|
1217
|
+
name: "#textarea",
|
|
1218
|
+
props: b,
|
|
1219
|
+
defaultValue: y,
|
|
1220
|
+
events: k(p)
|
|
1190
1221
|
};
|
|
1191
|
-
},
|
|
1192
|
-
const
|
|
1193
|
-
return { name:
|
|
1194
|
-
}, d = (v,
|
|
1195
|
-
const
|
|
1196
|
-
return { name:
|
|
1197
|
-
},
|
|
1222
|
+
}, Z = (v, p) => {
|
|
1223
|
+
const b = "VxeCheckbox", { defaultValue: y, options: L, props: x } = n(v);
|
|
1224
|
+
return { name: b, defaultValue: y, options: L, props: x, events: k(p) };
|
|
1225
|
+
}, d = (v, p) => {
|
|
1226
|
+
const b = "VxeRadio", { defaultValue: y, options: L, props: x } = n(v);
|
|
1227
|
+
return { name: b, defaultValue: y, options: L, props: x, events: k(p) };
|
|
1228
|
+
}, n = (v) => {
|
|
1198
1229
|
var D;
|
|
1199
|
-
let
|
|
1200
|
-
const
|
|
1230
|
+
let p = { disabled: !1 }, b;
|
|
1231
|
+
const y = storageLocal.getItem("kLov");
|
|
1201
1232
|
let L = "";
|
|
1202
|
-
isObject(v) ? (
|
|
1203
|
-
const x = L ? (D =
|
|
1204
|
-
return { props:
|
|
1205
|
-
},
|
|
1206
|
-
const
|
|
1233
|
+
isObject(v) ? (b = v.defaultValue, L = v.code, p = Object.assign(p, v || {})) : isString(v) && (L = v);
|
|
1234
|
+
const x = L ? (D = y[L]) == null ? void 0 : D.children.map((F) => ({ label: F.dictName, value: F.dictCode })) : [];
|
|
1235
|
+
return { props: p, defaultValue: b, options: x };
|
|
1236
|
+
}, f = (v, p) => {
|
|
1237
|
+
const b = k(p);
|
|
1207
1238
|
return {
|
|
1208
1239
|
name: "VxeInput",
|
|
1209
1240
|
props: Object.assign(
|
|
@@ -1211,16 +1242,16 @@ const useRender = () => {
|
|
|
1211
1242
|
v || {}
|
|
1212
1243
|
),
|
|
1213
1244
|
defaultValue: v == null ? void 0 : v.defaultValue,
|
|
1214
|
-
events:
|
|
1245
|
+
events: b
|
|
1215
1246
|
};
|
|
1216
|
-
},
|
|
1217
|
-
const
|
|
1218
|
-
return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat:
|
|
1219
|
-
},
|
|
1220
|
-
const
|
|
1221
|
-
return { name: "#lov", props: Object.assign({}, v || {}), events:
|
|
1222
|
-
},
|
|
1223
|
-
const
|
|
1247
|
+
}, H = (v, p) => {
|
|
1248
|
+
const b = k(p), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
|
|
1249
|
+
return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: y, clearable: !0 }, v || {}), defaultValue: L, events: b };
|
|
1250
|
+
}, m = (v, p) => {
|
|
1251
|
+
const b = k(p);
|
|
1252
|
+
return { name: "#lov", props: Object.assign({}, v || {}), events: b };
|
|
1253
|
+
}, s = (v, p) => {
|
|
1254
|
+
const b = k(p), y = (v == null ? void 0 : v.optionProps) || {
|
|
1224
1255
|
label: "label",
|
|
1225
1256
|
value: "value"
|
|
1226
1257
|
}, L = Object.assign(
|
|
@@ -1229,86 +1260,98 @@ const useRender = () => {
|
|
|
1229
1260
|
);
|
|
1230
1261
|
return console.log("itemRender"), {
|
|
1231
1262
|
name: "#select",
|
|
1232
|
-
optionProps:
|
|
1263
|
+
optionProps: y,
|
|
1233
1264
|
options: (v == null ? void 0 : v.options) || [],
|
|
1234
1265
|
props: L,
|
|
1235
|
-
events:
|
|
1266
|
+
events: b
|
|
1236
1267
|
};
|
|
1237
|
-
},
|
|
1238
|
-
let
|
|
1268
|
+
}, u = (v, p) => {
|
|
1269
|
+
let b = {
|
|
1239
1270
|
openLabel: "是",
|
|
1240
1271
|
closeLabel: "否",
|
|
1241
1272
|
openValue: "Y",
|
|
1242
1273
|
closeValue: "N"
|
|
1243
|
-
},
|
|
1244
|
-
isObject(v) && !isFunction(v) ? (
|
|
1245
|
-
const L = isFunction(v) ? k(v) : k(
|
|
1246
|
-
return { name: "VxeSwitch", props:
|
|
1247
|
-
},
|
|
1248
|
-
const
|
|
1274
|
+
}, y = "Y";
|
|
1275
|
+
isObject(v) && !isFunction(v) ? (b = Object.assign(b, v || {}), y = v.defaultValue || y) : !isEmpty(v) && isString(v) && (y = v, b = Object.assign(b, { defaultValue: y }));
|
|
1276
|
+
const L = isFunction(v) ? k(v) : k(p);
|
|
1277
|
+
return { name: "VxeSwitch", props: b, defaultValue: y, events: L };
|
|
1278
|
+
}, M = (v, p) => ({ name: "#tag", props: { code: v, tagMap: p } }), C = (v, p) => {
|
|
1279
|
+
const b = {
|
|
1249
1280
|
openLabel: "启用",
|
|
1250
1281
|
closeLabel: "禁用",
|
|
1251
1282
|
openValue: "1",
|
|
1252
1283
|
closeValue: "0",
|
|
1253
1284
|
defaultValue: "1"
|
|
1254
1285
|
};
|
|
1255
|
-
!isFunction(v) && isObject(v) && Object.assign(
|
|
1256
|
-
const
|
|
1257
|
-
return
|
|
1258
|
-
}, A = () => ({ name: "#iconSelect" }), w = (v = [],
|
|
1259
|
-
const
|
|
1286
|
+
!isFunction(v) && isObject(v) && Object.assign(b, v);
|
|
1287
|
+
const y = isFunction(v) ? v : p;
|
|
1288
|
+
return u(b, y);
|
|
1289
|
+
}, A = () => ({ name: "#iconSelect" }), w = (v = [], p = {}, b) => ({ name: "#treeSelect", sourceData: v, props: p, events: b }), V = (v, p) => {
|
|
1290
|
+
const b = k(p);
|
|
1260
1291
|
return {
|
|
1261
1292
|
name: "#area",
|
|
1262
1293
|
props: { mapField: (v == null ? void 0 : v.mapField) || ["province", "city", "region"] },
|
|
1263
|
-
events:
|
|
1294
|
+
events: b
|
|
1264
1295
|
};
|
|
1265
1296
|
}, k = (v) => {
|
|
1266
|
-
let
|
|
1267
|
-
return isObject(v) && !isFunction(v) ?
|
|
1297
|
+
let p = {};
|
|
1298
|
+
return isObject(v) && !isFunction(v) ? p = {
|
|
1268
1299
|
change: (v == null ? void 0 : v.change) || I,
|
|
1269
1300
|
blur: (v == null ? void 0 : v.blur) || I,
|
|
1270
1301
|
focus: (v == null ? void 0 : v.focus) || I,
|
|
1271
1302
|
input: (v == null ? void 0 : v.input) || I,
|
|
1272
1303
|
clear: (v == null ? void 0 : v.clear) || I,
|
|
1304
|
+
searchClick: v == null ? void 0 : v.searchClick,
|
|
1305
|
+
suffixClick: v == null ? void 0 : v.suffixClick,
|
|
1306
|
+
prefixClick: v == null ? void 0 : v.prefixClick,
|
|
1273
1307
|
filterMethod: v == null ? void 0 : v.filterMethod
|
|
1274
|
-
} : v && (
|
|
1308
|
+
} : v && (p = { change: v }), p;
|
|
1309
|
+
}, R = (v, p) => {
|
|
1310
|
+
v = v || {};
|
|
1311
|
+
const { singleMode: b, mode: y } = v;
|
|
1312
|
+
return b && Object.assign(v, {
|
|
1313
|
+
multiple: !1,
|
|
1314
|
+
limitCount: 1,
|
|
1315
|
+
autoHiddenButton: !0
|
|
1316
|
+
}), (!y || y === "image") && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: p };
|
|
1275
1317
|
};
|
|
1276
1318
|
function I() {
|
|
1277
1319
|
}
|
|
1278
1320
|
return {
|
|
1279
1321
|
renderDict: l,
|
|
1280
1322
|
renderSelect: o,
|
|
1281
|
-
renderInput:
|
|
1282
|
-
renderTextarea:
|
|
1283
|
-
renderCheckBox:
|
|
1323
|
+
renderInput: t,
|
|
1324
|
+
renderTextarea: c,
|
|
1325
|
+
renderCheckBox: Z,
|
|
1284
1326
|
renderRadio: d,
|
|
1285
1327
|
renderUser: h,
|
|
1286
1328
|
renderSysUser: r,
|
|
1287
|
-
renderInvOrg:
|
|
1329
|
+
renderInvOrg: e,
|
|
1288
1330
|
renderBU: i,
|
|
1289
|
-
renderNumber:
|
|
1290
|
-
renderLov:
|
|
1291
|
-
renderSelectLocal:
|
|
1292
|
-
renderDate:
|
|
1293
|
-
renderSwitch:
|
|
1294
|
-
renderCellTag:
|
|
1331
|
+
renderNumber: f,
|
|
1332
|
+
renderLov: m,
|
|
1333
|
+
renderSelectLocal: s,
|
|
1334
|
+
renderDate: H,
|
|
1335
|
+
renderSwitch: u,
|
|
1336
|
+
renderCellTag: M,
|
|
1295
1337
|
renderEnabled: C,
|
|
1296
1338
|
renderIconSelect: A,
|
|
1297
1339
|
renderTreeSelect: w,
|
|
1298
|
-
renderArea: V
|
|
1340
|
+
renderArea: V,
|
|
1341
|
+
renderUpload: R
|
|
1299
1342
|
};
|
|
1300
1343
|
}, useGlobal = () => {
|
|
1301
1344
|
const a = getCurrentInstance();
|
|
1302
1345
|
if (!a) return { $global: {}, $storage: {}, $config: {} };
|
|
1303
|
-
const l = a.appContext.app.config.globalProperties, o = l.$storage, h = l.$config, r = l.$serviceApi,
|
|
1346
|
+
const l = a.appContext.app.config.globalProperties, o = l.$storage, h = l.$config, r = l.$serviceApi, e = l.$hasAuthority, i = l.$printPlugin, t = l.$mode;
|
|
1304
1347
|
return {
|
|
1305
1348
|
$global: l,
|
|
1306
1349
|
$storage: o,
|
|
1307
1350
|
$config: h,
|
|
1308
1351
|
$serviceApi: r,
|
|
1309
|
-
$hasAuthority:
|
|
1352
|
+
$hasAuthority: e,
|
|
1310
1353
|
$printPlugin: i,
|
|
1311
|
-
$mode:
|
|
1354
|
+
$mode: t
|
|
1312
1355
|
};
|
|
1313
1356
|
}, hexList = [];
|
|
1314
1357
|
for (let a = 0; a <= 15; a++)
|
|
@@ -1325,8 +1368,8 @@ function buildShortUUID(a = "") {
|
|
|
1325
1368
|
return unique++, a + "_" + o + unique + String(l);
|
|
1326
1369
|
}
|
|
1327
1370
|
const deviceDetection = () => {
|
|
1328
|
-
const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", o = a.match(/midp/i) === "midp", h = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb",
|
|
1329
|
-
return l || o || h || r ||
|
|
1371
|
+
const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", o = a.match(/midp/i) === "midp", h = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb", e = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", t = a.match(/windows mobile/i) === "windows mobile";
|
|
1372
|
+
return l || o || h || r || e || i || t;
|
|
1330
1373
|
}, getBrowserInfo = () => {
|
|
1331
1374
|
const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
|
|
1332
1375
|
return {
|
|
@@ -1353,26 +1396,26 @@ const deviceDetection = () => {
|
|
|
1353
1396
|
}, renderHook = useRender(), i18nColums = (a, l = !0) => {
|
|
1354
1397
|
let o = 0, h = 0;
|
|
1355
1398
|
const r = a.length - 1;
|
|
1356
|
-
return a.map((
|
|
1357
|
-
if (h = h +
|
|
1358
|
-
|
|
1359
|
-
const { showOverflow:
|
|
1360
|
-
return
|
|
1399
|
+
return a.map((e, i) => {
|
|
1400
|
+
if (h = h + e.width, e.type) return e;
|
|
1401
|
+
e.title = e.title || `message.${e.field}`;
|
|
1402
|
+
const { showOverflow: t } = e;
|
|
1403
|
+
return e.field !== "operate" && ((e.width > 99 || e.minWidth) && (e.showOverflow = t === !1 ? t : "tooltip"), e.sortable = !(l === !1 || e.sortable === !1)), o || (o = e.minWidth), !o && r === i && h < window.innerWidth && (e.minWidth = e.width, e.width = null), e;
|
|
1361
1404
|
});
|
|
1362
1405
|
}, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
|
|
1363
|
-
var r,
|
|
1406
|
+
var r, e, i;
|
|
1364
1407
|
if ((r = h.children) != null && r.length)
|
|
1365
1408
|
return h.children = formatItems(h.children, l, o), h;
|
|
1366
1409
|
{
|
|
1367
1410
|
h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.type === "collapseNode" && (h.title = "", h.titleWidth = 0);
|
|
1368
|
-
let
|
|
1369
|
-
l === "detail" ? (
|
|
1370
|
-
let
|
|
1411
|
+
let t = !1;
|
|
1412
|
+
l === "detail" ? (t = !0, h.placeholder = null) : t = h.disabled === !1 ? h.disabled : h.disabled || ((i = (e = h.itemRender) == null ? void 0 : e.props) == null ? void 0 : i.disabled);
|
|
1413
|
+
let c = {
|
|
1371
1414
|
name: "VxeInput",
|
|
1372
|
-
props: { disabled:
|
|
1415
|
+
props: { disabled: t, placeholder: t ? "" : h.placeholder }
|
|
1373
1416
|
};
|
|
1374
|
-
return h.code && !h.itemRender && (
|
|
1375
|
-
disabled:
|
|
1417
|
+
return h.code && !h.itemRender && (c = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || c, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
|
|
1418
|
+
disabled: t
|
|
1376
1419
|
}), h;
|
|
1377
1420
|
}
|
|
1378
1421
|
}) : a, formSearchButtons = {
|
|
@@ -1400,39 +1443,39 @@ const deviceDetection = () => {
|
|
|
1400
1443
|
events: null
|
|
1401
1444
|
}
|
|
1402
1445
|
}, formatGridItems = (a, l) => {
|
|
1403
|
-
const o = a, h = o.length, r = h > 2 && o.some((
|
|
1446
|
+
const o = a, h = o.length, r = h > 2 && o.some((Z, d) => d < 3 && (Z.span > 6 || getDateRange(Z))), e = r || h > 3, i = {
|
|
1404
1447
|
collapseTags: !0,
|
|
1405
1448
|
collapseTagsTooltip: !0,
|
|
1406
1449
|
multiple: !0
|
|
1407
|
-
},
|
|
1408
|
-
var
|
|
1409
|
-
return
|
|
1450
|
+
}, t = o.map((Z, d) => {
|
|
1451
|
+
var n, f, H;
|
|
1452
|
+
return Z.folding = r ? e && d > 1 : e && d > 2, Z.span = getDateRange(Z) ? 12 : Z.span || 6, Z.code && !Z.itemRender && (Z.itemRender = renderHook.renderDict(Z.code)), Z.itemRender = Z.itemRender || { name: "VxeInput" }, Z.resetValue = Z.itemRender.defaultValue, Z.title = Z.title || `message.${Z.field}`, (Z.multiple || (f = (n = Z.itemRender) == null ? void 0 : n.props) != null && f.multiple) && (Z.itemRender.props = Object.assign(
|
|
1410
1453
|
i,
|
|
1411
|
-
((
|
|
1412
|
-
)),
|
|
1413
|
-
}),
|
|
1414
|
-
if (
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1454
|
+
((H = Z.itemRender) == null ? void 0 : H.props) || {}
|
|
1455
|
+
)), Z;
|
|
1456
|
+
}), c = clone(formSearchButtons, !0);
|
|
1457
|
+
if (c.collapseNode = e, l && c.itemRender.options.length < 3 && (c.itemRender.options.push(l), c.itemRender.events = l.events), e) {
|
|
1458
|
+
const Z = r ? 2 : 3;
|
|
1459
|
+
t.splice(Z, 0, c);
|
|
1417
1460
|
} else
|
|
1418
|
-
|
|
1419
|
-
return
|
|
1461
|
+
t.push(c);
|
|
1462
|
+
return t;
|
|
1420
1463
|
}, getDateRange = (a) => {
|
|
1421
|
-
var l, o, h, r,
|
|
1422
|
-
return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((h = (o = a.itemRender) == null ? void 0 : o.props) == null ? void 0 : h.type) === "daterange" || !((
|
|
1464
|
+
var l, o, h, r, e;
|
|
1465
|
+
return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((h = (o = a.itemRender) == null ? void 0 : o.props) == null ? void 0 : h.type) === "daterange" || !((e = (r = a.itemRender) == null ? void 0 : r.props) != null && e.type) : !1;
|
|
1423
1466
|
}, formatRules = (a, l) => {
|
|
1424
1467
|
const o = {};
|
|
1425
1468
|
return a.forEach((h) => {
|
|
1426
1469
|
var r;
|
|
1427
1470
|
if ((r = h.children) != null && r.length) {
|
|
1428
|
-
const
|
|
1429
|
-
merge(o,
|
|
1471
|
+
const e = formatRules(h.children, l);
|
|
1472
|
+
merge(o, e);
|
|
1430
1473
|
} else if (h.required) {
|
|
1431
|
-
const { field:
|
|
1432
|
-
o[
|
|
1474
|
+
const { field: e, title: i } = h, t = i == null ? void 0 : i.startsWith("message.");
|
|
1475
|
+
o[e] = [
|
|
1433
1476
|
{
|
|
1434
1477
|
required: !0,
|
|
1435
|
-
message: `${l("message.required")}${i &&
|
|
1478
|
+
message: `${l("message.required")}${i && t ? l(i) : i || l(`message.${e}`)}`
|
|
1436
1479
|
}
|
|
1437
1480
|
];
|
|
1438
1481
|
}
|
|
@@ -1551,29 +1594,29 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1551
1594
|
(l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) : g.initConfig.beforeRequestCallback ? (g.initConfig.beforeRequestCallback(l), l) : ["/refreshToken", "/login"].some((h) => l.url.indexOf(h) > -1) ? l : new Promise((h) => {
|
|
1552
1595
|
const r = cookies.get(kTOKENKEY);
|
|
1553
1596
|
if (r) {
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
refreshToken:
|
|
1557
|
-
}).then((
|
|
1558
|
-
this.setToken(
|
|
1597
|
+
const e = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
|
|
1598
|
+
e.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
|
|
1599
|
+
refreshToken: e.refreshToken
|
|
1600
|
+
}).then((c) => {
|
|
1601
|
+
this.setToken(c), l.headers.Authorization = "Bearer " + c.access_token, g.requests.forEach((Z) => Z(c.access_token)), g.requests = [];
|
|
1559
1602
|
}).finally(() => {
|
|
1560
1603
|
g.isRefreshing = !1;
|
|
1561
|
-
})), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " +
|
|
1604
|
+
})), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + e.accessToken, h(l));
|
|
1562
1605
|
} else {
|
|
1563
|
-
const
|
|
1564
|
-
|
|
1606
|
+
const e = cookies.get("kCookies_token");
|
|
1607
|
+
e && (l.headers["X-Token"] = e), h(l);
|
|
1565
1608
|
}
|
|
1566
1609
|
})),
|
|
1567
1610
|
(l) => Promise.reject(l)
|
|
1568
1611
|
);
|
|
1569
1612
|
}
|
|
1570
1613
|
setToken(l) {
|
|
1571
|
-
const { access_token: o, expires_in: h, refresh_token: r } = l,
|
|
1614
|
+
const { access_token: o, expires_in: h, refresh_token: r } = l, e = {
|
|
1572
1615
|
accessToken: o,
|
|
1573
1616
|
refreshToken: r,
|
|
1574
1617
|
expires: Date.now() + h * 1e3
|
|
1575
1618
|
};
|
|
1576
|
-
cookies.set(kTOKENKEY, JSON.stringify(
|
|
1619
|
+
cookies.set(kTOKENKEY, JSON.stringify(e));
|
|
1577
1620
|
}
|
|
1578
1621
|
// 响应拦截
|
|
1579
1622
|
httpInterceptorsResponse() {
|
|
@@ -1590,7 +1633,7 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1590
1633
|
);
|
|
1591
1634
|
}
|
|
1592
1635
|
transformConfigByMethod(l, o) {
|
|
1593
|
-
const { method: h } = o, r = ["get"],
|
|
1636
|
+
const { method: h } = o, r = ["get"], e = h.toLocaleLowerCase(), i = r.includes(e) ? "params" : "data";
|
|
1594
1637
|
return {
|
|
1595
1638
|
...o,
|
|
1596
1639
|
[i]: l
|
|
@@ -1598,34 +1641,34 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1598
1641
|
}
|
|
1599
1642
|
// 通用请求工具函数
|
|
1600
1643
|
request(l, o, h, r) {
|
|
1601
|
-
const
|
|
1644
|
+
const e = this.transformConfigByMethod(h, {
|
|
1602
1645
|
method: l,
|
|
1603
1646
|
url: o,
|
|
1604
1647
|
...r
|
|
1605
1648
|
});
|
|
1606
|
-
return new Promise((i,
|
|
1607
|
-
g.axiosInstance.request(
|
|
1608
|
-
if (
|
|
1609
|
-
i(
|
|
1610
|
-
else if (
|
|
1611
|
-
errorMessage(
|
|
1612
|
-
else if ((
|
|
1613
|
-
i(
|
|
1649
|
+
return new Promise((i, t) => {
|
|
1650
|
+
g.axiosInstance.request(e).then((c) => {
|
|
1651
|
+
if (c && (c == null ? void 0 : c.code) === "0")
|
|
1652
|
+
i(c.data);
|
|
1653
|
+
else if (c.code === "500")
|
|
1654
|
+
errorMessage(c.msg, { duration: 8e3 }), e.method === "get" ? i(c) : t(c.msg);
|
|
1655
|
+
else if ((c == null ? void 0 : c.code) !== "-1")
|
|
1656
|
+
i(c);
|
|
1614
1657
|
else {
|
|
1615
|
-
const
|
|
1616
|
-
errorMessage(
|
|
1658
|
+
const Z = (c == null ? void 0 : c.msg) || "服务异常";
|
|
1659
|
+
errorMessage(Z, { duration: 8e3 }), t(Z);
|
|
1617
1660
|
}
|
|
1618
|
-
}).catch((
|
|
1619
|
-
var
|
|
1620
|
-
if (
|
|
1621
|
-
if (((
|
|
1661
|
+
}).catch((c) => {
|
|
1662
|
+
var Z, d, n;
|
|
1663
|
+
if (c != null && c.code) {
|
|
1664
|
+
if (((Z = c == null ? void 0 : c.response) == null ? void 0 : Z.status) === 401)
|
|
1622
1665
|
return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
|
|
1623
1666
|
errorMessage(
|
|
1624
|
-
this.getNetworkError((
|
|
1667
|
+
this.getNetworkError((n = c == null ? void 0 : c.response) == null ? void 0 : n.status) || (c == null ? void 0 : c.message),
|
|
1625
1668
|
{ duration: 8e3 }
|
|
1626
1669
|
);
|
|
1627
1670
|
}
|
|
1628
|
-
|
|
1671
|
+
c.config.method === "get" ? i(c) : t(c);
|
|
1629
1672
|
});
|
|
1630
1673
|
});
|
|
1631
1674
|
}
|
|
@@ -2394,8 +2437,8 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2394
2437
|
return -1;
|
|
2395
2438
|
const o = this.sTermInfo[a - 1900], h = [];
|
|
2396
2439
|
for (let r = 0; r < o.length; r += 5) {
|
|
2397
|
-
const
|
|
2398
|
-
h.push(
|
|
2440
|
+
const e = parseInt("0x" + o.substr(r, 5)).toString();
|
|
2441
|
+
h.push(e[0], e.substr(1, 2), e[3], e.substr(4, 2));
|
|
2399
2442
|
}
|
|
2400
2443
|
return parseInt(h[l - 1]);
|
|
2401
2444
|
},
|
|
@@ -2453,60 +2496,60 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2453
2496
|
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
|
2454
2497
|
*/
|
|
2455
2498
|
solar2lunar: function(a, l, o) {
|
|
2456
|
-
let h = parseInt(a), r = parseInt(l),
|
|
2457
|
-
if (h < 1900 || h > 2100 || h === 1900 && r === 1 &&
|
|
2499
|
+
let h = parseInt(a), r = parseInt(l), e = parseInt(o);
|
|
2500
|
+
if (h < 1900 || h > 2100 || h === 1900 && r === 1 && e < 31)
|
|
2458
2501
|
return -1;
|
|
2459
2502
|
let i;
|
|
2460
|
-
h ? i = new Date(h, parseInt(r.toString()) - 1,
|
|
2461
|
-
let
|
|
2462
|
-
h = i.getFullYear(), r = i.getMonth() + 1,
|
|
2503
|
+
h ? i = new Date(h, parseInt(r.toString()) - 1, e) : i = /* @__PURE__ */ new Date();
|
|
2504
|
+
let t, c = 0, Z = 0;
|
|
2505
|
+
h = i.getFullYear(), r = i.getMonth() + 1, e = i.getDate();
|
|
2463
2506
|
let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
|
|
2464
|
-
for (
|
|
2465
|
-
|
|
2466
|
-
d < 0 && (d +=
|
|
2467
|
-
const
|
|
2468
|
-
let
|
|
2469
|
-
|
|
2470
|
-
let
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2475
|
-
let
|
|
2476
|
-
for (
|
|
2477
|
-
|
|
2478
|
-
d === 0 &&
|
|
2479
|
-
const
|
|
2480
|
-
let
|
|
2481
|
-
|
|
2482
|
-
let
|
|
2483
|
-
V ===
|
|
2484
|
-
const
|
|
2485
|
-
let
|
|
2486
|
-
return
|
|
2487
|
-
date:
|
|
2488
|
-
lunarDate:
|
|
2489
|
-
festival:
|
|
2490
|
-
lunarFestival:
|
|
2491
|
-
lYear:
|
|
2492
|
-
lMonth:
|
|
2507
|
+
for (t = 1900; t < 2101 && d > 0; t++)
|
|
2508
|
+
Z = this.lYearDays(t), d -= Z;
|
|
2509
|
+
d < 0 && (d += Z, t--);
|
|
2510
|
+
const n = /* @__PURE__ */ new Date();
|
|
2511
|
+
let f = !1;
|
|
2512
|
+
n.getFullYear() === h && n.getMonth() + 1 === r && n.getDate() === e && (f = !0);
|
|
2513
|
+
let H = i.getDay();
|
|
2514
|
+
const m = this.nStr1[H];
|
|
2515
|
+
H === 0 && (H = 7);
|
|
2516
|
+
const s = t;
|
|
2517
|
+
c = this.leapMonth(t);
|
|
2518
|
+
let u = !1;
|
|
2519
|
+
for (t = 1; t < 13 && d > 0; t++)
|
|
2520
|
+
c > 0 && t === c + 1 && u === !1 ? (--t, u = !0, Z = this.leapDays(s)) : Z = this.monthDays(s, t), u === !0 && t === c + 1 && (u = !1), d -= Z;
|
|
2521
|
+
d === 0 && c > 0 && t === c + 1 && (u ? u = !1 : (u = !0, --t)), d < 0 && (d += Z, --t);
|
|
2522
|
+
const M = t, C = d + 1, A = r - 1, w = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), k = this.getTerm(h, r * 2);
|
|
2523
|
+
let R = this.toGanZhi((h - 1900) * 12 + r + 11);
|
|
2524
|
+
e >= V && (R = this.toGanZhi((h - 1900) * 12 + r + 12));
|
|
2525
|
+
let I = !1, v;
|
|
2526
|
+
V === e && (I = !0, v = this.solarTerm[r * 2 - 2]), k === e && (I = !0, v = this.solarTerm[r * 2 - 1]);
|
|
2527
|
+
const p = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, b = this.toGanZhi(p + e - 1), y = this.toAstro(r, e), L = h + "-" + r + "-" + e, x = s + "-" + M + "-" + C, D = this.festival, F = this.lFestival, N = r + "-" + e;
|
|
2528
|
+
let E = M + "-" + C;
|
|
2529
|
+
return M === 12 && C === 29 && this.monthDays(s, M) === 29 && (E = "12-30"), {
|
|
2530
|
+
date: L,
|
|
2531
|
+
lunarDate: x,
|
|
2532
|
+
festival: D[N] ? D[N].title : null,
|
|
2533
|
+
lunarFestival: F[E] ? F[E].title : null,
|
|
2534
|
+
lYear: s,
|
|
2535
|
+
lMonth: M,
|
|
2493
2536
|
lDay: C,
|
|
2494
|
-
Animal: this.getAnimal(
|
|
2495
|
-
IMonthCn: (
|
|
2537
|
+
Animal: this.getAnimal(s),
|
|
2538
|
+
IMonthCn: (u ? "闰" : "") + this.toChinaMonth(M),
|
|
2496
2539
|
IDayCn: this.toChinaDay(C),
|
|
2497
2540
|
cYear: h,
|
|
2498
2541
|
cMonth: r,
|
|
2499
|
-
cDay:
|
|
2542
|
+
cDay: e,
|
|
2500
2543
|
gzYear: w,
|
|
2501
|
-
gzMonth:
|
|
2502
|
-
gzDay:
|
|
2503
|
-
isToday:
|
|
2504
|
-
isLeap:
|
|
2505
|
-
nWeek:
|
|
2506
|
-
ncWeek: "星期" +
|
|
2507
|
-
isTerm:
|
|
2508
|
-
Term:
|
|
2509
|
-
astro:
|
|
2544
|
+
gzMonth: R,
|
|
2545
|
+
gzDay: b,
|
|
2546
|
+
isToday: f,
|
|
2547
|
+
isLeap: u,
|
|
2548
|
+
nWeek: H,
|
|
2549
|
+
ncWeek: "星期" + m,
|
|
2550
|
+
isTerm: I,
|
|
2551
|
+
Term: v,
|
|
2552
|
+
astro: y
|
|
2510
2553
|
};
|
|
2511
2554
|
},
|
|
2512
2555
|
/**
|
|
@@ -2524,19 +2567,19 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2524
2567
|
const r = this.leapMonth(a);
|
|
2525
2568
|
if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
|
|
2526
2569
|
return -1;
|
|
2527
|
-
const
|
|
2528
|
-
let i =
|
|
2570
|
+
const e = this.monthDays(a, l);
|
|
2571
|
+
let i = e;
|
|
2529
2572
|
if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
|
|
2530
2573
|
return -1;
|
|
2531
|
-
let
|
|
2532
|
-
for (
|
|
2533
|
-
|
|
2534
|
-
let
|
|
2535
|
-
for (
|
|
2536
|
-
|
|
2537
|
-
h && (
|
|
2538
|
-
const
|
|
2539
|
-
return this.solar2lunar(
|
|
2574
|
+
let t = 0, c;
|
|
2575
|
+
for (c = 1900; c < a; c++)
|
|
2576
|
+
t += this.lYearDays(c);
|
|
2577
|
+
let Z = 0, d = !1;
|
|
2578
|
+
for (c = 1; c < l; c++)
|
|
2579
|
+
Z = this.leapMonth(a), d || Z <= c && Z > 0 && (t += this.leapDays(a), d = !0), t += this.monthDays(a, c);
|
|
2580
|
+
h && (t += e);
|
|
2581
|
+
const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + o - 31) * 864e5 + n), H = f.getUTCFullYear(), m = f.getUTCMonth() + 1, s = f.getUTCDate();
|
|
2582
|
+
return this.solar2lunar(H, m, s);
|
|
2540
2583
|
}
|
|
2541
2584
|
}, dict = storageLocal.getItem("kLov"), formats = {
|
|
2542
2585
|
formatDate: {
|
|
@@ -2573,9 +2616,9 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2573
2616
|
formatDict: {
|
|
2574
2617
|
// 数据字段转化
|
|
2575
2618
|
tableCellFormatMethod({ cellValue: a }, l) {
|
|
2576
|
-
var r,
|
|
2619
|
+
var r, e;
|
|
2577
2620
|
if (!l) return a;
|
|
2578
|
-
const o = XEUtils.toValueString(a), h = dict ? (
|
|
2621
|
+
const o = XEUtils.toValueString(a), h = dict ? (e = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : e.find((i) => i.dictCode === o) : a;
|
|
2579
2622
|
return (h == null ? void 0 : h.dictName) || a;
|
|
2580
2623
|
}
|
|
2581
2624
|
},
|
|
@@ -2593,18 +2636,18 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2593
2636
|
},
|
|
2594
2637
|
formatSelectLocal: {
|
|
2595
2638
|
tableCellFormatMethod({ cellValue: a }, l) {
|
|
2596
|
-
const [o, h = "value", r = "label"] = l,
|
|
2597
|
-
return
|
|
2639
|
+
const [o, h = "value", r = "label"] = l, e = o == null ? void 0 : o.find((i) => i[h] === a);
|
|
2640
|
+
return e ? e[r] : a;
|
|
2598
2641
|
}
|
|
2599
2642
|
},
|
|
2600
2643
|
formatMultiValue: {
|
|
2601
2644
|
tableCellFormatMethod({ row: a }, l) {
|
|
2602
|
-
var
|
|
2645
|
+
var e;
|
|
2603
2646
|
const [o, h] = l;
|
|
2604
2647
|
let r;
|
|
2605
|
-
return (
|
|
2606
|
-
const
|
|
2607
|
-
r = r ? `${r},${
|
|
2648
|
+
return (e = a[o]) == null || e.split(",").forEach((i) => {
|
|
2649
|
+
const t = h.find((c) => c.value === i);
|
|
2650
|
+
r = r ? `${r},${t == null ? void 0 : t.label}` : t == null ? void 0 : t.label;
|
|
2608
2651
|
}), r;
|
|
2609
2652
|
}
|
|
2610
2653
|
}
|
|
@@ -10253,7 +10296,7 @@ function isUrl(a) {
|
|
|
10253
10296
|
}
|
|
10254
10297
|
const getDictName = (a, l) => {
|
|
10255
10298
|
var h, r;
|
|
10256
|
-
return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((
|
|
10299
|
+
return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((e) => l === e.dictCode)) == null ? void 0 : r.dictName;
|
|
10257
10300
|
};
|
|
10258
10301
|
export {
|
|
10259
10302
|
W as NProgress,
|