@utogether/utils 3.0.0-beta.44 → 3.0.0-beta.46

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 j = Object.defineProperty;
2
2
  var U = (l, a, o) => a in l ? j(l, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : l[a] = o;
3
- var x = (l, a, o) => U(l, typeof a != "symbol" ? a + "" : a, o);
3
+ var S = (l, a, o) => U(l, typeof a != "symbol" ? a + "" : a, 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";
@@ -12,9 +12,9 @@ import NProgress from "nprogress";
12
12
  import { default as G } from "nprogress";
13
13
  class sessionStorageProxy {
14
14
  constructor(a) {
15
- x(this, "storage");
16
- x(this, "prefix");
17
- x(this, "addPrefix", (a) => {
15
+ S(this, "storage");
16
+ S(this, "prefix");
17
+ S(this, "addPrefix", (a) => {
18
18
  this.prefix = a;
19
19
  });
20
20
  this.storage = a;
@@ -46,7 +46,7 @@ class localStorageProxy extends sessionStorageProxy {
46
46
  }
47
47
  class localforageProxy {
48
48
  constructor() {
49
- x(this, "storage");
49
+ S(this, "storage");
50
50
  localforage.config({
51
51
  name: "uapp",
52
52
  storeName: "udb"
@@ -140,8 +140,8 @@ function init(l, a) {
140
140
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
141
141
  class Cookies {
142
142
  constructor() {
143
- x(this, "prefix", null);
144
- x(this, "addPrefix", (a) => {
143
+ S(this, "prefix", null);
144
+ S(this, "addPrefix", (a) => {
145
145
  this.prefix = a;
146
146
  });
147
147
  }
@@ -206,45 +206,45 @@ const VxetableRender = (VXETable, {
206
206
  } = Z, {
207
207
  loading: f = !1,
208
208
  multiple: n
209
- } = i, m = useComponent(), b = n ? `_${r.field}` : r.field;
209
+ } = i, m = useComponent(), p = n ? `_${r.field}` : r.field;
210
210
  m.setDefaultValue(i, h, r.field);
211
- function M(y) {
212
- m.remote(y, r.field, l);
211
+ function u(V) {
212
+ m.remote(V, r.field, l);
213
213
  }
214
- function V(y) {
215
- m.selectChange(y, h, r.field, l, {
214
+ function M(V) {
215
+ m.selectChange(V, h, r.field, l, {
216
216
  column: r,
217
217
  datasource: "row"
218
218
  });
219
219
  }
220
- function p(y) {
221
- c != null && c.input && c.input(a, y);
220
+ function C(V) {
221
+ c != null && c.input && c.input(a, V);
222
222
  }
223
- function L() {
223
+ function y() {
224
224
  m.clear(h, r.field, l, "row");
225
225
  }
226
- function k() {
227
- !e.length && M(""), c != null && c.focus && c.focus(a, r.field);
226
+ function w() {
227
+ !e.length && u(""), c != null && c.focus && c.focus(a, r.field);
228
228
  }
229
229
  return [createVNode(resolveComponent("el-select"), mergeProps({
230
- modelValue: h[b],
231
- "onUpdate:modelValue": (y) => h[b] = y,
230
+ modelValue: h[p],
231
+ "onUpdate:modelValue": (V) => h[p] = V,
232
232
  filterable: !0,
233
233
  remote: !0,
234
234
  clearable: !0,
235
235
  placeholder: "请录入关键字搜索",
236
236
  style: "width: 100%",
237
- "remote-method": M,
237
+ "remote-method": u,
238
238
  loading: f
239
239
  }, i, {
240
- onFocus: () => k(),
241
- onChange: (y) => V(y),
242
- onClear: () => L(),
243
- onInput: (y) => p(y)
244
- }), _isSlot(o = e.map((y) => createVNode(resolveComponent("el-option"), {
245
- key: y[d],
246
- label: y[t],
247
- value: y[d]
240
+ onFocus: () => w(),
241
+ onChange: (V) => M(V),
242
+ onClear: () => y(),
243
+ onInput: (V) => C(V)
244
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
245
+ key: V[d],
246
+ label: V[t],
247
+ value: V[d]
248
248
  }, null))) ? o : {
249
249
  default: () => [o]
250
250
  })];
@@ -264,47 +264,46 @@ const VxetableRender = (VXETable, {
264
264
  value: d = "value"
265
265
  } = Z, {
266
266
  loading: f = !1,
267
- multiple: n,
268
- mapField: m
269
- } = i, b = useComponent(), M = n ? `_${r.field}` : r.field;
270
- b.setDefaultValue(i, h, r.field);
271
- function V(C) {
272
- b.remote(C, r.field, l);
267
+ multiple: n
268
+ } = i, m = useComponent(), p = n ? `_${r.field}` : r.field;
269
+ m.setDefaultValue(i, h, r.field);
270
+ function u(V) {
271
+ m.remote(V, r.field, l);
273
272
  }
274
- function p(C) {
275
- b.selectChange(C, h, r.field, l, {
273
+ function M(V) {
274
+ m.selectChange(V, h, r.field, l, {
276
275
  column: r,
277
276
  datasource: "row"
278
277
  });
279
278
  }
280
- function L(C) {
281
- c != null && c.input && c.input(a, C);
282
- }
283
- function k() {
284
- b.clear(h, r.field, m, c, "row");
279
+ function C(V) {
280
+ c != null && c.input && c.input(a, V);
285
281
  }
286
282
  function y() {
287
- !e.length && V(""), c != null && c.focus && c.focus(a, r.field);
283
+ m.clear(h, r.field, l, "row");
284
+ }
285
+ function w() {
286
+ !e.length && u(""), c != null && c.focus && c.focus(a, r.field);
288
287
  }
289
288
  return [createVNode(resolveComponent("el-select"), mergeProps({
290
- modelValue: h[M],
291
- "onUpdate:modelValue": (C) => h[M] = C,
289
+ modelValue: h[p],
290
+ "onUpdate:modelValue": (V) => h[p] = V,
292
291
  filterable: !0,
293
292
  remote: !0,
294
293
  clearable: !0,
295
294
  placeholder: "请录入关键字搜索",
296
295
  style: "width: 100%",
297
- "remote-method": V,
296
+ "remote-method": u,
298
297
  loading: f
299
298
  }, i, {
300
- onFocus: () => y(),
301
- onChange: (C) => p(C),
302
- onClear: () => k(),
303
- onInput: (C) => L(C)
304
- }), _isSlot(o = e.map((C) => createVNode(resolveComponent("el-option"), {
305
- key: C[d],
306
- label: C[t],
307
- value: C[d]
299
+ onFocus: () => w(),
300
+ onChange: (V) => M(V),
301
+ onClear: () => y(),
302
+ onInput: (V) => C(V)
303
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
304
+ key: V[d],
305
+ label: V[t],
306
+ value: V[d]
308
307
  }, null))) ? o : {
309
308
  default: () => [o]
310
309
  })];
@@ -337,47 +336,46 @@ const VxetableRender = (VXETable, {
337
336
  label: t = "label",
338
337
  value: d = "value"
339
338
  } = Z, {
340
- mapField: f,
341
- multiple: n,
342
- loading: m = !1
343
- } = i, b = useComponent(), M = n ? `_${r}` : r;
344
- b.setDefaultValue(i, h, r);
345
- async function V(C) {
346
- b.remote(C, r, l);
339
+ multiple: f,
340
+ loading: n = !1
341
+ } = i, m = useComponent(), p = f ? `_${r}` : r;
342
+ m.setDefaultValue(i, h, r);
343
+ async function u(V) {
344
+ m.remote(V, r, l);
347
345
  }
348
- function p(C) {
349
- b.selectChange(C, h, r, l, {
346
+ function M(V) {
347
+ m.selectChange(V, h, r, l, {
350
348
  datasource: "data"
351
349
  });
352
350
  }
353
- function L(C) {
354
- c != null && c.input && c.input(a, C);
355
- }
356
- function k() {
357
- b.clear(h, r, f, c, "data");
351
+ function C(V) {
352
+ c != null && c.input && c.input(a, V);
358
353
  }
359
354
  function y() {
360
- !e.length && V(""), c != null && c.focus && c.focus(a);
355
+ m.clear(h, r, l, "data");
356
+ }
357
+ function w() {
358
+ !e.length && u(""), c != null && c.focus && c.focus(a);
361
359
  }
362
360
  return [createVNode(resolveComponent("el-select"), mergeProps({
363
- modelValue: h[M],
364
- "onUpdate:modelValue": (C) => h[M] = C,
361
+ modelValue: h[p],
362
+ "onUpdate:modelValue": (V) => h[p] = V,
365
363
  filterable: !0,
366
364
  remote: !0,
367
365
  clearable: !0,
368
366
  style: "width: 100%",
369
367
  placeholder: "请录入关键字搜索",
370
- loading: m,
371
- "remote-method": V
368
+ loading: n,
369
+ "remote-method": u
372
370
  }, i, {
373
- onFocus: () => y(),
374
- onChange: (C) => p(C),
375
- onClear: () => k(),
376
- onInput: () => L()
377
- }), _isSlot(o = e.map((C) => createVNode(resolveComponent("el-option"), {
378
- key: C[d],
379
- label: C[t],
380
- value: C[d]
371
+ onFocus: () => w(),
372
+ onChange: (V) => M(V),
373
+ onClear: () => y(),
374
+ onInput: () => C()
375
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
376
+ key: V[d],
377
+ label: V[t],
378
+ value: V[d]
381
379
  }, null))) ? o : {
382
380
  default: () => [o]
383
381
  })];
@@ -433,39 +431,37 @@ const VxetableRender = (VXETable, {
433
431
  } = a, {
434
432
  options: e,
435
433
  props: i,
436
- optionProps: Z = {},
437
- events: c
434
+ optionProps: Z = {}
438
435
  } = l, {
439
- label: t = "label",
440
- value: d = "value"
436
+ label: c = "label",
437
+ value: t = "value"
441
438
  } = Z, {
442
- multiple: f,
443
- mapField: n
444
- } = i, m = useComponent(), b = f ? `_${r.field}` : r.field;
445
- m.setDefaultValue(i, h, r.field);
446
- function M(p) {
447
- m.selectChange(p, h, r.field, l, {
439
+ multiple: d
440
+ } = i, f = useComponent(), n = d ? `_${r.field}` : r.field;
441
+ f.setDefaultValue(i, h, r.field);
442
+ function m(u) {
443
+ f.selectChange(u, h, r.field, l, {
448
444
  column: r,
449
445
  datasource: "row"
450
446
  });
451
447
  }
452
- function V() {
453
- m.clear(h, r.field, n, c, "row");
448
+ function p() {
449
+ f.clear(h, r.field, l, "row");
454
450
  }
455
451
  return [createVNode(resolveComponent("el-select"), mergeProps({
456
- modelValue: h[b],
457
- "onUpdate:modelValue": (p) => h[b] = p,
452
+ modelValue: h[n],
453
+ "onUpdate:modelValue": (u) => h[n] = u,
458
454
  filterable: !0,
459
455
  clearable: !0
460
456
  }, i, {
461
457
  style: "width: 100%",
462
458
  class: "udp-select-wrapper",
463
- onChange: (p) => M(p),
464
- onClear: () => V()
465
- }), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
466
- key: p[d],
467
- label: p[t],
468
- value: p[d]
459
+ onChange: (u) => m(u),
460
+ onClear: () => p()
461
+ }), _isSlot(o = e.map((u) => createVNode(resolveComponent("el-option"), {
462
+ key: u[t],
463
+ label: u[c],
464
+ value: u[t]
469
465
  }, null))) ? o : {
470
466
  default: () => [o]
471
467
  })];
@@ -487,28 +483,28 @@ const VxetableRender = (VXETable, {
487
483
  multiple: f
488
484
  } = i, n = useComponent(), m = f ? `_${r.field}` : r.field;
489
485
  n.setDefaultValue(i, h, r.field);
490
- function b(V) {
491
- n.selectChange(V, h, r.field, l, {
486
+ function p(M) {
487
+ n.selectChange(M, h, r.field, l, {
492
488
  column: r,
493
489
  datasource: "row"
494
490
  });
495
491
  }
496
- function M() {
492
+ function u() {
497
493
  n.clear(h, r.field, l, "row");
498
494
  }
499
495
  return [createVNode(resolveComponent("el-select"), mergeProps({
500
496
  modelValue: h[m],
501
- "onUpdate:modelValue": (V) => h[m] = V,
497
+ "onUpdate:modelValue": (M) => h[m] = M,
502
498
  filterable: !0,
503
499
  clearable: !0
504
500
  }, i, {
505
501
  style: "width: 100%",
506
- onChange: (V) => b(V),
507
- onClear: () => M()
508
- }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
509
- key: V[t],
510
- label: d && V[d] ? V[t] : V[c],
511
- value: V[t]
502
+ onChange: (M) => p(M),
503
+ onClear: () => u()
504
+ }), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
505
+ key: M[t],
506
+ label: d && M[d] ? M[t] : M[c],
507
+ value: M[t]
512
508
  }, null))) ? o : {
513
509
  default: () => [o]
514
510
  })];
@@ -549,27 +545,27 @@ const VxetableRender = (VXETable, {
549
545
  multiple: f
550
546
  } = i, n = f ? `_${r}` : r;
551
547
  f && d.setDefaultValue(i, h, r);
552
- function m(M) {
553
- d.selectChange(M, h, r, l, {
548
+ function m(u) {
549
+ d.selectChange(u, h, r, l, {
554
550
  datasource: "data"
555
551
  });
556
552
  }
557
- function b() {
553
+ function p() {
558
554
  d.clear(h, r, l, "data");
559
555
  }
560
556
  return [createVNode(resolveComponent("el-select"), mergeProps({
561
557
  modelValue: h[n],
562
- "onUpdate:modelValue": (M) => h[n] = M,
558
+ "onUpdate:modelValue": (u) => h[n] = u,
563
559
  filterable: !0,
564
560
  clearable: !0,
565
561
  style: "width: 100%"
566
562
  }, i, {
567
- onChange: (M) => m(M),
568
- onClear: () => b()
569
- }), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
570
- key: M[t],
571
- label: M[c],
572
- value: M[t]
563
+ onChange: (u) => m(u),
564
+ onClear: () => p()
565
+ }), _isSlot(o = e.map((u) => createVNode(resolveComponent("el-option"), {
566
+ key: u[t],
567
+ label: u[c],
568
+ value: u[t]
573
569
  }, null))) ? o : {
574
570
  default: () => [o]
575
571
  })];
@@ -590,32 +586,32 @@ const VxetableRender = (VXETable, {
590
586
  const {
591
587
  mapField: n,
592
588
  field: m,
593
- displayName: b,
594
- multiple: M
589
+ displayName: p,
590
+ multiple: u
595
591
  } = r;
596
- if (M) {
597
- if (M) {
598
- const p = {};
599
- o[b || m] = d.reduce((L, k) => {
600
- for (const y in n)
601
- p[y] = L ? p[y] + "," + k[n[y]] : k[n[y]];
602
- return L = L ? L + "," + k[b || m] : k[b || m], L;
603
- }, ""), Object.assign(o, p);
592
+ if (u) {
593
+ if (u) {
594
+ const C = {};
595
+ o[p || m] = d.reduce((y, w) => {
596
+ for (const V in n)
597
+ C[V] = y ? C[V] + "," + w[n[V]] : w[n[V]];
598
+ return y = y ? y + "," + w[p || m] : w[p || m], y;
599
+ }, ""), Object.assign(o, C);
604
600
  }
605
601
  } else {
606
- const p = {
607
- [b || m]: d[f || b || m]
602
+ const C = {
603
+ [p || m]: d[f || p || m]
608
604
  };
609
- for (const L in n)
610
- p[L] = d[n[L]];
611
- Object.assign(o, p);
605
+ for (const y in n)
606
+ C[y] = d[n[y]];
607
+ Object.assign(o, C);
612
608
  }
613
- const V = {
609
+ const M = {
614
610
  data: o,
615
611
  options: d,
616
612
  field: m
617
613
  };
618
- e != null && e.change && e.change(V);
614
+ e != null && e.change && e.change(M);
619
615
  }
620
616
  function t() {
621
617
  i.clear(o, h, l, "data");
@@ -642,23 +638,23 @@ const VxetableRender = (VXETable, {
642
638
  mapField: f,
643
639
  field: n,
644
640
  displayName: m,
645
- multiple: b
641
+ multiple: p
646
642
  } = r;
647
- if (!b) {
648
- const V = {
643
+ if (!p) {
644
+ const M = {
649
645
  [m || n]: t[d || m || n]
650
646
  };
651
- for (const p in f)
652
- V[p] = t[f[p]];
653
- Object.assign(o, V);
647
+ for (const C in f)
648
+ M[C] = t[f[C]];
649
+ Object.assign(o, M);
654
650
  }
655
- const M = {
651
+ const u = {
656
652
  row: o,
657
653
  options: t,
658
654
  field: h.field,
659
655
  column: h
660
656
  };
661
- e != null && e.change && e.change(M);
657
+ e != null && e.change && e.change(u);
662
658
  }
663
659
  function c() {
664
660
  i.clear(o, h.field, l, "row");
@@ -686,23 +682,23 @@ const VxetableRender = (VXETable, {
686
682
  mapField: f,
687
683
  field: n,
688
684
  displayName: m,
689
- multiple: b
685
+ multiple: p
690
686
  } = r;
691
- if (!b) {
692
- const V = {
687
+ if (!p) {
688
+ const M = {
693
689
  [m || n]: t[d || m || n]
694
690
  };
695
- for (const p in f)
696
- V[p] = t[f[p]];
697
- Object.assign(o, V);
691
+ for (const C in f)
692
+ M[C] = t[f[C]];
693
+ Object.assign(o, M);
698
694
  }
699
- const M = {
695
+ const u = {
700
696
  row: o,
701
697
  options: t,
702
698
  field: h.field,
703
699
  column: h
704
700
  };
705
- e != null && e.change && e.change(M);
701
+ e != null && e.change && e.change(u);
706
702
  }
707
703
  function c() {
708
704
  i.clear(o, h.field, l, "row");
@@ -1058,18 +1054,18 @@ const VxetableRender = (VXETable, {
1058
1054
  url: f,
1059
1055
  defaultParams: n = {},
1060
1056
  method: m = "get"
1061
- } = c, b = getCookieParam(), M = Object.assign({
1057
+ } = c, p = getCookieParam(), u = Object.assign({
1062
1058
  pageSize: 20,
1063
1059
  pageNum: 1,
1064
- ...b,
1060
+ ...p,
1065
1061
  ...n
1066
1062
  }, {
1067
1063
  [d || e]: r
1068
1064
  });
1069
1065
  if (c.loading) return;
1070
- let V;
1066
+ let M;
1071
1067
  try {
1072
- Z.length = 0, c.loading = !0, V = await serviceApi[m](f, M), t != null && t.filterMethod ? Z.push(...t.filterMethod(V.list || V)) : V && (V.list ? Z.push(...V.list) : Z.push(...V));
1068
+ Z.length = 0, c.loading = !0, M = await serviceApi[m](f, u), t != null && t.filterMethod ? Z.push(...t.filterMethod(M.list || M)) : M && (M.list ? Z.push(...M.list) : Z.push(...M));
1073
1069
  } finally {
1074
1070
  c.loading = !1;
1075
1071
  }
@@ -1082,26 +1078,26 @@ const VxetableRender = (VXETable, {
1082
1078
  options: f,
1083
1079
  props: n,
1084
1080
  optionProps: m = {},
1085
- events: b
1086
- } = Z, M = {
1081
+ events: p
1082
+ } = Z, u = {
1087
1083
  [d]: e,
1088
1084
  field: i
1089
1085
  };
1090
- e[i] = null, !isEmpty(r) && (n != null && n.multiple) ? (e[i] = r.join(","), t = [], r.forEach((V) => {
1091
- const p = f.find((L) => V === L[m == null ? void 0 : m.value]);
1092
- p && !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((L) => {
1093
- const k = p[n.mapField[L]], y = e[L] ? e[L].toString() : "";
1094
- e[L] = y && !y.includes(k) ? `${y},${k}` : k;
1095
- }), p && t.push(p);
1096
- }), Object.assign(M, {
1086
+ e[i] = null, !isEmpty(r) && (n != null && n.multiple) ? (e[i] = r.join(","), t = [], r.forEach((M) => {
1087
+ const C = f.find((y) => M === y[m == null ? void 0 : m.value]);
1088
+ C && !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((y) => {
1089
+ const w = C[n.mapField[y]], V = e[y] ? e[y].toString() : "";
1090
+ e[y] = V && !V.includes(w) ? `${V},${w}` : w;
1091
+ }), C && t.push(C);
1092
+ }), Object.assign(u, {
1097
1093
  options: t
1098
- })) : (e[i] = n != null && n.multiple ? null : r, t = f.find((V) => r === V[m == null ? void 0 : m.value]), !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((V) => {
1099
- e[V] = t ? t[n.mapField[V]] : null;
1100
- }), Object.assign(M, {
1094
+ })) : (e[i] = n != null && n.multiple ? null : r, t = f.find((M) => r === M[m == null ? void 0 : m.value]), !isEmpty(n.mapField) && isObject(n.mapField) && Object.keys(n.mapField).forEach((M) => {
1095
+ e[M] = t ? t[n.mapField[M]] : null;
1096
+ }), Object.assign(u, {
1101
1097
  option: t
1102
- })), d === "row" && Object.assign(M, {
1098
+ })), d === "row" && Object.assign(u, {
1103
1099
  column: c.column
1104
- }), b != null && b.change && b.change(M);
1100
+ }), p != null && p.change && p.change(u);
1105
1101
  },
1106
1102
  setDefaultValue: (r, e, i) => {
1107
1103
  var d;
@@ -1189,8 +1185,8 @@ function useWatermark(l = ref(document.body)) {
1189
1185
  function e(t, d) {
1190
1186
  const f = document.createElement("canvas"), n = 260, m = 180;
1191
1187
  Object.assign(f, { width: n, height: m });
1192
- const b = f.getContext("2d");
1193
- 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(t, n / 20, m)), f.toDataURL("image/png");
1188
+ const p = f.getContext("2d");
1189
+ return p && (p.rotate(-20 * Math.PI / 120), p.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", p.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", p.textAlign = "left", p.textBaseline = "middle", p.fillText(t, n / 20, m)), f.toDataURL("image/png");
1194
1190
  }
1195
1191
  function i(t = {}) {
1196
1192
  const d = unref(h);
@@ -1206,8 +1202,8 @@ function useWatermark(l = ref(document.body)) {
1206
1202
  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";
1207
1203
  const n = unref(l);
1208
1204
  if (!n) return o;
1209
- const { clientHeight: m, clientWidth: b } = n;
1210
- return i({ str: t, width: b, height: m, attr: d }), n.appendChild(f), o;
1205
+ const { clientHeight: m, clientWidth: p } = n;
1206
+ return i({ str: t, width: p, height: m, attr: d }), n.appendChild(f), o;
1211
1207
  };
1212
1208
  function c(t, d) {
1213
1209
  Z(t, d), addResizeListener(document.documentElement, a), getCurrentInstance() && onBeforeUnmount(() => {
@@ -1230,36 +1226,36 @@ function useAttrs(l = {}) {
1230
1226
  }), r;
1231
1227
  }
1232
1228
  const i18n = window.$i18n, useRender = () => {
1233
- const l = { value: "dictCode", label: "dictName" }, a = (v, u) => {
1234
- var F;
1235
- const H = w(u);
1229
+ const l = { value: "dictCode", label: "dictName" }, a = (v, H) => {
1230
+ var N;
1231
+ const b = g(H);
1236
1232
  let s = {
1237
1233
  clearable: !0,
1238
1234
  disabled: !1,
1239
1235
  showValue: !1,
1240
1236
  placeholder: null
1241
- }, A, S;
1242
- isObject(v) ? (s = Object.assign(s, v), A = v.defaultValue, S = v == null ? void 0 : v.code) : S = v;
1243
- const I = (F = storageLocal.getItem("kLov")[S]) == null ? void 0 : F.children, N = I ? I.filter((E) => E.enabled === "1") : [];
1237
+ }, L, k;
1238
+ isObject(v) ? (s = Object.assign(s, v), L = v.defaultValue, k = v == null ? void 0 : v.code) : k = v;
1239
+ const x = (N = storageLocal.getItem("kLov")[k]) == null ? void 0 : N.children, D = x ? x.filter((E) => E.enabled === "1") : [];
1244
1240
  return {
1245
1241
  name: "#select",
1246
1242
  optionProps: l,
1247
- options: N,
1243
+ options: D,
1248
1244
  props: s,
1249
- defaultValue: A,
1250
- events: H
1245
+ defaultValue: L,
1246
+ events: b
1251
1247
  };
1252
- }, o = (v, u) => {
1253
- const H = w(u);
1248
+ }, o = (v, H) => {
1249
+ const b = g(H);
1254
1250
  return {
1255
1251
  name: "#SuSelect",
1256
1252
  optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
1257
1253
  props: v == null ? void 0 : v.props,
1258
1254
  options: (v == null ? void 0 : v.options) || [],
1259
- events: H
1255
+ events: b
1260
1256
  };
1261
- }, h = (v, u) => {
1262
- const H = {
1257
+ }, h = (v, H) => {
1258
+ const b = {
1263
1259
  optionProps: { extLabel: "userName", value: "employeeName" },
1264
1260
  props: {
1265
1261
  attrs: { disabled: v == null ? void 0 : v.disabled },
@@ -1270,20 +1266,20 @@ const i18n = window.$i18n, useRender = () => {
1270
1266
  fetchField: "employeeName"
1271
1267
  }
1272
1268
  };
1273
- return o(H, u);
1269
+ return o(b, H);
1274
1270
  }, r = (v) => {
1275
- const u = {
1271
+ const H = {
1276
1272
  optionProps: { label: "userName", value: "userName" },
1277
1273
  props: {
1278
1274
  code: "sys/listUsers",
1279
1275
  url: "/uums/user",
1280
- fetchField: "name",
1276
+ fetchField: "userName",
1281
1277
  mapField: v == null ? void 0 : v.mapField
1282
1278
  }
1283
1279
  };
1284
- return o(u);
1285
- }, e = (v, u) => {
1286
- const H = {
1280
+ return o(H);
1281
+ }, e = (v, H) => {
1282
+ const b = {
1287
1283
  label: "organizationName",
1288
1284
  value: (v == null ? void 0 : v.field) || "organizationName"
1289
1285
  }, s = {
@@ -1292,19 +1288,19 @@ const i18n = window.$i18n, useRender = () => {
1292
1288
  disabled: v == null ? void 0 : v.disabled,
1293
1289
  url: "/uums/cusOrganization",
1294
1290
  fetchField: "organizationName"
1295
- }, A = {
1291
+ }, L = {
1296
1292
  organizationId: "id",
1297
1293
  organizationCode: "organizationCode"
1298
1294
  };
1299
- return Object.assign(s.mapField, A, (v == null ? void 0 : v.mapField) || {}), {
1295
+ return Object.assign(s.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
1300
1296
  name: "#SuSelect",
1301
1297
  props: s,
1302
- optionProps: H,
1298
+ optionProps: b,
1303
1299
  options: [],
1304
- events: w(u)
1300
+ events: g(H)
1305
1301
  };
1306
- }, i = (v, u) => {
1307
- const H = {
1302
+ }, i = (v, H) => {
1303
+ const b = {
1308
1304
  label: "orgName",
1309
1305
  value: (v == null ? void 0 : v.field) || "orgName"
1310
1306
  }, s = {
@@ -1313,50 +1309,50 @@ const i18n = window.$i18n, useRender = () => {
1313
1309
  defaultParams: v == null ? void 0 : v.defaultParams,
1314
1310
  url: "/uums/org",
1315
1311
  fetchField: "orgName"
1316
- }, A = { orgId: "id", orgCode: "orgCode" };
1317
- return Object.assign(s.mapField, A, (v == null ? void 0 : v.mapField) || {}), {
1312
+ }, L = { orgId: "id", orgCode: "orgCode" };
1313
+ return Object.assign(s.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
1318
1314
  name: "#SuSelect",
1319
1315
  props: s,
1320
- optionProps: H,
1316
+ optionProps: b,
1321
1317
  options: [],
1322
- events: w(u)
1318
+ events: g(H)
1323
1319
  };
1324
- }, Z = (v, u) => {
1325
- const H = Object.assign({ disabled: !1 }, v), s = H == null ? void 0 : H.defaultValue;
1320
+ }, Z = (v, H) => {
1321
+ const b = Object.assign({ disabled: !1 }, v), s = b == null ? void 0 : b.defaultValue;
1326
1322
  return {
1327
1323
  name: "VxeInput",
1328
- props: H,
1324
+ props: b,
1329
1325
  defaultValue: s,
1330
- events: w(u)
1326
+ events: g(H)
1331
1327
  };
1332
- }, c = (v, u) => {
1333
- const H = Object.assign({ disabled: !1, rows: 3 }, v), s = H == null ? void 0 : H.defaultValue;
1328
+ }, c = (v, H) => {
1329
+ const b = Object.assign({ disabled: !1, rows: 3 }, v), s = b == null ? void 0 : b.defaultValue;
1334
1330
  return {
1335
1331
  name: "VxeTextarea",
1336
- props: H,
1332
+ props: b,
1337
1333
  defaultValue: s,
1338
- events: w(u)
1334
+ events: g(H)
1339
1335
  };
1340
- }, t = (v, u) => {
1341
- const H = "VxeCheckboxGroup", { defaultValue: s, options: A, props: S } = f(v);
1342
- return { name: H, defaultValue: s, options: A, props: S, events: w(u) };
1343
- }, d = (v, u) => {
1344
- const H = "VxeRadioGroup", { defaultValue: s, options: A, props: S } = f(v);
1345
- return { name: H, defaultValue: s, options: A, props: S, events: w(u) };
1336
+ }, t = (v, H) => {
1337
+ const b = "VxeCheckboxGroup", { defaultValue: s, options: L, props: k } = f(v);
1338
+ return { name: b, defaultValue: s, options: L, props: k, events: g(H) };
1339
+ }, d = (v, H) => {
1340
+ const b = "VxeRadioGroup", { defaultValue: s, options: L, props: k } = f(v);
1341
+ return { name: b, defaultValue: s, options: L, props: k, events: g(H) };
1346
1342
  }, f = (v) => {
1347
- var I;
1348
- let u = { disabled: !1 }, H;
1343
+ var x;
1344
+ let H = { disabled: !1 }, b;
1349
1345
  const s = storageLocal.getItem("kLov");
1350
- let A = "";
1351
- isObject(v) ? (H = v.defaultValue, A = v.code, v.options ? u = Object.assign(u, v.props || {}) : u = Object.assign(u, v || {})) : isString(v) && (A = v);
1352
- const S = A ? (I = s[A]) == null ? void 0 : I.children.map((N) => ({ label: N.dictName, value: N.dictCode })) : [];
1346
+ let L = "";
1347
+ 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 = s[L]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1353
1349
  return {
1354
- props: u,
1355
- defaultValue: H,
1356
- options: isObject(v) && v.options ? v.options : S
1350
+ props: H,
1351
+ defaultValue: b,
1352
+ options: isObject(v) && v.options ? v.options : k
1357
1353
  };
1358
- }, n = (v, u) => {
1359
- const H = w(u);
1354
+ }, n = (v, H) => {
1355
+ const b = g(H);
1360
1356
  return {
1361
1357
  name: "VxeNumberInput",
1362
1358
  props: Object.assign(
@@ -1364,13 +1360,13 @@ const i18n = window.$i18n, useRender = () => {
1364
1360
  v || {}
1365
1361
  ),
1366
1362
  defaultValue: v == null ? void 0 : v.defaultValue,
1367
- events: H
1363
+ events: b
1368
1364
  };
1369
- }, m = (v, u) => {
1370
- const H = w(u), s = "yyyy-MM-dd HH:mm:ss", A = v == null ? void 0 : v.defaultValue;
1371
- return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: A, events: H };
1372
- }, b = (v, u) => {
1373
- const H = w(u), s = "yyyy-MM-dd HH:mm:ss", A = v == null ? void 0 : v.startValue, S = v == null ? void 0 : v.endValue, I = v == null ? void 0 : v.startField, N = v == null ? void 0 : v.endField, F = {
1365
+ }, m = (v, H) => {
1366
+ const b = g(H), s = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
1367
+ return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: L, events: b };
1368
+ }, p = (v, H) => {
1369
+ const b = g(H), s = "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 = {
1374
1370
  type: "date",
1375
1371
  valueFormat: s,
1376
1372
  clearable: !0,
@@ -1407,24 +1403,24 @@ const i18n = window.$i18n, useRender = () => {
1407
1403
  }
1408
1404
  ]
1409
1405
  }
1410
- }, E = Object.assign(F, v || {});
1406
+ }, E = Object.assign(N, v || {});
1411
1407
  return {
1412
1408
  name: "VxeDateRangePicker",
1413
- startField: I,
1414
- endField: N,
1415
- startValue: A,
1416
- endValue: S,
1409
+ startField: x,
1410
+ endField: D,
1411
+ startValue: L,
1412
+ endValue: k,
1417
1413
  props: E,
1418
- events: H
1414
+ events: b
1419
1415
  };
1420
- }, M = (v, u) => {
1421
- const H = w(u);
1422
- return { name: "#lov", props: Object.assign({}, v || {}), events: H };
1423
- }, V = (v, u) => {
1424
- const H = w(u), s = (v == null ? void 0 : v.optionProps) || {
1416
+ }, u = (v, H) => {
1417
+ const b = g(H);
1418
+ return { name: "#lov", props: Object.assign({}, v || {}), events: b };
1419
+ }, M = (v, H) => {
1420
+ const b = g(H), s = (v == null ? void 0 : v.optionProps) || {
1425
1421
  label: "label",
1426
1422
  value: "value"
1427
- }, A = Object.assign(
1423
+ }, L = Object.assign(
1428
1424
  { clearable: !0, disabled: !1, showValue: !1 },
1429
1425
  v || {}
1430
1426
  );
@@ -1432,60 +1428,60 @@ const i18n = window.$i18n, useRender = () => {
1432
1428
  name: "#select",
1433
1429
  optionProps: s,
1434
1430
  options: (v == null ? void 0 : v.options) || [],
1435
- props: A,
1436
- events: H
1431
+ props: L,
1432
+ events: b
1437
1433
  };
1438
- }, p = (v, u) => {
1439
- let H = {
1434
+ }, C = (v, H) => {
1435
+ let b = {
1440
1436
  openLabel: "是",
1441
1437
  closeLabel: "否",
1442
1438
  openValue: "Y",
1443
1439
  closeValue: "N"
1444
1440
  }, s = "Y";
1445
- isObject(v) && !isFunction(v) ? (H = Object.assign(H, v || {}), s = v.defaultValue || s) : !isEmpty(v) && isString(v) && (s = v, H = Object.assign(H, { defaultValue: s }));
1446
- const A = isFunction(v) ? w(v) : w(u);
1447
- return { name: "VxeSwitch", props: H, defaultValue: s, events: A };
1448
- }, L = (v, u) => ({ name: "#tag", props: { code: v, tagMap: u } }), k = (v, u) => {
1449
- const H = {
1441
+ 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 }));
1442
+ const L = isFunction(v) ? g(v) : g(H);
1443
+ return { name: "VxeSwitch", props: b, defaultValue: s, events: L };
1444
+ }, y = (v, H) => ({ name: "#tag", props: { code: v, tagMap: H } }), w = (v, H) => {
1445
+ const b = {
1450
1446
  openLabel: "启用",
1451
1447
  closeLabel: "禁用",
1452
1448
  openValue: "1",
1453
1449
  closeValue: "0",
1454
1450
  defaultValue: "1"
1455
1451
  };
1456
- !isFunction(v) && isObject(v) && Object.assign(H, v);
1457
- const s = isFunction(v) ? v : u;
1458
- return p(H, s);
1459
- }, y = () => ({ name: "#iconSelect" }), C = (v = [], u = {}, H) => ({ name: "#treeSelect", sourceData: v, props: u, events: H }), T = (v, u) => {
1460
- const H = w(u);
1452
+ !isFunction(v) && isObject(v) && Object.assign(b, v);
1453
+ const s = isFunction(v) ? v : H;
1454
+ return C(b, s);
1455
+ }, V = () => ({ name: "#iconSelect" }), R = (v = [], H = {}, b) => ({ name: "#treeSelect", sourceData: v, props: H, events: b }), T = (v, H) => {
1456
+ const b = g(H);
1461
1457
  return {
1462
1458
  name: "#area",
1463
1459
  props: { mapField: (v == null ? void 0 : v.mapField) || ["province", "city", "region"] },
1464
- events: H
1460
+ events: b
1465
1461
  };
1466
- }, w = (v) => {
1467
- let u = {};
1468
- return isObject(v) && !isFunction(v) ? u = {
1469
- change: (v == null ? void 0 : v.change) || D,
1470
- blur: (v == null ? void 0 : v.blur) || D,
1471
- focus: (v == null ? void 0 : v.focus) || D,
1472
- input: (v == null ? void 0 : v.input) || D,
1473
- clear: (v == null ? void 0 : v.clear) || D,
1462
+ }, g = (v) => {
1463
+ let H = {};
1464
+ return isObject(v) && !isFunction(v) ? H = {
1465
+ change: (v == null ? void 0 : v.change) || I,
1466
+ blur: (v == null ? void 0 : v.blur) || I,
1467
+ focus: (v == null ? void 0 : v.focus) || I,
1468
+ input: (v == null ? void 0 : v.input) || I,
1469
+ clear: (v == null ? void 0 : v.clear) || I,
1474
1470
  searchClick: v == null ? void 0 : v.searchClick,
1475
1471
  suffixClick: v == null ? void 0 : v.suffixClick,
1476
1472
  prefixClick: v == null ? void 0 : v.prefixClick,
1477
1473
  filterMethod: v == null ? void 0 : v.filterMethod
1478
- } : v && (u = { change: v }), u;
1479
- }, R = (v, u) => {
1474
+ } : v && (H = { change: v }), H;
1475
+ }, F = (v, H) => {
1480
1476
  v = v || { fieldType: "string", mode: "image" };
1481
- const { singleMode: H, mode: s } = v;
1482
- return H && Object.assign(v, {
1477
+ const { singleMode: b, mode: s } = v;
1478
+ return b && Object.assign(v, {
1483
1479
  multiple: !1,
1484
1480
  limitCount: 1,
1485
1481
  autoHiddenButton: !0
1486
- }), s === "image" && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: u };
1482
+ }), s === "image" && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: H };
1487
1483
  };
1488
- function D() {
1484
+ function I() {
1489
1485
  }
1490
1486
  return {
1491
1487
  renderDict: a,
@@ -1499,17 +1495,17 @@ const i18n = window.$i18n, useRender = () => {
1499
1495
  renderInvOrg: e,
1500
1496
  renderBU: i,
1501
1497
  renderNumber: n,
1502
- renderLov: M,
1503
- renderSelectLocal: V,
1498
+ renderLov: u,
1499
+ renderSelectLocal: M,
1504
1500
  renderDate: m,
1505
- renderRangeDate: b,
1506
- renderSwitch: p,
1507
- renderCellTag: L,
1508
- renderEnabled: k,
1509
- renderIconSelect: y,
1510
- renderTreeSelect: C,
1501
+ renderRangeDate: p,
1502
+ renderSwitch: C,
1503
+ renderCellTag: y,
1504
+ renderEnabled: w,
1505
+ renderIconSelect: V,
1506
+ renderTreeSelect: R,
1511
1507
  renderArea: T,
1512
- renderUpload: R
1508
+ renderUpload: F
1513
1509
  };
1514
1510
  }, useGlobal = () => {
1515
1511
  const l = getCurrentInstance();
@@ -1728,11 +1724,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1728
1724
  "Content-Type": "application/json",
1729
1725
  "X-Requested-With": "XMLHttpRequest"
1730
1726
  }
1731
- }, g = class g {
1727
+ }, A = class A {
1732
1728
  constructor() {
1733
- x(this, "router");
1734
- x(this, "baseUrl", null);
1735
- x(this, "getNetworkError", (a) => a ? {
1729
+ S(this, "router");
1730
+ S(this, "baseUrl", null);
1731
+ S(this, "getNetworkError", (a) => a ? {
1736
1732
  400: "错误的请求",
1737
1733
  401: "服务未授权,请重新登录",
1738
1734
  403: "拒绝访问",
@@ -1755,27 +1751,27 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1755
1751
  /** 重连原始请求 */
1756
1752
  static retryOriginalRequest(a) {
1757
1753
  return new Promise((o) => {
1758
- g.requests.push((h) => {
1754
+ A.requests.push((h) => {
1759
1755
  a.headers.Authorization = "Bearer " + h, o(a);
1760
1756
  });
1761
1757
  });
1762
1758
  }
1763
1759
  // 请求拦截
1764
1760
  httpInterceptorsRequest() {
1765
- g.axiosInstance.interceptors.request.use(
1766
- (a) => (has(a, "loading") && isRef(a.loading) && (a.loading.value = !0), NProgress.start(), typeof a.beforeRequestCallback == "function" ? (a.beforeRequestCallback(a), a) : g.initConfig.beforeRequestCallback ? (g.initConfig.beforeRequestCallback(a), a) : ["/refreshToken", "/login"].some((h) => a.url.indexOf(h) > -1) ? a : new Promise((h) => {
1761
+ A.axiosInstance.interceptors.request.use(
1762
+ (a) => (has(a, "loading") && isRef(a.loading) && (a.loading.value = !0), NProgress.start(), typeof a.beforeRequestCallback == "function" ? (a.beforeRequestCallback(a), a) : A.initConfig.beforeRequestCallback ? (A.initConfig.beforeRequestCallback(a), a) : ["/refreshToken", "/login"].some((h) => a.url.indexOf(h) > -1) ? a : new Promise((h) => {
1767
1763
  const r = cookies.get(kTOKENKEY);
1768
1764
  if (r) {
1769
1765
  const e = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1770
- e.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1766
+ e.expires - i <= 0 ? (A.isRefreshing || (A.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1771
1767
  refreshToken: e.refreshToken
1772
1768
  }).then((c) => {
1773
- c != null && c.access_token ? (this.setToken(c), a.headers.Authorization = "Bearer " + c.access_token, g.requests.forEach((t) => t(c.access_token)), g.requests = []) : this.routeToLogin();
1769
+ c != null && c.access_token ? (this.setToken(c), a.headers.Authorization = "Bearer " + c.access_token, A.requests.forEach((t) => t(c.access_token)), A.requests = []) : this.routeToLogin();
1774
1770
  }).catch(() => {
1775
1771
  this.routeToLogin();
1776
1772
  }).finally(() => {
1777
- g.isRefreshing = !1;
1778
- })), h(g.retryOriginalRequest(a))) : (a.headers.Authorization = "Bearer " + e.accessToken, h(a));
1773
+ A.isRefreshing = !1;
1774
+ })), h(A.retryOriginalRequest(a))) : (a.headers.Authorization = "Bearer " + e.accessToken, h(a));
1779
1775
  } else {
1780
1776
  const e = cookies.get("kCookies_token");
1781
1777
  e && (a.headers["X-Token"] = e), h(a);
@@ -1793,14 +1789,14 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1793
1789
  cookies.set(kTOKENKEY, JSON.stringify(e));
1794
1790
  }
1795
1791
  routeToLogin() {
1796
- g.requests = [], cookies.remove("kCookies_token"), cookies.remove("authorized-token"), cookies.remove("loginer"), this.router.push({ name: "login" });
1792
+ A.requests = [], cookies.remove("kCookies_token"), cookies.remove("authorized-token"), cookies.remove("loginer"), this.router.push({ name: "login" });
1797
1793
  }
1798
1794
  // 响应拦截
1799
1795
  httpInterceptorsResponse() {
1800
- g.axiosInstance.interceptors.response.use(
1796
+ A.axiosInstance.interceptors.response.use(
1801
1797
  (o) => {
1802
1798
  const h = o.config;
1803
- return has(h, "loading") && isRef(h.loading) && (h.loading.value = !1), NProgress.done(), typeof h.beforeResponseCallback == "function" ? (h.beforeResponseCallback(o), o.data) : (g.initConfig.beforeResponseCallback && g.initConfig.beforeResponseCallback(o), o.data);
1799
+ return has(h, "loading") && isRef(h.loading) && (h.loading.value = !1), NProgress.done(), typeof h.beforeResponseCallback == "function" ? (h.beforeResponseCallback(o), o.data) : A.initConfig.beforeResponseCallback ? (A.initConfig.beforeResponseCallback(o), o.data) : !o.data && o.msg ? Promise.reject(o.msg) : o.data;
1804
1800
  },
1805
1801
  (o) => {
1806
1802
  var r;
@@ -1824,7 +1820,7 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1824
1820
  ...r
1825
1821
  });
1826
1822
  return new Promise((i, Z) => {
1827
- g.axiosInstance.request(e).then((c) => {
1823
+ A.axiosInstance.request(e).then((c) => {
1828
1824
  if (c && (c == null ? void 0 : c.code) === "0")
1829
1825
  i(c.data);
1830
1826
  else if (c.code === "500")
@@ -1872,11 +1868,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1872
1868
  }
1873
1869
  };
1874
1870
  /** token过期后,暂存待执行的请求 */
1875
- x(g, "requests", []), /** 防止重复刷新token */
1876
- x(g, "isRefreshing", !1), // 初始化配置对象
1877
- x(g, "initConfig", {}), // 保存当前Axios实例对象
1878
- x(g, "axiosInstance", Axios.create(defaultConfig));
1879
- let SuHttp = g;
1871
+ S(A, "requests", []), /** 防止重复刷新token */
1872
+ S(A, "isRefreshing", !1), // 初始化配置对象
1873
+ S(A, "initConfig", {}), // 保存当前Axios实例对象
1874
+ S(A, "axiosInstance", Axios.create(defaultConfig));
1875
+ let SuHttp = A;
1880
1876
  const http = new SuHttp(), lunarCalendar = {
1881
1877
  /**
1882
1878
  * 农历1900-2100的润大小信息表
@@ -2688,45 +2684,45 @@ const http = new SuHttp(), lunarCalendar = {
2688
2684
  let n = !1;
2689
2685
  f.getFullYear() === h && f.getMonth() + 1 === r && f.getDate() === e && (n = !0);
2690
2686
  let m = i.getDay();
2691
- const b = this.nStr1[m];
2687
+ const p = this.nStr1[m];
2692
2688
  m === 0 && (m = 7);
2693
- const M = Z;
2689
+ const u = Z;
2694
2690
  c = this.leapMonth(Z);
2695
- let V = !1;
2691
+ let M = !1;
2696
2692
  for (Z = 1; Z < 13 && d > 0; Z++)
2697
- c > 0 && Z === c + 1 && V === !1 ? (--Z, V = !0, t = this.leapDays(M)) : t = this.monthDays(M, Z), V === !0 && Z === c + 1 && (V = !1), d -= t;
2698
- d === 0 && c > 0 && Z === c + 1 && (V ? V = !1 : (V = !0, --Z)), d < 0 && (d += t, --Z);
2699
- const p = Z, L = d + 1, k = r - 1, y = this.toGanZhiYear(M), C = this.getTerm(h, r * 2 - 1), T = this.getTerm(h, r * 2);
2700
- let w = this.toGanZhi((h - 1900) * 12 + r + 11);
2701
- e >= C && (w = this.toGanZhi((h - 1900) * 12 + r + 12));
2702
- let R = !1, D;
2703
- C === e && (R = !0, D = this.solarTerm[r * 2 - 2]), T === e && (R = !0, D = this.solarTerm[r * 2 - 1]);
2704
- const v = Date.UTC(h, k, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, u = this.toGanZhi(v + e - 1), H = this.toAstro(r, e), s = h + "-" + r + "-" + e, A = M + "-" + p + "-" + L, S = this.festival, I = this.lFestival, N = r + "-" + e;
2705
- let F = p + "-" + L;
2706
- return p === 12 && L === 29 && this.monthDays(M, p) === 29 && (F = "12-30"), {
2693
+ c > 0 && Z === c + 1 && M === !1 ? (--Z, M = !0, t = this.leapDays(u)) : t = this.monthDays(u, Z), M === !0 && Z === c + 1 && (M = !1), d -= t;
2694
+ d === 0 && c > 0 && Z === c + 1 && (M ? M = !1 : (M = !0, --Z)), d < 0 && (d += t, --Z);
2695
+ const C = Z, y = d + 1, w = r - 1, V = this.toGanZhiYear(u), R = this.getTerm(h, r * 2 - 1), T = this.getTerm(h, r * 2);
2696
+ let g = this.toGanZhi((h - 1900) * 12 + r + 11);
2697
+ e >= R && (g = this.toGanZhi((h - 1900) * 12 + r + 12));
2698
+ let F = !1, I;
2699
+ 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), s = h + "-" + r + "-" + e, L = u + "-" + C + "-" + y, k = this.festival, x = this.lFestival, D = r + "-" + e;
2701
+ let N = C + "-" + y;
2702
+ return C === 12 && y === 29 && this.monthDays(u, C) === 29 && (N = "12-30"), {
2707
2703
  date: s,
2708
- lunarDate: A,
2709
- festival: S[N] ? S[N].title : null,
2710
- lunarFestival: I[F] ? I[F].title : null,
2711
- lYear: M,
2712
- lMonth: p,
2713
- lDay: L,
2714
- Animal: this.getAnimal(M),
2715
- IMonthCn: (V ? "闰" : "") + this.toChinaMonth(p),
2716
- IDayCn: this.toChinaDay(L),
2704
+ lunarDate: L,
2705
+ festival: k[D] ? k[D].title : null,
2706
+ lunarFestival: x[N] ? x[N].title : null,
2707
+ lYear: u,
2708
+ lMonth: C,
2709
+ lDay: y,
2710
+ Animal: this.getAnimal(u),
2711
+ IMonthCn: (M ? "闰" : "") + this.toChinaMonth(C),
2712
+ IDayCn: this.toChinaDay(y),
2717
2713
  cYear: h,
2718
2714
  cMonth: r,
2719
2715
  cDay: e,
2720
- gzYear: y,
2721
- gzMonth: w,
2722
- gzDay: u,
2716
+ gzYear: V,
2717
+ gzMonth: g,
2718
+ gzDay: H,
2723
2719
  isToday: n,
2724
- isLeap: V,
2720
+ isLeap: M,
2725
2721
  nWeek: m,
2726
- ncWeek: "星期" + b,
2727
- isTerm: R,
2728
- Term: D,
2729
- astro: H
2722
+ ncWeek: "星期" + p,
2723
+ isTerm: F,
2724
+ Term: I,
2725
+ astro: b
2730
2726
  };
2731
2727
  },
2732
2728
  /**
@@ -2755,8 +2751,8 @@ const http = new SuHttp(), lunarCalendar = {
2755
2751
  for (c = 1; c < a; c++)
2756
2752
  t = this.leapMonth(l), d || t <= c && t > 0 && (Z += this.leapDays(l), d = !0), Z += this.monthDays(l, c);
2757
2753
  h && (Z += e);
2758
- const f = Date.UTC(1900, 1, 30, 0, 0, 0), n = new Date((Z + o - 31) * 864e5 + f), m = n.getUTCFullYear(), b = n.getUTCMonth() + 1, M = n.getUTCDate();
2759
- return this.solar2lunar(m, b, M);
2754
+ const f = Date.UTC(1900, 1, 30, 0, 0, 0), n = new Date((Z + o - 31) * 864e5 + f), m = n.getUTCFullYear(), p = n.getUTCMonth() + 1, u = n.getUTCDate();
2755
+ return this.solar2lunar(m, p, u);
2760
2756
  }
2761
2757
  }, dict = storageLocal.getItem("kLov"), formats = {
2762
2758
  formatDate: {