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

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,9 +1,9 @@
1
1
  var T = Object.defineProperty;
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);
2
+ var j = (a, l, o) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
3
+ var S = (a, l, o) => j(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
- import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, has } from "xe-utils";
6
+ import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, merge, has } from "xe-utils";
7
7
  import localforage from "localforage";
8
8
  import ResizeObserver from "resize-observer-polyfill";
9
9
  import { VxeUI } from "vxe-pc-ui";
@@ -12,9 +12,9 @@ import NProgress from "nprogress";
12
12
  import { default as W } from "nprogress";
13
13
  class sessionStorageProxy {
14
14
  constructor(l) {
15
- k(this, "storage");
16
- k(this, "prefix");
17
- k(this, "addPrefix", (l) => {
15
+ S(this, "storage");
16
+ S(this, "prefix");
17
+ S(this, "addPrefix", (l) => {
18
18
  this.prefix = l;
19
19
  });
20
20
  this.storage = l;
@@ -46,7 +46,7 @@ class localStorageProxy extends sessionStorageProxy {
46
46
  }
47
47
  class localforageProxy {
48
48
  constructor() {
49
- k(this, "storage");
49
+ S(this, "storage");
50
50
  localforage.config({
51
51
  name: "uapp",
52
52
  storeName: "udb"
@@ -77,11 +77,11 @@ function stringifyAttributes(a) {
77
77
  }
78
78
  function get(a, l, o) {
79
79
  const h = /(?:^|; )([^=]*)=([^;]*)/g, r = {};
80
- let c;
81
- for (; (c = h.exec(document.cookie)) != null; )
80
+ let e;
81
+ for (; (e = h.exec(document.cookie)) != null; )
82
82
  try {
83
- const i = o(c[1]);
84
- if (r[i] = l(c[2], i), a === i)
83
+ const i = o(e[1]);
84
+ if (r[i] = l(e[2], i), a === i)
85
85
  break;
86
86
  } catch {
87
87
  }
@@ -111,8 +111,8 @@ function removeCookie(a, l = DEFAULT_ATTRIBUTES) {
111
111
  }
112
112
  function init(a, l) {
113
113
  const o = {
114
- set: function(r, c, i) {
115
- return setCookie(r, c, Object.assign({}, this.attributes, i), {
114
+ set: function(r, e, i) {
115
+ return setCookie(r, e, Object.assign({}, this.attributes, i), {
116
116
  encodeValue: this.converter.write
117
117
  });
118
118
  },
@@ -122,8 +122,8 @@ function init(a, l) {
122
122
  if (r != null)
123
123
  return getCookie(r, this.converter.read);
124
124
  },
125
- remove: function(r, c) {
126
- removeCookie(r, Object.assign({}, this.attributes, c));
125
+ remove: function(r, e) {
126
+ removeCookie(r, Object.assign({}, this.attributes, e));
127
127
  },
128
128
  withAttributes: function(r) {
129
129
  return init(this.converter, Object.assign({}, this.attributes, r));
@@ -140,8 +140,8 @@ function init(a, l) {
140
140
  init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
141
141
  class Cookies {
142
142
  constructor() {
143
- k(this, "prefix", null);
144
- k(this, "addPrefix", (l) => {
143
+ S(this, "prefix", null);
144
+ S(this, "addPrefix", (l) => {
145
145
  this.prefix = l;
146
146
  });
147
147
  }
@@ -196,56 +196,56 @@ const VxetableRender = (VXETable, {
196
196
  row: h,
197
197
  column: r
198
198
  } = l, {
199
- options: c,
199
+ options: e,
200
200
  props: i,
201
- optionProps: Z = {},
202
- events: e
201
+ optionProps: t = {},
202
+ events: c
203
203
  } = a, {
204
- label: v = "label",
204
+ label: Z = "label",
205
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);
206
+ } = t, {
207
+ loading: n = !1,
208
+ multiple: f,
209
+ mapField: H
210
+ } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
211
+ m.setDefaultValue(i, h, r.field);
212
+ function u(V) {
213
+ m.remote(V, r.field, a);
214
214
  }
215
- function y(f) {
216
- H.selectChange(f, h, r.field, a, {
215
+ function M(V) {
216
+ m.selectChange(V, h, r.field, a, {
217
217
  column: r,
218
218
  datasource: "row"
219
219
  });
220
220
  }
221
- function C(f) {
222
- e != null && e.input && e.input(l, f);
221
+ function C(V) {
222
+ c != null && c.input && c.input(l, V);
223
223
  }
224
224
  function A() {
225
- H.clear(h, r.field, u, e, "row");
225
+ m.clear(h, r.field, H, c, "row");
226
226
  }
227
227
  function w() {
228
- !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
228
+ !e.length && u(""), c != null && c.focus && c.focus(l, r.field);
229
229
  }
230
230
  return [createVNode(resolveComponent("el-select"), mergeProps({
231
- modelValue: h[p],
232
- "onUpdate:modelValue": (f) => h[p] = f,
231
+ modelValue: h[s],
232
+ "onUpdate:modelValue": (V) => h[s] = V,
233
233
  filterable: !0,
234
234
  remote: !0,
235
235
  clearable: !0,
236
236
  placeholder: "请录入关键字搜索",
237
237
  style: "width: 100%",
238
- "remote-method": n,
239
- loading: m
238
+ "remote-method": u,
239
+ loading: n
240
240
  }, i, {
241
241
  onFocus: () => w(),
242
- onChange: (f) => y(f),
242
+ onChange: (V) => M(V),
243
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]
244
+ onInput: (V) => C(V)
245
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
246
+ key: V[d],
247
+ label: V[Z],
248
+ value: V[d]
249
249
  }, null))) ? o : {
250
250
  default: () => [o]
251
251
  })];
@@ -256,56 +256,56 @@ const VxetableRender = (VXETable, {
256
256
  row: h,
257
257
  column: r
258
258
  } = l, {
259
- options: c,
259
+ options: e,
260
260
  props: i,
261
- optionProps: Z = {},
262
- events: e
261
+ optionProps: t = {},
262
+ events: c
263
263
  } = a, {
264
- label: v = "label",
264
+ label: Z = "label",
265
265
  value: d = "value"
266
- } = Z, {
267
- loading: m = !1,
268
- multiple: V,
269
- mapField: u
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);
266
+ } = t, {
267
+ loading: n = !1,
268
+ multiple: f,
269
+ mapField: H
270
+ } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
271
+ m.setDefaultValue(i, h, r.field);
272
+ function u(V) {
273
+ m.remote(V, r.field, a);
274
274
  }
275
- function y(f) {
276
- H.selectChange(f, h, r.field, a, {
275
+ function M(V) {
276
+ m.selectChange(V, h, r.field, a, {
277
277
  column: r,
278
278
  datasource: "row"
279
279
  });
280
280
  }
281
- function C(f) {
282
- e != null && e.input && e.input(l, f);
281
+ function C(V) {
282
+ c != null && c.input && c.input(l, V);
283
283
  }
284
284
  function A() {
285
- H.clear(h, r.field, u, e, "row");
285
+ m.clear(h, r.field, H, c, "row");
286
286
  }
287
287
  function w() {
288
- !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
288
+ !e.length && u(""), c != null && c.focus && c.focus(l, r.field);
289
289
  }
290
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
291
- modelValue: h[p],
292
- "onUpdate:modelValue": (f) => h[p] = f,
291
+ modelValue: h[s],
292
+ "onUpdate:modelValue": (V) => h[s] = V,
293
293
  filterable: !0,
294
294
  remote: !0,
295
295
  clearable: !0,
296
296
  placeholder: "请录入关键字搜索",
297
297
  style: "width: 100%",
298
- "remote-method": n,
299
- loading: m
298
+ "remote-method": u,
299
+ loading: n
300
300
  }, i, {
301
301
  onFocus: () => w(),
302
- onChange: (f) => y(f),
302
+ onChange: (V) => M(V),
303
303
  onClear: () => A(),
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]
304
+ onInput: (V) => C(V)
305
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
306
+ key: V[d],
307
+ label: V[Z],
308
+ value: V[d]
309
309
  }, null))) ? o : {
310
310
  default: () => [o]
311
311
  })];
@@ -330,55 +330,55 @@ const VxetableRender = (VXETable, {
330
330
  data: h,
331
331
  field: r
332
332
  } = l, {
333
- options: c,
333
+ options: e,
334
334
  props: i,
335
- optionProps: Z = {},
336
- events: e
335
+ optionProps: t = {},
336
+ events: c
337
337
  } = a, {
338
- label: v = "label",
338
+ label: Z = "label",
339
339
  value: d = "value"
340
- } = Z, {
341
- mapField: m,
342
- multiple: V,
343
- loading: u = !1
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);
340
+ } = t, {
341
+ mapField: n,
342
+ multiple: f,
343
+ loading: H = !1
344
+ } = i, m = useComponent(), s = f ? `_${r}` : r;
345
+ m.setDefaultValue(i, h, r);
346
+ async function u(V) {
347
+ m.remote(V, r, a);
348
348
  }
349
- function y(f) {
350
- H.selectChange(f, h, r, a, {
349
+ function M(V) {
350
+ m.selectChange(V, h, r, a, {
351
351
  datasource: "data"
352
352
  });
353
353
  }
354
- function C(f) {
355
- e != null && e.input && e.input(l, f);
354
+ function C(V) {
355
+ c != null && c.input && c.input(l, V);
356
356
  }
357
357
  function A() {
358
- H.clear(h, r, m, e, "data");
358
+ m.clear(h, r, n, c, "data");
359
359
  }
360
360
  function w() {
361
- !c.length && n(""), e != null && e.focus && e.focus(l);
361
+ !e.length && u(""), c != null && c.focus && c.focus(l);
362
362
  }
363
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
364
- modelValue: h[p],
365
- "onUpdate:modelValue": (f) => h[p] = f,
364
+ modelValue: h[s],
365
+ "onUpdate:modelValue": (V) => h[s] = V,
366
366
  filterable: !0,
367
367
  remote: !0,
368
368
  clearable: !0,
369
369
  style: "width: 100%",
370
370
  placeholder: "请录入关键字搜索",
371
- loading: u,
372
- "remote-method": n
371
+ loading: H,
372
+ "remote-method": u
373
373
  }, i, {
374
374
  onFocus: () => w(),
375
- onChange: (f) => y(f),
375
+ onChange: (V) => M(V),
376
376
  onClear: () => A(),
377
377
  onInput: () => C()
378
- }), _isSlot(o = c.map((f) => createVNode(resolveComponent("el-option"), {
379
- key: f[d],
380
- label: f[v],
381
- value: f[d]
378
+ }), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
379
+ key: V[d],
380
+ label: V[Z],
381
+ value: V[d]
382
382
  }, null))) ? o : {
383
383
  default: () => [o]
384
384
  })];
@@ -392,31 +392,31 @@ const VxetableRender = (VXETable, {
392
392
  props: r
393
393
  } = a;
394
394
  r != null && r.defaultValue && !o[h] && (o[h] = r.defaultValue, r.defaultValue = r.required ? r.defaultValue : null);
395
- const c = /* @__PURE__ */ new Date(), i = [{
395
+ const e = /* @__PURE__ */ new Date(), i = [{
396
396
  text: i18n("message.udp.today", !0),
397
- value: () => [Z(1, "day"), c]
397
+ value: () => [t(1, "day"), e]
398
398
  }, {
399
399
  text: i18n("message.udp.yesterday", !0),
400
- value: () => [Z(2, "day"), Z(2, "day")]
400
+ value: () => [t(2, "day"), t(2, "day")]
401
401
  }, {
402
402
  text: i18n("message.udp.lastWeek", !0),
403
- value: () => [Z(7, "day"), c]
403
+ value: () => [t(7, "day"), e]
404
404
  }, {
405
405
  text: i18n("message.udp.lastMonth", !0),
406
- value: () => [Z(1, "month"), c]
406
+ value: () => [t(1, "month"), e]
407
407
  }, {
408
408
  text: i18n("message.udp.threeMonth", !0),
409
- value: () => [Z(3, "month"), c]
409
+ value: () => [t(3, "month"), e]
410
410
  }, {
411
411
  text: i18n("message.udp.halfYear", !0),
412
- value: () => [Z(6, "month"), c]
412
+ value: () => [t(6, "month"), e]
413
413
  }, {
414
414
  text: i18n("message.udp.anniversary", !0),
415
- value: () => [Z(1, "year"), c]
416
- }], Z = (e, v) => dayjs().subtract(e, v).add("1", "day").format();
415
+ value: () => [t(1, "year"), e]
416
+ }], t = (c, Z) => dayjs().subtract(c, Z).add("1", "day").format();
417
417
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
418
418
  modelValue: o[h],
419
- "onUpdate:modelValue": (e) => o[h] = e,
419
+ "onUpdate:modelValue": (c) => o[h] = c,
420
420
  type: (r == null ? void 0 : r.type) || "daterange",
421
421
  shortcuts: i,
422
422
  style: "width: 100%",
@@ -432,45 +432,40 @@ const VxetableRender = (VXETable, {
432
432
  row: h,
433
433
  column: r
434
434
  } = l, {
435
- options: c,
435
+ options: e,
436
436
  props: i,
437
- optionProps: Z = {},
438
- events: e
437
+ optionProps: t = {},
438
+ events: c
439
439
  } = a, {
440
- label: v = "label",
441
- value: d = "value",
442
- extLabel: m
443
- } = Z, {
444
- mapField: V
445
- } = i, u = useComponent();
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({
448
- [d]: n,
449
- [v]: n
450
- });
451
- });
452
- function H(n) {
453
- u.selectChange(n, h, r.field, a, {
440
+ label: Z = "label",
441
+ value: d = "value"
442
+ } = t, {
443
+ multiple: n,
444
+ mapField: f
445
+ } = i, H = useComponent(), m = n ? `_${r.field}` : r.field;
446
+ H.setDefaultValue(i, h, r.field);
447
+ function s(M) {
448
+ H.selectChange(M, h, r.field, a, {
454
449
  column: r,
455
450
  datasource: "row"
456
451
  });
457
452
  }
458
- function p() {
459
- u.clear(h, r.field, V, e, "row");
453
+ function u() {
454
+ H.clear(h, r.field, f, c, "row");
460
455
  }
461
456
  return [createVNode(resolveComponent("el-select"), mergeProps({
462
- modelValue: h[r.field],
463
- "onUpdate:modelValue": (n) => h[r.field] = n,
457
+ modelValue: h[m],
458
+ "onUpdate:modelValue": (M) => h[m] = M,
464
459
  filterable: !0,
465
460
  clearable: !0
466
461
  }, i, {
467
462
  style: "width: 100%",
468
- onChange: (n) => H(n),
469
- onClear: () => p()
470
- }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
471
- key: n[d],
472
- label: m && n[m] ? n[d] : n[v],
473
- value: n[d]
463
+ onChange: (M) => s(M),
464
+ onClear: () => u()
465
+ }), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
466
+ key: M[d],
467
+ label: M[Z],
468
+ value: M[d]
474
469
  }, null))) ? o : {
475
470
  default: () => [o]
476
471
  })];
@@ -481,45 +476,41 @@ const VxetableRender = (VXETable, {
481
476
  row: h,
482
477
  column: r
483
478
  } = l, {
484
- options: c,
479
+ options: e,
485
480
  props: i,
486
- optionProps: Z = {},
487
- events: e
481
+ optionProps: t = {},
482
+ events: c
488
483
  } = a, {
489
- label: v = "label",
484
+ label: Z = "label",
490
485
  value: d = "value",
491
- extLabel: m
492
- } = Z, {
493
- mapField: V
494
- } = i, u = useComponent();
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({
497
- [d]: n,
498
- [v]: n
499
- });
500
- });
501
- function H(n) {
502
- u.selectChange(n, h, r.field, a, {
486
+ extLabel: n
487
+ } = t, {
488
+ multiple: f,
489
+ mapField: H
490
+ } = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
491
+ m.setDefaultValue(i, h, r.field);
492
+ function u(C) {
493
+ m.selectChange(C, h, r.field, a, {
503
494
  column: r,
504
495
  datasource: "row"
505
496
  });
506
497
  }
507
- function p() {
508
- u.clear(h, r.field, V, e, "row");
498
+ function M() {
499
+ m.clear(h, r.field, H, c, "row");
509
500
  }
510
501
  return [createVNode(resolveComponent("el-select"), mergeProps({
511
- modelValue: h[r.field],
512
- "onUpdate:modelValue": (n) => h[r.field] = n,
502
+ modelValue: h[s],
503
+ "onUpdate:modelValue": (C) => h[s] = C,
513
504
  filterable: !0,
514
505
  clearable: !0
515
506
  }, i, {
516
507
  style: "width: 100%",
517
- onChange: (n) => H(n),
518
- onClear: () => p()
519
- }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
520
- key: n[d],
521
- label: m && n[m] ? n[d] : n[v],
522
- value: n[d]
508
+ onChange: (C) => u(C),
509
+ onClear: () => M()
510
+ }), _isSlot(o = e.map((C) => createVNode(resolveComponent("el-option"), {
511
+ key: C[d],
512
+ label: n && C[n] ? C[d] : C[Z],
513
+ value: C[d]
523
514
  }, null))) ? o : {
524
515
  default: () => [o]
525
516
  })];
@@ -550,39 +541,39 @@ const VxetableRender = (VXETable, {
550
541
  data: h,
551
542
  field: r
552
543
  } = l, {
553
- options: c,
544
+ options: e,
554
545
  props: i,
555
- optionProps: Z = {},
556
- events: e
546
+ optionProps: t = {},
547
+ events: c
557
548
  } = a, {
558
- label: v = "label",
549
+ label: Z = "label",
559
550
  value: d = "value"
560
- } = Z, m = useComponent(), {
561
- defaultValues: V,
562
- mapField: u
563
- } = i;
564
- V && (h[r] = V);
565
- function H(n) {
566
- m.selectChange(n, h, r, a, {
551
+ } = t, n = useComponent(), {
552
+ mapField: f,
553
+ multiple: H
554
+ } = i, m = H ? `_${r}` : r;
555
+ n.setDefaultValue(i, h, r);
556
+ function s(M) {
557
+ n.selectChange(M, h, r, a, {
567
558
  datasource: "data"
568
559
  });
569
560
  }
570
- function p() {
571
- m.clear(h, r, u, e, "data");
561
+ function u() {
562
+ n.clear(h, r, f, c, "data");
572
563
  }
573
564
  return [createVNode(resolveComponent("el-select"), mergeProps({
574
- modelValue: h[r],
575
- "onUpdate:modelValue": (n) => h[r] = n,
565
+ modelValue: h[m],
566
+ "onUpdate:modelValue": (M) => h[m] = M,
576
567
  filterable: !0,
577
568
  clearable: !0,
578
569
  style: "width: 100%"
579
570
  }, i, {
580
- onChange: (n) => H(n),
581
- onClear: () => p()
582
- }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
583
- key: n[d],
584
- label: n[v],
585
- value: n[d]
571
+ onChange: (M) => s(M),
572
+ onClear: () => u()
573
+ }), _isSlot(o = e.map((M) => createVNode(resolveComponent("el-option"), {
574
+ key: M[d],
575
+ label: M[Z],
576
+ value: M[d]
586
577
  }, null))) ? o : {
587
578
  default: () => [o]
588
579
  })];
@@ -594,52 +585,51 @@ const VxetableRender = (VXETable, {
594
585
  field: h
595
586
  } = l, {
596
587
  props: r,
597
- events: c
588
+ events: e
598
589
  } = a, i = useComponent(), {
599
- defaultValues: Z,
600
- mapField: e
590
+ defaultValues: t,
591
+ mapField: c
601
592
  } = r;
602
- Z && (o[h] = Z);
603
- function v(m, V) {
593
+ t && (o[h] = t);
594
+ function Z(n, f) {
604
595
  const {
605
- mapField: u,
606
- field: H,
607
- displayName: p,
608
- multiple: n
596
+ mapField: H,
597
+ field: m,
598
+ displayName: s,
599
+ multiple: u
609
600
  } = r;
610
- if (n) {
611
- if (n) {
601
+ if (u) {
602
+ if (u) {
612
603
  const 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;
604
+ o[s || m] = n.reduce((A, w) => {
605
+ for (const V in H)
606
+ C[V] = A ? C[V] + "," + w[H[V]] : w[H[V]];
607
+ return A = A ? A + "," + w[s || m] : w[s || m], A;
617
608
  }, ""), Object.assign(o, C);
618
609
  }
619
610
  } else {
620
611
  const C = {
621
- [p || H]: m[V || p || H]
612
+ [s || m]: n[f || s || m]
622
613
  };
623
- for (const A in u)
624
- C[A] = m[u[A]];
614
+ for (const A in H)
615
+ C[A] = n[H[A]];
625
616
  Object.assign(o, C);
626
617
  }
627
- const y = {
628
- row: o,
629
- property: H,
630
- item: m,
631
- field: H
618
+ const M = {
619
+ data: o,
620
+ options: n,
621
+ field: m
632
622
  };
633
- c != null && c.change && c.change(y);
623
+ e != null && e.change && e.change(M);
634
624
  }
635
625
  function d() {
636
- i.clear(o, h, e, c, "data");
626
+ i.clear(o, h, c, e, "data");
637
627
  }
638
628
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
639
629
  record: o
640
630
  }, r, {
641
631
  mode: "vxe",
642
- onChange: (m, V) => v(m, V),
632
+ onChange: (n, f) => Z(n, f),
643
633
  onClear: () => d()
644
634
  }), null)];
645
635
  },
@@ -650,35 +640,40 @@ const VxetableRender = (VXETable, {
650
640
  column: h
651
641
  } = l, {
652
642
  props: r,
653
- events: c
643
+ events: e
654
644
  } = a, i = useComponent();
655
- function Z(v, d) {
645
+ function t(Z, d) {
656
646
  const {
657
- mapField: m,
658
- field: V,
659
- displayName: u,
660
- multiple: H
647
+ mapField: n,
648
+ field: f,
649
+ displayName: H,
650
+ multiple: m
661
651
  } = r;
662
- if (!H) {
663
- const p = {
664
- [u || V]: v[d || u || V]
652
+ if (!m) {
653
+ const u = {
654
+ [H || f]: Z[d || H || f]
665
655
  };
666
- for (const n in m)
667
- p[n] = v[m[n]];
668
- Object.assign(o, p);
656
+ for (const M in n)
657
+ u[M] = Z[n[M]];
658
+ Object.assign(o, u);
669
659
  }
670
- c != null && c.change && c.change(l, v, o[h.field]);
660
+ const s = {
661
+ row: o,
662
+ options: Z,
663
+ field: h.field
664
+ };
665
+ e != null && e.change && e.change(s);
671
666
  }
672
- function e() {
673
- i.clear(o, h.field, mapField, c, "row");
667
+ function c() {
668
+ i.clear(o, h.field, mapField, e, "row");
674
669
  }
675
670
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
676
671
  record: o,
677
672
  mode: "vxe",
678
673
  transfer: !0
679
674
  }, r, {
680
- onChange: (v, d) => Z(v, d),
681
- onClear: () => e()
675
+ onChange: (Z, d) => t(Z, d),
676
+ onClear: () => c()
682
677
  }), null)];
683
678
  },
684
679
  // 单元格默认
@@ -688,34 +683,39 @@ const VxetableRender = (VXETable, {
688
683
  column: h
689
684
  } = l, {
690
685
  props: r,
691
- events: c
686
+ events: e
692
687
  } = a, i = useComponent();
693
- function Z(v, d) {
688
+ function t(Z, d) {
694
689
  const {
695
- mapField: m,
696
- field: V,
697
- displayName: u,
698
- multiple: H
690
+ mapField: n,
691
+ field: f,
692
+ displayName: H,
693
+ multiple: m
699
694
  } = r;
700
- if (!H) {
701
- const p = {
702
- [u || V]: v[d || u || V]
695
+ if (!m) {
696
+ const u = {
697
+ [H || f]: Z[d || H || f]
703
698
  };
704
- for (const n in m)
705
- p[n] = v[m[n]];
706
- Object.assign(o, p);
699
+ for (const M in n)
700
+ u[M] = Z[n[M]];
701
+ Object.assign(o, u);
707
702
  }
708
- c != null && c.change && c.change(l, v, o[h.field]);
703
+ const s = {
704
+ row: o,
705
+ options: Z,
706
+ field: h.field
707
+ };
708
+ e != null && e.change && e.change(s);
709
709
  }
710
- function e() {
711
- i.clear(o, h.field, mapField, c, "row");
710
+ function c() {
711
+ i.clear(o, h.field, mapField, e, "row");
712
712
  }
713
713
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
714
714
  record: o,
715
715
  mode: "ele"
716
716
  }, r, {
717
- onChange: (v, d) => Z(v, d),
718
- onClear: () => e()
717
+ onChange: (Z, d) => t(Z, d),
718
+ onClear: () => c()
719
719
  }), null)];
720
720
  },
721
721
  // 可编辑显示模板
@@ -727,22 +727,62 @@ const VxetableRender = (VXETable, {
727
727
  return [createVNode("span", null, [o[h.field]])];
728
728
  }
729
729
  }), VXETable.renderer.add("#upload", {
730
+ renderTableEdit(a, l) {
731
+ const {
732
+ row: o,
733
+ column: h
734
+ } = l, {
735
+ props: r,
736
+ events: e
737
+ } = a;
738
+ function i(t, c) {
739
+ o[h.field] = "", e != null && e.remove && (e == null || e.remove(t, c));
740
+ }
741
+ return [createVNode(resolveComponent("form-upload"), mergeProps({
742
+ record: o,
743
+ field: h.field,
744
+ size: "mini"
745
+ }, r, {
746
+ "render-mode": "column",
747
+ "data-status": "edit",
748
+ onRemove: (t, c) => i(t, c)
749
+ }), null)];
750
+ },
751
+ // 可编辑显示模板
752
+ renderTableCell(a, l) {
753
+ const {
754
+ row: o,
755
+ column: h
756
+ } = l, {
757
+ props: r
758
+ } = a;
759
+ return [createVNode(resolveComponent("form-upload"), mergeProps({
760
+ record: o,
761
+ field: h.field,
762
+ size: "mini"
763
+ }, r, {
764
+ mode: "image",
765
+ "render-mode": "column",
766
+ "data-status": "detail"
767
+ }), null)];
768
+ },
730
769
  renderItemContent(a, l) {
731
770
  const {
732
771
  data: o,
733
772
  field: h
734
773
  } = l, {
735
774
  props: r,
736
- events: c
775
+ events: e
737
776
  } = a;
738
- function i() {
739
- o[h] = "", componentHook.clear(o, h, r.mapField, c, "data");
777
+ function i(t, c) {
778
+ o[h] = "", e != null && e.remove && (e == null || e.remove(t, c));
740
779
  }
741
780
  return [createVNode(resolveComponent("form-upload"), mergeProps({
742
781
  record: o,
743
- field: h
782
+ field: h,
783
+ mode: "image"
744
784
  }, r, {
745
- onClear: () => i()
785
+ onRemove: (t, c) => i(t, c)
746
786
  }), null)];
747
787
  }
748
788
  }), VXETable.renderer.add("#tag", {
@@ -754,17 +794,17 @@ const VxetableRender = (VXETable, {
754
794
  column: r
755
795
  } = l, {
756
796
  props: {
757
- code: c,
797
+ code: e,
758
798
  tagMap: i
759
799
  }
760
800
  } = a;
761
- function Z() {
801
+ function t() {
762
802
  return h[r.field] ? i[h[r.field]] : null;
763
803
  }
764
804
  return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
765
805
  effect: "dark",
766
- type: Z()
767
- }, _isSlot(o = getValue(c, h[r.field])) ? o : {
806
+ type: t()
807
+ }, _isSlot(o = getValue(e, h[r.field])) ? o : {
768
808
  default: () => [o]
769
809
  }) : null];
770
810
  }
@@ -776,29 +816,29 @@ const VxetableRender = (VXETable, {
776
816
  } = l, {
777
817
  props: {
778
818
  code: r,
779
- activeValue: c,
819
+ activeValue: e,
780
820
  inactiveValue: i
781
821
  },
782
- events: Z
822
+ events: t
783
823
  } = a;
784
- function e(v) {
824
+ function c(Z) {
785
825
  const d = {
786
826
  row: o,
787
827
  column: h,
788
- value: v
828
+ value: Z
789
829
  };
790
- Z != null && Z.change && Z.change(d);
830
+ t != null && t.change && t.change(d);
791
831
  }
792
832
  return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
793
833
  modelValue: o[h.field],
794
- "onUpdate:modelValue": (v) => o[h.field] = v,
834
+ "onUpdate:modelValue": (Z) => o[h.field] = Z,
795
835
  "inline-prompt": !0,
796
836
  size: "large",
797
837
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
798
838
  }, a.props, {
799
- "active-text": getValue(r, c),
839
+ "active-text": getValue(r, e),
800
840
  "inactive-text": getValue(r, i),
801
- onChange: (v) => e(v)
841
+ onChange: (Z) => c(Z)
802
842
  }), null) : null];
803
843
  }
804
844
  }), VXETable.renderer.add("#iconSelect", {
@@ -841,19 +881,19 @@ const VxetableRender = (VXETable, {
841
881
  column: h
842
882
  } = l, {
843
883
  props: r,
844
- sourceData: c,
884
+ sourceData: e,
845
885
  events: i
846
886
  } = a;
847
887
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
848
888
  modelValue: o[h.field],
849
- "onUpdate:modelValue": (Z) => o[h.field] = Z,
850
- data: c,
889
+ "onUpdate:modelValue": (t) => o[h.field] = t,
890
+ data: e,
851
891
  "check-strictly": !0
852
892
  }, r, {
853
893
  filterable: !0,
854
- onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
855
- onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
856
- onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
894
+ onCheckChange: (t, c, Z) => onCheckChange(t, c, Z, i),
895
+ onNodeClick: (t, c, Z) => onNodeClick(t, c, Z, i),
896
+ onCurrentChange: (t, c) => onCurrentChange(t, c, i)
857
897
  }), null)];
858
898
  },
859
899
  renderTableCell(a, l) {
@@ -862,14 +902,14 @@ const VxetableRender = (VXETable, {
862
902
  column: h
863
903
  } = l, {
864
904
  sourceData: r,
865
- props: c = {}
905
+ props: e = {}
866
906
  } = a, {
867
907
  children: i = "children",
868
- label: Z = "label"
869
- } = c, e = findTree(r, (v) => v.value === o[h.field], {
908
+ label: t = "label"
909
+ } = e, c = findTree(r, (Z) => Z.value === o[h.field], {
870
910
  children: i
871
911
  });
872
- return e ? [createVNode("span", null, [e.item[Z]])] : null;
912
+ return c ? [createVNode("span", null, [c.item[t]])] : null;
873
913
  },
874
914
  renderItemContent(a, l) {
875
915
  const {
@@ -877,96 +917,96 @@ const VxetableRender = (VXETable, {
877
917
  field: h
878
918
  } = l, {
879
919
  props: r,
880
- sourceData: c,
920
+ sourceData: e,
881
921
  events: i
882
922
  } = a;
883
923
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
884
924
  modelValue: o[h],
885
- "onUpdate:modelValue": (Z) => o[h] = Z,
886
- data: c,
925
+ "onUpdate:modelValue": (t) => o[h] = t,
926
+ data: e,
887
927
  "check-strictly": !0
888
928
  }, r, {
889
929
  filterable: !0,
890
- onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
891
- onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
892
- onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
930
+ onCheckChange: (t, c, Z) => onCheckChange(t, c, Z, i),
931
+ onNodeClick: (t, c, Z) => onNodeClick(t, c, Z, i),
932
+ onCurrentChange: (t, c) => onCurrentChange(t, c, i)
893
933
  }), null)];
894
934
  }
895
935
  });
896
936
  const useComponent = () => ({
897
- clear: (r, c, i, Z, e) => {
898
- if (r[c] = null, !isEmpty(i))
899
- for (const v in i)
900
- r[v] = null;
901
- Z != null && Z.clear && Z.clear({
902
- [e]: r,
903
- field: c
937
+ clear: (r, e, i, t, c) => {
938
+ if (r[e] = null, !isEmpty(i))
939
+ for (const Z in i)
940
+ r[Z] = null;
941
+ t != null && t.clear && t.clear({
942
+ [c]: r,
943
+ field: e
904
944
  });
905
945
  },
906
- remote: async (r, c, i) => {
946
+ remote: async (r, e, i) => {
907
947
  const {
908
- options: Z,
909
- props: e,
910
- events: v
948
+ options: t,
949
+ props: c,
950
+ events: Z
911
951
  } = i, {
912
952
  fetchField: d,
913
- url: m,
914
- defaultParams: V = {},
915
- method: u = "get"
916
- } = e, H = getCookieParam(), p = Object.assign({
953
+ url: n,
954
+ defaultParams: f = {},
955
+ method: H = "get"
956
+ } = c, m = getCookieParam(), s = Object.assign({
917
957
  pageSize: 20,
918
958
  pageNum: 1,
919
- ...H,
920
- ...V
959
+ ...m,
960
+ ...f
921
961
  }, {
922
- [d || c]: r
962
+ [d || e]: r
923
963
  });
924
- if (e.loading) return;
925
- let n;
964
+ if (c.loading) return;
965
+ let u;
926
966
  try {
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));
967
+ t.length = 0, c.loading = !0, u = await serviceApi[H](n, s), Z != null && Z.filterMethod ? t.push(...Z.filterMethod(u.list || u)) : u && (u.list ? t.push(...u.list) : t.push(...u));
928
968
  } finally {
929
- e.loading = !1;
969
+ c.loading = !1;
930
970
  }
931
971
  },
932
- selectChange: (r, c, i, Z, e) => {
933
- let v = null;
972
+ selectChange: (r, e, i, t, c) => {
973
+ let Z = null;
934
974
  const {
935
975
  datasource: d
936
- } = e, {
937
- options: m,
938
- props: V,
939
- optionProps: u = {},
940
- events: H
941
- } = Z, p = {
942
- [d]: c,
976
+ } = c, {
977
+ options: n,
978
+ props: f,
979
+ optionProps: H = {},
980
+ events: m
981
+ } = t, s = {
982
+ [d]: e,
943
983
  field: i
944
984
  };
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() : "";
949
- c[C] = w && !w.includes(A) ? `${w},${A}` : A;
950
- }), y && v.push(y);
951
- }), Object.assign(p, {
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;
955
- }), Object.assign(p, {
956
- option: v
957
- })), d === "row" && Object.assign(p, {
958
- column: e.column
959
- }), H != null && H.change && H.change(p);
960
- },
961
- setDefaultValue: (r, c, i) => {
985
+ e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), Z = [], r.forEach((u) => {
986
+ const M = n.find((C) => u === C[H == null ? void 0 : H.value]);
987
+ M && !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((C) => {
988
+ const A = M[f.mapField[C]], w = e[C] ? e[C].toString() : "";
989
+ e[C] = w && !w.includes(A) ? `${w},${A}` : A;
990
+ }), M && Z.push(M);
991
+ }), Object.assign(s, {
992
+ options: Z
993
+ })) : (e[i] = f != null && f.multiple ? null : r, Z = n.find((u) => r === u[H == null ? void 0 : H.value]), !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((u) => {
994
+ e[u] = Z ? Z[f.mapField[u]] : null;
995
+ }), Object.assign(s, {
996
+ option: Z
997
+ })), d === "row" && Object.assign(s, {
998
+ column: c.column
999
+ }), m != null && m.change && m.change(s);
1000
+ },
1001
+ setDefaultValue: (r, e, i) => {
962
1002
  var d;
963
1003
  const {
964
- multiple: Z,
965
- defaultValue: e
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]);
1004
+ multiple: t,
1005
+ defaultValue: c
1006
+ } = r, Z = t ? `_${i}` : i;
1007
+ !e[i] && c && (e[i] = c, isPlainObject(c) && Object.keys(c).forEach((f) => {
1008
+ e[f] = e[f] || c[f];
1009
+ })), !e[Z] && e[i] && (e[Z] = t ? (d = e[i]) == null ? void 0 : d.split(",") : e[i]);
970
1010
  }
971
1011
  }), onCheckChange = (a, l, o, h) => {
972
1012
  console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
@@ -977,7 +1017,7 @@ const VxetableRender = (VXETable, {
977
1017
  };
978
1018
  function getValue(a, l) {
979
1019
  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;
1020
+ 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;
981
1021
  }
982
1022
  return VXETable;
983
1023
  }, getCookieParam = () => {
@@ -991,12 +1031,12 @@ const VxetableRender = (VXETable, {
991
1031
  }, removeClass = (a, l, o) => {
992
1032
  var h, r;
993
1033
  if (hasClass(a, l)) {
994
- const c = new RegExp("(\\s|^)" + l + "(\\s|$)");
995
- a.className = (h = a.className) == null ? void 0 : h.replace(c, " ").trim();
1034
+ const e = new RegExp("(\\s|^)" + l + "(\\s|$)");
1035
+ a.className = (h = a.className) == null ? void 0 : h.replace(e, " ").trim();
996
1036
  }
997
1037
  if (o && hasClass(a, o)) {
998
- const c = new RegExp("(\\s|^)" + o + "(\\s|$)");
999
- a.className = (r = a.className) == null ? void 0 : r.replace(c, " ").trim();
1038
+ const e = new RegExp("(\\s|^)" + o + "(\\s|$)");
1039
+ a.className = (r = a.className) == null ? void 0 : r.replace(e, " ").trim();
1000
1040
  }
1001
1041
  }, toggleClass = (a, l, o) => {
1002
1042
  const h = o || document.body;
@@ -1031,45 +1071,45 @@ const openLink = (a) => {
1031
1071
  }, domSymbol = Symbol("watermark-dom");
1032
1072
  function useWatermark(a = ref(document.body)) {
1033
1073
  const l = useRafThrottle(function() {
1034
- const v = unref(a);
1035
- if (!v) return;
1036
- const { clientHeight: d, clientWidth: m } = v;
1037
- i({ height: d, width: m });
1074
+ const Z = unref(a);
1075
+ if (!Z) return;
1076
+ const { clientHeight: d, clientWidth: n } = Z;
1077
+ i({ height: d, width: n });
1038
1078
  }), o = domSymbol.toString(), h = shallowRef(), r = () => {
1039
- const v = unref(h);
1079
+ const Z = unref(h);
1040
1080
  h.value = void 0;
1041
1081
  const d = unref(a);
1042
- d && (v && d.removeChild(v), removeResizeListener(d, l));
1082
+ d && (Z && d.removeChild(Z), removeResizeListener(d, l));
1043
1083
  };
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");
1084
+ function e(Z, d) {
1085
+ const n = document.createElement("canvas"), f = 260, H = 180;
1086
+ Object.assign(n, { width: f, height: H });
1087
+ const m = n.getContext("2d");
1088
+ 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, H)), n.toDataURL("image/png");
1049
1089
  }
1050
- function i(v = {}) {
1090
+ function i(Z = {}) {
1051
1091
  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
1092
+ 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(
1093
+ Z.str,
1094
+ Z.attr
1055
1095
  )}) left top repeat`));
1056
1096
  }
1057
- const Z = (v, d) => {
1097
+ const t = (Z, d) => {
1058
1098
  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;
1099
+ return i({ str: Z, attr: d }), o;
1100
+ const n = document.createElement("div");
1101
+ 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";
1102
+ const f = unref(a);
1103
+ if (!f) return o;
1104
+ const { clientHeight: H, clientWidth: m } = f;
1105
+ return i({ str: Z, width: m, height: H, attr: d }), f.appendChild(n), o;
1066
1106
  };
1067
- function e(v, d) {
1068
- Z(v, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1107
+ function c(Z, d) {
1108
+ t(Z, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1069
1109
  r();
1070
1110
  });
1071
1111
  }
1072
- return { setWatermark: e, clear: r };
1112
+ return { setWatermark: c, clear: r };
1073
1113
  }
1074
1114
  const DEFAULT_EXCLUDE_KEYS = ["class", "style"], LISTENER_PREFIX = /^on[A-Z]/;
1075
1115
  function entries(a) {
@@ -1078,164 +1118,164 @@ function entries(a) {
1078
1118
  function useAttrs(a = {}) {
1079
1119
  const l = getCurrentInstance();
1080
1120
  if (!l) return {};
1081
- const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), c = h.concat(DEFAULT_EXCLUDE_KEYS);
1121
+ const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), e = h.concat(DEFAULT_EXCLUDE_KEYS);
1082
1122
  return l.attrs = reactive(l.attrs), watchEffect(() => {
1083
- const i = entries(l.attrs).reduce((Z, [e, v]) => (!c.includes(e) && !(o && LISTENER_PREFIX.test(e)) && (Z[e] = v), Z), {});
1123
+ const i = entries(l.attrs).reduce((t, [c, Z]) => (!e.includes(c) && !(o && LISTENER_PREFIX.test(c)) && (t[c] = Z), t), {});
1084
1124
  r.value = i;
1085
1125
  }), r;
1086
1126
  }
1087
1127
  const useRender = () => {
1088
- const a = { value: "dictCode", label: "dictName" }, l = (t, M) => {
1089
- var F;
1090
- const b = f(M);
1091
- let s = {
1128
+ const a = { value: "dictCode", label: "dictName" }, l = (v, p) => {
1129
+ var N;
1130
+ const b = k(p);
1131
+ let y = {
1092
1132
  clearable: !0,
1093
1133
  disabled: !1,
1094
1134
  showValue: !1,
1095
1135
  placeholder: null
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") : [];
1136
+ }, L, x;
1137
+ isObject(v) ? (y = Object.assign(y, v), L = v.defaultValue, x = v == null ? void 0 : v.code) : x = v;
1138
+ const D = (N = storageLocal.getItem("kLov")[x]) == null ? void 0 : N.children, F = D ? D.filter((E) => E.enabled === "1") : [];
1099
1139
  return {
1100
1140
  name: "#select",
1101
1141
  optionProps: a,
1102
- options: D,
1103
- props: s,
1142
+ options: F,
1143
+ props: y,
1104
1144
  defaultValue: L,
1105
1145
  events: b
1106
1146
  };
1107
- }, o = (t, M) => {
1108
- const b = f(M);
1147
+ }, o = (v, p) => {
1148
+ const b = k(p);
1109
1149
  return {
1110
1150
  name: "#SuSelect",
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) || [],
1151
+ optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
1152
+ props: v == null ? void 0 : v.props,
1153
+ options: (v == null ? void 0 : v.options) || [],
1114
1154
  events: b
1115
1155
  };
1116
- }, h = (t, M) => {
1156
+ }, h = (v, p) => {
1117
1157
  const b = {
1118
1158
  optionProps: { extLabel: "userName", value: "employeeName" },
1119
1159
  props: {
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,
1160
+ attrs: { disabled: v == null ? void 0 : v.disabled },
1161
+ disabled: v == null ? void 0 : v.disabled,
1162
+ defaultValue: v == null ? void 0 : v.defaultValue,
1163
+ mapField: v == null ? void 0 : v.mapField,
1124
1164
  code: "SYS037",
1125
1165
  url: "/uums/employee/listEmployeeIsUser",
1126
1166
  fetchField: "employeeName"
1127
1167
  }
1128
1168
  };
1129
- return o(b, M);
1130
- }, r = (t) => {
1131
- const M = {
1169
+ return o(b, p);
1170
+ }, r = (v) => {
1171
+ const p = {
1132
1172
  optionProps: { extLabel: "userName", value: "name" },
1133
1173
  props: {
1134
1174
  code: "sys/listUsers",
1135
1175
  url: "/uums/user",
1136
1176
  fetchField: "name",
1137
- mapField: t == null ? void 0 : t.mapField
1177
+ mapField: v == null ? void 0 : v.mapField
1138
1178
  }
1139
1179
  };
1140
- return o(M);
1141
- }, c = (t, M) => {
1180
+ return o(p);
1181
+ }, e = (v, p) => {
1142
1182
  const b = {
1143
1183
  label: "organizationName",
1144
- value: (t == null ? void 0 : t.field) || "organizationName"
1145
- }, s = {
1184
+ value: (v == null ? void 0 : v.field) || "organizationName"
1185
+ }, y = {
1146
1186
  mapField: {},
1147
- defaultParams: t == null ? void 0 : t.defaultParams,
1187
+ defaultParams: v == null ? void 0 : v.defaultParams,
1148
1188
  url: "/uums/cusOrganization",
1149
1189
  fetchField: "organizationName"
1150
1190
  }, L = {
1151
1191
  organizationId: "id",
1152
1192
  organizationCode: "organizationCode"
1153
1193
  };
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) => {
1194
+ return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: y, optionProps: b, options: [], methods: p };
1195
+ }, i = (v, p) => {
1156
1196
  const b = {
1157
1197
  label: "orgName",
1158
- value: (t == null ? void 0 : t.field) || "orgName"
1159
- }, s = {
1198
+ value: (v == null ? void 0 : v.field) || "orgName"
1199
+ }, y = {
1160
1200
  mapField: {},
1161
- defaultParams: t == null ? void 0 : t.defaultParams,
1201
+ defaultParams: v == null ? void 0 : v.defaultParams,
1162
1202
  url: "/uums/org",
1163
1203
  fetchField: "orgName"
1164
1204
  }, 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;
1205
+ return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: y, optionProps: b, options: [], methods: p };
1206
+ }, t = (v, p) => {
1207
+ const b = Object.assign({ disabled: !1 }, v), y = b == null ? void 0 : b.defaultValue;
1168
1208
  return {
1169
1209
  name: "VxeInput",
1170
1210
  props: b,
1171
- defaultValue: s,
1172
- events: f(M)
1211
+ defaultValue: y,
1212
+ events: k(p)
1173
1213
  };
1174
- }, e = (t, M) => {
1175
- const b = Object.assign({ disabled: !1, rows: 3 }, t), s = b == null ? void 0 : b.defaultValue;
1214
+ }, c = (v, p) => {
1215
+ const b = Object.assign({ disabled: !1, rows: 3 }, v), y = b == null ? void 0 : b.defaultValue;
1176
1216
  return {
1177
- name: "VxeTextarea",
1217
+ name: "#textarea",
1178
1218
  props: b,
1179
- defaultValue: s,
1180
- events: f(M)
1219
+ defaultValue: y,
1220
+ events: k(p)
1181
1221
  };
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) => {
1189
- var x;
1190
- let M = { disabled: !1 }, b;
1191
- const s = storageLocal.getItem("kLov");
1222
+ }, Z = (v, p) => {
1223
+ const b = "VxeCheckbox", { defaultValue: y, options: L, props: x } = n(v);
1224
+ return { name: b, defaultValue: y, options: L, props: x, events: k(p) };
1225
+ }, d = (v, p) => {
1226
+ const b = "VxeRadio", { defaultValue: y, options: L, props: x } = n(v);
1227
+ return { name: b, defaultValue: y, options: L, props: x, events: k(p) };
1228
+ }, n = (v) => {
1229
+ var D;
1230
+ let p = { disabled: !1 }, b;
1231
+ const y = storageLocal.getItem("kLov");
1192
1232
  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 })) : [];
1195
- return { props: M, defaultValue: b, options: S };
1196
- }, V = (t, M) => {
1197
- const b = f(M);
1233
+ isObject(v) ? (b = v.defaultValue, L = v.code, p = Object.assign(p, v || {})) : isString(v) && (L = v);
1234
+ const x = L ? (D = y[L]) == null ? void 0 : D.children.map((F) => ({ label: F.dictName, value: F.dictCode })) : [];
1235
+ return { props: p, defaultValue: b, options: x };
1236
+ }, f = (v, p) => {
1237
+ const b = k(p);
1198
1238
  return {
1199
1239
  name: "VxeInput",
1200
1240
  props: Object.assign(
1201
1241
  { type: "number", clearable: !0, min: 0, controls: !1 },
1202
- t || {}
1242
+ v || {}
1203
1243
  ),
1204
- defaultValue: t == null ? void 0 : t.defaultValue,
1244
+ defaultValue: v == null ? void 0 : v.defaultValue,
1205
1245
  events: b
1206
1246
  };
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) || {
1247
+ }, H = (v, p) => {
1248
+ const b = k(p), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
1249
+ return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: y, clearable: !0 }, v || {}), defaultValue: L, events: b };
1250
+ }, m = (v, p) => {
1251
+ const b = k(p);
1252
+ return { name: "#lov", props: Object.assign({}, v || {}), events: b };
1253
+ }, s = (v, p) => {
1254
+ const b = k(p), y = (v == null ? void 0 : v.optionProps) || {
1215
1255
  label: "label",
1216
1256
  value: "value"
1217
1257
  }, L = Object.assign(
1218
1258
  { clearable: !0, disabled: !1, showValue: !1 },
1219
- t || {}
1259
+ v || {}
1220
1260
  );
1221
1261
  return console.log("itemRender"), {
1222
1262
  name: "#select",
1223
- optionProps: s,
1224
- options: (t == null ? void 0 : t.options) || [],
1263
+ optionProps: y,
1264
+ options: (v == null ? void 0 : v.options) || [],
1225
1265
  props: L,
1226
1266
  events: b
1227
1267
  };
1228
- }, n = (t, M) => {
1268
+ }, u = (v, p) => {
1229
1269
  let b = {
1230
1270
  openLabel: "是",
1231
1271
  closeLabel: "否",
1232
1272
  openValue: "Y",
1233
1273
  closeValue: "N"
1234
- }, s = "Y";
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) => {
1274
+ }, y = "Y";
1275
+ isObject(v) && !isFunction(v) ? (b = Object.assign(b, v || {}), y = v.defaultValue || y) : !isEmpty(v) && isString(v) && (y = v, b = Object.assign(b, { defaultValue: y }));
1276
+ const L = isFunction(v) ? k(v) : k(p);
1277
+ return { name: "VxeSwitch", props: b, defaultValue: y, events: L };
1278
+ }, M = (v, p) => ({ name: "#tag", props: { code: v, tagMap: p } }), C = (v, p) => {
1239
1279
  const b = {
1240
1280
  openLabel: "启用",
1241
1281
  closeLabel: "禁用",
@@ -1243,55 +1283,75 @@ const useRender = () => {
1243
1283
  closeValue: "0",
1244
1284
  defaultValue: "1"
1245
1285
  };
1246
- !isFunction(t) && isObject(t) && Object.assign(b, t);
1247
- const s = isFunction(t) ? t : M;
1248
- return n(b, s);
1249
- }, A = () => ({ name: "#iconSelect" }), w = (t = [], M = {}, b) => ({ name: "#treeSelect", sourceData: t, props: M, events: b }), f = (t) => {
1250
- let 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;
1286
+ !isFunction(v) && isObject(v) && Object.assign(b, v);
1287
+ const y = isFunction(v) ? v : p;
1288
+ return u(b, y);
1289
+ }, A = () => ({ name: "#iconSelect" }), w = (v = [], p = {}, b) => ({ name: "#treeSelect", sourceData: v, props: p, events: b }), V = (v, p) => {
1290
+ const b = k(p);
1291
+ return {
1292
+ name: "#area",
1293
+ props: { mapField: (v == null ? void 0 : v.mapField) || ["province", "city", "region"] },
1294
+ events: b
1295
+ };
1296
+ }, k = (v) => {
1297
+ let p = {};
1298
+ return isObject(v) && !isFunction(v) ? p = {
1299
+ change: (v == null ? void 0 : v.change) || I,
1300
+ blur: (v == null ? void 0 : v.blur) || I,
1301
+ focus: (v == null ? void 0 : v.focus) || I,
1302
+ input: (v == null ? void 0 : v.input) || I,
1303
+ clear: (v == null ? void 0 : v.clear) || I,
1304
+ searchClick: v == null ? void 0 : v.searchClick,
1305
+ suffixClick: v == null ? void 0 : v.suffixClick,
1306
+ prefixClick: v == null ? void 0 : v.prefixClick,
1307
+ filterMethod: v == null ? void 0 : v.filterMethod
1308
+ } : v && (p = { change: v }), p;
1309
+ }, R = (v, p) => {
1310
+ v = v || {};
1311
+ const { singleMode: b, mode: y } = v;
1312
+ return b && Object.assign(v, {
1313
+ multiple: !1,
1314
+ limitCount: 1,
1315
+ autoHiddenButton: !0
1316
+ }), (!y || y === "image") && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: p };
1259
1317
  };
1260
1318
  function I() {
1261
1319
  }
1262
1320
  return {
1263
1321
  renderDict: l,
1264
1322
  renderSelect: o,
1265
- renderInput: Z,
1266
- renderTextarea: e,
1267
- renderCheckBox: v,
1323
+ renderInput: t,
1324
+ renderTextarea: c,
1325
+ renderCheckBox: Z,
1268
1326
  renderRadio: d,
1269
1327
  renderUser: h,
1270
1328
  renderSysUser: r,
1271
- renderInvOrg: c,
1329
+ renderInvOrg: e,
1272
1330
  renderBU: i,
1273
- renderNumber: V,
1274
- renderLov: H,
1275
- renderSelectLocal: p,
1276
- renderDate: u,
1277
- renderSwitch: n,
1278
- renderCellTag: y,
1331
+ renderNumber: f,
1332
+ renderLov: m,
1333
+ renderSelectLocal: s,
1334
+ renderDate: H,
1335
+ renderSwitch: u,
1336
+ renderCellTag: M,
1279
1337
  renderEnabled: C,
1280
1338
  renderIconSelect: A,
1281
- renderTreeSelect: w
1339
+ renderTreeSelect: w,
1340
+ renderArea: V,
1341
+ renderUpload: R
1282
1342
  };
1283
1343
  }, useGlobal = () => {
1284
1344
  const a = getCurrentInstance();
1285
1345
  if (!a) return { $global: {}, $storage: {}, $config: {} };
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;
1346
+ 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;
1287
1347
  return {
1288
1348
  $global: l,
1289
1349
  $storage: o,
1290
1350
  $config: h,
1291
1351
  $serviceApi: r,
1292
- $hasAuthority: c,
1352
+ $hasAuthority: e,
1293
1353
  $printPlugin: i,
1294
- $mode: Z
1354
+ $mode: t
1295
1355
  };
1296
1356
  }, hexList = [];
1297
1357
  for (let a = 0; a <= 15; a++)
@@ -1308,8 +1368,8 @@ function buildShortUUID(a = "") {
1308
1368
  return unique++, a + "_" + o + unique + String(l);
1309
1369
  }
1310
1370
  const deviceDetection = () => {
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;
1371
+ 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";
1372
+ return l || o || h || r || e || i || t;
1313
1373
  }, getBrowserInfo = () => {
1314
1374
  const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
1315
1375
  return {
@@ -1333,29 +1393,29 @@ const deviceDetection = () => {
1333
1393
  }, errorMessage = (a = "操作失败", l = {}) => {
1334
1394
  var o, h;
1335
1395
  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" });
1336
- }, renderHook = useRender(), i18nColums = (a) => {
1337
- let l = 0, o = 0;
1338
- const h = a.length - 1;
1339
- return a.map((r, c) => {
1340
- if (o = o + r.width, r.type) return r;
1341
- r.title = r.title || `message.${r.field}`;
1342
- const { showOverflow: i, sortable: Z } = 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;
1396
+ }, renderHook = useRender(), i18nColums = (a, l = !0) => {
1397
+ let o = 0, h = 0;
1398
+ const r = a.length - 1;
1399
+ return a.map((e, i) => {
1400
+ if (h = h + e.width, e.type) return e;
1401
+ e.title = e.title || `message.${e.field}`;
1402
+ const { showOverflow: t } = e;
1403
+ 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;
1344
1404
  });
1345
1405
  }, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
1346
- var r, c, i;
1406
+ var r, e, i;
1347
1407
  if ((r = h.children) != null && r.length)
1348
1408
  return h.children = formatItems(h.children, l, o), h;
1349
1409
  {
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 = {
1410
+ h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.type === "collapseNode" && (h.title = "", h.titleWidth = 0);
1411
+ let t = !1;
1412
+ 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);
1413
+ let c = {
1354
1414
  name: "VxeInput",
1355
- props: { disabled: Z, placeholder: Z ? "" : h.placeholder }
1415
+ props: { disabled: t, placeholder: t ? "" : h.placeholder }
1356
1416
  };
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
1417
+ return h.code && !h.itemRender && (c = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || c, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
1418
+ disabled: t
1359
1419
  }), h;
1360
1420
  }
1361
1421
  }) : a, formSearchButtons = {
@@ -1383,35 +1443,39 @@ const deviceDetection = () => {
1383
1443
  events: null
1384
1444
  }
1385
1445
  }, formatGridItems = (a, l) => {
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 = {
1446
+ 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 = {
1387
1447
  collapseTags: !0,
1388
1448
  collapseTagsTooltip: !0,
1389
1449
  multiple: !0
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(
1450
+ }, t = o.map((Z, d) => {
1451
+ var n, f, H;
1452
+ 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(
1393
1453
  i,
1394
- ((u = v.itemRender) == null ? void 0 : u.props) || {}
1395
- )), v;
1396
- }), e = clone(formSearchButtons, !0);
1397
- if (e.collapseNode = c, l && e.itemRender.options.length < 3 && (e.itemRender.options.push(l), e.itemRender.events = l.events), c) {
1398
- const v = r ? 2 : 3;
1399
- Z.splice(v, 0, e);
1454
+ ((H = Z.itemRender) == null ? void 0 : H.props) || {}
1455
+ )), Z;
1456
+ }), c = clone(formSearchButtons, !0);
1457
+ if (c.collapseNode = e, l && c.itemRender.options.length < 3 && (c.itemRender.options.push(l), c.itemRender.events = l.events), e) {
1458
+ const Z = r ? 2 : 3;
1459
+ t.splice(Z, 0, c);
1400
1460
  } else
1401
- Z.push(e);
1402
- return Z;
1461
+ t.push(c);
1462
+ return t;
1403
1463
  }, getDateRange = (a) => {
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;
1464
+ var l, o, h, r, e;
1465
+ 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;
1406
1466
  }, formatRules = (a, l) => {
1407
1467
  const o = {};
1408
1468
  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] = [
1469
+ var r;
1470
+ if ((r = h.children) != null && r.length) {
1471
+ const e = formatRules(h.children, l);
1472
+ merge(o, e);
1473
+ } else if (h.required) {
1474
+ const { field: e, title: i } = h, t = i == null ? void 0 : i.startsWith("message.");
1475
+ o[e] = [
1412
1476
  {
1413
1477
  required: !0,
1414
- message: `${l("message.required")}${c && i ? l(c) : c || l(`message.${r}`)}`
1478
+ message: `${l("message.required")}${i && t ? l(i) : i || l(`message.${e}`)}`
1415
1479
  }
1416
1480
  ];
1417
1481
  }
@@ -1494,9 +1558,9 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1494
1558
  }
1495
1559
  }, g = class g {
1496
1560
  constructor() {
1497
- k(this, "router");
1498
- k(this, "baseUrl", null);
1499
- k(this, "getNetworkError", (l) => l ? {
1561
+ S(this, "router");
1562
+ S(this, "baseUrl", null);
1563
+ S(this, "getNetworkError", (l) => l ? {
1500
1564
  400: "错误的请求",
1501
1565
  401: "服务未授权,请重新登录",
1502
1566
  403: "拒绝访问",
@@ -1530,29 +1594,29 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1530
1594
  (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) => {
1531
1595
  const r = cookies.get(kTOKENKEY);
1532
1596
  if (r) {
1533
- const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1534
- c.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1535
- refreshToken: c.refreshToken
1536
- }).then((e) => {
1537
- this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((v) => v(e.access_token)), g.requests = [];
1597
+ const e = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1598
+ e.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1599
+ refreshToken: e.refreshToken
1600
+ }).then((c) => {
1601
+ this.setToken(c), l.headers.Authorization = "Bearer " + c.access_token, g.requests.forEach((Z) => Z(c.access_token)), g.requests = [];
1538
1602
  }).finally(() => {
1539
1603
  g.isRefreshing = !1;
1540
- })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, h(l));
1604
+ })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + e.accessToken, h(l));
1541
1605
  } else {
1542
- const c = cookies.get("kCookies_token");
1543
- c && (l.headers["X-Token"] = c), h(l);
1606
+ const e = cookies.get("kCookies_token");
1607
+ e && (l.headers["X-Token"] = e), h(l);
1544
1608
  }
1545
1609
  })),
1546
1610
  (l) => Promise.reject(l)
1547
1611
  );
1548
1612
  }
1549
1613
  setToken(l) {
1550
- const { access_token: o, expires_in: h, refresh_token: r } = l, c = {
1614
+ const { access_token: o, expires_in: h, refresh_token: r } = l, e = {
1551
1615
  accessToken: o,
1552
1616
  refreshToken: r,
1553
1617
  expires: Date.now() + h * 1e3
1554
1618
  };
1555
- cookies.set(kTOKENKEY, JSON.stringify(c));
1619
+ cookies.set(kTOKENKEY, JSON.stringify(e));
1556
1620
  }
1557
1621
  // 响应拦截
1558
1622
  httpInterceptorsResponse() {
@@ -1569,7 +1633,7 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1569
1633
  );
1570
1634
  }
1571
1635
  transformConfigByMethod(l, o) {
1572
- const { method: h } = o, r = ["get"], c = h.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1636
+ const { method: h } = o, r = ["get"], e = h.toLocaleLowerCase(), i = r.includes(e) ? "params" : "data";
1573
1637
  return {
1574
1638
  ...o,
1575
1639
  [i]: l
@@ -1577,34 +1641,34 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1577
1641
  }
1578
1642
  // 通用请求工具函数
1579
1643
  request(l, o, h, r) {
1580
- const c = this.transformConfigByMethod(h, {
1644
+ const e = this.transformConfigByMethod(h, {
1581
1645
  method: l,
1582
1646
  url: o,
1583
1647
  ...r
1584
1648
  });
1585
- return new Promise((i, Z) => {
1586
- g.axiosInstance.request(c).then((e) => {
1587
- if (e && (e == null ? void 0 : e.code) === "0")
1588
- i(e.data);
1589
- else if (e.code === "500")
1590
- errorMessage(e.msg, { duration: 8e3 }), c.method === "get" ? i(e) : Z(e.msg);
1591
- else if ((e == null ? void 0 : e.code) !== "-1")
1592
- i(e);
1649
+ return new Promise((i, t) => {
1650
+ g.axiosInstance.request(e).then((c) => {
1651
+ if (c && (c == null ? void 0 : c.code) === "0")
1652
+ i(c.data);
1653
+ else if (c.code === "500")
1654
+ errorMessage(c.msg, { duration: 8e3 }), e.method === "get" ? i(c) : t(c.msg);
1655
+ else if ((c == null ? void 0 : c.code) !== "-1")
1656
+ i(c);
1593
1657
  else {
1594
- const v = (e == null ? void 0 : e.msg) || "服务异常";
1595
- errorMessage(v, { duration: 8e3 }), Z(v);
1658
+ const Z = (c == null ? void 0 : c.msg) || "服务异常";
1659
+ errorMessage(Z, { duration: 8e3 }), t(Z);
1596
1660
  }
1597
- }).catch((e) => {
1598
- var v, d, m;
1599
- if (e != null && e.code) {
1600
- if (((v = e == null ? void 0 : e.response) == null ? void 0 : v.status) === 401)
1661
+ }).catch((c) => {
1662
+ var Z, d, n;
1663
+ if (c != null && c.code) {
1664
+ if (((Z = c == null ? void 0 : c.response) == null ? void 0 : Z.status) === 401)
1601
1665
  return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
1602
1666
  errorMessage(
1603
- this.getNetworkError((m = e == null ? void 0 : e.response) == null ? void 0 : m.status) || (e == null ? void 0 : e.message),
1667
+ this.getNetworkError((n = c == null ? void 0 : c.response) == null ? void 0 : n.status) || (c == null ? void 0 : c.message),
1604
1668
  { duration: 8e3 }
1605
1669
  );
1606
1670
  }
1607
- e.config.method === "get" ? i(e) : Z(e);
1671
+ c.config.method === "get" ? i(c) : t(c);
1608
1672
  });
1609
1673
  });
1610
1674
  }
@@ -1631,10 +1695,10 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1631
1695
  }
1632
1696
  };
1633
1697
  /** token过期后,暂存待执行的请求 */
1634
- k(g, "requests", []), /** 防止重复刷新token */
1635
- k(g, "isRefreshing", !1), // 初始化配置对象
1636
- k(g, "initConfig", {}), // 保存当前Axios实例对象
1637
- k(g, "axiosInstance", Axios.create(defaultConfig));
1698
+ S(g, "requests", []), /** 防止重复刷新token */
1699
+ S(g, "isRefreshing", !1), // 初始化配置对象
1700
+ S(g, "initConfig", {}), // 保存当前Axios实例对象
1701
+ S(g, "axiosInstance", Axios.create(defaultConfig));
1638
1702
  let SuHttp = g;
1639
1703
  const http = new SuHttp(), lunarCalendar = {
1640
1704
  /**
@@ -2373,8 +2437,8 @@ const http = new SuHttp(), lunarCalendar = {
2373
2437
  return -1;
2374
2438
  const o = this.sTermInfo[a - 1900], h = [];
2375
2439
  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));
2440
+ const e = parseInt("0x" + o.substr(r, 5)).toString();
2441
+ h.push(e[0], e.substr(1, 2), e[3], e.substr(4, 2));
2378
2442
  }
2379
2443
  return parseInt(h[l - 1]);
2380
2444
  },
@@ -2432,60 +2496,60 @@ const http = new SuHttp(), lunarCalendar = {
2432
2496
  * @eg:console.log(calendar.solar2lunar(1987,11,01));
2433
2497
  */
2434
2498
  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)
2499
+ let h = parseInt(a), r = parseInt(l), e = parseInt(o);
2500
+ if (h < 1900 || h > 2100 || h === 1900 && r === 1 && e < 31)
2437
2501
  return -1;
2438
2502
  let i;
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();
2503
+ h ? i = new Date(h, parseInt(r.toString()) - 1, e) : i = /* @__PURE__ */ new Date();
2504
+ let t, c = 0, Z = 0;
2505
+ h = i.getFullYear(), r = i.getMonth() + 1, e = i.getDate();
2442
2506
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2443
- for (Z = 1900; Z < 2101 && d > 0; Z++)
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);
2449
- let u = i.getDay();
2450
- const H = this.nStr1[u];
2451
- u === 0 && (u = 7);
2452
- const p = Z;
2453
- e = this.leapMonth(Z);
2454
- let n = !1;
2455
- for (Z = 1; Z < 13 && d > 0; Z++)
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));
2461
- let M = !1, b;
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"), {
2466
- date: x,
2467
- lunarDate: D,
2468
- festival: F[R] ? F[R].title : null,
2469
- lunarFestival: N[E] ? N[E].title : null,
2470
- lYear: p,
2471
- lMonth: y,
2507
+ for (t = 1900; t < 2101 && d > 0; t++)
2508
+ Z = this.lYearDays(t), d -= Z;
2509
+ d < 0 && (d += Z, t--);
2510
+ const n = /* @__PURE__ */ new Date();
2511
+ let f = !1;
2512
+ n.getFullYear() === h && n.getMonth() + 1 === r && n.getDate() === e && (f = !0);
2513
+ let H = i.getDay();
2514
+ const m = this.nStr1[H];
2515
+ H === 0 && (H = 7);
2516
+ const s = t;
2517
+ c = this.leapMonth(t);
2518
+ let u = !1;
2519
+ for (t = 1; t < 13 && d > 0; t++)
2520
+ c > 0 && t === c + 1 && u === !1 ? (--t, u = !0, Z = this.leapDays(s)) : Z = this.monthDays(s, t), u === !0 && t === c + 1 && (u = !1), d -= Z;
2521
+ d === 0 && c > 0 && t === c + 1 && (u ? u = !1 : (u = !0, --t)), d < 0 && (d += Z, --t);
2522
+ const M = t, C = d + 1, A = r - 1, w = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), k = this.getTerm(h, r * 2);
2523
+ let R = this.toGanZhi((h - 1900) * 12 + r + 11);
2524
+ e >= V && (R = this.toGanZhi((h - 1900) * 12 + r + 12));
2525
+ let I = !1, v;
2526
+ V === e && (I = !0, v = this.solarTerm[r * 2 - 2]), k === e && (I = !0, v = this.solarTerm[r * 2 - 1]);
2527
+ const p = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, b = this.toGanZhi(p + e - 1), y = this.toAstro(r, e), L = h + "-" + r + "-" + e, x = s + "-" + M + "-" + C, D = this.festival, F = this.lFestival, N = r + "-" + e;
2528
+ let E = M + "-" + C;
2529
+ return M === 12 && C === 29 && this.monthDays(s, M) === 29 && (E = "12-30"), {
2530
+ date: L,
2531
+ lunarDate: x,
2532
+ festival: D[N] ? D[N].title : null,
2533
+ lunarFestival: F[E] ? F[E].title : null,
2534
+ lYear: s,
2535
+ lMonth: M,
2472
2536
  lDay: C,
2473
- Animal: this.getAnimal(p),
2474
- IMonthCn: (n ? "闰" : "") + this.toChinaMonth(y),
2537
+ Animal: this.getAnimal(s),
2538
+ IMonthCn: (u ? "闰" : "") + this.toChinaMonth(M),
2475
2539
  IDayCn: this.toChinaDay(C),
2476
2540
  cYear: h,
2477
2541
  cMonth: r,
2478
- cDay: c,
2542
+ cDay: e,
2479
2543
  gzYear: w,
2480
- gzMonth: t,
2481
- gzDay: L,
2482
- isToday: V,
2483
- isLeap: n,
2484
- nWeek: u,
2485
- ncWeek: "星期" + H,
2486
- isTerm: M,
2487
- Term: b,
2488
- astro: S
2544
+ gzMonth: R,
2545
+ gzDay: b,
2546
+ isToday: f,
2547
+ isLeap: u,
2548
+ nWeek: H,
2549
+ ncWeek: "星期" + m,
2550
+ isTerm: I,
2551
+ Term: v,
2552
+ astro: y
2489
2553
  };
2490
2554
  },
2491
2555
  /**
@@ -2503,19 +2567,19 @@ const http = new SuHttp(), lunarCalendar = {
2503
2567
  const r = this.leapMonth(a);
2504
2568
  if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
2505
2569
  return -1;
2506
- const c = this.monthDays(a, l);
2507
- let i = c;
2570
+ const e = this.monthDays(a, l);
2571
+ let i = e;
2508
2572
  if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
2509
2573
  return -1;
2510
- let Z = 0, e;
2511
- for (e = 1900; e < a; e++)
2512
- Z += this.lYearDays(e);
2513
- let v = 0, d = !1;
2514
- for (e = 1; e < l; e++)
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);
2574
+ let t = 0, c;
2575
+ for (c = 1900; c < a; c++)
2576
+ t += this.lYearDays(c);
2577
+ let Z = 0, d = !1;
2578
+ for (c = 1; c < l; c++)
2579
+ Z = this.leapMonth(a), d || Z <= c && Z > 0 && (t += this.leapDays(a), d = !0), t += this.monthDays(a, c);
2580
+ h && (t += e);
2581
+ const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + o - 31) * 864e5 + n), H = f.getUTCFullYear(), m = f.getUTCMonth() + 1, s = f.getUTCDate();
2582
+ return this.solar2lunar(H, m, s);
2519
2583
  }
2520
2584
  }, dict = storageLocal.getItem("kLov"), formats = {
2521
2585
  formatDate: {
@@ -2552,9 +2616,9 @@ const http = new SuHttp(), lunarCalendar = {
2552
2616
  formatDict: {
2553
2617
  // 数据字段转化
2554
2618
  tableCellFormatMethod({ cellValue: a }, l) {
2555
- var r, c;
2619
+ var r, e;
2556
2620
  if (!l) return 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;
2621
+ 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;
2558
2622
  return (h == null ? void 0 : h.dictName) || a;
2559
2623
  }
2560
2624
  },
@@ -2572,18 +2636,18 @@ const http = new SuHttp(), lunarCalendar = {
2572
2636
  },
2573
2637
  formatSelectLocal: {
2574
2638
  tableCellFormatMethod({ cellValue: a }, l) {
2575
- const [o, h = "value", r = "label"] = l, c = o == null ? void 0 : o.find((i) => i[h] === a);
2576
- return c ? c[r] : a;
2639
+ const [o, h = "value", r = "label"] = l, e = o == null ? void 0 : o.find((i) => i[h] === a);
2640
+ return e ? e[r] : a;
2577
2641
  }
2578
2642
  },
2579
2643
  formatMultiValue: {
2580
2644
  tableCellFormatMethod({ row: a }, l) {
2581
- var c;
2645
+ var e;
2582
2646
  const [o, h] = l;
2583
2647
  let r;
2584
- return (c = a[o]) == null || c.split(",").forEach((i) => {
2585
- const Z = h.find((e) => e.value === i);
2586
- r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
2648
+ return (e = a[o]) == null || e.split(",").forEach((i) => {
2649
+ const t = h.find((c) => c.value === i);
2650
+ r = r ? `${r},${t == null ? void 0 : t.label}` : t == null ? void 0 : t.label;
2587
2651
  }), r;
2588
2652
  }
2589
2653
  }
@@ -10232,7 +10296,7 @@ function isUrl(a) {
10232
10296
  }
10233
10297
  const getDictName = (a, l) => {
10234
10298
  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;
10299
+ 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;
10236
10300
  };
10237
10301
  export {
10238
10302
  W as NProgress,