@utogether/utils 3.0.0-beta.26 → 3.0.0-beta.28

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, h) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
3
- var k = (a, l, h) => U(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 S = (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
- 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,16 +12,16 @@ 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;
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) {
@@ -46,15 +46,15 @@ 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"
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,17 +131,17 @@ 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 {
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
  }
@@ -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,9 @@ 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
197
  column: r
198
198
  } = l, {
199
199
  options: c,
@@ -201,59 +201,59 @@ const VxetableRender = (VXETable, {
201
201
  optionProps: Z = {},
202
202
  events: e
203
203
  } = a, {
204
- label: v = "label",
204
+ label: t = "label",
205
205
  value: d = "value"
206
206
  } = Z, {
207
- loading: m = !1,
208
- multiple: V,
207
+ loading: f = !1,
208
+ multiple: m,
209
209
  mapField: u
210
- } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
211
- H.setDefaultValue(i, o, r.field);
212
- function n(f) {
213
- H.remote(f, r.field, a);
210
+ } = i, H = useComponent(), p = m ? `_${r.field}` : r.field;
211
+ H.setDefaultValue(i, h, r.field);
212
+ function n(V) {
213
+ H.remote(V, r.field, a);
214
214
  }
215
- function y(f) {
216
- H.selectChange(f, o, r.field, a, {
215
+ function y(V) {
216
+ H.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
+ e != null && e.input && e.input(l, V);
223
223
  }
224
224
  function A() {
225
- H.clear(o, r.field, u, e, "row");
225
+ H.clear(h, r.field, u, e, "row");
226
226
  }
227
227
  function w() {
228
228
  !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
229
229
  }
230
230
  return [createVNode(resolveComponent("el-select"), mergeProps({
231
- modelValue: o[p],
232
- "onUpdate:modelValue": (f) => o[p] = f,
231
+ modelValue: h[p],
232
+ "onUpdate:modelValue": (V) => h[p] = V,
233
233
  filterable: !0,
234
234
  remote: !0,
235
235
  clearable: !0,
236
236
  placeholder: "请录入关键字搜索",
237
237
  style: "width: 100%",
238
238
  "remote-method": n,
239
- loading: m
239
+ loading: f
240
240
  }, i, {
241
241
  onFocus: () => w(),
242
- onChange: (f) => y(f),
242
+ onChange: (V) => y(V),
243
243
  onClear: () => A(),
244
- onInput: (f) => C(f)
245
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
246
- key: f[d],
247
- label: f[v],
248
- value: f[d]
249
- }, null))) ? h : {
250
- default: () => [h]
244
+ onInput: (V) => C(V)
245
+ }), _isSlot(o = c.map((V) => createVNode(resolveComponent("el-option"), {
246
+ key: V[d],
247
+ label: V[t],
248
+ value: V[d]
249
+ }, null))) ? o : {
250
+ default: () => [o]
251
251
  })];
252
252
  },
253
253
  renderTableDefault(a, l) {
254
- let h;
254
+ let o;
255
255
  const {
256
- row: o,
256
+ row: h,
257
257
  column: r
258
258
  } = l, {
259
259
  options: c,
@@ -261,53 +261,53 @@ const VxetableRender = (VXETable, {
261
261
  optionProps: Z = {},
262
262
  events: e
263
263
  } = a, {
264
- label: v = "label",
264
+ label: t = "label",
265
265
  value: d = "value"
266
266
  } = Z, {
267
- loading: m = !1,
268
- multiple: V,
267
+ loading: f = !1,
268
+ multiple: m,
269
269
  mapField: u
270
- } = i, H = useComponent(), p = V ? `_${r.field}` : r.field;
271
- H.setDefaultValue(i, o, r.field);
272
- function n(f) {
273
- H.remote(f, r.field, a);
270
+ } = i, H = useComponent(), p = m ? `_${r.field}` : r.field;
271
+ H.setDefaultValue(i, h, r.field);
272
+ function n(V) {
273
+ H.remote(V, r.field, a);
274
274
  }
275
- function y(f) {
276
- H.selectChange(f, o, r.field, a, {
275
+ function y(V) {
276
+ H.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
+ e != null && e.input && e.input(l, V);
283
283
  }
284
284
  function A() {
285
- H.clear(o, r.field, u, e, "row");
285
+ H.clear(h, r.field, u, e, "row");
286
286
  }
287
287
  function w() {
288
288
  !c.length && n(""), e != null && e.focus && e.focus(l, r.field);
289
289
  }
290
290
  return [createVNode(resolveComponent("el-select"), mergeProps({
291
- modelValue: o[p],
292
- "onUpdate:modelValue": (f) => o[p] = f,
291
+ modelValue: h[p],
292
+ "onUpdate:modelValue": (V) => h[p] = V,
293
293
  filterable: !0,
294
294
  remote: !0,
295
295
  clearable: !0,
296
296
  placeholder: "请录入关键字搜索",
297
297
  style: "width: 100%",
298
298
  "remote-method": n,
299
- loading: m
299
+ loading: f
300
300
  }, i, {
301
301
  onFocus: () => w(),
302
- onChange: (f) => y(f),
302
+ onChange: (V) => y(V),
303
303
  onClear: () => A(),
304
- onInput: (f) => C(f)
305
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
306
- key: f[d],
307
- label: f[v],
308
- value: f[d]
309
- }, null))) ? h : {
310
- default: () => [h]
304
+ onInput: (V) => C(V)
305
+ }), _isSlot(o = c.map((V) => createVNode(resolveComponent("el-option"), {
306
+ key: V[d],
307
+ label: V[t],
308
+ value: V[d]
309
+ }, null))) ? o : {
310
+ default: () => [o]
311
311
  })];
312
312
  },
313
313
  // 可编辑显示模板
@@ -325,9 +325,9 @@ const VxetableRender = (VXETable, {
325
325
  return textValue && (val = eval(`row.${textValue}`) || row[column.field]), val && multiple && isArray(val) && (val = val && val.join(",")), [createVNode("span", null, [val])];
326
326
  },
327
327
  renderItemContent(a, l) {
328
- let h;
328
+ let o;
329
329
  const {
330
- data: o,
330
+ data: h,
331
331
  field: r
332
332
  } = l, {
333
333
  options: c,
@@ -335,34 +335,34 @@ const VxetableRender = (VXETable, {
335
335
  optionProps: Z = {},
336
336
  events: e
337
337
  } = a, {
338
- label: v = "label",
338
+ label: t = "label",
339
339
  value: d = "value"
340
340
  } = Z, {
341
- mapField: m,
342
- multiple: V,
341
+ mapField: f,
342
+ multiple: m,
343
343
  loading: u = !1
344
- } = i, H = useComponent(), p = V ? `_${r}` : r;
345
- H.setDefaultValue(i, o, r);
346
- async function n(f) {
347
- H.remote(f, r, a);
344
+ } = i, H = useComponent(), p = m ? `_${r}` : r;
345
+ H.setDefaultValue(i, h, r);
346
+ async function n(V) {
347
+ H.remote(V, r, a);
348
348
  }
349
- function y(f) {
350
- H.selectChange(f, o, r, a, {
349
+ function y(V) {
350
+ H.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
+ e != null && e.input && e.input(l, V);
356
356
  }
357
357
  function A() {
358
- H.clear(o, r, m, e, "data");
358
+ H.clear(h, r, f, e, "data");
359
359
  }
360
360
  function w() {
361
361
  !c.length && n(""), e != null && e.focus && e.focus(l);
362
362
  }
363
363
  return [createVNode(resolveComponent("el-select"), mergeProps({
364
- modelValue: o[p],
365
- "onUpdate:modelValue": (f) => o[p] = f,
364
+ modelValue: h[p],
365
+ "onUpdate:modelValue": (V) => h[p] = V,
366
366
  filterable: !0,
367
367
  remote: !0,
368
368
  clearable: !0,
@@ -372,26 +372,26 @@ const VxetableRender = (VXETable, {
372
372
  "remote-method": n
373
373
  }, i, {
374
374
  onFocus: () => w(),
375
- onChange: (f) => y(f),
375
+ onChange: (V) => y(V),
376
376
  onClear: () => A(),
377
377
  onInput: () => C()
378
- }), _isSlot(h = c.map((f) => createVNode(resolveComponent("el-option"), {
379
- key: f[d],
380
- label: f[v],
381
- value: f[d]
382
- }, null))) ? h : {
383
- default: () => [h]
378
+ }), _isSlot(o = c.map((V) => createVNode(resolveComponent("el-option"), {
379
+ key: V[d],
380
+ label: V[t],
381
+ value: V[d]
382
+ }, null))) ? o : {
383
+ default: () => [o]
384
384
  })];
385
385
  }
386
386
  }), VXETable.renderer.add("#SuDateRange", {
387
387
  renderItemContent(a, l) {
388
388
  const {
389
- data: h,
390
- field: o
389
+ data: o,
390
+ field: h
391
391
  } = l, {
392
392
  props: r
393
393
  } = a;
394
- 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);
395
395
  const c = /* @__PURE__ */ new Date(), i = [{
396
396
  text: i18n("message.udp.today", !0),
397
397
  value: () => [Z(1, "day"), c]
@@ -413,10 +413,10 @@ const VxetableRender = (VXETable, {
413
413
  }, {
414
414
  text: i18n("message.udp.anniversary", !0),
415
415
  value: () => [Z(1, "year"), c]
416
- }], Z = (e, v) => dayjs().subtract(e, v).add("1", "day").format();
416
+ }], Z = (e, t) => dayjs().subtract(e, t).add("1", "day").format();
417
417
  return [createVNode(resolveComponent("el-date-picker"), mergeProps({
418
- modelValue: h[o],
419
- "onUpdate:modelValue": (e) => h[o] = e,
418
+ modelValue: o[h],
419
+ "onUpdate:modelValue": (e) => o[h] = e,
420
420
  type: (r == null ? void 0 : r.type) || "daterange",
421
421
  shortcuts: i,
422
422
  style: "width: 100%",
@@ -427,9 +427,9 @@ const VxetableRender = (VXETable, {
427
427
  }
428
428
  }), VXETable.renderer.add("#select", {
429
429
  renderTableEdit(a, l) {
430
- let h;
430
+ let o;
431
431
  const {
432
- row: o,
432
+ row: h,
433
433
  column: r
434
434
  } = l, {
435
435
  options: c,
@@ -437,48 +437,48 @@ const VxetableRender = (VXETable, {
437
437
  optionProps: Z = {},
438
438
  events: e
439
439
  } = a, {
440
- label: v = "label",
440
+ label: t = "label",
441
441
  value: d = "value",
442
- extLabel: m
442
+ extLabel: f
443
443
  } = Z, {
444
- mapField: V
444
+ mapField: m
445
445
  } = i, u = useComponent();
446
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
447
- !c.some((C) => C[v] === n) && c.push({
446
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
447
+ !c.some((C) => C[t] === n) && c.push({
448
448
  [d]: n,
449
- [v]: n
449
+ [t]: n
450
450
  });
451
451
  });
452
452
  function H(n) {
453
- u.selectChange(n, o, r.field, a, {
453
+ u.selectChange(n, h, r.field, a, {
454
454
  column: r,
455
455
  datasource: "row"
456
456
  });
457
457
  }
458
458
  function p() {
459
- u.clear(o, r.field, V, e, "row");
459
+ u.clear(h, r.field, m, e, "row");
460
460
  }
461
461
  return [createVNode(resolveComponent("el-select"), mergeProps({
462
- modelValue: o[r.field],
463
- "onUpdate:modelValue": (n) => o[r.field] = n,
462
+ modelValue: h[r.field],
463
+ "onUpdate:modelValue": (n) => h[r.field] = n,
464
464
  filterable: !0,
465
465
  clearable: !0
466
466
  }, i, {
467
467
  style: "width: 100%",
468
468
  onChange: (n) => H(n),
469
469
  onClear: () => p()
470
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
470
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
471
471
  key: n[d],
472
- label: m && n[m] ? n[d] : n[v],
472
+ label: f && n[f] ? n[d] : n[t],
473
473
  value: n[d]
474
- }, null))) ? h : {
475
- default: () => [h]
474
+ }, null))) ? o : {
475
+ default: () => [o]
476
476
  })];
477
477
  },
478
478
  renderTableDefault(a, l) {
479
- let h;
479
+ let o;
480
480
  const {
481
- row: o,
481
+ row: h,
482
482
  column: r
483
483
  } = l, {
484
484
  options: c,
@@ -486,42 +486,42 @@ const VxetableRender = (VXETable, {
486
486
  optionProps: Z = {},
487
487
  events: e
488
488
  } = a, {
489
- label: v = "label",
489
+ label: t = "label",
490
490
  value: d = "value",
491
- extLabel: m
491
+ extLabel: f
492
492
  } = Z, {
493
- mapField: V
493
+ mapField: m
494
494
  } = i, u = useComponent();
495
- i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
496
- !c.some((C) => C[v] === n) && c.push({
495
+ i.multiple && h[r.field] && !isArray(h[r.field]) && h[r.field].split(",").forEach((n) => {
496
+ !c.some((C) => C[t] === n) && c.push({
497
497
  [d]: n,
498
- [v]: n
498
+ [t]: n
499
499
  });
500
500
  });
501
501
  function H(n) {
502
- u.selectChange(n, o, r.field, a, {
502
+ u.selectChange(n, h, r.field, a, {
503
503
  column: r,
504
504
  datasource: "row"
505
505
  });
506
506
  }
507
507
  function p() {
508
- u.clear(o, r.field, V, e, "row");
508
+ u.clear(h, r.field, m, e, "row");
509
509
  }
510
510
  return [createVNode(resolveComponent("el-select"), mergeProps({
511
- modelValue: o[r.field],
512
- "onUpdate:modelValue": (n) => o[r.field] = n,
511
+ modelValue: h[r.field],
512
+ "onUpdate:modelValue": (n) => h[r.field] = n,
513
513
  filterable: !0,
514
514
  clearable: !0
515
515
  }, i, {
516
516
  style: "width: 100%",
517
517
  onChange: (n) => H(n),
518
518
  onClear: () => p()
519
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
519
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
520
520
  key: n[d],
521
- label: m && n[m] ? n[d] : n[v],
521
+ label: f && n[f] ? n[d] : n[t],
522
522
  value: n[d]
523
- }, null))) ? h : {
524
- default: () => [h]
523
+ }, null))) ? o : {
524
+ default: () => [o]
525
525
  })];
526
526
  },
527
527
  // 可编辑显示模板
@@ -545,9 +545,9 @@ const VxetableRender = (VXETable, {
545
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])];
546
546
  },
547
547
  renderItemContent(a, l) {
548
- let h;
548
+ let o;
549
549
  const {
550
- data: o,
550
+ data: h,
551
551
  field: r
552
552
  } = l, {
553
553
  options: c,
@@ -555,43 +555,43 @@ const VxetableRender = (VXETable, {
555
555
  optionProps: Z = {},
556
556
  events: e
557
557
  } = a, {
558
- label: v = "label",
558
+ label: t = "label",
559
559
  value: d = "value"
560
- } = Z, m = useComponent(), {
561
- defaultValues: V,
560
+ } = Z, f = useComponent(), {
561
+ defaultValues: m,
562
562
  mapField: u
563
563
  } = i;
564
- V && (o[r] = V);
564
+ m && (h[r] = m);
565
565
  function H(n) {
566
- m.selectChange(n, o, r, a, {
566
+ f.selectChange(n, h, r, a, {
567
567
  datasource: "data"
568
568
  });
569
569
  }
570
570
  function p() {
571
- m.clear(o, r, u, e, "data");
571
+ f.clear(h, r, u, e, "data");
572
572
  }
573
573
  return [createVNode(resolveComponent("el-select"), mergeProps({
574
- modelValue: o[r],
575
- "onUpdate:modelValue": (n) => o[r] = n,
574
+ modelValue: h[r],
575
+ "onUpdate:modelValue": (n) => h[r] = n,
576
576
  filterable: !0,
577
577
  clearable: !0,
578
578
  style: "width: 100%"
579
579
  }, i, {
580
580
  onChange: (n) => H(n),
581
581
  onClear: () => p()
582
- }), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
582
+ }), _isSlot(o = c.map((n) => createVNode(resolveComponent("el-option"), {
583
583
  key: n[d],
584
- label: n[v],
584
+ label: n[t],
585
585
  value: n[d]
586
- }, null))) ? h : {
587
- default: () => [h]
586
+ }, null))) ? o : {
587
+ default: () => [o]
588
588
  })];
589
589
  }
590
590
  }), VXETable.renderer.add("#lov", {
591
591
  renderItemContent(a, l) {
592
592
  const {
593
- data: h,
594
- field: o
593
+ data: o,
594
+ field: h
595
595
  } = l, {
596
596
  props: r,
597
597
  events: c
@@ -599,8 +599,8 @@ const VxetableRender = (VXETable, {
599
599
  defaultValues: Z,
600
600
  mapField: e
601
601
  } = r;
602
- Z && (h[o] = Z);
603
- function v(m, V) {
602
+ Z && (o[h] = Z);
603
+ function t(f, m) {
604
604
  const {
605
605
  mapField: u,
606
606
  field: H,
@@ -610,137 +610,146 @@ const VxetableRender = (VXETable, {
610
610
  if (n) {
611
611
  if (n) {
612
612
  const C = {};
613
- h[p || H] = m.reduce((A, w) => {
614
- for (const f in u)
615
- C[f] = A ? C[f] + "," + w[u[f]] : w[u[f]];
613
+ o[p || H] = f.reduce((A, w) => {
614
+ for (const V in u)
615
+ C[V] = A ? C[V] + "," + w[u[V]] : w[u[V]];
616
616
  return A = A ? A + "," + w[p || H] : w[p || H], A;
617
- }, ""), Object.assign(h, C);
617
+ }, ""), Object.assign(o, C);
618
618
  }
619
619
  } else {
620
620
  const C = {
621
- [p || H]: m[V || p || H]
621
+ [p || H]: f[m || p || H]
622
622
  };
623
623
  for (const A in u)
624
- C[A] = m[u[A]];
625
- Object.assign(h, C);
624
+ C[A] = f[u[A]];
625
+ Object.assign(o, C);
626
626
  }
627
627
  const y = {
628
- row: h,
629
- property: H,
630
- item: m,
628
+ data: o,
629
+ options: f,
631
630
  field: H
632
631
  };
633
632
  c != null && c.change && c.change(y);
634
633
  }
635
634
  function d() {
636
- i.clear(h, o, e, c, "data");
635
+ i.clear(o, h, e, c, "data");
637
636
  }
638
637
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
639
- record: h
638
+ record: o
640
639
  }, r, {
641
640
  mode: "vxe",
642
- onChange: (m, V) => v(m, V),
641
+ onChange: (f, m) => t(f, m),
643
642
  onClear: () => d()
644
643
  }), null)];
645
644
  },
646
645
  // 单元格编辑
647
646
  renderTableEdit(a, l) {
648
647
  const {
649
- row: h,
650
- column: o
648
+ row: o,
649
+ column: h
651
650
  } = l, {
652
651
  props: r,
653
652
  events: c
654
653
  } = a, i = useComponent();
655
- function Z(v, d) {
654
+ function Z(t, d) {
656
655
  const {
657
- mapField: m,
658
- field: V,
656
+ mapField: f,
657
+ field: m,
659
658
  displayName: u,
660
659
  multiple: H
661
660
  } = r;
662
661
  if (!H) {
663
- const p = {
664
- [u || V]: v[d || u || V]
662
+ const n = {
663
+ [u || m]: t[d || u || m]
665
664
  };
666
- for (const n in m)
667
- p[n] = v[m[n]];
668
- Object.assign(h, p);
665
+ for (const y in f)
666
+ n[y] = t[f[y]];
667
+ Object.assign(o, n);
669
668
  }
670
- c != null && c.change && c.change(l, v, h[o.field]);
669
+ const p = {
670
+ row: o,
671
+ options: t,
672
+ field: h.field
673
+ };
674
+ c != null && c.change && c.change(p);
671
675
  }
672
676
  function e() {
673
- i.clear(h, field, mapField, c, "row");
677
+ i.clear(o, h.field, mapField, c, "row");
674
678
  }
675
679
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
676
- record: h,
680
+ record: o,
677
681
  mode: "vxe",
678
682
  transfer: !0
679
683
  }, r, {
680
- onChange: (v, d) => Z(v, d),
684
+ onChange: (t, d) => Z(t, d),
681
685
  onClear: () => e()
682
686
  }), null)];
683
687
  },
684
688
  // 单元格默认
685
689
  renderTableDefault(a, l) {
686
690
  const {
687
- row: h,
688
- column: o
691
+ row: o,
692
+ column: h
689
693
  } = l, {
690
694
  props: r,
691
695
  events: c
692
696
  } = a, i = useComponent();
693
- function Z(v, d) {
697
+ function Z(t, d) {
694
698
  const {
695
- mapField: m,
696
- field: V,
699
+ mapField: f,
700
+ field: m,
697
701
  displayName: u,
698
702
  multiple: H
699
703
  } = r;
700
704
  if (!H) {
701
- const p = {
702
- [u || V]: v[d || u || V]
705
+ const n = {
706
+ [u || m]: t[d || u || m]
703
707
  };
704
- for (const n in m)
705
- p[n] = v[m[n]];
706
- Object.assign(h, p);
708
+ for (const y in f)
709
+ n[y] = t[f[y]];
710
+ Object.assign(o, n);
707
711
  }
708
- c != null && c.change && c.change(l, v, h[o.field]);
712
+ const p = {
713
+ row: o,
714
+ options: t,
715
+ field: h.field
716
+ };
717
+ c != null && c.change && c.change(p);
709
718
  }
710
719
  function e() {
711
- i.clear(h, field, mapField, c, "row");
720
+ i.clear(o, h.field, mapField, c, "row");
712
721
  }
713
722
  return [createVNode(resolveComponent("ut-lov"), mergeProps({
714
- record: h,
723
+ record: o,
715
724
  mode: "ele"
716
725
  }, r, {
717
- onChange: (v, d) => Z(v, d),
726
+ onChange: (t, d) => Z(t, d),
718
727
  onClear: () => e()
719
728
  }), null)];
720
729
  },
721
730
  // 可编辑显示模板
722
731
  renderTableCell(a, l) {
723
732
  const {
724
- row: h,
725
- column: o
733
+ row: o,
734
+ column: h
726
735
  } = l;
727
- return [createVNode("span", null, [h[o.field]])];
736
+ return [createVNode("span", null, [o[h.field]])];
728
737
  }
729
738
  }), VXETable.renderer.add("#upload", {
730
739
  renderItemContent(a, l) {
731
740
  const {
732
- data: h,
733
- field: o
741
+ data: o,
742
+ field: h
734
743
  } = l, {
735
744
  props: r,
736
745
  events: c
737
746
  } = a;
738
747
  function i() {
739
- h[o] = "", componentHook.clear(h, o, r.mapField, c, "data");
748
+ o[h] = "", componentHook.clear(o, h, r.mapField, c, "data");
740
749
  }
741
750
  return [createVNode(resolveComponent("form-upload"), mergeProps({
742
- record: h,
743
- field: o
751
+ record: o,
752
+ field: h
744
753
  }, r, {
745
754
  onClear: () => i()
746
755
  }), null)];
@@ -748,9 +757,9 @@ const VxetableRender = (VXETable, {
748
757
  }), VXETable.renderer.add("#tag", {
749
758
  // 默认显示模板
750
759
  renderTableDefault(a, l) {
751
- let h;
760
+ let o;
752
761
  const {
753
- row: o,
762
+ row: h,
754
763
  column: r
755
764
  } = l, {
756
765
  props: {
@@ -759,20 +768,20 @@ const VxetableRender = (VXETable, {
759
768
  }
760
769
  } = a;
761
770
  function Z() {
762
- return o[r.field] ? i[o[r.field]] : null;
771
+ return h[r.field] ? i[h[r.field]] : null;
763
772
  }
764
- return [o[r.field] ? createVNode(resolveComponent("el-tag"), {
773
+ return [h[r.field] ? createVNode(resolveComponent("el-tag"), {
765
774
  effect: "dark",
766
775
  type: Z()
767
- }, _isSlot(h = getValue(c, o[r.field])) ? h : {
768
- default: () => [h]
776
+ }, _isSlot(o = getValue(c, h[r.field])) ? o : {
777
+ default: () => [o]
769
778
  }) : null];
770
779
  }
771
780
  }), VXETable.renderer.add("#switch", {
772
781
  renderTableDefault(a, l) {
773
782
  const {
774
- row: h,
775
- column: o
783
+ row: o,
784
+ column: h
776
785
  } = l, {
777
786
  props: {
778
787
  code: r,
@@ -781,114 +790,114 @@ const VxetableRender = (VXETable, {
781
790
  },
782
791
  events: Z
783
792
  } = a;
784
- function e(v) {
793
+ function e(t) {
785
794
  const d = {
786
- row: h,
787
- column: o,
788
- value: v
795
+ row: o,
796
+ column: h,
797
+ value: t
789
798
  };
790
799
  Z != null && Z.change && Z.change(d);
791
800
  }
792
- return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
793
- modelValue: h[o.field],
794
- "onUpdate:modelValue": (v) => h[o.field] = v,
801
+ return [o[h.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
802
+ modelValue: o[h.field],
803
+ "onUpdate:modelValue": (t) => o[h.field] = t,
795
804
  "inline-prompt": !0,
796
805
  size: "large",
797
806
  style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
798
807
  }, a.props, {
799
808
  "active-text": getValue(r, c),
800
809
  "inactive-text": getValue(r, i),
801
- onChange: (v) => e(v)
810
+ onChange: (t) => e(t)
802
811
  }), null) : null];
803
812
  }
804
813
  }), VXETable.renderer.add("#iconSelect", {
805
814
  renderTableEdit(a, l) {
806
815
  const {
807
- row: h,
808
- column: o
816
+ row: o,
817
+ column: h
809
818
  } = l;
810
819
  return [createVNode(resolveComponent("SuIconSelect"), {
811
- modelValue: h[o.field],
812
- "onUpdate:modelValue": (r) => h[o.field] = r,
820
+ modelValue: o[h.field],
821
+ "onUpdate:modelValue": (r) => o[h.field] = r,
813
822
  teleported: !1
814
823
  }, null)];
815
824
  },
816
825
  renderTableCell(a, l) {
817
826
  const {
818
- row: h,
819
- column: o
827
+ row: o,
828
+ column: h
820
829
  } = l;
821
830
  return [createVNode(resolveComponent("IconifyIconOffline"), {
822
- icon: h[o.field],
831
+ icon: o[h.field],
823
832
  style: "font-size: 16px;"
824
833
  }, null)];
825
834
  },
826
835
  renderItemContent(a, l) {
827
836
  const {
828
- data: h,
829
- field: o
837
+ data: o,
838
+ field: h
830
839
  } = l;
831
840
  return [createVNode(resolveComponent("SuIconSelect"), {
832
- modelValue: h[o],
833
- "onUpdate:modelValue": (r) => h[o] = r,
841
+ modelValue: o[h],
842
+ "onUpdate:modelValue": (r) => o[h] = r,
834
843
  teleported: !0
835
844
  }, null)];
836
845
  }
837
846
  }), VXETable.renderer.add("#treeSelect", {
838
847
  renderTableEdit(a, l) {
839
848
  const {
840
- row: h,
841
- column: o
849
+ row: o,
850
+ column: h
842
851
  } = l, {
843
852
  props: r,
844
853
  sourceData: c,
845
854
  events: i
846
855
  } = a;
847
856
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
848
- modelValue: h[o.field],
849
- "onUpdate:modelValue": (Z) => h[o.field] = Z,
857
+ modelValue: o[h.field],
858
+ "onUpdate:modelValue": (Z) => o[h.field] = Z,
850
859
  data: c,
851
860
  "check-strictly": !0
852
861
  }, r, {
853
862
  filterable: !0,
854
- onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
855
- onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
863
+ onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
864
+ onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
856
865
  onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
857
866
  }), null)];
858
867
  },
859
868
  renderTableCell(a, l) {
860
869
  const {
861
- row: h,
862
- column: o
870
+ row: o,
871
+ column: h
863
872
  } = l, {
864
873
  sourceData: r,
865
874
  props: c = {}
866
875
  } = a, {
867
876
  children: i = "children",
868
877
  label: Z = "label"
869
- } = c, e = findTree(r, (v) => v.value === h[o.field], {
878
+ } = c, e = findTree(r, (t) => t.value === o[h.field], {
870
879
  children: i
871
880
  });
872
881
  return e ? [createVNode("span", null, [e.item[Z]])] : null;
873
882
  },
874
883
  renderItemContent(a, l) {
875
884
  const {
876
- data: h,
877
- field: o
885
+ data: o,
886
+ field: h
878
887
  } = l, {
879
888
  props: r,
880
889
  sourceData: c,
881
890
  events: i
882
891
  } = a;
883
892
  return [createVNode(resolveComponent("el-tree-select"), mergeProps({
884
- modelValue: h[o],
885
- "onUpdate:modelValue": (Z) => h[o] = Z,
893
+ modelValue: o[h],
894
+ "onUpdate:modelValue": (Z) => o[h] = Z,
886
895
  data: c,
887
896
  "check-strictly": !0
888
897
  }, r, {
889
898
  filterable: !0,
890
- onCheckChange: (Z, e, v) => onCheckChange(Z, e, v, i),
891
- onNodeClick: (Z, e, v) => onNodeClick(Z, e, v, i),
899
+ onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
900
+ onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
892
901
  onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
893
902
  }), null)];
894
903
  }
@@ -896,8 +905,8 @@ const VxetableRender = (VXETable, {
896
905
  const useComponent = () => ({
897
906
  clear: (r, c, i, Z, e) => {
898
907
  if (r[c] = null, !isEmpty(i))
899
- for (const v in i)
900
- r[v] = null;
908
+ for (const t in i)
909
+ r[t] = null;
901
910
  Z != null && Z.clear && Z.clear({
902
911
  [e]: r,
903
912
  field: c
@@ -907,53 +916,53 @@ const VxetableRender = (VXETable, {
907
916
  const {
908
917
  options: Z,
909
918
  props: e,
910
- events: v
919
+ events: t
911
920
  } = i, {
912
921
  fetchField: d,
913
- url: m,
914
- defaultParams: V = {},
922
+ url: f,
923
+ defaultParams: m = {},
915
924
  method: u = "get"
916
925
  } = e, H = getCookieParam(), p = Object.assign({
917
926
  pageSize: 20,
918
927
  pageNum: 1,
919
928
  ...H,
920
- ...V
929
+ ...m
921
930
  }, {
922
931
  [d || c]: r
923
932
  });
924
933
  if (e.loading) return;
925
934
  let n;
926
935
  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));
936
+ 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));
928
937
  } finally {
929
938
  e.loading = !1;
930
939
  }
931
940
  },
932
941
  selectChange: (r, c, i, Z, e) => {
933
- let v = null;
942
+ let t = null;
934
943
  const {
935
944
  datasource: d
936
945
  } = e, {
937
- options: m,
938
- props: V,
946
+ options: f,
947
+ props: m,
939
948
  optionProps: u = {},
940
949
  events: H
941
950
  } = Z, p = {
942
951
  [d]: c,
943
952
  field: i
944
953
  };
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() : "";
954
+ c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","), t = [], r.forEach((n) => {
955
+ const y = f.find((C) => n === C[u == null ? void 0 : u.value]);
956
+ y && !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((C) => {
957
+ const A = y[m.mapField[C]], w = c[C] ? c[C].toString() : "";
949
958
  c[C] = w && !w.includes(A) ? `${w},${A}` : A;
950
- }), y && v.push(y);
959
+ }), y && t.push(y);
951
960
  }), 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;
961
+ options: t
962
+ })) : (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) => {
963
+ c[n] = t ? t[m.mapField[n]] : null;
955
964
  }), Object.assign(p, {
956
- option: v
965
+ option: t
957
966
  })), d === "row" && Object.assign(p, {
958
967
  column: e.column
959
968
  }), H != null && H.change && H.change(p);
@@ -963,51 +972,51 @@ const VxetableRender = (VXETable, {
963
972
  const {
964
973
  multiple: Z,
965
974
  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]);
975
+ } = r, t = Z ? `_${i}` : i;
976
+ !c[i] && e && (c[i] = e, isPlainObject(e) && Object.keys(e).forEach((m) => {
977
+ c[m] = c[m] || e[m];
978
+ })), !c[t] && c[i] && (c[t] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
970
979
  }
971
- }), onCheckChange = (a, l, h, o) => {
972
- console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
973
- }, onNodeClick = (a, l, h, o) => {
974
- o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
975
- }, onCurrentChange = (a, l, h) => {
976
- h != null && h.checkChange && (h == null || h.checkChange(a, l));
980
+ }), onCheckChange = (a, l, o, h) => {
981
+ console.log(a, l, o), h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
982
+ }, onNodeClick = (a, l, o, h) => {
983
+ h != null && h.checkChange && (h == null || h.checkChange(a, l, o));
984
+ }, onCurrentChange = (a, l, o) => {
985
+ o != null && o.checkChange && (o == null || o.checkChange(a, l));
977
986
  };
978
987
  function getValue(a, l) {
979
- var h, o, r;
980
- 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;
988
+ var o, h, r;
989
+ 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;
981
990
  }
982
991
  return VXETable;
983
992
  }, getCookieParam = () => {
984
993
  const a = "kCookies_param";
985
994
  return cookies.get(a) ? JSON.parse(cookies.get(a)) : {};
986
995
  }, hasClass = (a, l) => {
987
- var h;
988
- return !!((h = a.className) != null && h.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
989
- }, addClass = (a, l, h) => {
990
- hasClass(a, l) || (a.className += " " + l), h && (hasClass(a, h) || (a.className += " " + h));
991
- }, removeClass = (a, l, h) => {
992
- var o, r;
996
+ var o;
997
+ return !!((o = a.className) != null && o.match(new RegExp("(\\s|^)" + l + "(\\s|$)")));
998
+ }, addClass = (a, l, o) => {
999
+ hasClass(a, l) || (a.className += " " + l), o && (hasClass(a, o) || (a.className += " " + o));
1000
+ }, removeClass = (a, l, o) => {
1001
+ var h, r;
993
1002
  if (hasClass(a, l)) {
994
1003
  const c = new RegExp("(\\s|^)" + l + "(\\s|$)");
995
- a.className = (o = a.className) == null ? void 0 : o.replace(c, " ").trim();
1004
+ a.className = (h = a.className) == null ? void 0 : h.replace(c, " ").trim();
996
1005
  }
997
- if (h && hasClass(a, h)) {
998
- const c = new RegExp("(\\s|^)" + h + "(\\s|$)");
1006
+ if (o && hasClass(a, o)) {
1007
+ const c = new RegExp("(\\s|^)" + o + "(\\s|$)");
999
1008
  a.className = (r = a.className) == null ? void 0 : r.replace(c, " ").trim();
1000
1009
  }
1001
- }, toggleClass = (a, l, h) => {
1002
- const o = h || document.body;
1003
- let { className: r } = o;
1004
- r = r == null ? void 0 : r.replace(l, ""), o.className = r && a ? `${r} ${l} ` : r;
1010
+ }, toggleClass = (a, l, o) => {
1011
+ const h = o || document.body;
1012
+ let { className: r } = h;
1013
+ r = r == null ? void 0 : r.replace(l, ""), h.className = r && a ? `${r} ${l} ` : r;
1005
1014
  };
1006
1015
  function useRafThrottle(a) {
1007
1016
  let l = !1;
1008
- return function(...h) {
1017
+ return function(...o) {
1009
1018
  l || (l = !0, window.requestAnimationFrame(() => {
1010
- a.apply(this, h), l = !1;
1019
+ a.apply(this, o), l = !1;
1011
1020
  }));
1012
1021
  };
1013
1022
  }
@@ -1016,9 +1025,9 @@ const openLink = (a) => {
1016
1025
  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();
1017
1026
  }, isServer = typeof window > "u", resizeHandler = (a) => {
1018
1027
  for (const l of a) {
1019
- const h = l.target.__resizeListeners__ || [];
1020
- h.length && h.forEach((o) => {
1021
- o();
1028
+ const o = l.target.__resizeListeners__ || [];
1029
+ o.length && o.forEach((h) => {
1030
+ h();
1022
1031
  });
1023
1032
  }
1024
1033
  }, addResizeListener = (a, l) => {
@@ -1031,41 +1040,41 @@ const openLink = (a) => {
1031
1040
  }, domSymbol = Symbol("watermark-dom");
1032
1041
  function useWatermark(a = ref(document.body)) {
1033
1042
  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 });
1038
- }), h = domSymbol.toString(), o = shallowRef(), r = () => {
1039
- const v = unref(o);
1040
- o.value = void 0;
1043
+ const t = unref(a);
1044
+ if (!t) return;
1045
+ const { clientHeight: d, clientWidth: f } = t;
1046
+ i({ height: d, width: f });
1047
+ }), o = domSymbol.toString(), h = shallowRef(), r = () => {
1048
+ const t = unref(h);
1049
+ h.value = void 0;
1041
1050
  const d = unref(a);
1042
- d && (v && d.removeChild(v), removeResizeListener(d, l));
1051
+ d && (t && d.removeChild(t), removeResizeListener(d, l));
1043
1052
  };
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");
1053
+ function c(t, d) {
1054
+ const f = document.createElement("canvas"), m = 260, u = 180;
1055
+ Object.assign(f, { width: m, height: u });
1056
+ const H = f.getContext("2d");
1057
+ 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(t, m / 20, u)), f.toDataURL("image/png");
1049
1058
  }
1050
- function i(v = {}) {
1051
- const d = unref(o);
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
1059
+ function i(t = {}) {
1060
+ const d = unref(h);
1061
+ 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(
1062
+ t.str,
1063
+ t.attr
1055
1064
  )}) left top repeat`));
1056
1065
  }
1057
- const Z = (v, d) => {
1058
- if (unref(o))
1059
- return i({ str: v, attr: d }), h;
1060
- const m = document.createElement("div");
1061
- o.value = m, m.id = h, 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 h;
1064
- const { clientHeight: u, clientWidth: H } = V;
1065
- return i({ str: v, width: H, height: u, attr: d }), V.appendChild(m), h;
1066
+ const Z = (t, d) => {
1067
+ if (unref(h))
1068
+ return i({ str: t, attr: d }), o;
1069
+ const f = document.createElement("div");
1070
+ h.value = f, f.id = o, f.style.pointerEvents = "none", f.style.top = "0px", f.style.left = "0px", f.style.position = "absolute", f.style.zIndex = "100000";
1071
+ const m = unref(a);
1072
+ if (!m) return o;
1073
+ const { clientHeight: u, clientWidth: H } = m;
1074
+ return i({ str: t, width: H, height: u, attr: d }), m.appendChild(f), o;
1066
1075
  };
1067
- function e(v, d) {
1068
- Z(v, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1076
+ function e(t, d) {
1077
+ Z(t, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
1069
1078
  r();
1070
1079
  });
1071
1080
  }
@@ -1078,199 +1087,206 @@ function entries(a) {
1078
1087
  function useAttrs(a = {}) {
1079
1088
  const l = getCurrentInstance();
1080
1089
  if (!l) return {};
1081
- const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), c = o.concat(DEFAULT_EXCLUDE_KEYS);
1090
+ const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), c = h.concat(DEFAULT_EXCLUDE_KEYS);
1082
1091
  return l.attrs = reactive(l.attrs), watchEffect(() => {
1083
- const i = entries(l.attrs).reduce((Z, [e, v]) => (!c.includes(e) && !(h && LISTENER_PREFIX.test(e)) && (Z[e] = v), Z), {});
1092
+ const i = entries(l.attrs).reduce((Z, [e, t]) => (!c.includes(e) && !(o && LISTENER_PREFIX.test(e)) && (Z[e] = t), Z), {});
1084
1093
  r.value = i;
1085
1094
  }), r;
1086
1095
  }
1087
1096
  const useRender = () => {
1088
- const a = { value: "dictCode", label: "dictName" }, l = (t, M) => {
1089
- var F;
1090
- const b = f(M);
1097
+ const a = { value: "dictCode", label: "dictName" }, l = (v, b) => {
1098
+ var N;
1099
+ const M = k(b);
1091
1100
  let s = {
1092
1101
  clearable: !0,
1093
1102
  disabled: !1,
1094
1103
  showValue: !1,
1095
1104
  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((E) => E.enabled === "1") : [];
1105
+ }, L, x;
1106
+ isObject(v) ? (s = Object.assign(s, v), L = v.defaultValue, x = v == null ? void 0 : v.code) : x = v;
1107
+ const D = (N = storageLocal.getItem("kLov")[x]) == null ? void 0 : N.children, F = D ? D.filter((E) => E.enabled === "1") : [];
1099
1108
  return {
1100
1109
  name: "#select",
1101
1110
  optionProps: a,
1102
- options: D,
1111
+ options: F,
1103
1112
  props: s,
1104
1113
  defaultValue: L,
1105
- events: b
1114
+ events: M
1106
1115
  };
1107
- }, h = (t, M) => {
1108
- const b = f(M);
1116
+ }, o = (v, b) => {
1117
+ const M = k(b);
1109
1118
  return {
1110
1119
  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) || [],
1114
- events: b
1120
+ optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
1121
+ props: v == null ? void 0 : v.props,
1122
+ options: (v == null ? void 0 : v.options) || [],
1123
+ events: M
1115
1124
  };
1116
- }, o = (t, M) => {
1117
- const b = {
1125
+ }, h = (v, b) => {
1126
+ const M = {
1118
1127
  optionProps: { extLabel: "userName", value: "employeeName" },
1119
1128
  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,
1129
+ attrs: { disabled: v == null ? void 0 : v.disabled },
1130
+ disabled: v == null ? void 0 : v.disabled,
1131
+ defaultValue: v == null ? void 0 : v.defaultValue,
1132
+ mapField: v == null ? void 0 : v.mapField,
1124
1133
  code: "SYS037",
1125
1134
  url: "/uums/employee/listEmployeeIsUser",
1126
1135
  fetchField: "employeeName"
1127
1136
  }
1128
1137
  };
1129
- return h(b, M);
1130
- }, r = (t) => {
1131
- const M = {
1138
+ return o(M, b);
1139
+ }, r = (v) => {
1140
+ const b = {
1132
1141
  optionProps: { extLabel: "userName", value: "name" },
1133
1142
  props: {
1134
1143
  code: "sys/listUsers",
1135
1144
  url: "/uums/user",
1136
1145
  fetchField: "name",
1137
- mapField: t == null ? void 0 : t.mapField
1146
+ mapField: v == null ? void 0 : v.mapField
1138
1147
  }
1139
1148
  };
1140
- return h(M);
1141
- }, c = (t, M) => {
1142
- const b = {
1149
+ return o(b);
1150
+ }, c = (v, b) => {
1151
+ const M = {
1143
1152
  label: "organizationName",
1144
- value: (t == null ? void 0 : t.field) || "organizationName"
1153
+ value: (v == null ? void 0 : v.field) || "organizationName"
1145
1154
  }, s = {
1146
1155
  mapField: {},
1147
- defaultParams: t == null ? void 0 : t.defaultParams,
1156
+ defaultParams: v == null ? void 0 : v.defaultParams,
1148
1157
  url: "/uums/cusOrganization",
1149
1158
  fetchField: "organizationName"
1150
1159
  }, L = {
1151
1160
  organizationId: "id",
1152
1161
  organizationCode: "organizationCode"
1153
1162
  };
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) => {
1156
- const b = {
1163
+ return Object.assign(s.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: M, options: [], methods: b };
1164
+ }, i = (v, b) => {
1165
+ const M = {
1157
1166
  label: "orgName",
1158
- value: (t == null ? void 0 : t.field) || "orgName"
1167
+ value: (v == null ? void 0 : v.field) || "orgName"
1159
1168
  }, s = {
1160
1169
  mapField: {},
1161
- defaultParams: t == null ? void 0 : t.defaultParams,
1170
+ defaultParams: v == null ? void 0 : v.defaultParams,
1162
1171
  url: "/uums/org",
1163
1172
  fetchField: "orgName"
1164
1173
  }, 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;
1174
+ return Object.assign(s.mapField, L, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: M, options: [], methods: b };
1175
+ }, Z = (v, b) => {
1176
+ const M = Object.assign({ disabled: !1 }, v), s = M == null ? void 0 : M.defaultValue;
1168
1177
  return {
1169
1178
  name: "VxeInput",
1170
- props: b,
1179
+ props: M,
1171
1180
  defaultValue: s,
1172
- events: f(M)
1181
+ events: k(b)
1173
1182
  };
1174
- }, e = (t, M) => {
1175
- const b = Object.assign({ disabled: !1, rows: 3 }, t), s = b == null ? void 0 : b.defaultValue;
1183
+ }, e = (v, b) => {
1184
+ const M = Object.assign({ disabled: !1, rows: 3 }, v), s = M == null ? void 0 : M.defaultValue;
1176
1185
  return {
1177
1186
  name: "VxeTextarea",
1178
- props: b,
1187
+ props: M,
1179
1188
  defaultValue: s,
1180
- events: f(M)
1189
+ events: k(b)
1181
1190
  };
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
+ }, t = (v, b) => {
1192
+ const M = "VxeCheckbox", { defaultValue: s, options: L, props: x } = f(v);
1193
+ return { name: M, defaultValue: s, options: L, props: x, events: k(b) };
1194
+ }, d = (v, b) => {
1195
+ const M = "VxeRadio", { defaultValue: s, options: L, props: x } = f(v);
1196
+ return { name: M, defaultValue: s, options: L, props: x, events: k(b) };
1197
+ }, f = (v) => {
1198
+ var D;
1199
+ let b = { disabled: !1 }, M;
1191
1200
  const s = storageLocal.getItem("kLov");
1192
1201
  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);
1202
+ isObject(v) ? (M = v.defaultValue, L = v.code, b = Object.assign(b, v || {})) : isString(v) && (L = v);
1203
+ const x = L ? (D = s[L]) == null ? void 0 : D.children.map((F) => ({ label: F.dictName, value: F.dictCode })) : [];
1204
+ return { props: b, defaultValue: M, options: x };
1205
+ }, m = (v, b) => {
1206
+ const M = k(b);
1198
1207
  return {
1199
1208
  name: "VxeInput",
1200
1209
  props: Object.assign(
1201
1210
  { type: "number", clearable: !0, min: 0, controls: !1 },
1202
- t || {}
1211
+ v || {}
1203
1212
  ),
1204
- defaultValue: t == null ? void 0 : t.defaultValue,
1205
- events: b
1213
+ defaultValue: v == null ? void 0 : v.defaultValue,
1214
+ events: M
1206
1215
  };
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) || {
1216
+ }, u = (v, b) => {
1217
+ const M = k(b), s = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
1218
+ return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: L, events: M };
1219
+ }, H = (v, b) => {
1220
+ const M = k(b);
1221
+ return { name: "#lov", props: Object.assign({}, v || {}), events: M };
1222
+ }, p = (v, b) => {
1223
+ const M = k(b), s = (v == null ? void 0 : v.optionProps) || {
1215
1224
  label: "label",
1216
1225
  value: "value"
1217
1226
  }, L = Object.assign(
1218
1227
  { clearable: !0, disabled: !1, showValue: !1 },
1219
- t || {}
1228
+ v || {}
1220
1229
  );
1221
1230
  return console.log("itemRender"), {
1222
1231
  name: "#select",
1223
1232
  optionProps: s,
1224
- options: (t == null ? void 0 : t.options) || [],
1233
+ options: (v == null ? void 0 : v.options) || [],
1225
1234
  props: L,
1226
- events: b
1235
+ events: M
1227
1236
  };
1228
- }, n = (t, M) => {
1229
- let b = {
1237
+ }, n = (v, b) => {
1238
+ let M = {
1230
1239
  openLabel: "是",
1231
1240
  closeLabel: "否",
1232
1241
  openValue: "Y",
1233
1242
  closeValue: "N"
1234
1243
  }, 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) => {
1239
- const b = {
1244
+ isObject(v) && !isFunction(v) ? (M = Object.assign(M, v || {}), s = v.defaultValue || s) : !isEmpty(v) && isString(v) && (s = v, M = Object.assign(M, { defaultValue: s }));
1245
+ const L = isFunction(v) ? k(v) : k(b);
1246
+ return { name: "VxeSwitch", props: M, defaultValue: s, events: L };
1247
+ }, y = (v, b) => ({ name: "#tag", props: { code: v, tagMap: b } }), C = (v, b) => {
1248
+ const M = {
1240
1249
  openLabel: "启用",
1241
1250
  closeLabel: "禁用",
1242
1251
  openValue: "1",
1243
1252
  closeValue: "0",
1244
1253
  defaultValue: "1"
1245
1254
  };
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;
1255
+ !isFunction(v) && isObject(v) && Object.assign(M, v);
1256
+ const s = isFunction(v) ? v : b;
1257
+ return n(M, s);
1258
+ }, A = () => ({ name: "#iconSelect" }), w = (v = [], b = {}, M) => ({ name: "#treeSelect", sourceData: v, props: b, events: M }), V = (v, b) => {
1259
+ const M = k(b);
1260
+ return {
1261
+ name: "#area",
1262
+ props: { mapField: (v == null ? void 0 : v.mapField) || ["province", "city", "region"] },
1263
+ events: M
1264
+ };
1265
+ }, k = (v) => {
1266
+ let b = {};
1267
+ return isObject(v) && !isFunction(v) ? b = {
1268
+ change: (v == null ? void 0 : v.change) || I,
1269
+ blur: (v == null ? void 0 : v.blur) || I,
1270
+ focus: (v == null ? void 0 : v.focus) || I,
1271
+ input: (v == null ? void 0 : v.input) || I,
1272
+ clear: (v == null ? void 0 : v.clear) || I,
1273
+ filterMethod: v == null ? void 0 : v.filterMethod
1274
+ } : v && (b = { change: v }), b;
1259
1275
  };
1260
1276
  function I() {
1261
1277
  }
1262
1278
  return {
1263
1279
  renderDict: l,
1264
- renderSelect: h,
1280
+ renderSelect: o,
1265
1281
  renderInput: Z,
1266
1282
  renderTextarea: e,
1267
- renderCheckBox: v,
1283
+ renderCheckBox: t,
1268
1284
  renderRadio: d,
1269
- renderUser: o,
1285
+ renderUser: h,
1270
1286
  renderSysUser: r,
1271
1287
  renderInvOrg: c,
1272
1288
  renderBU: i,
1273
- renderNumber: V,
1289
+ renderNumber: m,
1274
1290
  renderLov: H,
1275
1291
  renderSelectLocal: p,
1276
1292
  renderDate: u,
@@ -1278,16 +1294,17 @@ const useRender = () => {
1278
1294
  renderCellTag: y,
1279
1295
  renderEnabled: C,
1280
1296
  renderIconSelect: A,
1281
- renderTreeSelect: w
1297
+ renderTreeSelect: w,
1298
+ renderArea: V
1282
1299
  };
1283
1300
  }, useGlobal = () => {
1284
1301
  const a = getCurrentInstance();
1285
1302
  if (!a) return { $global: {}, $storage: {}, $config: {} };
1286
- 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;
1303
+ 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;
1287
1304
  return {
1288
1305
  $global: l,
1289
- $storage: h,
1290
- $config: o,
1306
+ $storage: o,
1307
+ $config: h,
1291
1308
  $serviceApi: r,
1292
1309
  $hasAuthority: c,
1293
1310
  $printPlugin: i,
@@ -1304,56 +1321,60 @@ function buildUUID() {
1304
1321
  }
1305
1322
  let unique = 0;
1306
1323
  function buildShortUUID(a = "") {
1307
- const l = Date.now(), h = Math.floor(Math.random() * 1e9);
1308
- return unique++, a + "_" + h + unique + String(l);
1324
+ const l = Date.now(), o = Math.floor(Math.random() * 1e9);
1325
+ return unique++, a + "_" + o + unique + String(l);
1309
1326
  }
1310
1327
  const deviceDetection = () => {
1311
- 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";
1312
- return l || h || o || r || c || i || Z;
1328
+ 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";
1329
+ return l || o || h || r || c || i || Z;
1313
1330
  }, getBrowserInfo = () => {
1314
- const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, h = a.match(l);
1331
+ const a = navigator.userAgent.toLowerCase(), l = /(msie|firefox|chrome|opera|version).*?([\d.]+)/, o = a.match(l);
1315
1332
  return {
1316
- browser: h[1].replace(/version/, "'safari"),
1317
- version: h[2]
1333
+ browser: o[1].replace(/version/, "'safari"),
1334
+ version: o[2]
1318
1335
  };
1319
- }, showMessage = (a, l = "message", h = {}) => {
1320
- var o, r;
1321
- 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 });
1336
+ }, showMessage = (a, l = "message", o = {}) => {
1337
+ var h, r;
1338
+ 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 });
1322
1339
  }, successMessage = (a = "操作成功", l = {}) => {
1323
- var h;
1324
- return (h = VxeUI.modal) == null ? void 0 : h.message({ content: a, ...l, status: "success" });
1340
+ var o;
1341
+ return (o = VxeUI.modal) == null ? void 0 : o.message({ content: a, ...l, status: "success" });
1325
1342
  }, warnMessage = (a, l = {}) => {
1326
- var h, o;
1327
- 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({
1343
+ var o, h;
1344
+ 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({
1328
1345
  content: a,
1329
1346
  duration: 5e3,
1330
1347
  ...l,
1331
1348
  status: "warning"
1332
1349
  });
1333
1350
  }, errorMessage = (a = "操作失败", l = {}) => {
1334
- var h, o;
1335
- 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" });
1336
- }, renderHook = useRender(), i18nColums = (a) => {
1337
- let l = 0, h = 0;
1338
- const o = a.length - 1;
1339
- return a.map((r, c) => {
1340
- if (h = h + 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 && o === c && h < window.innerWidth && (r.minWidth = r.width, r.width = null), r;
1351
+ var o, h;
1352
+ 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" });
1353
+ }, renderHook = useRender(), i18nColums = (a, l = !0) => {
1354
+ let o = 0, h = 0;
1355
+ const r = a.length - 1;
1356
+ return a.map((c, i) => {
1357
+ if (h = h + c.width, c.type) return c;
1358
+ c.title = c.title || `message.${c.field}`;
1359
+ const { showOverflow: Z } = c;
1360
+ return c.field !== "operate" && ((c.width > 99 || c.minWidth) && (c.showOverflow = Z === !1 ? Z : "tooltip"), c.sortable = !(l === !1 || c.sortable === !1)), o || (o = c.minWidth), !o && r === i && h < window.innerWidth && (c.minWidth = c.width, c.width = null), c;
1344
1361
  });
1345
- }, formatItems = (a, l, h = 24) => a.length ? a.map((o) => {
1346
- var i, Z;
1347
- o.title = o.title || `message.${o.field}`, o.span = o.span || h;
1348
- let r = !1;
1349
- 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);
1350
- let c = {
1351
- name: "VxeInput",
1352
- props: { disabled: r, placeholder: r ? "" : o.placeholder }
1353
- };
1354
- return o.code && !o.itemRender && (c = renderHook.renderDict(o.code)), o.itemRender = o.itemRender || c, o.itemRender.props = Object.assign(o.itemRender.props || {}, {
1355
- disabled: r
1356
- }), o;
1362
+ }, formatItems = (a, l, o = 24) => a.length ? a.map((h) => {
1363
+ var r, c, i;
1364
+ if ((r = h.children) != null && r.length)
1365
+ return h.children = formatItems(h.children, l, o), h;
1366
+ {
1367
+ h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.type === "collapseNode" && (h.title = "", h.titleWidth = 0);
1368
+ let Z = !1;
1369
+ 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);
1370
+ let e = {
1371
+ name: "VxeInput",
1372
+ props: { disabled: Z, placeholder: Z ? "" : h.placeholder }
1373
+ };
1374
+ return h.code && !h.itemRender && (e = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || e, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
1375
+ disabled: Z
1376
+ }), h;
1377
+ }
1357
1378
  }) : a, formSearchButtons = {
1358
1379
  span: 6,
1359
1380
  align: "right",
@@ -1379,39 +1400,43 @@ const deviceDetection = () => {
1379
1400
  events: null
1380
1401
  }
1381
1402
  }, formatGridItems = (a, l) => {
1382
- const h = a, o = h.length, r = o > 2 && h.some((v, d) => d < 3 && (v.span > 6 || getDateRange(v))), c = r || o > 3, i = {
1403
+ const o = a, h = o.length, r = h > 2 && o.some((t, d) => d < 3 && (t.span > 6 || getDateRange(t))), c = r || h > 3, i = {
1383
1404
  collapseTags: !0,
1384
1405
  collapseTagsTooltip: !0,
1385
1406
  multiple: !0
1386
- }, Z = h.map((v, d) => {
1387
- var m, V, u;
1388
- 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(
1407
+ }, Z = o.map((t, d) => {
1408
+ var f, m, u;
1409
+ 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(
1389
1410
  i,
1390
- ((u = v.itemRender) == null ? void 0 : u.props) || {}
1391
- )), v;
1411
+ ((u = t.itemRender) == null ? void 0 : u.props) || {}
1412
+ )), t;
1392
1413
  }), e = clone(formSearchButtons, !0);
1393
1414
  if (e.collapseNode = c, l && e.itemRender.options.length < 3 && (e.itemRender.options.push(l), e.itemRender.events = l.events), c) {
1394
- const v = r ? 2 : 3;
1395
- Z.splice(v, 0, e);
1415
+ const t = r ? 2 : 3;
1416
+ Z.splice(t, 0, e);
1396
1417
  } else
1397
1418
  Z.push(e);
1398
1419
  return Z;
1399
1420
  }, getDateRange = (a) => {
1400
- var l, h, o, r, c;
1401
- 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;
1421
+ var l, o, h, r, c;
1422
+ 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;
1402
1423
  }, formatRules = (a, l) => {
1403
- const h = {};
1404
- return a.forEach((o) => {
1405
- if (o.required) {
1406
- const { field: r, title: c } = o, i = c == null ? void 0 : c.startsWith("message.");
1407
- h[r] = [
1424
+ const o = {};
1425
+ return a.forEach((h) => {
1426
+ var r;
1427
+ if ((r = h.children) != null && r.length) {
1428
+ const c = formatRules(h.children, l);
1429
+ merge(o, c);
1430
+ } else if (h.required) {
1431
+ const { field: c, title: i } = h, Z = i == null ? void 0 : i.startsWith("message.");
1432
+ o[c] = [
1408
1433
  {
1409
1434
  required: !0,
1410
- message: `${l("message.required")}${c && i ? l(c) : c || l(`message.${r}`)}`
1435
+ message: `${l("message.required")}${i && Z ? l(i) : i || l(`message.${c}`)}`
1411
1436
  }
1412
1437
  ];
1413
1438
  }
1414
- }), h;
1439
+ }), o;
1415
1440
  }, expandedPaths = [];
1416
1441
  function extractPathList(a) {
1417
1442
  if (!Array.isArray(a)) {
@@ -1430,8 +1455,8 @@ function deleteTreeChildren(a, l = []) {
1430
1455
  return;
1431
1456
  }
1432
1457
  if (!(!a || a.length === 0)) {
1433
- for (const [h, o] of a.entries())
1434
- 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);
1458
+ for (const [o, h] of a.entries())
1459
+ 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);
1435
1460
  return a;
1436
1461
  }
1437
1462
  }
@@ -1441,8 +1466,8 @@ function buildHierarchyTree(a, l = []) {
1441
1466
  return;
1442
1467
  }
1443
1468
  if (!(!a || a.length === 0)) {
1444
- for (const [h, o] of a.entries())
1445
- 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);
1469
+ for (const [o, h] of a.entries())
1470
+ 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);
1446
1471
  return a;
1447
1472
  }
1448
1473
  }
@@ -1452,20 +1477,20 @@ function getNodeByUniqueId(a, l) {
1452
1477
  return;
1453
1478
  }
1454
1479
  if (!a || a.length === 0) return;
1455
- const h = a.find((r) => r.uniqueId === l);
1456
- if (h) return h;
1457
- const o = a.filter((r) => r.children).map((r) => r.children).flat(1);
1458
- return getNodeByUniqueId(o, l);
1480
+ const o = a.find((r) => r.uniqueId === l);
1481
+ if (o) return o;
1482
+ const h = a.filter((r) => r.children).map((r) => r.children).flat(1);
1483
+ return getNodeByUniqueId(h, l);
1459
1484
  }
1460
- function appendFieldByUniqueId(a, l, h) {
1485
+ function appendFieldByUniqueId(a, l, o) {
1461
1486
  if (!Array.isArray(a)) {
1462
1487
  console.warn("menuTree must be an array");
1463
1488
  return;
1464
1489
  }
1465
1490
  if (!a || a.length === 0) return {};
1466
- for (const o of a) {
1467
- const r = o.children && o.children.length > 0;
1468
- o.uniqueId === l && Object.prototype.toString.call(h) === "[object Object]" && Object.assign(o, h), r && appendFieldByUniqueId(o.children, l, h);
1491
+ for (const h of a) {
1492
+ const r = h.children && h.children.length > 0;
1493
+ h.uniqueId === l && Object.prototype.toString.call(o) === "[object Object]" && Object.assign(h, o), r && appendFieldByUniqueId(h.children, l, o);
1469
1494
  }
1470
1495
  return a;
1471
1496
  }
@@ -1490,9 +1515,9 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1490
1515
  }
1491
1516
  }, g = class g {
1492
1517
  constructor() {
1493
- k(this, "router");
1494
- k(this, "baseUrl", null);
1495
- k(this, "getNetworkError", (l) => l ? {
1518
+ S(this, "router");
1519
+ S(this, "baseUrl", null);
1520
+ S(this, "getNetworkError", (l) => l ? {
1496
1521
  400: "错误的请求",
1497
1522
  401: "服务未授权,请重新登录",
1498
1523
  403: "拒绝访问",
@@ -1514,68 +1539,68 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1514
1539
  }
1515
1540
  /** 重连原始请求 */
1516
1541
  static retryOriginalRequest(l) {
1517
- return new Promise((h) => {
1518
- g.requests.push((o) => {
1519
- l.headers.Authorization = "Bearer " + o, h(l);
1542
+ return new Promise((o) => {
1543
+ g.requests.push((h) => {
1544
+ l.headers.Authorization = "Bearer " + h, o(l);
1520
1545
  });
1521
1546
  });
1522
1547
  }
1523
1548
  // 请求拦截
1524
1549
  httpInterceptorsRequest() {
1525
1550
  g.axiosInstance.interceptors.request.use(
1526
- (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) => {
1551
+ (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) => {
1527
1552
  const r = cookies.get(kTOKENKEY);
1528
1553
  if (r) {
1529
1554
  const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
1530
1555
  c.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
1531
1556
  refreshToken: c.refreshToken
1532
1557
  }).then((e) => {
1533
- this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((v) => v(e.access_token)), g.requests = [];
1558
+ this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((t) => t(e.access_token)), g.requests = [];
1534
1559
  }).finally(() => {
1535
1560
  g.isRefreshing = !1;
1536
- })), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, o(l));
1561
+ })), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, h(l));
1537
1562
  } else {
1538
1563
  const c = cookies.get("kCookies_token");
1539
- c && (l.headers["X-Token"] = c), o(l);
1564
+ c && (l.headers["X-Token"] = c), h(l);
1540
1565
  }
1541
1566
  })),
1542
1567
  (l) => Promise.reject(l)
1543
1568
  );
1544
1569
  }
1545
1570
  setToken(l) {
1546
- const { access_token: h, expires_in: o, refresh_token: r } = l, c = {
1547
- accessToken: h,
1571
+ const { access_token: o, expires_in: h, refresh_token: r } = l, c = {
1572
+ accessToken: o,
1548
1573
  refreshToken: r,
1549
- expires: Date.now() + o * 1e3
1574
+ expires: Date.now() + h * 1e3
1550
1575
  };
1551
1576
  cookies.set(kTOKENKEY, JSON.stringify(c));
1552
1577
  }
1553
1578
  // 响应拦截
1554
1579
  httpInterceptorsResponse() {
1555
1580
  g.axiosInstance.interceptors.response.use(
1556
- (h) => {
1557
- const o = h.config;
1558
- 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);
1581
+ (o) => {
1582
+ const h = o.config;
1583
+ 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);
1559
1584
  },
1560
- (h) => {
1585
+ (o) => {
1561
1586
  var r;
1562
- const o = h;
1563
- 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);
1587
+ const h = o;
1588
+ 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);
1564
1589
  }
1565
1590
  );
1566
1591
  }
1567
- transformConfigByMethod(l, h) {
1568
- const { method: o } = h, r = ["get"], c = o.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1592
+ transformConfigByMethod(l, o) {
1593
+ const { method: h } = o, r = ["get"], c = h.toLocaleLowerCase(), i = r.includes(c) ? "params" : "data";
1569
1594
  return {
1570
- ...h,
1595
+ ...o,
1571
1596
  [i]: l
1572
1597
  };
1573
1598
  }
1574
1599
  // 通用请求工具函数
1575
- request(l, h, o, r) {
1576
- const c = this.transformConfigByMethod(o, {
1600
+ request(l, o, h, r) {
1601
+ const c = this.transformConfigByMethod(h, {
1577
1602
  method: l,
1578
- url: h,
1603
+ url: o,
1579
1604
  ...r
1580
1605
  });
1581
1606
  return new Promise((i, Z) => {
@@ -1587,16 +1612,16 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1587
1612
  else if ((e == null ? void 0 : e.code) !== "-1")
1588
1613
  i(e);
1589
1614
  else {
1590
- const v = (e == null ? void 0 : e.msg) || "服务异常";
1591
- errorMessage(v, { duration: 8e3 }), Z(v);
1615
+ const t = (e == null ? void 0 : e.msg) || "服务异常";
1616
+ errorMessage(t, { duration: 8e3 }), Z(t);
1592
1617
  }
1593
1618
  }).catch((e) => {
1594
- var v, d, m;
1619
+ var t, d, f;
1595
1620
  if (e != null && e.code) {
1596
- if (((v = e == null ? void 0 : e.response) == null ? void 0 : v.status) === 401)
1621
+ if (((t = e == null ? void 0 : e.response) == null ? void 0 : t.status) === 401)
1597
1622
  return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
1598
1623
  errorMessage(
1599
- this.getNetworkError((m = e == null ? void 0 : e.response) == null ? void 0 : m.status) || (e == null ? void 0 : e.message),
1624
+ this.getNetworkError((f = e == null ? void 0 : e.response) == null ? void 0 : f.status) || (e == null ? void 0 : e.message),
1600
1625
  { duration: 8e3 }
1601
1626
  );
1602
1627
  }
@@ -1605,32 +1630,32 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
1605
1630
  });
1606
1631
  }
1607
1632
  // 单独抽离的post工具函数
1608
- post(l, h, o) {
1609
- return this.request("post", l, h, o);
1633
+ post(l, o, h) {
1634
+ return this.request("post", l, o, h);
1610
1635
  }
1611
1636
  // 单独抽离的delete工具函数
1612
- delete(l, h, o) {
1613
- return this.request("delete", l, h, o);
1637
+ delete(l, o, h) {
1638
+ return this.request("delete", l, o, h);
1614
1639
  }
1615
1640
  // 单独抽离的put工具函数
1616
- put(l, h, o) {
1617
- return this.request("put", l, h, o);
1641
+ put(l, o, h) {
1642
+ return this.request("put", l, o, h);
1618
1643
  }
1619
1644
  // 单独抽离的get工具函数
1620
- get(l, h, o) {
1621
- for (const r in h)
1622
- h[r] || delete h[r];
1623
- return this.request("get", l, h, o);
1645
+ get(l, o, h) {
1646
+ for (const r in o)
1647
+ o[r] || delete o[r];
1648
+ return this.request("get", l, o, h);
1624
1649
  }
1625
1650
  postRouter(l) {
1626
1651
  return this.request("post", "route/service", l);
1627
1652
  }
1628
1653
  };
1629
1654
  /** token过期后,暂存待执行的请求 */
1630
- k(g, "requests", []), /** 防止重复刷新token */
1631
- k(g, "isRefreshing", !1), // 初始化配置对象
1632
- k(g, "initConfig", {}), // 保存当前Axios实例对象
1633
- k(g, "axiosInstance", Axios.create(defaultConfig));
1655
+ S(g, "requests", []), /** 防止重复刷新token */
1656
+ S(g, "isRefreshing", !1), // 初始化配置对象
1657
+ S(g, "initConfig", {}), // 保存当前Axios实例对象
1658
+ S(g, "axiosInstance", Axios.create(defaultConfig));
1634
1659
  let SuHttp = g;
1635
1660
  const http = new SuHttp(), lunarCalendar = {
1636
1661
  /**
@@ -2284,10 +2309,10 @@ const http = new SuHttp(), lunarCalendar = {
2284
2309
  * @eg:var count = calendar.lYearDays(1987) ;//count=387
2285
2310
  */
2286
2311
  lYearDays: function(a) {
2287
- let l, h = 348;
2312
+ let l, o = 348;
2288
2313
  for (l = 32768; l > 8; l >>= 1)
2289
- h += this.lunarInfo[a - 1900] & l ? 1 : 0;
2290
- return h + this.leapDays(a);
2314
+ o += this.lunarInfo[a - 1900] & l ? 1 : 0;
2315
+ return o + this.leapDays(a);
2291
2316
  },
2292
2317
  /**
2293
2318
  * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
@@ -2327,8 +2352,8 @@ const http = new SuHttp(), lunarCalendar = {
2327
2352
  solarDays: function(a, l) {
2328
2353
  if (l > 12 || l < 1)
2329
2354
  return -1;
2330
- const h = l - 1;
2331
- return h === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[h];
2355
+ const o = l - 1;
2356
+ return o === 1 ? a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 ? 29 : 28 : this.solarMonth[o];
2332
2357
  },
2333
2358
  /**
2334
2359
  * 农历年份转换为干支纪年
@@ -2336,8 +2361,8 @@ const http = new SuHttp(), lunarCalendar = {
2336
2361
  * @return Cn string
2337
2362
  */
2338
2363
  toGanZhiYear: function(a) {
2339
- let l = (a - 3) % 10, h = (a - 3) % 12;
2340
- return l === 0 && (l = 10), h === 0 && (h = 12), this.Gan[l - 1] + this.Zhi[h - 1];
2364
+ let l = (a - 3) % 10, o = (a - 3) % 12;
2365
+ return l === 0 && (l = 10), o === 0 && (o = 12), this.Gan[l - 1] + this.Zhi[o - 1];
2341
2366
  },
2342
2367
  /**
2343
2368
  * 公历月、日判断所属星座
@@ -2346,8 +2371,8 @@ const http = new SuHttp(), lunarCalendar = {
2346
2371
  * @return Cn string
2347
2372
  */
2348
2373
  toAstro: function(a, l) {
2349
- const h = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", o = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2350
- return h.substr(a * 2 - (l < o[a - 1] ? 2 : 0), 2) + "座";
2374
+ const o = "摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯", h = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22];
2375
+ return o.substr(a * 2 - (l < h[a - 1] ? 2 : 0), 2) + "座";
2351
2376
  },
2352
2377
  /**
2353
2378
  * 传入offset偏移量返回干支
@@ -2367,12 +2392,12 @@ const http = new SuHttp(), lunarCalendar = {
2367
2392
  getTerm: function(a, l) {
2368
2393
  if (a < 1900 || a > 2100 || l < 1 || l > 24)
2369
2394
  return -1;
2370
- const h = this.sTermInfo[a - 1900], o = [];
2371
- for (let r = 0; r < h.length; r += 5) {
2372
- const c = parseInt("0x" + h.substr(r, 5)).toString();
2373
- o.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2395
+ const o = this.sTermInfo[a - 1900], h = [];
2396
+ for (let r = 0; r < o.length; r += 5) {
2397
+ const c = parseInt("0x" + o.substr(r, 5)).toString();
2398
+ h.push(c[0], c.substr(1, 2), c[3], c.substr(4, 2));
2374
2399
  }
2375
- return parseInt(o[l - 1]);
2400
+ return parseInt(h[l - 1]);
2376
2401
  },
2377
2402
  /**
2378
2403
  * 传入农历数字月份返回汉语通俗表示法
@@ -2427,21 +2452,21 @@ const http = new SuHttp(), lunarCalendar = {
2427
2452
  * @return JSON object
2428
2453
  * @eg:console.log(calendar.solar2lunar(1987,11,01));
2429
2454
  */
2430
- solar2lunar: function(a, l, h) {
2431
- let o = parseInt(a), r = parseInt(l), c = parseInt(h);
2432
- if (o < 1900 || o > 2100 || o === 1900 && r === 1 && c < 31)
2455
+ solar2lunar: function(a, l, o) {
2456
+ let h = parseInt(a), r = parseInt(l), c = parseInt(o);
2457
+ if (h < 1900 || h > 2100 || h === 1900 && r === 1 && c < 31)
2433
2458
  return -1;
2434
2459
  let i;
2435
- o ? i = new Date(o, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2436
- let Z, e = 0, v = 0;
2437
- o = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2460
+ h ? i = new Date(h, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
2461
+ let Z, e = 0, t = 0;
2462
+ h = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
2438
2463
  let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
2439
2464
  for (Z = 1900; Z < 2101 && d > 0; Z++)
2440
- v = this.lYearDays(Z), d -= v;
2441
- d < 0 && (d += v, Z--);
2442
- const m = /* @__PURE__ */ new Date();
2443
- let V = !1;
2444
- m.getFullYear() === o && m.getMonth() + 1 === r && m.getDate() === c && (V = !0);
2465
+ t = this.lYearDays(Z), d -= t;
2466
+ d < 0 && (d += t, Z--);
2467
+ const f = /* @__PURE__ */ new Date();
2468
+ let m = !1;
2469
+ f.getFullYear() === h && f.getMonth() + 1 === r && f.getDate() === c && (m = !0);
2445
2470
  let u = i.getDay();
2446
2471
  const H = this.nStr1[u];
2447
2472
  u === 0 && (u = 7);
@@ -2449,39 +2474,39 @@ const http = new SuHttp(), lunarCalendar = {
2449
2474
  e = this.leapMonth(Z);
2450
2475
  let n = !1;
2451
2476
  for (Z = 1; Z < 13 && d > 0; Z++)
2452
- 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;
2453
- d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += v, --Z);
2454
- const y = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), f = this.getTerm(o, r * 2 - 1), I = this.getTerm(o, r * 2);
2455
- let t = this.toGanZhi((o - 1900) * 12 + r + 11);
2456
- c >= f && (t = this.toGanZhi((o - 1900) * 12 + r + 12));
2457
- let M = !1, b;
2458
- f === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
2459
- const s = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, L = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = o + "-" + r + "-" + c, D = p + "-" + y + "-" + C, F = this.festival, E = this.lFestival, R = r + "-" + c;
2460
- let N = y + "-" + C;
2461
- return y === 12 && C === 29 && this.monthDays(p, y) === 29 && (N = "12-30"), {
2477
+ 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;
2478
+ d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += t, --Z);
2479
+ const y = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), V = this.getTerm(h, r * 2 - 1), k = this.getTerm(h, r * 2);
2480
+ let I = this.toGanZhi((h - 1900) * 12 + r + 11);
2481
+ c >= V && (I = this.toGanZhi((h - 1900) * 12 + r + 12));
2482
+ let v = !1, b;
2483
+ V === c && (v = !0, b = this.solarTerm[r * 2 - 2]), k === c && (v = !0, b = this.solarTerm[r * 2 - 1]);
2484
+ const M = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, s = this.toGanZhi(M + c - 1), L = this.toAstro(r, c), x = h + "-" + r + "-" + c, D = p + "-" + y + "-" + C, F = this.festival, N = this.lFestival, E = r + "-" + c;
2485
+ let R = y + "-" + C;
2486
+ return y === 12 && C === 29 && this.monthDays(p, y) === 29 && (R = "12-30"), {
2462
2487
  date: x,
2463
2488
  lunarDate: D,
2464
- festival: F[R] ? F[R].title : null,
2465
- lunarFestival: E[N] ? E[N].title : null,
2489
+ festival: F[E] ? F[E].title : null,
2490
+ lunarFestival: N[R] ? N[R].title : null,
2466
2491
  lYear: p,
2467
2492
  lMonth: y,
2468
2493
  lDay: C,
2469
2494
  Animal: this.getAnimal(p),
2470
2495
  IMonthCn: (n ? "闰" : "") + this.toChinaMonth(y),
2471
2496
  IDayCn: this.toChinaDay(C),
2472
- cYear: o,
2497
+ cYear: h,
2473
2498
  cMonth: r,
2474
2499
  cDay: c,
2475
2500
  gzYear: w,
2476
- gzMonth: t,
2477
- gzDay: L,
2478
- isToday: V,
2501
+ gzMonth: I,
2502
+ gzDay: s,
2503
+ isToday: m,
2479
2504
  isLeap: n,
2480
2505
  nWeek: u,
2481
2506
  ncWeek: "星期" + H,
2482
- isTerm: M,
2507
+ isTerm: v,
2483
2508
  Term: b,
2484
- astro: S
2509
+ astro: L
2485
2510
  };
2486
2511
  },
2487
2512
  /**
@@ -2494,23 +2519,23 @@ const http = new SuHttp(), lunarCalendar = {
2494
2519
  * @return JSON object
2495
2520
  * @eg:console.log(calendar.lunar2solar(1987,9,10));
2496
2521
  */
2497
- lunar2solar: function(a, l, h, o) {
2498
- a = parseInt(a), l = parseInt(l), h = parseInt(h), o = !!o;
2522
+ lunar2solar: function(a, l, o, h) {
2523
+ a = parseInt(a), l = parseInt(l), o = parseInt(o), h = !!h;
2499
2524
  const r = this.leapMonth(a);
2500
- if (o && r !== l || a === 2100 && l === 12 && h > 1 || a === 1900 && l === 1 && h < 31)
2525
+ if (h && r !== l || a === 2100 && l === 12 && o > 1 || a === 1900 && l === 1 && o < 31)
2501
2526
  return -1;
2502
2527
  const c = this.monthDays(a, l);
2503
2528
  let i = c;
2504
- if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
2529
+ if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
2505
2530
  return -1;
2506
2531
  let Z = 0, e;
2507
2532
  for (e = 1900; e < a; e++)
2508
2533
  Z += this.lYearDays(e);
2509
- let v = 0, d = !1;
2534
+ let t = 0, d = !1;
2510
2535
  for (e = 1; e < l; e++)
2511
- v = this.leapMonth(a), d || v <= e && v > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2512
- o && (Z += c);
2513
- const m = Date.UTC(1900, 1, 30, 0, 0, 0), V = new Date((Z + h - 31) * 864e5 + m), u = V.getUTCFullYear(), H = V.getUTCMonth() + 1, p = V.getUTCDate();
2536
+ t = this.leapMonth(a), d || t <= e && t > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
2537
+ h && (Z += c);
2538
+ const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + o - 31) * 864e5 + f), u = m.getUTCFullYear(), H = m.getUTCMonth() + 1, p = m.getUTCDate();
2514
2539
  return this.solar2lunar(u, H, p);
2515
2540
  }
2516
2541
  }, dict = storageLocal.getItem("kLov"), formats = {
@@ -2550,8 +2575,8 @@ const http = new SuHttp(), lunarCalendar = {
2550
2575
  tableCellFormatMethod({ cellValue: a }, l) {
2551
2576
  var r, c;
2552
2577
  if (!l) return a;
2553
- 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;
2554
- return (o == null ? void 0 : o.dictName) || a;
2578
+ 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;
2579
+ return (h == null ? void 0 : h.dictName) || a;
2555
2580
  }
2556
2581
  },
2557
2582
  formatRelateField: {
@@ -2563,22 +2588,22 @@ const http = new SuHttp(), lunarCalendar = {
2563
2588
  formatContact: {
2564
2589
  // 字段拼接展示
2565
2590
  tableCellFormatMethod({ row: a }, l) {
2566
- return l.reduce((h, o) => a[o] ? h ? h += a[o] : a[o] : h, "");
2591
+ return l.reduce((o, h) => a[h] ? o ? o += a[h] : a[h] : o, "");
2567
2592
  }
2568
2593
  },
2569
2594
  formatSelectLocal: {
2570
2595
  tableCellFormatMethod({ cellValue: a }, l) {
2571
- const [h, o = "value", r = "label"] = l, c = h == null ? void 0 : h.find((i) => i[o] === a);
2596
+ const [o, h = "value", r = "label"] = l, c = o == null ? void 0 : o.find((i) => i[h] === a);
2572
2597
  return c ? c[r] : a;
2573
2598
  }
2574
2599
  },
2575
2600
  formatMultiValue: {
2576
2601
  tableCellFormatMethod({ row: a }, l) {
2577
2602
  var c;
2578
- const [h, o] = l;
2603
+ const [o, h] = l;
2579
2604
  let r;
2580
- return (c = a[h]) == null || c.split(",").forEach((i) => {
2581
- const Z = o.find((e) => e.value === i);
2605
+ return (c = a[o]) == null || c.split(",").forEach((i) => {
2606
+ const Z = h.find((e) => e.value === i);
2582
2607
  r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
2583
2608
  }), r;
2584
2609
  }
@@ -10206,29 +10231,29 @@ const http = new SuHttp(), lunarCalendar = {
10206
10231
  height: 24
10207
10232
  }, withInstall = (a) => {
10208
10233
  const l = a;
10209
- return l.install = (h) => {
10210
- h.component(l.name || l.__name, a);
10234
+ return l.install = (o) => {
10235
+ o.component(l.name || l.__name, a);
10211
10236
  }, a;
10212
10237
  };
10213
10238
  function sleep(a = 64) {
10214
10239
  return new Promise((l) => {
10215
- const h = setTimeout(() => {
10216
- window.clearTimeout(h), l(a);
10240
+ const o = setTimeout(() => {
10241
+ window.clearTimeout(o), l(a);
10217
10242
  }, a);
10218
10243
  });
10219
10244
  }
10220
10245
  const delay = (a) => new Promise((l) => setTimeout(l, a)), useDark = () => ({ isDark: ref(document.documentElement.classList.contains("dark")) }), useDebounce = (a, l) => {
10221
- let h;
10246
+ let o;
10222
10247
  return () => {
10223
- h && clearTimeout(h), h = setTimeout(a, l);
10248
+ o && clearTimeout(o), o = setTimeout(a, l);
10224
10249
  };
10225
10250
  };
10226
10251
  function isUrl(a) {
10227
10252
  return /(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(a);
10228
10253
  }
10229
10254
  const getDictName = (a, l) => {
10230
- var o, r;
10231
- 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;
10255
+ var h, r;
10256
+ 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;
10232
10257
  };
10233
10258
  export {
10234
10259
  W as NProgress,