@utogether/utils 3.0.0-beta.20 → 3.0.0-beta.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  var T = Object.defineProperty;
2
2
  var j = (a, l, h) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
3
- var S = (a, l, h) => j(a, typeof l != "symbol" ? l + "" : l, h);
3
+ var k = (a, l, h) => j(a, typeof l != "symbol" ? l + "" : l, h);
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, has } from "xe-utils";
@@ -12,9 +12,9 @@ import NProgress from "nprogress";
12
12
  import { default as W } from "nprogress";
13
13
  class sessionStorageProxy {
14
14
  constructor(l) {
15
- S(this, "storage");
16
- S(this, "prefix");
17
- S(this, "addPrefix", (l) => {
15
+ k(this, "storage");
16
+ k(this, "prefix");
17
+ k(this, "addPrefix", (l) => {
18
18
  this.prefix = l;
19
19
  });
20
20
  this.storage = l;
@@ -46,7 +46,7 @@ class localStorageProxy extends sessionStorageProxy {
46
46
  }
47
47
  class localforageProxy {
48
48
  constructor() {
49
- S(this, "storage");
49
+ k(this, "storage");
50
50
  localforage.config({
51
51
  name: "uapp",
52
52
  storeName: "udb"
@@ -155,8 +155,8 @@ function init(a, l) {
155
155
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
156
156
  class Cookies {
157
157
  constructor() {
158
- S(this, "prefix", null);
159
- S(this, "addPrefix", (l) => {
158
+ k(this, "prefix", null);
159
+ k(this, "addPrefix", (l) => {
160
160
  this.prefix = l;
161
161
  });
162
162
  }
@@ -214,54 +214,53 @@ const VxetableRender = (VXETable, {
214
214
  options: c,
215
215
  props: i,
216
216
  optionProps: Z = {},
217
- events: t
217
+ events: e
218
218
  } = a, {
219
- label: v = "label",
220
- value: d = "value",
221
- extLabel: f
219
+ label: t = "label",
220
+ value: d = "value"
222
221
  } = Z, {
223
- loading: m = !1,
224
- multiple: H,
225
- mapField: b
226
- } = i, M = useComponent(), n = H ? `_${r.field}` : r.field;
227
- M.setDefaultValue(i, o, r.field);
228
- function s(y) {
229
- M.remote(y, field, a);
222
+ loading: f = !1,
223
+ multiple: m,
224
+ mapField: u
225
+ } = i, V = useComponent(), p = m ? `_${r.field}` : r.field;
226
+ V.setDefaultValue(i, o, r.field);
227
+ function n(H) {
228
+ V.remote(H, r.field, a);
230
229
  }
231
- function C(y) {
232
- M.selectChange(y, data, r.field, a, {
230
+ function L(H) {
231
+ V.selectChange(H, data, r.field, a, {
233
232
  column: r,
234
233
  datasource: "row"
235
234
  });
236
235
  }
237
- function g(y) {
238
- t != null && t.input && t.input(l, y);
236
+ function C(H) {
237
+ e != null && e.input && e.input(l, H);
239
238
  }
240
- function k() {
241
- M.clear(o, r.field, b, t, "row");
239
+ function A() {
240
+ V.clear(o, r.field, u, e, "row");
242
241
  }
243
- function L() {
244
- !c.length && s(""), t != null && t.focus && t.focus(l, r.field);
242
+ function w() {
243
+ !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
245
244
  }
246
245
  return [createVNode(resolveComponent("el-select"), mergeProps({
247
- modelValue: o[n],
248
- "onUpdate:modelValue": (y) => o[n] = y,
246
+ modelValue: o[p],
247
+ "onUpdate:modelValue": (H) => o[p] = H,
249
248
  filterable: !0,
250
249
  remote: !0,
251
250
  clearable: !0,
252
251
  placeholder: "请录入关键字搜索",
253
252
  style: "width: 100%",
254
- "remote-method": s,
255
- loading: m
253
+ "remote-method": n,
254
+ loading: f
256
255
  }, i, {
257
- onFocus: () => L(),
258
- onChange: (y) => C(y),
259
- onClear: () => k(),
260
- onInput: (y) => g(y)
261
- }), _isSlot(h = c.map((y) => createVNode(resolveComponent("el-option"), {
262
- key: y[d],
263
- label: y[v],
264
- value: y[d]
256
+ onFocus: () => w(),
257
+ onChange: (H) => L(H),
258
+ onClear: () => A(),
259
+ onInput: (H) => C(H)
260
+ }), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
261
+ key: H[d],
262
+ label: H[t],
263
+ value: H[d]
265
264
  }, null))) ? h : {
266
265
  default: () => [h]
267
266
  })];
@@ -284,59 +283,57 @@ const VxetableRender = (VXETable, {
284
283
  let h;
285
284
  const {
286
285
  data: o,
287
- property: r,
288
- field: c
286
+ field: r
289
287
  } = l, {
290
- options: i,
291
- props: Z,
292
- optionProps: t = {},
293
- events: v
288
+ options: c,
289
+ props: i,
290
+ optionProps: Z = {},
291
+ events: e
294
292
  } = a, {
295
- label: d = "label",
296
- value: f = "value",
297
- extLabel: m
298
- } = t, {
299
- mapField: H,
300
- multiple: b,
301
- loading: M = !1
302
- } = Z, n = useComponent(), s = b ? `_${c}` : c;
303
- n.setDefaultValue(Z, o, c);
304
- async function C(e) {
305
- n.remote(e, c, a);
293
+ label: t = "label",
294
+ value: d = "value"
295
+ } = Z, {
296
+ mapField: f,
297
+ multiple: m,
298
+ loading: u = !1
299
+ } = i, V = useComponent(), p = m ? `_${r}` : r;
300
+ V.setDefaultValue(i, o, r);
301
+ async function n(H) {
302
+ V.remote(H, r, a);
306
303
  }
307
- function g(e) {
308
- n.selectChange(e, o, c, a, {
304
+ function L(H) {
305
+ V.selectChange(H, o, r, a, {
309
306
  datasource: "data"
310
307
  });
311
308
  }
312
- function k(e) {
313
- v != null && v.input && v.input(l, e);
309
+ function C(H) {
310
+ e != null && e.input && e.input(l, H);
314
311
  }
315
- function L() {
316
- n.clear(o, c, H, v, "data");
312
+ function A() {
313
+ V.clear(o, r, f, e, "data");
317
314
  }
318
- function y() {
319
- !i.length && C(""), v != null && v.focus && v.focus(l);
315
+ function w() {
316
+ !c.length && n(""), e != null && e.focus && e.focus(l);
320
317
  }
321
318
  return [createVNode(resolveComponent("el-select"), mergeProps({
322
- modelValue: o[s],
323
- "onUpdate:modelValue": (e) => o[s] = e,
319
+ modelValue: o[p],
320
+ "onUpdate:modelValue": (H) => o[p] = H,
324
321
  filterable: !0,
325
322
  remote: !0,
326
323
  clearable: !0,
327
324
  style: "width: 100%",
328
325
  placeholder: "请录入关键字搜索",
329
- loading: M,
330
- "remote-method": C
331
- }, Z, {
332
- onFocus: () => y(),
333
- onChange: (e) => g(e),
334
- onClear: () => L(),
335
- onInput: () => k()
336
- }), _isSlot(h = i.map((e) => createVNode(resolveComponent("el-option"), {
337
- key: e[f],
338
- label: e[d],
339
- value: e[f]
326
+ loading: u,
327
+ "remote-method": n
328
+ }, i, {
329
+ onFocus: () => w(),
330
+ onChange: (H) => L(H),
331
+ onClear: () => A(),
332
+ onInput: () => C()
333
+ }), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
334
+ key: H[d],
335
+ label: H[t],
336
+ value: H[d]
340
337
  }, null))) ? h : {
341
338
  default: () => [h]
342
339
  })];
@@ -371,10 +368,10 @@ const VxetableRender = (VXETable, {
371
368
  }, {
372
369
  text: i18n("message.udp.anniversary", !0),
373
370
  value: () => [Z(1, "year"), c]
374
- }], Z = (t, v) => dayjs().subtract(t, v).add("1", "day").format();
371
+ }], Z = (e, t) => dayjs().subtract(e, t).add("1", "day").format();
375
372
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
376
373
  modelValue: h[o],
377
- "onUpdate:modelValue": (t) => h[o] = t,
374
+ "onUpdate:modelValue": (e) => h[o] = e,
378
375
  type: (r == null ? void 0 : r.type) || "daterange",
379
376
  shortcuts: i,
380
377
  style: "width: 100%",
@@ -393,28 +390,77 @@ const VxetableRender = (VXETable, {
393
390
  options: c,
394
391
  props: i,
395
392
  optionProps: Z = {},
396
- events: t
393
+ events: e
394
+ } = a, {
395
+ label: t = "label",
396
+ value: d = "value",
397
+ extLabel: f
398
+ } = Z, {
399
+ mapField: m
400
+ } = i, u = useComponent();
401
+ i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
402
+ !c.some((C) => C[t] === n) && c.push({
403
+ [d]: n,
404
+ [t]: n
405
+ });
406
+ });
407
+ function V(n) {
408
+ u.selectChange(n, o, r.field, a, {
409
+ column: r,
410
+ datasource: "row"
411
+ });
412
+ }
413
+ function p() {
414
+ u.clear(o, r.field, m, e, "row");
415
+ }
416
+ return [createVNode(resolveComponent("el-select"), mergeProps({
417
+ modelValue: o[r.field],
418
+ "onUpdate:modelValue": (n) => o[r.field] = n,
419
+ filterable: !0,
420
+ clearable: !0
421
+ }, i, {
422
+ style: "width: 100%",
423
+ onChange: (n) => V(n),
424
+ onClear: () => p()
425
+ }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
426
+ key: n[d],
427
+ label: f && n[f] ? n[d] : n[t],
428
+ value: n[d]
429
+ }, null))) ? h : {
430
+ default: () => [h]
431
+ })];
432
+ },
433
+ renderTableDefault(a, l) {
434
+ let h;
435
+ const {
436
+ row: o,
437
+ column: r
438
+ } = l, {
439
+ options: c,
440
+ props: i,
441
+ optionProps: Z = {},
442
+ events: e
397
443
  } = a, {
398
- label: v = "label",
444
+ label: t = "label",
399
445
  value: d = "value",
400
446
  extLabel: f
401
447
  } = Z, {
402
448
  mapField: m
403
- } = i, H = useComponent();
449
+ } = i, u = useComponent();
404
450
  i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
405
- !c.some((C) => C[v] === n) && c.push({
451
+ !c.some((C) => C[t] === n) && c.push({
406
452
  [d]: n,
407
- [v]: n
453
+ [t]: n
408
454
  });
409
455
  });
410
- function b(n) {
411
- H.selectChange(n, o, r.field, a, {
456
+ function V(n) {
457
+ u.selectChange(n, o, r.field, a, {
412
458
  column: r,
413
459
  datasource: "row"
414
460
  });
415
461
  }
416
- function M() {
417
- H.clear(o, r.field, m, t, "row");
462
+ function p() {
463
+ u.clear(o, r.field, m, e, "row");
418
464
  }
419
465
  return [createVNode(resolveComponent("el-select"), mergeProps({
420
466
  modelValue: o[r.field],
@@ -423,11 +469,11 @@ const VxetableRender = (VXETable, {
423
469
  clearable: !0
424
470
  }, i, {
425
471
  style: "width: 100%",
426
- onChange: (n) => b(n),
427
- onClear: () => M()
472
+ onChange: (n) => V(n),
473
+ onClear: () => p()
428
474
  }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
429
475
  key: n[d],
430
- label: f && n[f] ? n[d] : n[v],
476
+ label: f && n[f] ? n[d] : n[t],
431
477
  value: n[d]
432
478
  }, null))) ? h : {
433
479
  default: () => [h]
@@ -457,42 +503,41 @@ const VxetableRender = (VXETable, {
457
503
  let h;
458
504
  const {
459
505
  data: o,
460
- property: r,
461
- field: c
506
+ field: r
462
507
  } = l, {
463
- options: i,
464
- props: Z,
465
- optionProps: t = {},
466
- events: v
508
+ options: c,
509
+ props: i,
510
+ optionProps: Z = {},
511
+ events: e
467
512
  } = a, {
468
- label: d = "label",
469
- value: f = "value"
470
- } = t, m = useComponent(), {
471
- defaultValues: H,
472
- mapField: b
473
- } = Z;
474
- H && (o[c] = H);
475
- function M(s) {
476
- m.selectChange(s, o, c, a, {
513
+ label: t = "label",
514
+ value: d = "value"
515
+ } = Z, f = useComponent(), {
516
+ defaultValues: m,
517
+ mapField: u
518
+ } = i;
519
+ m && (o[r] = m);
520
+ function V(n) {
521
+ f.selectChange(n, o, r, a, {
477
522
  datasource: "data"
478
523
  });
479
524
  }
480
- function n() {
481
- m.clear(o, c, b, v, "data");
525
+ function p() {
526
+ f.clear(o, r, u, e, "data");
482
527
  }
483
528
  return [createVNode(resolveComponent("el-select"), mergeProps({
484
- modelValue: o[c],
485
- "onUpdate:modelValue": (s) => o[c] = s,
529
+ modelValue: o[r],
530
+ "onUpdate:modelValue": (n) => o[r] = n,
486
531
  filterable: !0,
487
532
  clearable: !0,
488
533
  style: "width: 100%"
489
- }, Z, {
490
- onChange: (s) => M(s),
491
- onClear: () => n()
492
- }), _isSlot(h = i.map((s) => createVNode(resolveComponent("el-option"), {
493
- key: s[f],
494
- label: s[d],
495
- value: s[f]
534
+ }, i, {
535
+ onChange: (n) => V(n),
536
+ onClear: () => p()
537
+ }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
538
+ key: n[d],
539
+ label: n[t],
540
+ value: n[d]
496
541
  }, null))) ? h : {
497
542
  default: () => [h]
498
543
  })];
@@ -507,49 +552,49 @@ const VxetableRender = (VXETable, {
507
552
  events: c
508
553
  } = a, i = useComponent(), {
509
554
  defaultValues: Z,
510
- mapField: t
555
+ mapField: e
511
556
  } = r;
512
557
  Z && (h[o] = Z);
513
- function v(f, m) {
558
+ function t(f, m) {
514
559
  const {
515
- mapField: H,
516
- field: b,
517
- displayName: M,
560
+ mapField: u,
561
+ field: V,
562
+ displayName: p,
518
563
  multiple: n
519
564
  } = r;
520
565
  if (n) {
521
566
  if (n) {
522
567
  const C = {};
523
- h[M || b] = f.reduce((g, k) => {
524
- for (const L in H)
525
- C[L] = g ? C[L] + "," + k[H[L]] : k[H[L]];
526
- return g = g ? g + "," + k[M || b] : k[M || b], g;
568
+ h[p || V] = f.reduce((A, w) => {
569
+ for (const H in u)
570
+ C[H] = A ? C[H] + "," + w[u[H]] : w[u[H]];
571
+ return A = A ? A + "," + w[p || V] : w[p || V], A;
527
572
  }, ""), Object.assign(h, C);
528
573
  }
529
574
  } else {
530
575
  const C = {
531
- [M || b]: f[m || M || b]
576
+ [p || V]: f[m || p || V]
532
577
  };
533
- for (const g in H)
534
- C[g] = f[H[g]];
578
+ for (const A in u)
579
+ C[A] = f[u[A]];
535
580
  Object.assign(h, C);
536
581
  }
537
- const s = {
582
+ const L = {
538
583
  row: h,
539
- property: b,
584
+ property: V,
540
585
  item: f,
541
- field: b
586
+ field: V
542
587
  };
543
- c != null && c.change && c.change(s);
588
+ c != null && c.change && c.change(L);
544
589
  }
545
590
  function d() {
546
- i.clear(h, o, t, c, "data");
591
+ i.clear(h, o, e, c, "data");
547
592
  }
548
593
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
549
594
  record: h
550
595
  }, r, {
551
596
  mode: "vxe",
552
- onChange: (f, m) => v(f, m),
597
+ onChange: (f, m) => t(f, m),
553
598
  onClear: () => d()
554
599
  }), null)];
555
600
  },
@@ -562,32 +607,32 @@ const VxetableRender = (VXETable, {
562
607
  props: r,
563
608
  events: c
564
609
  } = a, i = useComponent();
565
- function Z(v, d) {
610
+ function Z(t, d) {
566
611
  const {
567
612
  mapField: f,
568
613
  field: m,
569
- displayName: H,
570
- multiple: b
614
+ displayName: u,
615
+ multiple: V
571
616
  } = r;
572
- if (!b) {
573
- const M = {
574
- [H || m]: v[d || H || m]
617
+ if (!V) {
618
+ const p = {
619
+ [u || m]: t[d || u || m]
575
620
  };
576
621
  for (const n in f)
577
- M[n] = v[f[n]];
578
- Object.assign(h, M);
622
+ p[n] = t[f[n]];
623
+ Object.assign(h, p);
579
624
  }
580
- c != null && c.change && c.change(l, v, h[o.field]);
625
+ c != null && c.change && c.change(l, t, h[o.field]);
581
626
  }
582
- function t() {
627
+ function e() {
583
628
  i.clear(h, field, mapField, c, "row");
584
629
  }
585
630
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
586
- record: h
631
+ record: h,
632
+ mode: "vxe"
587
633
  }, r, {
588
- mode: "ele",
589
- onChange: (v, d) => Z(v, d),
590
- onClear: () => t()
634
+ onChange: (t, d) => Z(t, d),
635
+ onClear: () => e()
591
636
  }), null)];
592
637
  },
593
638
  // 单元格默认
@@ -599,32 +644,32 @@ const VxetableRender = (VXETable, {
599
644
  props: r,
600
645
  events: c
601
646
  } = a, i = useComponent();
602
- function Z(v, d) {
647
+ function Z(t, d) {
603
648
  const {
604
649
  mapField: f,
605
650
  field: m,
606
- displayName: H,
607
- multiple: b
651
+ displayName: u,
652
+ multiple: V
608
653
  } = r;
609
- if (!b) {
610
- const M = {
611
- [H || m]: v[d || H || m]
654
+ if (!V) {
655
+ const p = {
656
+ [u || m]: t[d || u || m]
612
657
  };
613
658
  for (const n in f)
614
- M[n] = v[f[n]];
615
- Object.assign(h, M);
659
+ p[n] = t[f[n]];
660
+ Object.assign(h, p);
616
661
  }
617
- c != null && c.change && c.change(l, v, h[o.field]);
662
+ c != null && c.change && c.change(l, t, h[o.field]);
618
663
  }
619
- function t() {
664
+ function e() {
620
665
  i.clear(h, field, mapField, c, "row");
621
666
  }
622
667
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
623
- record: h
668
+ record: h,
669
+ mode: "ele"
624
670
  }, r, {
625
- mode: "ele",
626
- onChange: (v, d) => Z(v, d),
627
- onClear: () => t()
671
+ onChange: (t, d) => Z(t, d),
672
+ onClear: () => e()
628
673
  }), null)];
629
674
  },
630
675
  // 可编辑显示模板
@@ -690,24 +735,24 @@ const VxetableRender = (VXETable, {
690
735
  },
691
736
  events: Z
692
737
  } = a;
693
- function t(v) {
738
+ function e(t) {
694
739
  const d = {
695
740
  row: h,
696
741
  column: o,
697
- value: v
742
+ value: t
698
743
  };
699
744
  Z != null && Z.change && Z.change(d);
700
745
  }
701
746
  return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
702
747
  modelValue: h[o.field],
703
- "onUpdate:modelValue": (v) => h[o.field] = v,
748
+ "onUpdate:modelValue": (t) => h[o.field] = t,
704
749
  "inline-prompt": !0,
705
750
  size: "large",
706
751
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
707
752
  }, a.props, {
708
753
  "active-text": getValue(r, c),
709
754
  "inactive-text": getValue(r, i),
710
- onChange: (v) => t(v)
755
+ onChange: (t) => e(t)
711
756
  }), null) : null];
712
757
  }
713
758
  }), VXETable.renderer.add("#iconSelect", {
@@ -760,9 +805,9 @@ const VxetableRender = (VXETable, {
760
805
  "check-strictly": !0
761
806
  }, r, {
762
807
  filterable: !0,
763
- onCheckChange: (Z, t, v) => onCheckChange(Z, t, v, i),
764
- onNodeClick: (Z, t, v) => onNodeClick(Z, t, v, i),
765
- onCurrentChange: (Z, t) => onCurrentChange(Z, t, i)
808
+ onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
809
+ onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
810
+ onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
766
811
  }), null)];
767
812
  },
768
813
  renderTableCell(a, l) {
@@ -775,10 +820,10 @@ const VxetableRender = (VXETable, {
775
820
  } = a, {
776
821
  children: i = "children",
777
822
  label: Z = "label"
778
- } = c, t = findTree(r, (v) => v.value === h[o.field], {
823
+ } = c, e = findTree(r, (t) => t.value === h[o.field], {
779
824
  children: i
780
825
  });
781
- return t ? [createVNode("span", null, [t.item[Z]])] : null;
826
+ return e ? [createVNode("span", null, [e.item[Z]])] : null;
782
827
  },
783
828
  renderItemContent(a, l) {
784
829
  const {
@@ -796,86 +841,86 @@ const VxetableRender = (VXETable, {
796
841
  "check-strictly": !0
797
842
  }, r, {
798
843
  filterable: !0,
799
- onCheckChange: (Z, t, v) => onCheckChange(Z, t, v, i),
800
- onNodeClick: (Z, t, v) => onNodeClick(Z, t, v, i),
801
- onCurrentChange: (Z, t) => onCurrentChange(Z, t, i)
844
+ onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
845
+ onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
846
+ onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
802
847
  }), null)];
803
848
  }
804
849
  });
805
850
  const useComponent = () => ({
806
- clear: (r, c, i, Z, t) => {
851
+ clear: (r, c, i, Z, e) => {
807
852
  if (r[c] = null, !isEmpty(i))
808
- for (const v in i)
809
- r[v] = null;
853
+ for (const t in i)
854
+ r[t] = null;
810
855
  Z != null && Z.clear && Z.clear({
811
- [t]: r,
856
+ [e]: r,
812
857
  field: c
813
858
  });
814
859
  },
815
860
  remote: async (r, c, i) => {
816
861
  const {
817
862
  options: Z,
818
- props: t,
819
- events: v
863
+ props: e,
864
+ events: t
820
865
  } = i, {
821
866
  fetchField: d,
822
867
  url: f,
823
868
  defaultParams: m = {},
824
- method: H = "get"
825
- } = t, b = getCookieParam(), M = Object.assign({
869
+ method: u = "get"
870
+ } = e, V = getCookieParam(), p = Object.assign({
826
871
  pageSize: 20,
827
872
  pageNum: 1,
828
- ...b,
873
+ ...V,
829
874
  ...m
830
875
  }, {
831
876
  [d || c]: r
832
877
  });
833
- if (t.loading) return;
878
+ if (e.loading) return;
834
879
  let n;
835
880
  try {
836
- Z.length = 0, t.loading = !0, n = await serviceApi[H](f, M), v != null && v.filterMethod ? Z.push(...v.filterMethod(n.list || n)) : n && (n.list ? Z.push(...n.list) : Z.push(...n));
881
+ Z.length = 0, e.loading = !0, n = await serviceApi[u](f, p), t != null && t.filterMethod ? Z.push(...t.filterMethod(n.list || n)) : n && (n.list ? Z.push(...n.list) : Z.push(...n));
837
882
  } finally {
838
- t.loading = !1;
883
+ e.loading = !1;
839
884
  }
840
885
  },
841
- selectChange: (r, c, i, Z, t) => {
842
- let v = null;
886
+ selectChange: (r, c, i, Z, e) => {
887
+ let t = null;
843
888
  const {
844
889
  datasource: d
845
- } = t, {
890
+ } = e, {
846
891
  options: f,
847
892
  props: m,
848
- optionProps: H = {},
849
- events: b
850
- } = Z, M = {
893
+ optionProps: u = {},
894
+ events: V
895
+ } = Z, p = {
851
896
  [d]: c,
852
897
  field: i
853
898
  };
854
- c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","), v = [], r.forEach((n) => {
855
- const s = f.find((C) => n === C[H == null ? void 0 : H.value]);
856
- s && !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((C) => {
857
- const g = s[m.mapField[C]], k = c[C] ? c[C].toString() : "";
858
- c[C] = k && !k.includes(g) ? `${k},${g}` : g;
859
- }), s && v.push(s);
860
- }), Object.assign(M, {
861
- options: v
862
- })) : (c[i] = m != null && m.multiple ? null : r, v = f.find((n) => r === n[H == null ? void 0 : H.value]), !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((n) => {
863
- c[n] = v ? v[m.mapField[n]] : null;
864
- }), Object.assign(M, {
865
- option: v
866
- })), d === "row" && Object.assign(M, {
867
- column: t.column
868
- }), b != null && b.change && b.change(M);
899
+ c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","), t = [], r.forEach((n) => {
900
+ const L = f.find((C) => n === C[u == null ? void 0 : u.value]);
901
+ L && !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((C) => {
902
+ const A = L[m.mapField[C]], w = c[C] ? c[C].toString() : "";
903
+ c[C] = w && !w.includes(A) ? `${w},${A}` : A;
904
+ }), L && t.push(L);
905
+ }), Object.assign(p, {
906
+ options: t
907
+ })) : (c[i] = m != null && m.multiple ? null : r, t = f.find((n) => r === n[u == null ? void 0 : u.value]), !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((n) => {
908
+ c[n] = t ? t[m.mapField[n]] : null;
909
+ }), Object.assign(p, {
910
+ option: t
911
+ })), d === "row" && Object.assign(p, {
912
+ column: e.column
913
+ }), V != null && V.change && V.change(p);
869
914
  },
870
915
  setDefaultValue: (r, c, i) => {
871
916
  var d;
872
917
  const {
873
918
  multiple: Z,
874
- defaultValue: t
875
- } = r, v = Z ? `_${i}` : i;
876
- !c[i] && t && (c[i] = t, isPlainObject(t) && Object.keys(t).forEach((m) => {
877
- c[m] = c[m] || t[m];
878
- })), !c[v] && c[i] && (c[v] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
919
+ defaultValue: e
920
+ } = r, t = Z ? `_${i}` : i;
921
+ !c[i] && e && (c[i] = e, isPlainObject(e) && Object.keys(e).forEach((m) => {
922
+ c[m] = c[m] || e[m];
923
+ })), !c[t] && c[i] && (c[t] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
879
924
  }
880
925
  }), onCheckChange = (a, l, h, o) => {
881
926
  console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
@@ -940,45 +985,45 @@ const openLink = (a) => {
940
985
  }, domSymbol = Symbol("watermark-dom");
941
986
  function useWatermark(a = ref(document.body)) {
942
987
  const l = useRafThrottle(function() {
943
- const v = unref(a);
944
- if (!v) return;
945
- const { clientHeight: d, clientWidth: f } = v;
988
+ const t = unref(a);
989
+ if (!t) return;
990
+ const { clientHeight: d, clientWidth: f } = t;
946
991
  i({ height: d, width: f });
947
992
  }), h = domSymbol.toString(), o = shallowRef(), r = () => {
948
- const v = unref(o);
993
+ const t = unref(o);
949
994
  o.value = void 0;
950
995
  const d = unref(a);
951
- d && (v && d.removeChild(v), removeResizeListener(d, l));
996
+ d && (t && d.removeChild(t), removeResizeListener(d, l));
952
997
  };
953
- function c(v, d) {
954
- const f = document.createElement("canvas"), m = 260, H = 180;
955
- Object.assign(f, { width: m, height: H });
956
- const b = f.getContext("2d");
957
- return b && (b.rotate(-20 * Math.PI / 120), b.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", b.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", b.textAlign = "left", b.textBaseline = "middle", b.fillText(v, m / 20, H)), f.toDataURL("image/png");
998
+ function c(t, d) {
999
+ const f = document.createElement("canvas"), m = 260, u = 180;
1000
+ Object.assign(f, { width: m, height: u });
1001
+ const V = f.getContext("2d");
1002
+ return V && (V.rotate(-20 * Math.PI / 120), V.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", V.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", V.textAlign = "left", V.textBaseline = "middle", V.fillText(t, m / 20, u)), f.toDataURL("image/png");
958
1003
  }
959
- function i(v = {}) {
1004
+ function i(t = {}) {
960
1005
  const d = unref(o);
961
- d && (isUndefined(v.width) || (d.style.width = `${v.width}px`), isUndefined(v.height) || (d.style.height = `${v.height}px`), isUndefined(v.str) || (d.style.background = `url(${c(
962
- v.str,
963
- v.attr
1006
+ d && (isUndefined(t.width) || (d.style.width = `${t.width}px`), isUndefined(t.height) || (d.style.height = `${t.height}px`), isUndefined(t.str) || (d.style.background = `url(${c(
1007
+ t.str,
1008
+ t.attr
964
1009
  )}) left top repeat`));
965
1010
  }
966
- const Z = (v, d) => {
1011
+ const Z = (t, d) => {
967
1012
  if (unref(o))
968
- return i({ str: v, attr: d }), h;
1013
+ return i({ str: t, attr: d }), h;
969
1014
  const f = document.createElement("div");
970
1015
  o.value = f, f.id = h, f.style.pointerEvents = "none", f.style.top = "0px", f.style.left = "0px", f.style.position = "absolute", f.style.zIndex = "100000";
971
1016
  const m = unref(a);
972
1017
  if (!m) return h;
973
- const { clientHeight: H, clientWidth: b } = m;
974
- return i({ str: v, width: b, height: H, attr: d }), m.appendChild(f), h;
1018
+ const { clientHeight: u, clientWidth: V } = m;
1019
+ return i({ str: t, width: V, height: u, attr: d }), m.appendChild(f), h;
975
1020
  };
976
- function t(v, d) {
977
- Z(v, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1021
+ function e(t, d) {
1022
+ Z(t, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
978
1023
  r();
979
1024
  });
980
1025
  }
981
- return { setWatermark: t, clear: r };
1026
+ return { setWatermark: e, clear: r };
982
1027
  }
983
1028
  const DEFAULT_EXCLUDE_KEYS = ["class", "style"], LISTENER_PREFIX = /^on[A-Z]/;
984
1029
  function entries(a) {
@@ -989,205 +1034,205 @@ function useAttrs(a = {}) {
989
1034
  if (!l) return {};
990
1035
  const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), c = o.concat(DEFAULT_EXCLUDE_KEYS);
991
1036
  return l.attrs = reactive(l.attrs), watchEffect(() => {
992
- const i = entries(l.attrs).reduce((Z, [t, v]) => (!c.includes(t) && !(h && LISTENER_PREFIX.test(t)) && (Z[t] = v), Z), {});
1037
+ const i = entries(l.attrs).reduce((Z, [e, t]) => (!c.includes(e) && !(h && LISTENER_PREFIX.test(e)) && (Z[e] = t), Z), {});
993
1038
  r.value = i;
994
1039
  }), r;
995
1040
  }
996
1041
  const useRender = () => {
997
- const a = { value: "dictCode", label: "dictName" }, l = (e, u) => {
1042
+ const a = { value: "dictCode", label: "dictName" }, l = (v, M) => {
998
1043
  var E;
999
- const V = L(u);
1000
- let p = {
1044
+ const b = H(M);
1045
+ let s = {
1001
1046
  clearable: !0,
1002
1047
  disabled: !1,
1003
1048
  showValue: !1,
1004
1049
  placeholder: null
1005
- }, A, x;
1006
- isObject(e) ? (p = Object.assign(p, e), A = e.defaultValue, x = e == null ? void 0 : e.code) : x = e;
1007
- const I = (E = storageLocal.getItem("kLov")[x]) == null ? void 0 : E.children, D = I ? I.filter((N) => N.enabled === "1") : [];
1050
+ }, y, S;
1051
+ isObject(v) ? (s = Object.assign(s, v), y = v.defaultValue, S = v == null ? void 0 : v.code) : S = v;
1052
+ const x = (E = storageLocal.getItem("kLov")[S]) == null ? void 0 : E.children, D = x ? x.filter((N) => N.enabled === "1") : [];
1008
1053
  return {
1009
1054
  name: "#select",
1010
1055
  optionProps: a,
1011
1056
  options: D,
1012
- props: p,
1013
- defaultValue: A,
1014
- events: V
1057
+ props: s,
1058
+ defaultValue: y,
1059
+ events: b
1015
1060
  };
1016
- }, h = (e, u) => {
1017
- const V = L(u);
1061
+ }, h = (v, M) => {
1062
+ const b = H(M);
1018
1063
  return {
1019
1064
  name: "#SuSelect",
1020
- optionProps: (e == null ? void 0 : e.optionProps) || { label: "label", value: "value" },
1021
- props: e == null ? void 0 : e.props,
1022
- options: (e == null ? void 0 : e.options) || [],
1023
- events: V
1065
+ optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
1066
+ props: v == null ? void 0 : v.props,
1067
+ options: (v == null ? void 0 : v.options) || [],
1068
+ events: b
1024
1069
  };
1025
- }, o = (e, u) => {
1026
- const V = {
1070
+ }, o = (v, M) => {
1071
+ const b = {
1027
1072
  optionProps: { extLabel: "userName", value: "employeeName" },
1028
1073
  props: {
1029
- attrs: { disabled: e == null ? void 0 : e.disabled },
1030
- disabled: e == null ? void 0 : e.disabled,
1031
- defaultValue: e == null ? void 0 : e.defaultValue,
1032
- mapField: e == null ? void 0 : e.mapField,
1074
+ attrs: { disabled: v == null ? void 0 : v.disabled },
1075
+ disabled: v == null ? void 0 : v.disabled,
1076
+ defaultValue: v == null ? void 0 : v.defaultValue,
1077
+ mapField: v == null ? void 0 : v.mapField,
1033
1078
  code: "SYS037",
1034
1079
  url: "/uums/employee/listEmployeeIsUser",
1035
1080
  fetchField: "employeeName"
1036
1081
  }
1037
1082
  };
1038
- return h(V, u);
1039
- }, r = (e) => {
1040
- const u = {
1083
+ return h(b, M);
1084
+ }, r = (v) => {
1085
+ const M = {
1041
1086
  optionProps: { extLabel: "userName", value: "name" },
1042
1087
  props: {
1043
1088
  code: "sys/listUsers",
1044
1089
  url: "/uums/user",
1045
1090
  fetchField: "name",
1046
- mapField: e == null ? void 0 : e.mapField
1091
+ mapField: v == null ? void 0 : v.mapField
1047
1092
  }
1048
1093
  };
1049
- return h(u);
1050
- }, c = (e, u) => {
1051
- const V = {
1094
+ return h(M);
1095
+ }, c = (v, M) => {
1096
+ const b = {
1052
1097
  label: "organizationName",
1053
- value: (e == null ? void 0 : e.field) || "organizationName"
1054
- }, p = {
1098
+ value: (v == null ? void 0 : v.field) || "organizationName"
1099
+ }, s = {
1055
1100
  mapField: {},
1056
- defaultParams: e == null ? void 0 : e.defaultParams,
1101
+ defaultParams: v == null ? void 0 : v.defaultParams,
1057
1102
  url: "/uums/cusOrganization",
1058
1103
  fetchField: "organizationName"
1059
- }, A = {
1104
+ }, y = {
1060
1105
  organizationId: "id",
1061
1106
  organizationCode: "organizationCode"
1062
1107
  };
1063
- return Object.assign(p.mapField, A, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: p, optionProps: V, options: [], methods: u };
1064
- }, i = (e, u) => {
1065
- const V = {
1108
+ return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1109
+ }, i = (v, M) => {
1110
+ const b = {
1066
1111
  label: "orgName",
1067
- value: (e == null ? void 0 : e.field) || "orgName"
1068
- }, p = {
1112
+ value: (v == null ? void 0 : v.field) || "orgName"
1113
+ }, s = {
1069
1114
  mapField: {},
1070
- defaultParams: e == null ? void 0 : e.defaultParams,
1115
+ defaultParams: v == null ? void 0 : v.defaultParams,
1071
1116
  url: "/uums/org",
1072
1117
  fetchField: "orgName"
1073
- }, A = { orgId: "id", orgCode: "orgCode" };
1074
- return Object.assign(p.mapField, A, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: p, optionProps: V, options: [], methods: u };
1075
- }, Z = (e, u) => {
1076
- const V = Object.assign({ disabled: !1 }, e), p = V == null ? void 0 : V.defaultValue;
1118
+ }, y = { orgId: "id", orgCode: "orgCode" };
1119
+ return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1120
+ }, Z = (v, M) => {
1121
+ const b = Object.assign({ disabled: !1 }, v), s = b == null ? void 0 : b.defaultValue;
1077
1122
  return {
1078
1123
  name: "VxeInput",
1079
- props: V,
1080
- defaultValue: p,
1081
- events: L(u)
1124
+ props: b,
1125
+ defaultValue: s,
1126
+ events: H(M)
1082
1127
  };
1083
- }, t = (e, u) => {
1084
- const V = Object.assign({ disabled: !1, rows: 3 }, e), p = V == null ? void 0 : V.defaultValue;
1128
+ }, e = (v, M) => {
1129
+ const b = Object.assign({ disabled: !1, rows: 3 }, v), s = b == null ? void 0 : b.defaultValue;
1085
1130
  return {
1086
1131
  name: "VxeTextarea",
1087
- props: V,
1088
- defaultValue: p,
1089
- events: L(u)
1132
+ props: b,
1133
+ defaultValue: s,
1134
+ events: H(M)
1090
1135
  };
1091
- }, v = (e, u) => {
1092
- const V = "VxeCheckbox", { defaultValue: p, options: A, props: x } = f(e);
1093
- return { name: V, defaultValue: p, options: A, props: x, events: L(u) };
1094
- }, d = (e, u) => {
1095
- const V = "VxeRadio", { defaultValue: p, options: A, props: x } = f(e);
1096
- return { name: V, defaultValue: p, options: A, props: x, events: L(u) };
1097
- }, f = (e) => {
1098
- var I;
1099
- let u = { disabled: !1 }, V;
1100
- const p = storageLocal.getItem("kLov");
1101
- let A = "";
1102
- isObject(e) ? (V = e.defaultValue, A = e.code, u = Object.assign(u, e || {})) : isString(e) && (A = e);
1103
- const x = A ? (I = p[A]) == null ? void 0 : I.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1104
- return { props: u, defaultValue: V, options: x };
1105
- }, m = (e, u) => {
1106
- const V = L(u);
1136
+ }, t = (v, M) => {
1137
+ const b = "VxeCheckbox", { defaultValue: s, options: y, props: S } = f(v);
1138
+ return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
1139
+ }, d = (v, M) => {
1140
+ const b = "VxeRadio", { defaultValue: s, options: y, props: S } = f(v);
1141
+ return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
1142
+ }, f = (v) => {
1143
+ var x;
1144
+ let M = { disabled: !1 }, b;
1145
+ const s = storageLocal.getItem("kLov");
1146
+ let y = "";
1147
+ isObject(v) ? (b = v.defaultValue, y = v.code, M = Object.assign(M, v || {})) : isString(v) && (y = v);
1148
+ const S = y ? (x = s[y]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1149
+ return { props: M, defaultValue: b, options: S };
1150
+ }, m = (v, M) => {
1151
+ const b = H(M);
1107
1152
  return {
1108
1153
  name: "VxeInput",
1109
1154
  props: Object.assign(
1110
1155
  { type: "number", clearable: !0, min: 0, controls: !1 },
1111
- e || {}
1156
+ v || {}
1112
1157
  ),
1113
- defaultValue: e == null ? void 0 : e.defaultValue,
1114
- events: V
1158
+ defaultValue: v == null ? void 0 : v.defaultValue,
1159
+ events: b
1115
1160
  };
1116
- }, H = (e, u) => {
1117
- const V = L(u), p = "yyyy-MM-dd HH:mm:ss", A = e == null ? void 0 : e.defaultValue;
1118
- return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: p, clearable: !0 }, e || {}), defaultValue: A, events: V };
1119
- }, b = (e, u) => {
1120
- const V = L(u);
1121
- return { name: "#lov", props: Object.assign({}, e || {}), events: V };
1122
- }, M = (e, u) => {
1123
- const V = L(u), p = (e == null ? void 0 : e.optionProps) || {
1161
+ }, u = (v, M) => {
1162
+ const b = H(M), s = "yyyy-MM-dd HH:mm:ss", y = v == null ? void 0 : v.defaultValue;
1163
+ return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: y, events: b };
1164
+ }, V = (v, M) => {
1165
+ const b = H(M);
1166
+ return { name: "#lov", props: Object.assign({}, v || {}), events: b };
1167
+ }, p = (v, M) => {
1168
+ const b = H(M), s = (v == null ? void 0 : v.optionProps) || {
1124
1169
  label: "label",
1125
1170
  value: "value"
1126
- }, A = Object.assign(
1171
+ }, y = Object.assign(
1127
1172
  { clearable: !0, disabled: !1, showValue: !1 },
1128
- e || {}
1173
+ v || {}
1129
1174
  );
1130
1175
  return console.log("itemRender"), {
1131
1176
  name: "#select",
1132
- optionProps: p,
1133
- options: (e == null ? void 0 : e.options) || [],
1134
- props: A,
1135
- events: V
1177
+ optionProps: s,
1178
+ options: (v == null ? void 0 : v.options) || [],
1179
+ props: y,
1180
+ events: b
1136
1181
  };
1137
- }, n = (e, u) => {
1138
- let V = {
1182
+ }, n = (v, M) => {
1183
+ let b = {
1139
1184
  openLabel: "是",
1140
1185
  closeLabel: "否",
1141
1186
  openValue: "Y",
1142
1187
  closeValue: "N"
1143
- }, p = "Y";
1144
- isObject(e) && !isFunction(e) ? (V = Object.assign(V, e || {}), p = e.defaultValue || p) : !isEmpty(e) && isString(e) && (p = e, V = Object.assign(V, { defaultValue: p }));
1145
- const A = isFunction(e) ? L(e) : L(u);
1146
- return { name: "VxeSwitch", props: V, defaultValue: p, events: A };
1147
- }, s = (e, u) => ({ name: "#tag", props: { code: e, tagMap: u } }), C = (e, u) => {
1148
- const V = {
1188
+ }, s = "Y";
1189
+ isObject(v) && !isFunction(v) ? (b = Object.assign(b, v || {}), s = v.defaultValue || s) : !isEmpty(v) && isString(v) && (s = v, b = Object.assign(b, { defaultValue: s }));
1190
+ const y = isFunction(v) ? H(v) : H(M);
1191
+ return { name: "VxeSwitch", props: b, defaultValue: s, events: y };
1192
+ }, L = (v, M) => ({ name: "#tag", props: { code: v, tagMap: M } }), C = (v, M) => {
1193
+ const b = {
1149
1194
  openLabel: "启用",
1150
1195
  closeLabel: "禁用",
1151
1196
  openValue: "1",
1152
1197
  closeValue: "0",
1153
1198
  defaultValue: "1"
1154
1199
  };
1155
- !isFunction(e) && isObject(e) && Object.assign(V, e);
1156
- const p = isFunction(e) ? e : u;
1157
- return n(V, p);
1158
- }, g = () => ({ name: "#iconSelect" }), k = (e = [], u = {}, V) => ({ name: "#treeSelect", sourceData: e, props: u, events: V }), L = (e) => {
1159
- let u = {};
1160
- return isObject(e) && !isFunction(e) ? u = {
1161
- change: (e == null ? void 0 : e.change) || y,
1162
- blur: (e == null ? void 0 : e.blur) || y,
1163
- focus: (e == null ? void 0 : e.focus) || y,
1164
- input: (e == null ? void 0 : e.input) || y,
1165
- clear: (e == null ? void 0 : e.clear) || y,
1166
- filterMethod: e == null ? void 0 : e.filterMethod
1167
- } : e && (u = { change: e }), u;
1200
+ !isFunction(v) && isObject(v) && Object.assign(b, v);
1201
+ const s = isFunction(v) ? v : M;
1202
+ return n(b, s);
1203
+ }, A = () => ({ name: "#iconSelect" }), w = (v = [], M = {}, b) => ({ name: "#treeSelect", sourceData: v, props: M, events: b }), H = (v) => {
1204
+ let M = {};
1205
+ return isObject(v) && !isFunction(v) ? M = {
1206
+ change: (v == null ? void 0 : v.change) || I,
1207
+ blur: (v == null ? void 0 : v.blur) || I,
1208
+ focus: (v == null ? void 0 : v.focus) || I,
1209
+ input: (v == null ? void 0 : v.input) || I,
1210
+ clear: (v == null ? void 0 : v.clear) || I,
1211
+ filterMethod: v == null ? void 0 : v.filterMethod
1212
+ } : v && (M = { change: v }), M;
1168
1213
  };
1169
- function y() {
1214
+ function I() {
1170
1215
  }
1171
1216
  return {
1172
1217
  renderDict: l,
1173
1218
  renderSelect: h,
1174
1219
  renderInput: Z,
1175
- renderTextarea: t,
1176
- renderCheckBox: v,
1220
+ renderTextarea: e,
1221
+ renderCheckBox: t,
1177
1222
  renderRadio: d,
1178
1223
  renderUser: o,
1179
1224
  renderSysUser: r,
1180
1225
  renderInvOrg: c,
1181
1226
  renderBU: i,
1182
1227
  renderNumber: m,
1183
- renderLov: b,
1184
- renderSelectLocal: M,
1185
- renderDate: H,
1228
+ renderLov: V,
1229
+ renderSelectLocal: p,
1230
+ renderDate: u,
1186
1231
  renderSwitch: n,
1187
- renderCellTag: s,
1232
+ renderCellTag: L,
1188
1233
  renderEnabled: C,
1189
- renderIconSelect: g,
1190
- renderTreeSelect: k
1234
+ renderIconSelect: A,
1235
+ renderTreeSelect: w
1191
1236
  };
1192
1237
  }, useGlobal = () => {
1193
1238
  const a = getCurrentInstance();
@@ -1255,7 +1300,7 @@ const deviceDetection = () => {
1255
1300
  var i, Z;
1256
1301
  o.title = o.title || `message.${o.field}`, o.span = o.span || h;
1257
1302
  let r = !1;
1258
- l === "detail" ? r = !0 : r = o.disabled || ((Z = (i = o.itemRender) == null ? void 0 : i.props) == null ? void 0 : Z.disabled);
1303
+ l === "detail" ? (r = !0, o.placeholder = null) : r = o.disabled === !1 ? o.disabled : o.disabled || ((Z = (i = o.itemRender) == null ? void 0 : i.props) == null ? void 0 : Z.disabled);
1259
1304
  let c = {
1260
1305
  name: "VxeInput",
1261
1306
  props: { disabled: r, placeholder: r ? "" : o.placeholder }
@@ -1288,22 +1333,22 @@ const deviceDetection = () => {
1288
1333
  events: null
1289
1334
  }
1290
1335
  }, formatGridItems = (a, l) => {
1291
- const h = a, o = h.length, r = o > 2 && h.some((v, d) => d < 3 && (v.span > 6 || getDateRange(v))), c = r || o > 3, i = {
1336
+ const h = a, o = h.length, r = o > 2 && h.some((t, d) => d < 3 && (t.span > 6 || getDateRange(t))), c = r || o > 3, i = {
1292
1337
  collapseTags: !0,
1293
1338
  collapseTagsTooltip: !0,
1294
1339
  multiple: !0
1295
- }, Z = h.map((v, d) => {
1296
- var f, m, H;
1297
- return v.folding = r ? c && d > 1 : c && d > 2, v.span = getDateRange(v) ? 12 : v.span || 6, v.code && !v.itemRender && (v.itemRender = renderHook.renderDict(v.code)), v.itemRender = v.itemRender || { name: "VxeInput" }, v.resetValue = v.itemRender.defaultValue, v.title = v.title || `message.${v.field}`, (v.multiple || (m = (f = v.itemRender) == null ? void 0 : f.props) != null && m.multiple) && (v.itemRender.props = Object.assign(
1340
+ }, Z = h.map((t, d) => {
1341
+ var f, m, u;
1342
+ return t.folding = r ? c && d > 1 : c && d > 2, t.span = getDateRange(t) ? 12 : t.span || 6, t.code && !t.itemRender && (t.itemRender = renderHook.renderDict(t.code)), t.itemRender = t.itemRender || { name: "VxeInput" }, t.resetValue = t.itemRender.defaultValue, t.title = t.title || `message.${t.field}`, (t.multiple || (m = (f = t.itemRender) == null ? void 0 : f.props) != null && m.multiple) && (t.itemRender.props = Object.assign(
1298
1343
  i,
1299
- ((H = v.itemRender) == null ? void 0 : H.props) || {}
1300
- )), v;
1301
- }), t = clone(formSearchButtons, !0);
1302
- if (t.collapseNode = c, l && t.itemRender.options.length < 3 && (t.itemRender.options.push(l), t.itemRender.events = l.events), c) {
1303
- const v = r ? 2 : 3;
1304
- Z.splice(v, 0, t);
1344
+ ((u = t.itemRender) == null ? void 0 : u.props) || {}
1345
+ )), t;
1346
+ }), e = clone(formSearchButtons, !0);
1347
+ if (e.collapseNode = c, l && e.itemRender.options.length < 3 && (e.itemRender.options.push(l), e.itemRender.events = l.events), c) {
1348
+ const t = r ? 2 : 3;
1349
+ Z.splice(t, 0, e);
1305
1350
  } else
1306
- Z.push(t);
1351
+ Z.push(e);
1307
1352
  return Z;
1308
1353
  }, getDateRange = (a) => {
1309
1354
  var l, h, o, r, c;
@@ -1397,11 +1442,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1397
1442
  "Content-Type": "application/json",
1398
1443
  "X-Requested-With": "XMLHttpRequest"
1399
1444
  }
1400
- }, w = class w {
1445
+ }, g = class g {
1401
1446
  constructor() {
1402
- S(this, "router");
1403
- S(this, "baseUrl", null);
1404
- S(this, "getNetworkError", (l) => l ? {
1447
+ k(this, "router");
1448
+ k(this, "baseUrl", null);
1449
+ k(this, "getNetworkError", (l) => l ? {
1405
1450
  400: "错误的请求",
1406
1451
  401: "服务未授权,请重新登录",
1407
1452
  403: "拒绝访问",
@@ -1424,29 +1469,25 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1424
1469
  /** 重连原始请求 */
1425
1470
  static retryOriginalRequest(l) {
1426
1471
  return new Promise((h) => {
1427
- w.requests.push((o) => {
1472
+ g.requests.push((o) => {
1428
1473
  l.headers.Authorization = "Bearer " + o, h(l);
1429
1474
  });
1430
1475
  });
1431
1476
  }
1432
1477
  // 请求拦截
1433
1478
  httpInterceptorsRequest() {
1434
- w.axiosInstance.interceptors.request.use(
1435
- (l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) : w.initConfig.beforeRequestCallback ? (w.initConfig.beforeRequestCallback(l), l) : ["/refreshToken", "/login"].some((o) => l.url.indexOf(o) > -1) ? l : new Promise((o) => {
1479
+ g.axiosInstance.interceptors.request.use(
1480
+ (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((o) => l.url.indexOf(o) > -1) ? l : new Promise((o) => {
1436
1481
  const r = cookies.get(kTOKENKEY);
1437
1482
  if (r) {
1438
1483
  const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1439
- if (c.expires - i <= 0) {
1440
- debugger;
1441
- w.isRefreshing || (w.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1442
- refreshToken: c.refreshToken
1443
- }).then((t) => {
1444
- this.setToken(t), l.headers.Authorization = "Bearer " + t.access_token, w.requests.forEach((v) => v(t.access_token)), w.requests = [];
1445
- }).finally(() => {
1446
- w.isRefreshing = !1;
1447
- })), o(w.retryOriginalRequest(l));
1448
- } else
1449
- l.headers.Authorization = "Bearer " + c.accessToken, o(l);
1484
+ c.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1485
+ refreshToken: c.refreshToken
1486
+ }).then((e) => {
1487
+ this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((t) => t(e.access_token)), g.requests = [];
1488
+ }).finally(() => {
1489
+ g.isRefreshing = !1;
1490
+ })), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, o(l));
1450
1491
  } else {
1451
1492
  const c = cookies.get("kCookies_token");
1452
1493
  c && (l.headers["X-Token"] = c), o(l);
@@ -1465,10 +1506,10 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1465
1506
  }
1466
1507
  // 响应拦截
1467
1508
  httpInterceptorsResponse() {
1468
- w.axiosInstance.interceptors.response.use(
1509
+ g.axiosInstance.interceptors.response.use(
1469
1510
  (h) => {
1470
1511
  const o = h.config;
1471
- return has(o, "loading") && isRef(o.loading) && (o.loading.value = !1), NProgress.done(), typeof o.beforeResponseCallback == "function" ? (o.beforeResponseCallback(h), h.data) : (w.initConfig.beforeResponseCallback && w.initConfig.beforeResponseCallback(h), h.data);
1512
+ return has(o, "loading") && isRef(o.loading) && (o.loading.value = !1), NProgress.done(), typeof o.beforeResponseCallback == "function" ? (o.beforeResponseCallback(h), h.data) : (g.initConfig.beforeResponseCallback && g.initConfig.beforeResponseCallback(h), h.data);
1472
1513
  },
1473
1514
  (h) => {
1474
1515
  var r;
@@ -1492,28 +1533,28 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1492
1533
  ...r
1493
1534
  });
1494
1535
  return new Promise((i, Z) => {
1495
- w.axiosInstance.request(c).then((t) => {
1496
- if (t && (t == null ? void 0 : t.code) === "0")
1497
- i(t.data);
1498
- else if (t.code === "500")
1499
- errorMessage(t.msg, { duration: 8e3 }), c.method === "get" ? i(t) : Z(t.msg);
1500
- else if ((t == null ? void 0 : t.code) !== "-1")
1501
- i(t);
1536
+ g.axiosInstance.request(c).then((e) => {
1537
+ if (e && (e == null ? void 0 : e.code) === "0")
1538
+ i(e.data);
1539
+ else if (e.code === "500")
1540
+ errorMessage(e.msg, { duration: 8e3 }), c.method === "get" ? i(e) : Z(e.msg);
1541
+ else if ((e == null ? void 0 : e.code) !== "-1")
1542
+ i(e);
1502
1543
  else {
1503
- const v = (t == null ? void 0 : t.msg) || "服务异常";
1504
- errorMessage(v, { duration: 8e3 }), Z(v);
1544
+ const t = (e == null ? void 0 : e.msg) || "服务异常";
1545
+ errorMessage(t, { duration: 8e3 }), Z(t);
1505
1546
  }
1506
- }).catch((t) => {
1507
- var v, d, f;
1508
- if (t != null && t.code) {
1509
- if (((v = t == null ? void 0 : t.response) == null ? void 0 : v.status) === 401)
1547
+ }).catch((e) => {
1548
+ var t, d, f;
1549
+ if (e != null && e.code) {
1550
+ if (((t = e == null ? void 0 : e.response) == null ? void 0 : t.status) === 401)
1510
1551
  return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
1511
1552
  errorMessage(
1512
- this.getNetworkError((f = t == null ? void 0 : t.response) == null ? void 0 : f.status) || (t == null ? void 0 : t.message),
1553
+ this.getNetworkError((f = e == null ? void 0 : e.response) == null ? void 0 : f.status) || (e == null ? void 0 : e.message),
1513
1554
  { duration: 8e3 }
1514
1555
  );
1515
1556
  }
1516
- t.config.method === "get" ? i(t) : Z(t);
1557
+ e.config.method === "get" ? i(e) : Z(e);
1517
1558
  });
1518
1559
  });
1519
1560
  }
@@ -1540,11 +1581,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1540
1581
  }
1541
1582
  };
1542
1583
  /** token过期后,暂存待执行的请求 */
1543
- S(w, "requests", []), /** 防止重复刷新token */
1544
- S(w, "isRefreshing", !1), // 初始化配置对象
1545
- S(w, "initConfig", {}), // 保存当前Axios实例对象
1546
- S(w, "axiosInstance", Axios.create(defaultConfig));
1547
- let SuHttp = w;
1584
+ k(g, "requests", []), /** 防止重复刷新token */
1585
+ k(g, "isRefreshing", !1), // 初始化配置对象
1586
+ k(g, "initConfig", {}), // 保存当前Axios实例对象
1587
+ k(g, "axiosInstance", Axios.create(defaultConfig));
1588
+ let SuHttp = g;
1548
1589
  const http = new SuHttp(), lunarCalendar = {
1549
1590
  /**
1550
1591
  * 农历1900-2100的润大小信息表
@@ -2346,55 +2387,55 @@ const http = new SuHttp(), lunarCalendar = {
2346
2387
  return -1;
2347
2388
  let i;
2348
2389
  o ? i = new Date(o, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2349
- let Z, t = 0, v = 0;
2390
+ let Z, e = 0, t = 0;
2350
2391
  o = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2351
2392
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2352
2393
  for (Z = 1900; Z < 2101 && d > 0; Z++)
2353
- v = this.lYearDays(Z), d -= v;
2354
- d < 0 && (d += v, Z--);
2394
+ t = this.lYearDays(Z), d -= t;
2395
+ d < 0 && (d += t, Z--);
2355
2396
  const f = /* @__PURE__ */ new Date();
2356
2397
  let m = !1;
2357
2398
  f.getFullYear() === o && f.getMonth() + 1 === r && f.getDate() === c && (m = !0);
2358
- let H = i.getDay();
2359
- const b = this.nStr1[H];
2360
- H === 0 && (H = 7);
2361
- const M = Z;
2362
- t = this.leapMonth(Z);
2399
+ let u = i.getDay();
2400
+ const V = this.nStr1[u];
2401
+ u === 0 && (u = 7);
2402
+ const p = Z;
2403
+ e = this.leapMonth(Z);
2363
2404
  let n = !1;
2364
2405
  for (Z = 1; Z < 13 && d > 0; Z++)
2365
- t > 0 && Z === t + 1 && n === !1 ? (--Z, n = !0, v = this.leapDays(M)) : v = this.monthDays(M, Z), n === !0 && Z === t + 1 && (n = !1), d -= v;
2366
- d === 0 && t > 0 && Z === t + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += v, --Z);
2367
- const s = Z, C = d + 1, g = r - 1, k = this.toGanZhiYear(M), L = this.getTerm(o, r * 2 - 1), y = this.getTerm(o, r * 2);
2368
- let e = this.toGanZhi((o - 1900) * 12 + r + 11);
2369
- c >= L && (e = this.toGanZhi((o - 1900) * 12 + r + 12));
2370
- let u = !1, V;
2371
- L === c && (u = !0, V = this.solarTerm[r * 2 - 2]), y === c && (u = !0, V = this.solarTerm[r * 2 - 1]);
2372
- const p = Date.UTC(o, g, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, A = this.toGanZhi(p + c - 1), x = this.toAstro(r, c), I = o + "-" + r + "-" + c, D = M + "-" + s + "-" + C, E = this.festival, N = this.lFestival, R = r + "-" + c;
2373
- let F = s + "-" + C;
2374
- return s === 12 && C === 29 && this.monthDays(M, s) === 29 && (F = "12-30"), {
2375
- date: I,
2406
+ e > 0 && Z === e + 1 && n === !1 ? (--Z, n = !0, t = this.leapDays(p)) : t = this.monthDays(p, Z), n === !0 && Z === e + 1 && (n = !1), d -= t;
2407
+ d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += t, --Z);
2408
+ const L = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), H = this.getTerm(o, r * 2 - 1), I = this.getTerm(o, r * 2);
2409
+ let v = this.toGanZhi((o - 1900) * 12 + r + 11);
2410
+ c >= H && (v = this.toGanZhi((o - 1900) * 12 + r + 12));
2411
+ let M = !1, b;
2412
+ H === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
2413
+ const s = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, y = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = o + "-" + r + "-" + c, D = p + "-" + L + "-" + C, E = this.festival, N = this.lFestival, R = r + "-" + c;
2414
+ let F = L + "-" + C;
2415
+ return L === 12 && C === 29 && this.monthDays(p, L) === 29 && (F = "12-30"), {
2416
+ date: x,
2376
2417
  lunarDate: D,
2377
2418
  festival: E[R] ? E[R].title : null,
2378
2419
  lunarFestival: N[F] ? N[F].title : null,
2379
- lYear: M,
2380
- lMonth: s,
2420
+ lYear: p,
2421
+ lMonth: L,
2381
2422
  lDay: C,
2382
- Animal: this.getAnimal(M),
2383
- IMonthCn: (n ? "闰" : "") + this.toChinaMonth(s),
2423
+ Animal: this.getAnimal(p),
2424
+ IMonthCn: (n ? "闰" : "") + this.toChinaMonth(L),
2384
2425
  IDayCn: this.toChinaDay(C),
2385
2426
  cYear: o,
2386
2427
  cMonth: r,
2387
2428
  cDay: c,
2388
- gzYear: k,
2389
- gzMonth: e,
2390
- gzDay: A,
2429
+ gzYear: w,
2430
+ gzMonth: v,
2431
+ gzDay: y,
2391
2432
  isToday: m,
2392
2433
  isLeap: n,
2393
- nWeek: H,
2394
- ncWeek: "星期" + b,
2395
- isTerm: u,
2396
- Term: V,
2397
- astro: x
2434
+ nWeek: u,
2435
+ ncWeek: "星期" + V,
2436
+ isTerm: M,
2437
+ Term: b,
2438
+ astro: S
2398
2439
  };
2399
2440
  },
2400
2441
  /**
@@ -2416,15 +2457,15 @@ const http = new SuHttp(), lunarCalendar = {
2416
2457
  let i = c;
2417
2458
  if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
2418
2459
  return -1;
2419
- let Z = 0, t;
2420
- for (t = 1900; t < a; t++)
2421
- Z += this.lYearDays(t);
2422
- let v = 0, d = !1;
2423
- for (t = 1; t < l; t++)
2424
- v = this.leapMonth(a), d || v <= t && v > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, t);
2460
+ let Z = 0, e;
2461
+ for (e = 1900; e < a; e++)
2462
+ Z += this.lYearDays(e);
2463
+ let t = 0, d = !1;
2464
+ for (e = 1; e < l; e++)
2465
+ t = this.leapMonth(a), d || t <= e && t > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2425
2466
  o && (Z += c);
2426
- const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + h - 31) * 864e5 + f), H = m.getUTCFullYear(), b = m.getUTCMonth() + 1, M = m.getUTCDate();
2427
- return this.solar2lunar(H, b, M);
2467
+ const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + h - 31) * 864e5 + f), u = m.getUTCFullYear(), V = m.getUTCMonth() + 1, p = m.getUTCDate();
2468
+ return this.solar2lunar(u, V, p);
2428
2469
  }
2429
2470
  }, dict = storageLocal.getItem("kLov"), formats = {
2430
2471
  formatDate: {
@@ -2491,7 +2532,7 @@ const http = new SuHttp(), lunarCalendar = {
2491
2532
  const [h, o] = l;
2492
2533
  let r;
2493
2534
  return (c = a[h]) == null || c.split(",").forEach((i) => {
2494
- const Z = o.find((t) => t.value === i);
2535
+ const Z = o.find((e) => e.value === i);
2495
2536
  r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
2496
2537
  }), r;
2497
2538
  }