@utogether/utils 3.0.0-beta.25 → 3.0.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utils.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var T = Object.defineProperty;
2
- var j = (a, l, h) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
3
- var k = (a, l, h) => j(a, typeof l != "symbol" ? l + "" : l, h);
2
+ var U = (a, l, o) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
3
+ var k = (a, l, o) => U(a, typeof l != "symbol" ? l + "" : l, o);
4
4
  import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
5
5
  import dayjs from "dayjs";
6
6
  import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, has } from "xe-utils";
@@ -20,8 +20,8 @@ class sessionStorageProxy {
20
20
  this.storage = l;
21
21
  }
22
22
  // 存
23
- setItem(l, h) {
24
- this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(h || null));
23
+ setItem(l, o) {
24
+ this.storage.setItem && this.storage.setItem(this.getKey(l), JSON.stringify(o || 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, h) {
57
- this.storage.setItem(l, h);
56
+ setItem(l, o) {
57
+ this.storage.setItem(l, o);
58
58
  }
59
59
  // 取
60
60
  getItem(l) {
@@ -73,14 +73,14 @@ const storageSession = new sessionStorageProxy(sessionStorage), storageLocal = n
73
73
  /*! typescript-cookie v1.0.6 | MIT */
74
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));
75
75
  function stringifyAttributes(a) {
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("");
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, o]) => o != null && o !== !1).map(([l, o]) => o === !0 ? `; ${l}` : `; ${l}=${o.split(";")[0]}`).join("");
77
77
  }
78
- function get(a, l, h) {
79
- const o = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
78
+ function get(a, l, o) {
79
+ const h = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
80
80
  let c;
81
- for (; (c = o.exec(document.cookie)) != null; )
81
+ for (; (c = h.exec(document.cookie)) != null; )
82
82
  try {
83
- const i = h(c[1]);
83
+ const i = o(c[1]);
84
84
  if (r[i] = l(c[2], i), a === i)
85
85
  break;
86
86
  } catch {
@@ -95,11 +95,11 @@ const DEFAULT_CODEC = Object.freeze({
95
95
  }), DEFAULT_ATTRIBUTES = Object.freeze({
96
96
  path: "/"
97
97
  });
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)}`;
98
+ function setCookie(a, l, o = DEFAULT_ATTRIBUTES, { encodeValue: h = encodeValue, encodeName: r = encodeName } = {}) {
99
+ return document.cookie = `${r(a)}=${h(l, a)}${stringifyAttributes(o)}`;
100
100
  }
101
- function getCookie(a, { decodeValue: l = decodeValue, decodeName: h = decodeName } = {}) {
102
- return get(a, l, h);
101
+ function getCookie(a, { decodeValue: l = decodeValue, decodeName: o = decodeName } = {}) {
102
+ return get(a, l, o);
103
103
  }
104
104
  function getCookies({ decodeValue: a = decodeValue, decodeName: l = decodeName } = {}) {
105
105
  return get(void 0, a, l);
@@ -110,7 +110,7 @@ function removeCookie(a, l = DEFAULT_ATTRIBUTES) {
110
110
  }));
111
111
  }
112
112
  function init(a, l) {
113
- const h = {
113
+ const o = {
114
114
  set: function(r, c, i) {
115
115
  return setCookie(r, c, Object.assign({}, this.attributes, i), {
116
116
  encodeValue: this.converter.write
@@ -131,11 +131,11 @@ function init(a, l) {
131
131
  withConverter: function(r) {
132
132
  return init(Object.assign({}, this.converter, r), this.attributes);
133
133
  }
134
- }, o = {
134
+ }, h = {
135
135
  attributes: { value: Object.freeze(l) },
136
136
  converter: { value: Object.freeze(a) }
137
137
  };
138
- return Object.create(h, o);
138
+ return Object.create(o, h);
139
139
  }
140
140
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
141
141
  class Cookies {
@@ -151,8 +151,8 @@ class Cookies {
151
151
  * @param value
152
152
  * @param cookieSetting
153
153
  */
154
- set(l = "default", h = "") {
155
- setCookie(`${this.getKey(l)}`, h);
154
+ set(l = "default", o = "") {
155
+ setCookie(`${this.getKey(l)}`, o);
156
156
  }
157
157
  /**
158
158
  * 拿到 cookie 值
@@ -191,9 +191,69 @@ const VxetableRender = (VXETable, {
191
191
  const dict = storageLocal.getItem("kLov");
192
192
  VXETable.renderer.add("#SuSelect", {
193
193
  renderTableEdit(a, l) {
194
- let h;
194
+ let o;
195
195
  const {
196
- row: o,
196
+ row: h,
197
+ column: r
198
+ } = l, {
199
+ options: c,
200
+ props: i,
201
+ optionProps: Z = {},
202
+ events: e
203
+ } = a, {
204
+ label: v = "label",
205
+ value: d = "value"
206
+ } = Z, {
207
+ loading: m = !1,
208
+ multiple: V,
209
+ mapField: u
210
+ } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
211
+ H.setDefaultValue(i, h, r.field);
212
+ function n(f) {
213
+ H.remote(f, r.field, a);
214
+ }
215
+ function y(f) {
216
+ H.selectChange(f, h, r.field, a, {
217
+ column: r,
218
+ datasource: "row"
219
+ });
220
+ }
221
+ function C(f) {
222
+ e != null && e.input && e.input(l, f);
223
+ }
224
+ function A() {
225
+ H.clear(h, r.field, u, e, "row");
226
+ }
227
+ function w() {
228
+ !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
229
+ }
230
+ return [createVNode(resolveComponent("el-select"), mergeProps({
231
+ modelValue: h[p],
232
+ "onUpdate:modelValue": (f) => h[p] = f,
233
+ filterable: !0,
234
+ remote: !0,
235
+ clearable: !0,
236
+ placeholder: "请录入关键字搜索",
237
+ style: "width: 100%",
238
+ "remote-method": n,
239
+ loading: m
240
+ }, i, {
241
+ onFocus: () => w(),
242
+ onChange: (f) => y(f),
243
+ onClear: () => A(),
244
+ onInput: (f) => C(f)
245
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
246
+ key: f[d],
247
+ label: f[v],
248
+ value: f[d]
249
+ }, null))) ? o : {
250
+ default: () => [o]
251
+ })];
252
+ },
253
+ renderTableDefault(a, l) {
254
+ let o;
255
+ const {
256
+ row: h,
197
257
  column: r
198
258
  } = l, {
199
259
  options: c,
@@ -201,53 +261,53 @@ const VxetableRender = (VXETable, {
201
261
  optionProps: Z = {},
202
262
  events: e
203
263
  } = a, {
204
- label: t = "label",
264
+ label: v = "label",
205
265
  value: d = "value"
206
266
  } = Z, {
207
- loading: f = !1,
208
- multiple: m,
267
+ loading: m = !1,
268
+ multiple: V,
209
269
  mapField: u
210
- } = i, V = useComponent(), p = m ? `_${r.field}` : r.field;
211
- V.setDefaultValue(i, o, r.field);
212
- function n(H) {
213
- V.remote(H, r.field, a);
270
+ } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
271
+ H.setDefaultValue(i, h, r.field);
272
+ function n(f) {
273
+ H.remote(f, r.field, a);
214
274
  }
215
- function L(H) {
216
- V.selectChange(H, data, r.field, a, {
275
+ function y(f) {
276
+ H.selectChange(f, h, r.field, a, {
217
277
  column: r,
218
278
  datasource: "row"
219
279
  });
220
280
  }
221
- function C(H) {
222
- e != null && e.input && e.input(l, H);
281
+ function C(f) {
282
+ e != null && e.input && e.input(l, f);
223
283
  }
224
284
  function A() {
225
- V.clear(o, r.field, u, e, "row");
285
+ H.clear(h, r.field, u, e, "row");
226
286
  }
227
287
  function w() {
228
288
  !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
229
289
  }
230
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
231
- modelValue: o[p],
232
- "onUpdate:modelValue": (H) => o[p] = H,
291
+ modelValue: h[p],
292
+ "onUpdate:modelValue": (f) => h[p] = f,
233
293
  filterable: !0,
234
294
  remote: !0,
235
295
  clearable: !0,
236
296
  placeholder: "请录入关键字搜索",
237
297
  style: "width: 100%",
238
298
  "remote-method": n,
239
- loading: f
299
+ loading: m
240
300
  }, i, {
241
301
  onFocus: () => w(),
242
- onChange: (H) => L(H),
302
+ onChange: (f) => y(f),
243
303
  onClear: () => A(),
244
- onInput: (H) => C(H)
245
- }), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
246
- key: H[d],
247
- label: H[t],
248
- value: H[d]
249
- }, null))) ? h : {
250
- default: () => [h]
304
+ onInput: (f) => C(f)
305
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
306
+ key: f[d],
307
+ label: f[v],
308
+ value: f[d]
309
+ }, null))) ? o : {
310
+ default: () => [o]
251
311
  })];
252
312
  },
253
313
  // 可编辑显示模板
@@ -265,9 +325,9 @@ const VxetableRender = (VXETable, {
265
325
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), val && multiple && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
266
326
  },
267
327
  renderItemContent(a, l) {
268
- let h;
328
+ let o;
269
329
  const {
270
- data: o,
330
+ data: h,
271
331
  field: r
272
332
  } = l, {
273
333
  options: c,
@@ -275,34 +335,34 @@ const VxetableRender = (VXETable, {
275
335
  optionProps: Z = {},
276
336
  events: e
277
337
  } = a, {
278
- label: t = "label",
338
+ label: v = "label",
279
339
  value: d = "value"
280
340
  } = Z, {
281
- mapField: f,
282
- multiple: m,
341
+ mapField: m,
342
+ multiple: V,
283
343
  loading: u = !1
284
- } = i, V = useComponent(), p = m ? `_${r}` : r;
285
- V.setDefaultValue(i, o, r);
286
- async function n(H) {
287
- V.remote(H, r, a);
344
+ } = i, H = useComponent(), p = V ? `_${r}` : r;
345
+ H.setDefaultValue(i, h, r);
346
+ async function n(f) {
347
+ H.remote(f, r, a);
288
348
  }
289
- function L(H) {
290
- V.selectChange(H, o, r, a, {
349
+ function y(f) {
350
+ H.selectChange(f, h, r, a, {
291
351
  datasource: "data"
292
352
  });
293
353
  }
294
- function C(H) {
295
- e != null && e.input && e.input(l, H);
354
+ function C(f) {
355
+ e != null && e.input && e.input(l, f);
296
356
  }
297
357
  function A() {
298
- V.clear(o, r, f, e, "data");
358
+ H.clear(h, r, m, e, "data");
299
359
  }
300
360
  function w() {
301
361
  !c.length && n(""), e != null && e.focus && e.focus(l);
302
362
  }
303
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
304
- modelValue: o[p],
305
- "onUpdate:modelValue": (H) => o[p] = H,
364
+ modelValue: h[p],
365
+ "onUpdate:modelValue": (f) => h[p] = f,
306
366
  filterable: !0,
307
367
  remote: !0,
308
368
  clearable: !0,
@@ -312,26 +372,26 @@ const VxetableRender = (VXETable, {
312
372
  "remote-method": n
313
373
  }, i, {
314
374
  onFocus: () => w(),
315
- onChange: (H) => L(H),
375
+ onChange: (f) => y(f),
316
376
  onClear: () => A(),
317
377
  onInput: () => C()
318
- }), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
319
- key: H[d],
320
- label: H[t],
321
- value: H[d]
322
- }, null))) ? h : {
323
- default: () => [h]
378
+ }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
379
+ key: f[d],
380
+ label: f[v],
381
+ value: f[d]
382
+ }, null))) ? o : {
383
+ default: () => [o]
324
384
  })];
325
385
  }
326
386
  }), VXETable.renderer.add("#SuDateRange", {
327
387
  renderItemContent(a, l) {
328
388
  const {
329
- data: h,
330
- field: o
389
+ data: o,
390
+ field: h
331
391
  } = l, {
332
392
  props: r
333
393
  } = a;
334
- r != null && r.defaultValue && !h[o] && (h[o] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
394
+ r != null && r.defaultValue && !o[h] && (o[h] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
335
395
  const c = /* @__PURE__ */ new Date(), i = [{
336
396
  text: i18n("message.udp.today", !0),
337
397
  value: () => [Z(1, "day"), c]
@@ -353,10 +413,10 @@ const VxetableRender = (VXETable, {
353
413
  }, {
354
414
  text: i18n("message.udp.anniversary", !0),
355
415
  value: () => [Z(1, "year"), c]
356
- }], Z = (e, t) => dayjs().subtract(e, t).add("1", "day").format();
416
+ }], Z = (e, v) => dayjs().subtract(e, v).add("1", "day").format();
357
417
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
358
- modelValue: h[o],
359
- "onUpdate:modelValue": (e) => h[o] = e,
418
+ modelValue: o[h],
419
+ "onUpdate:modelValue": (e) => o[h] = e,
360
420
  type: (r == null ? void 0 : r.type) || "daterange",
361
421
  shortcuts: i,
362
422
  style: "width: 100%",
@@ -367,9 +427,9 @@ const VxetableRender = (VXETable, {
367
427
  }
368
428
  }), VXETable.renderer.add("#select", {
369
429
  renderTableEdit(a, l) {
370
- let h;
430
+ let o;
371
431
  const {
372
- row: o,
432
+ row: h,
373
433
  column: r
374
434
  } = l, {
375
435
  options: c,
@@ -377,48 +437,48 @@ const VxetableRender = (VXETable, {
377
437
  optionProps: Z = {},
378
438
  events: e
379
439
  } = a, {
380
- label: t = "label",
440
+ label: v = "label",
381
441
  value: d = "value",
382
- extLabel: f
442
+ extLabel: m
383
443
  } = Z, {
384
- mapField: m
444
+ mapField: V
385
445
  } = i, u = useComponent();
386
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
387
- !c.some((C) => C[t] === n) && c.push({
446
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
447
+ !c.some((C) => C[v] === n) && c.push({
388
448
  [d]: n,
389
- [t]: n
449
+ [v]: n
390
450
  });
391
451
  });
392
- function V(n) {
393
- u.selectChange(n, o, r.field, a, {
452
+ function H(n) {
453
+ u.selectChange(n, h, r.field, a, {
394
454
  column: r,
395
455
  datasource: "row"
396
456
  });
397
457
  }
398
458
  function p() {
399
- u.clear(o, r.field, m, e, "row");
459
+ u.clear(h, r.field, V, e, "row");
400
460
  }
401
461
  return [createVNode(resolveComponent("el-select"), mergeProps({
402
- modelValue: o[r.field],
403
- "onUpdate:modelValue": (n) => o[r.field] = n,
462
+ modelValue: h[r.field],
463
+ "onUpdate:modelValue": (n) => h[r.field] = n,
404
464
  filterable: !0,
405
465
  clearable: !0
406
466
  }, i, {
407
467
  style: "width: 100%",
408
- onChange: (n) => V(n),
468
+ onChange: (n) => H(n),
409
469
  onClear: () => p()
410
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
470
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
411
471
  key: n[d],
412
- label: f && n[f] ? n[d] : n[t],
472
+ label: m && n[m] ? n[d] : n[v],
413
473
  value: n[d]
414
- }, null))) ? h : {
415
- default: () => [h]
474
+ }, null))) ? o : {
475
+ default: () => [o]
416
476
  })];
417
477
  },
418
478
  renderTableDefault(a, l) {
419
- let h;
479
+ let o;
420
480
  const {
421
- row: o,
481
+ row: h,
422
482
  column: r
423
483
  } = l, {
424
484
  options: c,
@@ -426,42 +486,42 @@ const VxetableRender = (VXETable, {
426
486
  optionProps: Z = {},
427
487
  events: e
428
488
  } = a, {
429
- label: t = "label",
489
+ label: v = "label",
430
490
  value: d = "value",
431
- extLabel: f
491
+ extLabel: m
432
492
  } = Z, {
433
- mapField: m
493
+ mapField: V
434
494
  } = i, u = useComponent();
435
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
436
- !c.some((C) => C[t] === n) && c.push({
495
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
496
+ !c.some((C) => C[v] === n) && c.push({
437
497
  [d]: n,
438
- [t]: n
498
+ [v]: n
439
499
  });
440
500
  });
441
- function V(n) {
442
- u.selectChange(n, o, r.field, a, {
501
+ function H(n) {
502
+ u.selectChange(n, h, r.field, a, {
443
503
  column: r,
444
504
  datasource: "row"
445
505
  });
446
506
  }
447
507
  function p() {
448
- u.clear(o, r.field, m, e, "row");
508
+ u.clear(h, r.field, V, e, "row");
449
509
  }
450
510
  return [createVNode(resolveComponent("el-select"), mergeProps({
451
- modelValue: o[r.field],
452
- "onUpdate:modelValue": (n) => o[r.field] = n,
511
+ modelValue: h[r.field],
512
+ "onUpdate:modelValue": (n) => h[r.field] = n,
453
513
  filterable: !0,
454
514
  clearable: !0
455
515
  }, i, {
456
516
  style: "width: 100%",
457
- onChange: (n) => V(n),
517
+ onChange: (n) => H(n),
458
518
  onClear: () => p()
459
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
519
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
460
520
  key: n[d],
461
- label: f && n[f] ? n[d] : n[t],
521
+ label: m && n[m] ? n[d] : n[v],
462
522
  value: n[d]
463
- }, null))) ? h : {
464
- default: () => [h]
523
+ }, null))) ? o : {
524
+ default: () => [o]
465
525
  })];
466
526
  },
467
527
  // 可编辑显示模板
@@ -485,9 +545,9 @@ const VxetableRender = (VXETable, {
485
545
  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])];
486
546
  },
487
547
  renderItemContent(a, l) {
488
- let h;
548
+ let o;
489
549
  const {
490
- data: o,
550
+ data: h,
491
551
  field: r
492
552
  } = l, {
493
553
  options: c,
@@ -495,43 +555,43 @@ const VxetableRender = (VXETable, {
495
555
  optionProps: Z = {},
496
556
  events: e
497
557
  } = a, {
498
- label: t = "label",
558
+ label: v = "label",
499
559
  value: d = "value"
500
- } = Z, f = useComponent(), {
501
- defaultValues: m,
560
+ } = Z, m = useComponent(), {
561
+ defaultValues: V,
502
562
  mapField: u
503
563
  } = i;
504
- m && (o[r] = m);
505
- function V(n) {
506
- f.selectChange(n, o, r, a, {
564
+ V && (h[r] = V);
565
+ function H(n) {
566
+ m.selectChange(n, h, r, a, {
507
567
  datasource: "data"
508
568
  });
509
569
  }
510
570
  function p() {
511
- f.clear(o, r, u, e, "data");
571
+ m.clear(h, r, u, e, "data");
512
572
  }
513
573
  return [createVNode(resolveComponent("el-select"), mergeProps({
514
- modelValue: o[r],
515
- "onUpdate:modelValue": (n) => o[r] = n,
574
+ modelValue: h[r],
575
+ "onUpdate:modelValue": (n) => h[r] = n,
516
576
  filterable: !0,
517
577
  clearable: !0,
518
578
  style: "width: 100%"
519
579
  }, i, {
520
- onChange: (n) => V(n),
580
+ onChange: (n) => H(n),
521
581
  onClear: () => p()
522
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
582
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
523
583
  key: n[d],
524
- label: n[t],
584
+ label: n[v],
525
585
  value: n[d]
526
- }, null))) ? h : {
527
- default: () => [h]
586
+ }, null))) ? o : {
587
+ default: () => [o]
528
588
  })];
529
589
  }
530
590
  }), VXETable.renderer.add("#lov", {
531
591
  renderItemContent(a, l) {
532
592
  const {
533
- data: h,
534
- field: o
593
+ data: o,
594
+ field: h
535
595
  } = l, {
536
596
  props: r,
537
597
  events: c
@@ -539,147 +599,148 @@ const VxetableRender = (VXETable, {
539
599
  defaultValues: Z,
540
600
  mapField: e
541
601
  } = r;
542
- Z && (h[o] = Z);
543
- function t(f, m) {
602
+ Z && (o[h] = Z);
603
+ function v(m, V) {
544
604
  const {
545
605
  mapField: u,
546
- field: V,
606
+ field: H,
547
607
  displayName: p,
548
608
  multiple: n
549
609
  } = r;
550
610
  if (n) {
551
611
  if (n) {
552
612
  const C = {};
553
- h[p || V] = f.reduce((A, w) => {
554
- for (const H in u)
555
- C[H] = A ? C[H] + "," + w[u[H]] : w[u[H]];
556
- return A = A ? A + "," + w[p || V] : w[p || V], A;
557
- }, ""), Object.assign(h, C);
613
+ o[p || H] = m.reduce((A, w) => {
614
+ for (const f in u)
615
+ C[f] = A ? C[f] + "," + w[u[f]] : w[u[f]];
616
+ return A = A ? A + "," + w[p || H] : w[p || H], A;
617
+ }, ""), Object.assign(o, C);
558
618
  }
559
619
  } else {
560
620
  const C = {
561
- [p || V]: f[m || p || V]
621
+ [p || H]: m[V || p || H]
562
622
  };
563
623
  for (const A in u)
564
- C[A] = f[u[A]];
565
- Object.assign(h, C);
624
+ C[A] = m[u[A]];
625
+ Object.assign(o, C);
566
626
  }
567
- const L = {
568
- row: h,
569
- property: V,
570
- item: f,
571
- field: V
627
+ const y = {
628
+ row: o,
629
+ property: H,
630
+ item: m,
631
+ field: H
572
632
  };
573
- c != null && c.change && c.change(L);
633
+ c != null && c.change && c.change(y);
574
634
  }
575
635
  function d() {
576
- i.clear(h, o, e, c, "data");
636
+ i.clear(o, h, e, c, "data");
577
637
  }
578
638
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
579
- record: h
639
+ record: o
580
640
  }, r, {
581
641
  mode: "vxe",
582
- onChange: (f, m) => t(f, m),
642
+ onChange: (m, V) => v(m, V),
583
643
  onClear: () => d()
584
644
  }), null)];
585
645
  },
586
646
  // 单元格编辑
587
647
  renderTableEdit(a, l) {
588
648
  const {
589
- row: h,
590
- column: o
649
+ row: o,
650
+ column: h
591
651
  } = l, {
592
652
  props: r,
593
653
  events: c
594
654
  } = a, i = useComponent();
595
- function Z(t, d) {
655
+ function Z(v, d) {
596
656
  const {
597
- mapField: f,
598
- field: m,
657
+ mapField: m,
658
+ field: V,
599
659
  displayName: u,
600
- multiple: V
660
+ multiple: H
601
661
  } = r;
602
- if (!V) {
662
+ if (!H) {
603
663
  const p = {
604
- [u || m]: t[d || u || m]
664
+ [u || V]: v[d || u || V]
605
665
  };
606
- for (const n in f)
607
- p[n] = t[f[n]];
608
- Object.assign(h, p);
666
+ for (const n in m)
667
+ p[n] = v[m[n]];
668
+ Object.assign(o, p);
609
669
  }
610
- c != null && c.change && c.change(l, t, h[o.field]);
670
+ c != null && c.change && c.change(l, v, o[h.field]);
611
671
  }
612
672
  function e() {
613
- i.clear(h, field, mapField, c, "row");
673
+ i.clear(o, h.field, mapField, c, "row");
614
674
  }
615
675
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
616
- record: h,
617
- mode: "vxe"
676
+ record: o,
677
+ mode: "vxe",
678
+ transfer: !0
618
679
  }, r, {
619
- onChange: (t, d) => Z(t, d),
680
+ onChange: (v, d) => Z(v, d),
620
681
  onClear: () => e()
621
682
  }), null)];
622
683
  },
623
684
  // 单元格默认
624
685
  renderTableDefault(a, l) {
625
686
  const {
626
- row: h,
627
- column: o
687
+ row: o,
688
+ column: h
628
689
  } = l, {
629
690
  props: r,
630
691
  events: c
631
692
  } = a, i = useComponent();
632
- function Z(t, d) {
693
+ function Z(v, d) {
633
694
  const {
634
- mapField: f,
635
- field: m,
695
+ mapField: m,
696
+ field: V,
636
697
  displayName: u,
637
- multiple: V
698
+ multiple: H
638
699
  } = r;
639
- if (!V) {
700
+ if (!H) {
640
701
  const p = {
641
- [u || m]: t[d || u || m]
702
+ [u || V]: v[d || u || V]
642
703
  };
643
- for (const n in f)
644
- p[n] = t[f[n]];
645
- Object.assign(h, p);
704
+ for (const n in m)
705
+ p[n] = v[m[n]];
706
+ Object.assign(o, p);
646
707
  }
647
- c != null && c.change && c.change(l, t, h[o.field]);
708
+ c != null && c.change && c.change(l, v, o[h.field]);
648
709
  }
649
710
  function e() {
650
- i.clear(h, field, mapField, c, "row");
711
+ i.clear(o, h.field, mapField, c, "row");
651
712
  }
652
713
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
653
- record: h,
714
+ record: o,
654
715
  mode: "ele"
655
716
  }, r, {
656
- onChange: (t, d) => Z(t, d),
717
+ onChange: (v, d) => Z(v, d),
657
718
  onClear: () => e()
658
719
  }), null)];
659
720
  },
660
721
  // 可编辑显示模板
661
722
  renderTableCell(a, l) {
662
723
  const {
663
- row: h,
664
- column: o
724
+ row: o,
725
+ column: h
665
726
  } = l;
666
- return [createVNode("span", null, [h[o.field]])];
727
+ return [createVNode("span", null, [o[h.field]])];
667
728
  }
668
729
  }), VXETable.renderer.add("#upload", {
669
730
  renderItemContent(a, l) {
670
731
  const {
671
- data: h,
672
- field: o
732
+ data: o,
733
+ field: h
673
734
  } = l, {
674
735
  props: r,
675
736
  events: c
676
737
  } = a;
677
738
  function i() {
678
- h[o] = "", componentHook.clear(h, o, r.mapField, c, "data");
739
+ o[h] = "", componentHook.clear(o, h, r.mapField, c, "data");
679
740
  }
680
741
  return [createVNode(resolveComponent("form-upload"), mergeProps({
681
- record: h,
682
- field: o
742
+ record: o,
743
+ field: h
683
744
  }, r, {
684
745
  onClear: () => i()
685
746
  }), null)];
@@ -687,9 +748,9 @@ const VxetableRender = (VXETable, {
687
748
  }), VXETable.renderer.add("#tag", {
688
749
  // 默认显示模板
689
750
  renderTableDefault(a, l) {
690
- let h;
751
+ let o;
691
752
  const {
692
- row: o,
753
+ row: h,
693
754
  column: r
694
755
  } = l, {
695
756
  props: {
@@ -698,20 +759,20 @@ const VxetableRender = (VXETable, {
698
759
  }
699
760
  } = a;
700
761
  function Z() {
701
- return o[r.field] ? i[o[r.field]] : null;
762
+ return h[r.field] ? i[h[r.field]] : null;
702
763
  }
703
- return [o[r.field] ? createVNode(resolveComponent("el-tag"), {
764
+ return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
704
765
  effect: "dark",
705
766
  type: Z()
706
- }, _isSlot(h = getValue(c, o[r.field])) ? h : {
707
- default: () => [h]
767
+ }, _isSlot(o = getValue(c, h[r.field])) ? o : {
768
+ default: () => [o]
708
769
  }) : null];
709
770
  }
710
771
  }), VXETable.renderer.add("#switch", {
711
772
  renderTableDefault(a, l) {
712
773
  const {
713
- row: h,
714
- column: o
774
+ row: o,
775
+ column: h
715
776
  } = l, {
716
777
  props: {
717
778
  code: r,
@@ -720,114 +781,114 @@ const VxetableRender = (VXETable, {
720
781
  },
721
782
  events: Z
722
783
  } = a;
723
- function e(t) {
784
+ function e(v) {
724
785
  const d = {
725
- row: h,
726
- column: o,
727
- value: t
786
+ row: o,
787
+ column: h,
788
+ value: v
728
789
  };
729
790
  Z != null && Z.change && Z.change(d);
730
791
  }
731
- return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
732
- modelValue: h[o.field],
733
- "onUpdate:modelValue": (t) => h[o.field] = t,
792
+ return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
793
+ modelValue: o[h.field],
794
+ "onUpdate:modelValue": (v) => o[h.field] = v,
734
795
  "inline-prompt": !0,
735
796
  size: "large",
736
797
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
737
798
  }, a.props, {
738
799
  "active-text": getValue(r, c),
739
800
  "inactive-text": getValue(r, i),
740
- onChange: (t) => e(t)
801
+ onChange: (v) => e(v)
741
802
  }), null) : null];
742
803
  }
743
804
  }), VXETable.renderer.add("#iconSelect", {
744
805
  renderTableEdit(a, l) {
745
806
  const {
746
- row: h,
747
- column: o
807
+ row: o,
808
+ column: h
748
809
  } = l;
749
810
  return [createVNode(resolveComponent("SuIconSelect"), {
750
- modelValue: h[o.field],
751
- "onUpdate:modelValue": (r) => h[o.field] = r,
811
+ modelValue: o[h.field],
812
+ "onUpdate:modelValue": (r) => o[h.field] = r,
752
813
  teleported: !1
753
814
  }, null)];
754
815
  },
755
816
  renderTableCell(a, l) {
756
817
  const {
757
- row: h,
758
- column: o
818
+ row: o,
819
+ column: h
759
820
  } = l;
760
821
  return [createVNode(resolveComponent("IconifyIconOffline"), {
761
- icon: h[o.field],
822
+ icon: o[h.field],
762
823
  style: "font-size: 16px;"
763
824
  }, null)];
764
825
  },
765
826
  renderItemContent(a, l) {
766
827
  const {
767
- data: h,
768
- field: o
828
+ data: o,
829
+ field: h
769
830
  } = l;
770
831
  return [createVNode(resolveComponent("SuIconSelect"), {
771
- modelValue: h[o],
772
- "onUpdate:modelValue": (r) => h[o] = r,
832
+ modelValue: o[h],
833
+ "onUpdate:modelValue": (r) => o[h] = r,
773
834
  teleported: !0
774
835
  }, null)];
775
836
  }
776
837
  }), VXETable.renderer.add("#treeSelect", {
777
838
  renderTableEdit(a, l) {
778
839
  const {
779
- row: h,
780
- column: o
840
+ row: o,
841
+ column: h
781
842
  } = l, {
782
843
  props: r,
783
844
  sourceData: c,
784
845
  events: i
785
846
  } = a;
786
847
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
787
- modelValue: h[o.field],
788
- "onUpdate:modelValue": (Z) => h[o.field] = Z,
848
+ modelValue: o[h.field],
849
+ "onUpdate:modelValue": (Z) => o[h.field] = Z,
789
850
  data: c,
790
851
  "check-strictly": !0
791
852
  }, r, {
792
853
  filterable: !0,
793
- onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
794
- onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
854
+ onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
855
+ onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
795
856
  onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
796
857
  }), null)];
797
858
  },
798
859
  renderTableCell(a, l) {
799
860
  const {
800
- row: h,
801
- column: o
861
+ row: o,
862
+ column: h
802
863
  } = l, {
803
864
  sourceData: r,
804
865
  props: c = {}
805
866
  } = a, {
806
867
  children: i = "children",
807
868
  label: Z = "label"
808
- } = c, e = findTree(r, (t) => t.value === h[o.field], {
869
+ } = c, e = findTree(r, (v) => v.value === o[h.field], {
809
870
  children: i
810
871
  });
811
872
  return e ? [createVNode("span", null, [e.item[Z]])] : null;
812
873
  },
813
874
  renderItemContent(a, l) {
814
875
  const {
815
- data: h,
816
- field: o
876
+ data: o,
877
+ field: h
817
878
  } = l, {
818
879
  props: r,
819
880
  sourceData: c,
820
881
  events: i
821
882
  } = a;
822
883
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
823
- modelValue: h[o],
824
- "onUpdate:modelValue": (Z) => h[o] = Z,
884
+ modelValue: o[h],
885
+ "onUpdate:modelValue": (Z) => o[h] = Z,
825
886
  data: c,
826
887
  "check-strictly": !0
827
888
  }, r, {
828
889
  filterable: !0,
829
- onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
830
- onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
890
+ onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
891
+ onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
831
892
  onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
832
893
  }), null)];
833
894
  }
@@ -835,8 +896,8 @@ const VxetableRender = (VXETable, {
835
896
  const useComponent = () => ({
836
897
  clear: (r, c, i, Z, e) => {
837
898
  if (r[c] = null, !isEmpty(i))
838
- for (const t in i)
839
- r[t] = null;
899
+ for (const v in i)
900
+ r[v] = null;
840
901
  Z != null && Z.clear && Z.clear({
841
902
  [e]: r,
842
903
  field: c
@@ -846,107 +907,107 @@ const VxetableRender = (VXETable, {
846
907
  const {
847
908
  options: Z,
848
909
  props: e,
849
- events: t
910
+ events: v
850
911
  } = i, {
851
912
  fetchField: d,
852
- url: f,
853
- defaultParams: m = {},
913
+ url: m,
914
+ defaultParams: V = {},
854
915
  method: u = "get"
855
- } = e, V = getCookieParam(), p = Object.assign({
916
+ } = e, H = getCookieParam(), p = Object.assign({
856
917
  pageSize: 20,
857
918
  pageNum: 1,
858
- ...V,
859
- ...m
919
+ ...H,
920
+ ...V
860
921
  }, {
861
922
  [d || c]: r
862
923
  });
863
924
  if (e.loading) return;
864
925
  let n;
865
926
  try {
866
- Z.length = 0, e.loading = !0, n = await serviceApi[u](f, p), t != null && t.filterMethod ? Z.push(...t.filterMethod(n.list || n)) : n && (n.list ? Z.push(...n.list) : Z.push(...n));
927
+ Z.length = 0, e.loading = !0, n = await serviceApi[u](m, p), v != null && v.filterMethod ? Z.push(...v.filterMethod(n.list || n)) : n && (n.list ? Z.push(...n.list) : Z.push(...n));
867
928
  } finally {
868
929
  e.loading = !1;
869
930
  }
870
931
  },
871
932
  selectChange: (r, c, i, Z, e) => {
872
- let t = null;
933
+ let v = null;
873
934
  const {
874
935
  datasource: d
875
936
  } = e, {
876
- options: f,
877
- props: m,
937
+ options: m,
938
+ props: V,
878
939
  optionProps: u = {},
879
- events: V
940
+ events: H
880
941
  } = Z, p = {
881
942
  [d]: c,
882
943
  field: i
883
944
  };
884
- c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","), t = [], r.forEach((n) => {
885
- const L = f.find((C) => n === C[u == null ? void 0 : u.value]);
886
- L && !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((C) => {
887
- const A = L[m.mapField[C]], w = c[C] ? c[C].toString() : "";
945
+ c[i] = null, !isEmpty(r) && (V != null && V.multiple) ? (c[i] = r.join(","), v = [], r.forEach((n) => {
946
+ const y = m.find((C) => n === C[u == null ? void 0 : u.value]);
947
+ y && !isEmpty(V.mapField) && isObject(V.mapField) && Object.keys(V.mapField).forEach((C) => {
948
+ const A = y[V.mapField[C]], w = c[C] ? c[C].toString() : "";
888
949
  c[C] = w && !w.includes(A) ? `${w},${A}` : A;
889
- }), L && t.push(L);
950
+ }), y && v.push(y);
890
951
  }), Object.assign(p, {
891
- options: t
892
- })) : (c[i] = m != null && m.multiple ? null : r, t = f.find((n) => r === n[u == null ? void 0 : u.value]), !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((n) => {
893
- c[n] = t ? t[m.mapField[n]] : null;
952
+ options: v
953
+ })) : (c[i] = V != null && V.multiple ? null : r, v = m.find((n) => r === n[u == null ? void 0 : u.value]), !isEmpty(V.mapField) && isObject(V.mapField) && Object.keys(V.mapField).forEach((n) => {
954
+ c[n] = v ? v[V.mapField[n]] : null;
894
955
  }), Object.assign(p, {
895
- option: t
956
+ option: v
896
957
  })), d === "row" && Object.assign(p, {
897
958
  column: e.column
898
- }), V != null && V.change && V.change(p);
959
+ }), H != null && H.change && H.change(p);
899
960
  },
900
961
  setDefaultValue: (r, c, i) => {
901
962
  var d;
902
963
  const {
903
964
  multiple: Z,
904
965
  defaultValue: e
905
- } = r, t = Z ? `_${i}` : i;
906
- !c[i] && e && (c[i] = e, isPlainObject(e) && Object.keys(e).forEach((m) => {
907
- c[m] = c[m] || e[m];
908
- })), !c[t] && c[i] && (c[t] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
966
+ } = r, v = Z ? `_${i}` : i;
967
+ !c[i] && e && (c[i] = e, isPlainObject(e) && Object.keys(e).forEach((V) => {
968
+ c[V] = c[V] || e[V];
969
+ })), !c[v] && c[i] && (c[v] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
909
970
  }
910
- }), onCheckChange = (a, l, h, o) => {
911
- console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
912
- }, onNodeClick = (a, l, h, o) => {
913
- o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
914
- }, onCurrentChange = (a, l, h) => {
915
- h != null && h.checkChange && (h == null || h.checkChange(a, l));
971
+ }), onCheckChange = (a, l, o, h) => {
972
+ console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
973
+ }, onNodeClick = (a, l, o, h) => {
974
+ h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
975
+ }, onCurrentChange = (a, l, o) => {
976
+ o != null && o.checkChange && (o == null || o.checkChange(a, l));
916
977
  };
917
978
  function getValue(a, l) {
918
- var h, o, r;
919
- return !l || !a || !dict ? l : (r = (o = (h = dict[a]) == null ? void 0 : h.children) == null ? void 0 : o.find((c) => c.dictCode === l)) == null ? void 0 : r.dictName;
979
+ var o, h, r;
980
+ return !l || !a || !dict ? l : (r = (h = (o = dict[a]) == null ? void 0 : o.children) == null ? void 0 : h.find((c) => c.dictCode === l)) == null ? void 0 : r.dictName;
920
981
  }
921
982
  return VXETable;
922
983
  }, getCookieParam = () => {
923
984
  const a = "kCookies_param";
924
985
  return cookies.get(a) ? JSON.parse(cookies.get(a)) : {};
925
986
  }, hasClass = (a, l) => {
926
- var h;
927
- return !!((h = a.className) != null && h.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
928
- }, addClass = (a, l, h) => {
929
- hasClass(a, l) || (a.className += " " + l), h && (hasClass(a, h) || (a.className += " " + h));
930
- }, removeClass = (a, l, h) => {
931
- var o, r;
987
+ var o;
988
+ return !!((o = a.className) != null && o.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
989
+ }, addClass = (a, l, o) => {
990
+ hasClass(a, l) || (a.className += " " + l), o && (hasClass(a, o) || (a.className += " " + o));
991
+ }, removeClass = (a, l, o) => {
992
+ var h, r;
932
993
  if (hasClass(a, l)) {
933
994
  const c = new RegExp("(\\s|^)" + l + "(\\s|$)");
934
- a.className = (o = a.className) == null ? void 0 : o.replace(c, " ").trim();
995
+ a.className = (h = a.className) == null ? void 0 : h.replace(c, " ").trim();
935
996
  }
936
- if (h && hasClass(a, h)) {
937
- const c = new RegExp("(\\s|^)" + h + "(\\s|$)");
997
+ if (o && hasClass(a, o)) {
998
+ const c = new RegExp("(\\s|^)" + o + "(\\s|$)");
938
999
  a.className = (r = a.className) == null ? void 0 : r.replace(c, " ").trim();
939
1000
  }
940
- }, toggleClass = (a, l, h) => {
941
- const o = h || document.body;
942
- let { className: r } = o;
943
- r = r == null ? void 0 : r.replace(l, ""), o.className = r && a ? `${r} ${l} ` : r;
1001
+ }, toggleClass = (a, l, o) => {
1002
+ const h = o || document.body;
1003
+ let { className: r } = h;
1004
+ r = r == null ? void 0 : r.replace(l, ""), h.className = r && a ? `${r} ${l} ` : r;
944
1005
  };
945
1006
  function useRafThrottle(a) {
946
1007
  let l = !1;
947
- return function(...h) {
1008
+ return function(...o) {
948
1009
  l || (l = !0, window.requestAnimationFrame(() => {
949
- a.apply(this, h), l = !1;
1010
+ a.apply(this, o), l = !1;
950
1011
  }));
951
1012
  };
952
1013
  }
@@ -955,9 +1016,9 @@ const openLink = (a) => {
955
1016
  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();
956
1017
  }, isServer = typeof window > "u", resizeHandler = (a) => {
957
1018
  for (const l of a) {
958
- const h = l.target.__resizeListeners__ || [];
959
- h.length && h.forEach((o) => {
960
- o();
1019
+ const o = l.target.__resizeListeners__ || [];
1020
+ o.length && o.forEach((h) => {
1021
+ h();
961
1022
  });
962
1023
  }
963
1024
  }, addResizeListener = (a, l) => {
@@ -970,41 +1031,41 @@ const openLink = (a) => {
970
1031
  }, domSymbol = Symbol("watermark-dom");
971
1032
  function useWatermark(a = ref(document.body)) {
972
1033
  const l = useRafThrottle(function() {
973
- const t = unref(a);
974
- if (!t) return;
975
- const { clientHeight: d, clientWidth: f } = t;
976
- i({ height: d, width: f });
977
- }), h = domSymbol.toString(), o = shallowRef(), r = () => {
978
- const t = unref(o);
979
- o.value = void 0;
1034
+ const v = unref(a);
1035
+ if (!v) return;
1036
+ const { clientHeight: d, clientWidth: m } = v;
1037
+ i({ height: d, width: m });
1038
+ }), o = domSymbol.toString(), h = shallowRef(), r = () => {
1039
+ const v = unref(h);
1040
+ h.value = void 0;
980
1041
  const d = unref(a);
981
- d && (t && d.removeChild(t), removeResizeListener(d, l));
1042
+ d && (v && d.removeChild(v), removeResizeListener(d, l));
982
1043
  };
983
- function c(t, d) {
984
- const f = document.createElement("canvas"), m = 260, u = 180;
985
- Object.assign(f, { width: m, height: u });
986
- const V = f.getContext("2d");
987
- return V && (V.rotate(-20 * Math.PI / 120), V.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", V.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", V.textAlign = "left", V.textBaseline = "middle", V.fillText(t, m / 20, u)), f.toDataURL("image/png");
1044
+ function c(v, d) {
1045
+ const m = document.createElement("canvas"), V = 260, u = 180;
1046
+ Object.assign(m, { width: V, height: u });
1047
+ const H = m.getContext("2d");
1048
+ return H && (H.rotate(-20 * Math.PI / 120), H.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", H.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", H.textAlign = "left", H.textBaseline = "middle", H.fillText(v, V / 20, u)), m.toDataURL("image/png");
988
1049
  }
989
- function i(t = {}) {
990
- const d = unref(o);
991
- d && (isUndefined(t.width) || (d.style.width = `${t.width}px`), isUndefined(t.height) || (d.style.height = `${t.height}px`), isUndefined(t.str) || (d.style.background = `url(${c(
992
- t.str,
993
- t.attr
1050
+ function i(v = {}) {
1051
+ const d = unref(h);
1052
+ d && (isUndefined(v.width) || (d.style.width = `${v.width}px`), isUndefined(v.height) || (d.style.height = `${v.height}px`), isUndefined(v.str) || (d.style.background = `url(${c(
1053
+ v.str,
1054
+ v.attr
994
1055
  )}) left top repeat`));
995
1056
  }
996
- const Z = (t, d) => {
997
- if (unref(o))
998
- return i({ str: t, attr: d }), h;
999
- const f = document.createElement("div");
1000
- o.value = f, f.id = h, f.style.pointerEvents = "none", f.style.top = "0px", f.style.left = "0px", f.style.position = "absolute", f.style.zIndex = "100000";
1001
- const m = unref(a);
1002
- if (!m) return h;
1003
- const { clientHeight: u, clientWidth: V } = m;
1004
- return i({ str: t, width: V, height: u, attr: d }), m.appendChild(f), h;
1057
+ const Z = (v, d) => {
1058
+ if (unref(h))
1059
+ return i({ str: v, attr: d }), o;
1060
+ const m = document.createElement("div");
1061
+ h.value = m, m.id = o, m.style.pointerEvents = "none", m.style.top = "0px", m.style.left = "0px", m.style.position = "absolute", m.style.zIndex = "100000";
1062
+ const V = unref(a);
1063
+ if (!V) return o;
1064
+ const { clientHeight: u, clientWidth: H } = V;
1065
+ return i({ str: v, width: H, height: u, attr: d }), V.appendChild(m), o;
1005
1066
  };
1006
- function e(t, d) {
1007
- Z(t, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1067
+ function e(v, d) {
1068
+ Z(v, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1008
1069
  r();
1009
1070
  });
1010
1071
  }
@@ -1017,164 +1078,164 @@ function entries(a) {
1017
1078
  function useAttrs(a = {}) {
1018
1079
  const l = getCurrentInstance();
1019
1080
  if (!l) return {};
1020
- const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), c = o.concat(DEFAULT_EXCLUDE_KEYS);
1081
+ const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), c = h.concat(DEFAULT_EXCLUDE_KEYS);
1021
1082
  return l.attrs = reactive(l.attrs), watchEffect(() => {
1022
- const i = entries(l.attrs).reduce((Z, [e, t]) => (!c.includes(e) && !(h && LISTENER_PREFIX.test(e)) && (Z[e] = t), Z), {});
1083
+ const i = entries(l.attrs).reduce((Z, [e, v]) => (!c.includes(e) && !(o && LISTENER_PREFIX.test(e)) && (Z[e] = v), Z), {});
1023
1084
  r.value = i;
1024
1085
  }), r;
1025
1086
  }
1026
1087
  const useRender = () => {
1027
- const a = { value: "dictCode", label: "dictName" }, l = (v, M) => {
1028
- var E;
1029
- const b = H(M);
1088
+ const a = { value: "dictCode", label: "dictName" }, l = (t, M) => {
1089
+ var F;
1090
+ const b = f(M);
1030
1091
  let s = {
1031
1092
  clearable: !0,
1032
1093
  disabled: !1,
1033
1094
  showValue: !1,
1034
1095
  placeholder: null
1035
- }, y, S;
1036
- isObject(v) ? (s = Object.assign(s, v), y = v.defaultValue, S = v == null ? void 0 : v.code) : S = v;
1037
- const x = (E = storageLocal.getItem("kLov")[S]) == null ? void 0 : E.children, D = x ? x.filter((N) => N.enabled === "1") : [];
1096
+ }, L, S;
1097
+ isObject(t) ? (s = Object.assign(s, t), L = t.defaultValue, S = t == null ? void 0 : t.code) : S = t;
1098
+ const x = (F = storageLocal.getItem("kLov")[S]) == null ? void 0 : F.children, D = x ? x.filter((N) => N.enabled === "1") : [];
1038
1099
  return {
1039
1100
  name: "#select",
1040
1101
  optionProps: a,
1041
1102
  options: D,
1042
1103
  props: s,
1043
- defaultValue: y,
1104
+ defaultValue: L,
1044
1105
  events: b
1045
1106
  };
1046
- }, h = (v, M) => {
1047
- const b = H(M);
1107
+ }, o = (t, M) => {
1108
+ const b = f(M);
1048
1109
  return {
1049
1110
  name: "#SuSelect",
1050
- optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
1051
- props: v == null ? void 0 : v.props,
1052
- options: (v == null ? void 0 : v.options) || [],
1111
+ optionProps: (t == null ? void 0 : t.optionProps) || { label: "label", value: "value" },
1112
+ props: t == null ? void 0 : t.props,
1113
+ options: (t == null ? void 0 : t.options) || [],
1053
1114
  events: b
1054
1115
  };
1055
- }, o = (v, M) => {
1116
+ }, h = (t, M) => {
1056
1117
  const b = {
1057
1118
  optionProps: { extLabel: "userName", value: "employeeName" },
1058
1119
  props: {
1059
- attrs: { disabled: v == null ? void 0 : v.disabled },
1060
- disabled: v == null ? void 0 : v.disabled,
1061
- defaultValue: v == null ? void 0 : v.defaultValue,
1062
- mapField: v == null ? void 0 : v.mapField,
1120
+ attrs: { disabled: t == null ? void 0 : t.disabled },
1121
+ disabled: t == null ? void 0 : t.disabled,
1122
+ defaultValue: t == null ? void 0 : t.defaultValue,
1123
+ mapField: t == null ? void 0 : t.mapField,
1063
1124
  code: "SYS037",
1064
1125
  url: "/uums/employee/listEmployeeIsUser",
1065
1126
  fetchField: "employeeName"
1066
1127
  }
1067
1128
  };
1068
- return h(b, M);
1069
- }, r = (v) => {
1129
+ return o(b, M);
1130
+ }, r = (t) => {
1070
1131
  const M = {
1071
1132
  optionProps: { extLabel: "userName", value: "name" },
1072
1133
  props: {
1073
1134
  code: "sys/listUsers",
1074
1135
  url: "/uums/user",
1075
1136
  fetchField: "name",
1076
- mapField: v == null ? void 0 : v.mapField
1137
+ mapField: t == null ? void 0 : t.mapField
1077
1138
  }
1078
1139
  };
1079
- return h(M);
1080
- }, c = (v, M) => {
1140
+ return o(M);
1141
+ }, c = (t, M) => {
1081
1142
  const b = {
1082
1143
  label: "organizationName",
1083
- value: (v == null ? void 0 : v.field) || "organizationName"
1144
+ value: (t == null ? void 0 : t.field) || "organizationName"
1084
1145
  }, s = {
1085
1146
  mapField: {},
1086
- defaultParams: v == null ? void 0 : v.defaultParams,
1147
+ defaultParams: t == null ? void 0 : t.defaultParams,
1087
1148
  url: "/uums/cusOrganization",
1088
1149
  fetchField: "organizationName"
1089
- }, y = {
1150
+ }, L = {
1090
1151
  organizationId: "id",
1091
1152
  organizationCode: "organizationCode"
1092
1153
  };
1093
- return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1094
- }, i = (v, M) => {
1154
+ return Object.assign(s.mapField, L, (t == null ? void 0 : t.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1155
+ }, i = (t, M) => {
1095
1156
  const b = {
1096
1157
  label: "orgName",
1097
- value: (v == null ? void 0 : v.field) || "orgName"
1158
+ value: (t == null ? void 0 : t.field) || "orgName"
1098
1159
  }, s = {
1099
1160
  mapField: {},
1100
- defaultParams: v == null ? void 0 : v.defaultParams,
1161
+ defaultParams: t == null ? void 0 : t.defaultParams,
1101
1162
  url: "/uums/org",
1102
1163
  fetchField: "orgName"
1103
- }, y = { orgId: "id", orgCode: "orgCode" };
1104
- return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1105
- }, Z = (v, M) => {
1106
- const b = Object.assign({ disabled: !1 }, v), s = b == null ? void 0 : b.defaultValue;
1164
+ }, L = { orgId: "id", orgCode: "orgCode" };
1165
+ return Object.assign(s.mapField, L, (t == null ? void 0 : t.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
1166
+ }, Z = (t, M) => {
1167
+ const b = Object.assign({ disabled: !1 }, t), s = b == null ? void 0 : b.defaultValue;
1107
1168
  return {
1108
1169
  name: "VxeInput",
1109
1170
  props: b,
1110
1171
  defaultValue: s,
1111
- events: H(M)
1172
+ events: f(M)
1112
1173
  };
1113
- }, e = (v, M) => {
1114
- const b = Object.assign({ disabled: !1, rows: 3 }, v), s = b == null ? void 0 : b.defaultValue;
1174
+ }, e = (t, M) => {
1175
+ const b = Object.assign({ disabled: !1, rows: 3 }, t), s = b == null ? void 0 : b.defaultValue;
1115
1176
  return {
1116
1177
  name: "VxeTextarea",
1117
1178
  props: b,
1118
1179
  defaultValue: s,
1119
- events: H(M)
1180
+ events: f(M)
1120
1181
  };
1121
- }, t = (v, M) => {
1122
- const b = "VxeCheckbox", { defaultValue: s, options: y, props: S } = f(v);
1123
- return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
1124
- }, d = (v, M) => {
1125
- const b = "VxeRadio", { defaultValue: s, options: y, props: S } = f(v);
1126
- return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
1127
- }, f = (v) => {
1182
+ }, v = (t, M) => {
1183
+ const b = "VxeCheckbox", { defaultValue: s, options: L, props: S } = m(t);
1184
+ return { name: b, defaultValue: s, options: L, props: S, events: f(M) };
1185
+ }, d = (t, M) => {
1186
+ const b = "VxeRadio", { defaultValue: s, options: L, props: S } = m(t);
1187
+ return { name: b, defaultValue: s, options: L, props: S, events: f(M) };
1188
+ }, m = (t) => {
1128
1189
  var x;
1129
1190
  let M = { disabled: !1 }, b;
1130
1191
  const s = storageLocal.getItem("kLov");
1131
- let y = "";
1132
- isObject(v) ? (b = v.defaultValue, y = v.code, M = Object.assign(M, v || {})) : isString(v) && (y = v);
1133
- const S = y ? (x = s[y]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1192
+ let L = "";
1193
+ isObject(t) ? (b = t.defaultValue, L = t.code, M = Object.assign(M, t || {})) : isString(t) && (L = t);
1194
+ const S = L ? (x = s[L]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
1134
1195
  return { props: M, defaultValue: b, options: S };
1135
- }, m = (v, M) => {
1136
- const b = H(M);
1196
+ }, V = (t, M) => {
1197
+ const b = f(M);
1137
1198
  return {
1138
1199
  name: "VxeInput",
1139
1200
  props: Object.assign(
1140
1201
  { type: "number", clearable: !0, min: 0, controls: !1 },
1141
- v || {}
1202
+ t || {}
1142
1203
  ),
1143
- defaultValue: v == null ? void 0 : v.defaultValue,
1204
+ defaultValue: t == null ? void 0 : t.defaultValue,
1144
1205
  events: b
1145
1206
  };
1146
- }, u = (v, M) => {
1147
- const b = H(M), s = "yyyy-MM-dd HH:mm:ss", y = v == null ? void 0 : v.defaultValue;
1148
- return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: y, events: b };
1149
- }, V = (v, M) => {
1150
- const b = H(M);
1151
- return { name: "#lov", props: Object.assign({}, v || {}), events: b };
1152
- }, p = (v, M) => {
1153
- const b = H(M), s = (v == null ? void 0 : v.optionProps) || {
1207
+ }, u = (t, M) => {
1208
+ const b = f(M), s = "yyyy-MM-dd HH:mm:ss", L = t == null ? void 0 : t.defaultValue;
1209
+ return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, t || {}), defaultValue: L, events: b };
1210
+ }, H = (t, M) => {
1211
+ const b = f(M);
1212
+ return { name: "#lov", props: Object.assign({}, t || {}), events: b };
1213
+ }, p = (t, M) => {
1214
+ const b = f(M), s = (t == null ? void 0 : t.optionProps) || {
1154
1215
  label: "label",
1155
1216
  value: "value"
1156
- }, y = Object.assign(
1217
+ }, L = Object.assign(
1157
1218
  { clearable: !0, disabled: !1, showValue: !1 },
1158
- v || {}
1219
+ t || {}
1159
1220
  );
1160
1221
  return console.log("itemRender"), {
1161
1222
  name: "#select",
1162
1223
  optionProps: s,
1163
- options: (v == null ? void 0 : v.options) || [],
1164
- props: y,
1224
+ options: (t == null ? void 0 : t.options) || [],
1225
+ props: L,
1165
1226
  events: b
1166
1227
  };
1167
- }, n = (v, M) => {
1228
+ }, n = (t, M) => {
1168
1229
  let b = {
1169
1230
  openLabel: "是",
1170
1231
  closeLabel: "否",
1171
1232
  openValue: "Y",
1172
1233
  closeValue: "N"
1173
1234
  }, s = "Y";
1174
- 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 }));
1175
- const y = isFunction(v) ? H(v) : H(M);
1176
- return { name: "VxeSwitch", props: b, defaultValue: s, events: y };
1177
- }, L = (v, M) => ({ name: "#tag", props: { code: v, tagMap: M } }), C = (v, M) => {
1235
+ isObject(t) && !isFunction(t) ? (b = Object.assign(b, t || {}), s = t.defaultValue || s) : !isEmpty(t) && isString(t) && (s = t, b = Object.assign(b, { defaultValue: s }));
1236
+ const L = isFunction(t) ? f(t) : f(M);
1237
+ return { name: "VxeSwitch", props: b, defaultValue: s, events: L };
1238
+ }, y = (t, M) => ({ name: "#tag", props: { code: t, tagMap: M } }), C = (t, M) => {
1178
1239
  const b = {
1179
1240
  openLabel: "启用",
1180
1241
  closeLabel: "禁用",
@@ -1182,39 +1243,39 @@ const useRender = () => {
1182
1243
  closeValue: "0",
1183
1244
  defaultValue: "1"
1184
1245
  };
1185
- !isFunction(v) && isObject(v) && Object.assign(b, v);
1186
- const s = isFunction(v) ? v : M;
1246
+ !isFunction(t) && isObject(t) && Object.assign(b, t);
1247
+ const s = isFunction(t) ? t : M;
1187
1248
  return n(b, s);
1188
- }, A = () => ({ name: "#iconSelect" }), w = (v = [], M = {}, b) => ({ name: "#treeSelect", sourceData: v, props: M, events: b }), H = (v) => {
1249
+ }, A = () => ({ name: "#iconSelect" }), w = (t = [], M = {}, b) => ({ name: "#treeSelect", sourceData: t, props: M, events: b }), f = (t) => {
1189
1250
  let M = {};
1190
- return isObject(v) && !isFunction(v) ? M = {
1191
- change: (v == null ? void 0 : v.change) || I,
1192
- blur: (v == null ? void 0 : v.blur) || I,
1193
- focus: (v == null ? void 0 : v.focus) || I,
1194
- input: (v == null ? void 0 : v.input) || I,
1195
- clear: (v == null ? void 0 : v.clear) || I,
1196
- filterMethod: v == null ? void 0 : v.filterMethod
1197
- } : v && (M = { change: v }), M;
1251
+ return isObject(t) && !isFunction(t) ? M = {
1252
+ change: (t == null ? void 0 : t.change) || I,
1253
+ blur: (t == null ? void 0 : t.blur) || I,
1254
+ focus: (t == null ? void 0 : t.focus) || I,
1255
+ input: (t == null ? void 0 : t.input) || I,
1256
+ clear: (t == null ? void 0 : t.clear) || I,
1257
+ filterMethod: t == null ? void 0 : t.filterMethod
1258
+ } : t && (M = { change: t }), M;
1198
1259
  };
1199
1260
  function I() {
1200
1261
  }
1201
1262
  return {
1202
1263
  renderDict: l,
1203
- renderSelect: h,
1264
+ renderSelect: o,
1204
1265
  renderInput: Z,
1205
1266
  renderTextarea: e,
1206
- renderCheckBox: t,
1267
+ renderCheckBox: v,
1207
1268
  renderRadio: d,
1208
- renderUser: o,
1269
+ renderUser: h,
1209
1270
  renderSysUser: r,
1210
1271
  renderInvOrg: c,
1211
1272
  renderBU: i,
1212
- renderNumber: m,
1213
- renderLov: V,
1273
+ renderNumber: V,
1274
+ renderLov: H,
1214
1275
  renderSelectLocal: p,
1215
1276
  renderDate: u,
1216
1277
  renderSwitch: n,
1217
- renderCellTag: L,
1278
+ renderCellTag: y,
1218
1279
  renderEnabled: C,
1219
1280
  renderIconSelect: A,
1220
1281
  renderTreeSelect: w
@@ -1222,11 +1283,11 @@ const useRender = () => {
1222
1283
  }, useGlobal = () => {
1223
1284
  const a = getCurrentInstance();
1224
1285
  if (!a) return { $global: {}, $storage: {}, $config: {} };
1225
- const l = a.appContext.app.config.globalProperties, h = l.$storage, o = l.$config, r = l.$serviceApi, c = l.$hasAuthority, i = l.$printPlugin, Z = l.$mode;
1286
+ const l = a.appContext.app.config.globalProperties, o = l.$storage, h = l.$config, r = l.$serviceApi, c = l.$hasAuthority, i = l.$printPlugin, Z = l.$mode;
1226
1287
  return {
1227
1288
  $global: l,
1228
- $storage: h,
1229
- $config: o,
1289
+ $storage: o,
1290
+ $config: h,
1230
1291
  $serviceApi: r,
1231
1292
  $hasAuthority: c,
1232
1293
  $printPlugin: i,
@@ -1243,56 +1304,60 @@ function buildUUID() {
1243
1304
  }
1244
1305
  let unique = 0;
1245
1306
  function buildShortUUID(a = "") {
1246
- const l = Date.now(), h = Math.floor(Math.random() * 1e9);
1247
- return unique++, a + "_" + h + unique + String(l);
1307
+ const l = Date.now(), o = Math.floor(Math.random() * 1e9);
1308
+ return unique++, a + "_" + o + unique + String(l);
1248
1309
  }
1249
1310
  const deviceDetection = () => {
1250
- 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", c = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", Z = a.match(/windows mobile/i) === "windows mobile";
1251
- return l || h || o || r || c || i || Z;
1311
+ 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", c = a.match(/android/i) === "android", i = a.match(/windows ce/i) === "windows ce", Z = a.match(/windows mobile/i) === "windows mobile";
1312
+ return l || o || h || r || c || i || Z;
1252
1313
  }, getBrowserInfo = () => {
1253
- const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, h = a.match(l);
1314
+ const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
1254
1315
  return {
1255
- browser: h[1].replace(/version/, "'safari"),
1256
- version: h[2]
1316
+ browser: o[1].replace(/version/, "'safari"),
1317
+ version: o[2]
1257
1318
  };
1258
- }, showMessage = (a, l = "message", h = {}) => {
1259
- var o, r;
1260
- 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 });
1319
+ }, showMessage = (a, l = "message", o = {}) => {
1320
+ var h, r;
1321
+ 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 });
1261
1322
  }, successMessage = (a = "操作成功", l = {}) => {
1262
- var h;
1263
- return (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "success" });
1323
+ var o;
1324
+ return (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "success" });
1264
1325
  }, warnMessage = (a, l = {}) => {
1265
- var h, o;
1266
- 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({
1326
+ var o, h;
1327
+ 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({
1267
1328
  content: a,
1268
1329
  duration: 5e3,
1269
1330
  ...l,
1270
1331
  status: "warning"
1271
1332
  });
1272
1333
  }, errorMessage = (a = "操作失败", l = {}) => {
1273
- var h, o;
1274
- 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" });
1334
+ var o, h;
1335
+ 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" });
1275
1336
  }, renderHook = useRender(), i18nColums = (a) => {
1276
- let l = 0, h = 0;
1277
- const o = a.length - 1;
1337
+ let l = 0, o = 0;
1338
+ const h = a.length - 1;
1278
1339
  return a.map((r, c) => {
1279
- if (h = h + r.width, r.type) return r;
1340
+ if (o = o + r.width, r.type) return r;
1280
1341
  r.title = r.title || `message.${r.field}`;
1281
1342
  const { showOverflow: i, sortable: Z } = r;
1282
- return r.field !== "operate" && ((r.width > 99 || r.minWidth) && (r.showOverflow = i === !1 ? i : "tooltip"), r.sortable = Z === !1 ? Z : !0), l || (l = r.minWidth), !l && o === c && h < window.innerWidth && (r.minWidth = r.width, r.width = null), r;
1343
+ return r.field !== "operate" && ((r.width > 99 || r.minWidth) && (r.showOverflow = i === !1 ? i : "tooltip"), r.sortable = Z === !1 ? Z : !0), l || (l = r.minWidth), !l && h === c && o < window.innerWidth && (r.minWidth = r.width, r.width = null), r;
1283
1344
  });
1284
- }, formatItems = (a, l, h = 24) => a.length ? a.map((o) => {
1285
- var i, Z;
1286
- o.title = o.title || `message.${o.field}`, o.span = o.span || h;
1287
- let r = !1;
1288
- l === "detail" ? (r = !0, o.placeholder = null) : r = o.disabled === !1 ? o.disabled : o.disabled || ((Z = (i = o.itemRender) == null ? void 0 : i.props) == null ? void 0 : Z.disabled);
1289
- let c = {
1290
- name: "VxeInput",
1291
- props: { disabled: r, placeholder: r ? "" : o.placeholder }
1292
- };
1293
- return o.code && !o.itemRender && (c = renderHook.renderDict(o.code)), o.itemRender = o.itemRender || c, o.itemRender.props = Object.assign(o.itemRender.props || {}, {
1294
- disabled: r
1295
- }), o;
1345
+ }, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
1346
+ var r, c, i;
1347
+ if ((r = h.children) != null && r.length)
1348
+ return h.children = formatItems(h.children, l, o), h;
1349
+ {
1350
+ h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.collapseNode && (h.title = "", h.titleWidth = 0);
1351
+ let Z = !1;
1352
+ l === "detail" ? (Z = !0, h.placeholder = null) : Z = h.disabled === !1 ? h.disabled : h.disabled || ((i = (c = h.itemRender) == null ? void 0 : c.props) == null ? void 0 : i.disabled);
1353
+ let e = {
1354
+ name: "VxeInput",
1355
+ props: { disabled: Z, placeholder: Z ? "" : h.placeholder }
1356
+ };
1357
+ return h.code && !h.itemRender && (e = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || e, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
1358
+ disabled: Z
1359
+ }), h;
1360
+ }
1296
1361
  }) : a, formSearchButtons = {
1297
1362
  span: 6,
1298
1363
  align: "right",
@@ -1318,39 +1383,39 @@ const deviceDetection = () => {
1318
1383
  events: null
1319
1384
  }
1320
1385
  }, formatGridItems = (a, l) => {
1321
- const h = a, o = h.length, r = o > 2 && h.some((t, d) => d < 3 && (t.span > 6 || getDateRange(t))), c = r || o > 3, i = {
1386
+ const o = a, h = o.length, r = h > 2 && o.some((v, d) => d < 3 && (v.span > 6 || getDateRange(v))), c = r || h > 3, i = {
1322
1387
  collapseTags: !0,
1323
1388
  collapseTagsTooltip: !0,
1324
1389
  multiple: !0
1325
- }, Z = h.map((t, d) => {
1326
- var f, m, u;
1327
- return t.folding = r ? c && d > 1 : c && d > 2, t.span = getDateRange(t) ? 12 : t.span || 6, t.code && !t.itemRender && (t.itemRender = renderHook.renderDict(t.code)), t.itemRender = t.itemRender || { name: "VxeInput" }, t.resetValue = t.itemRender.defaultValue, t.title = t.title || `message.${t.field}`, (t.multiple || (m = (f = t.itemRender) == null ? void 0 : f.props) != null && m.multiple) && (t.itemRender.props = Object.assign(
1390
+ }, Z = o.map((v, d) => {
1391
+ var m, V, u;
1392
+ return v.folding = r ? c && d > 1 : c && d > 2, v.span = getDateRange(v) ? 12 : v.span || 6, v.code && !v.itemRender && (v.itemRender = renderHook.renderDict(v.code)), v.itemRender = v.itemRender || { name: "VxeInput" }, v.resetValue = v.itemRender.defaultValue, v.title = v.title || `message.${v.field}`, (v.multiple || (V = (m = v.itemRender) == null ? void 0 : m.props) != null && V.multiple) && (v.itemRender.props = Object.assign(
1328
1393
  i,
1329
- ((u = t.itemRender) == null ? void 0 : u.props) || {}
1330
- )), t;
1394
+ ((u = v.itemRender) == null ? void 0 : u.props) || {}
1395
+ )), v;
1331
1396
  }), e = clone(formSearchButtons, !0);
1332
1397
  if (e.collapseNode = c, l && e.itemRender.options.length < 3 && (e.itemRender.options.push(l), e.itemRender.events = l.events), c) {
1333
- const t = r ? 2 : 3;
1334
- Z.splice(t, 0, e);
1398
+ const v = r ? 2 : 3;
1399
+ Z.splice(v, 0, e);
1335
1400
  } else
1336
1401
  Z.push(e);
1337
1402
  return Z;
1338
1403
  }, getDateRange = (a) => {
1339
- var l, h, o, r, c;
1340
- 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" || !((c = (r = a.itemRender) == null ? void 0 : r.props) != null && c.type) : !1;
1404
+ var l, o, h, r, c;
1405
+ 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" || !((c = (r = a.itemRender) == null ? void 0 : r.props) != null && c.type) : !1;
1341
1406
  }, formatRules = (a, l) => {
1342
- const h = {};
1343
- return a.forEach((o) => {
1344
- if (o.required) {
1345
- const { field: r, title: c } = o, i = c == null ? void 0 : c.startsWith("message.");
1346
- h[r] = [
1407
+ const o = {};
1408
+ return a.forEach((h) => {
1409
+ if (h.required) {
1410
+ const { field: r, title: c } = h, i = c == null ? void 0 : c.startsWith("message.");
1411
+ o[r] = [
1347
1412
  {
1348
1413
  required: !0,
1349
1414
  message: `${l("message.required")}${c && i ? l(c) : c || l(`message.${r}`)}`
1350
1415
  }
1351
1416
  ];
1352
1417
  }
1353
- }), h;
1418
+ }), o;
1354
1419
  }, expandedPaths = [];
1355
1420
  function extractPathList(a) {
1356
1421
  if (!Array.isArray(a)) {
@@ -1369,8 +1434,8 @@ function deleteTreeChildren(a, l = []) {
1369
1434
  return;
1370
1435
  }
1371
1436
  if (!(!a || a.length === 0)) {
1372
- for (const [h, o] of a.entries())
1373
- 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);
1437
+ for (const [o, h] of a.entries())
1438
+ 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);
1374
1439
  return a;
1375
1440
  }
1376
1441
  }
@@ -1380,8 +1445,8 @@ function buildHierarchyTree(a, l = []) {
1380
1445
  return;
1381
1446
  }
1382
1447
  if (!(!a || a.length === 0)) {
1383
- for (const [h, o] of a.entries())
1384
- 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);
1448
+ for (const [o, h] of a.entries())
1449
+ 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);
1385
1450
  return a;
1386
1451
  }
1387
1452
  }
@@ -1391,20 +1456,20 @@ function getNodeByUniqueId(a, l) {
1391
1456
  return;
1392
1457
  }
1393
1458
  if (!a || a.length === 0) return;
1394
- const h = a.find((r) => r.uniqueId === l);
1395
- if (h) return h;
1396
- const o = a.filter((r) => r.children).map((r) => r.children).flat(1);
1397
- return getNodeByUniqueId(o, l);
1459
+ const o = a.find((r) => r.uniqueId === l);
1460
+ if (o) return o;
1461
+ const h = a.filter((r) => r.children).map((r) => r.children).flat(1);
1462
+ return getNodeByUniqueId(h, l);
1398
1463
  }
1399
- function appendFieldByUniqueId(a, l, h) {
1464
+ function appendFieldByUniqueId(a, l, o) {
1400
1465
  if (!Array.isArray(a)) {
1401
1466
  console.warn("menuTree must be an array");
1402
1467
  return;
1403
1468
  }
1404
1469
  if (!a || a.length === 0) return {};
1405
- for (const o of a) {
1406
- const r = o.children && o.children.length > 0;
1407
- o.uniqueId === l && Object.prototype.toString.call(h) === "[object Object]" && Object.assign(o, h), r && appendFieldByUniqueId(o.children, l, h);
1470
+ for (const h of a) {
1471
+ const r = h.children && h.children.length > 0;
1472
+ h.uniqueId === l && Object.prototype.toString.call(o) === "[object Object]" && Object.assign(h, o), r && appendFieldByUniqueId(h.children, l, o);
1408
1473
  }
1409
1474
  return a;
1410
1475
  }
@@ -1453,68 +1518,68 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1453
1518
  }
1454
1519
  /** 重连原始请求 */
1455
1520
  static retryOriginalRequest(l) {
1456
- return new Promise((h) => {
1457
- g.requests.push((o) => {
1458
- l.headers.Authorization = "Bearer " + o, h(l);
1521
+ return new Promise((o) => {
1522
+ g.requests.push((h) => {
1523
+ l.headers.Authorization = "Bearer " + h, o(l);
1459
1524
  });
1460
1525
  });
1461
1526
  }
1462
1527
  // 请求拦截
1463
1528
  httpInterceptorsRequest() {
1464
1529
  g.axiosInstance.interceptors.request.use(
1465
- (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) => {
1530
+ (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) => {
1466
1531
  const r = cookies.get(kTOKENKEY);
1467
1532
  if (r) {
1468
1533
  const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1469
1534
  c.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1470
1535
  refreshToken: c.refreshToken
1471
1536
  }).then((e) => {
1472
- this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((t) => t(e.access_token)), g.requests = [];
1537
+ this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((v) => v(e.access_token)), g.requests = [];
1473
1538
  }).finally(() => {
1474
1539
  g.isRefreshing = !1;
1475
- })), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, o(l));
1540
+ })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, h(l));
1476
1541
  } else {
1477
1542
  const c = cookies.get("kCookies_token");
1478
- c && (l.headers["X-Token"] = c), o(l);
1543
+ c && (l.headers["X-Token"] = c), h(l);
1479
1544
  }
1480
1545
  })),
1481
1546
  (l) => Promise.reject(l)
1482
1547
  );
1483
1548
  }
1484
1549
  setToken(l) {
1485
- const { access_token: h, expires_in: o, refresh_token: r } = l, c = {
1486
- accessToken: h,
1550
+ const { access_token: o, expires_in: h, refresh_token: r } = l, c = {
1551
+ accessToken: o,
1487
1552
  refreshToken: r,
1488
- expires: Date.now() + o * 1e3
1553
+ expires: Date.now() + h * 1e3
1489
1554
  };
1490
1555
  cookies.set(kTOKENKEY, JSON.stringify(c));
1491
1556
  }
1492
1557
  // 响应拦截
1493
1558
  httpInterceptorsResponse() {
1494
1559
  g.axiosInstance.interceptors.response.use(
1495
- (h) => {
1496
- const o = h.config;
1497
- 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);
1560
+ (o) => {
1561
+ const h = o.config;
1562
+ 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);
1498
1563
  },
1499
- (h) => {
1564
+ (o) => {
1500
1565
  var r;
1501
- const o = h;
1502
- 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);
1566
+ const h = o;
1567
+ 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);
1503
1568
  }
1504
1569
  );
1505
1570
  }
1506
- transformConfigByMethod(l, h) {
1507
- const { method: o } = h, r = ["get"], c = o.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1571
+ transformConfigByMethod(l, o) {
1572
+ const { method: h } = o, r = ["get"], c = h.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1508
1573
  return {
1509
- ...h,
1574
+ ...o,
1510
1575
  [i]: l
1511
1576
  };
1512
1577
  }
1513
1578
  // 通用请求工具函数
1514
- request(l, h, o, r) {
1515
- const c = this.transformConfigByMethod(o, {
1579
+ request(l, o, h, r) {
1580
+ const c = this.transformConfigByMethod(h, {
1516
1581
  method: l,
1517
- url: h,
1582
+ url: o,
1518
1583
  ...r
1519
1584
  });
1520
1585
  return new Promise((i, Z) => {
@@ -1526,16 +1591,16 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1526
1591
  else if ((e == null ? void 0 : e.code) !== "-1")
1527
1592
  i(e);
1528
1593
  else {
1529
- const t = (e == null ? void 0 : e.msg) || "服务异常";
1530
- errorMessage(t, { duration: 8e3 }), Z(t);
1594
+ const v = (e == null ? void 0 : e.msg) || "服务异常";
1595
+ errorMessage(v, { duration: 8e3 }), Z(v);
1531
1596
  }
1532
1597
  }).catch((e) => {
1533
- var t, d, f;
1598
+ var v, d, m;
1534
1599
  if (e != null && e.code) {
1535
- if (((t = e == null ? void 0 : e.response) == null ? void 0 : t.status) === 401)
1600
+ if (((v = e == null ? void 0 : e.response) == null ? void 0 : v.status) === 401)
1536
1601
  return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
1537
1602
  errorMessage(
1538
- this.getNetworkError((f = e == null ? void 0 : e.response) == null ? void 0 : f.status) || (e == null ? void 0 : e.message),
1603
+ this.getNetworkError((m = e == null ? void 0 : e.response) == null ? void 0 : m.status) || (e == null ? void 0 : e.message),
1539
1604
  { duration: 8e3 }
1540
1605
  );
1541
1606
  }
@@ -1544,22 +1609,22 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1544
1609
  });
1545
1610
  }
1546
1611
  // 单独抽离的post工具函数
1547
- post(l, h, o) {
1548
- return this.request("post", l, h, o);
1612
+ post(l, o, h) {
1613
+ return this.request("post", l, o, h);
1549
1614
  }
1550
1615
  // 单独抽离的delete工具函数
1551
- delete(l, h, o) {
1552
- return this.request("delete", l, h, o);
1616
+ delete(l, o, h) {
1617
+ return this.request("delete", l, o, h);
1553
1618
  }
1554
1619
  // 单独抽离的put工具函数
1555
- put(l, h, o) {
1556
- return this.request("put", l, h, o);
1620
+ put(l, o, h) {
1621
+ return this.request("put", l, o, h);
1557
1622
  }
1558
1623
  // 单独抽离的get工具函数
1559
- get(l, h, o) {
1560
- for (const r in h)
1561
- h[r] || delete h[r];
1562
- return this.request("get", l, h, o);
1624
+ get(l, o, h) {
1625
+ for (const r in o)
1626
+ o[r] || delete o[r];
1627
+ return this.request("get", l, o, h);
1563
1628
  }
1564
1629
  postRouter(l) {
1565
1630
  return this.request("post", "route/service", l);
@@ -2223,10 +2288,10 @@ const http = new SuHttp(), lunarCalendar = {
2223
2288
  * @eg:var count = calendar.lYearDays(1987) ;//count=387
2224
2289
  */
2225
2290
  lYearDays: function(a) {
2226
- let l, h = 348;
2291
+ let l, o = 348;
2227
2292
  for (l = 32768; l > 8; l >>= 1)
2228
- h += this.lunarInfo[a - 1900] & l ? 1 : 0;
2229
- return h + this.leapDays(a);
2293
+ o += this.lunarInfo[a - 1900] & l ? 1 : 0;
2294
+ return o + this.leapDays(a);
2230
2295
  },
2231
2296
  /**
2232
2297
  * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
@@ -2266,8 +2331,8 @@ const http = new SuHttp(), lunarCalendar = {
2266
2331
  solarDays: function(a, l) {
2267
2332
  if (l > 12 || l < 1)
2268
2333
  return -1;
2269
- const h = l - 1;
2270
- return h === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[h];
2334
+ const o = l - 1;
2335
+ return o === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[o];
2271
2336
  },
2272
2337
  /**
2273
2338
  * 农历年份转换为干支纪年
@@ -2275,8 +2340,8 @@ const http = new SuHttp(), lunarCalendar = {
2275
2340
  * @return Cn string
2276
2341
  */
2277
2342
  toGanZhiYear: function(a) {
2278
- let l = (a - 3) % 10, h = (a - 3) % 12;
2279
- return l === 0 && (l = 10), h === 0 && (h = 12), this.Gan[l - 1] + this.Zhi[h - 1];
2343
+ let l = (a - 3) % 10, o = (a - 3) % 12;
2344
+ return l === 0 && (l = 10), o === 0 && (o = 12), this.Gan[l - 1] + this.Zhi[o - 1];
2280
2345
  },
2281
2346
  /**
2282
2347
  * 公历月、日判断所属星座
@@ -2285,8 +2350,8 @@ const http = new SuHttp(), lunarCalendar = {
2285
2350
  * @return Cn string
2286
2351
  */
2287
2352
  toAstro: function(a, l) {
2288
- const h = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", o = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2289
- return h.substr(a * 2 - (l < o[a - 1] ? 2 : 0), 2) + "座";
2353
+ const o = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", h = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2354
+ return o.substr(a * 2 - (l < h[a - 1] ? 2 : 0), 2) + "座";
2290
2355
  },
2291
2356
  /**
2292
2357
  * 传入offset偏移量返回干支
@@ -2306,12 +2371,12 @@ const http = new SuHttp(), lunarCalendar = {
2306
2371
  getTerm: function(a, l) {
2307
2372
  if (a < 1900 || a > 2100 || l < 1 || l > 24)
2308
2373
  return -1;
2309
- const h = this.sTermInfo[a - 1900], o = [];
2310
- for (let r = 0; r < h.length; r += 5) {
2311
- const c = parseInt("0x" + h.substr(r, 5)).toString();
2312
- o.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2374
+ const o = this.sTermInfo[a - 1900], h = [];
2375
+ for (let r = 0; r < o.length; r += 5) {
2376
+ const c = parseInt("0x" + o.substr(r, 5)).toString();
2377
+ h.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2313
2378
  }
2314
- return parseInt(o[l - 1]);
2379
+ return parseInt(h[l - 1]);
2315
2380
  },
2316
2381
  /**
2317
2382
  * 传入农历数字月份返回汉语通俗表示法
@@ -2366,58 +2431,58 @@ const http = new SuHttp(), lunarCalendar = {
2366
2431
  * @return JSON object
2367
2432
  * @eg:console.log(calendar.solar2lunar(1987,11,01));
2368
2433
  */
2369
- solar2lunar: function(a, l, h) {
2370
- let o = parseInt(a), r = parseInt(l), c = parseInt(h);
2371
- if (o < 1900 || o > 2100 || o === 1900 && r === 1 && c < 31)
2434
+ solar2lunar: function(a, l, o) {
2435
+ let h = parseInt(a), r = parseInt(l), c = parseInt(o);
2436
+ if (h < 1900 || h > 2100 || h === 1900 && r === 1 && c < 31)
2372
2437
  return -1;
2373
2438
  let i;
2374
- o ? i = new Date(o, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2375
- let Z, e = 0, t = 0;
2376
- o = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2439
+ h ? i = new Date(h, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2440
+ let Z, e = 0, v = 0;
2441
+ h = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2377
2442
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2378
2443
  for (Z = 1900; Z < 2101 && d > 0; Z++)
2379
- t = this.lYearDays(Z), d -= t;
2380
- d < 0 && (d += t, Z--);
2381
- const f = /* @__PURE__ */ new Date();
2382
- let m = !1;
2383
- f.getFullYear() === o && f.getMonth() + 1 === r && f.getDate() === c && (m = !0);
2444
+ v = this.lYearDays(Z), d -= v;
2445
+ d < 0 && (d += v, Z--);
2446
+ const m = /* @__PURE__ */ new Date();
2447
+ let V = !1;
2448
+ m.getFullYear() === h && m.getMonth() + 1 === r && m.getDate() === c && (V = !0);
2384
2449
  let u = i.getDay();
2385
- const V = this.nStr1[u];
2450
+ const H = this.nStr1[u];
2386
2451
  u === 0 && (u = 7);
2387
2452
  const p = Z;
2388
2453
  e = this.leapMonth(Z);
2389
2454
  let n = !1;
2390
2455
  for (Z = 1; Z < 13 && d > 0; Z++)
2391
- e > 0 && Z === e + 1 && n === !1 ? (--Z, n = !0, t = this.leapDays(p)) : t = this.monthDays(p, Z), n === !0 && Z === e + 1 && (n = !1), d -= t;
2392
- d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += t, --Z);
2393
- const L = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), H = this.getTerm(o, r * 2 - 1), I = this.getTerm(o, r * 2);
2394
- let v = this.toGanZhi((o - 1900) * 12 + r + 11);
2395
- c >= H && (v = this.toGanZhi((o - 1900) * 12 + r + 12));
2456
+ e > 0 && Z === e + 1 && n === !1 ? (--Z, n = !0, v = this.leapDays(p)) : v = this.monthDays(p, Z), n === !0 && Z === e + 1 && (n = !1), d -= v;
2457
+ d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += v, --Z);
2458
+ const y = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), f = this.getTerm(h, r * 2 - 1), I = this.getTerm(h, r * 2);
2459
+ let t = this.toGanZhi((h - 1900) * 12 + r + 11);
2460
+ c >= f && (t = this.toGanZhi((h - 1900) * 12 + r + 12));
2396
2461
  let M = !1, b;
2397
- H === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
2398
- const s = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, y = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = o + "-" + r + "-" + c, D = p + "-" + L + "-" + C, E = this.festival, N = this.lFestival, R = r + "-" + c;
2399
- let F = L + "-" + C;
2400
- return L === 12 && C === 29 && this.monthDays(p, L) === 29 && (F = "12-30"), {
2462
+ f === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
2463
+ const s = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, L = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = h + "-" + r + "-" + c, D = p + "-" + y + "-" + C, F = this.festival, N = this.lFestival, R = r + "-" + c;
2464
+ let E = y + "-" + C;
2465
+ return y === 12 && C === 29 && this.monthDays(p, y) === 29 && (E = "12-30"), {
2401
2466
  date: x,
2402
2467
  lunarDate: D,
2403
- festival: E[R] ? E[R].title : null,
2404
- lunarFestival: N[F] ? N[F].title : null,
2468
+ festival: F[R] ? F[R].title : null,
2469
+ lunarFestival: N[E] ? N[E].title : null,
2405
2470
  lYear: p,
2406
- lMonth: L,
2471
+ lMonth: y,
2407
2472
  lDay: C,
2408
2473
  Animal: this.getAnimal(p),
2409
- IMonthCn: (n ? "闰" : "") + this.toChinaMonth(L),
2474
+ IMonthCn: (n ? "闰" : "") + this.toChinaMonth(y),
2410
2475
  IDayCn: this.toChinaDay(C),
2411
- cYear: o,
2476
+ cYear: h,
2412
2477
  cMonth: r,
2413
2478
  cDay: c,
2414
2479
  gzYear: w,
2415
- gzMonth: v,
2416
- gzDay: y,
2417
- isToday: m,
2480
+ gzMonth: t,
2481
+ gzDay: L,
2482
+ isToday: V,
2418
2483
  isLeap: n,
2419
2484
  nWeek: u,
2420
- ncWeek: "星期" + V,
2485
+ ncWeek: "星期" + H,
2421
2486
  isTerm: M,
2422
2487
  Term: b,
2423
2488
  astro: S
@@ -2433,24 +2498,24 @@ const http = new SuHttp(), lunarCalendar = {
2433
2498
  * @return JSON object
2434
2499
  * @eg:console.log(calendar.lunar2solar(1987,9,10));
2435
2500
  */
2436
- lunar2solar: function(a, l, h, o) {
2437
- a = parseInt(a), l = parseInt(l), h = parseInt(h), o = !!o;
2501
+ lunar2solar: function(a, l, o, h) {
2502
+ a = parseInt(a), l = parseInt(l), o = parseInt(o), h = !!h;
2438
2503
  const r = this.leapMonth(a);
2439
- if (o && r !== l || a === 2100 && l === 12 && h > 1 || a === 1900 && l === 1 && h < 31)
2504
+ if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
2440
2505
  return -1;
2441
2506
  const c = this.monthDays(a, l);
2442
2507
  let i = c;
2443
- if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
2508
+ if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
2444
2509
  return -1;
2445
2510
  let Z = 0, e;
2446
2511
  for (e = 1900; e < a; e++)
2447
2512
  Z += this.lYearDays(e);
2448
- let t = 0, d = !1;
2513
+ let v = 0, d = !1;
2449
2514
  for (e = 1; e < l; e++)
2450
- t = this.leapMonth(a), d || t <= e && t > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2451
- o && (Z += c);
2452
- const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + h - 31) * 864e5 + f), u = m.getUTCFullYear(), V = m.getUTCMonth() + 1, p = m.getUTCDate();
2453
- return this.solar2lunar(u, V, p);
2515
+ v = this.leapMonth(a), d || v <= e && v > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2516
+ h && (Z += c);
2517
+ const m = Date.UTC(1900, 1, 30, 0, 0, 0), V = new Date((Z + o - 31) * 864e5 + m), u = V.getUTCFullYear(), H = V.getUTCMonth() + 1, p = V.getUTCDate();
2518
+ return this.solar2lunar(u, H, p);
2454
2519
  }
2455
2520
  }, dict = storageLocal.getItem("kLov"), formats = {
2456
2521
  formatDate: {
@@ -2489,8 +2554,8 @@ const http = new SuHttp(), lunarCalendar = {
2489
2554
  tableCellFormatMethod({ cellValue: a }, l) {
2490
2555
  var r, c;
2491
2556
  if (!l) return a;
2492
- const h = XEUtils.toValueString(a), o = dict ? (c = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : c.find((i) => i.dictCode === h) : a;
2493
- return (o == null ? void 0 : o.dictName) || a;
2557
+ const o = XEUtils.toValueString(a), h = dict ? (c = (r = dict[l]) == null ? void 0 : r.children) == null ? void 0 : c.find((i) => i.dictCode === o) : a;
2558
+ return (h == null ? void 0 : h.dictName) || a;
2494
2559
  }
2495
2560
  },
2496
2561
  formatRelateField: {
@@ -2502,22 +2567,22 @@ const http = new SuHttp(), lunarCalendar = {
2502
2567
  formatContact: {
2503
2568
  // 字段拼接展示
2504
2569
  tableCellFormatMethod({ row: a }, l) {
2505
- return l.reduce((h, o) => a[o] ? h ? h += a[o] : a[o] : h, "");
2570
+ return l.reduce((o, h) => a[h] ? o ? o += a[h] : a[h] : o, "");
2506
2571
  }
2507
2572
  },
2508
2573
  formatSelectLocal: {
2509
2574
  tableCellFormatMethod({ cellValue: a }, l) {
2510
- const [h, o = "value", r = "label"] = l, c = h == null ? void 0 : h.find((i) => i[o] === a);
2575
+ const [o, h = "value", r = "label"] = l, c = o == null ? void 0 : o.find((i) => i[h] === a);
2511
2576
  return c ? c[r] : a;
2512
2577
  }
2513
2578
  },
2514
2579
  formatMultiValue: {
2515
2580
  tableCellFormatMethod({ row: a }, l) {
2516
2581
  var c;
2517
- const [h, o] = l;
2582
+ const [o, h] = l;
2518
2583
  let r;
2519
- return (c = a[h]) == null || c.split(",").forEach((i) => {
2520
- const Z = o.find((e) => e.value === i);
2584
+ return (c = a[o]) == null || c.split(",").forEach((i) => {
2585
+ const Z = h.find((e) => e.value === i);
2521
2586
  r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
2522
2587
  }), r;
2523
2588
  }
@@ -10145,29 +10210,29 @@ const http = new SuHttp(), lunarCalendar = {
10145
10210
  height: 24
10146
10211
  }, withInstall = (a) => {
10147
10212
  const l = a;
10148
- return l.install = (h) => {
10149
- h.component(l.name || l.__name, a);
10213
+ return l.install = (o) => {
10214
+ o.component(l.name || l.__name, a);
10150
10215
  }, a;
10151
10216
  };
10152
10217
  function sleep(a = 64) {
10153
10218
  return new Promise((l) => {
10154
- const h = setTimeout(() => {
10155
- window.clearTimeout(h), l(a);
10219
+ const o = setTimeout(() => {
10220
+ window.clearTimeout(o), l(a);
10156
10221
  }, a);
10157
10222
  });
10158
10223
  }
10159
10224
  const delay = (a) => new Promise((l) => setTimeout(l, a)), useDark = () => ({ isDark: ref(document.documentElement.classList.contains("dark")) }), useDebounce = (a, l) => {
10160
- let h;
10225
+ let o;
10161
10226
  return () => {
10162
- h && clearTimeout(h), h = setTimeout(a, l);
10227
+ o && clearTimeout(o), o = setTimeout(a, l);
10163
10228
  };
10164
10229
  };
10165
10230
  function isUrl(a) {
10166
10231
  return /(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(a);
10167
10232
  }
10168
10233
  const getDictName = (a, l) => {
10169
- var o, r;
10170
- return !a || !l ? null : (r = (o = storageLocal.getItem("kLov")[a]) == null ? void 0 : o.children.find((c) => l === c.dictCode)) == null ? void 0 : r.dictName;
10234
+ var h, r;
10235
+ return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((c) => l === c.dictCode)) == null ? void 0 : r.dictName;
10171
10236
  };
10172
10237
  export {
10173
10238
  W as NProgress,