@utogether/utils 3.0.0-beta.33 → 3.0.0-beta.35

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
- var U = (a, l, o) => l in a ? j(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
3
- var x = (a, l, o) => U(a, typeof l != "symbol" ? l + "" : l, o);
2
+ var U = (a, l, h) => l in a ? j(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
3
+ var x = (a, l, h) => U(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, merge, has } from "xe-utils";
@@ -20,8 +20,8 @@ class sessionStorageProxy {
20
20
  this.storage = l;
21
21
  }
22
22
  // 存
23
- setItem(l, o) {
24
- this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(o || null));
23
+ setItem(l, h) {
24
+ this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(h || null));
25
25
  }
26
26
  // 取
27
27
  getItem(l) {
@@ -53,8 +53,8 @@ class localforageProxy {
53
53
  }), this.storage = localforage;
54
54
  }
55
55
  // 存
56
- setItem(l, o) {
57
- this.storage.setItem(l, o);
56
+ setItem(l, h) {
57
+ this.storage.setItem(l, h);
58
58
  }
59
59
  // 取
60
60
  getItem(l) {
@@ -69,23 +69,18 @@ class localforageProxy {
69
69
  this.storage.clear();
70
70
  }
71
71
  }
72
- let window$1;
73
- window$1 || (window$1 = {
74
- sessionStorage: {},
75
- localStorage: {}
76
- });
77
- const storageSession = new sessionStorageProxy(window$1 == null ? void 0 : window$1.sessionStorage), storageLocal = new localStorageProxy(window$1 == null ? void 0 : window$1.localStorage), dbstorage = new localforageProxy();
72
+ const storageSession = new sessionStorageProxy(sessionStorage), storageLocal = new localStorageProxy(localStorage), dbstorage = new localforageProxy();
78
73
  /*! typescript-cookie v1.0.6 | MIT */
79
74
  const encodeName = (a) => encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), encodeValue = (a) => encodeURIComponent(a).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent), decodeName = decodeURIComponent, decodeValue = (a) => (a[0] === '"' && (a = a.slice(1, -1)), a.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent));
80
75
  function stringifyAttributes(a) {
81
- return a = Object.assign({}, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires != null && (a.expires = a.expires.toUTCString()), Object.entries(a).filter(([l, o]) => o != null && o !== !1).map(([l, o]) => o === !0 ? `; ${l}` : `; ${l}=${o.split(";")[0]}`).join("");
76
+ return a = Object.assign({}, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires != null && (a.expires = a.expires.toUTCString()), Object.entries(a).filter(([l, h]) => h != null && h !== !1).map(([l, h]) => h === !0 ? `; ${l}` : `; ${l}=${h.split(";")[0]}`).join("");
82
77
  }
83
- function get(a, l, o) {
84
- const h = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
78
+ function get(a, l, h) {
79
+ const o = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
85
80
  let e;
86
- for (; (e = h.exec(document.cookie)) != null; )
81
+ for (; (e = o.exec(document.cookie)) != null; )
87
82
  try {
88
- const i = o(e[1]);
83
+ const i = h(e[1]);
89
84
  if (r[i] = l(e[2], i), a === i)
90
85
  break;
91
86
  } catch {
@@ -100,11 +95,11 @@ const DEFAULT_CODEC = Object.freeze({
100
95
  }), DEFAULT_ATTRIBUTES = Object.freeze({
101
96
  path: "/"
102
97
  });
103
- function setCookie(a, l, o = DEFAULT_ATTRIBUTES, { encodeValue: h = encodeValue, encodeName: r = encodeName } = {}) {
104
- return document.cookie = `${r(a)}=${h(l, a)}${stringifyAttributes(o)}`;
98
+ function setCookie(a, l, h = DEFAULT_ATTRIBUTES, { encodeValue: o = encodeValue, encodeName: r = encodeName } = {}) {
99
+ return document.cookie = `${r(a)}=${o(l, a)}${stringifyAttributes(h)}`;
105
100
  }
106
- function getCookie(a, { decodeValue: l = decodeValue, decodeName: o = decodeName } = {}) {
107
- return get(a, l, o);
101
+ function getCookie(a, { decodeValue: l = decodeValue, decodeName: h = decodeName } = {}) {
102
+ return get(a, l, h);
108
103
  }
109
104
  function getCookies({ decodeValue: a = decodeValue, decodeName: l = decodeName } = {}) {
110
105
  return get(void 0, a, l);
@@ -115,7 +110,7 @@ function removeCookie(a, l = DEFAULT_ATTRIBUTES) {
115
110
  }));
116
111
  }
117
112
  function init(a, l) {
118
- const o = {
113
+ const h = {
119
114
  set: function(r, e, i) {
120
115
  return setCookie(r, e, Object.assign({}, this.attributes, i), {
121
116
  encodeValue: this.converter.write
@@ -136,11 +131,11 @@ function init(a, l) {
136
131
  withConverter: function(r) {
137
132
  return init(Object.assign({}, this.converter, r), this.attributes);
138
133
  }
139
- }, h = {
134
+ }, o = {
140
135
  attributes: { value: Object.freeze(l) },
141
136
  converter: { value: Object.freeze(a) }
142
137
  };
143
- return Object.create(o, h);
138
+ return Object.create(h, o);
144
139
  }
145
140
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
146
141
  class Cookies {
@@ -156,8 +151,8 @@ class Cookies {
156
151
  * @param value
157
152
  * @param cookieSetting
158
153
  */
159
- set(l = "default", o = "") {
160
- setCookie(`${this.getKey(l)}`, o);
154
+ set(l = "default", h = "") {
155
+ setCookie(`${this.getKey(l)}`, h);
161
156
  }
162
157
  /**
163
158
  * 拿到 cookie 值
@@ -196,9 +191,9 @@ const VxetableRender = (VXETable, {
196
191
  const dict = storageLocal.getItem("kLov");
197
192
  VXETable.renderer.add("#SuSelect", {
198
193
  renderTableEdit(a, l) {
199
- let o;
194
+ let h;
200
195
  const {
201
- row: h,
196
+ row: o,
202
197
  column: r
203
198
  } = l, {
204
199
  options: e,
@@ -213,12 +208,12 @@ const VxetableRender = (VXETable, {
213
208
  multiple: f,
214
209
  mapField: b
215
210
  } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
216
- m.setDefaultValue(i, h, r.field);
211
+ m.setDefaultValue(i, o, r.field);
217
212
  function M(V) {
218
213
  m.remote(V, r.field, a);
219
214
  }
220
215
  function p(V) {
221
- m.selectChange(V, h, r.field, a, {
216
+ m.selectChange(V, o, r.field, a, {
222
217
  column: r,
223
218
  datasource: "row"
224
219
  });
@@ -227,14 +222,14 @@ const VxetableRender = (VXETable, {
227
222
  v != null && v.input && v.input(l, V);
228
223
  }
229
224
  function A() {
230
- m.clear(h, r.field, b, v, "row");
225
+ m.clear(o, r.field, b, v, "row");
231
226
  }
232
227
  function k() {
233
228
  !e.length && M(""), v != null && v.focus && v.focus(l, r.field);
234
229
  }
235
230
  return [createVNode(resolveComponent("el-select"), mergeProps({
236
- modelValue: h[s],
237
- "onUpdate:modelValue": (V) => h[s] = V,
231
+ modelValue: o[s],
232
+ "onUpdate:modelValue": (V) => o[s] = V,
238
233
  filterable: !0,
239
234
  remote: !0,
240
235
  clearable: !0,
@@ -247,18 +242,18 @@ const VxetableRender = (VXETable, {
247
242
  onChange: (V) => p(V),
248
243
  onClear: () => A(),
249
244
  onInput: (V) => y(V)
250
- }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
245
+ }), _isSlot(h = e.map((V) => createVNode(resolveComponent("el-option"), {
251
246
  key: V[d],
252
247
  label: V[Z],
253
248
  value: V[d]
254
- }, null))) ? o : {
255
- default: () => [o]
249
+ }, null))) ? h : {
250
+ default: () => [h]
256
251
  })];
257
252
  },
258
253
  renderTableDefault(a, l) {
259
- let o;
254
+ let h;
260
255
  const {
261
- row: h,
256
+ row: o,
262
257
  column: r
263
258
  } = l, {
264
259
  options: e,
@@ -273,12 +268,12 @@ const VxetableRender = (VXETable, {
273
268
  multiple: f,
274
269
  mapField: b
275
270
  } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
276
- m.setDefaultValue(i, h, r.field);
271
+ m.setDefaultValue(i, o, r.field);
277
272
  function M(V) {
278
273
  m.remote(V, r.field, a);
279
274
  }
280
275
  function p(V) {
281
- m.selectChange(V, h, r.field, a, {
276
+ m.selectChange(V, o, r.field, a, {
282
277
  column: r,
283
278
  datasource: "row"
284
279
  });
@@ -287,14 +282,14 @@ const VxetableRender = (VXETable, {
287
282
  v != null && v.input && v.input(l, V);
288
283
  }
289
284
  function A() {
290
- m.clear(h, r.field, b, v, "row");
285
+ m.clear(o, r.field, b, v, "row");
291
286
  }
292
287
  function k() {
293
288
  !e.length && M(""), v != null && v.focus && v.focus(l, r.field);
294
289
  }
295
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
296
- modelValue: h[s],
297
- "onUpdate:modelValue": (V) => h[s] = V,
291
+ modelValue: o[s],
292
+ "onUpdate:modelValue": (V) => o[s] = V,
298
293
  filterable: !0,
299
294
  remote: !0,
300
295
  clearable: !0,
@@ -307,12 +302,12 @@ const VxetableRender = (VXETable, {
307
302
  onChange: (V) => p(V),
308
303
  onClear: () => A(),
309
304
  onInput: (V) => y(V)
310
- }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
305
+ }), _isSlot(h = e.map((V) => createVNode(resolveComponent("el-option"), {
311
306
  key: V[d],
312
307
  label: V[Z],
313
308
  value: V[d]
314
- }, null))) ? o : {
315
- default: () => [o]
309
+ }, null))) ? h : {
310
+ default: () => [h]
316
311
  })];
317
312
  },
318
313
  // 可编辑显示模板
@@ -330,9 +325,9 @@ const VxetableRender = (VXETable, {
330
325
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), val && multiple && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
331
326
  },
332
327
  renderItemContent(a, l) {
333
- let o;
328
+ let h;
334
329
  const {
335
- data: h,
330
+ data: o,
336
331
  field: r
337
332
  } = l, {
338
333
  options: e,
@@ -347,12 +342,12 @@ const VxetableRender = (VXETable, {
347
342
  multiple: f,
348
343
  loading: b = !1
349
344
  } = i, m = useComponent(), s = f ? `_${r}` : r;
350
- m.setDefaultValue(i, h, r);
345
+ m.setDefaultValue(i, o, r);
351
346
  async function M(V) {
352
347
  m.remote(V, r, a);
353
348
  }
354
349
  function p(V) {
355
- m.selectChange(V, h, r, a, {
350
+ m.selectChange(V, o, r, a, {
356
351
  datasource: "data"
357
352
  });
358
353
  }
@@ -360,14 +355,14 @@ const VxetableRender = (VXETable, {
360
355
  v != null && v.input && v.input(l, V);
361
356
  }
362
357
  function A() {
363
- m.clear(h, r, n, v, "data");
358
+ m.clear(o, r, n, v, "data");
364
359
  }
365
360
  function k() {
366
361
  !e.length && M(""), v != null && v.focus && v.focus(l);
367
362
  }
368
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
369
- modelValue: h[s],
370
- "onUpdate:modelValue": (V) => h[s] = V,
364
+ modelValue: o[s],
365
+ "onUpdate:modelValue": (V) => o[s] = V,
371
366
  filterable: !0,
372
367
  remote: !0,
373
368
  clearable: !0,
@@ -380,23 +375,23 @@ const VxetableRender = (VXETable, {
380
375
  onChange: (V) => p(V),
381
376
  onClear: () => A(),
382
377
  onInput: () => y()
383
- }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
378
+ }), _isSlot(h = e.map((V) => createVNode(resolveComponent("el-option"), {
384
379
  key: V[d],
385
380
  label: V[Z],
386
381
  value: V[d]
387
- }, null))) ? o : {
388
- default: () => [o]
382
+ }, null))) ? h : {
383
+ default: () => [h]
389
384
  })];
390
385
  }
391
386
  }), VXETable.renderer.add("#SuDateRange", {
392
387
  renderItemContent(a, l) {
393
388
  const {
394
- data: o,
395
- field: h
389
+ data: h,
390
+ field: o
396
391
  } = l, {
397
392
  props: r
398
393
  } = a;
399
- r != null && r.defaultValue && !o[h] && (o[h] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
394
+ r != null && r.defaultValue && !h[o] && (h[o] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
400
395
  const e = /* @__PURE__ */ new Date(), i = [{
401
396
  text: i18n("message.udp.today", !0),
402
397
  value: () => [t(1, "day"), e]
@@ -420,8 +415,8 @@ const VxetableRender = (VXETable, {
420
415
  value: () => [t(1, "year"), e]
421
416
  }], t = (v, Z) => dayjs().subtract(v, Z).add("1", "day").format();
422
417
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
423
- modelValue: o[h],
424
- "onUpdate:modelValue": (v) => o[h] = v,
418
+ modelValue: h[o],
419
+ "onUpdate:modelValue": (v) => h[o] = v,
425
420
  type: (r == null ? void 0 : r.type) || "daterange",
426
421
  shortcuts: i,
427
422
  style: "width: 100%",
@@ -432,9 +427,9 @@ const VxetableRender = (VXETable, {
432
427
  }
433
428
  }), VXETable.renderer.add("#select", {
434
429
  renderTableEdit(a, l) {
435
- let o;
430
+ let h;
436
431
  const {
437
- row: h,
432
+ row: o,
438
433
  column: r
439
434
  } = l, {
440
435
  options: e,
@@ -448,37 +443,37 @@ const VxetableRender = (VXETable, {
448
443
  multiple: n,
449
444
  mapField: f
450
445
  } = i, b = useComponent(), m = n ? `_${r.field}` : r.field;
451
- b.setDefaultValue(i, h, r.field);
446
+ b.setDefaultValue(i, o, r.field);
452
447
  function s(p) {
453
- b.selectChange(p, h, r.field, a, {
448
+ b.selectChange(p, o, r.field, a, {
454
449
  column: r,
455
450
  datasource: "row"
456
451
  });
457
452
  }
458
453
  function M() {
459
- b.clear(h, r.field, f, v, "row");
454
+ b.clear(o, r.field, f, v, "row");
460
455
  }
461
456
  return [createVNode(resolveComponent("el-select"), mergeProps({
462
- modelValue: h[m],
463
- "onUpdate:modelValue": (p) => h[m] = p,
457
+ modelValue: o[m],
458
+ "onUpdate:modelValue": (p) => o[m] = p,
464
459
  filterable: !0,
465
460
  clearable: !0
466
461
  }, i, {
467
462
  style: "width: 100%",
468
463
  onChange: (p) => s(p),
469
464
  onClear: () => M()
470
- }), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
465
+ }), _isSlot(h = e.map((p) => createVNode(resolveComponent("el-option"), {
471
466
  key: p[d],
472
467
  label: p[Z],
473
468
  value: p[d]
474
- }, null))) ? o : {
475
- default: () => [o]
469
+ }, null))) ? h : {
470
+ default: () => [h]
476
471
  })];
477
472
  },
478
473
  renderTableDefault(a, l) {
479
- let o;
474
+ let h;
480
475
  const {
481
- row: h,
476
+ row: o,
482
477
  column: r
483
478
  } = l, {
484
479
  options: e,
@@ -493,31 +488,31 @@ const VxetableRender = (VXETable, {
493
488
  multiple: f,
494
489
  mapField: b
495
490
  } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
496
- m.setDefaultValue(i, h, r.field);
491
+ m.setDefaultValue(i, o, r.field);
497
492
  function M(y) {
498
- m.selectChange(y, h, r.field, a, {
493
+ m.selectChange(y, o, r.field, a, {
499
494
  column: r,
500
495
  datasource: "row"
501
496
  });
502
497
  }
503
498
  function p() {
504
- m.clear(h, r.field, b, v, "row");
499
+ m.clear(o, r.field, b, v, "row");
505
500
  }
506
501
  return [createVNode(resolveComponent("el-select"), mergeProps({
507
- modelValue: h[s],
508
- "onUpdate:modelValue": (y) => h[s] = y,
502
+ modelValue: o[s],
503
+ "onUpdate:modelValue": (y) => o[s] = y,
509
504
  filterable: !0,
510
505
  clearable: !0
511
506
  }, i, {
512
507
  style: "width: 100%",
513
508
  onChange: (y) => M(y),
514
509
  onClear: () => p()
515
- }), _isSlot(o = e.map((y) => createVNode(resolveComponent("el-option"), {
510
+ }), _isSlot(h = e.map((y) => createVNode(resolveComponent("el-option"), {
516
511
  key: y[d],
517
512
  label: n && y[n] ? y[d] : y[Z],
518
513
  value: y[d]
519
- }, null))) ? o : {
520
- default: () => [o]
514
+ }, null))) ? h : {
515
+ default: () => [h]
521
516
  })];
522
517
  },
523
518
  // 可编辑显示模板
@@ -541,9 +536,9 @@ const VxetableRender = (VXETable, {
541
536
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), item && (val = extLabel ? item[value] : item[label]), val && (props != null && props.multiple) && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
542
537
  },
543
538
  renderItemContent(a, l) {
544
- let o;
539
+ let h;
545
540
  const {
546
- data: h,
541
+ data: o,
547
542
  field: r
548
543
  } = l, {
549
544
  options: e,
@@ -557,37 +552,37 @@ const VxetableRender = (VXETable, {
557
552
  mapField: f,
558
553
  multiple: b
559
554
  } = i, m = b ? `_${r}` : r;
560
- n.setDefaultValue(i, h, r);
555
+ n.setDefaultValue(i, o, r);
561
556
  function s(p) {
562
- n.selectChange(p, h, r, a, {
557
+ n.selectChange(p, o, r, a, {
563
558
  datasource: "data"
564
559
  });
565
560
  }
566
561
  function M() {
567
- n.clear(h, r, f, v, "data");
562
+ n.clear(o, r, f, v, "data");
568
563
  }
569
564
  return [createVNode(resolveComponent("el-select"), mergeProps({
570
- modelValue: h[m],
571
- "onUpdate:modelValue": (p) => h[m] = p,
565
+ modelValue: o[m],
566
+ "onUpdate:modelValue": (p) => o[m] = p,
572
567
  filterable: !0,
573
568
  clearable: !0,
574
569
  style: "width: 100%"
575
570
  }, i, {
576
571
  onChange: (p) => s(p),
577
572
  onClear: () => M()
578
- }), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
573
+ }), _isSlot(h = e.map((p) => createVNode(resolveComponent("el-option"), {
579
574
  key: p[d],
580
575
  label: p[Z],
581
576
  value: p[d]
582
- }, null))) ? o : {
583
- default: () => [o]
577
+ }, null))) ? h : {
578
+ default: () => [h]
584
579
  })];
585
580
  }
586
581
  }), VXETable.renderer.add("#lov", {
587
582
  renderItemContent(a, l) {
588
583
  const {
589
- data: o,
590
- field: h
584
+ data: h,
585
+ field: o
591
586
  } = l, {
592
587
  props: r,
593
588
  events: e
@@ -595,7 +590,7 @@ const VxetableRender = (VXETable, {
595
590
  defaultValues: t,
596
591
  mapField: v
597
592
  } = r;
598
- t && (o[h] = t);
593
+ t && (h[o] = t);
599
594
  function Z(n, f) {
600
595
  const {
601
596
  mapField: b,
@@ -606,11 +601,11 @@ const VxetableRender = (VXETable, {
606
601
  if (M) {
607
602
  if (M) {
608
603
  const y = {};
609
- o[s || m] = n.reduce((A, k) => {
604
+ h[s || m] = n.reduce((A, k) => {
610
605
  for (const V in b)
611
606
  y[V] = A ? y[V] + "," + k[b[V]] : k[b[V]];
612
607
  return A = A ? A + "," + k[s || m] : k[s || m], A;
613
- }, ""), Object.assign(o, y);
608
+ }, ""), Object.assign(h, y);
614
609
  }
615
610
  } else {
616
611
  const y = {
@@ -618,20 +613,20 @@ const VxetableRender = (VXETable, {
618
613
  };
619
614
  for (const A in b)
620
615
  y[A] = n[b[A]];
621
- Object.assign(o, y);
616
+ Object.assign(h, y);
622
617
  }
623
618
  const p = {
624
- data: o,
619
+ data: h,
625
620
  options: n,
626
621
  field: m
627
622
  };
628
623
  e != null && e.change && e.change(p);
629
624
  }
630
625
  function d() {
631
- i.clear(o, h, v, e, "data");
626
+ i.clear(h, o, v, e, "data");
632
627
  }
633
628
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
634
- record: o
629
+ record: h
635
630
  }, r, {
636
631
  mode: "vxe",
637
632
  onChange: (n, f) => Z(n, f),
@@ -641,8 +636,8 @@ const VxetableRender = (VXETable, {
641
636
  // 单元格编辑
642
637
  renderTableEdit(a, l) {
643
638
  const {
644
- row: o,
645
- column: h
639
+ row: h,
640
+ column: o
646
641
  } = l, {
647
642
  props: r,
648
643
  events: e
@@ -660,20 +655,20 @@ const VxetableRender = (VXETable, {
660
655
  };
661
656
  for (const p in n)
662
657
  M[p] = Z[n[p]];
663
- Object.assign(o, M);
658
+ Object.assign(h, M);
664
659
  }
665
660
  const s = {
666
- row: o,
661
+ row: h,
667
662
  options: Z,
668
- field: h.field
663
+ field: o.field
669
664
  };
670
665
  e != null && e.change && e.change(s);
671
666
  }
672
667
  function v() {
673
- i.clear(o, h.field, r.mapField, e, "row");
668
+ i.clear(h, o.field, r.mapField, e, "row");
674
669
  }
675
670
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
676
- record: o,
671
+ record: h,
677
672
  mode: "vxe",
678
673
  transfer: !0
679
674
  }, r, {
@@ -684,8 +679,8 @@ const VxetableRender = (VXETable, {
684
679
  // 单元格默认
685
680
  renderTableDefault(a, l) {
686
681
  const {
687
- row: o,
688
- column: h
682
+ row: h,
683
+ column: o
689
684
  } = l, {
690
685
  props: r,
691
686
  events: e
@@ -703,20 +698,20 @@ const VxetableRender = (VXETable, {
703
698
  };
704
699
  for (const p in n)
705
700
  M[p] = Z[n[p]];
706
- Object.assign(o, M);
701
+ Object.assign(h, M);
707
702
  }
708
703
  const s = {
709
- row: o,
704
+ row: h,
710
705
  options: Z,
711
- field: h.field
706
+ field: o.field
712
707
  };
713
708
  e != null && e.change && e.change(s);
714
709
  }
715
710
  function v() {
716
- i.clear(o, h.field, mapField, e, "row");
711
+ i.clear(h, o.field, mapField, e, "row");
717
712
  }
718
713
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
719
- record: o,
714
+ record: h,
720
715
  mode: "ele"
721
716
  }, r, {
722
717
  onChange: (Z, d) => t(Z, d),
@@ -726,16 +721,16 @@ const VxetableRender = (VXETable, {
726
721
  // 可编辑显示模板
727
722
  renderTableCell(a, l) {
728
723
  const {
729
- row: o,
730
- column: h
724
+ row: h,
725
+ column: o
731
726
  } = l;
732
- return [createVNode("span", null, [o[h.field]])];
727
+ return [createVNode("span", null, [h[o.field]])];
733
728
  }
734
729
  }), VXETable.renderer.add("#textarea", {
735
730
  renderTableEdit(a, l) {
736
731
  const {
737
- row: o,
738
- column: h
732
+ row: h,
733
+ column: o
739
734
  } = l, {
740
735
  props: r,
741
736
  events: e
@@ -743,17 +738,17 @@ const VxetableRender = (VXETable, {
743
738
  mapField: i
744
739
  } = r, t = useComponent();
745
740
  function v(d) {
746
- t.change(d, o, h.field, a, {
747
- column: h,
741
+ t.change(d, h, o.field, a, {
742
+ column: o,
748
743
  datasource: "row"
749
744
  });
750
745
  }
751
746
  function Z() {
752
- t.clear(o, h.field, i, e, "row");
747
+ t.clear(h, o.field, i, e, "row");
753
748
  }
754
749
  return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
755
- modelValue: o[h.field],
756
- "onUpdate:modelValue": (d) => o[h.field] = d
750
+ modelValue: h[o.field],
751
+ "onUpdate:modelValue": (d) => h[o.field] = d
757
752
  }, r, {
758
753
  style: "width: 100%",
759
754
  onChange: (d) => v(d),
@@ -762,8 +757,8 @@ const VxetableRender = (VXETable, {
762
757
  },
763
758
  renderTableDefault(a, l) {
764
759
  const {
765
- row: o,
766
- column: h
760
+ row: h,
761
+ column: o
767
762
  } = l, {
768
763
  props: r,
769
764
  events: e
@@ -771,17 +766,17 @@ const VxetableRender = (VXETable, {
771
766
  mapField: i
772
767
  } = r, t = useComponent();
773
768
  function v(d) {
774
- t.change(d, o, h.field, a, {
775
- column: h,
769
+ t.change(d, h, o.field, a, {
770
+ column: o,
776
771
  datasource: "row"
777
772
  });
778
773
  }
779
774
  function Z() {
780
- t.clear(o, h.field, i, e, "row");
775
+ t.clear(h, o.field, i, e, "row");
781
776
  }
782
777
  return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
783
- modelValue: o[h.field],
784
- "onUpdate:modelValue": (d) => o[h.field] = d
778
+ modelValue: h[o.field],
779
+ "onUpdate:modelValue": (d) => h[o.field] = d
785
780
  }, r, {
786
781
  onChange: (d) => v(d),
787
782
  onClear: () => Z()
@@ -790,15 +785,15 @@ const VxetableRender = (VXETable, {
790
785
  // 可编辑显示模板
791
786
  renderTableCell(a, l) {
792
787
  const {
793
- row: o,
794
- column: h
788
+ row: h,
789
+ column: o
795
790
  } = l;
796
- return o[h.field];
791
+ return h[o.field];
797
792
  },
798
793
  renderItemContent(a, l) {
799
794
  const {
800
- data: o,
801
- field: h
795
+ data: h,
796
+ field: o
802
797
  } = l, {
803
798
  props: r,
804
799
  events: e
@@ -806,18 +801,18 @@ const VxetableRender = (VXETable, {
806
801
  defaultValue: t,
807
802
  mapField: v
808
803
  } = r;
809
- t && (o[h] = t);
804
+ t && (h[o] = t);
810
805
  function Z(n) {
811
- i.change(n, o, h, a, {
806
+ i.change(n, h, o, a, {
812
807
  datasource: "data"
813
808
  });
814
809
  }
815
810
  function d() {
816
- i.clear(o, h, v, e, "data");
811
+ i.clear(h, o, v, e, "data");
817
812
  }
818
813
  return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
819
- modelValue: o[h],
820
- "onUpdate:modelValue": (n) => o[h] = n
814
+ modelValue: h[o],
815
+ "onUpdate:modelValue": (n) => h[o] = n
821
816
  }, r, {
822
817
  onChange: (n) => Z(n),
823
818
  onClear: () => d()
@@ -826,18 +821,18 @@ const VxetableRender = (VXETable, {
826
821
  }), VXETable.renderer.add("#upload", {
827
822
  renderTableEdit(a, l) {
828
823
  const {
829
- row: o,
830
- column: h
824
+ row: h,
825
+ column: o
831
826
  } = l, {
832
827
  props: r,
833
828
  events: e
834
829
  } = a;
835
830
  function i(t, v) {
836
- o[h.field] = "", e != null && e.remove && (e == null || e.remove(t, v));
831
+ h[o.field] = "", e != null && e.remove && (e == null || e.remove(t, v));
837
832
  }
838
833
  return [createVNode(resolveComponent("form-upload"), mergeProps({
839
- record: o,
840
- field: h.field,
834
+ record: h,
835
+ field: o.field,
841
836
  size: "mini"
842
837
  }, r, {
843
838
  "render-mode": "column",
@@ -848,14 +843,14 @@ const VxetableRender = (VXETable, {
848
843
  // 可编辑显示模板
849
844
  renderTableCell(a, l) {
850
845
  const {
851
- row: o,
852
- column: h
846
+ row: h,
847
+ column: o
853
848
  } = l, {
854
849
  props: r
855
850
  } = a;
856
851
  return [createVNode(resolveComponent("form-upload"), mergeProps({
857
- record: o,
858
- field: h.field,
852
+ record: h,
853
+ field: o.field,
859
854
  size: "mini"
860
855
  }, r, {
861
856
  mode: "image",
@@ -865,18 +860,18 @@ const VxetableRender = (VXETable, {
865
860
  },
866
861
  renderItemContent(a, l) {
867
862
  const {
868
- data: o,
869
- field: h
863
+ data: h,
864
+ field: o
870
865
  } = l, {
871
866
  props: r,
872
867
  events: e
873
868
  } = a;
874
869
  function i(t, v) {
875
- o[h] = "", e != null && e.remove && (e == null || e.remove(t, v));
870
+ h[o] = "", e != null && e.remove && (e == null || e.remove(t, v));
876
871
  }
877
872
  return [createVNode(resolveComponent("form-upload"), mergeProps({
878
- record: o,
879
- field: h,
873
+ record: h,
874
+ field: o,
880
875
  mode: "image"
881
876
  }, r, {
882
877
  onRemove: (t, v) => i(t, v)
@@ -885,9 +880,9 @@ const VxetableRender = (VXETable, {
885
880
  }), VXETable.renderer.add("#tag", {
886
881
  // 默认显示模板
887
882
  renderTableDefault(a, l) {
888
- let o;
883
+ let h;
889
884
  const {
890
- row: h,
885
+ row: o,
891
886
  column: r
892
887
  } = l, {
893
888
  props: {
@@ -896,20 +891,20 @@ const VxetableRender = (VXETable, {
896
891
  }
897
892
  } = a;
898
893
  function t() {
899
- return h[r.field] ? i[h[r.field]] : null;
894
+ return o[r.field] ? i[o[r.field]] : null;
900
895
  }
901
- return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
896
+ return [o[r.field] ? createVNode(resolveComponent("el-tag"), {
902
897
  effect: "dark",
903
898
  type: t()
904
- }, _isSlot(o = getValue(e, h[r.field])) ? o : {
905
- default: () => [o]
899
+ }, _isSlot(h = getValue(e, o[r.field])) ? h : {
900
+ default: () => [h]
906
901
  }) : null];
907
902
  }
908
903
  }), VXETable.renderer.add("#switch", {
909
904
  renderTableDefault(a, l) {
910
905
  const {
911
- row: o,
912
- column: h
906
+ row: h,
907
+ column: o
913
908
  } = l, {
914
909
  props: {
915
910
  code: r,
@@ -920,15 +915,15 @@ const VxetableRender = (VXETable, {
920
915
  } = a;
921
916
  function v(Z) {
922
917
  const d = {
923
- row: o,
924
- column: h,
918
+ row: h,
919
+ column: o,
925
920
  value: Z
926
921
  };
927
922
  t != null && t.change && t.change(d);
928
923
  }
929
- return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
930
- modelValue: o[h.field],
931
- "onUpdate:modelValue": (Z) => o[h.field] = Z,
924
+ return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
925
+ modelValue: h[o.field],
926
+ "onUpdate:modelValue": (Z) => h[o.field] = Z,
932
927
  "inline-prompt": !0,
933
928
  size: "large",
934
929
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
@@ -941,49 +936,49 @@ const VxetableRender = (VXETable, {
941
936
  }), VXETable.renderer.add("#iconSelect", {
942
937
  renderTableEdit(a, l) {
943
938
  const {
944
- row: o,
945
- column: h
939
+ row: h,
940
+ column: o
946
941
  } = l;
947
942
  return [createVNode(resolveComponent("SuIconSelect"), {
948
- modelValue: o[h.field],
949
- "onUpdate:modelValue": (r) => o[h.field] = r,
943
+ modelValue: h[o.field],
944
+ "onUpdate:modelValue": (r) => h[o.field] = r,
950
945
  teleported: !1
951
946
  }, null)];
952
947
  },
953
948
  renderTableCell(a, l) {
954
949
  const {
955
- row: o,
956
- column: h
950
+ row: h,
951
+ column: o
957
952
  } = l;
958
953
  return [createVNode(resolveComponent("IconifyIconOffline"), {
959
- icon: o[h.field],
954
+ icon: h[o.field],
960
955
  style: "font-size: 16px;"
961
956
  }, null)];
962
957
  },
963
958
  renderItemContent(a, l) {
964
959
  const {
965
- data: o,
966
- field: h
960
+ data: h,
961
+ field: o
967
962
  } = l;
968
963
  return [createVNode(resolveComponent("SuIconSelect"), {
969
- modelValue: o[h],
970
- "onUpdate:modelValue": (r) => o[h] = r,
964
+ modelValue: h[o],
965
+ "onUpdate:modelValue": (r) => h[o] = r,
971
966
  teleported: !0
972
967
  }, null)];
973
968
  }
974
969
  }), VXETable.renderer.add("#treeSelect", {
975
970
  renderTableEdit(a, l) {
976
971
  const {
977
- row: o,
978
- column: h
972
+ row: h,
973
+ column: o
979
974
  } = l, {
980
975
  props: r,
981
976
  sourceData: e,
982
977
  events: i
983
978
  } = a;
984
979
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
985
- modelValue: o[h.field],
986
- "onUpdate:modelValue": (t) => o[h.field] = t,
980
+ modelValue: h[o.field],
981
+ "onUpdate:modelValue": (t) => h[o.field] = t,
987
982
  data: e,
988
983
  "check-strictly": !0
989
984
  }, r, {
@@ -995,31 +990,31 @@ const VxetableRender = (VXETable, {
995
990
  },
996
991
  renderTableCell(a, l) {
997
992
  const {
998
- row: o,
999
- column: h
993
+ row: h,
994
+ column: o
1000
995
  } = l, {
1001
996
  sourceData: r,
1002
997
  props: e = {}
1003
998
  } = a, {
1004
999
  children: i = "children",
1005
1000
  label: t = "label"
1006
- } = e, v = findTree(r, (Z) => Z.value === o[h.field], {
1001
+ } = e, v = findTree(r, (Z) => Z.value === h[o.field], {
1007
1002
  children: i
1008
1003
  });
1009
1004
  return v ? [createVNode("span", null, [v.item[t]])] : null;
1010
1005
  },
1011
1006
  renderItemContent(a, l) {
1012
1007
  const {
1013
- data: o,
1014
- field: h
1008
+ data: h,
1009
+ field: o
1015
1010
  } = l, {
1016
1011
  props: r,
1017
1012
  sourceData: e,
1018
1013
  events: i
1019
1014
  } = a;
1020
1015
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
1021
- modelValue: o[h],
1022
- "onUpdate:modelValue": (t) => o[h] = t,
1016
+ modelValue: h[o],
1017
+ "onUpdate:modelValue": (t) => h[o] = t,
1023
1018
  data: e,
1024
1019
  "check-strictly": !0
1025
1020
  }, r, {
@@ -1105,46 +1100,46 @@ const VxetableRender = (VXETable, {
1105
1100
  e[f] = e[f] || v[f];
1106
1101
  })), !e[Z] && e[i] && (e[Z] = t ? (d = e[i]) == null ? void 0 : d.split(",") : e[i]);
1107
1102
  }
1108
- }), onCheckChange = (a, l, o, h) => {
1109
- console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
1110
- }, onNodeClick = (a, l, o, h) => {
1111
- h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
1112
- }, onCurrentChange = (a, l, o) => {
1113
- o != null && o.checkChange && (o == null || o.checkChange(a, l));
1103
+ }), onCheckChange = (a, l, h, o) => {
1104
+ console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
1105
+ }, onNodeClick = (a, l, h, o) => {
1106
+ o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
1107
+ }, onCurrentChange = (a, l, h) => {
1108
+ h != null && h.checkChange && (h == null || h.checkChange(a, l));
1114
1109
  };
1115
1110
  function getValue(a, l) {
1116
- var o, h, r;
1117
- return !l || !a || !dict ? l : (r = (h = (o = dict[a]) == null ? void 0 : o.children) == null ? void 0 : h.find((e) => e.dictCode === l)) == null ? void 0 : r.dictName;
1111
+ var h, o, r;
1112
+ return !l || !a || !dict ? l : (r = (o = (h = dict[a]) == null ? void 0 : h.children) == null ? void 0 : o.find((e) => e.dictCode === l)) == null ? void 0 : r.dictName;
1118
1113
  }
1119
1114
  return VXETable;
1120
1115
  }, getCookieParam = () => {
1121
1116
  const a = "kCookies_param";
1122
1117
  return cookies.get(a) ? JSON.parse(cookies.get(a)) : {};
1123
1118
  }, hasClass = (a, l) => {
1124
- var o;
1125
- return !!((o = a.className) != null && o.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
1126
- }, addClass = (a, l, o) => {
1127
- hasClass(a, l) || (a.className += " " + l), o && (hasClass(a, o) || (a.className += " " + o));
1128
- }, removeClass = (a, l, o) => {
1129
- var h, r;
1119
+ var h;
1120
+ return !!((h = a.className) != null && h.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
1121
+ }, addClass = (a, l, h) => {
1122
+ hasClass(a, l) || (a.className += " " + l), h && (hasClass(a, h) || (a.className += " " + h));
1123
+ }, removeClass = (a, l, h) => {
1124
+ var o, r;
1130
1125
  if (hasClass(a, l)) {
1131
1126
  const e = new RegExp("(\\s|^)" + l + "(\\s|$)");
1132
- a.className = (h = a.className) == null ? void 0 : h.replace(e, " ").trim();
1127
+ a.className = (o = a.className) == null ? void 0 : o.replace(e, " ").trim();
1133
1128
  }
1134
- if (o && hasClass(a, o)) {
1135
- const e = new RegExp("(\\s|^)" + o + "(\\s|$)");
1129
+ if (h && hasClass(a, h)) {
1130
+ const e = new RegExp("(\\s|^)" + h + "(\\s|$)");
1136
1131
  a.className = (r = a.className) == null ? void 0 : r.replace(e, " ").trim();
1137
1132
  }
1138
- }, toggleClass = (a, l, o) => {
1139
- const h = o || document.body;
1140
- let { className: r } = h;
1141
- r = r == null ? void 0 : r.replace(l, ""), h.className = r && a ? `${r} ${l} ` : r;
1133
+ }, toggleClass = (a, l, h) => {
1134
+ const o = h || document.body;
1135
+ let { className: r } = o;
1136
+ r = r == null ? void 0 : r.replace(l, ""), o.className = r && a ? `${r} ${l} ` : r;
1142
1137
  };
1143
1138
  function useRafThrottle(a) {
1144
1139
  let l = !1;
1145
- return function(...o) {
1140
+ return function(...h) {
1146
1141
  l || (l = !0, window.requestAnimationFrame(() => {
1147
- a.apply(this, o), l = !1;
1142
+ a.apply(this, h), l = !1;
1148
1143
  }));
1149
1144
  };
1150
1145
  }
@@ -1153,9 +1148,9 @@ const openLink = (a) => {
1153
1148
  l.setAttribute("href", a), l.setAttribute("target", "_blank"), l.setAttribute("rel", "noreferrer noopener"), l.setAttribute("id", "external"), document.getElementById("external") && document.body.removeChild(document.getElementById("external")), document.body.appendChild(l), l.click(), l.remove();
1154
1149
  }, isServer = typeof window > "u", resizeHandler = (a) => {
1155
1150
  for (const l of a) {
1156
- const o = l.target.__resizeListeners__ || [];
1157
- o.length && o.forEach((h) => {
1158
- h();
1151
+ const h = l.target.__resizeListeners__ || [];
1152
+ h.length && h.forEach((o) => {
1153
+ o();
1159
1154
  });
1160
1155
  }
1161
1156
  }, addResizeListener = (a, l) => {
@@ -1172,9 +1167,9 @@ function useWatermark(a = ref(document.body)) {
1172
1167
  if (!Z) return;
1173
1168
  const { clientHeight: d, clientWidth: n } = Z;
1174
1169
  i({ height: d, width: n });
1175
- }), o = domSymbol.toString(), h = shallowRef(), r = () => {
1176
- const Z = unref(h);
1177
- h.value = void 0;
1170
+ }), h = domSymbol.toString(), o = shallowRef(), r = () => {
1171
+ const Z = unref(o);
1172
+ o.value = void 0;
1178
1173
  const d = unref(a);
1179
1174
  d && (Z && d.removeChild(Z), removeResizeListener(d, l));
1180
1175
  };
@@ -1185,21 +1180,21 @@ function useWatermark(a = ref(document.body)) {
1185
1180
  return m && (m.rotate(-20 * Math.PI / 120), m.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", m.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", m.textAlign = "left", m.textBaseline = "middle", m.fillText(Z, f / 20, b)), n.toDataURL("image/png");
1186
1181
  }
1187
1182
  function i(Z = {}) {
1188
- const d = unref(h);
1183
+ const d = unref(o);
1189
1184
  d && (isUndefined(Z.width) || (d.style.width = `${Z.width}px`), isUndefined(Z.height) || (d.style.height = `${Z.height}px`), isUndefined(Z.str) || (d.style.background = `url(${e(
1190
1185
  Z.str,
1191
1186
  Z.attr
1192
1187
  )}) left top repeat`));
1193
1188
  }
1194
1189
  const t = (Z, d) => {
1195
- if (unref(h))
1196
- return i({ str: Z, attr: d }), o;
1190
+ if (unref(o))
1191
+ return i({ str: Z, attr: d }), h;
1197
1192
  const n = document.createElement("div");
1198
- h.value = n, n.id = o, n.style.pointerEvents = "none", n.style.top = "0px", n.style.left = "0px", n.style.position = "absolute", n.style.zIndex = "100000";
1193
+ o.value = n, n.id = h, n.style.pointerEvents = "none", n.style.top = "0px", n.style.left = "0px", n.style.position = "absolute", n.style.zIndex = "100000";
1199
1194
  const f = unref(a);
1200
- if (!f) return o;
1195
+ if (!f) return h;
1201
1196
  const { clientHeight: b, clientWidth: m } = f;
1202
- return i({ str: Z, width: m, height: b, attr: d }), f.appendChild(n), o;
1197
+ return i({ str: Z, width: m, height: b, attr: d }), f.appendChild(n), h;
1203
1198
  };
1204
1199
  function v(Z, d) {
1205
1200
  t(Z, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
@@ -1215,9 +1210,9 @@ function entries(a) {
1215
1210
  function useAttrs(a = {}) {
1216
1211
  const l = getCurrentInstance();
1217
1212
  if (!l) return {};
1218
- const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), e = h.concat(DEFAULT_EXCLUDE_KEYS);
1213
+ const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), e = o.concat(DEFAULT_EXCLUDE_KEYS);
1219
1214
  return l.attrs = reactive(l.attrs), watchEffect(() => {
1220
- const i = entries(l.attrs).reduce((t, [v, Z]) => (!e.includes(v) && !(o && LISTENER_PREFIX.test(v)) && (t[v] = Z), t), {});
1215
+ const i = entries(l.attrs).reduce((t, [v, Z]) => (!e.includes(v) && !(h && LISTENER_PREFIX.test(v)) && (t[v] = Z), t), {});
1221
1216
  r.value = i;
1222
1217
  }), r;
1223
1218
  }
@@ -1232,7 +1227,7 @@ const useRender = () => {
1232
1227
  placeholder: null
1233
1228
  }, L, S;
1234
1229
  isObject(c) ? (C = Object.assign(C, c), L = c.defaultValue, S = c == null ? void 0 : c.code) : S = c;
1235
- const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, D = I ? I.filter((T) => T.enabled === "1") : [];
1230
+ const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, D = I ? I.filter((R) => R.enabled === "1") : [];
1236
1231
  return {
1237
1232
  name: "#select",
1238
1233
  optionProps: a,
@@ -1241,7 +1236,7 @@ const useRender = () => {
1241
1236
  defaultValue: L,
1242
1237
  events: u
1243
1238
  };
1244
- }, o = (c, H) => {
1239
+ }, h = (c, H) => {
1245
1240
  const u = w(H);
1246
1241
  return {
1247
1242
  name: "#SuSelect",
@@ -1250,7 +1245,7 @@ const useRender = () => {
1250
1245
  options: (c == null ? void 0 : c.options) || [],
1251
1246
  events: u
1252
1247
  };
1253
- }, h = (c, H) => {
1248
+ }, o = (c, H) => {
1254
1249
  const u = {
1255
1250
  optionProps: { extLabel: "userName", value: "employeeName" },
1256
1251
  props: {
@@ -1258,12 +1253,11 @@ const useRender = () => {
1258
1253
  disabled: c == null ? void 0 : c.disabled,
1259
1254
  defaultValue: c == null ? void 0 : c.defaultValue,
1260
1255
  mapField: c == null ? void 0 : c.mapField,
1261
- code: "SYS037",
1262
1256
  url: "/uums/employee/listEmployeeIsUser",
1263
1257
  fetchField: "employeeName"
1264
1258
  }
1265
1259
  };
1266
- return o(u, H);
1260
+ return h(u, H);
1267
1261
  }, r = (c) => {
1268
1262
  const H = {
1269
1263
  optionProps: { extLabel: "userName", value: "name" },
@@ -1274,7 +1268,7 @@ const useRender = () => {
1274
1268
  mapField: c == null ? void 0 : c.mapField
1275
1269
  }
1276
1270
  };
1277
- return o(H);
1271
+ return h(H);
1278
1272
  }, e = (c, H) => {
1279
1273
  const u = {
1280
1274
  label: "organizationName",
@@ -1282,6 +1276,7 @@ const useRender = () => {
1282
1276
  }, C = {
1283
1277
  mapField: {},
1284
1278
  defaultParams: c == null ? void 0 : c.defaultParams,
1279
+ disabled: c == null ? void 0 : c.disabled,
1285
1280
  url: "/uums/cusOrganization",
1286
1281
  fetchField: "organizationName"
1287
1282
  }, L = {
@@ -1301,6 +1296,7 @@ const useRender = () => {
1301
1296
  value: (c == null ? void 0 : c.field) || "orgName"
1302
1297
  }, C = {
1303
1298
  mapField: {},
1299
+ disabled: c == null ? void 0 : c.disabled,
1304
1300
  defaultParams: c == null ? void 0 : c.defaultParams,
1305
1301
  url: "/uums/org",
1306
1302
  fetchField: "orgName"
@@ -1361,14 +1357,14 @@ const useRender = () => {
1361
1357
  const u = w(H), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
1362
1358
  return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {}), defaultValue: L, events: u };
1363
1359
  }, m = (c, H) => {
1364
- const u = w(H), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.startValue, S = c == null ? void 0 : c.endValue, I = c == null ? void 0 : c.startField, D = c == null ? void 0 : c.endField, T = Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {});
1360
+ const u = w(H), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.startValue, S = c == null ? void 0 : c.endValue, I = c == null ? void 0 : c.startField, D = c == null ? void 0 : c.endField, R = Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {});
1365
1361
  return {
1366
1362
  name: "VxeDateRangePicker",
1367
1363
  startField: I,
1368
1364
  endField: D,
1369
1365
  startValue: L,
1370
1366
  endValue: S,
1371
- props: T,
1367
+ props: R,
1372
1368
  events: u
1373
1369
  };
1374
1370
  }, s = (c, H) => {
@@ -1410,7 +1406,7 @@ const useRender = () => {
1410
1406
  !isFunction(c) && isObject(c) && Object.assign(u, c);
1411
1407
  const C = isFunction(c) ? c : H;
1412
1408
  return p(u, C);
1413
- }, k = () => ({ name: "#iconSelect" }), V = (c = [], H = {}, u) => ({ name: "#treeSelect", sourceData: c, props: H, events: u }), R = (c, H) => {
1409
+ }, k = () => ({ name: "#iconSelect" }), V = (c = [], H = {}, u) => ({ name: "#treeSelect", sourceData: c, props: H, events: u }), E = (c, H) => {
1414
1410
  const u = w(H);
1415
1411
  return {
1416
1412
  name: "#area",
@@ -1430,7 +1426,7 @@ const useRender = () => {
1430
1426
  prefixClick: c == null ? void 0 : c.prefixClick,
1431
1427
  filterMethod: c == null ? void 0 : c.filterMethod
1432
1428
  } : c && (H = { change: c }), H;
1433
- }, E = (c, H) => {
1429
+ }, T = (c, H) => {
1434
1430
  c = c || { fieldType: "string", mode: "image" };
1435
1431
  const { singleMode: u, mode: C } = c;
1436
1432
  return u && Object.assign(c, {
@@ -1443,12 +1439,12 @@ const useRender = () => {
1443
1439
  }
1444
1440
  return {
1445
1441
  renderDict: l,
1446
- renderSelect: o,
1442
+ renderSelect: h,
1447
1443
  renderInput: t,
1448
1444
  renderTextarea: v,
1449
1445
  renderCheckBox: Z,
1450
1446
  renderRadio: d,
1451
- renderUser: h,
1447
+ renderUser: o,
1452
1448
  renderSysUser: r,
1453
1449
  renderInvOrg: e,
1454
1450
  renderBU: i,
@@ -1462,17 +1458,17 @@ const useRender = () => {
1462
1458
  renderEnabled: A,
1463
1459
  renderIconSelect: k,
1464
1460
  renderTreeSelect: V,
1465
- renderArea: R,
1466
- renderUpload: E
1461
+ renderArea: E,
1462
+ renderUpload: T
1467
1463
  };
1468
1464
  }, useGlobal = () => {
1469
1465
  const a = getCurrentInstance();
1470
1466
  if (!a) return { $global: {}, $storage: {}, $config: {} };
1471
- const l = a.appContext.app.config.globalProperties, o = l.$storage, h = l.$config, r = l.$serviceApi, e = l.$hasAuthority, i = l.$printPlugin, t = l.$mode;
1467
+ const l = a.appContext.app.config.globalProperties, h = l.$storage, o = l.$config, r = l.$serviceApi, e = l.$hasAuthority, i = l.$printPlugin, t = l.$mode;
1472
1468
  return {
1473
1469
  $global: l,
1474
- $storage: o,
1475
- $config: h,
1470
+ $storage: h,
1471
+ $config: o,
1476
1472
  $serviceApi: r,
1477
1473
  $hasAuthority: e,
1478
1474
  $printPlugin: i,
@@ -1489,59 +1485,60 @@ function buildUUID() {
1489
1485
  }
1490
1486
  let unique = 0;
1491
1487
  function buildShortUUID(a = "") {
1492
- const l = Date.now(), o = Math.floor(Math.random() * 1e9);
1493
- return unique++, a + "_" + o + unique + String(l);
1488
+ const l = Date.now(), h = Math.floor(Math.random() * 1e9);
1489
+ return unique++, a + "_" + h + unique + String(l);
1494
1490
  }
1495
1491
  const deviceDetection = () => {
1496
- const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", o = a.match(/midp/i) === "midp", h = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb", e = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", t = a.match(/windows mobile/i) === "windows mobile";
1497
- return l || o || h || r || e || i || t;
1492
+ const a = navigator.userAgent.toLowerCase(), l = a.match(/iphone os/i) === "iphone os", h = a.match(/midp/i) === "midp", o = a.match(/rv:1.2.3.4/i) === "rv:1.2.3.4", r = a.match(/ucweb/i) === "ucweb", e = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", t = a.match(/windows mobile/i) === "windows mobile";
1493
+ return l || h || o || r || e || i || t;
1498
1494
  }, getBrowserInfo = () => {
1499
- const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
1495
+ const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, h = a.match(l);
1500
1496
  return {
1501
- browser: o[1].replace(/version/, "'safari"),
1502
- version: o[2]
1497
+ browser: h[1].replace(/version/, "'safari"),
1498
+ version: h[2]
1503
1499
  };
1504
- }, showMessage = (a, l = "message", o = {}) => {
1505
- var h, r;
1506
- return l === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...o }) : (r = VxeUI.modal) == null ? void 0 : r.message({ content: a, ...o });
1500
+ }, showMessage = (a, l = "message", h = {}) => {
1501
+ var o, r;
1502
+ return l === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...h }) : (r = VxeUI.modal) == null ? void 0 : r.message({ content: a, ...h });
1507
1503
  }, successMessage = (a = "操作成功", l = {}) => {
1508
- var o;
1509
- return (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "success" });
1504
+ var h;
1505
+ return (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "success" });
1510
1506
  }, warnMessage = (a, l = {}) => {
1511
- var o, h;
1512
- return l.type === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...l, status: "warning" }) : (h = VxeUI.modal) == null ? void 0 : h.message({
1507
+ var h, o;
1508
+ return l.type === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...l, status: "warning" }) : (o = VxeUI.modal) == null ? void 0 : o.message({
1513
1509
  content: a,
1514
1510
  duration: 5e3,
1515
1511
  ...l,
1516
1512
  status: "warning"
1517
1513
  });
1518
1514
  }, errorMessage = (a = "操作失败", l = {}) => {
1519
- var o, h;
1520
- return l.type === "alert" ? (o = VxeUI.modal) == null ? void 0 : o.alert({ content: a, ...l, status: "error" }) : (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "error" });
1515
+ var h, o;
1516
+ return l.type === "alert" ? (h = VxeUI.modal) == null ? void 0 : h.alert({ content: a, ...l, status: "error" }) : (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "error" });
1521
1517
  }, renderHook = useRender(), i18nColums = (a, l = !0) => {
1522
- let o = 0, h = 0;
1518
+ let h = 0, o = 0;
1523
1519
  const r = a.length - 1;
1524
1520
  return a.map((e, i) => {
1525
- if (h = h + e.width, e.type) return e;
1521
+ if (o = o + e.width, e.type) return e;
1526
1522
  e.title = e.title || `message.${e.field}`;
1527
1523
  const { showOverflow: t } = e;
1528
- return e.field !== "operate" && ((e.width > 99 || e.minWidth) && (e.showOverflow = t === !1 ? t : "tooltip"), e.sortable = !(l === !1 || e.sortable === !1)), o || (o = e.minWidth), !o && r === i && h < window.innerWidth && (e.minWidth = e.width, e.width = null), e;
1524
+ return e.field !== "operate" && ((e.width > 99 || e.minWidth) && (e.showOverflow = t === !1 ? t : "tooltip"), e.sortable = !(l === !1 || e.sortable === !1)), h || (h = e.minWidth), !h && r === i && o < window.innerWidth && (e.minWidth = e.width, e.width = null), e;
1529
1525
  });
1530
- }, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
1531
- var r, e, i;
1532
- if ((r = h.children) != null && r.length)
1533
- return h.children = formatItems(h.children, l, o), h;
1526
+ }, formatItems = (a, l, h, o = 24) => a.length ? a.map((r) => {
1527
+ var e, i, t;
1528
+ if ((e = r.children) != null && e.length)
1529
+ return r.children = formatItems(r.children, l, h, o), r;
1534
1530
  {
1535
- h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.type === "collapseNode" && (h.title = "", h.titleWidth = 0);
1536
- let t = !1;
1537
- l === "detail" ? (t = !0, h.placeholder = null) : t = h.disabled === !1 ? h.disabled : h.disabled || ((i = (e = h.itemRender) == null ? void 0 : e.props) == null ? void 0 : i.disabled);
1538
- let v = {
1531
+ r.title = r.title || `message.${r.field}`, r.span = r.span || o, r.type === "collapseNode" && (r.title = "", r.titleWidth = 0);
1532
+ let v = !1, Z = h("message.udp.placeholder") + h(r.title);
1533
+ l === "detail" ? (v = !0, Z = null) : v = r.disabled === !1 ? r.disabled : r.disabled || ((t = (i = r.itemRender) == null ? void 0 : i.props) == null ? void 0 : t.disabled);
1534
+ let d = {
1539
1535
  name: "VxeInput",
1540
- props: { disabled: t, placeholder: t ? "" : h.placeholder }
1536
+ props: { disabled: v, placeholder: v ? "" : Z }
1541
1537
  };
1542
- return h.code && !h.itemRender && (v = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || v, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
1543
- disabled: t
1544
- }), h;
1538
+ return r.code && !r.itemRender && (d = renderHook.renderDict(r.code)), r.itemRender = r.itemRender || d, r.itemRender.props = Object.assign(r.itemRender.props || {}, {
1539
+ disabled: v,
1540
+ placeholder: v ? "" : Z
1541
+ }), r;
1545
1542
  }
1546
1543
  }) : a, formSearchButtons = {
1547
1544
  span: 6,
@@ -1568,11 +1565,11 @@ const deviceDetection = () => {
1568
1565
  events: null
1569
1566
  }
1570
1567
  }, formatGridItems = (a, l) => {
1571
- const o = a, h = o.length, r = h > 2 && o.some((Z, d) => d < 3 && (Z.span > 6 || getDateRange(Z))), e = r || h > 3, i = {
1568
+ const h = a, o = h.length, r = o > 2 && h.some((Z, d) => d < 3 && (Z.span > 6 || getDateRange(Z))), e = r || o > 3, i = {
1572
1569
  collapseTags: !0,
1573
1570
  collapseTagsTooltip: !0,
1574
1571
  multiple: !0
1575
- }, t = o.map((Z, d) => {
1572
+ }, t = h.map((Z, d) => {
1576
1573
  var n, f, b;
1577
1574
  return Z.folding = r ? e && d > 1 : e && d > 2, Z.span = getDateRange(Z) ? 12 : Z.span || 6, Z.code && !Z.itemRender && (Z.itemRender = renderHook.renderDict(Z.code)), Z.itemRender = Z.itemRender || { name: "VxeInput" }, Z.resetValue = Z.itemRender.defaultValue, Z.title = Z.title || `message.${Z.field}`, (Z.multiple || (f = (n = Z.itemRender) == null ? void 0 : n.props) != null && f.multiple) && (Z.itemRender.props = Object.assign(
1578
1575
  i,
@@ -1586,25 +1583,25 @@ const deviceDetection = () => {
1586
1583
  t.push(v);
1587
1584
  return t;
1588
1585
  }, getDateRange = (a) => {
1589
- var l, o, h, r, e;
1590
- return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((h = (o = a.itemRender) == null ? void 0 : o.props) == null ? void 0 : h.type) === "daterange" || !((e = (r = a.itemRender) == null ? void 0 : r.props) != null && e.type) : !1;
1586
+ var l, h, o, r, e;
1587
+ return ((l = a.itemRender) == null ? void 0 : l.name) === "#SuDateRange" ? ((o = (h = a.itemRender) == null ? void 0 : h.props) == null ? void 0 : o.type) === "daterange" || !((e = (r = a.itemRender) == null ? void 0 : r.props) != null && e.type) : !1;
1591
1588
  }, formatRules = (a, l) => {
1592
- const o = {};
1593
- return a.forEach((h) => {
1589
+ const h = {};
1590
+ return a.forEach((o) => {
1594
1591
  var r;
1595
- if ((r = h.children) != null && r.length) {
1596
- const e = formatRules(h.children, l);
1597
- merge(o, e);
1598
- } else if (h.required) {
1599
- const { field: e, title: i } = h, t = i == null ? void 0 : i.startsWith("message.");
1600
- o[e] = [
1592
+ if ((r = o.children) != null && r.length) {
1593
+ const e = formatRules(o.children, l);
1594
+ merge(h, e);
1595
+ } else if (o.required) {
1596
+ const { field: e, title: i } = o, t = i == null ? void 0 : i.startsWith("message.");
1597
+ h[e] = [
1601
1598
  {
1602
1599
  required: !0,
1603
1600
  message: `${l("message.required")}${i && t ? l(i) : i || l(`message.${e}`)}`
1604
1601
  }
1605
1602
  ];
1606
1603
  }
1607
- }), o;
1604
+ }), h;
1608
1605
  }, expandedPaths = [];
1609
1606
  function extractPathList(a) {
1610
1607
  if (!Array.isArray(a)) {
@@ -1623,8 +1620,8 @@ function deleteTreeChildren(a, l = []) {
1623
1620
  return;
1624
1621
  }
1625
1622
  if (!(!a || a.length === 0)) {
1626
- for (const [o, h] of a.entries())
1627
- h.children && h.children.length === 1 && delete h.children, h.id = o, h.parentId = l.length ? l[l.length - 1] : null, h.pathList = [...l, h.id], h.uniqueId = h.pathList.length > 1 ? h.pathList.join("-") : h.pathList[0], h.children && h.children.length > 0 && deleteTreeChildren(h.children, h.pathList);
1623
+ for (const [h, o] of a.entries())
1624
+ o.children && o.children.length === 1 && delete o.children, o.id = h, o.parentId = l.length ? l[l.length - 1] : null, o.pathList = [...l, o.id], o.uniqueId = o.pathList.length > 1 ? o.pathList.join("-") : o.pathList[0], o.children && o.children.length > 0 && deleteTreeChildren(o.children, o.pathList);
1628
1625
  return a;
1629
1626
  }
1630
1627
  }
@@ -1634,8 +1631,8 @@ function buildHierarchyTree(a, l = []) {
1634
1631
  return;
1635
1632
  }
1636
1633
  if (!(!a || a.length === 0)) {
1637
- for (const [o, h] of a.entries())
1638
- h.id = o, h.parentId = l.length ? l[l.length - 1] : null, h.pathList = [...l, h.id], h.children && h.children.length > 0 && buildHierarchyTree(h.children, h.pathList);
1634
+ for (const [h, o] of a.entries())
1635
+ o.id = h, o.parentId = l.length ? l[l.length - 1] : null, o.pathList = [...l, o.id], o.children && o.children.length > 0 && buildHierarchyTree(o.children, o.pathList);
1639
1636
  return a;
1640
1637
  }
1641
1638
  }
@@ -1645,20 +1642,20 @@ function getNodeByUniqueId(a, l) {
1645
1642
  return;
1646
1643
  }
1647
1644
  if (!a || a.length === 0) return;
1648
- const o = a.find((r) => r.uniqueId === l);
1649
- if (o) return o;
1650
- const h = a.filter((r) => r.children).map((r) => r.children).flat(1);
1651
- return getNodeByUniqueId(h, l);
1645
+ const h = a.find((r) => r.uniqueId === l);
1646
+ if (h) return h;
1647
+ const o = a.filter((r) => r.children).map((r) => r.children).flat(1);
1648
+ return getNodeByUniqueId(o, l);
1652
1649
  }
1653
- function appendFieldByUniqueId(a, l, o) {
1650
+ function appendFieldByUniqueId(a, l, h) {
1654
1651
  if (!Array.isArray(a)) {
1655
1652
  console.warn("menuTree must be an array");
1656
1653
  return;
1657
1654
  }
1658
1655
  if (!a || a.length === 0) return {};
1659
- for (const h of a) {
1660
- const r = h.children && h.children.length > 0;
1661
- h.uniqueId === l && Object.prototype.toString.call(o) === "[object Object]" && Object.assign(h, o), r && appendFieldByUniqueId(h.children, l, o);
1656
+ for (const o of a) {
1657
+ const r = o.children && o.children.length > 0;
1658
+ o.uniqueId === l && Object.prototype.toString.call(h) === "[object Object]" && Object.assign(o, h), r && appendFieldByUniqueId(o.children, l, h);
1662
1659
  }
1663
1660
  return a;
1664
1661
  }
@@ -1707,68 +1704,73 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1707
1704
  }
1708
1705
  /** 重连原始请求 */
1709
1706
  static retryOriginalRequest(l) {
1710
- return new Promise((o) => {
1711
- g.requests.push((h) => {
1712
- l.headers.Authorization = "Bearer " + h, o(l);
1707
+ return new Promise((h) => {
1708
+ g.requests.push((o) => {
1709
+ l.headers.Authorization = "Bearer " + o, h(l);
1713
1710
  });
1714
1711
  });
1715
1712
  }
1716
1713
  // 请求拦截
1717
1714
  httpInterceptorsRequest() {
1718
1715
  g.axiosInstance.interceptors.request.use(
1719
- (l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) : g.initConfig.beforeRequestCallback ? (g.initConfig.beforeRequestCallback(l), l) : ["/refreshToken", "/login"].some((h) => l.url.indexOf(h) > -1) ? l : new Promise((h) => {
1716
+ (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) => {
1720
1717
  const r = cookies.get(kTOKENKEY);
1721
1718
  if (r) {
1722
1719
  const e = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1723
1720
  e.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1724
1721
  refreshToken: e.refreshToken
1725
1722
  }).then((v) => {
1726
- this.setToken(v), l.headers.Authorization = "Bearer " + v.access_token, g.requests.forEach((Z) => Z(v.access_token)), g.requests = [];
1723
+ v != null && v.access_token ? (this.setToken(v), l.headers.Authorization = "Bearer " + v.access_token, g.requests.forEach((Z) => Z(v.access_token)), g.requests = []) : this.routeToLogin();
1724
+ }).catch(() => {
1725
+ this.routeToLogin();
1727
1726
  }).finally(() => {
1728
1727
  g.isRefreshing = !1;
1729
- })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + e.accessToken, h(l));
1728
+ })), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + e.accessToken, o(l));
1730
1729
  } else {
1731
1730
  const e = cookies.get("kCookies_token");
1732
- e && (l.headers["X-Token"] = e), h(l);
1731
+ e && (l.headers["X-Token"] = e), o(l);
1733
1732
  }
1734
1733
  })),
1735
1734
  (l) => Promise.reject(l)
1736
1735
  );
1737
1736
  }
1738
1737
  setToken(l) {
1739
- const { access_token: o, expires_in: h, refresh_token: r } = l, e = {
1740
- accessToken: o,
1738
+ const { access_token: h, expires_in: o, refresh_token: r } = l, e = {
1739
+ accessToken: h,
1741
1740
  refreshToken: r,
1742
- expires: Date.now() + h * 1e3
1741
+ expires: Date.now() + o * 1e3
1743
1742
  };
1744
1743
  cookies.set(kTOKENKEY, JSON.stringify(e));
1745
1744
  }
1745
+ routeToLogin() {
1746
+ g.requests = [], cookies.remove("kCookies_token"), cookies.remove("authorized-token"), cookies.remove("loginer"), this.router.push({ name: "login" });
1747
+ }
1746
1748
  // 响应拦截
1747
1749
  httpInterceptorsResponse() {
1748
1750
  g.axiosInstance.interceptors.response.use(
1749
- (o) => {
1750
- const h = o.config;
1751
- 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);
1751
+ (h) => {
1752
+ const o = h.config;
1753
+ 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);
1752
1754
  },
1753
- (o) => {
1755
+ (h) => {
1754
1756
  var r;
1755
- const h = o;
1756
- return has(o.config, "loading") && isRef((r = o == null ? void 0 : o.config) == null ? void 0 : r.loading) && (o.config.loading.value = !1), h.isCancelRequest = Axios.isCancel(h), NProgress.done(), Promise.reject(h);
1757
+ const o = h;
1758
+ return has(h.config, "loading") && isRef((r = h == null ? void 0 : h.config) == null ? void 0 : r.loading) && (h.config.loading.value = !1), o.isCancelRequest = Axios.isCancel(o), NProgress.done(), Promise.reject(o);
1757
1759
  }
1758
1760
  );
1759
1761
  }
1760
- transformConfigByMethod(l, o) {
1761
- const { method: h } = o, r = ["get"], e = h.toLocaleLowerCase(), i = r.includes(e) ? "params" : "data";
1762
+ transformConfigByMethod(l, h) {
1763
+ const { method: o } = h, r = ["get"], e = o.toLocaleLowerCase(), i = r.includes(e) ? "params" : "data";
1762
1764
  return {
1763
- ...o,
1765
+ ...h,
1764
1766
  [i]: l
1765
1767
  };
1766
1768
  }
1767
1769
  // 通用请求工具函数
1768
- request(l, o, h, r) {
1769
- const e = this.transformConfigByMethod(h, {
1770
+ request(l, h, o, r) {
1771
+ const e = this.transformConfigByMethod(o, {
1770
1772
  method: l,
1771
- url: o,
1773
+ url: h,
1772
1774
  ...r
1773
1775
  });
1774
1776
  return new Promise((i, t) => {
@@ -1798,22 +1800,22 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1798
1800
  });
1799
1801
  }
1800
1802
  // 单独抽离的post工具函数
1801
- post(l, o, h) {
1802
- return this.request("post", l, o, h);
1803
+ post(l, h, o) {
1804
+ return this.request("post", l, h, o);
1803
1805
  }
1804
1806
  // 单独抽离的delete工具函数
1805
- delete(l, o, h) {
1806
- return this.request("delete", l, o, h);
1807
+ delete(l, h, o) {
1808
+ return this.request("delete", l, h, o);
1807
1809
  }
1808
1810
  // 单独抽离的put工具函数
1809
- put(l, o, h) {
1810
- return this.request("put", l, o, h);
1811
+ put(l, h, o) {
1812
+ return this.request("put", l, h, o);
1811
1813
  }
1812
1814
  // 单独抽离的get工具函数
1813
- get(l, o, h) {
1814
- for (const r in o)
1815
- o[r] || delete o[r];
1816
- return this.request("get", l, o, h);
1815
+ get(l, h, o) {
1816
+ for (const r in h)
1817
+ h[r] || delete h[r];
1818
+ return this.request("get", l, h, o);
1817
1819
  }
1818
1820
  postRouter(l) {
1819
1821
  return this.request("post", "route/service", l);
@@ -2477,10 +2479,10 @@ const http = new SuHttp(), lunarCalendar = {
2477
2479
  * @eg:var count = calendar.lYearDays(1987) ;//count=387
2478
2480
  */
2479
2481
  lYearDays: function(a) {
2480
- let l, o = 348;
2482
+ let l, h = 348;
2481
2483
  for (l = 32768; l > 8; l >>= 1)
2482
- o += this.lunarInfo[a - 1900] & l ? 1 : 0;
2483
- return o + this.leapDays(a);
2484
+ h += this.lunarInfo[a - 1900] & l ? 1 : 0;
2485
+ return h + this.leapDays(a);
2484
2486
  },
2485
2487
  /**
2486
2488
  * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
@@ -2520,8 +2522,8 @@ const http = new SuHttp(), lunarCalendar = {
2520
2522
  solarDays: function(a, l) {
2521
2523
  if (l > 12 || l < 1)
2522
2524
  return -1;
2523
- const o = l - 1;
2524
- return o === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[o];
2525
+ const h = l - 1;
2526
+ return h === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[h];
2525
2527
  },
2526
2528
  /**
2527
2529
  * 农历年份转换为干支纪年
@@ -2529,8 +2531,8 @@ const http = new SuHttp(), lunarCalendar = {
2529
2531
  * @return Cn string
2530
2532
  */
2531
2533
  toGanZhiYear: function(a) {
2532
- let l = (a - 3) % 10, o = (a - 3) % 12;
2533
- return l === 0 && (l = 10), o === 0 && (o = 12), this.Gan[l - 1] + this.Zhi[o - 1];
2534
+ let l = (a - 3) % 10, h = (a - 3) % 12;
2535
+ return l === 0 && (l = 10), h === 0 && (h = 12), this.Gan[l - 1] + this.Zhi[h - 1];
2534
2536
  },
2535
2537
  /**
2536
2538
  * 公历月、日判断所属星座
@@ -2539,8 +2541,8 @@ const http = new SuHttp(), lunarCalendar = {
2539
2541
  * @return Cn string
2540
2542
  */
2541
2543
  toAstro: function(a, l) {
2542
- const o = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", h = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2543
- return o.substr(a * 2 - (l < h[a - 1] ? 2 : 0), 2) + "座";
2544
+ const h = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", o = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2545
+ return h.substr(a * 2 - (l < o[a - 1] ? 2 : 0), 2) + "座";
2544
2546
  },
2545
2547
  /**
2546
2548
  * 传入offset偏移量返回干支
@@ -2560,12 +2562,12 @@ const http = new SuHttp(), lunarCalendar = {
2560
2562
  getTerm: function(a, l) {
2561
2563
  if (a < 1900 || a > 2100 || l < 1 || l > 24)
2562
2564
  return -1;
2563
- const o = this.sTermInfo[a - 1900], h = [];
2564
- for (let r = 0; r < o.length; r += 5) {
2565
- const e = parseInt("0x" + o.substr(r, 5)).toString();
2566
- h.push(e[0], e.substr(1, 2), e[3], e.substr(4, 2));
2565
+ const h = this.sTermInfo[a - 1900], o = [];
2566
+ for (let r = 0; r < h.length; r += 5) {
2567
+ const e = parseInt("0x" + h.substr(r, 5)).toString();
2568
+ o.push(e[0], e.substr(1, 2), e[3], e.substr(4, 2));
2567
2569
  }
2568
- return parseInt(h[l - 1]);
2570
+ return parseInt(o[l - 1]);
2569
2571
  },
2570
2572
  /**
2571
2573
  * 传入农历数字月份返回汉语通俗表示法
@@ -2620,21 +2622,21 @@ const http = new SuHttp(), lunarCalendar = {
2620
2622
  * @return JSON object
2621
2623
  * @eg:console.log(calendar.solar2lunar(1987,11,01));
2622
2624
  */
2623
- solar2lunar: function(a, l, o) {
2624
- let h = parseInt(a), r = parseInt(l), e = parseInt(o);
2625
- if (h < 1900 || h > 2100 || h === 1900 && r === 1 && e < 31)
2625
+ solar2lunar: function(a, l, h) {
2626
+ let o = parseInt(a), r = parseInt(l), e = parseInt(h);
2627
+ if (o < 1900 || o > 2100 || o === 1900 && r === 1 && e < 31)
2626
2628
  return -1;
2627
2629
  let i;
2628
- h ? i = new Date(h, parseInt(r.toString()) - 1, e) : i = /* @__PURE__ */ new Date();
2630
+ o ? i = new Date(o, parseInt(r.toString()) - 1, e) : i = /* @__PURE__ */ new Date();
2629
2631
  let t, v = 0, Z = 0;
2630
- h = i.getFullYear(), r = i.getMonth() + 1, e = i.getDate();
2632
+ o = i.getFullYear(), r = i.getMonth() + 1, e = i.getDate();
2631
2633
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2632
2634
  for (t = 1900; t < 2101 && d > 0; t++)
2633
2635
  Z = this.lYearDays(t), d -= Z;
2634
2636
  d < 0 && (d += Z, t--);
2635
2637
  const n = /* @__PURE__ */ new Date();
2636
2638
  let f = !1;
2637
- n.getFullYear() === h && n.getMonth() + 1 === r && n.getDate() === e && (f = !0);
2639
+ n.getFullYear() === o && n.getMonth() + 1 === r && n.getDate() === e && (f = !0);
2638
2640
  let b = i.getDay();
2639
2641
  const m = this.nStr1[b];
2640
2642
  b === 0 && (b = 7);
@@ -2644,12 +2646,12 @@ const http = new SuHttp(), lunarCalendar = {
2644
2646
  for (t = 1; t < 13 && d > 0; t++)
2645
2647
  v > 0 && t === v + 1 && M === !1 ? (--t, M = !0, Z = this.leapDays(s)) : Z = this.monthDays(s, t), M === !0 && t === v + 1 && (M = !1), d -= Z;
2646
2648
  d === 0 && v > 0 && t === v + 1 && (M ? M = !1 : (M = !0, --t)), d < 0 && (d += Z, --t);
2647
- const p = t, y = d + 1, A = r - 1, k = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), R = this.getTerm(h, r * 2);
2648
- let w = this.toGanZhi((h - 1900) * 12 + r + 11);
2649
- e >= V && (w = this.toGanZhi((h - 1900) * 12 + r + 12));
2650
- let E = !1, F;
2651
- V === e && (E = !0, F = this.solarTerm[r * 2 - 2]), R === e && (E = !0, F = this.solarTerm[r * 2 - 1]);
2652
- const c = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, H = this.toGanZhi(c + e - 1), u = this.toAstro(r, e), C = h + "-" + r + "-" + e, L = s + "-" + p + "-" + y, S = this.festival, I = this.lFestival, D = r + "-" + e;
2649
+ const p = t, y = d + 1, A = r - 1, k = this.toGanZhiYear(s), V = this.getTerm(o, r * 2 - 1), E = this.getTerm(o, r * 2);
2650
+ let w = this.toGanZhi((o - 1900) * 12 + r + 11);
2651
+ e >= V && (w = this.toGanZhi((o - 1900) * 12 + r + 12));
2652
+ let T = !1, F;
2653
+ V === e && (T = !0, F = this.solarTerm[r * 2 - 2]), E === e && (T = !0, F = this.solarTerm[r * 2 - 1]);
2654
+ const c = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, H = this.toGanZhi(c + e - 1), u = this.toAstro(r, e), C = o + "-" + r + "-" + e, L = s + "-" + p + "-" + y, S = this.festival, I = this.lFestival, D = r + "-" + e;
2653
2655
  let N = p + "-" + y;
2654
2656
  return p === 12 && y === 29 && this.monthDays(s, p) === 29 && (N = "12-30"), {
2655
2657
  date: C,
@@ -2662,7 +2664,7 @@ const http = new SuHttp(), lunarCalendar = {
2662
2664
  Animal: this.getAnimal(s),
2663
2665
  IMonthCn: (M ? "闰" : "") + this.toChinaMonth(p),
2664
2666
  IDayCn: this.toChinaDay(y),
2665
- cYear: h,
2667
+ cYear: o,
2666
2668
  cMonth: r,
2667
2669
  cDay: e,
2668
2670
  gzYear: k,
@@ -2672,7 +2674,7 @@ const http = new SuHttp(), lunarCalendar = {
2672
2674
  isLeap: M,
2673
2675
  nWeek: b,
2674
2676
  ncWeek: "星期" + m,
2675
- isTerm: E,
2677
+ isTerm: T,
2676
2678
  Term: F,
2677
2679
  astro: u
2678
2680
  };
@@ -2687,14 +2689,14 @@ const http = new SuHttp(), lunarCalendar = {
2687
2689
  * @return JSON object
2688
2690
  * @eg:console.log(calendar.lunar2solar(1987,9,10));
2689
2691
  */
2690
- lunar2solar: function(a, l, o, h) {
2691
- a = parseInt(a), l = parseInt(l), o = parseInt(o), h = !!h;
2692
+ lunar2solar: function(a, l, h, o) {
2693
+ a = parseInt(a), l = parseInt(l), h = parseInt(h), o = !!o;
2692
2694
  const r = this.leapMonth(a);
2693
- if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
2695
+ if (o && r !== l || a === 2100 && l === 12 && h > 1 || a === 1900 && l === 1 && h < 31)
2694
2696
  return -1;
2695
2697
  const e = this.monthDays(a, l);
2696
2698
  let i = e;
2697
- if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
2699
+ if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
2698
2700
  return -1;
2699
2701
  let t = 0, v;
2700
2702
  for (v = 1900; v < a; v++)
@@ -2702,8 +2704,8 @@ const http = new SuHttp(), lunarCalendar = {
2702
2704
  let Z = 0, d = !1;
2703
2705
  for (v = 1; v < l; v++)
2704
2706
  Z = this.leapMonth(a), d || Z <= v && Z > 0 && (t += this.leapDays(a), d = !0), t += this.monthDays(a, v);
2705
- h && (t += e);
2706
- const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + o - 31) * 864e5 + n), b = f.getUTCFullYear(), m = f.getUTCMonth() + 1, s = f.getUTCDate();
2707
+ o && (t += e);
2708
+ const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + h - 31) * 864e5 + n), b = f.getUTCFullYear(), m = f.getUTCMonth() + 1, s = f.getUTCDate();
2707
2709
  return this.solar2lunar(b, m, s);
2708
2710
  }
2709
2711
  }, dict = storageLocal.getItem("kLov"), formats = {
@@ -2743,8 +2745,8 @@ const http = new SuHttp(), lunarCalendar = {
2743
2745
  tableCellFormatMethod({ cellValue: a }, l) {
2744
2746
  var r, e;
2745
2747
  if (!l) return a;
2746
- const o = XEUtils.toValueString(a), h = dict ? (e = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : e.find((i) => i.dictCode === o) : a;
2747
- return (h == null ? void 0 : h.dictName) || a;
2748
+ const h = XEUtils.toValueString(a), o = dict ? (e = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : e.find((i) => i.dictCode === h) : a;
2749
+ return (o == null ? void 0 : o.dictName) || a;
2748
2750
  }
2749
2751
  },
2750
2752
  formatRelateField: {
@@ -2756,22 +2758,22 @@ const http = new SuHttp(), lunarCalendar = {
2756
2758
  formatContact: {
2757
2759
  // 字段拼接展示
2758
2760
  tableCellFormatMethod({ row: a }, l) {
2759
- return l.reduce((o, h) => a[h] ? o ? o += a[h] : a[h] : o, "");
2761
+ return l.reduce((h, o) => a[o] ? h ? h += a[o] : a[o] : h, "");
2760
2762
  }
2761
2763
  },
2762
2764
  formatSelectLocal: {
2763
2765
  tableCellFormatMethod({ cellValue: a }, l) {
2764
- const [o, h = "value", r = "label"] = l, e = o == null ? void 0 : o.find((i) => i[h] === a);
2766
+ const [h, o = "value", r = "label"] = l, e = h == null ? void 0 : h.find((i) => i[o] === a);
2765
2767
  return e ? e[r] : a;
2766
2768
  }
2767
2769
  },
2768
2770
  formatMultiValue: {
2769
2771
  tableCellFormatMethod({ row: a }, l) {
2770
2772
  var e;
2771
- const [o, h] = l;
2773
+ const [h, o] = l;
2772
2774
  let r;
2773
- return (e = a[o]) == null || e.split(",").forEach((i) => {
2774
- const t = h.find((v) => v.value === i);
2775
+ return (e = a[h]) == null || e.split(",").forEach((i) => {
2776
+ const t = o.find((v) => v.value === i);
2775
2777
  r = r ? `${r},${t == null ? void 0 : t.label}` : t == null ? void 0 : t.label;
2776
2778
  }), r;
2777
2779
  }
@@ -10399,29 +10401,29 @@ const http = new SuHttp(), lunarCalendar = {
10399
10401
  height: 24
10400
10402
  }, withInstall = (a) => {
10401
10403
  const l = a;
10402
- return l.install = (o) => {
10403
- o.component(l.name || l.__name, a);
10404
+ return l.install = (h) => {
10405
+ h.component(l.name || l.__name, a);
10404
10406
  }, a;
10405
10407
  };
10406
10408
  function sleep(a = 64) {
10407
10409
  return new Promise((l) => {
10408
- const o = setTimeout(() => {
10409
- window.clearTimeout(o), l(a);
10410
+ const h = setTimeout(() => {
10411
+ window.clearTimeout(h), l(a);
10410
10412
  }, a);
10411
10413
  });
10412
10414
  }
10413
10415
  const delay = (a) => new Promise((l) => setTimeout(l, a)), useDark = () => ({ isDark: ref(document.documentElement.classList.contains("dark")) }), useDebounce = (a, l) => {
10414
- let o;
10416
+ let h;
10415
10417
  return () => {
10416
- o && clearTimeout(o), o = setTimeout(a, l);
10418
+ h && clearTimeout(h), h = setTimeout(a, l);
10417
10419
  };
10418
10420
  };
10419
10421
  function isUrl(a) {
10420
10422
  return /(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(a);
10421
10423
  }
10422
10424
  const getDictName = (a, l) => {
10423
- var h, r;
10424
- return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((e) => l === e.dictCode)) == null ? void 0 : r.dictName;
10425
+ var o, r;
10426
+ return !a || !l ? null : (r = (o = storageLocal.getItem("kLov")[a]) == null ? void 0 : o.children.find((e) => l === e.dictCode)) == null ? void 0 : r.dictName;
10425
10427
  };
10426
10428
  export {
10427
10429
  G as NProgress,