@utogether/utils 3.0.0-beta.46 → 3.0.0-beta.47
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/utils.es.js +246 -222
- package/dist/utils.umd.js +1 -1
- package/package.json +1 -1
package/dist/utils.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var j = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var S = (l, a, o) =>
|
|
4
|
-
import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
|
|
2
|
+
var z = (l, a, o) => a in l ? j(l, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : l[a] = o;
|
|
3
|
+
var S = (l, a, o) => z(l, typeof a != "symbol" ? a + "" : a, o);
|
|
4
|
+
import { createVNode, resolveComponent, mergeProps, withDirectives, resolveDirective, 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";
|
|
7
7
|
import localforage from "localforage";
|
|
@@ -206,45 +206,45 @@ const VxetableRender = (VXETable, {
|
|
|
206
206
|
} = Z, {
|
|
207
207
|
loading: f = !1,
|
|
208
208
|
multiple: n
|
|
209
|
-
} = i, m = useComponent(),
|
|
209
|
+
} = i, m = useComponent(), M = n ? `_${r.field}` : r.field;
|
|
210
210
|
m.setDefaultValue(i, h, r.field);
|
|
211
|
-
function u
|
|
212
|
-
m.remote(
|
|
211
|
+
function C(u) {
|
|
212
|
+
m.remote(u, r.field, l);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
m.selectChange(
|
|
214
|
+
function p(u) {
|
|
215
|
+
m.selectChange(u, h, r.field, l, {
|
|
216
216
|
column: r,
|
|
217
217
|
datasource: "row"
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
c != null && c.input && c.input(a,
|
|
220
|
+
function V(u) {
|
|
221
|
+
c != null && c.input && c.input(a, u);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function s() {
|
|
224
224
|
m.clear(h, r.field, l, "row");
|
|
225
225
|
}
|
|
226
226
|
function w() {
|
|
227
|
-
!e.length &&
|
|
227
|
+
!e.length && C(""), c != null && c.focus && c.focus(a, r.field);
|
|
228
228
|
}
|
|
229
229
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
230
|
-
modelValue: h[
|
|
231
|
-
"onUpdate:modelValue": (
|
|
230
|
+
modelValue: h[M],
|
|
231
|
+
"onUpdate:modelValue": (u) => h[M] = u,
|
|
232
232
|
filterable: !0,
|
|
233
233
|
remote: !0,
|
|
234
234
|
clearable: !0,
|
|
235
235
|
placeholder: "请录入关键字搜索",
|
|
236
236
|
style: "width: 100%",
|
|
237
|
-
"remote-method":
|
|
237
|
+
"remote-method": C,
|
|
238
238
|
loading: f
|
|
239
239
|
}, i, {
|
|
240
240
|
onFocus: () => w(),
|
|
241
|
-
onChange: (
|
|
242
|
-
onClear: () =>
|
|
243
|
-
onInput: (
|
|
244
|
-
}), _isSlot(o = e.map((
|
|
245
|
-
key:
|
|
246
|
-
label:
|
|
247
|
-
value:
|
|
241
|
+
onChange: (u) => p(u),
|
|
242
|
+
onClear: () => s(),
|
|
243
|
+
onInput: (u) => V(u)
|
|
244
|
+
}), _isSlot(o = e.map((u) => createVNode(resolveComponent("el-option"), {
|
|
245
|
+
key: u[d],
|
|
246
|
+
label: u[t],
|
|
247
|
+
value: u[d]
|
|
248
248
|
}, null))) ? o : {
|
|
249
249
|
default: () => [o]
|
|
250
250
|
})];
|
|
@@ -265,45 +265,45 @@ const VxetableRender = (VXETable, {
|
|
|
265
265
|
} = Z, {
|
|
266
266
|
loading: f = !1,
|
|
267
267
|
multiple: n
|
|
268
|
-
} = i, m = useComponent(),
|
|
268
|
+
} = i, m = useComponent(), M = n ? `_${r.field}` : r.field;
|
|
269
269
|
m.setDefaultValue(i, h, r.field);
|
|
270
|
-
function u
|
|
271
|
-
m.remote(
|
|
270
|
+
function C(u) {
|
|
271
|
+
m.remote(u, r.field, l);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
m.selectChange(
|
|
273
|
+
function p(u) {
|
|
274
|
+
m.selectChange(u, h, r.field, l, {
|
|
275
275
|
column: r,
|
|
276
276
|
datasource: "row"
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
c != null && c.input && c.input(a,
|
|
279
|
+
function V(u) {
|
|
280
|
+
c != null && c.input && c.input(a, u);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function s() {
|
|
283
283
|
m.clear(h, r.field, l, "row");
|
|
284
284
|
}
|
|
285
285
|
function w() {
|
|
286
|
-
!e.length &&
|
|
286
|
+
!e.length && C(""), c != null && c.focus && c.focus(a, r.field);
|
|
287
287
|
}
|
|
288
288
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
289
|
-
modelValue: h[
|
|
290
|
-
"onUpdate:modelValue": (
|
|
289
|
+
modelValue: h[M],
|
|
290
|
+
"onUpdate:modelValue": (u) => h[M] = u,
|
|
291
291
|
filterable: !0,
|
|
292
292
|
remote: !0,
|
|
293
293
|
clearable: !0,
|
|
294
294
|
placeholder: "请录入关键字搜索",
|
|
295
295
|
style: "width: 100%",
|
|
296
|
-
"remote-method":
|
|
296
|
+
"remote-method": C,
|
|
297
297
|
loading: f
|
|
298
298
|
}, i, {
|
|
299
299
|
onFocus: () => w(),
|
|
300
|
-
onChange: (
|
|
301
|
-
onClear: () =>
|
|
302
|
-
onInput: (
|
|
303
|
-
}), _isSlot(o = e.map((
|
|
304
|
-
key:
|
|
305
|
-
label:
|
|
306
|
-
value:
|
|
300
|
+
onChange: (u) => p(u),
|
|
301
|
+
onClear: () => s(),
|
|
302
|
+
onInput: (u) => V(u)
|
|
303
|
+
}), _isSlot(o = e.map((u) => createVNode(resolveComponent("el-option"), {
|
|
304
|
+
key: u[d],
|
|
305
|
+
label: u[t],
|
|
306
|
+
value: u[d]
|
|
307
307
|
}, null))) ? o : {
|
|
308
308
|
default: () => [o]
|
|
309
309
|
})];
|
|
@@ -338,44 +338,44 @@ const VxetableRender = (VXETable, {
|
|
|
338
338
|
} = Z, {
|
|
339
339
|
multiple: f,
|
|
340
340
|
loading: n = !1
|
|
341
|
-
} = i, m = useComponent(),
|
|
341
|
+
} = i, m = useComponent(), M = f ? `_${r}` : r;
|
|
342
342
|
m.setDefaultValue(i, h, r);
|
|
343
|
-
async function u
|
|
344
|
-
m.remote(
|
|
343
|
+
async function C(u) {
|
|
344
|
+
m.remote(u, r, l);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
m.selectChange(
|
|
346
|
+
function p(u) {
|
|
347
|
+
m.selectChange(u, h, r, l, {
|
|
348
348
|
datasource: "data"
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
c != null && c.input && c.input(a,
|
|
351
|
+
function V(u) {
|
|
352
|
+
c != null && c.input && c.input(a, u);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function s() {
|
|
355
355
|
m.clear(h, r, l, "data");
|
|
356
356
|
}
|
|
357
357
|
function w() {
|
|
358
|
-
!e.length &&
|
|
358
|
+
!e.length && C(""), c != null && c.focus && c.focus(a);
|
|
359
359
|
}
|
|
360
360
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
361
|
-
modelValue: h[
|
|
362
|
-
"onUpdate:modelValue": (
|
|
361
|
+
modelValue: h[M],
|
|
362
|
+
"onUpdate:modelValue": (u) => h[M] = u,
|
|
363
363
|
filterable: !0,
|
|
364
364
|
remote: !0,
|
|
365
365
|
clearable: !0,
|
|
366
366
|
style: "width: 100%",
|
|
367
367
|
placeholder: "请录入关键字搜索",
|
|
368
368
|
loading: n,
|
|
369
|
-
"remote-method":
|
|
369
|
+
"remote-method": C
|
|
370
370
|
}, i, {
|
|
371
371
|
onFocus: () => w(),
|
|
372
|
-
onChange: (
|
|
373
|
-
onClear: () =>
|
|
374
|
-
onInput: () =>
|
|
375
|
-
}), _isSlot(o = e.map((
|
|
376
|
-
key:
|
|
377
|
-
label:
|
|
378
|
-
value:
|
|
372
|
+
onChange: (u) => p(u),
|
|
373
|
+
onClear: () => s(),
|
|
374
|
+
onInput: () => V()
|
|
375
|
+
}), _isSlot(o = e.map((u) => createVNode(resolveComponent("el-option"), {
|
|
376
|
+
key: u[d],
|
|
377
|
+
label: u[t],
|
|
378
|
+
value: u[d]
|
|
379
379
|
}, null))) ? o : {
|
|
380
380
|
default: () => [o]
|
|
381
381
|
})];
|
|
@@ -436,33 +436,41 @@ const VxetableRender = (VXETable, {
|
|
|
436
436
|
label: c = "label",
|
|
437
437
|
value: t = "value"
|
|
438
438
|
} = Z, {
|
|
439
|
-
multiple: d
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
multiple: d,
|
|
440
|
+
isOptionsColumn: f,
|
|
441
|
+
optionsColumnField: n
|
|
442
|
+
} = i, m = useComponent(), M = d ? `_${r.field}` : r.field;
|
|
443
|
+
m.setDefaultValue(i, h, r.field);
|
|
444
|
+
function C(V) {
|
|
445
|
+
m.selectChange(V, h, r.field, l, {
|
|
444
446
|
column: r,
|
|
445
447
|
datasource: "row"
|
|
446
448
|
});
|
|
447
449
|
}
|
|
448
450
|
function p() {
|
|
449
|
-
|
|
451
|
+
m.clear(h, r.field, l, "row");
|
|
450
452
|
}
|
|
451
453
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
452
|
-
modelValue: h[
|
|
453
|
-
"onUpdate:modelValue": (
|
|
454
|
+
modelValue: h[M],
|
|
455
|
+
"onUpdate:modelValue": (V) => h[M] = V,
|
|
454
456
|
filterable: !0,
|
|
455
457
|
clearable: !0
|
|
456
458
|
}, i, {
|
|
457
459
|
style: "width: 100%",
|
|
458
460
|
class: "udp-select-wrapper",
|
|
459
|
-
onChange: (
|
|
461
|
+
onChange: (V) => C(V),
|
|
460
462
|
onClear: () => p()
|
|
461
|
-
}), _isSlot(o = e.map((
|
|
462
|
-
key:
|
|
463
|
-
label:
|
|
464
|
-
value:
|
|
465
|
-
},
|
|
463
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
464
|
+
key: V[t],
|
|
465
|
+
label: V[c],
|
|
466
|
+
value: V[t]
|
|
467
|
+
}, {
|
|
468
|
+
default: () => [withDirectives(createVNode("span", {
|
|
469
|
+
style: "float: left"
|
|
470
|
+
}, [V[c]]), [[resolveDirective("if"), f]]), withDirectives(createVNode("span", {
|
|
471
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
472
|
+
}, [V[n || t]]), [[resolveDirective("if"), f]])]
|
|
473
|
+
}))) ? o : {
|
|
466
474
|
default: () => [o]
|
|
467
475
|
})];
|
|
468
476
|
},
|
|
@@ -480,32 +488,40 @@ const VxetableRender = (VXETable, {
|
|
|
480
488
|
value: t = "value",
|
|
481
489
|
extLabel: d
|
|
482
490
|
} = Z, {
|
|
483
|
-
multiple: f
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
491
|
+
multiple: f,
|
|
492
|
+
isOptionsColumn: n,
|
|
493
|
+
optionsColumnField: m
|
|
494
|
+
} = i, M = useComponent(), C = f ? `_${r.field}` : r.field;
|
|
495
|
+
M.setDefaultValue(i, h, r.field);
|
|
496
|
+
function p(s) {
|
|
497
|
+
M.selectChange(s, h, r.field, l, {
|
|
488
498
|
column: r,
|
|
489
499
|
datasource: "row"
|
|
490
500
|
});
|
|
491
501
|
}
|
|
492
|
-
function
|
|
493
|
-
|
|
502
|
+
function V() {
|
|
503
|
+
M.clear(h, r.field, l, "row");
|
|
494
504
|
}
|
|
495
505
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
496
|
-
modelValue: h[
|
|
497
|
-
"onUpdate:modelValue": (
|
|
506
|
+
modelValue: h[C],
|
|
507
|
+
"onUpdate:modelValue": (s) => h[C] = s,
|
|
498
508
|
filterable: !0,
|
|
499
509
|
clearable: !0
|
|
500
510
|
}, i, {
|
|
501
511
|
style: "width: 100%",
|
|
502
|
-
onChange: (
|
|
503
|
-
onClear: () =>
|
|
504
|
-
}), _isSlot(o = e.map((
|
|
505
|
-
key:
|
|
506
|
-
label: d &&
|
|
507
|
-
value:
|
|
508
|
-
},
|
|
512
|
+
onChange: (s) => p(s),
|
|
513
|
+
onClear: () => V()
|
|
514
|
+
}), _isSlot(o = e.map((s) => createVNode(resolveComponent("el-option"), {
|
|
515
|
+
key: s[t],
|
|
516
|
+
label: d && s[d] ? s[t] : s[c],
|
|
517
|
+
value: s[t]
|
|
518
|
+
}, {
|
|
519
|
+
default: () => [withDirectives(createVNode("span", {
|
|
520
|
+
style: "float: left"
|
|
521
|
+
}, [s[c]]), [[resolveDirective("if"), n]]), withDirectives(createVNode("span", {
|
|
522
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
523
|
+
}, [s[m || t]]), [[resolveDirective("if"), n]])]
|
|
524
|
+
}))) ? o : {
|
|
509
525
|
default: () => [o]
|
|
510
526
|
})];
|
|
511
527
|
},
|
|
@@ -542,11 +558,13 @@ const VxetableRender = (VXETable, {
|
|
|
542
558
|
label: c = "label",
|
|
543
559
|
value: t = "value"
|
|
544
560
|
} = Z, d = useComponent(), {
|
|
545
|
-
multiple: f
|
|
546
|
-
|
|
561
|
+
multiple: f,
|
|
562
|
+
isOptionsColumn: n,
|
|
563
|
+
optionsColumnField: m
|
|
564
|
+
} = i, M = f ? `_${r}` : r;
|
|
547
565
|
f && d.setDefaultValue(i, h, r);
|
|
548
|
-
function
|
|
549
|
-
d.selectChange(
|
|
566
|
+
function C(V) {
|
|
567
|
+
d.selectChange(V, h, r, l, {
|
|
550
568
|
datasource: "data"
|
|
551
569
|
});
|
|
552
570
|
}
|
|
@@ -554,19 +572,25 @@ const VxetableRender = (VXETable, {
|
|
|
554
572
|
d.clear(h, r, l, "data");
|
|
555
573
|
}
|
|
556
574
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
557
|
-
modelValue: h[
|
|
558
|
-
"onUpdate:modelValue": (
|
|
575
|
+
modelValue: h[M],
|
|
576
|
+
"onUpdate:modelValue": (V) => h[M] = V,
|
|
559
577
|
filterable: !0,
|
|
560
578
|
clearable: !0,
|
|
561
579
|
style: "width: 100%"
|
|
562
580
|
}, i, {
|
|
563
|
-
onChange: (
|
|
581
|
+
onChange: (V) => C(V),
|
|
564
582
|
onClear: () => p()
|
|
565
|
-
}), _isSlot(o = e.map((
|
|
566
|
-
key:
|
|
567
|
-
label:
|
|
568
|
-
value:
|
|
569
|
-
},
|
|
583
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
584
|
+
key: V[t],
|
|
585
|
+
label: V[c],
|
|
586
|
+
value: V[t]
|
|
587
|
+
}, {
|
|
588
|
+
default: () => [withDirectives(createVNode("span", {
|
|
589
|
+
style: "float: left"
|
|
590
|
+
}, [V[c]]), [[resolveDirective("if"), n]]), withDirectives(createVNode("span", {
|
|
591
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
592
|
+
}, [V[m || t]]), [[resolveDirective("if"), n]])]
|
|
593
|
+
}))) ? o : {
|
|
570
594
|
default: () => [o]
|
|
571
595
|
})];
|
|
572
596
|
}
|
|
@@ -586,32 +610,32 @@ const VxetableRender = (VXETable, {
|
|
|
586
610
|
const {
|
|
587
611
|
mapField: n,
|
|
588
612
|
field: m,
|
|
589
|
-
displayName:
|
|
590
|
-
multiple:
|
|
613
|
+
displayName: M,
|
|
614
|
+
multiple: C
|
|
591
615
|
} = r;
|
|
592
|
-
if (
|
|
593
|
-
if (
|
|
594
|
-
const
|
|
595
|
-
o[
|
|
596
|
-
for (const
|
|
597
|
-
|
|
598
|
-
return
|
|
599
|
-
}, ""), Object.assign(o,
|
|
616
|
+
if (C) {
|
|
617
|
+
if (C) {
|
|
618
|
+
const V = {};
|
|
619
|
+
o[M || m] = d.reduce((s, w) => {
|
|
620
|
+
for (const u in n)
|
|
621
|
+
V[u] = s ? V[u] + "," + w[n[u]] : w[n[u]];
|
|
622
|
+
return s = s ? s + "," + w[M || m] : w[M || m], s;
|
|
623
|
+
}, ""), Object.assign(o, V);
|
|
600
624
|
}
|
|
601
625
|
} else {
|
|
602
|
-
const
|
|
603
|
-
[
|
|
626
|
+
const V = {
|
|
627
|
+
[M || m]: d[f || M || m]
|
|
604
628
|
};
|
|
605
|
-
for (const
|
|
606
|
-
|
|
607
|
-
Object.assign(o,
|
|
629
|
+
for (const s in n)
|
|
630
|
+
V[s] = d[n[s]];
|
|
631
|
+
Object.assign(o, V);
|
|
608
632
|
}
|
|
609
|
-
const
|
|
633
|
+
const p = {
|
|
610
634
|
data: o,
|
|
611
635
|
options: d,
|
|
612
636
|
field: m
|
|
613
637
|
};
|
|
614
|
-
e != null && e.change && e.change(
|
|
638
|
+
e != null && e.change && e.change(p);
|
|
615
639
|
}
|
|
616
640
|
function t() {
|
|
617
641
|
i.clear(o, h, l, "data");
|
|
@@ -638,23 +662,23 @@ const VxetableRender = (VXETable, {
|
|
|
638
662
|
mapField: f,
|
|
639
663
|
field: n,
|
|
640
664
|
displayName: m,
|
|
641
|
-
multiple:
|
|
665
|
+
multiple: M
|
|
642
666
|
} = r;
|
|
643
|
-
if (!
|
|
644
|
-
const
|
|
667
|
+
if (!M) {
|
|
668
|
+
const p = {
|
|
645
669
|
[m || n]: t[d || m || n]
|
|
646
670
|
};
|
|
647
|
-
for (const
|
|
648
|
-
|
|
649
|
-
Object.assign(o,
|
|
671
|
+
for (const V in f)
|
|
672
|
+
p[V] = t[f[V]];
|
|
673
|
+
Object.assign(o, p);
|
|
650
674
|
}
|
|
651
|
-
const
|
|
675
|
+
const C = {
|
|
652
676
|
row: o,
|
|
653
677
|
options: t,
|
|
654
678
|
field: h.field,
|
|
655
679
|
column: h
|
|
656
680
|
};
|
|
657
|
-
e != null && e.change && e.change(
|
|
681
|
+
e != null && e.change && e.change(C);
|
|
658
682
|
}
|
|
659
683
|
function c() {
|
|
660
684
|
i.clear(o, h.field, l, "row");
|
|
@@ -682,23 +706,23 @@ const VxetableRender = (VXETable, {
|
|
|
682
706
|
mapField: f,
|
|
683
707
|
field: n,
|
|
684
708
|
displayName: m,
|
|
685
|
-
multiple:
|
|
709
|
+
multiple: M
|
|
686
710
|
} = r;
|
|
687
|
-
if (!
|
|
688
|
-
const
|
|
711
|
+
if (!M) {
|
|
712
|
+
const p = {
|
|
689
713
|
[m || n]: t[d || m || n]
|
|
690
714
|
};
|
|
691
|
-
for (const
|
|
692
|
-
|
|
693
|
-
Object.assign(o,
|
|
715
|
+
for (const V in f)
|
|
716
|
+
p[V] = t[f[V]];
|
|
717
|
+
Object.assign(o, p);
|
|
694
718
|
}
|
|
695
|
-
const
|
|
719
|
+
const C = {
|
|
696
720
|
row: o,
|
|
697
721
|
options: t,
|
|
698
722
|
field: h.field,
|
|
699
723
|
column: h
|
|
700
724
|
};
|
|
701
|
-
e != null && e.change && e.change(
|
|
725
|
+
e != null && e.change && e.change(C);
|
|
702
726
|
}
|
|
703
727
|
function c() {
|
|
704
728
|
i.clear(o, h.field, l, "row");
|
|
@@ -1054,18 +1078,18 @@ const VxetableRender = (VXETable, {
|
|
|
1054
1078
|
url: f,
|
|
1055
1079
|
defaultParams: n = {},
|
|
1056
1080
|
method: m = "get"
|
|
1057
|
-
} = c,
|
|
1081
|
+
} = c, M = getCookieParam(), C = Object.assign({
|
|
1058
1082
|
pageSize: 20,
|
|
1059
1083
|
pageNum: 1,
|
|
1060
|
-
...
|
|
1084
|
+
...M,
|
|
1061
1085
|
...n
|
|
1062
1086
|
}, {
|
|
1063
1087
|
[d || e]: r
|
|
1064
1088
|
});
|
|
1065
1089
|
if (c.loading) return;
|
|
1066
|
-
let
|
|
1090
|
+
let p;
|
|
1067
1091
|
try {
|
|
1068
|
-
Z.length = 0, c.loading = !0,
|
|
1092
|
+
Z.length = 0, c.loading = !0, p = await serviceApi[m](f, C), t != null && t.filterMethod ? Z.push(...t.filterMethod(p.list || p)) : p && (p.list ? Z.push(...p.list) : Z.push(...p));
|
|
1069
1093
|
} finally {
|
|
1070
1094
|
c.loading = !1;
|
|
1071
1095
|
}
|
|
@@ -1078,26 +1102,26 @@ const VxetableRender = (VXETable, {
|
|
|
1078
1102
|
options: f,
|
|
1079
1103
|
props: n,
|
|
1080
1104
|
optionProps: m = {},
|
|
1081
|
-
events:
|
|
1082
|
-
} = Z,
|
|
1105
|
+
events: M
|
|
1106
|
+
} = Z, C = {
|
|
1083
1107
|
[d]: e,
|
|
1084
1108
|
field: i
|
|
1085
1109
|
};
|
|
1086
|
-
e[i] = null, !isEmpty(r) && (n != null && n.multiple) ? (e[i] = r.join(","), t = [], r.forEach((
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
const w =
|
|
1090
|
-
e[
|
|
1091
|
-
}),
|
|
1092
|
-
}), Object.assign(
|
|
1110
|
+
e[i] = null, !isEmpty(r) && (n != null && n.multiple) ? (e[i] = r.join(","), t = [], r.forEach((p) => {
|
|
1111
|
+
const V = f.find((s) => p === s[m == null ? void 0 : m.value]);
|
|
1112
|
+
V && !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((s) => {
|
|
1113
|
+
const w = V[n.mapField[s]], u = e[s] ? e[s].toString() : "";
|
|
1114
|
+
e[s] = u && !u.includes(w) ? `${u},${w}` : w;
|
|
1115
|
+
}), V && t.push(V);
|
|
1116
|
+
}), Object.assign(C, {
|
|
1093
1117
|
options: t
|
|
1094
|
-
})) : (e[i] = n != null && n.multiple ? null : r, t = f.find((
|
|
1095
|
-
e[
|
|
1096
|
-
}), Object.assign(
|
|
1118
|
+
})) : (e[i] = n != null && n.multiple ? null : r, t = f.find((p) => r === p[m == null ? void 0 : m.value]), !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((p) => {
|
|
1119
|
+
e[p] = t ? t[n.mapField[p]] : null;
|
|
1120
|
+
}), Object.assign(C, {
|
|
1097
1121
|
option: t
|
|
1098
|
-
})), d === "row" && Object.assign(
|
|
1122
|
+
})), d === "row" && Object.assign(C, {
|
|
1099
1123
|
column: c.column
|
|
1100
|
-
}),
|
|
1124
|
+
}), M != null && M.change && M.change(C);
|
|
1101
1125
|
},
|
|
1102
1126
|
setDefaultValue: (r, e, i) => {
|
|
1103
1127
|
var d;
|
|
@@ -1185,8 +1209,8 @@ function useWatermark(l = ref(document.body)) {
|
|
|
1185
1209
|
function e(t, d) {
|
|
1186
1210
|
const f = document.createElement("canvas"), n = 260, m = 180;
|
|
1187
1211
|
Object.assign(f, { width: n, height: m });
|
|
1188
|
-
const
|
|
1189
|
-
return
|
|
1212
|
+
const M = f.getContext("2d");
|
|
1213
|
+
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(t, n / 20, m)), f.toDataURL("image/png");
|
|
1190
1214
|
}
|
|
1191
1215
|
function i(t = {}) {
|
|
1192
1216
|
const d = unref(h);
|
|
@@ -1202,8 +1226,8 @@ function useWatermark(l = ref(document.body)) {
|
|
|
1202
1226
|
h.value = f, f.id = o, f.style.pointerEvents = "none", f.style.top = "0px", f.style.left = "0px", f.style.position = "absolute", f.style.zIndex = "100000";
|
|
1203
1227
|
const n = unref(l);
|
|
1204
1228
|
if (!n) return o;
|
|
1205
|
-
const { clientHeight: m, clientWidth:
|
|
1206
|
-
return i({ str: t, width:
|
|
1229
|
+
const { clientHeight: m, clientWidth: M } = n;
|
|
1230
|
+
return i({ str: t, width: M, height: m, attr: d }), n.appendChild(f), o;
|
|
1207
1231
|
};
|
|
1208
1232
|
function c(t, d) {
|
|
1209
1233
|
Z(t, d), addResizeListener(document.documentElement, a), getCurrentInstance() && onBeforeUnmount(() => {
|
|
@@ -1229,19 +1253,19 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1229
1253
|
const l = { value: "dictCode", label: "dictName" }, a = (v, H) => {
|
|
1230
1254
|
var N;
|
|
1231
1255
|
const b = g(H);
|
|
1232
|
-
let
|
|
1256
|
+
let y = {
|
|
1233
1257
|
clearable: !0,
|
|
1234
1258
|
disabled: !1,
|
|
1235
1259
|
showValue: !1,
|
|
1236
1260
|
placeholder: null
|
|
1237
1261
|
}, L, k;
|
|
1238
|
-
isObject(v) ? (
|
|
1262
|
+
isObject(v) ? (y = Object.assign(y, v), L = v.defaultValue, k = v == null ? void 0 : v.code) : k = v;
|
|
1239
1263
|
const x = (N = storageLocal.getItem("kLov")[k]) == null ? void 0 : N.children, D = x ? x.filter((E) => E.enabled === "1") : [];
|
|
1240
1264
|
return {
|
|
1241
1265
|
name: "#select",
|
|
1242
1266
|
optionProps: l,
|
|
1243
1267
|
options: D,
|
|
1244
|
-
props:
|
|
1268
|
+
props: y,
|
|
1245
1269
|
defaultValue: L,
|
|
1246
1270
|
events: b
|
|
1247
1271
|
};
|
|
@@ -1282,7 +1306,7 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1282
1306
|
const b = {
|
|
1283
1307
|
label: "organizationName",
|
|
1284
1308
|
value: (v == null ? void 0 : v.field) || "organizationName"
|
|
1285
|
-
},
|
|
1309
|
+
}, y = {
|
|
1286
1310
|
mapField: {},
|
|
1287
1311
|
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1288
1312
|
disabled: v == null ? void 0 : v.disabled,
|
|
@@ -1292,9 +1316,9 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1292
1316
|
organizationId: "id",
|
|
1293
1317
|
organizationCode: "organizationCode"
|
|
1294
1318
|
};
|
|
1295
|
-
return Object.assign(
|
|
1319
|
+
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
|
|
1296
1320
|
name: "#SuSelect",
|
|
1297
|
-
props:
|
|
1321
|
+
props: y,
|
|
1298
1322
|
optionProps: b,
|
|
1299
1323
|
options: [],
|
|
1300
1324
|
events: g(H)
|
|
@@ -1303,49 +1327,49 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1303
1327
|
const b = {
|
|
1304
1328
|
label: "orgName",
|
|
1305
1329
|
value: (v == null ? void 0 : v.field) || "orgName"
|
|
1306
|
-
},
|
|
1330
|
+
}, y = {
|
|
1307
1331
|
mapField: {},
|
|
1308
1332
|
disabled: v == null ? void 0 : v.disabled,
|
|
1309
1333
|
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1310
1334
|
url: "/uums/org",
|
|
1311
1335
|
fetchField: "orgName"
|
|
1312
1336
|
}, L = { orgId: "id", orgCode: "orgCode" };
|
|
1313
|
-
return Object.assign(
|
|
1337
|
+
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
|
|
1314
1338
|
name: "#SuSelect",
|
|
1315
|
-
props:
|
|
1339
|
+
props: y,
|
|
1316
1340
|
optionProps: b,
|
|
1317
1341
|
options: [],
|
|
1318
1342
|
events: g(H)
|
|
1319
1343
|
};
|
|
1320
1344
|
}, Z = (v, H) => {
|
|
1321
|
-
const b = Object.assign({ disabled: !1 }, v),
|
|
1345
|
+
const b = Object.assign({ disabled: !1 }, v), y = b == null ? void 0 : b.defaultValue;
|
|
1322
1346
|
return {
|
|
1323
1347
|
name: "VxeInput",
|
|
1324
1348
|
props: b,
|
|
1325
|
-
defaultValue:
|
|
1349
|
+
defaultValue: y,
|
|
1326
1350
|
events: g(H)
|
|
1327
1351
|
};
|
|
1328
1352
|
}, c = (v, H) => {
|
|
1329
|
-
const b = Object.assign({ disabled: !1, rows: 3 }, v),
|
|
1353
|
+
const b = Object.assign({ disabled: !1, rows: 3 }, v), y = b == null ? void 0 : b.defaultValue;
|
|
1330
1354
|
return {
|
|
1331
1355
|
name: "VxeTextarea",
|
|
1332
1356
|
props: b,
|
|
1333
|
-
defaultValue:
|
|
1357
|
+
defaultValue: y,
|
|
1334
1358
|
events: g(H)
|
|
1335
1359
|
};
|
|
1336
1360
|
}, t = (v, H) => {
|
|
1337
|
-
const b = "VxeCheckboxGroup", { defaultValue:
|
|
1338
|
-
return { name: b, defaultValue:
|
|
1361
|
+
const b = "VxeCheckboxGroup", { defaultValue: y, options: L, props: k } = f(v);
|
|
1362
|
+
return { name: b, defaultValue: y, options: L, props: k, events: g(H) };
|
|
1339
1363
|
}, d = (v, H) => {
|
|
1340
|
-
const b = "VxeRadioGroup", { defaultValue:
|
|
1341
|
-
return { name: b, defaultValue:
|
|
1364
|
+
const b = "VxeRadioGroup", { defaultValue: y, options: L, props: k } = f(v);
|
|
1365
|
+
return { name: b, defaultValue: y, options: L, props: k, events: g(H) };
|
|
1342
1366
|
}, f = (v) => {
|
|
1343
1367
|
var x;
|
|
1344
1368
|
let H = { disabled: !1 }, b;
|
|
1345
|
-
const
|
|
1369
|
+
const y = storageLocal.getItem("kLov");
|
|
1346
1370
|
let L = "";
|
|
1347
1371
|
isObject(v) ? (b = v.defaultValue, L = v.code, v.options ? H = Object.assign(H, v.props || {}) : H = Object.assign(H, v || {})) : isString(v) && (L = v);
|
|
1348
|
-
const k = L ? (x =
|
|
1372
|
+
const k = L ? (x = y[L]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
|
|
1349
1373
|
return {
|
|
1350
1374
|
props: H,
|
|
1351
1375
|
defaultValue: b,
|
|
@@ -1363,12 +1387,12 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1363
1387
|
events: b
|
|
1364
1388
|
};
|
|
1365
1389
|
}, m = (v, H) => {
|
|
1366
|
-
const b = g(H),
|
|
1367
|
-
return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat:
|
|
1368
|
-
},
|
|
1369
|
-
const b = g(H),
|
|
1390
|
+
const b = g(H), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
|
|
1391
|
+
return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: y, clearable: !0 }, v || {}), defaultValue: L, events: b };
|
|
1392
|
+
}, M = (v, H) => {
|
|
1393
|
+
const b = g(H), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.startValue, k = v == null ? void 0 : v.endValue, x = v == null ? void 0 : v.startField, D = v == null ? void 0 : v.endField, N = {
|
|
1370
1394
|
type: "date",
|
|
1371
|
-
valueFormat:
|
|
1395
|
+
valueFormat: y,
|
|
1372
1396
|
clearable: !0,
|
|
1373
1397
|
shortcutConfig: {
|
|
1374
1398
|
enabled: !0,
|
|
@@ -1413,11 +1437,11 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1413
1437
|
props: E,
|
|
1414
1438
|
events: b
|
|
1415
1439
|
};
|
|
1416
|
-
},
|
|
1440
|
+
}, C = (v, H) => {
|
|
1417
1441
|
const b = g(H);
|
|
1418
1442
|
return { name: "#lov", props: Object.assign({}, v || {}), events: b };
|
|
1419
|
-
},
|
|
1420
|
-
const b = g(H),
|
|
1443
|
+
}, p = (v, H) => {
|
|
1444
|
+
const b = g(H), y = (v == null ? void 0 : v.optionProps) || {
|
|
1421
1445
|
label: "label",
|
|
1422
1446
|
value: "value"
|
|
1423
1447
|
}, L = Object.assign(
|
|
@@ -1426,22 +1450,22 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1426
1450
|
);
|
|
1427
1451
|
return console.log("itemRender"), {
|
|
1428
1452
|
name: "#select",
|
|
1429
|
-
optionProps:
|
|
1453
|
+
optionProps: y,
|
|
1430
1454
|
options: (v == null ? void 0 : v.options) || [],
|
|
1431
1455
|
props: L,
|
|
1432
1456
|
events: b
|
|
1433
1457
|
};
|
|
1434
|
-
},
|
|
1458
|
+
}, V = (v, H) => {
|
|
1435
1459
|
let b = {
|
|
1436
1460
|
openLabel: "是",
|
|
1437
1461
|
closeLabel: "否",
|
|
1438
1462
|
openValue: "Y",
|
|
1439
1463
|
closeValue: "N"
|
|
1440
|
-
},
|
|
1441
|
-
isObject(v) && !isFunction(v) ? (b = Object.assign(b, v || {}),
|
|
1464
|
+
}, y = "Y";
|
|
1465
|
+
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 }));
|
|
1442
1466
|
const L = isFunction(v) ? g(v) : g(H);
|
|
1443
|
-
return { name: "VxeSwitch", props: b, defaultValue:
|
|
1444
|
-
},
|
|
1467
|
+
return { name: "VxeSwitch", props: b, defaultValue: y, events: L };
|
|
1468
|
+
}, s = (v, H) => ({ name: "#tag", props: { code: v, tagMap: H } }), w = (v, H) => {
|
|
1445
1469
|
const b = {
|
|
1446
1470
|
openLabel: "启用",
|
|
1447
1471
|
closeLabel: "禁用",
|
|
@@ -1450,9 +1474,9 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1450
1474
|
defaultValue: "1"
|
|
1451
1475
|
};
|
|
1452
1476
|
!isFunction(v) && isObject(v) && Object.assign(b, v);
|
|
1453
|
-
const
|
|
1454
|
-
return
|
|
1455
|
-
},
|
|
1477
|
+
const y = isFunction(v) ? v : H;
|
|
1478
|
+
return V(b, y);
|
|
1479
|
+
}, u = () => ({ name: "#iconSelect" }), R = (v = [], H = {}, b) => ({ name: "#treeSelect", sourceData: v, props: H, events: b }), T = (v, H) => {
|
|
1456
1480
|
const b = g(H);
|
|
1457
1481
|
return {
|
|
1458
1482
|
name: "#area",
|
|
@@ -1474,12 +1498,12 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1474
1498
|
} : v && (H = { change: v }), H;
|
|
1475
1499
|
}, F = (v, H) => {
|
|
1476
1500
|
v = v || { fieldType: "string", mode: "image" };
|
|
1477
|
-
const { singleMode: b, mode:
|
|
1501
|
+
const { singleMode: b, mode: y } = v;
|
|
1478
1502
|
return b && Object.assign(v, {
|
|
1479
1503
|
multiple: !1,
|
|
1480
1504
|
limitCount: 1,
|
|
1481
1505
|
autoHiddenButton: !0
|
|
1482
|
-
}),
|
|
1506
|
+
}), y === "image" && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: H };
|
|
1483
1507
|
};
|
|
1484
1508
|
function I() {
|
|
1485
1509
|
}
|
|
@@ -1495,14 +1519,14 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1495
1519
|
renderInvOrg: e,
|
|
1496
1520
|
renderBU: i,
|
|
1497
1521
|
renderNumber: n,
|
|
1498
|
-
renderLov:
|
|
1499
|
-
renderSelectLocal:
|
|
1522
|
+
renderLov: C,
|
|
1523
|
+
renderSelectLocal: p,
|
|
1500
1524
|
renderDate: m,
|
|
1501
|
-
renderRangeDate:
|
|
1502
|
-
renderSwitch:
|
|
1503
|
-
renderCellTag:
|
|
1525
|
+
renderRangeDate: M,
|
|
1526
|
+
renderSwitch: V,
|
|
1527
|
+
renderCellTag: s,
|
|
1504
1528
|
renderEnabled: w,
|
|
1505
|
-
renderIconSelect:
|
|
1529
|
+
renderIconSelect: u,
|
|
1506
1530
|
renderTreeSelect: R,
|
|
1507
1531
|
renderArea: T,
|
|
1508
1532
|
renderUpload: F
|
|
@@ -2684,42 +2708,42 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2684
2708
|
let n = !1;
|
|
2685
2709
|
f.getFullYear() === h && f.getMonth() + 1 === r && f.getDate() === e && (n = !0);
|
|
2686
2710
|
let m = i.getDay();
|
|
2687
|
-
const
|
|
2711
|
+
const M = this.nStr1[m];
|
|
2688
2712
|
m === 0 && (m = 7);
|
|
2689
|
-
const
|
|
2713
|
+
const C = Z;
|
|
2690
2714
|
c = this.leapMonth(Z);
|
|
2691
|
-
let
|
|
2715
|
+
let p = !1;
|
|
2692
2716
|
for (Z = 1; Z < 13 && d > 0; Z++)
|
|
2693
|
-
c > 0 && Z === c + 1 &&
|
|
2694
|
-
d === 0 && c > 0 && Z === c + 1 && (
|
|
2695
|
-
const
|
|
2717
|
+
c > 0 && Z === c + 1 && p === !1 ? (--Z, p = !0, t = this.leapDays(C)) : t = this.monthDays(C, Z), p === !0 && Z === c + 1 && (p = !1), d -= t;
|
|
2718
|
+
d === 0 && c > 0 && Z === c + 1 && (p ? p = !1 : (p = !0, --Z)), d < 0 && (d += t, --Z);
|
|
2719
|
+
const V = Z, s = d + 1, w = r - 1, u = this.toGanZhiYear(C), R = this.getTerm(h, r * 2 - 1), T = this.getTerm(h, r * 2);
|
|
2696
2720
|
let g = this.toGanZhi((h - 1900) * 12 + r + 11);
|
|
2697
2721
|
e >= R && (g = this.toGanZhi((h - 1900) * 12 + r + 12));
|
|
2698
2722
|
let F = !1, I;
|
|
2699
2723
|
R === e && (F = !0, I = this.solarTerm[r * 2 - 2]), T === e && (F = !0, I = this.solarTerm[r * 2 - 1]);
|
|
2700
|
-
const v = Date.UTC(h, w, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, H = this.toGanZhi(v + e - 1), b = this.toAstro(r, e),
|
|
2701
|
-
let N =
|
|
2702
|
-
return
|
|
2703
|
-
date:
|
|
2724
|
+
const v = Date.UTC(h, w, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, H = this.toGanZhi(v + e - 1), b = this.toAstro(r, e), y = h + "-" + r + "-" + e, L = C + "-" + V + "-" + s, k = this.festival, x = this.lFestival, D = r + "-" + e;
|
|
2725
|
+
let N = V + "-" + s;
|
|
2726
|
+
return V === 12 && s === 29 && this.monthDays(C, V) === 29 && (N = "12-30"), {
|
|
2727
|
+
date: y,
|
|
2704
2728
|
lunarDate: L,
|
|
2705
2729
|
festival: k[D] ? k[D].title : null,
|
|
2706
2730
|
lunarFestival: x[N] ? x[N].title : null,
|
|
2707
|
-
lYear:
|
|
2708
|
-
lMonth:
|
|
2709
|
-
lDay:
|
|
2710
|
-
Animal: this.getAnimal(
|
|
2711
|
-
IMonthCn: (
|
|
2712
|
-
IDayCn: this.toChinaDay(
|
|
2731
|
+
lYear: C,
|
|
2732
|
+
lMonth: V,
|
|
2733
|
+
lDay: s,
|
|
2734
|
+
Animal: this.getAnimal(C),
|
|
2735
|
+
IMonthCn: (p ? "闰" : "") + this.toChinaMonth(V),
|
|
2736
|
+
IDayCn: this.toChinaDay(s),
|
|
2713
2737
|
cYear: h,
|
|
2714
2738
|
cMonth: r,
|
|
2715
2739
|
cDay: e,
|
|
2716
|
-
gzYear:
|
|
2740
|
+
gzYear: u,
|
|
2717
2741
|
gzMonth: g,
|
|
2718
2742
|
gzDay: H,
|
|
2719
2743
|
isToday: n,
|
|
2720
|
-
isLeap:
|
|
2744
|
+
isLeap: p,
|
|
2721
2745
|
nWeek: m,
|
|
2722
|
-
ncWeek: "星期" +
|
|
2746
|
+
ncWeek: "星期" + M,
|
|
2723
2747
|
isTerm: F,
|
|
2724
2748
|
Term: I,
|
|
2725
2749
|
astro: b
|
|
@@ -2751,8 +2775,8 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2751
2775
|
for (c = 1; c < a; c++)
|
|
2752
2776
|
t = this.leapMonth(l), d || t <= c && t > 0 && (Z += this.leapDays(l), d = !0), Z += this.monthDays(l, c);
|
|
2753
2777
|
h && (Z += e);
|
|
2754
|
-
const f = Date.UTC(1900, 1, 30, 0, 0, 0), n = new Date((Z + o - 31) * 864e5 + f), m = n.getUTCFullYear(),
|
|
2755
|
-
return this.solar2lunar(m,
|
|
2778
|
+
const f = Date.UTC(1900, 1, 30, 0, 0, 0), n = new Date((Z + o - 31) * 864e5 + f), m = n.getUTCFullYear(), M = n.getUTCMonth() + 1, C = n.getUTCDate();
|
|
2779
|
+
return this.solar2lunar(m, M, C);
|
|
2756
2780
|
}
|
|
2757
2781
|
}, dict = storageLocal.getItem("kLov"), formats = {
|
|
2758
2782
|
formatDate: {
|