@utogether/utils 3.0.0-beta.20 → 3.0.0-beta.22
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 +480 -439
- package/dist/utils.umd.js +1 -1
- package/package.json +29 -29
package/dist/utils.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
2
|
var j = (a, l, h) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: h }) : a[l] = h;
|
|
3
|
-
var
|
|
3
|
+
var k = (a, l, h) => j(a, typeof l != "symbol" ? l + "" : l, h);
|
|
4
4
|
import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, has } from "xe-utils";
|
|
@@ -12,9 +12,9 @@ import NProgress from "nprogress";
|
|
|
12
12
|
import { default as W } from "nprogress";
|
|
13
13
|
class sessionStorageProxy {
|
|
14
14
|
constructor(l) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
k(this, "storage");
|
|
16
|
+
k(this, "prefix");
|
|
17
|
+
k(this, "addPrefix", (l) => {
|
|
18
18
|
this.prefix = l;
|
|
19
19
|
});
|
|
20
20
|
this.storage = l;
|
|
@@ -46,7 +46,7 @@ class localStorageProxy extends sessionStorageProxy {
|
|
|
46
46
|
}
|
|
47
47
|
class localforageProxy {
|
|
48
48
|
constructor() {
|
|
49
|
-
|
|
49
|
+
k(this, "storage");
|
|
50
50
|
localforage.config({
|
|
51
51
|
name: "uapp",
|
|
52
52
|
storeName: "udb"
|
|
@@ -155,8 +155,8 @@ function init(a, l) {
|
|
|
155
155
|
init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
|
|
156
156
|
class Cookies {
|
|
157
157
|
constructor() {
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
k(this, "prefix", null);
|
|
159
|
+
k(this, "addPrefix", (l) => {
|
|
160
160
|
this.prefix = l;
|
|
161
161
|
});
|
|
162
162
|
}
|
|
@@ -214,54 +214,53 @@ const VxetableRender = (VXETable, {
|
|
|
214
214
|
options: c,
|
|
215
215
|
props: i,
|
|
216
216
|
optionProps: Z = {},
|
|
217
|
-
events:
|
|
217
|
+
events: e
|
|
218
218
|
} = a, {
|
|
219
|
-
label:
|
|
220
|
-
value: d = "value"
|
|
221
|
-
extLabel: f
|
|
219
|
+
label: t = "label",
|
|
220
|
+
value: d = "value"
|
|
222
221
|
} = Z, {
|
|
223
|
-
loading:
|
|
224
|
-
multiple:
|
|
225
|
-
mapField:
|
|
226
|
-
} = i,
|
|
227
|
-
|
|
228
|
-
function
|
|
229
|
-
|
|
222
|
+
loading: f = !1,
|
|
223
|
+
multiple: m,
|
|
224
|
+
mapField: u
|
|
225
|
+
} = i, V = useComponent(), p = m ? `_${r.field}` : r.field;
|
|
226
|
+
V.setDefaultValue(i, o, r.field);
|
|
227
|
+
function n(H) {
|
|
228
|
+
V.remote(H, r.field, a);
|
|
230
229
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
230
|
+
function L(H) {
|
|
231
|
+
V.selectChange(H, data, r.field, a, {
|
|
233
232
|
column: r,
|
|
234
233
|
datasource: "row"
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
236
|
+
function C(H) {
|
|
237
|
+
e != null && e.input && e.input(l, H);
|
|
239
238
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
239
|
+
function A() {
|
|
240
|
+
V.clear(o, r.field, u, e, "row");
|
|
242
241
|
}
|
|
243
|
-
function
|
|
244
|
-
!c.length &&
|
|
242
|
+
function w() {
|
|
243
|
+
!c.length && n(""), e != null && e.focus && e.focus(l, r.field);
|
|
245
244
|
}
|
|
246
245
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
247
|
-
modelValue: o[
|
|
248
|
-
"onUpdate:modelValue": (
|
|
246
|
+
modelValue: o[p],
|
|
247
|
+
"onUpdate:modelValue": (H) => o[p] = H,
|
|
249
248
|
filterable: !0,
|
|
250
249
|
remote: !0,
|
|
251
250
|
clearable: !0,
|
|
252
251
|
placeholder: "请录入关键字搜索",
|
|
253
252
|
style: "width: 100%",
|
|
254
|
-
"remote-method":
|
|
255
|
-
loading:
|
|
253
|
+
"remote-method": n,
|
|
254
|
+
loading: f
|
|
256
255
|
}, i, {
|
|
257
|
-
onFocus: () =>
|
|
258
|
-
onChange: (
|
|
259
|
-
onClear: () =>
|
|
260
|
-
onInput: (
|
|
261
|
-
}), _isSlot(h = c.map((
|
|
262
|
-
key:
|
|
263
|
-
label:
|
|
264
|
-
value:
|
|
256
|
+
onFocus: () => w(),
|
|
257
|
+
onChange: (H) => L(H),
|
|
258
|
+
onClear: () => A(),
|
|
259
|
+
onInput: (H) => C(H)
|
|
260
|
+
}), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
|
|
261
|
+
key: H[d],
|
|
262
|
+
label: H[t],
|
|
263
|
+
value: H[d]
|
|
265
264
|
}, null))) ? h : {
|
|
266
265
|
default: () => [h]
|
|
267
266
|
})];
|
|
@@ -284,59 +283,57 @@ const VxetableRender = (VXETable, {
|
|
|
284
283
|
let h;
|
|
285
284
|
const {
|
|
286
285
|
data: o,
|
|
287
|
-
|
|
288
|
-
field: c
|
|
286
|
+
field: r
|
|
289
287
|
} = l, {
|
|
290
|
-
options:
|
|
291
|
-
props:
|
|
292
|
-
optionProps:
|
|
293
|
-
events:
|
|
288
|
+
options: c,
|
|
289
|
+
props: i,
|
|
290
|
+
optionProps: Z = {},
|
|
291
|
+
events: e
|
|
294
292
|
} = a, {
|
|
295
|
-
label:
|
|
296
|
-
value:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
n
|
|
304
|
-
|
|
305
|
-
n.remote(e, c, a);
|
|
293
|
+
label: t = "label",
|
|
294
|
+
value: d = "value"
|
|
295
|
+
} = Z, {
|
|
296
|
+
mapField: f,
|
|
297
|
+
multiple: m,
|
|
298
|
+
loading: u = !1
|
|
299
|
+
} = i, V = useComponent(), p = m ? `_${r}` : r;
|
|
300
|
+
V.setDefaultValue(i, o, r);
|
|
301
|
+
async function n(H) {
|
|
302
|
+
V.remote(H, r, a);
|
|
306
303
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
304
|
+
function L(H) {
|
|
305
|
+
V.selectChange(H, o, r, a, {
|
|
309
306
|
datasource: "data"
|
|
310
307
|
});
|
|
311
308
|
}
|
|
312
|
-
function
|
|
313
|
-
|
|
309
|
+
function C(H) {
|
|
310
|
+
e != null && e.input && e.input(l, H);
|
|
314
311
|
}
|
|
315
|
-
function
|
|
316
|
-
|
|
312
|
+
function A() {
|
|
313
|
+
V.clear(o, r, f, e, "data");
|
|
317
314
|
}
|
|
318
|
-
function
|
|
319
|
-
!
|
|
315
|
+
function w() {
|
|
316
|
+
!c.length && n(""), e != null && e.focus && e.focus(l);
|
|
320
317
|
}
|
|
321
318
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
322
|
-
modelValue: o[
|
|
323
|
-
"onUpdate:modelValue": (
|
|
319
|
+
modelValue: o[p],
|
|
320
|
+
"onUpdate:modelValue": (H) => o[p] = H,
|
|
324
321
|
filterable: !0,
|
|
325
322
|
remote: !0,
|
|
326
323
|
clearable: !0,
|
|
327
324
|
style: "width: 100%",
|
|
328
325
|
placeholder: "请录入关键字搜索",
|
|
329
|
-
loading:
|
|
330
|
-
"remote-method":
|
|
331
|
-
},
|
|
332
|
-
onFocus: () =>
|
|
333
|
-
onChange: (
|
|
334
|
-
onClear: () =>
|
|
335
|
-
onInput: () =>
|
|
336
|
-
}), _isSlot(h =
|
|
337
|
-
key:
|
|
338
|
-
label:
|
|
339
|
-
value:
|
|
326
|
+
loading: u,
|
|
327
|
+
"remote-method": n
|
|
328
|
+
}, i, {
|
|
329
|
+
onFocus: () => w(),
|
|
330
|
+
onChange: (H) => L(H),
|
|
331
|
+
onClear: () => A(),
|
|
332
|
+
onInput: () => C()
|
|
333
|
+
}), _isSlot(h = c.map((H) => createVNode(resolveComponent("el-option"), {
|
|
334
|
+
key: H[d],
|
|
335
|
+
label: H[t],
|
|
336
|
+
value: H[d]
|
|
340
337
|
}, null))) ? h : {
|
|
341
338
|
default: () => [h]
|
|
342
339
|
})];
|
|
@@ -371,10 +368,10 @@ const VxetableRender = (VXETable, {
|
|
|
371
368
|
}, {
|
|
372
369
|
text: i18n("message.udp.anniversary", !0),
|
|
373
370
|
value: () => [Z(1, "year"), c]
|
|
374
|
-
}], Z = (
|
|
371
|
+
}], Z = (e, t) => dayjs().subtract(e, t).add("1", "day").format();
|
|
375
372
|
return [createVNode(resolveComponent("el-date-picker"), mergeProps({
|
|
376
373
|
modelValue: h[o],
|
|
377
|
-
"onUpdate:modelValue": (
|
|
374
|
+
"onUpdate:modelValue": (e) => h[o] = e,
|
|
378
375
|
type: (r == null ? void 0 : r.type) || "daterange",
|
|
379
376
|
shortcuts: i,
|
|
380
377
|
style: "width: 100%",
|
|
@@ -393,28 +390,77 @@ const VxetableRender = (VXETable, {
|
|
|
393
390
|
options: c,
|
|
394
391
|
props: i,
|
|
395
392
|
optionProps: Z = {},
|
|
396
|
-
events:
|
|
393
|
+
events: e
|
|
394
|
+
} = a, {
|
|
395
|
+
label: t = "label",
|
|
396
|
+
value: d = "value",
|
|
397
|
+
extLabel: f
|
|
398
|
+
} = Z, {
|
|
399
|
+
mapField: m
|
|
400
|
+
} = i, u = useComponent();
|
|
401
|
+
i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
|
|
402
|
+
!c.some((C) => C[t] === n) && c.push({
|
|
403
|
+
[d]: n,
|
|
404
|
+
[t]: n
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
function V(n) {
|
|
408
|
+
u.selectChange(n, o, r.field, a, {
|
|
409
|
+
column: r,
|
|
410
|
+
datasource: "row"
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
function p() {
|
|
414
|
+
u.clear(o, r.field, m, e, "row");
|
|
415
|
+
}
|
|
416
|
+
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
417
|
+
modelValue: o[r.field],
|
|
418
|
+
"onUpdate:modelValue": (n) => o[r.field] = n,
|
|
419
|
+
filterable: !0,
|
|
420
|
+
clearable: !0
|
|
421
|
+
}, i, {
|
|
422
|
+
style: "width: 100%",
|
|
423
|
+
onChange: (n) => V(n),
|
|
424
|
+
onClear: () => p()
|
|
425
|
+
}), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
|
|
426
|
+
key: n[d],
|
|
427
|
+
label: f && n[f] ? n[d] : n[t],
|
|
428
|
+
value: n[d]
|
|
429
|
+
}, null))) ? h : {
|
|
430
|
+
default: () => [h]
|
|
431
|
+
})];
|
|
432
|
+
},
|
|
433
|
+
renderTableDefault(a, l) {
|
|
434
|
+
let h;
|
|
435
|
+
const {
|
|
436
|
+
row: o,
|
|
437
|
+
column: r
|
|
438
|
+
} = l, {
|
|
439
|
+
options: c,
|
|
440
|
+
props: i,
|
|
441
|
+
optionProps: Z = {},
|
|
442
|
+
events: e
|
|
397
443
|
} = a, {
|
|
398
|
-
label:
|
|
444
|
+
label: t = "label",
|
|
399
445
|
value: d = "value",
|
|
400
446
|
extLabel: f
|
|
401
447
|
} = Z, {
|
|
402
448
|
mapField: m
|
|
403
|
-
} = i,
|
|
449
|
+
} = i, u = useComponent();
|
|
404
450
|
i.multiple && o[r.field] && !isArray(o[r.field]) && o[r.field].split(",").forEach((n) => {
|
|
405
|
-
!c.some((C) => C[
|
|
451
|
+
!c.some((C) => C[t] === n) && c.push({
|
|
406
452
|
[d]: n,
|
|
407
|
-
[
|
|
453
|
+
[t]: n
|
|
408
454
|
});
|
|
409
455
|
});
|
|
410
|
-
function
|
|
411
|
-
|
|
456
|
+
function V(n) {
|
|
457
|
+
u.selectChange(n, o, r.field, a, {
|
|
412
458
|
column: r,
|
|
413
459
|
datasource: "row"
|
|
414
460
|
});
|
|
415
461
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
462
|
+
function p() {
|
|
463
|
+
u.clear(o, r.field, m, e, "row");
|
|
418
464
|
}
|
|
419
465
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
420
466
|
modelValue: o[r.field],
|
|
@@ -423,11 +469,11 @@ const VxetableRender = (VXETable, {
|
|
|
423
469
|
clearable: !0
|
|
424
470
|
}, i, {
|
|
425
471
|
style: "width: 100%",
|
|
426
|
-
onChange: (n) =>
|
|
427
|
-
onClear: () =>
|
|
472
|
+
onChange: (n) => V(n),
|
|
473
|
+
onClear: () => p()
|
|
428
474
|
}), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
|
|
429
475
|
key: n[d],
|
|
430
|
-
label: f && n[f] ? n[d] : n[
|
|
476
|
+
label: f && n[f] ? n[d] : n[t],
|
|
431
477
|
value: n[d]
|
|
432
478
|
}, null))) ? h : {
|
|
433
479
|
default: () => [h]
|
|
@@ -457,42 +503,41 @@ const VxetableRender = (VXETable, {
|
|
|
457
503
|
let h;
|
|
458
504
|
const {
|
|
459
505
|
data: o,
|
|
460
|
-
|
|
461
|
-
field: c
|
|
506
|
+
field: r
|
|
462
507
|
} = l, {
|
|
463
|
-
options:
|
|
464
|
-
props:
|
|
465
|
-
optionProps:
|
|
466
|
-
events:
|
|
508
|
+
options: c,
|
|
509
|
+
props: i,
|
|
510
|
+
optionProps: Z = {},
|
|
511
|
+
events: e
|
|
467
512
|
} = a, {
|
|
468
|
-
label:
|
|
469
|
-
value:
|
|
470
|
-
} =
|
|
471
|
-
defaultValues:
|
|
472
|
-
mapField:
|
|
473
|
-
} =
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
|
|
513
|
+
label: t = "label",
|
|
514
|
+
value: d = "value"
|
|
515
|
+
} = Z, f = useComponent(), {
|
|
516
|
+
defaultValues: m,
|
|
517
|
+
mapField: u
|
|
518
|
+
} = i;
|
|
519
|
+
m && (o[r] = m);
|
|
520
|
+
function V(n) {
|
|
521
|
+
f.selectChange(n, o, r, a, {
|
|
477
522
|
datasource: "data"
|
|
478
523
|
});
|
|
479
524
|
}
|
|
480
|
-
function
|
|
481
|
-
|
|
525
|
+
function p() {
|
|
526
|
+
f.clear(o, r, u, e, "data");
|
|
482
527
|
}
|
|
483
528
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
484
|
-
modelValue: o[
|
|
485
|
-
"onUpdate:modelValue": (
|
|
529
|
+
modelValue: o[r],
|
|
530
|
+
"onUpdate:modelValue": (n) => o[r] = n,
|
|
486
531
|
filterable: !0,
|
|
487
532
|
clearable: !0,
|
|
488
533
|
style: "width: 100%"
|
|
489
|
-
},
|
|
490
|
-
onChange: (
|
|
491
|
-
onClear: () =>
|
|
492
|
-
}), _isSlot(h =
|
|
493
|
-
key:
|
|
494
|
-
label:
|
|
495
|
-
value:
|
|
534
|
+
}, i, {
|
|
535
|
+
onChange: (n) => V(n),
|
|
536
|
+
onClear: () => p()
|
|
537
|
+
}), _isSlot(h = c.map((n) => createVNode(resolveComponent("el-option"), {
|
|
538
|
+
key: n[d],
|
|
539
|
+
label: n[t],
|
|
540
|
+
value: n[d]
|
|
496
541
|
}, null))) ? h : {
|
|
497
542
|
default: () => [h]
|
|
498
543
|
})];
|
|
@@ -507,49 +552,49 @@ const VxetableRender = (VXETable, {
|
|
|
507
552
|
events: c
|
|
508
553
|
} = a, i = useComponent(), {
|
|
509
554
|
defaultValues: Z,
|
|
510
|
-
mapField:
|
|
555
|
+
mapField: e
|
|
511
556
|
} = r;
|
|
512
557
|
Z && (h[o] = Z);
|
|
513
|
-
function
|
|
558
|
+
function t(f, m) {
|
|
514
559
|
const {
|
|
515
|
-
mapField:
|
|
516
|
-
field:
|
|
517
|
-
displayName:
|
|
560
|
+
mapField: u,
|
|
561
|
+
field: V,
|
|
562
|
+
displayName: p,
|
|
518
563
|
multiple: n
|
|
519
564
|
} = r;
|
|
520
565
|
if (n) {
|
|
521
566
|
if (n) {
|
|
522
567
|
const C = {};
|
|
523
|
-
h[
|
|
524
|
-
for (const
|
|
525
|
-
C[
|
|
526
|
-
return
|
|
568
|
+
h[p || V] = f.reduce((A, w) => {
|
|
569
|
+
for (const H in u)
|
|
570
|
+
C[H] = A ? C[H] + "," + w[u[H]] : w[u[H]];
|
|
571
|
+
return A = A ? A + "," + w[p || V] : w[p || V], A;
|
|
527
572
|
}, ""), Object.assign(h, C);
|
|
528
573
|
}
|
|
529
574
|
} else {
|
|
530
575
|
const C = {
|
|
531
|
-
[
|
|
576
|
+
[p || V]: f[m || p || V]
|
|
532
577
|
};
|
|
533
|
-
for (const
|
|
534
|
-
C[
|
|
578
|
+
for (const A in u)
|
|
579
|
+
C[A] = f[u[A]];
|
|
535
580
|
Object.assign(h, C);
|
|
536
581
|
}
|
|
537
|
-
const
|
|
582
|
+
const L = {
|
|
538
583
|
row: h,
|
|
539
|
-
property:
|
|
584
|
+
property: V,
|
|
540
585
|
item: f,
|
|
541
|
-
field:
|
|
586
|
+
field: V
|
|
542
587
|
};
|
|
543
|
-
c != null && c.change && c.change(
|
|
588
|
+
c != null && c.change && c.change(L);
|
|
544
589
|
}
|
|
545
590
|
function d() {
|
|
546
|
-
i.clear(h, o,
|
|
591
|
+
i.clear(h, o, e, c, "data");
|
|
547
592
|
}
|
|
548
593
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
549
594
|
record: h
|
|
550
595
|
}, r, {
|
|
551
596
|
mode: "vxe",
|
|
552
|
-
onChange: (f, m) =>
|
|
597
|
+
onChange: (f, m) => t(f, m),
|
|
553
598
|
onClear: () => d()
|
|
554
599
|
}), null)];
|
|
555
600
|
},
|
|
@@ -562,32 +607,32 @@ const VxetableRender = (VXETable, {
|
|
|
562
607
|
props: r,
|
|
563
608
|
events: c
|
|
564
609
|
} = a, i = useComponent();
|
|
565
|
-
function Z(
|
|
610
|
+
function Z(t, d) {
|
|
566
611
|
const {
|
|
567
612
|
mapField: f,
|
|
568
613
|
field: m,
|
|
569
|
-
displayName:
|
|
570
|
-
multiple:
|
|
614
|
+
displayName: u,
|
|
615
|
+
multiple: V
|
|
571
616
|
} = r;
|
|
572
|
-
if (!
|
|
573
|
-
const
|
|
574
|
-
[
|
|
617
|
+
if (!V) {
|
|
618
|
+
const p = {
|
|
619
|
+
[u || m]: t[d || u || m]
|
|
575
620
|
};
|
|
576
621
|
for (const n in f)
|
|
577
|
-
|
|
578
|
-
Object.assign(h,
|
|
622
|
+
p[n] = t[f[n]];
|
|
623
|
+
Object.assign(h, p);
|
|
579
624
|
}
|
|
580
|
-
c != null && c.change && c.change(l,
|
|
625
|
+
c != null && c.change && c.change(l, t, h[o.field]);
|
|
581
626
|
}
|
|
582
|
-
function
|
|
627
|
+
function e() {
|
|
583
628
|
i.clear(h, field, mapField, c, "row");
|
|
584
629
|
}
|
|
585
630
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
586
|
-
record: h
|
|
631
|
+
record: h,
|
|
632
|
+
mode: "vxe"
|
|
587
633
|
}, r, {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
onClear: () => t()
|
|
634
|
+
onChange: (t, d) => Z(t, d),
|
|
635
|
+
onClear: () => e()
|
|
591
636
|
}), null)];
|
|
592
637
|
},
|
|
593
638
|
// 单元格默认
|
|
@@ -599,32 +644,32 @@ const VxetableRender = (VXETable, {
|
|
|
599
644
|
props: r,
|
|
600
645
|
events: c
|
|
601
646
|
} = a, i = useComponent();
|
|
602
|
-
function Z(
|
|
647
|
+
function Z(t, d) {
|
|
603
648
|
const {
|
|
604
649
|
mapField: f,
|
|
605
650
|
field: m,
|
|
606
|
-
displayName:
|
|
607
|
-
multiple:
|
|
651
|
+
displayName: u,
|
|
652
|
+
multiple: V
|
|
608
653
|
} = r;
|
|
609
|
-
if (!
|
|
610
|
-
const
|
|
611
|
-
[
|
|
654
|
+
if (!V) {
|
|
655
|
+
const p = {
|
|
656
|
+
[u || m]: t[d || u || m]
|
|
612
657
|
};
|
|
613
658
|
for (const n in f)
|
|
614
|
-
|
|
615
|
-
Object.assign(h,
|
|
659
|
+
p[n] = t[f[n]];
|
|
660
|
+
Object.assign(h, p);
|
|
616
661
|
}
|
|
617
|
-
c != null && c.change && c.change(l,
|
|
662
|
+
c != null && c.change && c.change(l, t, h[o.field]);
|
|
618
663
|
}
|
|
619
|
-
function
|
|
664
|
+
function e() {
|
|
620
665
|
i.clear(h, field, mapField, c, "row");
|
|
621
666
|
}
|
|
622
667
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
623
|
-
record: h
|
|
668
|
+
record: h,
|
|
669
|
+
mode: "ele"
|
|
624
670
|
}, r, {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
onClear: () => t()
|
|
671
|
+
onChange: (t, d) => Z(t, d),
|
|
672
|
+
onClear: () => e()
|
|
628
673
|
}), null)];
|
|
629
674
|
},
|
|
630
675
|
// 可编辑显示模板
|
|
@@ -690,24 +735,24 @@ const VxetableRender = (VXETable, {
|
|
|
690
735
|
},
|
|
691
736
|
events: Z
|
|
692
737
|
} = a;
|
|
693
|
-
function t
|
|
738
|
+
function e(t) {
|
|
694
739
|
const d = {
|
|
695
740
|
row: h,
|
|
696
741
|
column: o,
|
|
697
|
-
value:
|
|
742
|
+
value: t
|
|
698
743
|
};
|
|
699
744
|
Z != null && Z.change && Z.change(d);
|
|
700
745
|
}
|
|
701
746
|
return [h[o.field] ? createVNode(resolveComponent("el-switch"), mergeProps({
|
|
702
747
|
modelValue: h[o.field],
|
|
703
|
-
"onUpdate:modelValue": (
|
|
748
|
+
"onUpdate:modelValue": (t) => h[o.field] = t,
|
|
704
749
|
"inline-prompt": !0,
|
|
705
750
|
size: "large",
|
|
706
751
|
style: "--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"
|
|
707
752
|
}, a.props, {
|
|
708
753
|
"active-text": getValue(r, c),
|
|
709
754
|
"inactive-text": getValue(r, i),
|
|
710
|
-
onChange: (
|
|
755
|
+
onChange: (t) => e(t)
|
|
711
756
|
}), null) : null];
|
|
712
757
|
}
|
|
713
758
|
}), VXETable.renderer.add("#iconSelect", {
|
|
@@ -760,9 +805,9 @@ const VxetableRender = (VXETable, {
|
|
|
760
805
|
"check-strictly": !0
|
|
761
806
|
}, r, {
|
|
762
807
|
filterable: !0,
|
|
763
|
-
onCheckChange: (Z,
|
|
764
|
-
onNodeClick: (Z,
|
|
765
|
-
onCurrentChange: (Z,
|
|
808
|
+
onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
|
|
809
|
+
onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
|
|
810
|
+
onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
|
|
766
811
|
}), null)];
|
|
767
812
|
},
|
|
768
813
|
renderTableCell(a, l) {
|
|
@@ -775,10 +820,10 @@ const VxetableRender = (VXETable, {
|
|
|
775
820
|
} = a, {
|
|
776
821
|
children: i = "children",
|
|
777
822
|
label: Z = "label"
|
|
778
|
-
} = c,
|
|
823
|
+
} = c, e = findTree(r, (t) => t.value === h[o.field], {
|
|
779
824
|
children: i
|
|
780
825
|
});
|
|
781
|
-
return
|
|
826
|
+
return e ? [createVNode("span", null, [e.item[Z]])] : null;
|
|
782
827
|
},
|
|
783
828
|
renderItemContent(a, l) {
|
|
784
829
|
const {
|
|
@@ -796,86 +841,86 @@ const VxetableRender = (VXETable, {
|
|
|
796
841
|
"check-strictly": !0
|
|
797
842
|
}, r, {
|
|
798
843
|
filterable: !0,
|
|
799
|
-
onCheckChange: (Z,
|
|
800
|
-
onNodeClick: (Z,
|
|
801
|
-
onCurrentChange: (Z,
|
|
844
|
+
onCheckChange: (Z, e, t) => onCheckChange(Z, e, t, i),
|
|
845
|
+
onNodeClick: (Z, e, t) => onNodeClick(Z, e, t, i),
|
|
846
|
+
onCurrentChange: (Z, e) => onCurrentChange(Z, e, i)
|
|
802
847
|
}), null)];
|
|
803
848
|
}
|
|
804
849
|
});
|
|
805
850
|
const useComponent = () => ({
|
|
806
|
-
clear: (r, c, i, Z,
|
|
851
|
+
clear: (r, c, i, Z, e) => {
|
|
807
852
|
if (r[c] = null, !isEmpty(i))
|
|
808
|
-
for (const
|
|
809
|
-
r[
|
|
853
|
+
for (const t in i)
|
|
854
|
+
r[t] = null;
|
|
810
855
|
Z != null && Z.clear && Z.clear({
|
|
811
|
-
[
|
|
856
|
+
[e]: r,
|
|
812
857
|
field: c
|
|
813
858
|
});
|
|
814
859
|
},
|
|
815
860
|
remote: async (r, c, i) => {
|
|
816
861
|
const {
|
|
817
862
|
options: Z,
|
|
818
|
-
props:
|
|
819
|
-
events:
|
|
863
|
+
props: e,
|
|
864
|
+
events: t
|
|
820
865
|
} = i, {
|
|
821
866
|
fetchField: d,
|
|
822
867
|
url: f,
|
|
823
868
|
defaultParams: m = {},
|
|
824
|
-
method:
|
|
825
|
-
} =
|
|
869
|
+
method: u = "get"
|
|
870
|
+
} = e, V = getCookieParam(), p = Object.assign({
|
|
826
871
|
pageSize: 20,
|
|
827
872
|
pageNum: 1,
|
|
828
|
-
...
|
|
873
|
+
...V,
|
|
829
874
|
...m
|
|
830
875
|
}, {
|
|
831
876
|
[d || c]: r
|
|
832
877
|
});
|
|
833
|
-
if (
|
|
878
|
+
if (e.loading) return;
|
|
834
879
|
let n;
|
|
835
880
|
try {
|
|
836
|
-
Z.length = 0,
|
|
881
|
+
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));
|
|
837
882
|
} finally {
|
|
838
|
-
|
|
883
|
+
e.loading = !1;
|
|
839
884
|
}
|
|
840
885
|
},
|
|
841
|
-
selectChange: (r, c, i, Z,
|
|
842
|
-
let
|
|
886
|
+
selectChange: (r, c, i, Z, e) => {
|
|
887
|
+
let t = null;
|
|
843
888
|
const {
|
|
844
889
|
datasource: d
|
|
845
|
-
} =
|
|
890
|
+
} = e, {
|
|
846
891
|
options: f,
|
|
847
892
|
props: m,
|
|
848
|
-
optionProps:
|
|
849
|
-
events:
|
|
850
|
-
} = Z,
|
|
893
|
+
optionProps: u = {},
|
|
894
|
+
events: V
|
|
895
|
+
} = Z, p = {
|
|
851
896
|
[d]: c,
|
|
852
897
|
field: i
|
|
853
898
|
};
|
|
854
|
-
c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","),
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
c[C] =
|
|
859
|
-
}),
|
|
860
|
-
}), Object.assign(
|
|
861
|
-
options:
|
|
862
|
-
})) : (c[i] = m != null && m.multiple ? null : r,
|
|
863
|
-
c[n] =
|
|
864
|
-
}), Object.assign(
|
|
865
|
-
option:
|
|
866
|
-
})), d === "row" && Object.assign(
|
|
867
|
-
column:
|
|
868
|
-
}),
|
|
899
|
+
c[i] = null, !isEmpty(r) && (m != null && m.multiple) ? (c[i] = r.join(","), t = [], r.forEach((n) => {
|
|
900
|
+
const L = f.find((C) => n === C[u == null ? void 0 : u.value]);
|
|
901
|
+
L && !isEmpty(m.mapField) && isObject(m.mapField) && Object.keys(m.mapField).forEach((C) => {
|
|
902
|
+
const A = L[m.mapField[C]], w = c[C] ? c[C].toString() : "";
|
|
903
|
+
c[C] = w && !w.includes(A) ? `${w},${A}` : A;
|
|
904
|
+
}), L && t.push(L);
|
|
905
|
+
}), Object.assign(p, {
|
|
906
|
+
options: t
|
|
907
|
+
})) : (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) => {
|
|
908
|
+
c[n] = t ? t[m.mapField[n]] : null;
|
|
909
|
+
}), Object.assign(p, {
|
|
910
|
+
option: t
|
|
911
|
+
})), d === "row" && Object.assign(p, {
|
|
912
|
+
column: e.column
|
|
913
|
+
}), V != null && V.change && V.change(p);
|
|
869
914
|
},
|
|
870
915
|
setDefaultValue: (r, c, i) => {
|
|
871
916
|
var d;
|
|
872
917
|
const {
|
|
873
918
|
multiple: Z,
|
|
874
|
-
defaultValue:
|
|
875
|
-
} = r,
|
|
876
|
-
!c[i] &&
|
|
877
|
-
c[m] = c[m] ||
|
|
878
|
-
})), !c[
|
|
919
|
+
defaultValue: e
|
|
920
|
+
} = r, t = Z ? `_${i}` : i;
|
|
921
|
+
!c[i] && e && (c[i] = e, isPlainObject(e) && Object.keys(e).forEach((m) => {
|
|
922
|
+
c[m] = c[m] || e[m];
|
|
923
|
+
})), !c[t] && c[i] && (c[t] = Z ? (d = c[i]) == null ? void 0 : d.split(",") : c[i]);
|
|
879
924
|
}
|
|
880
925
|
}), onCheckChange = (a, l, h, o) => {
|
|
881
926
|
console.log(a, l, h), o != null && o.checkChange && (o == null || o.checkChange(a, l, h));
|
|
@@ -940,45 +985,45 @@ const openLink = (a) => {
|
|
|
940
985
|
}, domSymbol = Symbol("watermark-dom");
|
|
941
986
|
function useWatermark(a = ref(document.body)) {
|
|
942
987
|
const l = useRafThrottle(function() {
|
|
943
|
-
const
|
|
944
|
-
if (!
|
|
945
|
-
const { clientHeight: d, clientWidth: f } =
|
|
988
|
+
const t = unref(a);
|
|
989
|
+
if (!t) return;
|
|
990
|
+
const { clientHeight: d, clientWidth: f } = t;
|
|
946
991
|
i({ height: d, width: f });
|
|
947
992
|
}), h = domSymbol.toString(), o = shallowRef(), r = () => {
|
|
948
|
-
const
|
|
993
|
+
const t = unref(o);
|
|
949
994
|
o.value = void 0;
|
|
950
995
|
const d = unref(a);
|
|
951
|
-
d && (
|
|
996
|
+
d && (t && d.removeChild(t), removeResizeListener(d, l));
|
|
952
997
|
};
|
|
953
|
-
function c(
|
|
954
|
-
const f = document.createElement("canvas"), m = 260,
|
|
955
|
-
Object.assign(f, { width: m, height:
|
|
956
|
-
const
|
|
957
|
-
return
|
|
998
|
+
function c(t, d) {
|
|
999
|
+
const f = document.createElement("canvas"), m = 260, u = 180;
|
|
1000
|
+
Object.assign(f, { width: m, height: u });
|
|
1001
|
+
const V = f.getContext("2d");
|
|
1002
|
+
return V && (V.rotate(-20 * Math.PI / 120), V.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", V.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", V.textAlign = "left", V.textBaseline = "middle", V.fillText(t, m / 20, u)), f.toDataURL("image/png");
|
|
958
1003
|
}
|
|
959
|
-
function i(
|
|
1004
|
+
function i(t = {}) {
|
|
960
1005
|
const d = unref(o);
|
|
961
|
-
d && (isUndefined(
|
|
962
|
-
|
|
963
|
-
|
|
1006
|
+
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(
|
|
1007
|
+
t.str,
|
|
1008
|
+
t.attr
|
|
964
1009
|
)}) left top repeat`));
|
|
965
1010
|
}
|
|
966
|
-
const Z = (
|
|
1011
|
+
const Z = (t, d) => {
|
|
967
1012
|
if (unref(o))
|
|
968
|
-
return i({ str:
|
|
1013
|
+
return i({ str: t, attr: d }), h;
|
|
969
1014
|
const f = document.createElement("div");
|
|
970
1015
|
o.value = f, f.id = h, f.style.pointerEvents = "none", f.style.top = "0px", f.style.left = "0px", f.style.position = "absolute", f.style.zIndex = "100000";
|
|
971
1016
|
const m = unref(a);
|
|
972
1017
|
if (!m) return h;
|
|
973
|
-
const { clientHeight:
|
|
974
|
-
return i({ str:
|
|
1018
|
+
const { clientHeight: u, clientWidth: V } = m;
|
|
1019
|
+
return i({ str: t, width: V, height: u, attr: d }), m.appendChild(f), h;
|
|
975
1020
|
};
|
|
976
|
-
function t
|
|
977
|
-
Z(
|
|
1021
|
+
function e(t, d) {
|
|
1022
|
+
Z(t, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
|
|
978
1023
|
r();
|
|
979
1024
|
});
|
|
980
1025
|
}
|
|
981
|
-
return { setWatermark:
|
|
1026
|
+
return { setWatermark: e, clear: r };
|
|
982
1027
|
}
|
|
983
1028
|
const DEFAULT_EXCLUDE_KEYS = ["class", "style"], LISTENER_PREFIX = /^on[A-Z]/;
|
|
984
1029
|
function entries(a) {
|
|
@@ -989,205 +1034,205 @@ function useAttrs(a = {}) {
|
|
|
989
1034
|
if (!l) return {};
|
|
990
1035
|
const { excludeListeners: h = !1, excludeKeys: o = [] } = a, r = shallowRef({}), c = o.concat(DEFAULT_EXCLUDE_KEYS);
|
|
991
1036
|
return l.attrs = reactive(l.attrs), watchEffect(() => {
|
|
992
|
-
const i = entries(l.attrs).reduce((Z, [
|
|
1037
|
+
const i = entries(l.attrs).reduce((Z, [e, t]) => (!c.includes(e) && !(h && LISTENER_PREFIX.test(e)) && (Z[e] = t), Z), {});
|
|
993
1038
|
r.value = i;
|
|
994
1039
|
}), r;
|
|
995
1040
|
}
|
|
996
1041
|
const useRender = () => {
|
|
997
|
-
const a = { value: "dictCode", label: "dictName" }, l = (
|
|
1042
|
+
const a = { value: "dictCode", label: "dictName" }, l = (v, M) => {
|
|
998
1043
|
var E;
|
|
999
|
-
const
|
|
1000
|
-
let
|
|
1044
|
+
const b = H(M);
|
|
1045
|
+
let s = {
|
|
1001
1046
|
clearable: !0,
|
|
1002
1047
|
disabled: !1,
|
|
1003
1048
|
showValue: !1,
|
|
1004
1049
|
placeholder: null
|
|
1005
|
-
},
|
|
1006
|
-
isObject(
|
|
1007
|
-
const
|
|
1050
|
+
}, y, S;
|
|
1051
|
+
isObject(v) ? (s = Object.assign(s, v), y = v.defaultValue, S = v == null ? void 0 : v.code) : S = v;
|
|
1052
|
+
const x = (E = storageLocal.getItem("kLov")[S]) == null ? void 0 : E.children, D = x ? x.filter((N) => N.enabled === "1") : [];
|
|
1008
1053
|
return {
|
|
1009
1054
|
name: "#select",
|
|
1010
1055
|
optionProps: a,
|
|
1011
1056
|
options: D,
|
|
1012
|
-
props:
|
|
1013
|
-
defaultValue:
|
|
1014
|
-
events:
|
|
1057
|
+
props: s,
|
|
1058
|
+
defaultValue: y,
|
|
1059
|
+
events: b
|
|
1015
1060
|
};
|
|
1016
|
-
}, h = (
|
|
1017
|
-
const
|
|
1061
|
+
}, h = (v, M) => {
|
|
1062
|
+
const b = H(M);
|
|
1018
1063
|
return {
|
|
1019
1064
|
name: "#SuSelect",
|
|
1020
|
-
optionProps: (
|
|
1021
|
-
props:
|
|
1022
|
-
options: (
|
|
1023
|
-
events:
|
|
1065
|
+
optionProps: (v == null ? void 0 : v.optionProps) || { label: "label", value: "value" },
|
|
1066
|
+
props: v == null ? void 0 : v.props,
|
|
1067
|
+
options: (v == null ? void 0 : v.options) || [],
|
|
1068
|
+
events: b
|
|
1024
1069
|
};
|
|
1025
|
-
}, o = (
|
|
1026
|
-
const
|
|
1070
|
+
}, o = (v, M) => {
|
|
1071
|
+
const b = {
|
|
1027
1072
|
optionProps: { extLabel: "userName", value: "employeeName" },
|
|
1028
1073
|
props: {
|
|
1029
|
-
attrs: { disabled:
|
|
1030
|
-
disabled:
|
|
1031
|
-
defaultValue:
|
|
1032
|
-
mapField:
|
|
1074
|
+
attrs: { disabled: v == null ? void 0 : v.disabled },
|
|
1075
|
+
disabled: v == null ? void 0 : v.disabled,
|
|
1076
|
+
defaultValue: v == null ? void 0 : v.defaultValue,
|
|
1077
|
+
mapField: v == null ? void 0 : v.mapField,
|
|
1033
1078
|
code: "SYS037",
|
|
1034
1079
|
url: "/uums/employee/listEmployeeIsUser",
|
|
1035
1080
|
fetchField: "employeeName"
|
|
1036
1081
|
}
|
|
1037
1082
|
};
|
|
1038
|
-
return h(
|
|
1039
|
-
}, r = (
|
|
1040
|
-
const
|
|
1083
|
+
return h(b, M);
|
|
1084
|
+
}, r = (v) => {
|
|
1085
|
+
const M = {
|
|
1041
1086
|
optionProps: { extLabel: "userName", value: "name" },
|
|
1042
1087
|
props: {
|
|
1043
1088
|
code: "sys/listUsers",
|
|
1044
1089
|
url: "/uums/user",
|
|
1045
1090
|
fetchField: "name",
|
|
1046
|
-
mapField:
|
|
1091
|
+
mapField: v == null ? void 0 : v.mapField
|
|
1047
1092
|
}
|
|
1048
1093
|
};
|
|
1049
|
-
return h(
|
|
1050
|
-
}, c = (
|
|
1051
|
-
const
|
|
1094
|
+
return h(M);
|
|
1095
|
+
}, c = (v, M) => {
|
|
1096
|
+
const b = {
|
|
1052
1097
|
label: "organizationName",
|
|
1053
|
-
value: (
|
|
1054
|
-
},
|
|
1098
|
+
value: (v == null ? void 0 : v.field) || "organizationName"
|
|
1099
|
+
}, s = {
|
|
1055
1100
|
mapField: {},
|
|
1056
|
-
defaultParams:
|
|
1101
|
+
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1057
1102
|
url: "/uums/cusOrganization",
|
|
1058
1103
|
fetchField: "organizationName"
|
|
1059
|
-
},
|
|
1104
|
+
}, y = {
|
|
1060
1105
|
organizationId: "id",
|
|
1061
1106
|
organizationCode: "organizationCode"
|
|
1062
1107
|
};
|
|
1063
|
-
return Object.assign(
|
|
1064
|
-
}, i = (
|
|
1065
|
-
const
|
|
1108
|
+
return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
|
|
1109
|
+
}, i = (v, M) => {
|
|
1110
|
+
const b = {
|
|
1066
1111
|
label: "orgName",
|
|
1067
|
-
value: (
|
|
1068
|
-
},
|
|
1112
|
+
value: (v == null ? void 0 : v.field) || "orgName"
|
|
1113
|
+
}, s = {
|
|
1069
1114
|
mapField: {},
|
|
1070
|
-
defaultParams:
|
|
1115
|
+
defaultParams: v == null ? void 0 : v.defaultParams,
|
|
1071
1116
|
url: "/uums/org",
|
|
1072
1117
|
fetchField: "orgName"
|
|
1073
|
-
},
|
|
1074
|
-
return Object.assign(
|
|
1075
|
-
}, Z = (
|
|
1076
|
-
const
|
|
1118
|
+
}, y = { orgId: "id", orgCode: "orgCode" };
|
|
1119
|
+
return Object.assign(s.mapField, y, (v == null ? void 0 : v.mapField) || {}), { name: "#SuSelect", props: s, optionProps: b, options: [], methods: M };
|
|
1120
|
+
}, Z = (v, M) => {
|
|
1121
|
+
const b = Object.assign({ disabled: !1 }, v), s = b == null ? void 0 : b.defaultValue;
|
|
1077
1122
|
return {
|
|
1078
1123
|
name: "VxeInput",
|
|
1079
|
-
props:
|
|
1080
|
-
defaultValue:
|
|
1081
|
-
events:
|
|
1124
|
+
props: b,
|
|
1125
|
+
defaultValue: s,
|
|
1126
|
+
events: H(M)
|
|
1082
1127
|
};
|
|
1083
|
-
},
|
|
1084
|
-
const
|
|
1128
|
+
}, e = (v, M) => {
|
|
1129
|
+
const b = Object.assign({ disabled: !1, rows: 3 }, v), s = b == null ? void 0 : b.defaultValue;
|
|
1085
1130
|
return {
|
|
1086
1131
|
name: "VxeTextarea",
|
|
1087
|
-
props:
|
|
1088
|
-
defaultValue:
|
|
1089
|
-
events:
|
|
1132
|
+
props: b,
|
|
1133
|
+
defaultValue: s,
|
|
1134
|
+
events: H(M)
|
|
1090
1135
|
};
|
|
1091
|
-
},
|
|
1092
|
-
const
|
|
1093
|
-
return { name:
|
|
1094
|
-
}, d = (
|
|
1095
|
-
const
|
|
1096
|
-
return { name:
|
|
1097
|
-
}, f = (
|
|
1098
|
-
var
|
|
1099
|
-
let
|
|
1100
|
-
const
|
|
1101
|
-
let
|
|
1102
|
-
isObject(
|
|
1103
|
-
const
|
|
1104
|
-
return { props:
|
|
1105
|
-
}, m = (
|
|
1106
|
-
const
|
|
1136
|
+
}, t = (v, M) => {
|
|
1137
|
+
const b = "VxeCheckbox", { defaultValue: s, options: y, props: S } = f(v);
|
|
1138
|
+
return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
|
|
1139
|
+
}, d = (v, M) => {
|
|
1140
|
+
const b = "VxeRadio", { defaultValue: s, options: y, props: S } = f(v);
|
|
1141
|
+
return { name: b, defaultValue: s, options: y, props: S, events: H(M) };
|
|
1142
|
+
}, f = (v) => {
|
|
1143
|
+
var x;
|
|
1144
|
+
let M = { disabled: !1 }, b;
|
|
1145
|
+
const s = storageLocal.getItem("kLov");
|
|
1146
|
+
let y = "";
|
|
1147
|
+
isObject(v) ? (b = v.defaultValue, y = v.code, M = Object.assign(M, v || {})) : isString(v) && (y = v);
|
|
1148
|
+
const S = y ? (x = s[y]) == null ? void 0 : x.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
|
|
1149
|
+
return { props: M, defaultValue: b, options: S };
|
|
1150
|
+
}, m = (v, M) => {
|
|
1151
|
+
const b = H(M);
|
|
1107
1152
|
return {
|
|
1108
1153
|
name: "VxeInput",
|
|
1109
1154
|
props: Object.assign(
|
|
1110
1155
|
{ type: "number", clearable: !0, min: 0, controls: !1 },
|
|
1111
|
-
|
|
1156
|
+
v || {}
|
|
1112
1157
|
),
|
|
1113
|
-
defaultValue:
|
|
1114
|
-
events:
|
|
1158
|
+
defaultValue: v == null ? void 0 : v.defaultValue,
|
|
1159
|
+
events: b
|
|
1115
1160
|
};
|
|
1116
|
-
},
|
|
1117
|
-
const
|
|
1118
|
-
return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat:
|
|
1119
|
-
},
|
|
1120
|
-
const
|
|
1121
|
-
return { name: "#lov", props: Object.assign({},
|
|
1122
|
-
},
|
|
1123
|
-
const
|
|
1161
|
+
}, u = (v, M) => {
|
|
1162
|
+
const b = H(M), s = "yyyy-MM-dd HH:mm:ss", y = v == null ? void 0 : v.defaultValue;
|
|
1163
|
+
return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: s, clearable: !0 }, v || {}), defaultValue: y, events: b };
|
|
1164
|
+
}, V = (v, M) => {
|
|
1165
|
+
const b = H(M);
|
|
1166
|
+
return { name: "#lov", props: Object.assign({}, v || {}), events: b };
|
|
1167
|
+
}, p = (v, M) => {
|
|
1168
|
+
const b = H(M), s = (v == null ? void 0 : v.optionProps) || {
|
|
1124
1169
|
label: "label",
|
|
1125
1170
|
value: "value"
|
|
1126
|
-
},
|
|
1171
|
+
}, y = Object.assign(
|
|
1127
1172
|
{ clearable: !0, disabled: !1, showValue: !1 },
|
|
1128
|
-
|
|
1173
|
+
v || {}
|
|
1129
1174
|
);
|
|
1130
1175
|
return console.log("itemRender"), {
|
|
1131
1176
|
name: "#select",
|
|
1132
|
-
optionProps:
|
|
1133
|
-
options: (
|
|
1134
|
-
props:
|
|
1135
|
-
events:
|
|
1177
|
+
optionProps: s,
|
|
1178
|
+
options: (v == null ? void 0 : v.options) || [],
|
|
1179
|
+
props: y,
|
|
1180
|
+
events: b
|
|
1136
1181
|
};
|
|
1137
|
-
}, n = (
|
|
1138
|
-
let
|
|
1182
|
+
}, n = (v, M) => {
|
|
1183
|
+
let b = {
|
|
1139
1184
|
openLabel: "是",
|
|
1140
1185
|
closeLabel: "否",
|
|
1141
1186
|
openValue: "Y",
|
|
1142
1187
|
closeValue: "N"
|
|
1143
|
-
},
|
|
1144
|
-
isObject(
|
|
1145
|
-
const
|
|
1146
|
-
return { name: "VxeSwitch", props:
|
|
1147
|
-
},
|
|
1148
|
-
const
|
|
1188
|
+
}, s = "Y";
|
|
1189
|
+
isObject(v) && !isFunction(v) ? (b = Object.assign(b, v || {}), s = v.defaultValue || s) : !isEmpty(v) && isString(v) && (s = v, b = Object.assign(b, { defaultValue: s }));
|
|
1190
|
+
const y = isFunction(v) ? H(v) : H(M);
|
|
1191
|
+
return { name: "VxeSwitch", props: b, defaultValue: s, events: y };
|
|
1192
|
+
}, L = (v, M) => ({ name: "#tag", props: { code: v, tagMap: M } }), C = (v, M) => {
|
|
1193
|
+
const b = {
|
|
1149
1194
|
openLabel: "启用",
|
|
1150
1195
|
closeLabel: "禁用",
|
|
1151
1196
|
openValue: "1",
|
|
1152
1197
|
closeValue: "0",
|
|
1153
1198
|
defaultValue: "1"
|
|
1154
1199
|
};
|
|
1155
|
-
!isFunction(
|
|
1156
|
-
const
|
|
1157
|
-
return n(
|
|
1158
|
-
},
|
|
1159
|
-
let
|
|
1160
|
-
return isObject(
|
|
1161
|
-
change: (
|
|
1162
|
-
blur: (
|
|
1163
|
-
focus: (
|
|
1164
|
-
input: (
|
|
1165
|
-
clear: (
|
|
1166
|
-
filterMethod:
|
|
1167
|
-
} :
|
|
1200
|
+
!isFunction(v) && isObject(v) && Object.assign(b, v);
|
|
1201
|
+
const s = isFunction(v) ? v : M;
|
|
1202
|
+
return n(b, s);
|
|
1203
|
+
}, A = () => ({ name: "#iconSelect" }), w = (v = [], M = {}, b) => ({ name: "#treeSelect", sourceData: v, props: M, events: b }), H = (v) => {
|
|
1204
|
+
let M = {};
|
|
1205
|
+
return isObject(v) && !isFunction(v) ? M = {
|
|
1206
|
+
change: (v == null ? void 0 : v.change) || I,
|
|
1207
|
+
blur: (v == null ? void 0 : v.blur) || I,
|
|
1208
|
+
focus: (v == null ? void 0 : v.focus) || I,
|
|
1209
|
+
input: (v == null ? void 0 : v.input) || I,
|
|
1210
|
+
clear: (v == null ? void 0 : v.clear) || I,
|
|
1211
|
+
filterMethod: v == null ? void 0 : v.filterMethod
|
|
1212
|
+
} : v && (M = { change: v }), M;
|
|
1168
1213
|
};
|
|
1169
|
-
function
|
|
1214
|
+
function I() {
|
|
1170
1215
|
}
|
|
1171
1216
|
return {
|
|
1172
1217
|
renderDict: l,
|
|
1173
1218
|
renderSelect: h,
|
|
1174
1219
|
renderInput: Z,
|
|
1175
|
-
renderTextarea:
|
|
1176
|
-
renderCheckBox:
|
|
1220
|
+
renderTextarea: e,
|
|
1221
|
+
renderCheckBox: t,
|
|
1177
1222
|
renderRadio: d,
|
|
1178
1223
|
renderUser: o,
|
|
1179
1224
|
renderSysUser: r,
|
|
1180
1225
|
renderInvOrg: c,
|
|
1181
1226
|
renderBU: i,
|
|
1182
1227
|
renderNumber: m,
|
|
1183
|
-
renderLov:
|
|
1184
|
-
renderSelectLocal:
|
|
1185
|
-
renderDate:
|
|
1228
|
+
renderLov: V,
|
|
1229
|
+
renderSelectLocal: p,
|
|
1230
|
+
renderDate: u,
|
|
1186
1231
|
renderSwitch: n,
|
|
1187
|
-
renderCellTag:
|
|
1232
|
+
renderCellTag: L,
|
|
1188
1233
|
renderEnabled: C,
|
|
1189
|
-
renderIconSelect:
|
|
1190
|
-
renderTreeSelect:
|
|
1234
|
+
renderIconSelect: A,
|
|
1235
|
+
renderTreeSelect: w
|
|
1191
1236
|
};
|
|
1192
1237
|
}, useGlobal = () => {
|
|
1193
1238
|
const a = getCurrentInstance();
|
|
@@ -1255,7 +1300,7 @@ const deviceDetection = () => {
|
|
|
1255
1300
|
var i, Z;
|
|
1256
1301
|
o.title = o.title || `message.${o.field}`, o.span = o.span || h;
|
|
1257
1302
|
let r = !1;
|
|
1258
|
-
l === "detail" ? r = !0 : r = o.disabled || ((Z = (i = o.itemRender) == null ? void 0 : i.props) == null ? void 0 : Z.disabled);
|
|
1303
|
+
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);
|
|
1259
1304
|
let c = {
|
|
1260
1305
|
name: "VxeInput",
|
|
1261
1306
|
props: { disabled: r, placeholder: r ? "" : o.placeholder }
|
|
@@ -1288,22 +1333,22 @@ const deviceDetection = () => {
|
|
|
1288
1333
|
events: null
|
|
1289
1334
|
}
|
|
1290
1335
|
}, formatGridItems = (a, l) => {
|
|
1291
|
-
const h = a, o = h.length, r = o > 2 && h.some((
|
|
1336
|
+
const h = a, o = h.length, r = o > 2 && h.some((t, d) => d < 3 && (t.span > 6 || getDateRange(t))), c = r || o > 3, i = {
|
|
1292
1337
|
collapseTags: !0,
|
|
1293
1338
|
collapseTagsTooltip: !0,
|
|
1294
1339
|
multiple: !0
|
|
1295
|
-
}, Z = h.map((
|
|
1296
|
-
var f, m,
|
|
1297
|
-
return
|
|
1340
|
+
}, Z = h.map((t, d) => {
|
|
1341
|
+
var f, m, u;
|
|
1342
|
+
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(
|
|
1298
1343
|
i,
|
|
1299
|
-
((
|
|
1300
|
-
)),
|
|
1301
|
-
}),
|
|
1302
|
-
if (
|
|
1303
|
-
const
|
|
1304
|
-
Z.splice(
|
|
1344
|
+
((u = t.itemRender) == null ? void 0 : u.props) || {}
|
|
1345
|
+
)), t;
|
|
1346
|
+
}), e = clone(formSearchButtons, !0);
|
|
1347
|
+
if (e.collapseNode = c, l && e.itemRender.options.length < 3 && (e.itemRender.options.push(l), e.itemRender.events = l.events), c) {
|
|
1348
|
+
const t = r ? 2 : 3;
|
|
1349
|
+
Z.splice(t, 0, e);
|
|
1305
1350
|
} else
|
|
1306
|
-
Z.push(
|
|
1351
|
+
Z.push(e);
|
|
1307
1352
|
return Z;
|
|
1308
1353
|
}, getDateRange = (a) => {
|
|
1309
1354
|
var l, h, o, r, c;
|
|
@@ -1397,11 +1442,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1397
1442
|
"Content-Type": "application/json",
|
|
1398
1443
|
"X-Requested-With": "XMLHttpRequest"
|
|
1399
1444
|
}
|
|
1400
|
-
},
|
|
1445
|
+
}, g = class g {
|
|
1401
1446
|
constructor() {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1447
|
+
k(this, "router");
|
|
1448
|
+
k(this, "baseUrl", null);
|
|
1449
|
+
k(this, "getNetworkError", (l) => l ? {
|
|
1405
1450
|
400: "错误的请求",
|
|
1406
1451
|
401: "服务未授权,请重新登录",
|
|
1407
1452
|
403: "拒绝访问",
|
|
@@ -1424,29 +1469,25 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1424
1469
|
/** 重连原始请求 */
|
|
1425
1470
|
static retryOriginalRequest(l) {
|
|
1426
1471
|
return new Promise((h) => {
|
|
1427
|
-
|
|
1472
|
+
g.requests.push((o) => {
|
|
1428
1473
|
l.headers.Authorization = "Bearer " + o, h(l);
|
|
1429
1474
|
});
|
|
1430
1475
|
});
|
|
1431
1476
|
}
|
|
1432
1477
|
// 请求拦截
|
|
1433
1478
|
httpInterceptorsRequest() {
|
|
1434
|
-
|
|
1435
|
-
(l) => (has(l, "loading") && isRef(l.loading) && (l.loading.value = !0), NProgress.start(), typeof l.beforeRequestCallback == "function" ? (l.beforeRequestCallback(l), l) :
|
|
1479
|
+
g.axiosInstance.interceptors.request.use(
|
|
1480
|
+
(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) => {
|
|
1436
1481
|
const r = cookies.get(kTOKENKEY);
|
|
1437
1482
|
if (r) {
|
|
1438
1483
|
const c = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
w.isRefreshing = !1;
|
|
1447
|
-
})), o(w.retryOriginalRequest(l));
|
|
1448
|
-
} else
|
|
1449
|
-
l.headers.Authorization = "Bearer " + c.accessToken, o(l);
|
|
1484
|
+
c.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
|
|
1485
|
+
refreshToken: c.refreshToken
|
|
1486
|
+
}).then((e) => {
|
|
1487
|
+
this.setToken(e), l.headers.Authorization = "Bearer " + e.access_token, g.requests.forEach((t) => t(e.access_token)), g.requests = [];
|
|
1488
|
+
}).finally(() => {
|
|
1489
|
+
g.isRefreshing = !1;
|
|
1490
|
+
})), o(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + c.accessToken, o(l));
|
|
1450
1491
|
} else {
|
|
1451
1492
|
const c = cookies.get("kCookies_token");
|
|
1452
1493
|
c && (l.headers["X-Token"] = c), o(l);
|
|
@@ -1465,10 +1506,10 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1465
1506
|
}
|
|
1466
1507
|
// 响应拦截
|
|
1467
1508
|
httpInterceptorsResponse() {
|
|
1468
|
-
|
|
1509
|
+
g.axiosInstance.interceptors.response.use(
|
|
1469
1510
|
(h) => {
|
|
1470
1511
|
const o = h.config;
|
|
1471
|
-
return has(o, "loading") && isRef(o.loading) && (o.loading.value = !1), NProgress.done(), typeof o.beforeResponseCallback == "function" ? (o.beforeResponseCallback(h), h.data) : (
|
|
1512
|
+
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);
|
|
1472
1513
|
},
|
|
1473
1514
|
(h) => {
|
|
1474
1515
|
var r;
|
|
@@ -1492,28 +1533,28 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1492
1533
|
...r
|
|
1493
1534
|
});
|
|
1494
1535
|
return new Promise((i, Z) => {
|
|
1495
|
-
|
|
1496
|
-
if (
|
|
1497
|
-
i(
|
|
1498
|
-
else if (
|
|
1499
|
-
errorMessage(
|
|
1500
|
-
else if ((
|
|
1501
|
-
i(
|
|
1536
|
+
g.axiosInstance.request(c).then((e) => {
|
|
1537
|
+
if (e && (e == null ? void 0 : e.code) === "0")
|
|
1538
|
+
i(e.data);
|
|
1539
|
+
else if (e.code === "500")
|
|
1540
|
+
errorMessage(e.msg, { duration: 8e3 }), c.method === "get" ? i(e) : Z(e.msg);
|
|
1541
|
+
else if ((e == null ? void 0 : e.code) !== "-1")
|
|
1542
|
+
i(e);
|
|
1502
1543
|
else {
|
|
1503
|
-
const
|
|
1504
|
-
errorMessage(
|
|
1544
|
+
const t = (e == null ? void 0 : e.msg) || "服务异常";
|
|
1545
|
+
errorMessage(t, { duration: 8e3 }), Z(t);
|
|
1505
1546
|
}
|
|
1506
|
-
}).catch((
|
|
1507
|
-
var
|
|
1508
|
-
if (
|
|
1509
|
-
if (((
|
|
1547
|
+
}).catch((e) => {
|
|
1548
|
+
var t, d, f;
|
|
1549
|
+
if (e != null && e.code) {
|
|
1550
|
+
if (((t = e == null ? void 0 : e.response) == null ? void 0 : t.status) === 401)
|
|
1510
1551
|
return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
|
|
1511
1552
|
errorMessage(
|
|
1512
|
-
this.getNetworkError((f =
|
|
1553
|
+
this.getNetworkError((f = e == null ? void 0 : e.response) == null ? void 0 : f.status) || (e == null ? void 0 : e.message),
|
|
1513
1554
|
{ duration: 8e3 }
|
|
1514
1555
|
);
|
|
1515
1556
|
}
|
|
1516
|
-
|
|
1557
|
+
e.config.method === "get" ? i(e) : Z(e);
|
|
1517
1558
|
});
|
|
1518
1559
|
});
|
|
1519
1560
|
}
|
|
@@ -1540,11 +1581,11 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1540
1581
|
}
|
|
1541
1582
|
};
|
|
1542
1583
|
/** token过期后,暂存待执行的请求 */
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
let SuHttp =
|
|
1584
|
+
k(g, "requests", []), /** 防止重复刷新token */
|
|
1585
|
+
k(g, "isRefreshing", !1), // 初始化配置对象
|
|
1586
|
+
k(g, "initConfig", {}), // 保存当前Axios实例对象
|
|
1587
|
+
k(g, "axiosInstance", Axios.create(defaultConfig));
|
|
1588
|
+
let SuHttp = g;
|
|
1548
1589
|
const http = new SuHttp(), lunarCalendar = {
|
|
1549
1590
|
/**
|
|
1550
1591
|
* 农历1900-2100的润大小信息表
|
|
@@ -2346,55 +2387,55 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2346
2387
|
return -1;
|
|
2347
2388
|
let i;
|
|
2348
2389
|
o ? i = new Date(o, parseInt(r.toString()) - 1, c) : i = /* @__PURE__ */ new Date();
|
|
2349
|
-
let Z,
|
|
2390
|
+
let Z, e = 0, t = 0;
|
|
2350
2391
|
o = i.getFullYear(), r = i.getMonth() + 1, c = i.getDate();
|
|
2351
2392
|
let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
|
|
2352
2393
|
for (Z = 1900; Z < 2101 && d > 0; Z++)
|
|
2353
|
-
|
|
2354
|
-
d < 0 && (d +=
|
|
2394
|
+
t = this.lYearDays(Z), d -= t;
|
|
2395
|
+
d < 0 && (d += t, Z--);
|
|
2355
2396
|
const f = /* @__PURE__ */ new Date();
|
|
2356
2397
|
let m = !1;
|
|
2357
2398
|
f.getFullYear() === o && f.getMonth() + 1 === r && f.getDate() === c && (m = !0);
|
|
2358
|
-
let
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2399
|
+
let u = i.getDay();
|
|
2400
|
+
const V = this.nStr1[u];
|
|
2401
|
+
u === 0 && (u = 7);
|
|
2402
|
+
const p = Z;
|
|
2403
|
+
e = this.leapMonth(Z);
|
|
2363
2404
|
let n = !1;
|
|
2364
2405
|
for (Z = 1; Z < 13 && d > 0; Z++)
|
|
2365
|
-
|
|
2366
|
-
d === 0 &&
|
|
2367
|
-
const
|
|
2368
|
-
let
|
|
2369
|
-
c >=
|
|
2370
|
-
let
|
|
2371
|
-
|
|
2372
|
-
const
|
|
2373
|
-
let F =
|
|
2374
|
-
return
|
|
2375
|
-
date:
|
|
2406
|
+
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;
|
|
2407
|
+
d === 0 && e > 0 && Z === e + 1 && (n ? n = !1 : (n = !0, --Z)), d < 0 && (d += t, --Z);
|
|
2408
|
+
const L = Z, C = d + 1, A = r - 1, w = this.toGanZhiYear(p), H = this.getTerm(o, r * 2 - 1), I = this.getTerm(o, r * 2);
|
|
2409
|
+
let v = this.toGanZhi((o - 1900) * 12 + r + 11);
|
|
2410
|
+
c >= H && (v = this.toGanZhi((o - 1900) * 12 + r + 12));
|
|
2411
|
+
let M = !1, b;
|
|
2412
|
+
H === c && (M = !0, b = this.solarTerm[r * 2 - 2]), I === c && (M = !0, b = this.solarTerm[r * 2 - 1]);
|
|
2413
|
+
const s = Date.UTC(o, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, y = this.toGanZhi(s + c - 1), S = this.toAstro(r, c), x = o + "-" + r + "-" + c, D = p + "-" + L + "-" + C, E = this.festival, N = this.lFestival, R = r + "-" + c;
|
|
2414
|
+
let F = L + "-" + C;
|
|
2415
|
+
return L === 12 && C === 29 && this.monthDays(p, L) === 29 && (F = "12-30"), {
|
|
2416
|
+
date: x,
|
|
2376
2417
|
lunarDate: D,
|
|
2377
2418
|
festival: E[R] ? E[R].title : null,
|
|
2378
2419
|
lunarFestival: N[F] ? N[F].title : null,
|
|
2379
|
-
lYear:
|
|
2380
|
-
lMonth:
|
|
2420
|
+
lYear: p,
|
|
2421
|
+
lMonth: L,
|
|
2381
2422
|
lDay: C,
|
|
2382
|
-
Animal: this.getAnimal(
|
|
2383
|
-
IMonthCn: (n ? "闰" : "") + this.toChinaMonth(
|
|
2423
|
+
Animal: this.getAnimal(p),
|
|
2424
|
+
IMonthCn: (n ? "闰" : "") + this.toChinaMonth(L),
|
|
2384
2425
|
IDayCn: this.toChinaDay(C),
|
|
2385
2426
|
cYear: o,
|
|
2386
2427
|
cMonth: r,
|
|
2387
2428
|
cDay: c,
|
|
2388
|
-
gzYear:
|
|
2389
|
-
gzMonth:
|
|
2390
|
-
gzDay:
|
|
2429
|
+
gzYear: w,
|
|
2430
|
+
gzMonth: v,
|
|
2431
|
+
gzDay: y,
|
|
2391
2432
|
isToday: m,
|
|
2392
2433
|
isLeap: n,
|
|
2393
|
-
nWeek:
|
|
2394
|
-
ncWeek: "星期" +
|
|
2395
|
-
isTerm:
|
|
2396
|
-
Term:
|
|
2397
|
-
astro:
|
|
2434
|
+
nWeek: u,
|
|
2435
|
+
ncWeek: "星期" + V,
|
|
2436
|
+
isTerm: M,
|
|
2437
|
+
Term: b,
|
|
2438
|
+
astro: S
|
|
2398
2439
|
};
|
|
2399
2440
|
},
|
|
2400
2441
|
/**
|
|
@@ -2416,15 +2457,15 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2416
2457
|
let i = c;
|
|
2417
2458
|
if (o && (i = this.leapDays(a)), a < 1900 || a > 2100 || h > i)
|
|
2418
2459
|
return -1;
|
|
2419
|
-
let Z = 0,
|
|
2420
|
-
for (
|
|
2421
|
-
Z += this.lYearDays(
|
|
2422
|
-
let
|
|
2423
|
-
for (
|
|
2424
|
-
|
|
2460
|
+
let Z = 0, e;
|
|
2461
|
+
for (e = 1900; e < a; e++)
|
|
2462
|
+
Z += this.lYearDays(e);
|
|
2463
|
+
let t = 0, d = !1;
|
|
2464
|
+
for (e = 1; e < l; e++)
|
|
2465
|
+
t = this.leapMonth(a), d || t <= e && t > 0 && (Z += this.leapDays(a), d = !0), Z += this.monthDays(a, e);
|
|
2425
2466
|
o && (Z += c);
|
|
2426
|
-
const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + h - 31) * 864e5 + f),
|
|
2427
|
-
return this.solar2lunar(
|
|
2467
|
+
const f = Date.UTC(1900, 1, 30, 0, 0, 0), m = new Date((Z + h - 31) * 864e5 + f), u = m.getUTCFullYear(), V = m.getUTCMonth() + 1, p = m.getUTCDate();
|
|
2468
|
+
return this.solar2lunar(u, V, p);
|
|
2428
2469
|
}
|
|
2429
2470
|
}, dict = storageLocal.getItem("kLov"), formats = {
|
|
2430
2471
|
formatDate: {
|
|
@@ -2491,7 +2532,7 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2491
2532
|
const [h, o] = l;
|
|
2492
2533
|
let r;
|
|
2493
2534
|
return (c = a[h]) == null || c.split(",").forEach((i) => {
|
|
2494
|
-
const Z = o.find((
|
|
2535
|
+
const Z = o.find((e) => e.value === i);
|
|
2495
2536
|
r = r ? `${r},${Z == null ? void 0 : Z.label}` : Z == null ? void 0 : Z.label;
|
|
2496
2537
|
}), r;
|
|
2497
2538
|
}
|