@utogether/utils 3.0.0-beta.48 → 3.0.0-beta.49
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 +406 -382
- package/dist/utils.umd.js +1 -1
- package/package.json +1 -1
package/dist/utils.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var j = (l, a, o) => a in l ? z(l, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : l[a] = o;
|
|
3
|
+
var x = (l, a, o) => j(l, typeof a != "symbol" ? a + "" : a, o);
|
|
4
4
|
import { createVNode, resolveComponent, mergeProps, Fragment, createTextVNode, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, merge, has } from "xe-utils";
|
|
@@ -12,9 +12,9 @@ import NProgress from "nprogress";
|
|
|
12
12
|
import { default as G } from "nprogress";
|
|
13
13
|
class sessionStorageProxy {
|
|
14
14
|
constructor(a) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
x(this, "storage");
|
|
16
|
+
x(this, "prefix");
|
|
17
|
+
x(this, "addPrefix", (a) => {
|
|
18
18
|
this.prefix = a;
|
|
19
19
|
});
|
|
20
20
|
this.storage = a;
|
|
@@ -46,7 +46,7 @@ class localStorageProxy extends sessionStorageProxy {
|
|
|
46
46
|
}
|
|
47
47
|
class localforageProxy {
|
|
48
48
|
constructor() {
|
|
49
|
-
|
|
49
|
+
x(this, "storage");
|
|
50
50
|
localforage.config({
|
|
51
51
|
name: "uapp",
|
|
52
52
|
storeName: "udb"
|
|
@@ -140,8 +140,8 @@ function init(l, a) {
|
|
|
140
140
|
init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
|
|
141
141
|
class Cookies {
|
|
142
142
|
constructor() {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
x(this, "prefix", null);
|
|
144
|
+
x(this, "addPrefix", (a) => {
|
|
145
145
|
this.prefix = a;
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -204,48 +204,56 @@ const VxetableRender = (VXETable, {
|
|
|
204
204
|
label: t = "label",
|
|
205
205
|
value: d = "value"
|
|
206
206
|
} = Z, {
|
|
207
|
-
loading:
|
|
208
|
-
multiple:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
loading: m = !1,
|
|
208
|
+
multiple: f,
|
|
209
|
+
isOptionsColumn: b,
|
|
210
|
+
optionsColumnField: p
|
|
211
|
+
} = i, s = useComponent(), M = f ? `_${r.field}` : r.field;
|
|
212
|
+
s.setDefaultValue(i, h, r.field);
|
|
213
|
+
function n(V) {
|
|
214
|
+
s.remote(V, r.field, l);
|
|
213
215
|
}
|
|
214
|
-
function
|
|
215
|
-
|
|
216
|
+
function C(V) {
|
|
217
|
+
s.selectChange(V, h, r.field, l, {
|
|
216
218
|
column: r,
|
|
217
219
|
datasource: "row"
|
|
218
220
|
});
|
|
219
221
|
}
|
|
220
|
-
function V
|
|
221
|
-
c != null && c.input && c.input(a,
|
|
222
|
+
function w(V) {
|
|
223
|
+
c != null && c.input && c.input(a, V);
|
|
222
224
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
225
|
+
function k() {
|
|
226
|
+
s.clear(h, r.field, l, "row");
|
|
225
227
|
}
|
|
226
|
-
function
|
|
227
|
-
!e.length &&
|
|
228
|
+
function I() {
|
|
229
|
+
!e.length && n(""), c != null && c.focus && c.focus(a, r.field);
|
|
228
230
|
}
|
|
229
231
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
230
232
|
modelValue: h[M],
|
|
231
|
-
"onUpdate:modelValue": (
|
|
233
|
+
"onUpdate:modelValue": (V) => h[M] = V,
|
|
232
234
|
filterable: !0,
|
|
233
235
|
remote: !0,
|
|
234
236
|
clearable: !0,
|
|
235
237
|
placeholder: "请录入关键字搜索",
|
|
236
238
|
style: "width: 100%",
|
|
237
|
-
"remote-method":
|
|
238
|
-
loading:
|
|
239
|
+
"remote-method": n,
|
|
240
|
+
loading: m
|
|
239
241
|
}, i, {
|
|
240
|
-
onFocus: () =>
|
|
241
|
-
onChange: (
|
|
242
|
-
onClear: () =>
|
|
243
|
-
onInput: (
|
|
244
|
-
}), _isSlot(o = e.map((
|
|
245
|
-
key:
|
|
246
|
-
label:
|
|
247
|
-
value:
|
|
248
|
-
},
|
|
242
|
+
onFocus: () => I(),
|
|
243
|
+
onChange: (V) => C(V),
|
|
244
|
+
onClear: () => k(),
|
|
245
|
+
onInput: (V) => w(V)
|
|
246
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
247
|
+
key: V[d],
|
|
248
|
+
label: V[t],
|
|
249
|
+
value: V[d]
|
|
250
|
+
}, {
|
|
251
|
+
default: () => [b ? createVNode(Fragment, null, [createVNode("span", {
|
|
252
|
+
style: "float: left"
|
|
253
|
+
}, [createTextVNode(" "), V[t], createTextVNode(" ")]), createVNode("span", {
|
|
254
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
255
|
+
}, [V[p] || V[d] || null])]) : null]
|
|
256
|
+
}))) ? o : {
|
|
249
257
|
default: () => [o]
|
|
250
258
|
})];
|
|
251
259
|
},
|
|
@@ -263,48 +271,56 @@ const VxetableRender = (VXETable, {
|
|
|
263
271
|
label: t = "label",
|
|
264
272
|
value: d = "value"
|
|
265
273
|
} = Z, {
|
|
266
|
-
loading:
|
|
267
|
-
multiple:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
loading: m = !1,
|
|
275
|
+
multiple: f,
|
|
276
|
+
isOptionsColumn: b,
|
|
277
|
+
optionsColumnField: p
|
|
278
|
+
} = i, s = useComponent(), M = f ? `_${r.field}` : r.field;
|
|
279
|
+
s.setDefaultValue(i, h, r.field);
|
|
280
|
+
function n(V) {
|
|
281
|
+
s.remote(V, r.field, l);
|
|
272
282
|
}
|
|
273
|
-
function
|
|
274
|
-
|
|
283
|
+
function C(V) {
|
|
284
|
+
s.selectChange(V, h, r.field, l, {
|
|
275
285
|
column: r,
|
|
276
286
|
datasource: "row"
|
|
277
287
|
});
|
|
278
288
|
}
|
|
279
|
-
function V
|
|
280
|
-
c != null && c.input && c.input(a,
|
|
289
|
+
function w(V) {
|
|
290
|
+
c != null && c.input && c.input(a, V);
|
|
281
291
|
}
|
|
282
|
-
function
|
|
283
|
-
|
|
292
|
+
function k() {
|
|
293
|
+
s.clear(h, r.field, l, "row");
|
|
284
294
|
}
|
|
285
|
-
function
|
|
286
|
-
!e.length &&
|
|
295
|
+
function I() {
|
|
296
|
+
!e.length && n(""), c != null && c.focus && c.focus(a, r.field);
|
|
287
297
|
}
|
|
288
298
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
289
299
|
modelValue: h[M],
|
|
290
|
-
"onUpdate:modelValue": (
|
|
300
|
+
"onUpdate:modelValue": (V) => h[M] = V,
|
|
291
301
|
filterable: !0,
|
|
292
302
|
remote: !0,
|
|
293
303
|
clearable: !0,
|
|
294
304
|
placeholder: "请录入关键字搜索",
|
|
295
305
|
style: "width: 100%",
|
|
296
|
-
"remote-method":
|
|
297
|
-
loading:
|
|
306
|
+
"remote-method": n,
|
|
307
|
+
loading: m
|
|
298
308
|
}, i, {
|
|
299
|
-
onFocus: () =>
|
|
300
|
-
onChange: (
|
|
301
|
-
onClear: () =>
|
|
302
|
-
onInput: (
|
|
303
|
-
}), _isSlot(o = e.map((
|
|
304
|
-
key:
|
|
305
|
-
label:
|
|
306
|
-
value:
|
|
307
|
-
},
|
|
309
|
+
onFocus: () => I(),
|
|
310
|
+
onChange: (V) => C(V),
|
|
311
|
+
onClear: () => k(),
|
|
312
|
+
onInput: (V) => w(V)
|
|
313
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
314
|
+
key: V[d],
|
|
315
|
+
label: V[t],
|
|
316
|
+
value: V[d]
|
|
317
|
+
}, {
|
|
318
|
+
default: () => [b ? createVNode(Fragment, null, [createVNode("span", {
|
|
319
|
+
style: "float: left"
|
|
320
|
+
}, [createTextVNode(" "), V[t], createTextVNode(" ")]), createVNode("span", {
|
|
321
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
322
|
+
}, [V[p] || V[d] || null])]) : null]
|
|
323
|
+
}))) ? o : {
|
|
308
324
|
default: () => [o]
|
|
309
325
|
})];
|
|
310
326
|
},
|
|
@@ -336,47 +352,55 @@ const VxetableRender = (VXETable, {
|
|
|
336
352
|
label: t = "label",
|
|
337
353
|
value: d = "value"
|
|
338
354
|
} = Z, {
|
|
339
|
-
multiple:
|
|
340
|
-
loading:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
355
|
+
multiple: m,
|
|
356
|
+
loading: f = !1,
|
|
357
|
+
isOptionsColumn: b,
|
|
358
|
+
optionsColumnField: p
|
|
359
|
+
} = i, s = useComponent(), M = m ? `_${r}` : r;
|
|
360
|
+
s.setDefaultValue(i, h, r);
|
|
361
|
+
async function n(V) {
|
|
362
|
+
s.remote(V, r, l);
|
|
345
363
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
364
|
+
function C(V) {
|
|
365
|
+
s.selectChange(V, h, r, l, {
|
|
348
366
|
datasource: "data"
|
|
349
367
|
});
|
|
350
368
|
}
|
|
351
|
-
function V
|
|
352
|
-
c != null && c.input && c.input(a,
|
|
369
|
+
function w(V) {
|
|
370
|
+
c != null && c.input && c.input(a, V);
|
|
353
371
|
}
|
|
354
|
-
function
|
|
355
|
-
|
|
372
|
+
function k() {
|
|
373
|
+
s.clear(h, r, l, "data");
|
|
356
374
|
}
|
|
357
|
-
function
|
|
358
|
-
!e.length &&
|
|
375
|
+
function I() {
|
|
376
|
+
!e.length && n(""), c != null && c.focus && c.focus(a);
|
|
359
377
|
}
|
|
360
378
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
361
379
|
modelValue: h[M],
|
|
362
|
-
"onUpdate:modelValue": (
|
|
380
|
+
"onUpdate:modelValue": (V) => h[M] = V,
|
|
363
381
|
filterable: !0,
|
|
364
382
|
remote: !0,
|
|
365
383
|
clearable: !0,
|
|
366
384
|
style: "width: 100%",
|
|
367
385
|
placeholder: "请录入关键字搜索",
|
|
368
|
-
loading:
|
|
369
|
-
"remote-method":
|
|
386
|
+
loading: f,
|
|
387
|
+
"remote-method": n
|
|
370
388
|
}, i, {
|
|
371
|
-
onFocus: () =>
|
|
372
|
-
onChange: (
|
|
373
|
-
onClear: () =>
|
|
374
|
-
onInput: () =>
|
|
375
|
-
}), _isSlot(o = e.map((
|
|
376
|
-
key:
|
|
377
|
-
label:
|
|
378
|
-
value:
|
|
379
|
-
},
|
|
389
|
+
onFocus: () => I(),
|
|
390
|
+
onChange: (V) => C(V),
|
|
391
|
+
onClear: () => k(),
|
|
392
|
+
onInput: () => w()
|
|
393
|
+
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
394
|
+
key: V[d],
|
|
395
|
+
label: V[t],
|
|
396
|
+
value: V[d]
|
|
397
|
+
}, {
|
|
398
|
+
default: () => [b ? createVNode(Fragment, null, [createVNode("span", {
|
|
399
|
+
style: "float: left"
|
|
400
|
+
}, [createTextVNode(" "), V[t], createTextVNode(" ")]), createVNode("span", {
|
|
401
|
+
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
402
|
+
}, [V[p] || V[d] || null])]) : null]
|
|
403
|
+
}))) ? o : {
|
|
380
404
|
default: () => [o]
|
|
381
405
|
})];
|
|
382
406
|
}
|
|
@@ -437,39 +461,39 @@ const VxetableRender = (VXETable, {
|
|
|
437
461
|
value: t = "value"
|
|
438
462
|
} = Z, {
|
|
439
463
|
multiple: d,
|
|
440
|
-
isOptionsColumn:
|
|
441
|
-
optionsColumnField:
|
|
442
|
-
} = i,
|
|
443
|
-
|
|
444
|
-
function
|
|
445
|
-
|
|
464
|
+
isOptionsColumn: m,
|
|
465
|
+
optionsColumnField: f
|
|
466
|
+
} = i, b = useComponent(), p = d ? `_${r.field}` : r.field;
|
|
467
|
+
b.setDefaultValue(i, h, r.field);
|
|
468
|
+
function s(n) {
|
|
469
|
+
b.selectChange(n, h, r.field, l, {
|
|
446
470
|
column: r,
|
|
447
471
|
datasource: "row"
|
|
448
472
|
});
|
|
449
473
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
474
|
+
function M() {
|
|
475
|
+
b.clear(h, r.field, l, "row");
|
|
452
476
|
}
|
|
453
477
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
454
|
-
modelValue: h[
|
|
455
|
-
"onUpdate:modelValue": (
|
|
478
|
+
modelValue: h[p],
|
|
479
|
+
"onUpdate:modelValue": (n) => h[p] = n,
|
|
456
480
|
filterable: !0,
|
|
457
481
|
clearable: !0
|
|
458
482
|
}, i, {
|
|
459
483
|
style: "width: 100%",
|
|
460
484
|
class: "udp-select-wrapper",
|
|
461
|
-
onChange: (
|
|
462
|
-
onClear: () =>
|
|
463
|
-
}), _isSlot(o = e.map((
|
|
464
|
-
key:
|
|
465
|
-
label:
|
|
466
|
-
value:
|
|
485
|
+
onChange: (n) => s(n),
|
|
486
|
+
onClear: () => M()
|
|
487
|
+
}), _isSlot(o = e.map((n) => createVNode(resolveComponent("el-option"), {
|
|
488
|
+
key: n[t],
|
|
489
|
+
label: n[c],
|
|
490
|
+
value: n[t]
|
|
467
491
|
}, {
|
|
468
|
-
default: () => [
|
|
492
|
+
default: () => [m ? createVNode(Fragment, null, [createVNode("span", {
|
|
469
493
|
style: "float: left"
|
|
470
|
-
}, [createTextVNode(" "),
|
|
494
|
+
}, [createTextVNode(" "), n[c], createTextVNode(" ")]), createVNode("span", {
|
|
471
495
|
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
472
|
-
}, [
|
|
496
|
+
}, [n[f] || n[t] || null])]) : null]
|
|
473
497
|
}))) ? o : {
|
|
474
498
|
default: () => [o]
|
|
475
499
|
})];
|
|
@@ -488,39 +512,39 @@ const VxetableRender = (VXETable, {
|
|
|
488
512
|
value: t = "value",
|
|
489
513
|
extLabel: d
|
|
490
514
|
} = Z, {
|
|
491
|
-
multiple:
|
|
492
|
-
isOptionsColumn:
|
|
493
|
-
optionsColumnField:
|
|
494
|
-
} = i,
|
|
495
|
-
|
|
496
|
-
function
|
|
497
|
-
|
|
515
|
+
multiple: m,
|
|
516
|
+
isOptionsColumn: f,
|
|
517
|
+
optionsColumnField: b
|
|
518
|
+
} = i, p = useComponent(), s = m ? `_${r.field}` : r.field;
|
|
519
|
+
p.setDefaultValue(i, h, r.field);
|
|
520
|
+
function M(C) {
|
|
521
|
+
p.selectChange(C, h, r.field, l, {
|
|
498
522
|
column: r,
|
|
499
523
|
datasource: "row"
|
|
500
524
|
});
|
|
501
525
|
}
|
|
502
|
-
function
|
|
503
|
-
|
|
526
|
+
function n() {
|
|
527
|
+
p.clear(h, r.field, l, "row");
|
|
504
528
|
}
|
|
505
529
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
506
|
-
modelValue: h[
|
|
507
|
-
"onUpdate:modelValue": (
|
|
530
|
+
modelValue: h[s],
|
|
531
|
+
"onUpdate:modelValue": (C) => h[s] = C,
|
|
508
532
|
filterable: !0,
|
|
509
533
|
clearable: !0
|
|
510
534
|
}, i, {
|
|
511
535
|
style: "width: 100%",
|
|
512
|
-
onChange: (
|
|
513
|
-
onClear: () =>
|
|
514
|
-
}), _isSlot(o = e.map((
|
|
515
|
-
key:
|
|
516
|
-
label: d &&
|
|
517
|
-
value:
|
|
536
|
+
onChange: (C) => M(C),
|
|
537
|
+
onClear: () => n()
|
|
538
|
+
}), _isSlot(o = e.map((C) => createVNode(resolveComponent("el-option"), {
|
|
539
|
+
key: C[t],
|
|
540
|
+
label: d && C[d] ? C[t] : C[c],
|
|
541
|
+
value: C[t]
|
|
518
542
|
}, {
|
|
519
|
-
default: () => [
|
|
543
|
+
default: () => [f ? createVNode(Fragment, null, [createVNode("span", {
|
|
520
544
|
style: "float: left"
|
|
521
|
-
}, [createTextVNode(" "),
|
|
545
|
+
}, [createTextVNode(" "), C[c], createTextVNode(" ")]), createVNode("span", {
|
|
522
546
|
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
523
|
-
}, [
|
|
547
|
+
}, [C[b] || C[t] || null])]) : null]
|
|
524
548
|
}))) ? o : {
|
|
525
549
|
default: () => [o]
|
|
526
550
|
})];
|
|
@@ -558,38 +582,38 @@ const VxetableRender = (VXETable, {
|
|
|
558
582
|
label: c = "label",
|
|
559
583
|
value: t = "value"
|
|
560
584
|
} = Z, d = useComponent(), {
|
|
561
|
-
multiple:
|
|
562
|
-
isOptionsColumn:
|
|
563
|
-
optionsColumnField:
|
|
564
|
-
} = i,
|
|
565
|
-
|
|
566
|
-
function
|
|
567
|
-
d.selectChange(
|
|
585
|
+
multiple: m,
|
|
586
|
+
isOptionsColumn: f,
|
|
587
|
+
optionsColumnField: b
|
|
588
|
+
} = i, p = m ? `_${r}` : r;
|
|
589
|
+
m && d.setDefaultValue(i, h, r);
|
|
590
|
+
function s(n) {
|
|
591
|
+
d.selectChange(n, h, r, l, {
|
|
568
592
|
datasource: "data"
|
|
569
593
|
});
|
|
570
594
|
}
|
|
571
|
-
function
|
|
595
|
+
function M() {
|
|
572
596
|
d.clear(h, r, l, "data");
|
|
573
597
|
}
|
|
574
598
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
575
|
-
modelValue: h[
|
|
576
|
-
"onUpdate:modelValue": (
|
|
599
|
+
modelValue: h[p],
|
|
600
|
+
"onUpdate:modelValue": (n) => h[p] = n,
|
|
577
601
|
filterable: !0,
|
|
578
602
|
clearable: !0,
|
|
579
603
|
style: "width: 100%"
|
|
580
604
|
}, i, {
|
|
581
|
-
onChange: (
|
|
582
|
-
onClear: () =>
|
|
583
|
-
}), _isSlot(o = e.map((
|
|
584
|
-
key:
|
|
585
|
-
label:
|
|
586
|
-
value:
|
|
605
|
+
onChange: (n) => s(n),
|
|
606
|
+
onClear: () => M()
|
|
607
|
+
}), _isSlot(o = e.map((n) => createVNode(resolveComponent("el-option"), {
|
|
608
|
+
key: n[t],
|
|
609
|
+
label: n[c],
|
|
610
|
+
value: n[t]
|
|
587
611
|
}, {
|
|
588
|
-
default: () => [
|
|
612
|
+
default: () => [f ? createVNode(Fragment, null, [createVNode("span", {
|
|
589
613
|
style: "float: left"
|
|
590
|
-
}, [createTextVNode(" "),
|
|
614
|
+
}, [createTextVNode(" "), n[c], createTextVNode(" ")]), createVNode("span", {
|
|
591
615
|
style: " float: right; color: var(--el-text-color-secondary); font-size: 13px"
|
|
592
|
-
}, [
|
|
616
|
+
}, [n[b] || n[t] || null])]) : null]
|
|
593
617
|
}))) ? o : {
|
|
594
618
|
default: () => [o]
|
|
595
619
|
})];
|
|
@@ -606,36 +630,36 @@ const VxetableRender = (VXETable, {
|
|
|
606
630
|
defaultValues: Z
|
|
607
631
|
} = r;
|
|
608
632
|
Z && (o[h] = Z);
|
|
609
|
-
function c(d,
|
|
633
|
+
function c(d, m) {
|
|
610
634
|
const {
|
|
611
|
-
mapField:
|
|
612
|
-
field:
|
|
613
|
-
displayName:
|
|
614
|
-
multiple:
|
|
635
|
+
mapField: f,
|
|
636
|
+
field: b,
|
|
637
|
+
displayName: p,
|
|
638
|
+
multiple: s
|
|
615
639
|
} = r;
|
|
616
|
-
if (
|
|
617
|
-
if (
|
|
618
|
-
const
|
|
619
|
-
o[
|
|
620
|
-
for (const
|
|
621
|
-
|
|
622
|
-
return
|
|
623
|
-
}, ""), Object.assign(o,
|
|
640
|
+
if (s) {
|
|
641
|
+
if (s) {
|
|
642
|
+
const n = {};
|
|
643
|
+
o[p || b] = d.reduce((C, w) => {
|
|
644
|
+
for (const k in f)
|
|
645
|
+
n[k] = C ? n[k] + "," + w[f[k]] : w[f[k]];
|
|
646
|
+
return C = C ? C + "," + w[p || b] : w[p || b], C;
|
|
647
|
+
}, ""), Object.assign(o, n);
|
|
624
648
|
}
|
|
625
649
|
} else {
|
|
626
|
-
const
|
|
627
|
-
[
|
|
650
|
+
const n = {
|
|
651
|
+
[p || b]: d[m || p || b]
|
|
628
652
|
};
|
|
629
|
-
for (const
|
|
630
|
-
|
|
631
|
-
Object.assign(o,
|
|
653
|
+
for (const C in f)
|
|
654
|
+
n[C] = d[f[C]];
|
|
655
|
+
Object.assign(o, n);
|
|
632
656
|
}
|
|
633
|
-
const
|
|
657
|
+
const M = {
|
|
634
658
|
data: o,
|
|
635
659
|
options: d,
|
|
636
|
-
field:
|
|
660
|
+
field: b
|
|
637
661
|
};
|
|
638
|
-
e != null && e.change && e.change(
|
|
662
|
+
e != null && e.change && e.change(M);
|
|
639
663
|
}
|
|
640
664
|
function t() {
|
|
641
665
|
i.clear(o, h, l, "data");
|
|
@@ -644,7 +668,7 @@ const VxetableRender = (VXETable, {
|
|
|
644
668
|
record: o
|
|
645
669
|
}, r, {
|
|
646
670
|
mode: "vxe",
|
|
647
|
-
onChange: (d,
|
|
671
|
+
onChange: (d, m) => c(d, m),
|
|
648
672
|
onClear: () => t()
|
|
649
673
|
}), null)];
|
|
650
674
|
},
|
|
@@ -659,26 +683,26 @@ const VxetableRender = (VXETable, {
|
|
|
659
683
|
} = l, i = useComponent();
|
|
660
684
|
function Z(t, d) {
|
|
661
685
|
const {
|
|
662
|
-
mapField:
|
|
663
|
-
field:
|
|
664
|
-
displayName:
|
|
665
|
-
multiple:
|
|
686
|
+
mapField: m,
|
|
687
|
+
field: f,
|
|
688
|
+
displayName: b,
|
|
689
|
+
multiple: p
|
|
666
690
|
} = r;
|
|
667
|
-
if (!
|
|
668
|
-
const
|
|
669
|
-
[
|
|
691
|
+
if (!p) {
|
|
692
|
+
const M = {
|
|
693
|
+
[b || f]: t[d || b || f]
|
|
670
694
|
};
|
|
671
|
-
for (const
|
|
672
|
-
|
|
673
|
-
Object.assign(o,
|
|
695
|
+
for (const n in m)
|
|
696
|
+
M[n] = t[m[n]];
|
|
697
|
+
Object.assign(o, M);
|
|
674
698
|
}
|
|
675
|
-
const
|
|
699
|
+
const s = {
|
|
676
700
|
row: o,
|
|
677
701
|
options: t,
|
|
678
702
|
field: h.field,
|
|
679
703
|
column: h
|
|
680
704
|
};
|
|
681
|
-
e != null && e.change && e.change(
|
|
705
|
+
e != null && e.change && e.change(s);
|
|
682
706
|
}
|
|
683
707
|
function c() {
|
|
684
708
|
i.clear(o, h.field, l, "row");
|
|
@@ -703,26 +727,26 @@ const VxetableRender = (VXETable, {
|
|
|
703
727
|
} = l, i = useComponent();
|
|
704
728
|
function Z(t, d) {
|
|
705
729
|
const {
|
|
706
|
-
mapField:
|
|
707
|
-
field:
|
|
708
|
-
displayName:
|
|
709
|
-
multiple:
|
|
730
|
+
mapField: m,
|
|
731
|
+
field: f,
|
|
732
|
+
displayName: b,
|
|
733
|
+
multiple: p
|
|
710
734
|
} = r;
|
|
711
|
-
if (!
|
|
712
|
-
const
|
|
713
|
-
[
|
|
735
|
+
if (!p) {
|
|
736
|
+
const M = {
|
|
737
|
+
[b || f]: t[d || b || f]
|
|
714
738
|
};
|
|
715
|
-
for (const
|
|
716
|
-
|
|
717
|
-
Object.assign(o,
|
|
739
|
+
for (const n in m)
|
|
740
|
+
M[n] = t[m[n]];
|
|
741
|
+
Object.assign(o, M);
|
|
718
742
|
}
|
|
719
|
-
const
|
|
743
|
+
const s = {
|
|
720
744
|
row: o,
|
|
721
745
|
options: t,
|
|
722
746
|
field: h.field,
|
|
723
747
|
column: h
|
|
724
748
|
};
|
|
725
|
-
e != null && e.change && e.change(
|
|
749
|
+
e != null && e.change && e.change(s);
|
|
726
750
|
}
|
|
727
751
|
function c() {
|
|
728
752
|
i.clear(o, h.field, l, "row");
|
|
@@ -1061,8 +1085,8 @@ const VxetableRender = (VXETable, {
|
|
|
1061
1085
|
mapField: d
|
|
1062
1086
|
} = c;
|
|
1063
1087
|
if (r[e] = null, c != null && c.multiple && (r[`_${e}`] = []), !isEmpty(d))
|
|
1064
|
-
for (const
|
|
1065
|
-
r[
|
|
1088
|
+
for (const m in d)
|
|
1089
|
+
r[m] = null;
|
|
1066
1090
|
t != null && t.clear && t.clear({
|
|
1067
1091
|
[Z]: r,
|
|
1068
1092
|
field: e
|
|
@@ -1075,21 +1099,21 @@ const VxetableRender = (VXETable, {
|
|
|
1075
1099
|
events: t
|
|
1076
1100
|
} = i, {
|
|
1077
1101
|
fetchField: d,
|
|
1078
|
-
url:
|
|
1079
|
-
defaultParams:
|
|
1080
|
-
method:
|
|
1081
|
-
} = c,
|
|
1102
|
+
url: m,
|
|
1103
|
+
defaultParams: f = {},
|
|
1104
|
+
method: b = "get"
|
|
1105
|
+
} = c, p = getCookieParam(), s = Object.assign({
|
|
1082
1106
|
pageSize: 20,
|
|
1083
1107
|
pageNum: 1,
|
|
1084
|
-
...
|
|
1085
|
-
...
|
|
1108
|
+
...p,
|
|
1109
|
+
...f
|
|
1086
1110
|
}, {
|
|
1087
1111
|
[d || e]: r
|
|
1088
1112
|
});
|
|
1089
1113
|
if (c.loading) return;
|
|
1090
|
-
let
|
|
1114
|
+
let M;
|
|
1091
1115
|
try {
|
|
1092
|
-
Z.length = 0, c.loading = !0,
|
|
1116
|
+
Z.length = 0, c.loading = !0, M = await serviceApi[b](m, s), t != null && t.filterMethod ? Z.push(...t.filterMethod(M.list || M)) : M && (M.list ? Z.push(...M.list) : Z.push(...M));
|
|
1093
1117
|
} finally {
|
|
1094
1118
|
c.loading = !1;
|
|
1095
1119
|
}
|
|
@@ -1099,29 +1123,29 @@ const VxetableRender = (VXETable, {
|
|
|
1099
1123
|
const {
|
|
1100
1124
|
datasource: d
|
|
1101
1125
|
} = c, {
|
|
1102
|
-
options:
|
|
1103
|
-
props:
|
|
1104
|
-
optionProps:
|
|
1105
|
-
events:
|
|
1106
|
-
} = Z,
|
|
1126
|
+
options: m,
|
|
1127
|
+
props: f,
|
|
1128
|
+
optionProps: b = {},
|
|
1129
|
+
events: p
|
|
1130
|
+
} = Z, s = {
|
|
1107
1131
|
[d]: e,
|
|
1108
1132
|
field: i
|
|
1109
1133
|
};
|
|
1110
|
-
e[i] = null, !isEmpty(r) && (
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
const w =
|
|
1114
|
-
e[
|
|
1115
|
-
}),
|
|
1116
|
-
}), Object.assign(
|
|
1134
|
+
e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), t = [], r.forEach((M) => {
|
|
1135
|
+
const n = m.find((C) => M === C[b == null ? void 0 : b.value]);
|
|
1136
|
+
n && !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((C) => {
|
|
1137
|
+
const w = n[f.mapField[C]], k = e[C] ? e[C].toString() : "";
|
|
1138
|
+
e[C] = k && !k.includes(w) ? `${k},${w}` : w;
|
|
1139
|
+
}), n && t.push(n);
|
|
1140
|
+
}), Object.assign(s, {
|
|
1117
1141
|
options: t
|
|
1118
|
-
})) : (e[i] =
|
|
1119
|
-
e[
|
|
1120
|
-
}), Object.assign(
|
|
1142
|
+
})) : (e[i] = f != null && f.multiple ? null : r, t = m.find((M) => r === M[b == null ? void 0 : b.value]), !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((M) => {
|
|
1143
|
+
e[M] = t ? t[f.mapField[M]] : null;
|
|
1144
|
+
}), Object.assign(s, {
|
|
1121
1145
|
option: t
|
|
1122
|
-
})), d === "row" && Object.assign(
|
|
1146
|
+
})), d === "row" && Object.assign(s, {
|
|
1123
1147
|
column: c.column
|
|
1124
|
-
}),
|
|
1148
|
+
}), p != null && p.change && p.change(s);
|
|
1125
1149
|
},
|
|
1126
1150
|
setDefaultValue: (r, e, i) => {
|
|
1127
1151
|
var d;
|
|
@@ -1129,8 +1153,8 @@ const VxetableRender = (VXETable, {
|
|
|
1129
1153
|
multiple: Z,
|
|
1130
1154
|
defaultValue: c
|
|
1131
1155
|
} = r, t = Z ? `_${i}` : i;
|
|
1132
|
-
!e[i] && c && (e[i] = c, isPlainObject(c) && Object.keys(c).forEach((
|
|
1133
|
-
e[
|
|
1156
|
+
!e[i] && c && (e[i] = c, isPlainObject(c) && Object.keys(c).forEach((f) => {
|
|
1157
|
+
e[f] = e[f] || c[f];
|
|
1134
1158
|
})), !e[t] && e[i] && (e[t] = Z ? (d = e[i]) == null ? void 0 : d.split(",") : e[i]);
|
|
1135
1159
|
}
|
|
1136
1160
|
}), onCheckChange = (l, a, o, h) => {
|
|
@@ -1198,8 +1222,8 @@ function useWatermark(l = ref(document.body)) {
|
|
|
1198
1222
|
const a = useRafThrottle(function() {
|
|
1199
1223
|
const t = unref(l);
|
|
1200
1224
|
if (!t) return;
|
|
1201
|
-
const { clientHeight: d, clientWidth:
|
|
1202
|
-
i({ height: d, width:
|
|
1225
|
+
const { clientHeight: d, clientWidth: m } = t;
|
|
1226
|
+
i({ height: d, width: m });
|
|
1203
1227
|
}), o = domSymbol.toString(), h = shallowRef(), r = () => {
|
|
1204
1228
|
const t = unref(h);
|
|
1205
1229
|
h.value = void 0;
|
|
@@ -1207,10 +1231,10 @@ function useWatermark(l = ref(document.body)) {
|
|
|
1207
1231
|
d && (t && d.removeChild(t), removeResizeListener(d, a));
|
|
1208
1232
|
};
|
|
1209
1233
|
function e(t, d) {
|
|
1210
|
-
const
|
|
1211
|
-
Object.assign(
|
|
1212
|
-
const
|
|
1213
|
-
return
|
|
1234
|
+
const m = document.createElement("canvas"), f = 260, b = 180;
|
|
1235
|
+
Object.assign(m, { width: f, height: b });
|
|
1236
|
+
const p = m.getContext("2d");
|
|
1237
|
+
return p && (p.rotate(-20 * Math.PI / 120), p.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", p.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", p.textAlign = "left", p.textBaseline = "middle", p.fillText(t, f / 20, b)), m.toDataURL("image/png");
|
|
1214
1238
|
}
|
|
1215
1239
|
function i(t = {}) {
|
|
1216
1240
|
const d = unref(h);
|
|
@@ -1222,12 +1246,12 @@ function useWatermark(l = ref(document.body)) {
|
|
|
1222
1246
|
const Z = (t, d) => {
|
|
1223
1247
|
if (unref(h))
|
|
1224
1248
|
return i({ str: t, attr: d }), o;
|
|
1225
|
-
const
|
|
1226
|
-
h.value =
|
|
1227
|
-
const
|
|
1228
|
-
if (!
|
|
1229
|
-
const { clientHeight:
|
|
1230
|
-
return i({ str: t, width:
|
|
1249
|
+
const m = document.createElement("div");
|
|
1250
|
+
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";
|
|
1251
|
+
const f = unref(l);
|
|
1252
|
+
if (!f) return o;
|
|
1253
|
+
const { clientHeight: b, clientWidth: p } = f;
|
|
1254
|
+
return i({ str: t, width: p, height: b, attr: d }), f.appendChild(m), o;
|
|
1231
1255
|
};
|
|
1232
1256
|
function c(t, d) {
|
|
1233
1257
|
Z(t, d), addResizeListener(document.documentElement, a), getCurrentInstance() && onBeforeUnmount(() => {
|
|
@@ -1250,36 +1274,36 @@ function useAttrs(l = {}) {
|
|
|
1250
1274
|
}), r;
|
|
1251
1275
|
}
|
|
1252
1276
|
const i18n = window.$i18n, useRender = () => {
|
|
1253
|
-
const l = { value: "dictCode", label: "dictName" }, a = (v,
|
|
1254
|
-
var
|
|
1255
|
-
const
|
|
1277
|
+
const l = { value: "dictCode", label: "dictName" }, a = (v, u) => {
|
|
1278
|
+
var T;
|
|
1279
|
+
const H = g(u);
|
|
1256
1280
|
let y = {
|
|
1257
1281
|
clearable: !0,
|
|
1258
1282
|
disabled: !1,
|
|
1259
1283
|
showValue: !1,
|
|
1260
1284
|
placeholder: null
|
|
1261
|
-
}, L,
|
|
1262
|
-
isObject(v) ? (y = Object.assign(y, v), L = v.defaultValue,
|
|
1263
|
-
const
|
|
1285
|
+
}, L, S;
|
|
1286
|
+
isObject(v) ? (y = Object.assign(y, v), L = v.defaultValue, S = v == null ? void 0 : v.code) : S = v;
|
|
1287
|
+
const N = (T = storageLocal.getItem("kLov")[S]) == null ? void 0 : T.children, D = N ? N.filter((E) => E.enabled === "1") : [];
|
|
1264
1288
|
return {
|
|
1265
1289
|
name: "#select",
|
|
1266
1290
|
optionProps: l,
|
|
1267
|
-
options:
|
|
1291
|
+
options: D,
|
|
1268
1292
|
props: y,
|
|
1269
1293
|
defaultValue: L,
|
|
1270
|
-
events:
|
|
1294
|
+
events: H
|
|
1271
1295
|
};
|
|
1272
|
-
}, o = (v,
|
|
1273
|
-
const
|
|
1296
|
+
}, o = (v, u) => {
|
|
1297
|
+
const H = g(u);
|
|
1274
1298
|
return {
|
|
1275
1299
|
name: "#SuSelect",
|
|
1276
1300
|
optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
|
|
1277
1301
|
props: v == null ? void 0 : v.props,
|
|
1278
1302
|
options: (v == null ? void 0 : v.options) || [],
|
|
1279
|
-
events:
|
|
1303
|
+
events: H
|
|
1280
1304
|
};
|
|
1281
|
-
}, h = (v,
|
|
1282
|
-
const
|
|
1305
|
+
}, h = (v, u) => {
|
|
1306
|
+
const H = {
|
|
1283
1307
|
optionProps: { extLabel: "userName", value: "employeeName" },
|
|
1284
1308
|
props: {
|
|
1285
1309
|
attrs: { disabled: v == null ? void 0 : v.disabled },
|
|
@@ -1290,9 +1314,9 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1290
1314
|
fetchField: "employeeName"
|
|
1291
1315
|
}
|
|
1292
1316
|
};
|
|
1293
|
-
return o(
|
|
1317
|
+
return o(H, u);
|
|
1294
1318
|
}, r = (v) => {
|
|
1295
|
-
const
|
|
1319
|
+
const u = {
|
|
1296
1320
|
optionProps: { label: "userName", value: "userName" },
|
|
1297
1321
|
props: {
|
|
1298
1322
|
code: "sys/listUsers",
|
|
@@ -1301,9 +1325,9 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1301
1325
|
mapField: v == null ? void 0 : v.mapField
|
|
1302
1326
|
}
|
|
1303
1327
|
};
|
|
1304
|
-
return o(
|
|
1305
|
-
}, e = (v,
|
|
1306
|
-
const
|
|
1328
|
+
return o(u);
|
|
1329
|
+
}, e = (v, u) => {
|
|
1330
|
+
const H = {
|
|
1307
1331
|
label: "organizationName",
|
|
1308
1332
|
value: (v == null ? void 0 : v.field) || "organizationName"
|
|
1309
1333
|
}, y = {
|
|
@@ -1319,12 +1343,12 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1319
1343
|
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
|
|
1320
1344
|
name: "#SuSelect",
|
|
1321
1345
|
props: y,
|
|
1322
|
-
optionProps:
|
|
1346
|
+
optionProps: H,
|
|
1323
1347
|
options: [],
|
|
1324
|
-
events: g(
|
|
1348
|
+
events: g(u)
|
|
1325
1349
|
};
|
|
1326
|
-
}, i = (v,
|
|
1327
|
-
const
|
|
1350
|
+
}, i = (v, u) => {
|
|
1351
|
+
const H = {
|
|
1328
1352
|
label: "orgName",
|
|
1329
1353
|
value: (v == null ? void 0 : v.field) || "orgName"
|
|
1330
1354
|
}, y = {
|
|
@@ -1337,46 +1361,46 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1337
1361
|
return Object.assign(y.mapField, L, (v == null ? void 0 : v.mapField) || {}), {
|
|
1338
1362
|
name: "#SuSelect",
|
|
1339
1363
|
props: y,
|
|
1340
|
-
optionProps:
|
|
1364
|
+
optionProps: H,
|
|
1341
1365
|
options: [],
|
|
1342
|
-
events: g(
|
|
1366
|
+
events: g(u)
|
|
1343
1367
|
};
|
|
1344
|
-
}, Z = (v,
|
|
1345
|
-
const
|
|
1368
|
+
}, Z = (v, u) => {
|
|
1369
|
+
const H = Object.assign({ disabled: !1 }, v), y = H == null ? void 0 : H.defaultValue;
|
|
1346
1370
|
return {
|
|
1347
1371
|
name: "VxeInput",
|
|
1348
|
-
props:
|
|
1372
|
+
props: H,
|
|
1349
1373
|
defaultValue: y,
|
|
1350
|
-
events: g(
|
|
1374
|
+
events: g(u)
|
|
1351
1375
|
};
|
|
1352
|
-
}, c = (v,
|
|
1353
|
-
const
|
|
1376
|
+
}, c = (v, u) => {
|
|
1377
|
+
const H = Object.assign({ disabled: !1, rows: 3 }, v), y = H == null ? void 0 : H.defaultValue;
|
|
1354
1378
|
return {
|
|
1355
1379
|
name: "VxeTextarea",
|
|
1356
|
-
props:
|
|
1380
|
+
props: H,
|
|
1357
1381
|
defaultValue: y,
|
|
1358
|
-
events: g(
|
|
1382
|
+
events: g(u)
|
|
1359
1383
|
};
|
|
1360
|
-
}, t = (v,
|
|
1361
|
-
const
|
|
1362
|
-
return { name:
|
|
1363
|
-
}, d = (v,
|
|
1364
|
-
const
|
|
1365
|
-
return { name:
|
|
1366
|
-
},
|
|
1367
|
-
var
|
|
1368
|
-
let
|
|
1384
|
+
}, t = (v, u) => {
|
|
1385
|
+
const H = "VxeCheckboxGroup", { defaultValue: y, options: L, props: S } = m(v);
|
|
1386
|
+
return { name: H, defaultValue: y, options: L, props: S, events: g(u) };
|
|
1387
|
+
}, d = (v, u) => {
|
|
1388
|
+
const H = "VxeRadioGroup", { defaultValue: y, options: L, props: S } = m(v);
|
|
1389
|
+
return { name: H, defaultValue: y, options: L, props: S, events: g(u) };
|
|
1390
|
+
}, m = (v) => {
|
|
1391
|
+
var N;
|
|
1392
|
+
let u = { disabled: !1 }, H;
|
|
1369
1393
|
const y = storageLocal.getItem("kLov");
|
|
1370
1394
|
let L = "";
|
|
1371
|
-
isObject(v) ? (
|
|
1372
|
-
const
|
|
1395
|
+
isObject(v) ? (H = v.defaultValue, L = v.code, v.options ? u = Object.assign(u, v.props || {}) : u = Object.assign(u, v || {})) : isString(v) && (L = v);
|
|
1396
|
+
const S = L ? (N = y[L]) == null ? void 0 : N.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
|
|
1373
1397
|
return {
|
|
1374
|
-
props:
|
|
1375
|
-
defaultValue:
|
|
1376
|
-
options: isObject(v) && v.options ? v.options :
|
|
1398
|
+
props: u,
|
|
1399
|
+
defaultValue: H,
|
|
1400
|
+
options: isObject(v) && v.options ? v.options : S
|
|
1377
1401
|
};
|
|
1378
|
-
},
|
|
1379
|
-
const
|
|
1402
|
+
}, f = (v, u) => {
|
|
1403
|
+
const H = g(u);
|
|
1380
1404
|
return {
|
|
1381
1405
|
name: "VxeNumberInput",
|
|
1382
1406
|
props: Object.assign(
|
|
@@ -1384,13 +1408,13 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1384
1408
|
v || {}
|
|
1385
1409
|
),
|
|
1386
1410
|
defaultValue: v == null ? void 0 : v.defaultValue,
|
|
1387
|
-
events:
|
|
1411
|
+
events: H
|
|
1388
1412
|
};
|
|
1389
|
-
},
|
|
1390
|
-
const
|
|
1391
|
-
return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: y, clearable: !0 }, v || {}), defaultValue: L, events:
|
|
1392
|
-
},
|
|
1393
|
-
const
|
|
1413
|
+
}, b = (v, u) => {
|
|
1414
|
+
const H = g(u), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.defaultValue;
|
|
1415
|
+
return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: y, clearable: !0 }, v || {}), defaultValue: L, events: H };
|
|
1416
|
+
}, p = (v, u) => {
|
|
1417
|
+
const H = g(u), y = "yyyy-MM-dd HH:mm:ss", L = v == null ? void 0 : v.startValue, S = v == null ? void 0 : v.endValue, N = v == null ? void 0 : v.startField, D = v == null ? void 0 : v.endField, T = {
|
|
1394
1418
|
type: "date",
|
|
1395
1419
|
valueFormat: y,
|
|
1396
1420
|
clearable: !0,
|
|
@@ -1427,21 +1451,21 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1427
1451
|
}
|
|
1428
1452
|
]
|
|
1429
1453
|
}
|
|
1430
|
-
}, E = Object.assign(
|
|
1454
|
+
}, E = Object.assign(T, v || {});
|
|
1431
1455
|
return {
|
|
1432
1456
|
name: "VxeDateRangePicker",
|
|
1433
|
-
startField:
|
|
1434
|
-
endField:
|
|
1457
|
+
startField: N,
|
|
1458
|
+
endField: D,
|
|
1435
1459
|
startValue: L,
|
|
1436
|
-
endValue:
|
|
1460
|
+
endValue: S,
|
|
1437
1461
|
props: E,
|
|
1438
|
-
events:
|
|
1462
|
+
events: H
|
|
1439
1463
|
};
|
|
1440
|
-
},
|
|
1441
|
-
const
|
|
1442
|
-
return { name: "#lov", props: Object.assign({}, v || {}), events:
|
|
1443
|
-
},
|
|
1444
|
-
const
|
|
1464
|
+
}, s = (v, u) => {
|
|
1465
|
+
const H = g(u);
|
|
1466
|
+
return { name: "#lov", props: Object.assign({}, v || {}), events: H };
|
|
1467
|
+
}, M = (v, u) => {
|
|
1468
|
+
const H = g(u), y = (v == null ? void 0 : v.optionProps) || {
|
|
1445
1469
|
label: "label",
|
|
1446
1470
|
value: "value"
|
|
1447
1471
|
}, L = Object.assign(
|
|
@@ -1453,59 +1477,59 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1453
1477
|
optionProps: y,
|
|
1454
1478
|
options: (v == null ? void 0 : v.options) || [],
|
|
1455
1479
|
props: L,
|
|
1456
|
-
events:
|
|
1480
|
+
events: H
|
|
1457
1481
|
};
|
|
1458
|
-
},
|
|
1459
|
-
let
|
|
1482
|
+
}, n = (v, u) => {
|
|
1483
|
+
let H = {
|
|
1460
1484
|
openLabel: "是",
|
|
1461
1485
|
closeLabel: "否",
|
|
1462
1486
|
openValue: "Y",
|
|
1463
1487
|
closeValue: "N"
|
|
1464
1488
|
}, y = "Y";
|
|
1465
|
-
isObject(v) && !isFunction(v) ? (
|
|
1466
|
-
const L = isFunction(v) ? g(v) : g(
|
|
1467
|
-
return { name: "VxeSwitch", props:
|
|
1468
|
-
},
|
|
1469
|
-
const
|
|
1489
|
+
isObject(v) && !isFunction(v) ? (H = Object.assign(H, v || {}), y = v.defaultValue || y) : !isEmpty(v) && isString(v) && (y = v, H = Object.assign(H, { defaultValue: y }));
|
|
1490
|
+
const L = isFunction(v) ? g(v) : g(u);
|
|
1491
|
+
return { name: "VxeSwitch", props: H, defaultValue: y, events: L };
|
|
1492
|
+
}, C = (v, u) => ({ name: "#tag", props: { code: v, tagMap: u } }), w = (v, u) => {
|
|
1493
|
+
const H = {
|
|
1470
1494
|
openLabel: "启用",
|
|
1471
1495
|
closeLabel: "禁用",
|
|
1472
1496
|
openValue: "1",
|
|
1473
1497
|
closeValue: "0",
|
|
1474
1498
|
defaultValue: "1"
|
|
1475
1499
|
};
|
|
1476
|
-
!isFunction(v) && isObject(v) && Object.assign(
|
|
1477
|
-
const y = isFunction(v) ? v :
|
|
1478
|
-
return
|
|
1479
|
-
},
|
|
1480
|
-
const
|
|
1500
|
+
!isFunction(v) && isObject(v) && Object.assign(H, v);
|
|
1501
|
+
const y = isFunction(v) ? v : u;
|
|
1502
|
+
return n(H, y);
|
|
1503
|
+
}, k = () => ({ name: "#iconSelect" }), I = (v = [], u = {}, H) => ({ name: "#treeSelect", sourceData: v, props: u, events: H }), V = (v, u) => {
|
|
1504
|
+
const H = g(u);
|
|
1481
1505
|
return {
|
|
1482
1506
|
name: "#area",
|
|
1483
1507
|
props: { mapField: (v == null ? void 0 : v.mapField) || ["province", "city", "region"] },
|
|
1484
|
-
events:
|
|
1508
|
+
events: H
|
|
1485
1509
|
};
|
|
1486
1510
|
}, g = (v) => {
|
|
1487
|
-
let
|
|
1488
|
-
return isObject(v) && !isFunction(v) ?
|
|
1489
|
-
change: (v == null ? void 0 : v.change) ||
|
|
1490
|
-
blur: (v == null ? void 0 : v.blur) ||
|
|
1491
|
-
focus: (v == null ? void 0 : v.focus) ||
|
|
1492
|
-
input: (v == null ? void 0 : v.input) ||
|
|
1493
|
-
clear: (v == null ? void 0 : v.clear) ||
|
|
1511
|
+
let u = {};
|
|
1512
|
+
return isObject(v) && !isFunction(v) ? u = {
|
|
1513
|
+
change: (v == null ? void 0 : v.change) || F,
|
|
1514
|
+
blur: (v == null ? void 0 : v.blur) || F,
|
|
1515
|
+
focus: (v == null ? void 0 : v.focus) || F,
|
|
1516
|
+
input: (v == null ? void 0 : v.input) || F,
|
|
1517
|
+
clear: (v == null ? void 0 : v.clear) || F,
|
|
1494
1518
|
searchClick: v == null ? void 0 : v.searchClick,
|
|
1495
1519
|
suffixClick: v == null ? void 0 : v.suffixClick,
|
|
1496
1520
|
prefixClick: v == null ? void 0 : v.prefixClick,
|
|
1497
1521
|
filterMethod: v == null ? void 0 : v.filterMethod
|
|
1498
|
-
} : v && (
|
|
1499
|
-
},
|
|
1522
|
+
} : v && (u = { change: v }), u;
|
|
1523
|
+
}, R = (v, u) => {
|
|
1500
1524
|
v = v || { fieldType: "string", mode: "image" };
|
|
1501
|
-
const { singleMode:
|
|
1502
|
-
return
|
|
1525
|
+
const { singleMode: H, mode: y } = v;
|
|
1526
|
+
return H && Object.assign(v, {
|
|
1503
1527
|
multiple: !1,
|
|
1504
1528
|
limitCount: 1,
|
|
1505
1529
|
autoHiddenButton: !0
|
|
1506
|
-
}), y === "image" && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events:
|
|
1530
|
+
}), y === "image" && (v.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: v, events: u };
|
|
1507
1531
|
};
|
|
1508
|
-
function
|
|
1532
|
+
function F() {
|
|
1509
1533
|
}
|
|
1510
1534
|
return {
|
|
1511
1535
|
renderDict: a,
|
|
@@ -1518,18 +1542,18 @@ const i18n = window.$i18n, useRender = () => {
|
|
|
1518
1542
|
renderSysUser: r,
|
|
1519
1543
|
renderInvOrg: e,
|
|
1520
1544
|
renderBU: i,
|
|
1521
|
-
renderNumber:
|
|
1522
|
-
renderLov:
|
|
1523
|
-
renderSelectLocal:
|
|
1524
|
-
renderDate:
|
|
1525
|
-
renderRangeDate:
|
|
1526
|
-
renderSwitch:
|
|
1527
|
-
renderCellTag:
|
|
1545
|
+
renderNumber: f,
|
|
1546
|
+
renderLov: s,
|
|
1547
|
+
renderSelectLocal: M,
|
|
1548
|
+
renderDate: b,
|
|
1549
|
+
renderRangeDate: p,
|
|
1550
|
+
renderSwitch: n,
|
|
1551
|
+
renderCellTag: C,
|
|
1528
1552
|
renderEnabled: w,
|
|
1529
|
-
renderIconSelect:
|
|
1530
|
-
renderTreeSelect:
|
|
1531
|
-
renderArea:
|
|
1532
|
-
renderUpload:
|
|
1553
|
+
renderIconSelect: k,
|
|
1554
|
+
renderTreeSelect: I,
|
|
1555
|
+
renderArea: V,
|
|
1556
|
+
renderUpload: R
|
|
1533
1557
|
};
|
|
1534
1558
|
}, useGlobal = () => {
|
|
1535
1559
|
const l = getCurrentInstance();
|
|
@@ -1640,10 +1664,10 @@ const deviceDetection = () => {
|
|
|
1640
1664
|
collapseTagsTooltip: !0,
|
|
1641
1665
|
multiple: !0
|
|
1642
1666
|
}, Z = o.map((t, d) => {
|
|
1643
|
-
var
|
|
1644
|
-
return t.folding = r ? e && d > 1 : e && 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 || (
|
|
1667
|
+
var m, f, b;
|
|
1668
|
+
return t.folding = r ? e && d > 1 : e && 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 || (f = (m = t.itemRender) == null ? void 0 : m.props) != null && f.multiple) && (t.itemRender.props = Object.assign(
|
|
1645
1669
|
i,
|
|
1646
|
-
((
|
|
1670
|
+
((b = t.itemRender) == null ? void 0 : b.props) || {}
|
|
1647
1671
|
)), t;
|
|
1648
1672
|
}), c = clone(formSearchButtons, !0);
|
|
1649
1673
|
if (c.collapseNode = e, a && c.itemRender.options.length < 3 && (c.itemRender.options.push(a), c.itemRender.events = a.events), e) {
|
|
@@ -1750,9 +1774,9 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1750
1774
|
}
|
|
1751
1775
|
}, A = class A {
|
|
1752
1776
|
constructor() {
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1777
|
+
x(this, "router");
|
|
1778
|
+
x(this, "baseUrl", null);
|
|
1779
|
+
x(this, "getNetworkError", (a) => a ? {
|
|
1756
1780
|
400: "错误的请求",
|
|
1757
1781
|
401: "服务未授权,请重新登录",
|
|
1758
1782
|
403: "拒绝访问",
|
|
@@ -1856,12 +1880,12 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1856
1880
|
errorMessage(t, { duration: 8e3 }), Z(t);
|
|
1857
1881
|
}
|
|
1858
1882
|
}).catch((c) => {
|
|
1859
|
-
var t, d,
|
|
1883
|
+
var t, d, m;
|
|
1860
1884
|
if (c != null && c.code) {
|
|
1861
1885
|
if (((t = c == null ? void 0 : c.response) == null ? void 0 : t.status) === 401)
|
|
1862
1886
|
return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
|
|
1863
1887
|
errorMessage(
|
|
1864
|
-
this.getNetworkError((
|
|
1888
|
+
this.getNetworkError((m = c == null ? void 0 : c.response) == null ? void 0 : m.status) || (c == null ? void 0 : c.message),
|
|
1865
1889
|
{ duration: 8e3 }
|
|
1866
1890
|
);
|
|
1867
1891
|
}
|
|
@@ -1892,10 +1916,10 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1892
1916
|
}
|
|
1893
1917
|
};
|
|
1894
1918
|
/** token过期后,暂存待执行的请求 */
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1919
|
+
x(A, "requests", []), /** 防止重复刷新token */
|
|
1920
|
+
x(A, "isRefreshing", !1), // 初始化配置对象
|
|
1921
|
+
x(A, "initConfig", {}), // 保存当前Axios实例对象
|
|
1922
|
+
x(A, "axiosInstance", Axios.create(defaultConfig));
|
|
1899
1923
|
let SuHttp = A;
|
|
1900
1924
|
const http = new SuHttp(), lunarCalendar = {
|
|
1901
1925
|
/**
|
|
@@ -2704,49 +2728,49 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2704
2728
|
for (Z = 1900; Z < 2101 && d > 0; Z++)
|
|
2705
2729
|
t = this.lYearDays(Z), d -= t;
|
|
2706
2730
|
d < 0 && (d += t, Z--);
|
|
2707
|
-
const
|
|
2708
|
-
let
|
|
2709
|
-
|
|
2710
|
-
let
|
|
2711
|
-
const
|
|
2712
|
-
|
|
2713
|
-
const
|
|
2731
|
+
const m = /* @__PURE__ */ new Date();
|
|
2732
|
+
let f = !1;
|
|
2733
|
+
m.getFullYear() === h && m.getMonth() + 1 === r && m.getDate() === e && (f = !0);
|
|
2734
|
+
let b = i.getDay();
|
|
2735
|
+
const p = this.nStr1[b];
|
|
2736
|
+
b === 0 && (b = 7);
|
|
2737
|
+
const s = Z;
|
|
2714
2738
|
c = this.leapMonth(Z);
|
|
2715
|
-
let
|
|
2739
|
+
let M = !1;
|
|
2716
2740
|
for (Z = 1; Z < 13 && d > 0; Z++)
|
|
2717
|
-
c > 0 && Z === c + 1 &&
|
|
2718
|
-
d === 0 && c > 0 && Z === c + 1 && (
|
|
2719
|
-
const
|
|
2741
|
+
c > 0 && Z === c + 1 && M === !1 ? (--Z, M = !0, t = this.leapDays(s)) : t = this.monthDays(s, Z), M === !0 && Z === c + 1 && (M = !1), d -= t;
|
|
2742
|
+
d === 0 && c > 0 && Z === c + 1 && (M ? M = !1 : (M = !0, --Z)), d < 0 && (d += t, --Z);
|
|
2743
|
+
const n = Z, C = d + 1, w = r - 1, k = this.toGanZhiYear(s), I = this.getTerm(h, r * 2 - 1), V = this.getTerm(h, r * 2);
|
|
2720
2744
|
let g = this.toGanZhi((h - 1900) * 12 + r + 11);
|
|
2721
|
-
e >=
|
|
2722
|
-
let
|
|
2723
|
-
|
|
2724
|
-
const v = Date.UTC(h, w, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10,
|
|
2725
|
-
let
|
|
2726
|
-
return
|
|
2745
|
+
e >= I && (g = this.toGanZhi((h - 1900) * 12 + r + 12));
|
|
2746
|
+
let R = !1, F;
|
|
2747
|
+
I === e && (R = !0, F = this.solarTerm[r * 2 - 2]), V === e && (R = !0, F = this.solarTerm[r * 2 - 1]);
|
|
2748
|
+
const v = Date.UTC(h, w, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, u = this.toGanZhi(v + e - 1), H = this.toAstro(r, e), y = h + "-" + r + "-" + e, L = s + "-" + n + "-" + C, S = this.festival, N = this.lFestival, D = r + "-" + e;
|
|
2749
|
+
let T = n + "-" + C;
|
|
2750
|
+
return n === 12 && C === 29 && this.monthDays(s, n) === 29 && (T = "12-30"), {
|
|
2727
2751
|
date: y,
|
|
2728
2752
|
lunarDate: L,
|
|
2729
|
-
festival:
|
|
2730
|
-
lunarFestival:
|
|
2731
|
-
lYear:
|
|
2732
|
-
lMonth:
|
|
2733
|
-
lDay:
|
|
2734
|
-
Animal: this.getAnimal(
|
|
2735
|
-
IMonthCn: (
|
|
2736
|
-
IDayCn: this.toChinaDay(
|
|
2753
|
+
festival: S[D] ? S[D].title : null,
|
|
2754
|
+
lunarFestival: N[T] ? N[T].title : null,
|
|
2755
|
+
lYear: s,
|
|
2756
|
+
lMonth: n,
|
|
2757
|
+
lDay: C,
|
|
2758
|
+
Animal: this.getAnimal(s),
|
|
2759
|
+
IMonthCn: (M ? "闰" : "") + this.toChinaMonth(n),
|
|
2760
|
+
IDayCn: this.toChinaDay(C),
|
|
2737
2761
|
cYear: h,
|
|
2738
2762
|
cMonth: r,
|
|
2739
2763
|
cDay: e,
|
|
2740
|
-
gzYear:
|
|
2764
|
+
gzYear: k,
|
|
2741
2765
|
gzMonth: g,
|
|
2742
|
-
gzDay:
|
|
2743
|
-
isToday:
|
|
2744
|
-
isLeap:
|
|
2745
|
-
nWeek:
|
|
2746
|
-
ncWeek: "星期" +
|
|
2747
|
-
isTerm:
|
|
2748
|
-
Term:
|
|
2749
|
-
astro:
|
|
2766
|
+
gzDay: u,
|
|
2767
|
+
isToday: f,
|
|
2768
|
+
isLeap: M,
|
|
2769
|
+
nWeek: b,
|
|
2770
|
+
ncWeek: "星期" + p,
|
|
2771
|
+
isTerm: R,
|
|
2772
|
+
Term: F,
|
|
2773
|
+
astro: H
|
|
2750
2774
|
};
|
|
2751
2775
|
},
|
|
2752
2776
|
/**
|
|
@@ -2775,8 +2799,8 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2775
2799
|
for (c = 1; c < a; c++)
|
|
2776
2800
|
t = this.leapMonth(l), d || t <= c && t > 0 && (Z += this.leapDays(l), d = !0), Z += this.monthDays(l, c);
|
|
2777
2801
|
h && (Z += e);
|
|
2778
|
-
const
|
|
2779
|
-
return this.solar2lunar(
|
|
2802
|
+
const m = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((Z + o - 31) * 864e5 + m), b = f.getUTCFullYear(), p = f.getUTCMonth() + 1, s = f.getUTCDate();
|
|
2803
|
+
return this.solar2lunar(b, p, s);
|
|
2780
2804
|
}
|
|
2781
2805
|
}, dict = storageLocal.getItem("kLov"), formats = {
|
|
2782
2806
|
formatDate: {
|