@utogether/utils 3.0.0-beta.29 → 3.0.0-beta.30
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/pkg/useRender.d.ts +9 -0
- package/dist/utils.es.js +464 -360
- package/dist/utils.umd.js +1 -1
- package/package.json +29 -29
package/dist/utils.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var j = (a, l, o) => l in a ?
|
|
3
|
-
var
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var j = (a, l, o) => l in a ? U(a, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : a[l] = o;
|
|
3
|
+
var x = (a, l, o) => j(a, typeof l != "symbol" ? l + "" : l, o);
|
|
4
4
|
import { createVNode, resolveComponent, mergeProps, isVNode, ref, shallowRef, unref, getCurrentInstance, onBeforeUnmount, reactive, watchEffect, isRef } from "vue";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import XEUtils, { isArray, findTree, isEmpty, isObject, isPlainObject, isUndefined, isFunction, isString, clone, merge, has } from "xe-utils";
|
|
@@ -9,12 +9,12 @@ import ResizeObserver from "resize-observer-polyfill";
|
|
|
9
9
|
import { VxeUI } from "vxe-pc-ui";
|
|
10
10
|
import Axios from "axios";
|
|
11
11
|
import NProgress from "nprogress";
|
|
12
|
-
import { default as
|
|
12
|
+
import { default as G } from "nprogress";
|
|
13
13
|
class sessionStorageProxy {
|
|
14
14
|
constructor(l) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
x(this, "storage");
|
|
16
|
+
x(this, "prefix");
|
|
17
|
+
x(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
|
+
x(this, "storage");
|
|
50
50
|
localforage.config({
|
|
51
51
|
name: "uapp",
|
|
52
52
|
storeName: "udb"
|
|
@@ -140,8 +140,8 @@ function init(a, l) {
|
|
|
140
140
|
init({ read: DEFAULT_CODEC.decodeValue, write: DEFAULT_CODEC.encodeValue }, DEFAULT_ATTRIBUTES);
|
|
141
141
|
class Cookies {
|
|
142
142
|
constructor() {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
x(this, "prefix", null);
|
|
144
|
+
x(this, "addPrefix", (l) => {
|
|
145
145
|
this.prefix = l;
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -199,33 +199,33 @@ const VxetableRender = (VXETable, {
|
|
|
199
199
|
options: e,
|
|
200
200
|
props: i,
|
|
201
201
|
optionProps: t = {},
|
|
202
|
-
events:
|
|
202
|
+
events: v
|
|
203
203
|
} = a, {
|
|
204
204
|
label: Z = "label",
|
|
205
205
|
value: d = "value"
|
|
206
206
|
} = t, {
|
|
207
207
|
loading: n = !1,
|
|
208
208
|
multiple: f,
|
|
209
|
-
mapField:
|
|
209
|
+
mapField: u
|
|
210
210
|
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
211
211
|
m.setDefaultValue(i, h, r.field);
|
|
212
|
-
function
|
|
212
|
+
function M(V) {
|
|
213
213
|
m.remote(V, r.field, a);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function p(V) {
|
|
216
216
|
m.selectChange(V, h, r.field, a, {
|
|
217
217
|
column: r,
|
|
218
218
|
datasource: "row"
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
221
|
+
function y(V) {
|
|
222
|
+
v != null && v.input && v.input(l, V);
|
|
223
223
|
}
|
|
224
224
|
function A() {
|
|
225
|
-
m.clear(h, r.field,
|
|
225
|
+
m.clear(h, r.field, u, v, "row");
|
|
226
226
|
}
|
|
227
227
|
function w() {
|
|
228
|
-
!e.length &&
|
|
228
|
+
!e.length && M(""), v != null && v.focus && v.focus(l, r.field);
|
|
229
229
|
}
|
|
230
230
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
231
231
|
modelValue: h[s],
|
|
@@ -235,13 +235,13 @@ const VxetableRender = (VXETable, {
|
|
|
235
235
|
clearable: !0,
|
|
236
236
|
placeholder: "请录入关键字搜索",
|
|
237
237
|
style: "width: 100%",
|
|
238
|
-
"remote-method":
|
|
238
|
+
"remote-method": M,
|
|
239
239
|
loading: n
|
|
240
240
|
}, i, {
|
|
241
241
|
onFocus: () => w(),
|
|
242
|
-
onChange: (V) =>
|
|
242
|
+
onChange: (V) => p(V),
|
|
243
243
|
onClear: () => A(),
|
|
244
|
-
onInput: (V) =>
|
|
244
|
+
onInput: (V) => y(V)
|
|
245
245
|
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
246
246
|
key: V[d],
|
|
247
247
|
label: V[Z],
|
|
@@ -259,33 +259,33 @@ const VxetableRender = (VXETable, {
|
|
|
259
259
|
options: e,
|
|
260
260
|
props: i,
|
|
261
261
|
optionProps: t = {},
|
|
262
|
-
events:
|
|
262
|
+
events: v
|
|
263
263
|
} = a, {
|
|
264
264
|
label: Z = "label",
|
|
265
265
|
value: d = "value"
|
|
266
266
|
} = t, {
|
|
267
267
|
loading: n = !1,
|
|
268
268
|
multiple: f,
|
|
269
|
-
mapField:
|
|
269
|
+
mapField: u
|
|
270
270
|
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
271
271
|
m.setDefaultValue(i, h, r.field);
|
|
272
|
-
function
|
|
272
|
+
function M(V) {
|
|
273
273
|
m.remote(V, r.field, a);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function p(V) {
|
|
276
276
|
m.selectChange(V, h, r.field, a, {
|
|
277
277
|
column: r,
|
|
278
278
|
datasource: "row"
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
281
|
+
function y(V) {
|
|
282
|
+
v != null && v.input && v.input(l, V);
|
|
283
283
|
}
|
|
284
284
|
function A() {
|
|
285
|
-
m.clear(h, r.field,
|
|
285
|
+
m.clear(h, r.field, u, v, "row");
|
|
286
286
|
}
|
|
287
287
|
function w() {
|
|
288
|
-
!e.length &&
|
|
288
|
+
!e.length && M(""), v != null && v.focus && v.focus(l, r.field);
|
|
289
289
|
}
|
|
290
290
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
291
291
|
modelValue: h[s],
|
|
@@ -295,13 +295,13 @@ const VxetableRender = (VXETable, {
|
|
|
295
295
|
clearable: !0,
|
|
296
296
|
placeholder: "请录入关键字搜索",
|
|
297
297
|
style: "width: 100%",
|
|
298
|
-
"remote-method":
|
|
298
|
+
"remote-method": M,
|
|
299
299
|
loading: n
|
|
300
300
|
}, i, {
|
|
301
301
|
onFocus: () => w(),
|
|
302
|
-
onChange: (V) =>
|
|
302
|
+
onChange: (V) => p(V),
|
|
303
303
|
onClear: () => A(),
|
|
304
|
-
onInput: (V) =>
|
|
304
|
+
onInput: (V) => y(V)
|
|
305
305
|
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
306
306
|
key: V[d],
|
|
307
307
|
label: V[Z],
|
|
@@ -333,32 +333,32 @@ const VxetableRender = (VXETable, {
|
|
|
333
333
|
options: e,
|
|
334
334
|
props: i,
|
|
335
335
|
optionProps: t = {},
|
|
336
|
-
events:
|
|
336
|
+
events: v
|
|
337
337
|
} = a, {
|
|
338
338
|
label: Z = "label",
|
|
339
339
|
value: d = "value"
|
|
340
340
|
} = t, {
|
|
341
341
|
mapField: n,
|
|
342
342
|
multiple: f,
|
|
343
|
-
loading:
|
|
343
|
+
loading: u = !1
|
|
344
344
|
} = i, m = useComponent(), s = f ? `_${r}` : r;
|
|
345
345
|
m.setDefaultValue(i, h, r);
|
|
346
|
-
async function
|
|
346
|
+
async function M(V) {
|
|
347
347
|
m.remote(V, r, a);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function p(V) {
|
|
350
350
|
m.selectChange(V, h, r, a, {
|
|
351
351
|
datasource: "data"
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
|
|
354
|
+
function y(V) {
|
|
355
|
+
v != null && v.input && v.input(l, V);
|
|
356
356
|
}
|
|
357
357
|
function A() {
|
|
358
|
-
m.clear(h, r, n,
|
|
358
|
+
m.clear(h, r, n, v, "data");
|
|
359
359
|
}
|
|
360
360
|
function w() {
|
|
361
|
-
!e.length &&
|
|
361
|
+
!e.length && M(""), v != null && v.focus && v.focus(l);
|
|
362
362
|
}
|
|
363
363
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
364
364
|
modelValue: h[s],
|
|
@@ -368,13 +368,13 @@ const VxetableRender = (VXETable, {
|
|
|
368
368
|
clearable: !0,
|
|
369
369
|
style: "width: 100%",
|
|
370
370
|
placeholder: "请录入关键字搜索",
|
|
371
|
-
loading:
|
|
372
|
-
"remote-method":
|
|
371
|
+
loading: u,
|
|
372
|
+
"remote-method": M
|
|
373
373
|
}, i, {
|
|
374
374
|
onFocus: () => w(),
|
|
375
|
-
onChange: (V) =>
|
|
375
|
+
onChange: (V) => p(V),
|
|
376
376
|
onClear: () => A(),
|
|
377
|
-
onInput: () =>
|
|
377
|
+
onInput: () => y()
|
|
378
378
|
}), _isSlot(o = e.map((V) => createVNode(resolveComponent("el-option"), {
|
|
379
379
|
key: V[d],
|
|
380
380
|
label: V[Z],
|
|
@@ -413,10 +413,10 @@ const VxetableRender = (VXETable, {
|
|
|
413
413
|
}, {
|
|
414
414
|
text: i18n("message.udp.anniversary", !0),
|
|
415
415
|
value: () => [t(1, "year"), e]
|
|
416
|
-
}], t = (
|
|
416
|
+
}], t = (v, Z) => dayjs().subtract(v, Z).add("1", "day").format();
|
|
417
417
|
return [createVNode(resolveComponent("el-date-picker"), mergeProps({
|
|
418
418
|
modelValue: o[h],
|
|
419
|
-
"onUpdate:modelValue": (
|
|
419
|
+
"onUpdate:modelValue": (v) => o[h] = v,
|
|
420
420
|
type: (r == null ? void 0 : r.type) || "daterange",
|
|
421
421
|
shortcuts: i,
|
|
422
422
|
style: "width: 100%",
|
|
@@ -435,37 +435,37 @@ const VxetableRender = (VXETable, {
|
|
|
435
435
|
options: e,
|
|
436
436
|
props: i,
|
|
437
437
|
optionProps: t = {},
|
|
438
|
-
events:
|
|
438
|
+
events: v
|
|
439
439
|
} = a, {
|
|
440
440
|
label: Z = "label",
|
|
441
441
|
value: d = "value"
|
|
442
442
|
} = t, {
|
|
443
443
|
multiple: n,
|
|
444
444
|
mapField: f
|
|
445
|
-
} = i,
|
|
446
|
-
|
|
447
|
-
function s(
|
|
448
|
-
|
|
445
|
+
} = i, u = useComponent(), m = n ? `_${r.field}` : r.field;
|
|
446
|
+
u.setDefaultValue(i, h, r.field);
|
|
447
|
+
function s(p) {
|
|
448
|
+
u.selectChange(p, h, r.field, a, {
|
|
449
449
|
column: r,
|
|
450
450
|
datasource: "row"
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
|
|
453
|
+
function M() {
|
|
454
|
+
u.clear(h, r.field, f, v, "row");
|
|
455
455
|
}
|
|
456
456
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
457
457
|
modelValue: h[m],
|
|
458
|
-
"onUpdate:modelValue": (
|
|
458
|
+
"onUpdate:modelValue": (p) => h[m] = p,
|
|
459
459
|
filterable: !0,
|
|
460
460
|
clearable: !0
|
|
461
461
|
}, i, {
|
|
462
462
|
style: "width: 100%",
|
|
463
|
-
onChange: (
|
|
464
|
-
onClear: () =>
|
|
465
|
-
}), _isSlot(o = e.map((
|
|
466
|
-
key:
|
|
467
|
-
label:
|
|
468
|
-
value:
|
|
463
|
+
onChange: (p) => s(p),
|
|
464
|
+
onClear: () => M()
|
|
465
|
+
}), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
|
|
466
|
+
key: p[d],
|
|
467
|
+
label: p[Z],
|
|
468
|
+
value: p[d]
|
|
469
469
|
}, null))) ? o : {
|
|
470
470
|
default: () => [o]
|
|
471
471
|
})];
|
|
@@ -479,38 +479,38 @@ const VxetableRender = (VXETable, {
|
|
|
479
479
|
options: e,
|
|
480
480
|
props: i,
|
|
481
481
|
optionProps: t = {},
|
|
482
|
-
events:
|
|
482
|
+
events: v
|
|
483
483
|
} = a, {
|
|
484
484
|
label: Z = "label",
|
|
485
485
|
value: d = "value",
|
|
486
486
|
extLabel: n
|
|
487
487
|
} = t, {
|
|
488
488
|
multiple: f,
|
|
489
|
-
mapField:
|
|
489
|
+
mapField: u
|
|
490
490
|
} = i, m = useComponent(), s = f ? `_${r.field}` : r.field;
|
|
491
491
|
m.setDefaultValue(i, h, r.field);
|
|
492
|
-
function
|
|
493
|
-
m.selectChange(
|
|
492
|
+
function M(y) {
|
|
493
|
+
m.selectChange(y, h, r.field, a, {
|
|
494
494
|
column: r,
|
|
495
495
|
datasource: "row"
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
m.clear(h, r.field,
|
|
498
|
+
function p() {
|
|
499
|
+
m.clear(h, r.field, u, v, "row");
|
|
500
500
|
}
|
|
501
501
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
502
502
|
modelValue: h[s],
|
|
503
|
-
"onUpdate:modelValue": (
|
|
503
|
+
"onUpdate:modelValue": (y) => h[s] = y,
|
|
504
504
|
filterable: !0,
|
|
505
505
|
clearable: !0
|
|
506
506
|
}, i, {
|
|
507
507
|
style: "width: 100%",
|
|
508
|
-
onChange: (
|
|
509
|
-
onClear: () =>
|
|
510
|
-
}), _isSlot(o = e.map((
|
|
511
|
-
key:
|
|
512
|
-
label: n &&
|
|
513
|
-
value:
|
|
508
|
+
onChange: (y) => M(y),
|
|
509
|
+
onClear: () => p()
|
|
510
|
+
}), _isSlot(o = e.map((y) => createVNode(resolveComponent("el-option"), {
|
|
511
|
+
key: y[d],
|
|
512
|
+
label: n && y[n] ? y[d] : y[Z],
|
|
513
|
+
value: y[d]
|
|
514
514
|
}, null))) ? o : {
|
|
515
515
|
default: () => [o]
|
|
516
516
|
})];
|
|
@@ -544,36 +544,36 @@ const VxetableRender = (VXETable, {
|
|
|
544
544
|
options: e,
|
|
545
545
|
props: i,
|
|
546
546
|
optionProps: t = {},
|
|
547
|
-
events:
|
|
547
|
+
events: v
|
|
548
548
|
} = a, {
|
|
549
549
|
label: Z = "label",
|
|
550
550
|
value: d = "value"
|
|
551
551
|
} = t, n = useComponent(), {
|
|
552
552
|
mapField: f,
|
|
553
|
-
multiple:
|
|
554
|
-
} = i, m =
|
|
553
|
+
multiple: u
|
|
554
|
+
} = i, m = u ? `_${r}` : r;
|
|
555
555
|
n.setDefaultValue(i, h, r);
|
|
556
|
-
function s(
|
|
557
|
-
n.selectChange(
|
|
556
|
+
function s(p) {
|
|
557
|
+
n.selectChange(p, h, r, a, {
|
|
558
558
|
datasource: "data"
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
n.clear(h, r, f,
|
|
561
|
+
function M() {
|
|
562
|
+
n.clear(h, r, f, v, "data");
|
|
563
563
|
}
|
|
564
564
|
return [createVNode(resolveComponent("el-select"), mergeProps({
|
|
565
565
|
modelValue: h[m],
|
|
566
|
-
"onUpdate:modelValue": (
|
|
566
|
+
"onUpdate:modelValue": (p) => h[m] = p,
|
|
567
567
|
filterable: !0,
|
|
568
568
|
clearable: !0,
|
|
569
569
|
style: "width: 100%"
|
|
570
570
|
}, i, {
|
|
571
|
-
onChange: (
|
|
572
|
-
onClear: () =>
|
|
573
|
-
}), _isSlot(o = e.map((
|
|
574
|
-
key:
|
|
575
|
-
label:
|
|
576
|
-
value:
|
|
571
|
+
onChange: (p) => s(p),
|
|
572
|
+
onClear: () => M()
|
|
573
|
+
}), _isSlot(o = e.map((p) => createVNode(resolveComponent("el-option"), {
|
|
574
|
+
key: p[d],
|
|
575
|
+
label: p[Z],
|
|
576
|
+
value: p[d]
|
|
577
577
|
}, null))) ? o : {
|
|
578
578
|
default: () => [o]
|
|
579
579
|
})];
|
|
@@ -588,42 +588,42 @@ const VxetableRender = (VXETable, {
|
|
|
588
588
|
events: e
|
|
589
589
|
} = a, i = useComponent(), {
|
|
590
590
|
defaultValues: t,
|
|
591
|
-
mapField:
|
|
591
|
+
mapField: v
|
|
592
592
|
} = r;
|
|
593
593
|
t && (o[h] = t);
|
|
594
594
|
function Z(n, f) {
|
|
595
595
|
const {
|
|
596
|
-
mapField:
|
|
596
|
+
mapField: u,
|
|
597
597
|
field: m,
|
|
598
598
|
displayName: s,
|
|
599
|
-
multiple:
|
|
599
|
+
multiple: M
|
|
600
600
|
} = r;
|
|
601
|
-
if (
|
|
602
|
-
if (
|
|
603
|
-
const
|
|
601
|
+
if (M) {
|
|
602
|
+
if (M) {
|
|
603
|
+
const y = {};
|
|
604
604
|
o[s || m] = n.reduce((A, w) => {
|
|
605
|
-
for (const V in
|
|
606
|
-
|
|
605
|
+
for (const V in u)
|
|
606
|
+
y[V] = A ? y[V] + "," + w[u[V]] : w[u[V]];
|
|
607
607
|
return A = A ? A + "," + w[s || m] : w[s || m], A;
|
|
608
|
-
}, ""), Object.assign(o,
|
|
608
|
+
}, ""), Object.assign(o, y);
|
|
609
609
|
}
|
|
610
610
|
} else {
|
|
611
|
-
const
|
|
611
|
+
const y = {
|
|
612
612
|
[s || m]: n[f || s || m]
|
|
613
613
|
};
|
|
614
|
-
for (const A in
|
|
615
|
-
|
|
616
|
-
Object.assign(o,
|
|
614
|
+
for (const A in u)
|
|
615
|
+
y[A] = n[u[A]];
|
|
616
|
+
Object.assign(o, y);
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const p = {
|
|
619
619
|
data: o,
|
|
620
620
|
options: n,
|
|
621
621
|
field: m
|
|
622
622
|
};
|
|
623
|
-
e != null && e.change && e.change(
|
|
623
|
+
e != null && e.change && e.change(p);
|
|
624
624
|
}
|
|
625
625
|
function d() {
|
|
626
|
-
i.clear(o, h,
|
|
626
|
+
i.clear(o, h, v, e, "data");
|
|
627
627
|
}
|
|
628
628
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
629
629
|
record: o
|
|
@@ -646,16 +646,16 @@ const VxetableRender = (VXETable, {
|
|
|
646
646
|
const {
|
|
647
647
|
mapField: n,
|
|
648
648
|
field: f,
|
|
649
|
-
displayName:
|
|
649
|
+
displayName: u,
|
|
650
650
|
multiple: m
|
|
651
651
|
} = r;
|
|
652
652
|
if (!m) {
|
|
653
|
-
const
|
|
654
|
-
[
|
|
653
|
+
const M = {
|
|
654
|
+
[u || f]: Z[d || u || f]
|
|
655
655
|
};
|
|
656
|
-
for (const
|
|
657
|
-
|
|
658
|
-
Object.assign(o,
|
|
656
|
+
for (const p in n)
|
|
657
|
+
M[p] = Z[n[p]];
|
|
658
|
+
Object.assign(o, M);
|
|
659
659
|
}
|
|
660
660
|
const s = {
|
|
661
661
|
row: o,
|
|
@@ -664,7 +664,7 @@ const VxetableRender = (VXETable, {
|
|
|
664
664
|
};
|
|
665
665
|
e != null && e.change && e.change(s);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function v() {
|
|
668
668
|
i.clear(o, h.field, mapField, e, "row");
|
|
669
669
|
}
|
|
670
670
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
@@ -673,7 +673,7 @@ const VxetableRender = (VXETable, {
|
|
|
673
673
|
transfer: !0
|
|
674
674
|
}, r, {
|
|
675
675
|
onChange: (Z, d) => t(Z, d),
|
|
676
|
-
onClear: () =>
|
|
676
|
+
onClear: () => v()
|
|
677
677
|
}), null)];
|
|
678
678
|
},
|
|
679
679
|
// 单元格默认
|
|
@@ -689,16 +689,16 @@ const VxetableRender = (VXETable, {
|
|
|
689
689
|
const {
|
|
690
690
|
mapField: n,
|
|
691
691
|
field: f,
|
|
692
|
-
displayName:
|
|
692
|
+
displayName: u,
|
|
693
693
|
multiple: m
|
|
694
694
|
} = r;
|
|
695
695
|
if (!m) {
|
|
696
|
-
const
|
|
697
|
-
[
|
|
696
|
+
const M = {
|
|
697
|
+
[u || f]: Z[d || u || f]
|
|
698
698
|
};
|
|
699
|
-
for (const
|
|
700
|
-
|
|
701
|
-
Object.assign(o,
|
|
699
|
+
for (const p in n)
|
|
700
|
+
M[p] = Z[n[p]];
|
|
701
|
+
Object.assign(o, M);
|
|
702
702
|
}
|
|
703
703
|
const s = {
|
|
704
704
|
row: o,
|
|
@@ -707,7 +707,7 @@ const VxetableRender = (VXETable, {
|
|
|
707
707
|
};
|
|
708
708
|
e != null && e.change && e.change(s);
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function v() {
|
|
711
711
|
i.clear(o, h.field, mapField, e, "row");
|
|
712
712
|
}
|
|
713
713
|
return [createVNode(resolveComponent("ut-lov"), mergeProps({
|
|
@@ -715,7 +715,7 @@ const VxetableRender = (VXETable, {
|
|
|
715
715
|
mode: "ele"
|
|
716
716
|
}, r, {
|
|
717
717
|
onChange: (Z, d) => t(Z, d),
|
|
718
|
-
onClear: () =>
|
|
718
|
+
onClear: () => v()
|
|
719
719
|
}), null)];
|
|
720
720
|
},
|
|
721
721
|
// 可编辑显示模板
|
|
@@ -726,6 +726,98 @@ const VxetableRender = (VXETable, {
|
|
|
726
726
|
} = l;
|
|
727
727
|
return [createVNode("span", null, [o[h.field]])];
|
|
728
728
|
}
|
|
729
|
+
}), VXETable.renderer.add("#textarea", {
|
|
730
|
+
renderTableEdit(a, l) {
|
|
731
|
+
const {
|
|
732
|
+
row: o,
|
|
733
|
+
column: h
|
|
734
|
+
} = l, {
|
|
735
|
+
props: r,
|
|
736
|
+
events: e
|
|
737
|
+
} = a, {
|
|
738
|
+
mapField: i
|
|
739
|
+
} = r, t = useComponent();
|
|
740
|
+
function v(d) {
|
|
741
|
+
t.change(d, o, h.field, a, {
|
|
742
|
+
column: h,
|
|
743
|
+
datasource: "row"
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
function Z() {
|
|
747
|
+
t.clear(o, h.field, i, e, "row");
|
|
748
|
+
}
|
|
749
|
+
return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
|
|
750
|
+
modelValue: o[h.field],
|
|
751
|
+
"onUpdate:modelValue": (d) => o[h.field] = d
|
|
752
|
+
}, r, {
|
|
753
|
+
style: "width: 100%",
|
|
754
|
+
onChange: (d) => v(d),
|
|
755
|
+
onClear: () => Z()
|
|
756
|
+
}), null)];
|
|
757
|
+
},
|
|
758
|
+
renderTableDefault(a, l) {
|
|
759
|
+
const {
|
|
760
|
+
row: o,
|
|
761
|
+
column: h
|
|
762
|
+
} = l, {
|
|
763
|
+
props: r,
|
|
764
|
+
events: e
|
|
765
|
+
} = a, {
|
|
766
|
+
mapField: i
|
|
767
|
+
} = r, t = useComponent();
|
|
768
|
+
function v(d) {
|
|
769
|
+
t.change(d, o, h.field, a, {
|
|
770
|
+
column: h,
|
|
771
|
+
datasource: "row"
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
function Z() {
|
|
775
|
+
t.clear(o, h.field, i, e, "row");
|
|
776
|
+
}
|
|
777
|
+
return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
|
|
778
|
+
modelValue: o[h.field],
|
|
779
|
+
"onUpdate:modelValue": (d) => o[h.field] = d
|
|
780
|
+
}, r, {
|
|
781
|
+
onChange: (d) => v(d),
|
|
782
|
+
onClear: () => Z()
|
|
783
|
+
}), null)];
|
|
784
|
+
},
|
|
785
|
+
// 可编辑显示模板
|
|
786
|
+
renderTableCell(a, l) {
|
|
787
|
+
const {
|
|
788
|
+
row: o,
|
|
789
|
+
column: h
|
|
790
|
+
} = l;
|
|
791
|
+
return o[h.field];
|
|
792
|
+
},
|
|
793
|
+
renderItemContent(a, l) {
|
|
794
|
+
const {
|
|
795
|
+
data: o,
|
|
796
|
+
field: h
|
|
797
|
+
} = l, {
|
|
798
|
+
props: r,
|
|
799
|
+
events: e
|
|
800
|
+
} = a, i = useComponent(), {
|
|
801
|
+
defaultValue: t,
|
|
802
|
+
mapField: v
|
|
803
|
+
} = r;
|
|
804
|
+
t && (o[h] = t);
|
|
805
|
+
function Z(n) {
|
|
806
|
+
i.change(n, o, h, a, {
|
|
807
|
+
datasource: "data"
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
function d() {
|
|
811
|
+
i.clear(o, h, v, e, "data");
|
|
812
|
+
}
|
|
813
|
+
return [createVNode(resolveComponent("vxe-textarea"), mergeProps({
|
|
814
|
+
modelValue: o[h],
|
|
815
|
+
"onUpdate:modelValue": (n) => o[h] = n
|
|
816
|
+
}, r, {
|
|
817
|
+
onChange: (n) => Z(n),
|
|
818
|
+
onClear: () => d()
|
|
819
|
+
}), null)];
|
|
820
|
+
}
|
|
729
821
|
}), VXETable.renderer.add("#upload", {
|
|
730
822
|
renderTableEdit(a, l) {
|
|
731
823
|
const {
|
|
@@ -735,8 +827,8 @@ const VxetableRender = (VXETable, {
|
|
|
735
827
|
props: r,
|
|
736
828
|
events: e
|
|
737
829
|
} = a;
|
|
738
|
-
function i(t,
|
|
739
|
-
o[h.field] = "", e != null && e.remove && (e == null || e.remove(t,
|
|
830
|
+
function i(t, v) {
|
|
831
|
+
o[h.field] = "", e != null && e.remove && (e == null || e.remove(t, v));
|
|
740
832
|
}
|
|
741
833
|
return [createVNode(resolveComponent("form-upload"), mergeProps({
|
|
742
834
|
record: o,
|
|
@@ -745,7 +837,7 @@ const VxetableRender = (VXETable, {
|
|
|
745
837
|
}, r, {
|
|
746
838
|
"render-mode": "column",
|
|
747
839
|
"data-status": "edit",
|
|
748
|
-
onRemove: (t,
|
|
840
|
+
onRemove: (t, v) => i(t, v)
|
|
749
841
|
}), null)];
|
|
750
842
|
},
|
|
751
843
|
// 可编辑显示模板
|
|
@@ -774,15 +866,15 @@ const VxetableRender = (VXETable, {
|
|
|
774
866
|
props: r,
|
|
775
867
|
events: e
|
|
776
868
|
} = a;
|
|
777
|
-
function i(t,
|
|
778
|
-
o[h] = "", e != null && e.remove && (e == null || e.remove(t,
|
|
869
|
+
function i(t, v) {
|
|
870
|
+
o[h] = "", e != null && e.remove && (e == null || e.remove(t, v));
|
|
779
871
|
}
|
|
780
872
|
return [createVNode(resolveComponent("form-upload"), mergeProps({
|
|
781
873
|
record: o,
|
|
782
874
|
field: h,
|
|
783
875
|
mode: "image"
|
|
784
876
|
}, r, {
|
|
785
|
-
onRemove: (t,
|
|
877
|
+
onRemove: (t, v) => i(t, v)
|
|
786
878
|
}), null)];
|
|
787
879
|
}
|
|
788
880
|
}), VXETable.renderer.add("#tag", {
|
|
@@ -821,7 +913,7 @@ const VxetableRender = (VXETable, {
|
|
|
821
913
|
},
|
|
822
914
|
events: t
|
|
823
915
|
} = a;
|
|
824
|
-
function
|
|
916
|
+
function v(Z) {
|
|
825
917
|
const d = {
|
|
826
918
|
row: o,
|
|
827
919
|
column: h,
|
|
@@ -838,7 +930,7 @@ const VxetableRender = (VXETable, {
|
|
|
838
930
|
}, a.props, {
|
|
839
931
|
"active-text": getValue(r, e),
|
|
840
932
|
"inactive-text": getValue(r, i),
|
|
841
|
-
onChange: (Z) =>
|
|
933
|
+
onChange: (Z) => v(Z)
|
|
842
934
|
}), null) : null];
|
|
843
935
|
}
|
|
844
936
|
}), VXETable.renderer.add("#iconSelect", {
|
|
@@ -891,9 +983,9 @@ const VxetableRender = (VXETable, {
|
|
|
891
983
|
"check-strictly": !0
|
|
892
984
|
}, r, {
|
|
893
985
|
filterable: !0,
|
|
894
|
-
onCheckChange: (t,
|
|
895
|
-
onNodeClick: (t,
|
|
896
|
-
onCurrentChange: (t,
|
|
986
|
+
onCheckChange: (t, v, Z) => onCheckChange(t, v, Z, i),
|
|
987
|
+
onNodeClick: (t, v, Z) => onNodeClick(t, v, Z, i),
|
|
988
|
+
onCurrentChange: (t, v) => onCurrentChange(t, v, i)
|
|
897
989
|
}), null)];
|
|
898
990
|
},
|
|
899
991
|
renderTableCell(a, l) {
|
|
@@ -906,10 +998,10 @@ const VxetableRender = (VXETable, {
|
|
|
906
998
|
} = a, {
|
|
907
999
|
children: i = "children",
|
|
908
1000
|
label: t = "label"
|
|
909
|
-
} = e,
|
|
1001
|
+
} = e, v = findTree(r, (Z) => Z.value === o[h.field], {
|
|
910
1002
|
children: i
|
|
911
1003
|
});
|
|
912
|
-
return
|
|
1004
|
+
return v ? [createVNode("span", null, [v.item[t]])] : null;
|
|
913
1005
|
},
|
|
914
1006
|
renderItemContent(a, l) {
|
|
915
1007
|
const {
|
|
@@ -927,33 +1019,33 @@ const VxetableRender = (VXETable, {
|
|
|
927
1019
|
"check-strictly": !0
|
|
928
1020
|
}, r, {
|
|
929
1021
|
filterable: !0,
|
|
930
|
-
onCheckChange: (t,
|
|
931
|
-
onNodeClick: (t,
|
|
932
|
-
onCurrentChange: (t,
|
|
1022
|
+
onCheckChange: (t, v, Z) => onCheckChange(t, v, Z, i),
|
|
1023
|
+
onNodeClick: (t, v, Z) => onNodeClick(t, v, Z, i),
|
|
1024
|
+
onCurrentChange: (t, v) => onCurrentChange(t, v, i)
|
|
933
1025
|
}), null)];
|
|
934
1026
|
}
|
|
935
1027
|
});
|
|
936
1028
|
const useComponent = () => ({
|
|
937
|
-
clear: (r, e, i, t,
|
|
1029
|
+
clear: (r, e, i, t, v) => {
|
|
938
1030
|
if (r[e] = null, !isEmpty(i))
|
|
939
1031
|
for (const Z in i)
|
|
940
1032
|
r[Z] = null;
|
|
941
1033
|
t != null && t.clear && t.clear({
|
|
942
|
-
[
|
|
1034
|
+
[v]: r,
|
|
943
1035
|
field: e
|
|
944
1036
|
});
|
|
945
1037
|
},
|
|
946
1038
|
remote: async (r, e, i) => {
|
|
947
1039
|
const {
|
|
948
1040
|
options: t,
|
|
949
|
-
props:
|
|
1041
|
+
props: v,
|
|
950
1042
|
events: Z
|
|
951
1043
|
} = i, {
|
|
952
1044
|
fetchField: d,
|
|
953
1045
|
url: n,
|
|
954
1046
|
defaultParams: f = {},
|
|
955
|
-
method:
|
|
956
|
-
} =
|
|
1047
|
+
method: u = "get"
|
|
1048
|
+
} = v, m = getCookieParam(), s = Object.assign({
|
|
957
1049
|
pageSize: 20,
|
|
958
1050
|
pageNum: 1,
|
|
959
1051
|
...m,
|
|
@@ -961,51 +1053,51 @@ const VxetableRender = (VXETable, {
|
|
|
961
1053
|
}, {
|
|
962
1054
|
[d || e]: r
|
|
963
1055
|
});
|
|
964
|
-
if (
|
|
965
|
-
let
|
|
1056
|
+
if (v.loading) return;
|
|
1057
|
+
let M;
|
|
966
1058
|
try {
|
|
967
|
-
t.length = 0,
|
|
1059
|
+
t.length = 0, v.loading = !0, M = await serviceApi[u](n, s), Z != null && Z.filterMethod ? t.push(...Z.filterMethod(M.list || M)) : M && (M.list ? t.push(...M.list) : t.push(...M));
|
|
968
1060
|
} finally {
|
|
969
|
-
|
|
1061
|
+
v.loading = !1;
|
|
970
1062
|
}
|
|
971
1063
|
},
|
|
972
|
-
selectChange: (r, e, i, t,
|
|
1064
|
+
selectChange: (r, e, i, t, v) => {
|
|
973
1065
|
let Z = null;
|
|
974
1066
|
const {
|
|
975
1067
|
datasource: d
|
|
976
|
-
} =
|
|
1068
|
+
} = v, {
|
|
977
1069
|
options: n,
|
|
978
1070
|
props: f,
|
|
979
|
-
optionProps:
|
|
1071
|
+
optionProps: u = {},
|
|
980
1072
|
events: m
|
|
981
1073
|
} = t, s = {
|
|
982
1074
|
[d]: e,
|
|
983
1075
|
field: i
|
|
984
1076
|
};
|
|
985
|
-
e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), Z = [], r.forEach((
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
const A =
|
|
989
|
-
e[
|
|
990
|
-
}),
|
|
1077
|
+
e[i] = null, !isEmpty(r) && (f != null && f.multiple) ? (e[i] = r.join(","), Z = [], r.forEach((M) => {
|
|
1078
|
+
const p = n.find((y) => M === y[u == null ? void 0 : u.value]);
|
|
1079
|
+
p && !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((y) => {
|
|
1080
|
+
const A = p[f.mapField[y]], w = e[y] ? e[y].toString() : "";
|
|
1081
|
+
e[y] = w && !w.includes(A) ? `${w},${A}` : A;
|
|
1082
|
+
}), p && Z.push(p);
|
|
991
1083
|
}), Object.assign(s, {
|
|
992
1084
|
options: Z
|
|
993
|
-
})) : (e[i] = f != null && f.multiple ? null : r, Z = n.find((
|
|
994
|
-
e[
|
|
1085
|
+
})) : (e[i] = f != null && f.multiple ? null : r, Z = n.find((M) => r === M[u == null ? void 0 : u.value]), !isEmpty(f.mapField) && isObject(f.mapField) && Object.keys(f.mapField).forEach((M) => {
|
|
1086
|
+
e[M] = Z ? Z[f.mapField[M]] : null;
|
|
995
1087
|
}), Object.assign(s, {
|
|
996
1088
|
option: Z
|
|
997
1089
|
})), d === "row" && Object.assign(s, {
|
|
998
|
-
column:
|
|
1090
|
+
column: v.column
|
|
999
1091
|
}), m != null && m.change && m.change(s);
|
|
1000
1092
|
},
|
|
1001
1093
|
setDefaultValue: (r, e, i) => {
|
|
1002
1094
|
var d;
|
|
1003
1095
|
const {
|
|
1004
1096
|
multiple: t,
|
|
1005
|
-
defaultValue:
|
|
1097
|
+
defaultValue: v
|
|
1006
1098
|
} = r, Z = t ? `_${i}` : i;
|
|
1007
|
-
!e[i] &&
|
|
1008
|
-
e[f] = e[f] ||
|
|
1099
|
+
!e[i] && v && (e[i] = v, isPlainObject(v) && Object.keys(v).forEach((f) => {
|
|
1100
|
+
e[f] = e[f] || v[f];
|
|
1009
1101
|
})), !e[Z] && e[i] && (e[Z] = t ? (d = e[i]) == null ? void 0 : d.split(",") : e[i]);
|
|
1010
1102
|
}
|
|
1011
1103
|
}), onCheckChange = (a, l, o, h) => {
|
|
@@ -1082,10 +1174,10 @@ function useWatermark(a = ref(document.body)) {
|
|
|
1082
1174
|
d && (Z && d.removeChild(Z), removeResizeListener(d, l));
|
|
1083
1175
|
};
|
|
1084
1176
|
function e(Z, d) {
|
|
1085
|
-
const n = document.createElement("canvas"), f = 260,
|
|
1086
|
-
Object.assign(n, { width: f, height:
|
|
1177
|
+
const n = document.createElement("canvas"), f = 260, u = 180;
|
|
1178
|
+
Object.assign(n, { width: f, height: u });
|
|
1087
1179
|
const m = n.getContext("2d");
|
|
1088
|
-
return m && (m.rotate(-20 * Math.PI / 120), m.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", m.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", m.textAlign = "left", m.textBaseline = "middle", m.fillText(Z, f / 20,
|
|
1180
|
+
return m && (m.rotate(-20 * Math.PI / 120), m.font = (d == null ? void 0 : d.font) ?? "15px Reggae One", m.fillStyle = (d == null ? void 0 : d.fillStyle) ?? "rgba(180, 180, 180, 0.75)", m.textAlign = "left", m.textBaseline = "middle", m.fillText(Z, f / 20, u)), n.toDataURL("image/png");
|
|
1089
1181
|
}
|
|
1090
1182
|
function i(Z = {}) {
|
|
1091
1183
|
const d = unref(h);
|
|
@@ -1101,15 +1193,15 @@ function useWatermark(a = ref(document.body)) {
|
|
|
1101
1193
|
h.value = n, n.id = o, n.style.pointerEvents = "none", n.style.top = "0px", n.style.left = "0px", n.style.position = "absolute", n.style.zIndex = "100000";
|
|
1102
1194
|
const f = unref(a);
|
|
1103
1195
|
if (!f) return o;
|
|
1104
|
-
const { clientHeight:
|
|
1105
|
-
return i({ str: Z, width: m, height:
|
|
1196
|
+
const { clientHeight: u, clientWidth: m } = f;
|
|
1197
|
+
return i({ str: Z, width: m, height: u, attr: d }), f.appendChild(n), o;
|
|
1106
1198
|
};
|
|
1107
|
-
function
|
|
1199
|
+
function v(Z, d) {
|
|
1108
1200
|
t(Z, d), addResizeListener(document.documentElement, l), getCurrentInstance() && onBeforeUnmount(() => {
|
|
1109
1201
|
r();
|
|
1110
1202
|
});
|
|
1111
1203
|
}
|
|
1112
|
-
return { setWatermark:
|
|
1204
|
+
return { setWatermark: v, clear: r };
|
|
1113
1205
|
}
|
|
1114
1206
|
const DEFAULT_EXCLUDE_KEYS = ["class", "style"], LISTENER_PREFIX = /^on[A-Z]/;
|
|
1115
1207
|
function entries(a) {
|
|
@@ -1120,208 +1212,219 @@ function useAttrs(a = {}) {
|
|
|
1120
1212
|
if (!l) return {};
|
|
1121
1213
|
const { excludeListeners: o = !1, excludeKeys: h = [] } = a, r = shallowRef({}), e = h.concat(DEFAULT_EXCLUDE_KEYS);
|
|
1122
1214
|
return l.attrs = reactive(l.attrs), watchEffect(() => {
|
|
1123
|
-
const i = entries(l.attrs).reduce((t, [
|
|
1215
|
+
const i = entries(l.attrs).reduce((t, [v, Z]) => (!e.includes(v) && !(o && LISTENER_PREFIX.test(v)) && (t[v] = Z), t), {});
|
|
1124
1216
|
r.value = i;
|
|
1125
1217
|
}), r;
|
|
1126
1218
|
}
|
|
1127
1219
|
const useRender = () => {
|
|
1128
|
-
const a = { value: "dictCode", label: "dictName" }, l = (
|
|
1220
|
+
const a = { value: "dictCode", label: "dictName" }, l = (c, b) => {
|
|
1129
1221
|
var N;
|
|
1130
|
-
const
|
|
1131
|
-
let
|
|
1222
|
+
const H = k(b);
|
|
1223
|
+
let C = {
|
|
1132
1224
|
clearable: !0,
|
|
1133
1225
|
disabled: !1,
|
|
1134
1226
|
showValue: !1,
|
|
1135
1227
|
placeholder: null
|
|
1136
|
-
}, L,
|
|
1137
|
-
isObject(
|
|
1138
|
-
const
|
|
1228
|
+
}, L, S;
|
|
1229
|
+
isObject(c) ? (C = Object.assign(C, c), L = c.defaultValue, S = c == null ? void 0 : c.code) : S = c;
|
|
1230
|
+
const I = (N = storageLocal.getItem("kLov")[S]) == null ? void 0 : N.children, D = I ? I.filter((T) => T.enabled === "1") : [];
|
|
1139
1231
|
return {
|
|
1140
1232
|
name: "#select",
|
|
1141
1233
|
optionProps: a,
|
|
1142
|
-
options:
|
|
1143
|
-
props:
|
|
1234
|
+
options: D,
|
|
1235
|
+
props: C,
|
|
1144
1236
|
defaultValue: L,
|
|
1145
|
-
events:
|
|
1237
|
+
events: H
|
|
1146
1238
|
};
|
|
1147
|
-
}, o = (
|
|
1148
|
-
const
|
|
1239
|
+
}, o = (c, b) => {
|
|
1240
|
+
const H = k(b);
|
|
1149
1241
|
return {
|
|
1150
1242
|
name: "#SuSelect",
|
|
1151
|
-
optionProps: (
|
|
1152
|
-
props:
|
|
1153
|
-
options: (
|
|
1154
|
-
events:
|
|
1243
|
+
optionProps: (c == null ? void 0 : c.optionProps) || { label: "label", value: "value" },
|
|
1244
|
+
props: c == null ? void 0 : c.props,
|
|
1245
|
+
options: (c == null ? void 0 : c.options) || [],
|
|
1246
|
+
events: H
|
|
1155
1247
|
};
|
|
1156
|
-
}, h = (
|
|
1157
|
-
const
|
|
1248
|
+
}, h = (c, b) => {
|
|
1249
|
+
const H = {
|
|
1158
1250
|
optionProps: { extLabel: "userName", value: "employeeName" },
|
|
1159
1251
|
props: {
|
|
1160
|
-
attrs: { disabled:
|
|
1161
|
-
disabled:
|
|
1162
|
-
defaultValue:
|
|
1163
|
-
mapField:
|
|
1252
|
+
attrs: { disabled: c == null ? void 0 : c.disabled },
|
|
1253
|
+
disabled: c == null ? void 0 : c.disabled,
|
|
1254
|
+
defaultValue: c == null ? void 0 : c.defaultValue,
|
|
1255
|
+
mapField: c == null ? void 0 : c.mapField,
|
|
1164
1256
|
code: "SYS037",
|
|
1165
1257
|
url: "/uums/employee/listEmployeeIsUser",
|
|
1166
1258
|
fetchField: "employeeName"
|
|
1167
1259
|
}
|
|
1168
1260
|
};
|
|
1169
|
-
return o(
|
|
1170
|
-
}, r = (
|
|
1171
|
-
const
|
|
1261
|
+
return o(H, b);
|
|
1262
|
+
}, r = (c) => {
|
|
1263
|
+
const b = {
|
|
1172
1264
|
optionProps: { extLabel: "userName", value: "name" },
|
|
1173
1265
|
props: {
|
|
1174
1266
|
code: "sys/listUsers",
|
|
1175
1267
|
url: "/uums/user",
|
|
1176
1268
|
fetchField: "name",
|
|
1177
|
-
mapField:
|
|
1269
|
+
mapField: c == null ? void 0 : c.mapField
|
|
1178
1270
|
}
|
|
1179
1271
|
};
|
|
1180
|
-
return o(
|
|
1181
|
-
}, e = (
|
|
1182
|
-
const
|
|
1272
|
+
return o(b);
|
|
1273
|
+
}, e = (c, b) => {
|
|
1274
|
+
const H = {
|
|
1183
1275
|
label: "organizationName",
|
|
1184
|
-
value: (
|
|
1185
|
-
},
|
|
1276
|
+
value: (c == null ? void 0 : c.field) || "organizationName"
|
|
1277
|
+
}, C = {
|
|
1186
1278
|
mapField: {},
|
|
1187
|
-
defaultParams:
|
|
1279
|
+
defaultParams: c == null ? void 0 : c.defaultParams,
|
|
1188
1280
|
url: "/uums/cusOrganization",
|
|
1189
1281
|
fetchField: "organizationName"
|
|
1190
1282
|
}, L = {
|
|
1191
1283
|
organizationId: "id",
|
|
1192
1284
|
organizationCode: "organizationCode"
|
|
1193
1285
|
};
|
|
1194
|
-
return Object.assign(
|
|
1195
|
-
}, i = (
|
|
1196
|
-
const
|
|
1286
|
+
return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), { name: "#SuSelect", props: C, optionProps: H, options: [], methods: b };
|
|
1287
|
+
}, i = (c, b) => {
|
|
1288
|
+
const H = {
|
|
1197
1289
|
label: "orgName",
|
|
1198
|
-
value: (
|
|
1199
|
-
},
|
|
1290
|
+
value: (c == null ? void 0 : c.field) || "orgName"
|
|
1291
|
+
}, C = {
|
|
1200
1292
|
mapField: {},
|
|
1201
|
-
defaultParams:
|
|
1293
|
+
defaultParams: c == null ? void 0 : c.defaultParams,
|
|
1202
1294
|
url: "/uums/org",
|
|
1203
1295
|
fetchField: "orgName"
|
|
1204
1296
|
}, L = { orgId: "id", orgCode: "orgCode" };
|
|
1205
|
-
return Object.assign(
|
|
1206
|
-
}, t = (
|
|
1207
|
-
const
|
|
1297
|
+
return Object.assign(C.mapField, L, (c == null ? void 0 : c.mapField) || {}), { name: "#SuSelect", props: C, optionProps: H, options: [], methods: b };
|
|
1298
|
+
}, t = (c, b) => {
|
|
1299
|
+
const H = Object.assign({ disabled: !1 }, c), C = H == null ? void 0 : H.defaultValue;
|
|
1208
1300
|
return {
|
|
1209
1301
|
name: "VxeInput",
|
|
1210
|
-
props:
|
|
1211
|
-
defaultValue:
|
|
1212
|
-
events: k(
|
|
1302
|
+
props: H,
|
|
1303
|
+
defaultValue: C,
|
|
1304
|
+
events: k(b)
|
|
1213
1305
|
};
|
|
1214
|
-
},
|
|
1215
|
-
const
|
|
1306
|
+
}, v = (c, b) => {
|
|
1307
|
+
const H = Object.assign({ disabled: !1, rows: 3 }, c), C = H == null ? void 0 : H.defaultValue;
|
|
1216
1308
|
return {
|
|
1217
1309
|
name: "#textarea",
|
|
1218
|
-
props:
|
|
1219
|
-
defaultValue:
|
|
1220
|
-
events: k(
|
|
1310
|
+
props: H,
|
|
1311
|
+
defaultValue: C,
|
|
1312
|
+
events: k(b)
|
|
1221
1313
|
};
|
|
1222
|
-
}, Z = (
|
|
1223
|
-
const
|
|
1224
|
-
return { name:
|
|
1225
|
-
}, d = (
|
|
1226
|
-
const
|
|
1227
|
-
return { name:
|
|
1228
|
-
}, n = (
|
|
1229
|
-
var
|
|
1230
|
-
let
|
|
1231
|
-
const
|
|
1314
|
+
}, Z = (c, b) => {
|
|
1315
|
+
const H = "VxeCheckbox", { defaultValue: C, options: L, props: S } = n(c);
|
|
1316
|
+
return { name: H, defaultValue: C, options: L, props: S, events: k(b) };
|
|
1317
|
+
}, d = (c, b) => {
|
|
1318
|
+
const H = "VxeRadio", { defaultValue: C, options: L, props: S } = n(c);
|
|
1319
|
+
return { name: H, defaultValue: C, options: L, props: S, events: k(b) };
|
|
1320
|
+
}, n = (c) => {
|
|
1321
|
+
var I;
|
|
1322
|
+
let b = { disabled: !1 }, H;
|
|
1323
|
+
const C = storageLocal.getItem("kLov");
|
|
1232
1324
|
let L = "";
|
|
1233
|
-
isObject(
|
|
1234
|
-
const
|
|
1235
|
-
return { props:
|
|
1236
|
-
}, f = (
|
|
1237
|
-
const
|
|
1325
|
+
isObject(c) ? (H = c.defaultValue, L = c.code, b = Object.assign(b, c || {})) : isString(c) && (L = c);
|
|
1326
|
+
const S = L ? (I = C[L]) == null ? void 0 : I.children.map((D) => ({ label: D.dictName, value: D.dictCode })) : [];
|
|
1327
|
+
return { props: b, defaultValue: H, options: S };
|
|
1328
|
+
}, f = (c, b) => {
|
|
1329
|
+
const H = k(b);
|
|
1238
1330
|
return {
|
|
1239
|
-
name: "
|
|
1331
|
+
name: "VxeNumberInput",
|
|
1240
1332
|
props: Object.assign(
|
|
1241
1333
|
{ type: "number", clearable: !0, min: 0, controls: !1 },
|
|
1242
|
-
|
|
1334
|
+
c || {}
|
|
1243
1335
|
),
|
|
1244
|
-
defaultValue:
|
|
1245
|
-
events:
|
|
1336
|
+
defaultValue: c == null ? void 0 : c.defaultValue,
|
|
1337
|
+
events: H
|
|
1246
1338
|
};
|
|
1247
|
-
},
|
|
1248
|
-
const
|
|
1249
|
-
return { name: "
|
|
1250
|
-
}, m = (
|
|
1251
|
-
const
|
|
1252
|
-
return {
|
|
1253
|
-
|
|
1254
|
-
|
|
1339
|
+
}, u = (c, b) => {
|
|
1340
|
+
const H = k(b), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.defaultValue;
|
|
1341
|
+
return { name: "VxeDatePicker", props: Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {}), defaultValue: L, events: H };
|
|
1342
|
+
}, m = (c, b) => {
|
|
1343
|
+
const H = k(b), C = "yyyy-MM-dd HH:mm:ss", L = c == null ? void 0 : c.startValue, S = c == null ? void 0 : c.endValue, I = c == null ? void 0 : c.startField, D = c == null ? void 0 : c.endField, T = Object.assign({ type: "date", valueFormat: C, clearable: !0 }, c || {});
|
|
1344
|
+
return {
|
|
1345
|
+
name: "VxeDateRangePicker",
|
|
1346
|
+
startField: I,
|
|
1347
|
+
endField: D,
|
|
1348
|
+
startValue: L,
|
|
1349
|
+
endValue: S,
|
|
1350
|
+
props: T,
|
|
1351
|
+
events: H
|
|
1352
|
+
};
|
|
1353
|
+
}, s = (c, b) => {
|
|
1354
|
+
const H = k(b);
|
|
1355
|
+
return { name: "#lov", props: Object.assign({}, c || {}), events: H };
|
|
1356
|
+
}, M = (c, b) => {
|
|
1357
|
+
const H = k(b), C = (c == null ? void 0 : c.optionProps) || {
|
|
1255
1358
|
label: "label",
|
|
1256
1359
|
value: "value"
|
|
1257
1360
|
}, L = Object.assign(
|
|
1258
1361
|
{ clearable: !0, disabled: !1, showValue: !1 },
|
|
1259
|
-
|
|
1362
|
+
c || {}
|
|
1260
1363
|
);
|
|
1261
1364
|
return console.log("itemRender"), {
|
|
1262
1365
|
name: "#select",
|
|
1263
|
-
optionProps:
|
|
1264
|
-
options: (
|
|
1366
|
+
optionProps: C,
|
|
1367
|
+
options: (c == null ? void 0 : c.options) || [],
|
|
1265
1368
|
props: L,
|
|
1266
|
-
events:
|
|
1369
|
+
events: H
|
|
1267
1370
|
};
|
|
1268
|
-
},
|
|
1269
|
-
let
|
|
1371
|
+
}, p = (c, b) => {
|
|
1372
|
+
let H = {
|
|
1270
1373
|
openLabel: "是",
|
|
1271
1374
|
closeLabel: "否",
|
|
1272
1375
|
openValue: "Y",
|
|
1273
1376
|
closeValue: "N"
|
|
1274
|
-
},
|
|
1275
|
-
isObject(
|
|
1276
|
-
const L = isFunction(
|
|
1277
|
-
return { name: "VxeSwitch", props:
|
|
1278
|
-
},
|
|
1279
|
-
const
|
|
1377
|
+
}, C = "Y";
|
|
1378
|
+
isObject(c) && !isFunction(c) ? (H = Object.assign(H, c || {}), C = c.defaultValue || C) : !isEmpty(c) && isString(c) && (C = c, H = Object.assign(H, { defaultValue: C }));
|
|
1379
|
+
const L = isFunction(c) ? k(c) : k(b);
|
|
1380
|
+
return { name: "VxeSwitch", props: H, defaultValue: C, events: L };
|
|
1381
|
+
}, y = (c, b) => ({ name: "#tag", props: { code: c, tagMap: b } }), A = (c, b) => {
|
|
1382
|
+
const H = {
|
|
1280
1383
|
openLabel: "启用",
|
|
1281
1384
|
closeLabel: "禁用",
|
|
1282
1385
|
openValue: "1",
|
|
1283
1386
|
closeValue: "0",
|
|
1284
1387
|
defaultValue: "1"
|
|
1285
1388
|
};
|
|
1286
|
-
!isFunction(
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1289
|
-
},
|
|
1290
|
-
const
|
|
1389
|
+
!isFunction(c) && isObject(c) && Object.assign(H, c);
|
|
1390
|
+
const C = isFunction(c) ? c : b;
|
|
1391
|
+
return p(H, C);
|
|
1392
|
+
}, w = () => ({ name: "#iconSelect" }), V = (c = [], b = {}, H) => ({ name: "#treeSelect", sourceData: c, props: b, events: H }), R = (c, b) => {
|
|
1393
|
+
const H = k(b);
|
|
1291
1394
|
return {
|
|
1292
1395
|
name: "#area",
|
|
1293
|
-
props: { mapField: (
|
|
1294
|
-
events:
|
|
1396
|
+
props: { mapField: (c == null ? void 0 : c.mapField) || ["province", "city", "region"] },
|
|
1397
|
+
events: H
|
|
1295
1398
|
};
|
|
1296
|
-
}, k = (
|
|
1297
|
-
let
|
|
1298
|
-
return isObject(
|
|
1299
|
-
change: (
|
|
1300
|
-
blur: (
|
|
1301
|
-
focus: (
|
|
1302
|
-
input: (
|
|
1303
|
-
clear: (
|
|
1304
|
-
searchClick:
|
|
1305
|
-
suffixClick:
|
|
1306
|
-
prefixClick:
|
|
1307
|
-
filterMethod:
|
|
1308
|
-
} :
|
|
1309
|
-
},
|
|
1310
|
-
|
|
1311
|
-
const { singleMode:
|
|
1312
|
-
return
|
|
1399
|
+
}, k = (c) => {
|
|
1400
|
+
let b = {};
|
|
1401
|
+
return isObject(c) && !isFunction(c) ? b = {
|
|
1402
|
+
change: (c == null ? void 0 : c.change) || F,
|
|
1403
|
+
blur: (c == null ? void 0 : c.blur) || F,
|
|
1404
|
+
focus: (c == null ? void 0 : c.focus) || F,
|
|
1405
|
+
input: (c == null ? void 0 : c.input) || F,
|
|
1406
|
+
clear: (c == null ? void 0 : c.clear) || F,
|
|
1407
|
+
searchClick: c == null ? void 0 : c.searchClick,
|
|
1408
|
+
suffixClick: c == null ? void 0 : c.suffixClick,
|
|
1409
|
+
prefixClick: c == null ? void 0 : c.prefixClick,
|
|
1410
|
+
filterMethod: c == null ? void 0 : c.filterMethod
|
|
1411
|
+
} : c && (b = { change: c }), b;
|
|
1412
|
+
}, E = (c, b) => {
|
|
1413
|
+
c = c || { fieldType: "sting", mode: "image" };
|
|
1414
|
+
const { singleMode: H, mode: C } = c;
|
|
1415
|
+
return H && Object.assign(c, {
|
|
1313
1416
|
multiple: !1,
|
|
1314
1417
|
limitCount: 1,
|
|
1315
1418
|
autoHiddenButton: !0
|
|
1316
|
-
}),
|
|
1419
|
+
}), C === "image" && (c.imageTypes = ["jpg", "jpeg", "png", "gif", "apk"]), { name: "#upload", props: c, events: b };
|
|
1317
1420
|
};
|
|
1318
|
-
function
|
|
1421
|
+
function F() {
|
|
1319
1422
|
}
|
|
1320
1423
|
return {
|
|
1321
1424
|
renderDict: l,
|
|
1322
1425
|
renderSelect: o,
|
|
1323
1426
|
renderInput: t,
|
|
1324
|
-
renderTextarea:
|
|
1427
|
+
renderTextarea: v,
|
|
1325
1428
|
renderCheckBox: Z,
|
|
1326
1429
|
renderRadio: d,
|
|
1327
1430
|
renderUser: h,
|
|
@@ -1329,16 +1432,17 @@ const useRender = () => {
|
|
|
1329
1432
|
renderInvOrg: e,
|
|
1330
1433
|
renderBU: i,
|
|
1331
1434
|
renderNumber: f,
|
|
1332
|
-
renderLov:
|
|
1333
|
-
renderSelectLocal:
|
|
1334
|
-
renderDate:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1435
|
+
renderLov: s,
|
|
1436
|
+
renderSelectLocal: M,
|
|
1437
|
+
renderDate: u,
|
|
1438
|
+
renderRangeDate: m,
|
|
1439
|
+
renderSwitch: p,
|
|
1440
|
+
renderCellTag: y,
|
|
1441
|
+
renderEnabled: A,
|
|
1442
|
+
renderIconSelect: w,
|
|
1443
|
+
renderTreeSelect: V,
|
|
1444
|
+
renderArea: R,
|
|
1445
|
+
renderUpload: E
|
|
1342
1446
|
};
|
|
1343
1447
|
}, useGlobal = () => {
|
|
1344
1448
|
const a = getCurrentInstance();
|
|
@@ -1410,11 +1514,11 @@ const deviceDetection = () => {
|
|
|
1410
1514
|
h.title = h.title || `message.${h.field}`, h.span = h.span || o, h.type === "collapseNode" && (h.title = "", h.titleWidth = 0);
|
|
1411
1515
|
let t = !1;
|
|
1412
1516
|
l === "detail" ? (t = !0, h.placeholder = null) : t = h.disabled === !1 ? h.disabled : h.disabled || ((i = (e = h.itemRender) == null ? void 0 : e.props) == null ? void 0 : i.disabled);
|
|
1413
|
-
let
|
|
1517
|
+
let v = {
|
|
1414
1518
|
name: "VxeInput",
|
|
1415
1519
|
props: { disabled: t, placeholder: t ? "" : h.placeholder }
|
|
1416
1520
|
};
|
|
1417
|
-
return h.code && !h.itemRender && (
|
|
1521
|
+
return h.code && !h.itemRender && (v = renderHook.renderDict(h.code)), h.itemRender = h.itemRender || v, h.itemRender.props = Object.assign(h.itemRender.props || {}, {
|
|
1418
1522
|
disabled: t
|
|
1419
1523
|
}), h;
|
|
1420
1524
|
}
|
|
@@ -1448,17 +1552,17 @@ const deviceDetection = () => {
|
|
|
1448
1552
|
collapseTagsTooltip: !0,
|
|
1449
1553
|
multiple: !0
|
|
1450
1554
|
}, t = o.map((Z, d) => {
|
|
1451
|
-
var n, f,
|
|
1555
|
+
var n, f, u;
|
|
1452
1556
|
return Z.folding = r ? e && d > 1 : e && d > 2, Z.span = getDateRange(Z) ? 12 : Z.span || 6, Z.code && !Z.itemRender && (Z.itemRender = renderHook.renderDict(Z.code)), Z.itemRender = Z.itemRender || { name: "VxeInput" }, Z.resetValue = Z.itemRender.defaultValue, Z.title = Z.title || `message.${Z.field}`, (Z.multiple || (f = (n = Z.itemRender) == null ? void 0 : n.props) != null && f.multiple) && (Z.itemRender.props = Object.assign(
|
|
1453
1557
|
i,
|
|
1454
|
-
((
|
|
1558
|
+
((u = Z.itemRender) == null ? void 0 : u.props) || {}
|
|
1455
1559
|
)), Z;
|
|
1456
|
-
}),
|
|
1457
|
-
if (
|
|
1560
|
+
}), v = clone(formSearchButtons, !0);
|
|
1561
|
+
if (v.collapseNode = e, l && v.itemRender.options.length < 3 && (v.itemRender.options.push(l), v.itemRender.events = l.events), e) {
|
|
1458
1562
|
const Z = r ? 2 : 3;
|
|
1459
|
-
t.splice(Z, 0,
|
|
1563
|
+
t.splice(Z, 0, v);
|
|
1460
1564
|
} else
|
|
1461
|
-
t.push(
|
|
1565
|
+
t.push(v);
|
|
1462
1566
|
return t;
|
|
1463
1567
|
}, getDateRange = (a) => {
|
|
1464
1568
|
var l, o, h, r, e;
|
|
@@ -1558,9 +1662,9 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1558
1662
|
}
|
|
1559
1663
|
}, g = class g {
|
|
1560
1664
|
constructor() {
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1665
|
+
x(this, "router");
|
|
1666
|
+
x(this, "baseUrl", null);
|
|
1667
|
+
x(this, "getNetworkError", (l) => l ? {
|
|
1564
1668
|
400: "错误的请求",
|
|
1565
1669
|
401: "服务未授权,请重新登录",
|
|
1566
1670
|
403: "拒绝访问",
|
|
@@ -1597,8 +1701,8 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1597
1701
|
const e = JSON.parse(r), i = (/* @__PURE__ */ new Date()).getTime();
|
|
1598
1702
|
e.expires - i <= 0 ? (g.isRefreshing || (g.isRefreshing = !0, this.get(this.baseUrl + "/uath/refreshToken", {
|
|
1599
1703
|
refreshToken: e.refreshToken
|
|
1600
|
-
}).then((
|
|
1601
|
-
this.setToken(
|
|
1704
|
+
}).then((v) => {
|
|
1705
|
+
this.setToken(v), l.headers.Authorization = "Bearer " + v.access_token, g.requests.forEach((Z) => Z(v.access_token)), g.requests = [];
|
|
1602
1706
|
}).finally(() => {
|
|
1603
1707
|
g.isRefreshing = !1;
|
|
1604
1708
|
})), h(g.retryOriginalRequest(l))) : (l.headers.Authorization = "Bearer " + e.accessToken, h(l));
|
|
@@ -1647,28 +1751,28 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1647
1751
|
...r
|
|
1648
1752
|
});
|
|
1649
1753
|
return new Promise((i, t) => {
|
|
1650
|
-
g.axiosInstance.request(e).then((
|
|
1651
|
-
if (
|
|
1652
|
-
i(
|
|
1653
|
-
else if (
|
|
1654
|
-
errorMessage(
|
|
1655
|
-
else if ((
|
|
1656
|
-
i(
|
|
1754
|
+
g.axiosInstance.request(e).then((v) => {
|
|
1755
|
+
if (v && (v == null ? void 0 : v.code) === "0")
|
|
1756
|
+
i(v.data);
|
|
1757
|
+
else if (v.code === "500")
|
|
1758
|
+
errorMessage(v.msg, { duration: 8e3 }), e.method === "get" ? i(v) : t(v.msg);
|
|
1759
|
+
else if ((v == null ? void 0 : v.code) !== "-1")
|
|
1760
|
+
i(v);
|
|
1657
1761
|
else {
|
|
1658
|
-
const Z = (
|
|
1762
|
+
const Z = (v == null ? void 0 : v.msg) || "服务异常";
|
|
1659
1763
|
errorMessage(Z, { duration: 8e3 }), t(Z);
|
|
1660
1764
|
}
|
|
1661
|
-
}).catch((
|
|
1765
|
+
}).catch((v) => {
|
|
1662
1766
|
var Z, d, n;
|
|
1663
|
-
if (
|
|
1664
|
-
if (((Z =
|
|
1767
|
+
if (v != null && v.code) {
|
|
1768
|
+
if (((Z = v == null ? void 0 : v.response) == null ? void 0 : Z.status) === 401)
|
|
1665
1769
|
return (d = this.router) == null ? void 0 : d.push({ path: "/login" });
|
|
1666
1770
|
errorMessage(
|
|
1667
|
-
this.getNetworkError((n =
|
|
1771
|
+
this.getNetworkError((n = v == null ? void 0 : v.response) == null ? void 0 : n.status) || (v == null ? void 0 : v.message),
|
|
1668
1772
|
{ duration: 8e3 }
|
|
1669
1773
|
);
|
|
1670
1774
|
}
|
|
1671
|
-
|
|
1775
|
+
v.config.method === "get" ? i(v) : t(v);
|
|
1672
1776
|
});
|
|
1673
1777
|
});
|
|
1674
1778
|
}
|
|
@@ -1695,10 +1799,10 @@ const kTOKENKEY = "authorized-token", defaultConfig = {
|
|
|
1695
1799
|
}
|
|
1696
1800
|
};
|
|
1697
1801
|
/** token过期后,暂存待执行的请求 */
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1802
|
+
x(g, "requests", []), /** 防止重复刷新token */
|
|
1803
|
+
x(g, "isRefreshing", !1), // 初始化配置对象
|
|
1804
|
+
x(g, "initConfig", {}), // 保存当前Axios实例对象
|
|
1805
|
+
x(g, "axiosInstance", Axios.create(defaultConfig));
|
|
1702
1806
|
let SuHttp = g;
|
|
1703
1807
|
const http = new SuHttp(), lunarCalendar = {
|
|
1704
1808
|
/**
|
|
@@ -2501,7 +2605,7 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2501
2605
|
return -1;
|
|
2502
2606
|
let i;
|
|
2503
2607
|
h ? i = new Date(h, parseInt(r.toString()) - 1, e) : i = /* @__PURE__ */ new Date();
|
|
2504
|
-
let t,
|
|
2608
|
+
let t, v = 0, Z = 0;
|
|
2505
2609
|
h = i.getFullYear(), r = i.getMonth() + 1, e = i.getDate();
|
|
2506
2610
|
let d = (Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()) - Date.UTC(1900, 0, 31)) / 864e5;
|
|
2507
2611
|
for (t = 1900; t < 2101 && d > 0; t++)
|
|
@@ -2510,46 +2614,46 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2510
2614
|
const n = /* @__PURE__ */ new Date();
|
|
2511
2615
|
let f = !1;
|
|
2512
2616
|
n.getFullYear() === h && n.getMonth() + 1 === r && n.getDate() === e && (f = !0);
|
|
2513
|
-
let
|
|
2514
|
-
const m = this.nStr1[
|
|
2515
|
-
|
|
2617
|
+
let u = i.getDay();
|
|
2618
|
+
const m = this.nStr1[u];
|
|
2619
|
+
u === 0 && (u = 7);
|
|
2516
2620
|
const s = t;
|
|
2517
|
-
|
|
2518
|
-
let
|
|
2621
|
+
v = this.leapMonth(t);
|
|
2622
|
+
let M = !1;
|
|
2519
2623
|
for (t = 1; t < 13 && d > 0; t++)
|
|
2520
|
-
|
|
2521
|
-
d === 0 &&
|
|
2522
|
-
const
|
|
2523
|
-
let
|
|
2524
|
-
e >= V && (
|
|
2525
|
-
let
|
|
2526
|
-
V === e && (
|
|
2527
|
-
const
|
|
2528
|
-
let
|
|
2529
|
-
return
|
|
2530
|
-
date:
|
|
2531
|
-
lunarDate:
|
|
2532
|
-
festival: D
|
|
2533
|
-
lunarFestival:
|
|
2624
|
+
v > 0 && t === v + 1 && M === !1 ? (--t, M = !0, Z = this.leapDays(s)) : Z = this.monthDays(s, t), M === !0 && t === v + 1 && (M = !1), d -= Z;
|
|
2625
|
+
d === 0 && v > 0 && t === v + 1 && (M ? M = !1 : (M = !0, --t)), d < 0 && (d += Z, --t);
|
|
2626
|
+
const p = t, y = d + 1, A = r - 1, w = this.toGanZhiYear(s), V = this.getTerm(h, r * 2 - 1), R = this.getTerm(h, r * 2);
|
|
2627
|
+
let k = this.toGanZhi((h - 1900) * 12 + r + 11);
|
|
2628
|
+
e >= V && (k = this.toGanZhi((h - 1900) * 12 + r + 12));
|
|
2629
|
+
let E = !1, F;
|
|
2630
|
+
V === e && (E = !0, F = this.solarTerm[r * 2 - 2]), R === e && (E = !0, F = this.solarTerm[r * 2 - 1]);
|
|
2631
|
+
const c = Date.UTC(h, A, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10, b = this.toGanZhi(c + e - 1), H = this.toAstro(r, e), C = h + "-" + r + "-" + e, L = s + "-" + p + "-" + y, S = this.festival, I = this.lFestival, D = r + "-" + e;
|
|
2632
|
+
let N = p + "-" + y;
|
|
2633
|
+
return p === 12 && y === 29 && this.monthDays(s, p) === 29 && (N = "12-30"), {
|
|
2634
|
+
date: C,
|
|
2635
|
+
lunarDate: L,
|
|
2636
|
+
festival: S[D] ? S[D].title : null,
|
|
2637
|
+
lunarFestival: I[N] ? I[N].title : null,
|
|
2534
2638
|
lYear: s,
|
|
2535
|
-
lMonth:
|
|
2536
|
-
lDay:
|
|
2639
|
+
lMonth: p,
|
|
2640
|
+
lDay: y,
|
|
2537
2641
|
Animal: this.getAnimal(s),
|
|
2538
|
-
IMonthCn: (
|
|
2539
|
-
IDayCn: this.toChinaDay(
|
|
2642
|
+
IMonthCn: (M ? "闰" : "") + this.toChinaMonth(p),
|
|
2643
|
+
IDayCn: this.toChinaDay(y),
|
|
2540
2644
|
cYear: h,
|
|
2541
2645
|
cMonth: r,
|
|
2542
2646
|
cDay: e,
|
|
2543
2647
|
gzYear: w,
|
|
2544
|
-
gzMonth:
|
|
2648
|
+
gzMonth: k,
|
|
2545
2649
|
gzDay: b,
|
|
2546
2650
|
isToday: f,
|
|
2547
|
-
isLeap:
|
|
2548
|
-
nWeek:
|
|
2651
|
+
isLeap: M,
|
|
2652
|
+
nWeek: u,
|
|
2549
2653
|
ncWeek: "星期" + m,
|
|
2550
|
-
isTerm:
|
|
2551
|
-
Term:
|
|
2552
|
-
astro:
|
|
2654
|
+
isTerm: E,
|
|
2655
|
+
Term: F,
|
|
2656
|
+
astro: H
|
|
2553
2657
|
};
|
|
2554
2658
|
},
|
|
2555
2659
|
/**
|
|
@@ -2571,15 +2675,15 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2571
2675
|
let i = e;
|
|
2572
2676
|
if (h && (i = this.leapDays(a)), a < 1900 || a > 2100 || o > i)
|
|
2573
2677
|
return -1;
|
|
2574
|
-
let t = 0,
|
|
2575
|
-
for (
|
|
2576
|
-
t += this.lYearDays(
|
|
2678
|
+
let t = 0, v;
|
|
2679
|
+
for (v = 1900; v < a; v++)
|
|
2680
|
+
t += this.lYearDays(v);
|
|
2577
2681
|
let Z = 0, d = !1;
|
|
2578
|
-
for (
|
|
2579
|
-
Z = this.leapMonth(a), d || Z <=
|
|
2682
|
+
for (v = 1; v < l; v++)
|
|
2683
|
+
Z = this.leapMonth(a), d || Z <= v && Z > 0 && (t += this.leapDays(a), d = !0), t += this.monthDays(a, v);
|
|
2580
2684
|
h && (t += e);
|
|
2581
|
-
const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + o - 31) * 864e5 + n),
|
|
2582
|
-
return this.solar2lunar(
|
|
2685
|
+
const n = Date.UTC(1900, 1, 30, 0, 0, 0), f = new Date((t + o - 31) * 864e5 + n), u = f.getUTCFullYear(), m = f.getUTCMonth() + 1, s = f.getUTCDate();
|
|
2686
|
+
return this.solar2lunar(u, m, s);
|
|
2583
2687
|
}
|
|
2584
2688
|
}, dict = storageLocal.getItem("kLov"), formats = {
|
|
2585
2689
|
formatDate: {
|
|
@@ -2646,7 +2750,7 @@ const http = new SuHttp(), lunarCalendar = {
|
|
|
2646
2750
|
const [o, h] = l;
|
|
2647
2751
|
let r;
|
|
2648
2752
|
return (e = a[o]) == null || e.split(",").forEach((i) => {
|
|
2649
|
-
const t = h.find((
|
|
2753
|
+
const t = h.find((v) => v.value === i);
|
|
2650
2754
|
r = r ? `${r},${t == null ? void 0 : t.label}` : t == null ? void 0 : t.label;
|
|
2651
2755
|
}), r;
|
|
2652
2756
|
}
|
|
@@ -10299,7 +10403,7 @@ const getDictName = (a, l) => {
|
|
|
10299
10403
|
return !a || !l ? null : (r = (h = storageLocal.getItem("kLov")[a]) == null ? void 0 : h.children.find((e) => l === e.dictCode)) == null ? void 0 : r.dictName;
|
|
10300
10404
|
};
|
|
10301
10405
|
export {
|
|
10302
|
-
|
|
10406
|
+
G as NProgress,
|
|
10303
10407
|
VxetableRender,
|
|
10304
10408
|
addClass,
|
|
10305
10409
|
addResizeListener,
|