@jt-home/mfe-components 1.0.56 → 1.0.58
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/JtAttachmentPreview/index.cjs +1 -1
- package/dist/JtAttachmentPreview/index.mjs +1 -1
- package/dist/{index-CTj7lrC9.js → index-D67nILVt.js} +679 -609
- package/dist/index-DEbU13vV.cjs +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +892 -901
- package/dist/style.css +1 -1
- package/package.json +23 -24
- package/dist/index-CgZdzYF1.cjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as ps, g as ms, n as vs, r as hs, s as gs, b as ys } from "./index-
|
|
4
|
-
import { defineComponent as pe, useAttrs as
|
|
2
|
+
import { t as X, J as Ft, i as Hn } from "./index-D67nILVt.js";
|
|
3
|
+
import { a as ps, g as ms, n as vs, r as hs, s as gs, b as ys } from "./index-D67nILVt.js";
|
|
4
|
+
import { defineComponent as pe, useAttrs as Un, computed as M, openBlock as I, createBlock as H, mergeProps as ae, toHandlers as et, withCtx as W, renderSlot as te, resolveDynamicComponent as Yt, createCommentVNode as fe, ref as ge, watch as je, mergeDefaults as Jn, withKeys as Wn, createElementBlock as K, Fragment as Se, renderList as ye, normalizeStyle as $t, nextTick as Zn, useSlots as Le, normalizeClass as We, createVNode as ke, withModifiers as Ht, unref as J, createSlots as Ne, createElementVNode as ne, toDisplayString as oe, normalizeProps as Oe, guardReactiveProps as Be, useModel as vt, withDirectives as Qn, mergeModels as Bt, shallowRef as Ve, onMounted as Ut, onBeforeUnmount as Xn, createTextVNode as Ue, resolveComponent as eo, onErrorCaptured as to } from "vue";
|
|
5
5
|
import { ElButton as Ct, ElIcon as Jt, ElCascader as no, ElDatePicker as Wt, ElInput as Zt, ElSelect as Qt, ElOption as Xt, ElFormItem as en, ElForm as tn, ElTable as nn, ElTableColumn as on, ElPagination as oo, ElLoadingDirective as ro, ElInputNumber as ao, ElSwitch as so, ElPopconfirm as lo } from "element-plus/es";
|
|
6
6
|
import { cascaderEmits as io, inputEmits as Lt, selectEmits as Pt } from "element-plus";
|
|
7
7
|
const bt = 2, co = 3;
|
|
@@ -55,7 +55,7 @@ const po = /* @__PURE__ */ pe({
|
|
|
55
55
|
tag: {}
|
|
56
56
|
},
|
|
57
57
|
setup(e) {
|
|
58
|
-
const t = e, n =
|
|
58
|
+
const t = e, n = Un(), o = M(() => {
|
|
59
59
|
const { icon: c, ...s } = t;
|
|
60
60
|
return {
|
|
61
61
|
...sn(n),
|
|
@@ -64,9 +64,9 @@ const po = /* @__PURE__ */ pe({
|
|
|
64
64
|
}), r = M(() => an(n));
|
|
65
65
|
return (c, s) => {
|
|
66
66
|
const i = Jt, a = Ct;
|
|
67
|
-
return I(),
|
|
67
|
+
return I(), H(a, ae({ class: "jt-button" }, o.value, et(r.value)), {
|
|
68
68
|
default: W(() => [
|
|
69
|
-
c.$slots.icon ? (I(),
|
|
69
|
+
c.$slots.icon ? (I(), H(i, {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "jt-button__icon"
|
|
72
72
|
}, {
|
|
@@ -74,12 +74,12 @@ const po = /* @__PURE__ */ pe({
|
|
|
74
74
|
te(c.$slots, "icon", {}, void 0, !0)
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
77
|
-
})) : t.icon ? (I(),
|
|
77
|
+
})) : t.icon ? (I(), H(i, {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "jt-button__icon"
|
|
80
80
|
}, {
|
|
81
81
|
default: W(() => [
|
|
82
|
-
(I(),
|
|
82
|
+
(I(), H(Yt(t.icon)))
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
85
|
})) : fe("", !0),
|
|
@@ -161,7 +161,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
161
161
|
const { placeholder: S, ...k } = f;
|
|
162
162
|
return k;
|
|
163
163
|
}), r = ge(n.modelValue);
|
|
164
|
-
|
|
164
|
+
je(
|
|
165
165
|
() => n.modelValue,
|
|
166
166
|
(f) => {
|
|
167
167
|
r.value = f;
|
|
@@ -190,15 +190,15 @@ const ho = /* @__PURE__ */ pe({
|
|
|
190
190
|
function $(f) {
|
|
191
191
|
s("visibleChange", f);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function j(f) {
|
|
194
194
|
s("expandChange", f);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function A(f) {
|
|
197
197
|
s("removeTag", f);
|
|
198
198
|
}
|
|
199
199
|
return (f, S) => {
|
|
200
200
|
const k = no;
|
|
201
|
-
return I(),
|
|
201
|
+
return I(), H(k, ae({ class: "jt-cascader" }, o.value, {
|
|
202
202
|
"model-value": r.value,
|
|
203
203
|
"onUpdate:modelValue": i,
|
|
204
204
|
onChange: a,
|
|
@@ -206,8 +206,8 @@ const ho = /* @__PURE__ */ pe({
|
|
|
206
206
|
onBlur: g,
|
|
207
207
|
onClear: w,
|
|
208
208
|
onVisibleChange: $,
|
|
209
|
-
onExpandChange:
|
|
210
|
-
onRemoveTag:
|
|
209
|
+
onExpandChange: j,
|
|
210
|
+
onRemoveTag: A
|
|
211
211
|
}), null, 16, ["model-value"]);
|
|
212
212
|
};
|
|
213
213
|
}
|
|
@@ -273,8 +273,8 @@ const ho = /* @__PURE__ */ pe({
|
|
|
273
273
|
}
|
|
274
274
|
return {
|
|
275
275
|
...c,
|
|
276
|
-
startPlaceholder: t.startPlaceholder ?? (o(t.type) ?
|
|
277
|
-
endPlaceholder: t.endPlaceholder ?? (o(t.type) ?
|
|
276
|
+
startPlaceholder: t.startPlaceholder ?? (o(t.type) ? X("common.开始日期") : void 0),
|
|
277
|
+
endPlaceholder: t.endPlaceholder ?? (o(t.type) ? X("common.结束日期") : void 0)
|
|
278
278
|
};
|
|
279
279
|
});
|
|
280
280
|
function o(r) {
|
|
@@ -282,7 +282,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
282
282
|
}
|
|
283
283
|
return (r, c) => {
|
|
284
284
|
const s = Wt;
|
|
285
|
-
return I(),
|
|
285
|
+
return I(), H(s, ae({ class: "jt-date-picker" }, n.value, {
|
|
286
286
|
"onUpdate:modelValue": c[0] || (c[0] = (i) => r.$emit("update:modelValue", i))
|
|
287
287
|
}), null, 16);
|
|
288
288
|
};
|
|
@@ -335,7 +335,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
335
335
|
const { preservePlaceholderWhenDisabled: s, placeholder: i, ...a } = n, l = {
|
|
336
336
|
...a,
|
|
337
337
|
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
338
|
-
placeholder: i ??
|
|
338
|
+
placeholder: i ?? X("common.请输入")
|
|
339
339
|
};
|
|
340
340
|
return !n.disabled || s ? l : Object.fromEntries(
|
|
341
341
|
Object.entries(l).filter(([g]) => g !== "placeholder")
|
|
@@ -348,7 +348,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
348
348
|
));
|
|
349
349
|
return (s, i) => {
|
|
350
350
|
const a = Zt;
|
|
351
|
-
return I(),
|
|
351
|
+
return I(), H(a, ae({ class: "jt-input" }, o.value, et(c.value), {
|
|
352
352
|
onKeyup: i[0] || (i[0] = Wn((l) => r("enter"), ["enter"]))
|
|
353
353
|
}), null, 16);
|
|
354
354
|
};
|
|
@@ -418,7 +418,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
418
418
|
return n.disabled && !a ? l : {
|
|
419
419
|
...l,
|
|
420
420
|
// 未显式配置 placeholder 时,每次渲染按当前语言重新读取默认文案。
|
|
421
|
-
placeholder: i ??
|
|
421
|
+
placeholder: i ?? X("common.请选择")
|
|
422
422
|
};
|
|
423
423
|
}), r = t, c = M(() => Object.fromEntries(
|
|
424
424
|
Object.keys(Pt).map((s) => [
|
|
@@ -428,9 +428,9 @@ const ho = /* @__PURE__ */ pe({
|
|
|
428
428
|
));
|
|
429
429
|
return (s, i) => {
|
|
430
430
|
const a = Xt, l = Qt;
|
|
431
|
-
return I(),
|
|
431
|
+
return I(), H(l, ae({ class: "jt-select" }, o.value, et(c.value)), {
|
|
432
432
|
default: W(() => [
|
|
433
|
-
(I(!0), K(Se, null, ye(s.options ?? [], (g) => (I(),
|
|
433
|
+
(I(!0), K(Se, null, ye(s.options ?? [], (g) => (I(), H(a, ae({
|
|
434
434
|
key: g.value,
|
|
435
435
|
ref_for: !0
|
|
436
436
|
}, g), null, 16))), 128))
|
|
@@ -482,7 +482,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
482
482
|
}), $ = (y, h) => {
|
|
483
483
|
t.formData[y] = h;
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function j(y) {
|
|
486
486
|
return (h) => {
|
|
487
487
|
if (h) {
|
|
488
488
|
s.set(y, h);
|
|
@@ -491,7 +491,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
491
491
|
s.delete(y);
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function A(y, h) {
|
|
495
495
|
Zn(() => {
|
|
496
496
|
s.get(y)?.validate(h).catch(() => {
|
|
497
497
|
});
|
|
@@ -516,29 +516,29 @@ const ho = /* @__PURE__ */ pe({
|
|
|
516
516
|
return (y, h) => {
|
|
517
517
|
const D = en;
|
|
518
518
|
return I(), K("div", wo, [
|
|
519
|
-
(I(!0), K(Se, null, ye(i.value, (b) => (I(),
|
|
519
|
+
(I(!0), K(Se, null, ye(i.value, (b) => (I(), H(D, ae({
|
|
520
520
|
key: b.prop,
|
|
521
521
|
ref_for: !0,
|
|
522
|
-
ref:
|
|
522
|
+
ref: j(b.prop),
|
|
523
523
|
class: "jt-form-items__item",
|
|
524
524
|
style: k(b),
|
|
525
525
|
label: b.label,
|
|
526
526
|
prop: b.prop
|
|
527
527
|
}, w(b)), {
|
|
528
528
|
default: W(() => [
|
|
529
|
-
b.showSlot ? te(y.$slots, b.prop, { key: 0 }, void 0, !0) : (I(),
|
|
529
|
+
b.showSlot ? te(y.$slots, b.prop, { key: 0 }, void 0, !0) : (I(), H(Yt(a(b)), ae({
|
|
530
530
|
key: 1,
|
|
531
531
|
"model-value": y.formData[b.prop],
|
|
532
532
|
ref_for: !0
|
|
533
533
|
}, l(b), et(g(b)), {
|
|
534
|
-
"onUpdate:modelValue": (
|
|
535
|
-
onChange: () =>
|
|
536
|
-
onBlur: () =>
|
|
534
|
+
"onUpdate:modelValue": (V) => $(b.prop, V),
|
|
535
|
+
onChange: () => A(b.prop, "change"),
|
|
536
|
+
onBlur: () => A(b.prop, "blur")
|
|
537
537
|
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
538
538
|
]),
|
|
539
539
|
_: 2
|
|
540
540
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
541
|
-
y.$slots.actions ? (I(),
|
|
541
|
+
y.$slots.actions ? (I(), H(D, {
|
|
542
542
|
key: 0,
|
|
543
543
|
class: "jt-form-items__actions",
|
|
544
544
|
style: $t(S.value)
|
|
@@ -576,75 +576,75 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
576
576
|
},
|
|
577
577
|
emits: ["update:modelValue", "search", "reset"],
|
|
578
578
|
setup(e, { expose: t, emit: n }) {
|
|
579
|
-
const o = e, r = n, c = ge(), s =
|
|
579
|
+
const o = e, r = n, c = ge(), s = Le(), i = ge({}), { searchDisabled: a, searchLoading: l, searchDone: g } = Co(), w = M(() => o.option), $ = ge(w.value.searchCollapsed ?? !0), j = M(
|
|
580
580
|
() => o.columns.filter((T) => T.search === !0)
|
|
581
|
-
),
|
|
581
|
+
), A = M(
|
|
582
582
|
() => Math.max(1, w.value.searchSpan ?? 4)
|
|
583
583
|
), f = M(
|
|
584
584
|
() => Math.max(1, w.value.searchCollapsedRows ?? 1)
|
|
585
|
-
), S = M(() =>
|
|
585
|
+
), S = M(() => A.value), k = M(
|
|
586
586
|
() => Math.max(1, S.value * f.value)
|
|
587
|
-
), R = M(() =>
|
|
588
|
-
() =>
|
|
587
|
+
), R = M(() => A.value), y = M(
|
|
588
|
+
() => O.value ? "264px" : "174px"
|
|
589
589
|
), h = M(
|
|
590
|
-
() =>
|
|
590
|
+
() => q(w.value.searchLabelWidth ?? 84)
|
|
591
591
|
), D = M(
|
|
592
592
|
() => w.value.searchLabelPosition ?? "top"
|
|
593
593
|
), b = M(
|
|
594
|
-
() =>
|
|
595
|
-
),
|
|
596
|
-
() =>
|
|
597
|
-
),
|
|
594
|
+
() => G(w.value.searchGutter, 16)
|
|
595
|
+
), V = M(
|
|
596
|
+
() => G(w.value.searchRowGap, 10)
|
|
597
|
+
), v = M(
|
|
598
598
|
() => Q(w.value.searchPadding ?? "18px 4px 0")
|
|
599
|
-
),
|
|
600
|
-
if (!
|
|
599
|
+
), O = M(() => w.value.searchCollapse === !1 ? !1 : x(j.value) > k.value), E = M(() => {
|
|
600
|
+
if (!O.value || !$.value) return j.value;
|
|
601
601
|
let T = 0;
|
|
602
|
-
return
|
|
603
|
-
const ue =
|
|
602
|
+
return j.value.filter((Z) => {
|
|
603
|
+
const ue = P(Z);
|
|
604
604
|
return T + ue > k.value ? !1 : (T += ue, !0);
|
|
605
605
|
});
|
|
606
|
-
}),
|
|
607
|
-
() =>
|
|
606
|
+
}), z = M(
|
|
607
|
+
() => E.value.filter((T) => !!s[`${T.prop}-search`])
|
|
608
608
|
), re = M(() => {
|
|
609
|
-
const T =
|
|
610
|
-
return
|
|
609
|
+
const T = x(E.value);
|
|
610
|
+
return E.value.length > 0 && E.value.length <= 2 && T < A.value;
|
|
611
611
|
}), le = M(() => {
|
|
612
|
-
const T =
|
|
613
|
-
return `${Math.min(
|
|
612
|
+
const T = x(E.value);
|
|
613
|
+
return `${Math.min(A.value, T + 1)}`;
|
|
614
614
|
}), N = M(
|
|
615
|
-
() =>
|
|
615
|
+
() => E.value.map((T) => B(T))
|
|
616
616
|
);
|
|
617
|
-
|
|
617
|
+
je(
|
|
618
618
|
() => w.value.searchCollapsed,
|
|
619
619
|
(T) => {
|
|
620
620
|
typeof T == "boolean" && ($.value = T);
|
|
621
621
|
}
|
|
622
|
-
),
|
|
622
|
+
), je(
|
|
623
623
|
() => o.modelValue,
|
|
624
624
|
(T) => {
|
|
625
625
|
i.value = { ...T };
|
|
626
626
|
},
|
|
627
627
|
{ deep: !0, immediate: !0 }
|
|
628
628
|
);
|
|
629
|
-
function
|
|
629
|
+
function F(T, Z) {
|
|
630
630
|
if (a.value) return;
|
|
631
|
-
const ue = { ...i.value, [T]:
|
|
631
|
+
const ue = { ...i.value, [T]: Z };
|
|
632
632
|
i.value = ue, r("update:modelValue", ue);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
const
|
|
634
|
+
function B(T) {
|
|
635
|
+
const Z = T.searchProps ?? {}, ue = T.searchType ?? "input";
|
|
636
636
|
return {
|
|
637
|
-
...
|
|
637
|
+
...Z,
|
|
638
638
|
prop: T.prop,
|
|
639
639
|
label: T.searchLabel ?? T.label,
|
|
640
|
-
span:
|
|
640
|
+
span: P(T),
|
|
641
641
|
itemType: ue,
|
|
642
642
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
643
643
|
showSlot: !!s[`${T.prop}-search`],
|
|
644
|
-
options:
|
|
645
|
-
placeholder:
|
|
646
|
-
valueFormat:
|
|
647
|
-
disabled: a.value ||
|
|
644
|
+
options: Z.options ?? T.searchOptions ?? T.dicData,
|
|
645
|
+
placeholder: Z.placeholder ?? T.searchPlaceholder,
|
|
646
|
+
valueFormat: Z.valueFormat ?? T.searchValueFormat,
|
|
647
|
+
disabled: a.value || Z.disabled === !0,
|
|
648
648
|
preservePlaceholderWhenDisabled: a.value,
|
|
649
649
|
formItemProps: {
|
|
650
650
|
required: T.searchRequired,
|
|
@@ -652,20 +652,20 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
652
652
|
},
|
|
653
653
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
654
654
|
onEnter: (...de) => {
|
|
655
|
-
d(
|
|
655
|
+
d(Z.onEnter, ...de), u();
|
|
656
656
|
},
|
|
657
657
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
658
658
|
"onUpdate:modelValue": (de) => {
|
|
659
|
-
d(
|
|
659
|
+
d(Z["onUpdate:modelValue"], de), F(T.prop, de);
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
|
-
function d(T, ...
|
|
663
|
+
function d(T, ...Z) {
|
|
664
664
|
if (Array.isArray(T)) {
|
|
665
|
-
T.forEach((ue) => d(ue, ...
|
|
665
|
+
T.forEach((ue) => d(ue, ...Z));
|
|
666
666
|
return;
|
|
667
667
|
}
|
|
668
|
-
typeof T == "function" && T(...
|
|
668
|
+
typeof T == "function" && T(...Z);
|
|
669
669
|
}
|
|
670
670
|
async function u() {
|
|
671
671
|
if (!a.value) {
|
|
@@ -681,20 +681,20 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
681
681
|
function _() {
|
|
682
682
|
a.value || r("reset");
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function L() {
|
|
685
685
|
$.value = !$.value;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
return Math.min(
|
|
687
|
+
function P(T) {
|
|
688
|
+
return Math.min(A.value, Math.max(1, T.searchSpan ?? 1));
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
return T.reduce((
|
|
690
|
+
function x(T) {
|
|
691
|
+
return T.reduce((Z, ue) => Z + P(ue), 0);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function q(T) {
|
|
694
694
|
return typeof T == "number" ? `${T}px` : T;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
return typeof T == "number" ? T :
|
|
696
|
+
function G(T, Z) {
|
|
697
|
+
return typeof T == "number" ? T : Z;
|
|
698
698
|
}
|
|
699
699
|
function Q(T) {
|
|
700
700
|
return typeof T == "number" ? `${T}px` : T;
|
|
@@ -708,7 +708,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
708
708
|
searchLoading: l,
|
|
709
709
|
/** 关闭筛选表单禁用。 */
|
|
710
710
|
searchDone: g
|
|
711
|
-
}), (T,
|
|
711
|
+
}), (T, Z) => {
|
|
712
712
|
const ue = tn;
|
|
713
713
|
return I(), K("div", {
|
|
714
714
|
class: We(["jt-filter-bar", [
|
|
@@ -716,14 +716,14 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
716
716
|
{ "is-single-filter": re.value }
|
|
717
717
|
]]),
|
|
718
718
|
style: $t({
|
|
719
|
-
"--jt-filter-columns":
|
|
719
|
+
"--jt-filter-columns": A.value,
|
|
720
720
|
"--jt-filter-field-columns": R.value,
|
|
721
721
|
"--jt-filter-btns-width": y.value,
|
|
722
722
|
"--jt-filter-actions-start": le.value,
|
|
723
723
|
"--jt-filter-label-width": h.value,
|
|
724
724
|
"--jt-filter-column-gap": `${b.value}px`,
|
|
725
|
-
"--jt-filter-row-gap": `${
|
|
726
|
-
"--jt-filter-padding":
|
|
725
|
+
"--jt-filter-row-gap": `${V.value}px`,
|
|
726
|
+
"--jt-filter-padding": v.value
|
|
727
727
|
})
|
|
728
728
|
}, [
|
|
729
729
|
ke(ue, {
|
|
@@ -734,7 +734,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
734
734
|
"label-position": D.value,
|
|
735
735
|
"label-width": h.value,
|
|
736
736
|
disabled: J(a),
|
|
737
|
-
onSubmit:
|
|
737
|
+
onSubmit: Z[0] || (Z[0] = Ht(() => {
|
|
738
738
|
}, ["prevent"]))
|
|
739
739
|
}, {
|
|
740
740
|
default: W(() => [
|
|
@@ -750,12 +750,12 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
750
750
|
reset: _,
|
|
751
751
|
disabled: J(a),
|
|
752
752
|
collapsed: $.value,
|
|
753
|
-
toggleCollapse:
|
|
753
|
+
toggleCollapse: L
|
|
754
754
|
}, () => [
|
|
755
|
-
|
|
755
|
+
O.value ? (I(), H(J(rt), {
|
|
756
756
|
key: 0,
|
|
757
757
|
class: "jt-filter-bar__btn-collapse",
|
|
758
|
-
onClick:
|
|
758
|
+
onClick: L
|
|
759
759
|
}, {
|
|
760
760
|
icon: W(() => [
|
|
761
761
|
ne("img", {
|
|
@@ -765,7 +765,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
765
765
|
}, null, 10, Do)
|
|
766
766
|
]),
|
|
767
767
|
default: W(() => [
|
|
768
|
-
ne("span", null, oe($.value ? J(
|
|
768
|
+
ne("span", null, oe($.value ? J(X)("common.展开") : J(X)("common.收起")), 1)
|
|
769
769
|
]),
|
|
770
770
|
_: 1
|
|
771
771
|
})) : fe("", !0),
|
|
@@ -781,7 +781,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
781
781
|
}, null, 8, Fo)
|
|
782
782
|
]),
|
|
783
783
|
default: W(() => [
|
|
784
|
-
ne("span", null, oe(w.value.resetBtnText ?? J(
|
|
784
|
+
ne("span", null, oe(w.value.resetBtnText ?? J(X)("common.重置")), 1)
|
|
785
785
|
]),
|
|
786
786
|
_: 1
|
|
787
787
|
}, 8, ["disabled"]),
|
|
@@ -798,7 +798,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
798
798
|
}, null, 8, Bo)
|
|
799
799
|
]),
|
|
800
800
|
default: W(() => [
|
|
801
|
-
ne("span", null, oe(w.value.searchBtnText ?? J(
|
|
801
|
+
ne("span", null, oe(w.value.searchBtnText ?? J(X)("common.查询")), 1)
|
|
802
802
|
]),
|
|
803
803
|
_: 1
|
|
804
804
|
}, 8, ["disabled"])
|
|
@@ -807,13 +807,13 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
807
807
|
]),
|
|
808
808
|
_: 2
|
|
809
809
|
}, [
|
|
810
|
-
ye(
|
|
810
|
+
ye(z.value, (de) => ({
|
|
811
811
|
name: de.prop,
|
|
812
812
|
fn: W(() => [
|
|
813
813
|
te(T.$slots, `${de.prop}-search`, {
|
|
814
814
|
value: i.value[de.prop],
|
|
815
815
|
column: de,
|
|
816
|
-
setValue: (me) =>
|
|
816
|
+
setValue: (me) => F(de.prop, me),
|
|
817
817
|
search: u,
|
|
818
818
|
reset: _,
|
|
819
819
|
disabled: J(a)
|
|
@@ -837,7 +837,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
837
837
|
tableEvents: {}
|
|
838
838
|
},
|
|
839
839
|
setup(e, { expose: t }) {
|
|
840
|
-
const n = e, o =
|
|
840
|
+
const n = e, o = Le(), r = ge(), c = M(() => n.option ?? {}), s = M(() => n.columns.filter((f) => !f.hide)), i = M(() => c.value.menuFixed ?? "right");
|
|
841
841
|
function a(f) {
|
|
842
842
|
return !!o[`${f}-header`];
|
|
843
843
|
}
|
|
@@ -856,20 +856,20 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
858
|
function w(f) {
|
|
859
|
-
return !l(f.prop) && !
|
|
859
|
+
return !l(f.prop) && !j(f.columnOptions?.type);
|
|
860
860
|
}
|
|
861
861
|
function $(f) {
|
|
862
|
-
return !
|
|
862
|
+
return !j(f.columnOptions?.type);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function j(f) {
|
|
865
865
|
return f === "selection" || f === "index" || f === "expand";
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function A(f, S) {
|
|
868
868
|
return f.find((k) => k.value === S)?.label ?? String(S ?? "");
|
|
869
869
|
}
|
|
870
870
|
return t({ tableRef: r }), (f, S) => {
|
|
871
871
|
const k = on, R = nn;
|
|
872
|
-
return I(),
|
|
872
|
+
return I(), H(R, ae({
|
|
873
873
|
ref_key: "tableRef",
|
|
874
874
|
ref: r,
|
|
875
875
|
data: f.data,
|
|
@@ -878,20 +878,20 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
878
878
|
class: "jt-table"
|
|
879
879
|
}, c.value.tableProps, et(f.tableEvents)), {
|
|
880
880
|
default: W(() => [
|
|
881
|
-
c.value.selection ? (I(),
|
|
881
|
+
c.value.selection ? (I(), H(k, {
|
|
882
882
|
key: 0,
|
|
883
883
|
type: "selection",
|
|
884
884
|
width: "55",
|
|
885
885
|
align: "center"
|
|
886
886
|
})) : fe("", !0),
|
|
887
|
-
c.value.index ? (I(),
|
|
887
|
+
c.value.index ? (I(), H(k, {
|
|
888
888
|
key: 1,
|
|
889
889
|
type: "index",
|
|
890
|
-
label: c.value.indexLabel ?? J(
|
|
890
|
+
label: c.value.indexLabel ?? J(X)("common.序号"),
|
|
891
891
|
width: "60",
|
|
892
892
|
align: "center"
|
|
893
893
|
}, null, 8, ["label"])) : fe("", !0),
|
|
894
|
-
(I(!0), K(Se, null, ye(s.value, (y) => (I(),
|
|
894
|
+
(I(!0), K(Se, null, ye(s.value, (y) => (I(), H(k, ae({
|
|
895
895
|
key: y.prop,
|
|
896
896
|
prop: y.prop,
|
|
897
897
|
label: y.label,
|
|
@@ -911,7 +911,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
911
911
|
l(y.prop) ? te(f.$slots, `${y.prop}-data`, ae({
|
|
912
912
|
key: 0,
|
|
913
913
|
ref_for: !0
|
|
914
|
-
}, h), void 0, !0) : y.dicData ? (I(), K("span", Eo, oe(
|
|
914
|
+
}, h), void 0, !0) : y.dicData ? (I(), K("span", Eo, oe(A(y.dicData, h.row[y.prop])), 1)) : y.formatter ? (I(), K("span", Vo, oe(y.formatter(
|
|
915
915
|
h.row,
|
|
916
916
|
h.column,
|
|
917
917
|
h.row[y.prop],
|
|
@@ -921,9 +921,9 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
921
921
|
key: "1"
|
|
922
922
|
} : void 0
|
|
923
923
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
924
|
-
c.value.menu ? (I(),
|
|
924
|
+
c.value.menu ? (I(), H(k, {
|
|
925
925
|
key: 2,
|
|
926
|
-
label: c.value.menuLabel ?? J(
|
|
926
|
+
label: c.value.menuLabel ?? J(X)("common.操作"),
|
|
927
927
|
width: c.value.menuWidth,
|
|
928
928
|
"min-width": c.value.menuMinWidth,
|
|
929
929
|
align: c.value.menuAlign ?? "center",
|
|
@@ -939,7 +939,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
939
939
|
}, 16, ["data", "row-key", "empty-text"]);
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
|
-
}), No = /* @__PURE__ */ be(Ao, [["__scopeId", "data-v-c0585233"]]), Ro = { class: "jt-pagination" }, zo = { class: "jt-pagination__count" },
|
|
942
|
+
}), No = /* @__PURE__ */ be(Ao, [["__scopeId", "data-v-c0585233"]]), Ro = { class: "jt-pagination" }, zo = { class: "jt-pagination__count" }, qo = /* @__PURE__ */ pe({
|
|
943
943
|
name: "JtPagination",
|
|
944
944
|
__name: "JtPagination",
|
|
945
945
|
props: {
|
|
@@ -968,11 +968,11 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
968
968
|
onCurrentChange: c,
|
|
969
969
|
onSizeChange: i[2] || (i[2] = (l) => s.$emit("size-change", l))
|
|
970
970
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"]),
|
|
971
|
-
ne("span", zo, oe(J(
|
|
971
|
+
ne("span", zo, oe(J(X)("common.共{total}条记录", "共 {total} 条记录", { total: s.total })), 1)
|
|
972
972
|
]);
|
|
973
973
|
};
|
|
974
974
|
}
|
|
975
|
-
}),
|
|
975
|
+
}), xo = /* @__PURE__ */ be(qo, [["__scopeId", "data-v-64bc788b"]]), Go = { class: "jt-crud-table" }, Ko = { class: "filter-bar-box" }, Yo = { class: "jt-crud-table__result" }, Ho = { class: "jt-crud-table__table-group" }, Uo = {
|
|
976
976
|
key: 0,
|
|
977
977
|
class: "jt-crud-table__toolbar"
|
|
978
978
|
}, Jo = /* @__PURE__ */ pe({
|
|
@@ -996,9 +996,9 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
996
996
|
}),
|
|
997
997
|
emits: /* @__PURE__ */ Bt(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
998
998
|
setup(e, { expose: t, emit: n }) {
|
|
999
|
-
const o = e, r = n, c = vt(e, "currentPage"), s = vt(e, "pageSize"), i = vt(e, "searchModel"), a =
|
|
999
|
+
const o = e, r = n, c = vt(e, "currentPage"), s = vt(e, "pageSize"), i = vt(e, "searchModel"), a = Le(), l = ge(), g = ge(), w = M(() => o.option), $ = M(() => w.value.searchShow !== !1), j = M(
|
|
1000
1000
|
() => w.value.paginationShow !== !1
|
|
1001
|
-
),
|
|
1001
|
+
), A = M(
|
|
1002
1002
|
() => o.columns.filter((b) => b.search && !!a[`${b.prop}-search`])
|
|
1003
1003
|
), f = M(
|
|
1004
1004
|
() => o.columns.filter((b) => !b.hide && !!a[`${b.prop}-header`])
|
|
@@ -1007,8 +1007,8 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1007
1007
|
);
|
|
1008
1008
|
function k() {
|
|
1009
1009
|
const b = {};
|
|
1010
|
-
return o.columns.forEach((
|
|
1011
|
-
|
|
1010
|
+
return o.columns.forEach((V) => {
|
|
1011
|
+
V.search && (b[V.prop] = void 0);
|
|
1012
1012
|
}), b;
|
|
1013
1013
|
}
|
|
1014
1014
|
function R() {
|
|
@@ -1032,36 +1032,36 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1032
1032
|
searchLoading: h,
|
|
1033
1033
|
/** 关闭筛选表单禁用。 */
|
|
1034
1034
|
searchDone: D
|
|
1035
|
-
}), (b,
|
|
1036
|
-
const
|
|
1035
|
+
}), (b, V) => {
|
|
1036
|
+
const v = ro;
|
|
1037
1037
|
return I(), K("div", Go, [
|
|
1038
1038
|
te(b.$slots, "header", {}, void 0, !0),
|
|
1039
1039
|
ne("div", Ko, [
|
|
1040
|
-
$.value ? (I(),
|
|
1040
|
+
$.value ? (I(), H(Po, {
|
|
1041
1041
|
key: 0,
|
|
1042
1042
|
ref_key: "filterBarRef",
|
|
1043
1043
|
ref: g,
|
|
1044
1044
|
modelValue: i.value,
|
|
1045
|
-
"onUpdate:modelValue":
|
|
1045
|
+
"onUpdate:modelValue": V[0] || (V[0] = (O) => i.value = O),
|
|
1046
1046
|
columns: b.columns,
|
|
1047
1047
|
option: w.value,
|
|
1048
1048
|
onSearch: R,
|
|
1049
1049
|
onReset: y
|
|
1050
1050
|
}, Ne({ _: 2 }, [
|
|
1051
|
-
ye(
|
|
1052
|
-
name: `${
|
|
1053
|
-
fn: W((
|
|
1054
|
-
te(b.$slots, `${
|
|
1051
|
+
ye(A.value, (O) => ({
|
|
1052
|
+
name: `${O.prop}-search`,
|
|
1053
|
+
fn: W((E) => [
|
|
1054
|
+
te(b.$slots, `${O.prop}-search`, Oe(Be(E)), void 0, !0)
|
|
1055
1055
|
])
|
|
1056
1056
|
}))
|
|
1057
1057
|
]), 1032, ["modelValue", "columns", "option"])) : fe("", !0)
|
|
1058
1058
|
]),
|
|
1059
1059
|
ne("div", Yo, [
|
|
1060
|
-
ne("div",
|
|
1061
|
-
J(a).toolbar ? (I(), K("div",
|
|
1060
|
+
ne("div", Ho, [
|
|
1061
|
+
J(a).toolbar ? (I(), K("div", Uo, [
|
|
1062
1062
|
te(b.$slots, "toolbar", {}, void 0, !0)
|
|
1063
1063
|
])) : fe("", !0),
|
|
1064
|
-
Qn((I(),
|
|
1064
|
+
Qn((I(), H(No, {
|
|
1065
1065
|
ref_key: "jtTableRef",
|
|
1066
1066
|
ref: l,
|
|
1067
1067
|
data: b.data,
|
|
@@ -1069,45 +1069,45 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1069
1069
|
option: w.value,
|
|
1070
1070
|
"table-events": b.tableEvents
|
|
1071
1071
|
}, Ne({ _: 2 }, [
|
|
1072
|
-
ye(f.value, (
|
|
1073
|
-
name: `${
|
|
1074
|
-
fn: W((
|
|
1075
|
-
te(b.$slots, `${
|
|
1072
|
+
ye(f.value, (O) => ({
|
|
1073
|
+
name: `${O.prop}-header`,
|
|
1074
|
+
fn: W((E) => [
|
|
1075
|
+
te(b.$slots, `${O.prop}-header`, Oe(Be(E)), void 0, !0)
|
|
1076
1076
|
])
|
|
1077
1077
|
})),
|
|
1078
|
-
ye(S.value, (
|
|
1079
|
-
name: `${
|
|
1080
|
-
fn: W((
|
|
1081
|
-
te(b.$slots, `${
|
|
1078
|
+
ye(S.value, (O) => ({
|
|
1079
|
+
name: `${O.prop}-data`,
|
|
1080
|
+
fn: W((E) => [
|
|
1081
|
+
te(b.$slots, `${O.prop}-data`, Oe(Be(E)), void 0, !0)
|
|
1082
1082
|
])
|
|
1083
1083
|
})),
|
|
1084
1084
|
w.value.menu ? {
|
|
1085
1085
|
name: "menu",
|
|
1086
|
-
fn: W((
|
|
1087
|
-
te(b.$slots, "menu", Oe(Be(
|
|
1086
|
+
fn: W((O) => [
|
|
1087
|
+
te(b.$slots, "menu", Oe(Be(O)), void 0, !0)
|
|
1088
1088
|
]),
|
|
1089
1089
|
key: "0"
|
|
1090
1090
|
} : void 0
|
|
1091
1091
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
1092
|
-
[
|
|
1092
|
+
[v, w.value.loading]
|
|
1093
1093
|
])
|
|
1094
1094
|
]),
|
|
1095
|
-
|
|
1095
|
+
j.value ? (I(), H(xo, {
|
|
1096
1096
|
key: 0,
|
|
1097
1097
|
"current-page": c.value,
|
|
1098
|
-
"onUpdate:currentPage":
|
|
1098
|
+
"onUpdate:currentPage": V[1] || (V[1] = (O) => c.value = O),
|
|
1099
1099
|
"page-size": s.value,
|
|
1100
|
-
"onUpdate:pageSize":
|
|
1100
|
+
"onUpdate:pageSize": V[2] || (V[2] = (O) => s.value = O),
|
|
1101
1101
|
total: b.total,
|
|
1102
1102
|
option: w.value,
|
|
1103
|
-
onPageChange:
|
|
1104
|
-
onSizeChange:
|
|
1103
|
+
onPageChange: V[3] || (V[3] = (O) => b.$emit("page-change", O)),
|
|
1104
|
+
onSizeChange: V[4] || (V[4] = (O) => b.$emit("size-change", O))
|
|
1105
1105
|
}, null, 8, ["current-page", "page-size", "total", "option"])) : fe("", !0)
|
|
1106
1106
|
])
|
|
1107
1107
|
]);
|
|
1108
1108
|
};
|
|
1109
1109
|
}
|
|
1110
|
-
}), as = /* @__PURE__ */ be(Jo, [["__scopeId", "data-v-
|
|
1110
|
+
}), as = /* @__PURE__ */ be(Jo, [["__scopeId", "data-v-3600b216"]]), Wo = { class: "jt-page-header__title" }, Zo = { key: 0 }, Qo = {
|
|
1111
1111
|
key: 0,
|
|
1112
1112
|
class: "jt-page-header__operates"
|
|
1113
1113
|
}, Xo = /* @__PURE__ */ pe({
|
|
@@ -1120,7 +1120,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1120
1120
|
},
|
|
1121
1121
|
emits: ["operate-click"],
|
|
1122
1122
|
setup(e, { emit: t }) {
|
|
1123
|
-
const n = e, o = t, r =
|
|
1123
|
+
const n = e, o = t, r = Le(), c = M(() => n.operates.length > 0 || !!r.operates);
|
|
1124
1124
|
function s(i, a) {
|
|
1125
1125
|
i.onClick?.(i, a), o("operate-click", i, a);
|
|
1126
1126
|
}
|
|
@@ -1134,7 +1134,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1134
1134
|
]),
|
|
1135
1135
|
c.value ? (I(), K("div", Qo, [
|
|
1136
1136
|
te(i.$slots, "operates", { operates: i.operates }, () => [
|
|
1137
|
-
(I(!0), K(Se, null, ye(i.operates, (l) => (I(),
|
|
1137
|
+
(I(!0), K(Se, null, ye(i.operates, (l) => (I(), H(J(rt), ae({
|
|
1138
1138
|
key: l.key ?? l.label,
|
|
1139
1139
|
ref_for: !0
|
|
1140
1140
|
}, l.buttonProps, {
|
|
@@ -1156,7 +1156,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1156
1156
|
])) : fe("", !0)
|
|
1157
1157
|
], 16));
|
|
1158
1158
|
}
|
|
1159
|
-
}), ss = /* @__PURE__ */ be(Xo, [["__scopeId", "data-v-
|
|
1159
|
+
}), ss = /* @__PURE__ */ be(Xo, [["__scopeId", "data-v-ea91845e"]]);
|
|
1160
1160
|
function er(e, t) {
|
|
1161
1161
|
t = t || (() => "default-use-once-sync");
|
|
1162
1162
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -1199,152 +1199,152 @@ var cn = { exports: {} };
|
|
|
1199
1199
|
(function(n, o) {
|
|
1200
1200
|
e.exports = o();
|
|
1201
1201
|
})(it, function() {
|
|
1202
|
-
var n = 1e3, o = 6e4, r = 36e5, c = "millisecond", s = "second", i = "minute", a = "hour", l = "day", g = "week", w = "month", $ = "quarter",
|
|
1203
|
-
var
|
|
1204
|
-
return "[" + N + (
|
|
1205
|
-
} }, y = function(N,
|
|
1202
|
+
var n = 1e3, o = 6e4, r = 36e5, c = "millisecond", s = "second", i = "minute", a = "hour", l = "day", g = "week", w = "month", $ = "quarter", j = "year", A = "date", f = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, k = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, R = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(N) {
|
|
1203
|
+
var F = ["th", "st", "nd", "rd"], B = N % 100;
|
|
1204
|
+
return "[" + N + (F[(B - 20) % 10] || F[B] || F[0]) + "]";
|
|
1205
|
+
} }, y = function(N, F, B) {
|
|
1206
1206
|
var d = String(N);
|
|
1207
|
-
return !d || d.length >=
|
|
1207
|
+
return !d || d.length >= F ? N : "" + Array(F + 1 - d.length).join(B) + N;
|
|
1208
1208
|
}, h = { s: y, z: function(N) {
|
|
1209
|
-
var
|
|
1210
|
-
return (
|
|
1211
|
-
}, m: function N(
|
|
1212
|
-
if (
|
|
1213
|
-
var d = 12 * (
|
|
1214
|
-
return +(-(d + (
|
|
1209
|
+
var F = -N.utcOffset(), B = Math.abs(F), d = Math.floor(B / 60), u = B % 60;
|
|
1210
|
+
return (F <= 0 ? "+" : "-") + y(d, 2, "0") + ":" + y(u, 2, "0");
|
|
1211
|
+
}, m: function N(F, B) {
|
|
1212
|
+
if (F.date() < B.date()) return -N(B, F);
|
|
1213
|
+
var d = 12 * (B.year() - F.year()) + (B.month() - F.month()), u = F.clone().add(d, w), _ = B - u < 0, L = F.clone().add(d + (_ ? -1 : 1), w);
|
|
1214
|
+
return +(-(d + (B - u) / (_ ? u - L : L - u)) || 0);
|
|
1215
1215
|
}, a: function(N) {
|
|
1216
1216
|
return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
|
|
1217
1217
|
}, p: function(N) {
|
|
1218
|
-
return { M: w, y:
|
|
1218
|
+
return { M: w, y: j, w: g, d: l, D: A, h: a, m: i, s, ms: c, Q: $ }[N] || String(N || "").toLowerCase().replace(/s$/, "");
|
|
1219
1219
|
}, u: function(N) {
|
|
1220
1220
|
return N === void 0;
|
|
1221
1221
|
} }, D = "en", b = {};
|
|
1222
1222
|
b[D] = R;
|
|
1223
|
-
var
|
|
1224
|
-
return N instanceof re || !(!N || !N[
|
|
1225
|
-
},
|
|
1223
|
+
var V = "$isDayjsObject", v = function(N) {
|
|
1224
|
+
return N instanceof re || !(!N || !N[V]);
|
|
1225
|
+
}, O = function N(F, B, d) {
|
|
1226
1226
|
var u;
|
|
1227
|
-
if (!
|
|
1228
|
-
if (typeof
|
|
1229
|
-
var _ =
|
|
1230
|
-
b[_] && (u = _),
|
|
1231
|
-
var
|
|
1232
|
-
if (!u &&
|
|
1227
|
+
if (!F) return D;
|
|
1228
|
+
if (typeof F == "string") {
|
|
1229
|
+
var _ = F.toLowerCase();
|
|
1230
|
+
b[_] && (u = _), B && (b[_] = B, u = _);
|
|
1231
|
+
var L = F.split("-");
|
|
1232
|
+
if (!u && L.length > 1) return N(L[0]);
|
|
1233
1233
|
} else {
|
|
1234
|
-
var
|
|
1235
|
-
b[
|
|
1234
|
+
var P = F.name;
|
|
1235
|
+
b[P] = F, u = P;
|
|
1236
1236
|
}
|
|
1237
1237
|
return !d && u && (D = u), u || !d && D;
|
|
1238
|
-
},
|
|
1239
|
-
if (
|
|
1240
|
-
var
|
|
1241
|
-
return
|
|
1242
|
-
},
|
|
1243
|
-
|
|
1244
|
-
return
|
|
1238
|
+
}, E = function(N, F) {
|
|
1239
|
+
if (v(N)) return N.clone();
|
|
1240
|
+
var B = typeof F == "object" ? F : {};
|
|
1241
|
+
return B.date = N, B.args = arguments, new re(B);
|
|
1242
|
+
}, z = h;
|
|
1243
|
+
z.l = O, z.i = v, z.w = function(N, F) {
|
|
1244
|
+
return E(N, { locale: F.$L, utc: F.$u, x: F.$x, $offset: F.$offset });
|
|
1245
1245
|
};
|
|
1246
1246
|
var re = function() {
|
|
1247
|
-
function N(
|
|
1248
|
-
this.$L =
|
|
1247
|
+
function N(B) {
|
|
1248
|
+
this.$L = O(B.locale, null, !0), this.parse(B), this.$x = this.$x || B.x || {}, this[V] = !0;
|
|
1249
1249
|
}
|
|
1250
|
-
var
|
|
1251
|
-
return
|
|
1250
|
+
var F = N.prototype;
|
|
1251
|
+
return F.parse = function(B) {
|
|
1252
1252
|
this.$d = function(d) {
|
|
1253
1253
|
var u = d.date, _ = d.utc;
|
|
1254
1254
|
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
1255
|
-
if (
|
|
1255
|
+
if (z.u(u)) return /* @__PURE__ */ new Date();
|
|
1256
1256
|
if (u instanceof Date) return new Date(u);
|
|
1257
1257
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
1258
|
-
var
|
|
1259
|
-
if (
|
|
1260
|
-
var
|
|
1261
|
-
return _ ? new Date(Date.UTC(
|
|
1258
|
+
var L = u.match(S);
|
|
1259
|
+
if (L) {
|
|
1260
|
+
var P = L[2] - 1 || 0, x = (L[7] || "0").substring(0, 3);
|
|
1261
|
+
return _ ? new Date(Date.UTC(L[1], P, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, x)) : new Date(L[1], P, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, x);
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
return new Date(u);
|
|
1265
|
-
}(
|
|
1266
|
-
},
|
|
1267
|
-
var
|
|
1268
|
-
this.$y =
|
|
1269
|
-
},
|
|
1270
|
-
return
|
|
1271
|
-
},
|
|
1265
|
+
}(B), this.init();
|
|
1266
|
+
}, F.init = function() {
|
|
1267
|
+
var B = this.$d;
|
|
1268
|
+
this.$y = B.getFullYear(), this.$M = B.getMonth(), this.$D = B.getDate(), this.$W = B.getDay(), this.$H = B.getHours(), this.$m = B.getMinutes(), this.$s = B.getSeconds(), this.$ms = B.getMilliseconds();
|
|
1269
|
+
}, F.$utils = function() {
|
|
1270
|
+
return z;
|
|
1271
|
+
}, F.isValid = function() {
|
|
1272
1272
|
return this.$d.toString() !== f;
|
|
1273
|
-
},
|
|
1274
|
-
var u =
|
|
1273
|
+
}, F.isSame = function(B, d) {
|
|
1274
|
+
var u = E(B);
|
|
1275
1275
|
return this.startOf(d) <= u && u <= this.endOf(d);
|
|
1276
|
-
},
|
|
1277
|
-
return
|
|
1278
|
-
},
|
|
1279
|
-
return this.endOf(d) <
|
|
1280
|
-
},
|
|
1281
|
-
return
|
|
1282
|
-
},
|
|
1276
|
+
}, F.isAfter = function(B, d) {
|
|
1277
|
+
return E(B) < this.startOf(d);
|
|
1278
|
+
}, F.isBefore = function(B, d) {
|
|
1279
|
+
return this.endOf(d) < E(B);
|
|
1280
|
+
}, F.$g = function(B, d, u) {
|
|
1281
|
+
return z.u(B) ? this[d] : this.set(u, B);
|
|
1282
|
+
}, F.unix = function() {
|
|
1283
1283
|
return Math.floor(this.valueOf() / 1e3);
|
|
1284
|
-
},
|
|
1284
|
+
}, F.valueOf = function() {
|
|
1285
1285
|
return this.$d.getTime();
|
|
1286
|
-
},
|
|
1287
|
-
var u = this, _ = !!
|
|
1288
|
-
var we =
|
|
1286
|
+
}, F.startOf = function(B, d) {
|
|
1287
|
+
var u = this, _ = !!z.u(d) || d, L = z.p(B), P = function(de, me) {
|
|
1288
|
+
var we = z.w(u.$u ? Date.UTC(u.$y, me, de) : new Date(u.$y, me, de), u);
|
|
1289
1289
|
return _ ? we : we.endOf(l);
|
|
1290
|
-
},
|
|
1291
|
-
return
|
|
1292
|
-
},
|
|
1293
|
-
switch (
|
|
1294
|
-
case
|
|
1295
|
-
return _ ?
|
|
1290
|
+
}, x = function(de, me) {
|
|
1291
|
+
return z.w(u.toDate()[de].apply(u.toDate("s"), (_ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), u);
|
|
1292
|
+
}, q = this.$W, G = this.$M, Q = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
1293
|
+
switch (L) {
|
|
1294
|
+
case j:
|
|
1295
|
+
return _ ? P(1, 0) : P(31, 11);
|
|
1296
1296
|
case w:
|
|
1297
|
-
return _ ?
|
|
1297
|
+
return _ ? P(1, G) : P(0, G + 1);
|
|
1298
1298
|
case g:
|
|
1299
|
-
var
|
|
1300
|
-
return
|
|
1299
|
+
var Z = this.$locale().weekStart || 0, ue = (q < Z ? q + 7 : q) - Z;
|
|
1300
|
+
return P(_ ? Q - ue : Q + (6 - ue), G);
|
|
1301
1301
|
case l:
|
|
1302
|
-
case
|
|
1303
|
-
return
|
|
1302
|
+
case A:
|
|
1303
|
+
return x(T + "Hours", 0);
|
|
1304
1304
|
case a:
|
|
1305
|
-
return
|
|
1305
|
+
return x(T + "Minutes", 1);
|
|
1306
1306
|
case i:
|
|
1307
|
-
return
|
|
1307
|
+
return x(T + "Seconds", 2);
|
|
1308
1308
|
case s:
|
|
1309
|
-
return
|
|
1309
|
+
return x(T + "Milliseconds", 3);
|
|
1310
1310
|
default:
|
|
1311
1311
|
return this.clone();
|
|
1312
1312
|
}
|
|
1313
|
-
},
|
|
1314
|
-
return this.startOf(
|
|
1315
|
-
},
|
|
1316
|
-
var u, _ =
|
|
1317
|
-
if (_ === w || _ ===
|
|
1318
|
-
var
|
|
1319
|
-
|
|
1320
|
-
} else
|
|
1313
|
+
}, F.endOf = function(B) {
|
|
1314
|
+
return this.startOf(B, !1);
|
|
1315
|
+
}, F.$set = function(B, d) {
|
|
1316
|
+
var u, _ = z.p(B), L = "set" + (this.$u ? "UTC" : ""), P = (u = {}, u[l] = L + "Date", u[A] = L + "Date", u[w] = L + "Month", u[j] = L + "FullYear", u[a] = L + "Hours", u[i] = L + "Minutes", u[s] = L + "Seconds", u[c] = L + "Milliseconds", u)[_], x = _ === l ? this.$D + (d - this.$W) : d;
|
|
1317
|
+
if (_ === w || _ === j) {
|
|
1318
|
+
var q = this.clone().set(A, 1);
|
|
1319
|
+
q.$d[P](x), q.init(), this.$d = q.set(A, Math.min(this.$D, q.daysInMonth())).$d;
|
|
1320
|
+
} else P && this.$d[P](x);
|
|
1321
1321
|
return this.init(), this;
|
|
1322
|
-
},
|
|
1323
|
-
return this.clone().$set(
|
|
1324
|
-
},
|
|
1325
|
-
return this[
|
|
1326
|
-
},
|
|
1322
|
+
}, F.set = function(B, d) {
|
|
1323
|
+
return this.clone().$set(B, d);
|
|
1324
|
+
}, F.get = function(B) {
|
|
1325
|
+
return this[z.p(B)]();
|
|
1326
|
+
}, F.add = function(B, d) {
|
|
1327
1327
|
var u, _ = this;
|
|
1328
|
-
|
|
1329
|
-
var
|
|
1330
|
-
var Q =
|
|
1331
|
-
return
|
|
1328
|
+
B = Number(B);
|
|
1329
|
+
var L = z.p(d), P = function(G) {
|
|
1330
|
+
var Q = E(_);
|
|
1331
|
+
return z.w(Q.date(Q.date() + Math.round(G * B)), _);
|
|
1332
1332
|
};
|
|
1333
|
-
if (
|
|
1334
|
-
if (
|
|
1335
|
-
if (
|
|
1336
|
-
if (
|
|
1337
|
-
var
|
|
1338
|
-
return
|
|
1339
|
-
},
|
|
1340
|
-
return this.add(-1 *
|
|
1341
|
-
},
|
|
1333
|
+
if (L === w) return this.set(w, this.$M + B);
|
|
1334
|
+
if (L === j) return this.set(j, this.$y + B);
|
|
1335
|
+
if (L === l) return P(1);
|
|
1336
|
+
if (L === g) return P(7);
|
|
1337
|
+
var x = (u = {}, u[i] = o, u[a] = r, u[s] = n, u)[L] || 1, q = this.$d.getTime() + B * x;
|
|
1338
|
+
return z.w(q, this);
|
|
1339
|
+
}, F.subtract = function(B, d) {
|
|
1340
|
+
return this.add(-1 * B, d);
|
|
1341
|
+
}, F.format = function(B) {
|
|
1342
1342
|
var d = this, u = this.$locale();
|
|
1343
1343
|
if (!this.isValid()) return u.invalidDate || f;
|
|
1344
|
-
var _ =
|
|
1344
|
+
var _ = B || "YYYY-MM-DDTHH:mm:ssZ", L = z.z(this), P = this.$H, x = this.$m, q = this.$M, G = u.weekdays, Q = u.months, T = u.meridiem, Z = function(me, we, De, Ie) {
|
|
1345
1345
|
return me && (me[we] || me(d, _)) || De[we].slice(0, Ie);
|
|
1346
1346
|
}, ue = function(me) {
|
|
1347
|
-
return
|
|
1347
|
+
return z.s(P % 12 || 12, me, "0");
|
|
1348
1348
|
}, de = T || function(me, we, De) {
|
|
1349
1349
|
var Ie = me < 12 ? "AM" : "PM";
|
|
1350
1350
|
return De ? Ie.toLowerCase() : Ie;
|
|
@@ -1355,63 +1355,63 @@ var cn = { exports: {} };
|
|
|
1355
1355
|
case "YY":
|
|
1356
1356
|
return String(d.$y).slice(-2);
|
|
1357
1357
|
case "YYYY":
|
|
1358
|
-
return
|
|
1358
|
+
return z.s(d.$y, 4, "0");
|
|
1359
1359
|
case "M":
|
|
1360
|
-
return
|
|
1360
|
+
return q + 1;
|
|
1361
1361
|
case "MM":
|
|
1362
|
-
return
|
|
1362
|
+
return z.s(q + 1, 2, "0");
|
|
1363
1363
|
case "MMM":
|
|
1364
|
-
return
|
|
1364
|
+
return Z(u.monthsShort, q, Q, 3);
|
|
1365
1365
|
case "MMMM":
|
|
1366
|
-
return
|
|
1366
|
+
return Z(Q, q);
|
|
1367
1367
|
case "D":
|
|
1368
1368
|
return d.$D;
|
|
1369
1369
|
case "DD":
|
|
1370
|
-
return
|
|
1370
|
+
return z.s(d.$D, 2, "0");
|
|
1371
1371
|
case "d":
|
|
1372
1372
|
return String(d.$W);
|
|
1373
1373
|
case "dd":
|
|
1374
|
-
return
|
|
1374
|
+
return Z(u.weekdaysMin, d.$W, G, 2);
|
|
1375
1375
|
case "ddd":
|
|
1376
|
-
return
|
|
1376
|
+
return Z(u.weekdaysShort, d.$W, G, 3);
|
|
1377
1377
|
case "dddd":
|
|
1378
|
-
return
|
|
1378
|
+
return G[d.$W];
|
|
1379
1379
|
case "H":
|
|
1380
|
-
return String(
|
|
1380
|
+
return String(P);
|
|
1381
1381
|
case "HH":
|
|
1382
|
-
return
|
|
1382
|
+
return z.s(P, 2, "0");
|
|
1383
1383
|
case "h":
|
|
1384
1384
|
return ue(1);
|
|
1385
1385
|
case "hh":
|
|
1386
1386
|
return ue(2);
|
|
1387
1387
|
case "a":
|
|
1388
|
-
return de(
|
|
1388
|
+
return de(P, x, !0);
|
|
1389
1389
|
case "A":
|
|
1390
|
-
return de(
|
|
1390
|
+
return de(P, x, !1);
|
|
1391
1391
|
case "m":
|
|
1392
|
-
return String(
|
|
1392
|
+
return String(x);
|
|
1393
1393
|
case "mm":
|
|
1394
|
-
return
|
|
1394
|
+
return z.s(x, 2, "0");
|
|
1395
1395
|
case "s":
|
|
1396
1396
|
return String(d.$s);
|
|
1397
1397
|
case "ss":
|
|
1398
|
-
return
|
|
1398
|
+
return z.s(d.$s, 2, "0");
|
|
1399
1399
|
case "SSS":
|
|
1400
|
-
return
|
|
1400
|
+
return z.s(d.$ms, 3, "0");
|
|
1401
1401
|
case "Z":
|
|
1402
|
-
return
|
|
1402
|
+
return L;
|
|
1403
1403
|
}
|
|
1404
1404
|
return null;
|
|
1405
|
-
}(me) ||
|
|
1405
|
+
}(me) || L.replace(":", "");
|
|
1406
1406
|
});
|
|
1407
|
-
},
|
|
1407
|
+
}, F.utcOffset = function() {
|
|
1408
1408
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1409
|
-
},
|
|
1410
|
-
var _,
|
|
1411
|
-
return
|
|
1409
|
+
}, F.diff = function(B, d, u) {
|
|
1410
|
+
var _, L = this, P = z.p(d), x = E(B), q = (x.utcOffset() - this.utcOffset()) * o, G = this - x, Q = function() {
|
|
1411
|
+
return z.m(L, x);
|
|
1412
1412
|
};
|
|
1413
|
-
switch (
|
|
1414
|
-
case
|
|
1413
|
+
switch (P) {
|
|
1414
|
+
case j:
|
|
1415
1415
|
_ = Q() / 12;
|
|
1416
1416
|
break;
|
|
1417
1417
|
case w:
|
|
@@ -1421,53 +1421,53 @@ var cn = { exports: {} };
|
|
|
1421
1421
|
_ = Q() / 3;
|
|
1422
1422
|
break;
|
|
1423
1423
|
case g:
|
|
1424
|
-
_ = (
|
|
1424
|
+
_ = (G - q) / 6048e5;
|
|
1425
1425
|
break;
|
|
1426
1426
|
case l:
|
|
1427
|
-
_ = (
|
|
1427
|
+
_ = (G - q) / 864e5;
|
|
1428
1428
|
break;
|
|
1429
1429
|
case a:
|
|
1430
|
-
_ =
|
|
1430
|
+
_ = G / r;
|
|
1431
1431
|
break;
|
|
1432
1432
|
case i:
|
|
1433
|
-
_ =
|
|
1433
|
+
_ = G / o;
|
|
1434
1434
|
break;
|
|
1435
1435
|
case s:
|
|
1436
|
-
_ =
|
|
1436
|
+
_ = G / n;
|
|
1437
1437
|
break;
|
|
1438
1438
|
default:
|
|
1439
|
-
_ =
|
|
1439
|
+
_ = G;
|
|
1440
1440
|
}
|
|
1441
|
-
return u ? _ :
|
|
1442
|
-
},
|
|
1441
|
+
return u ? _ : z.a(_);
|
|
1442
|
+
}, F.daysInMonth = function() {
|
|
1443
1443
|
return this.endOf(w).$D;
|
|
1444
|
-
},
|
|
1444
|
+
}, F.$locale = function() {
|
|
1445
1445
|
return b[this.$L];
|
|
1446
|
-
},
|
|
1447
|
-
if (!
|
|
1448
|
-
var u = this.clone(), _ =
|
|
1446
|
+
}, F.locale = function(B, d) {
|
|
1447
|
+
if (!B) return this.$L;
|
|
1448
|
+
var u = this.clone(), _ = O(B, d, !0);
|
|
1449
1449
|
return _ && (u.$L = _), u;
|
|
1450
|
-
},
|
|
1451
|
-
return
|
|
1452
|
-
},
|
|
1450
|
+
}, F.clone = function() {
|
|
1451
|
+
return z.w(this.$d, this);
|
|
1452
|
+
}, F.toDate = function() {
|
|
1453
1453
|
return new Date(this.valueOf());
|
|
1454
|
-
},
|
|
1454
|
+
}, F.toJSON = function() {
|
|
1455
1455
|
return this.isValid() ? this.toISOString() : null;
|
|
1456
|
-
},
|
|
1456
|
+
}, F.toISOString = function() {
|
|
1457
1457
|
return this.$d.toISOString();
|
|
1458
|
-
},
|
|
1458
|
+
}, F.toString = function() {
|
|
1459
1459
|
return this.$d.toUTCString();
|
|
1460
1460
|
}, N;
|
|
1461
1461
|
}(), le = re.prototype;
|
|
1462
|
-
return
|
|
1463
|
-
le[N[1]] = function(
|
|
1464
|
-
return this.$g(
|
|
1462
|
+
return E.prototype = le, [["$ms", c], ["$s", s], ["$m", i], ["$H", a], ["$W", l], ["$M", w], ["$y", j], ["$D", A]].forEach(function(N) {
|
|
1463
|
+
le[N[1]] = function(F) {
|
|
1464
|
+
return this.$g(F, N[0], N[1]);
|
|
1465
1465
|
};
|
|
1466
|
-
}),
|
|
1467
|
-
return N.$i || (N(
|
|
1468
|
-
},
|
|
1469
|
-
return
|
|
1470
|
-
},
|
|
1466
|
+
}), E.extend = function(N, F) {
|
|
1467
|
+
return N.$i || (N(F, re, E), N.$i = !0), E;
|
|
1468
|
+
}, E.locale = O, E.isDayjs = v, E.unix = function(N) {
|
|
1469
|
+
return E(1e3 * N);
|
|
1470
|
+
}, E.en = b[D], E.Ls = b, E.p = {}, E;
|
|
1471
1471
|
});
|
|
1472
1472
|
})(cn);
|
|
1473
1473
|
var tr = cn.exports;
|
|
@@ -1492,7 +1492,7 @@ var un = { exports: {} };
|
|
|
1492
1492
|
}], $ = function(S) {
|
|
1493
1493
|
var k = a[S];
|
|
1494
1494
|
return k && (k.indexOf ? k : k.s.concat(k.f));
|
|
1495
|
-
},
|
|
1495
|
+
}, j = function(S, k) {
|
|
1496
1496
|
var R, y = a.meridiem;
|
|
1497
1497
|
if (y) {
|
|
1498
1498
|
for (var h = 1; h <= 24; h += 1) if (S.indexOf(y(h, 0, k)) > -1) {
|
|
@@ -1501,10 +1501,10 @@ var un = { exports: {} };
|
|
|
1501
1501
|
}
|
|
1502
1502
|
} else R = S === (k ? "pm" : "PM");
|
|
1503
1503
|
return R;
|
|
1504
|
-
},
|
|
1505
|
-
this.afternoon =
|
|
1504
|
+
}, A = { A: [i, function(S) {
|
|
1505
|
+
this.afternoon = j(S, !1);
|
|
1506
1506
|
}], a: [i, function(S) {
|
|
1507
|
-
this.afternoon =
|
|
1507
|
+
this.afternoon = j(S, !0);
|
|
1508
1508
|
}], Q: [r, function(S) {
|
|
1509
1509
|
this.month = 3 * (S - 1) + 1;
|
|
1510
1510
|
}], S: [r, function(S) {
|
|
@@ -1532,61 +1532,61 @@ var un = { exports: {} };
|
|
|
1532
1532
|
function f(S) {
|
|
1533
1533
|
var k, R;
|
|
1534
1534
|
k = S, R = a && a.formats;
|
|
1535
|
-
for (var y = (S = k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(
|
|
1535
|
+
for (var y = (S = k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(E, z, re) {
|
|
1536
1536
|
var le = re && re.toUpperCase();
|
|
1537
|
-
return
|
|
1538
|
-
return
|
|
1537
|
+
return z || R[re] || n[re] || R[le].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(N, F, B) {
|
|
1538
|
+
return F || B.slice(1);
|
|
1539
1539
|
});
|
|
1540
1540
|
})).match(o), h = y.length, D = 0; D < h; D += 1) {
|
|
1541
|
-
var b = y[D],
|
|
1542
|
-
y[D] =
|
|
1541
|
+
var b = y[D], V = A[b], v = V && V[0], O = V && V[1];
|
|
1542
|
+
y[D] = O ? { regex: v, parser: O } : b.replace(/^\[|\]$/g, "");
|
|
1543
1543
|
}
|
|
1544
|
-
return function(
|
|
1545
|
-
for (var
|
|
1544
|
+
return function(E) {
|
|
1545
|
+
for (var z = {}, re = 0, le = 0; re < h; re += 1) {
|
|
1546
1546
|
var N = y[re];
|
|
1547
1547
|
if (typeof N == "string") le += N.length;
|
|
1548
1548
|
else {
|
|
1549
|
-
var
|
|
1550
|
-
|
|
1549
|
+
var F = N.regex, B = N.parser, d = E.slice(le), u = F.exec(d)[0];
|
|
1550
|
+
B.call(z, u), E = E.replace(u, "");
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
1553
|
return function(_) {
|
|
1554
|
-
var
|
|
1555
|
-
if (
|
|
1556
|
-
var
|
|
1557
|
-
|
|
1554
|
+
var L = _.afternoon;
|
|
1555
|
+
if (L !== void 0) {
|
|
1556
|
+
var P = _.hours;
|
|
1557
|
+
L ? P < 12 && (_.hours += 12) : P === 12 && (_.hours = 0), delete _.afternoon;
|
|
1558
1558
|
}
|
|
1559
|
-
}(
|
|
1559
|
+
}(z), z;
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
1562
1562
|
return function(S, k, R) {
|
|
1563
1563
|
R.p.customParseFormat = !0, S && S.parseTwoDigitYear && (l = S.parseTwoDigitYear);
|
|
1564
1564
|
var y = k.prototype, h = y.parse;
|
|
1565
1565
|
y.parse = function(D) {
|
|
1566
|
-
var b = D.date,
|
|
1567
|
-
this.$u =
|
|
1568
|
-
var
|
|
1569
|
-
if (typeof
|
|
1570
|
-
var
|
|
1571
|
-
|
|
1566
|
+
var b = D.date, V = D.utc, v = D.args;
|
|
1567
|
+
this.$u = V;
|
|
1568
|
+
var O = v[1];
|
|
1569
|
+
if (typeof O == "string") {
|
|
1570
|
+
var E = v[2] === !0, z = v[3] === !0, re = E || z, le = v[2];
|
|
1571
|
+
z && (le = v[2]), a = this.$locale(), !E && le && (a = R.Ls[le]), this.$d = function(d, u, _, L) {
|
|
1572
1572
|
try {
|
|
1573
1573
|
if (["x", "X"].indexOf(u) > -1) return new Date((u === "X" ? 1e3 : 1) * d);
|
|
1574
|
-
var
|
|
1575
|
-
|
|
1576
|
-
var
|
|
1577
|
-
return de ? new Date(Date.UTC(Ie,
|
|
1574
|
+
var P = f(u)(d), x = P.year, q = P.month, G = P.day, Q = P.hours, T = P.minutes, Z = P.seconds, ue = P.milliseconds, de = P.zone, me = P.week, we = /* @__PURE__ */ new Date(), De = G || (x || q ? 1 : we.getDate()), Ie = x || we.getFullYear(), qe = 0;
|
|
1575
|
+
x && !q || (qe = q > 0 ? q - 1 : we.getMonth());
|
|
1576
|
+
var xe, nt = Q || 0, Ge = T || 0, m = Z || 0, p = ue || 0;
|
|
1577
|
+
return de ? new Date(Date.UTC(Ie, qe, De, nt, Ge, m, p + 60 * de.offset * 1e3)) : _ ? new Date(Date.UTC(Ie, qe, De, nt, Ge, m, p)) : (xe = new Date(Ie, qe, De, nt, Ge, m, p), me && (xe = L(xe).week(me).toDate()), xe);
|
|
1578
1578
|
} catch {
|
|
1579
1579
|
return /* @__PURE__ */ new Date("");
|
|
1580
1580
|
}
|
|
1581
|
-
}(b,
|
|
1582
|
-
} else if (
|
|
1583
|
-
|
|
1584
|
-
var
|
|
1585
|
-
if (
|
|
1586
|
-
this.$d =
|
|
1581
|
+
}(b, O, V, R), this.init(), le && le !== !0 && (this.$L = this.locale(le).$L), re && b != this.format(O) && (this.$d = /* @__PURE__ */ new Date("")), a = {};
|
|
1582
|
+
} else if (O instanceof Array) for (var N = O.length, F = 1; F <= N; F += 1) {
|
|
1583
|
+
v[1] = O[F - 1];
|
|
1584
|
+
var B = R.apply(this, v);
|
|
1585
|
+
if (B.isValid()) {
|
|
1586
|
+
this.$d = B.$d, this.$L = B.$L, this.init();
|
|
1587
1587
|
break;
|
|
1588
1588
|
}
|
|
1589
|
-
|
|
1589
|
+
F === N && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1590
1590
|
}
|
|
1591
1591
|
else h.call(this, D);
|
|
1592
1592
|
};
|
|
@@ -1602,50 +1602,50 @@ var dn = { exports: {} };
|
|
|
1602
1602
|
})(it, function() {
|
|
1603
1603
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
1604
1604
|
return function(r, c, s) {
|
|
1605
|
-
var i, a = function($,
|
|
1606
|
-
|
|
1605
|
+
var i, a = function($, j, A) {
|
|
1606
|
+
A === void 0 && (A = {});
|
|
1607
1607
|
var f = new Date($), S = function(k, R) {
|
|
1608
1608
|
R === void 0 && (R = {});
|
|
1609
1609
|
var y = R.timeZoneName || "short", h = k + "|" + y, D = o[h];
|
|
1610
1610
|
return D || (D = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: k, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: y }), o[h] = D), D;
|
|
1611
|
-
}(
|
|
1611
|
+
}(j, A);
|
|
1612
1612
|
return S.formatToParts(f);
|
|
1613
|
-
}, l = function($,
|
|
1614
|
-
for (var
|
|
1615
|
-
var k =
|
|
1613
|
+
}, l = function($, j) {
|
|
1614
|
+
for (var A = a($, j), f = [], S = 0; S < A.length; S += 1) {
|
|
1615
|
+
var k = A[S], R = k.type, y = k.value, h = n[R];
|
|
1616
1616
|
h >= 0 && (f[h] = parseInt(y, 10));
|
|
1617
1617
|
}
|
|
1618
|
-
var D = f[3], b = D === 24 ? 0 : D,
|
|
1619
|
-
return (s.utc(
|
|
1618
|
+
var D = f[3], b = D === 24 ? 0 : D, V = f[0] + "-" + f[1] + "-" + f[2] + " " + b + ":" + f[4] + ":" + f[5] + ":000", v = +$;
|
|
1619
|
+
return (s.utc(V).valueOf() - (v -= v % 1e3)) / 6e4;
|
|
1620
1620
|
}, g = c.prototype;
|
|
1621
|
-
g.tz = function($,
|
|
1621
|
+
g.tz = function($, j) {
|
|
1622
1622
|
$ === void 0 && ($ = i);
|
|
1623
|
-
var
|
|
1624
|
-
if (!Number(y))
|
|
1625
|
-
else if (
|
|
1626
|
-
var h =
|
|
1627
|
-
|
|
1623
|
+
var A, f = this.utcOffset(), S = this.toDate(), k = S.toLocaleString("en-US", { timeZone: $ }), R = Math.round((S - new Date(k)) / 1e3 / 60), y = 15 * -Math.round(S.getTimezoneOffset() / 15) - R;
|
|
1624
|
+
if (!Number(y)) A = this.utcOffset(0, j);
|
|
1625
|
+
else if (A = s(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(y, !0), j) {
|
|
1626
|
+
var h = A.utcOffset();
|
|
1627
|
+
A = A.add(f - h, "minute");
|
|
1628
1628
|
}
|
|
1629
|
-
return
|
|
1629
|
+
return A.$x.$timezone = $, A;
|
|
1630
1630
|
}, g.offsetName = function($) {
|
|
1631
|
-
var
|
|
1631
|
+
var j = this.$x.$timezone || s.tz.guess(), A = a(this.valueOf(), j, { timeZoneName: $ }).find(function(f) {
|
|
1632
1632
|
return f.type.toLowerCase() === "timezonename";
|
|
1633
1633
|
});
|
|
1634
|
-
return
|
|
1634
|
+
return A && A.value;
|
|
1635
1635
|
};
|
|
1636
1636
|
var w = g.startOf;
|
|
1637
|
-
g.startOf = function($,
|
|
1638
|
-
if (!this.$x || !this.$x.$timezone) return w.call(this, $,
|
|
1639
|
-
var
|
|
1640
|
-
return w.call(
|
|
1641
|
-
}, s.tz = function($,
|
|
1642
|
-
var f =
|
|
1637
|
+
g.startOf = function($, j) {
|
|
1638
|
+
if (!this.$x || !this.$x.$timezone) return w.call(this, $, j);
|
|
1639
|
+
var A = s(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1640
|
+
return w.call(A, $, j).tz(this.$x.$timezone, !0);
|
|
1641
|
+
}, s.tz = function($, j, A) {
|
|
1642
|
+
var f = A && j, S = A || j || i, k = l(+s(), S);
|
|
1643
1643
|
if (typeof $ != "string") return s($).tz(S);
|
|
1644
|
-
var R = function(b,
|
|
1645
|
-
var
|
|
1646
|
-
if (
|
|
1647
|
-
var
|
|
1648
|
-
return
|
|
1644
|
+
var R = function(b, V, v) {
|
|
1645
|
+
var O = b - 60 * V * 1e3, E = l(O, v);
|
|
1646
|
+
if (V === E) return [O, V];
|
|
1647
|
+
var z = l(O -= 60 * (E - V) * 1e3, v);
|
|
1648
|
+
return E === z ? [O, E] : [b - 60 * Math.min(E, z) * 1e3, Math.max(E, z)];
|
|
1649
1649
|
}(s.utc($, f).valueOf(), k, S), y = R[0], h = R[1], D = s(y).utcOffset(h);
|
|
1650
1650
|
return D.$x.$timezone = S, D;
|
|
1651
1651
|
}, s.tz.guess = function() {
|
|
@@ -1694,8 +1694,8 @@ var fn = { exports: {} };
|
|
|
1694
1694
|
D === void 0 && (D = "");
|
|
1695
1695
|
var b = D.match(o);
|
|
1696
1696
|
if (!b) return null;
|
|
1697
|
-
var
|
|
1698
|
-
return
|
|
1697
|
+
var V = ("" + b[0]).match(r) || ["-", 0, 0], v = V[0], O = 60 * +V[1] + +V[2];
|
|
1698
|
+
return O === 0 ? 0 : v === "+" ? O : -O;
|
|
1699
1699
|
}(f), f === null)) return this;
|
|
1700
1700
|
var R = Math.abs(f) <= 16 ? 60 * f : f;
|
|
1701
1701
|
if (R === 0) return this.utc(S);
|
|
@@ -1718,15 +1718,15 @@ var fn = { exports: {} };
|
|
|
1718
1718
|
}, a.toString = function() {
|
|
1719
1719
|
return this.toDate().toUTCString();
|
|
1720
1720
|
};
|
|
1721
|
-
var
|
|
1721
|
+
var j = a.toDate;
|
|
1722
1722
|
a.toDate = function(f) {
|
|
1723
|
-
return f === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() :
|
|
1723
|
+
return f === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : j.call(this);
|
|
1724
1724
|
};
|
|
1725
|
-
var
|
|
1725
|
+
var A = a.diff;
|
|
1726
1726
|
a.diff = function(f, S, k) {
|
|
1727
|
-
if (f && this.$u === f.$u) return
|
|
1727
|
+
if (f && this.$u === f.$u) return A.call(this, f, S, k);
|
|
1728
1728
|
var R = this.local(), y = i(f).local();
|
|
1729
|
-
return
|
|
1729
|
+
return A.call(R, y, S, k);
|
|
1730
1730
|
};
|
|
1731
1731
|
};
|
|
1732
1732
|
});
|
|
@@ -1819,7 +1819,7 @@ function pn(e) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
function mn(e, t, n = "-") {
|
|
1821
1821
|
const o = Mt(e);
|
|
1822
|
-
return o === "empty" || _e(t) ? n : pn(t) ? (console.error("[globalInfo] field value render failed", t), n) : o === "select" ? yr(e, t, n) : o === "switch" ? vn(t) ?
|
|
1822
|
+
return o === "empty" || _e(t) ? n : pn(t) ? (console.error("[globalInfo] field value render failed", t), n) : o === "select" ? yr(e, t, n) : o === "switch" ? vn(t) ? X("common.是") : X("common.否") : o === "file" ? br(t, n) : o === "multi-row" ? Sr(t, n) : String(t);
|
|
1823
1823
|
}
|
|
1824
1824
|
function dt(e, t) {
|
|
1825
1825
|
return Array.isArray(t) ? t : pt(e) ? typeof t == "string" ? t.split(",").map((n) => n.trim()).filter(Boolean) : _e(t) ? [] : [t] : [t];
|
|
@@ -1834,7 +1834,7 @@ function vn(e) {
|
|
|
1834
1834
|
if (typeof e == "boolean") return e;
|
|
1835
1835
|
if (typeof e == "number") return e !== 0;
|
|
1836
1836
|
const t = String(e ?? "").trim().toLowerCase();
|
|
1837
|
-
return ["true", "1", "y", "yes", "t",
|
|
1837
|
+
return ["true", "1", "y", "yes", "t", X("common.是")].includes(t);
|
|
1838
1838
|
}
|
|
1839
1839
|
function Ze(e, t) {
|
|
1840
1840
|
if (_e(t)) return !1;
|
|
@@ -1863,7 +1863,7 @@ function ft(e, t, n, o = {}) {
|
|
|
1863
1863
|
function Vt(e) {
|
|
1864
1864
|
return gn(e).some(
|
|
1865
1865
|
(n) => [
|
|
1866
|
-
|
|
1866
|
+
X("common.序号"),
|
|
1867
1867
|
"index",
|
|
1868
1868
|
"idx",
|
|
1869
1869
|
"seq",
|
|
@@ -2061,7 +2061,7 @@ function _r(e = null) {
|
|
|
2061
2061
|
raw: e
|
|
2062
2062
|
};
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function qt(e) {
|
|
2065
2065
|
const t = kn(e), n = Cn(t), o = Br(t).flatMap(
|
|
2066
2066
|
(r) => $n(r, n)
|
|
2067
2067
|
);
|
|
@@ -2152,24 +2152,24 @@ function wn(e) {
|
|
|
2152
2152
|
function Cr(e, t, n) {
|
|
2153
2153
|
const o = Qe(e, ["sections", "sets", "list"]);
|
|
2154
2154
|
return o.length > 0 ? o.map(
|
|
2155
|
-
(r) =>
|
|
2156
|
-
) : e.infSetMark || e.infSetFields || e.fields ? [
|
|
2155
|
+
(r) => xt(r, t, n, o.length === 1)
|
|
2156
|
+
) : e.infSetMark || e.infSetFields || e.fields ? [xt(e, t, n, !0)] : [];
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function xt(e, t, n, o) {
|
|
2159
2159
|
const r = ce(e), c = kr(r.infSetMark ?? r), s = Tr(r.infSetFields ?? r.fields ?? []), i = Ir(c), a = Or(
|
|
2160
2160
|
r.infSetValues ?? r.rows ?? r.data,
|
|
2161
2161
|
s,
|
|
2162
2162
|
i
|
|
2163
2163
|
), l = a[0] ? wt(a[0]) : In(s), g = ce(r.tag), w = ee(
|
|
2164
2164
|
r.tagId ?? r.infTagId ?? g.tagId ?? g.infTagId ?? c.raw.tagId ?? c.raw.infTagId
|
|
2165
|
-
), $ = ee(t.tagId ?? n?.tagId),
|
|
2165
|
+
), $ = ee(t.tagId ?? n?.tagId), j = ee(n?.key), A = o ? t.infSetId ?? n?.infSetId : void 0, f = o ? t.setId : void 0, S = o ? n?.code : void 0, k = c.setId || ee(r.setId), R = ee(r.infSetId) || k || ee(A), y = k || ee(f ?? R), h = c.code || ee(r.code ?? S ?? y), D = y || h || R || w, b = {
|
|
2166
2166
|
key: D,
|
|
2167
2167
|
id: D,
|
|
2168
2168
|
setId: y,
|
|
2169
2169
|
code: h,
|
|
2170
2170
|
tagId: w,
|
|
2171
2171
|
requestTagId: $ || void 0,
|
|
2172
|
-
ownerNodeKey:
|
|
2172
|
+
ownerNodeKey: j || void 0,
|
|
2173
2173
|
infSetId: R,
|
|
2174
2174
|
title: c.name || ee(r.name ?? n?.tagName ?? D),
|
|
2175
2175
|
renderType: i,
|
|
@@ -2452,11 +2452,11 @@ function Fn(e) {
|
|
|
2452
2452
|
return Number.isFinite(t) ? t : void 0;
|
|
2453
2453
|
}
|
|
2454
2454
|
function Ce(e) {
|
|
2455
|
-
return typeof e == "string" ? ["true", "1", "y", "yes", "t",
|
|
2455
|
+
return typeof e == "string" ? ["true", "1", "y", "yes", "t", X("common.是")].includes(
|
|
2456
2456
|
e.toLowerCase()
|
|
2457
2457
|
) : !!e;
|
|
2458
2458
|
}
|
|
2459
|
-
const
|
|
2459
|
+
const Ee = (e) => e.key || e.code, Me = (e) => e.key || e.setId, jr = (e) => String(e ?? "").trim(), tt = (e) => Array.from(new Set(e.map(jr).filter(Boolean))), He = (e) => !!(e && typeof e == "object" && "children" in e), Xe = (e) => tt([
|
|
2460
2460
|
e?.key,
|
|
2461
2461
|
e?.id,
|
|
2462
2462
|
e?.setId,
|
|
@@ -2481,8 +2481,8 @@ function Nr(e, t, n) {
|
|
|
2481
2481
|
return tt([n, ...Xe(t)]).length === 0 ? e : e.filter((r) => Bn(r, t, n));
|
|
2482
2482
|
}
|
|
2483
2483
|
function Rr(e, t, n = {}) {
|
|
2484
|
-
const o = Object.keys(n).length > 0 ? n : e.model, r = typeof t == "string" ? t :
|
|
2485
|
-
if (a === "searchText" && Object.prototype.hasOwnProperty.call(o, a) || a !== "searchText" && !
|
|
2484
|
+
const o = Object.keys(n).length > 0 ? n : e.model, r = typeof t == "string" ? t : Ee(t), c = typeof t == "string" ? e.fields.find((a) => Ee(a) === r || a.code === r) : t, i = ze(c).some((a) => {
|
|
2485
|
+
if (a === "searchText" && Object.prototype.hasOwnProperty.call(o, a) || a !== "searchText" && !qr(e, a))
|
|
2486
2486
|
return !1;
|
|
2487
2487
|
const l = o[a];
|
|
2488
2488
|
return l == null || l === "";
|
|
@@ -2498,10 +2498,10 @@ function Rr(e, t, n = {}) {
|
|
|
2498
2498
|
function zr(e) {
|
|
2499
2499
|
return !!(e && !ut(e) && ze(e).length === 0 && (e.options ?? []).length > 0);
|
|
2500
2500
|
}
|
|
2501
|
-
function
|
|
2502
|
-
return e.fields.some((n) => n.code === t || n.key === t || n.id === t ||
|
|
2501
|
+
function qr(e, t) {
|
|
2502
|
+
return e.fields.some((n) => n.code === t || n.key === t || n.id === t || Ee(n) === t);
|
|
2503
2503
|
}
|
|
2504
|
-
function
|
|
2504
|
+
function xr(e) {
|
|
2505
2505
|
return wn(e);
|
|
2506
2506
|
}
|
|
2507
2507
|
const Te = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : {}, at = (e) => {
|
|
@@ -2525,7 +2525,7 @@ function Yr(e) {
|
|
|
2525
2525
|
}
|
|
2526
2526
|
async function Ln(e) {
|
|
2527
2527
|
const t = e.params === void 0 ? void 0 : Te(e.params);
|
|
2528
|
-
return !e.formatter || !
|
|
2528
|
+
return !e.formatter || !Hr(e) ? t : e.formatter({
|
|
2529
2529
|
operation: e.operation,
|
|
2530
2530
|
interfaceOperation: e.field?.interface,
|
|
2531
2531
|
type: e.type,
|
|
@@ -2547,10 +2547,10 @@ async function Ln(e) {
|
|
|
2547
2547
|
params: t
|
|
2548
2548
|
});
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2550
|
+
function Hr(e) {
|
|
2551
2551
|
return e.requestSource === "inner" || e.requestSource === "sidebar" && e.type === "openTag";
|
|
2552
2552
|
}
|
|
2553
|
-
async function
|
|
2553
|
+
async function Ur(e) {
|
|
2554
2554
|
if (!e.service.requestOperation)
|
|
2555
2555
|
throw new Error("[GlobalInfo] service.requestOperation is required for operationInfo");
|
|
2556
2556
|
const t = e.operation.params === void 0 ? void 0 : Te(e.operation.params), n = Jr(t, e.context), o = await Ln({
|
|
@@ -2627,7 +2627,7 @@ function Wr(e) {
|
|
|
2627
2627
|
targetSections: c
|
|
2628
2628
|
};
|
|
2629
2629
|
}
|
|
2630
|
-
const Pn =
|
|
2630
|
+
const Pn = X(
|
|
2631
2631
|
"common.信息集不能为空,最后一条数据不可删除"
|
|
2632
2632
|
);
|
|
2633
2633
|
function Zr(e, t = [], n = {}) {
|
|
@@ -2648,10 +2648,10 @@ function It(e) {
|
|
|
2648
2648
|
return Array.isArray(e) ? `[${e.map((t) => It(t)).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => `${JSON.stringify(n)}:${It(o)}`).join(",")}}` : JSON.stringify(e);
|
|
2649
2649
|
}
|
|
2650
2650
|
const ea = (e) => {
|
|
2651
|
-
const t = ge(!1), n = ge(!1), o = ge(!1), r =
|
|
2651
|
+
const t = ge(!1), n = ge(!1), o = ge(!1), r = Ve(null), c = Ve([]), s = Ve(null), i = Ve(null), a = Ve(null), l = Ve({}), g = Ve({}), w = ge([]), $ = Ve({}), j = ge([]), A = M(
|
|
2652
2652
|
() => {
|
|
2653
|
-
const
|
|
2654
|
-
return [...
|
|
2653
|
+
const m = w.value.map((C) => l.value[C]).filter((C) => !!C), p = Object.entries(l.value).filter(([C]) => !w.value.includes(C)).map(([, C]) => C);
|
|
2654
|
+
return [...m, ...p];
|
|
2655
2655
|
}
|
|
2656
2656
|
), f = M(() => ({
|
|
2657
2657
|
// 整棵树是否正在加载。
|
|
@@ -2661,19 +2661,19 @@ const ea = (e) => {
|
|
|
2661
2661
|
// 当前是否正在保存。
|
|
2662
2662
|
saving: o.value,
|
|
2663
2663
|
// 当前所有编辑中的 section key。
|
|
2664
|
-
editingSectionKeys:
|
|
2664
|
+
editingSectionKeys: j.value,
|
|
2665
2665
|
// 已加载 section 映射。
|
|
2666
2666
|
sectionMap: l.value,
|
|
2667
2667
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
2668
2668
|
sectionStatusMap: Object.fromEntries(
|
|
2669
|
-
Object.entries($.value).map(([
|
|
2670
|
-
|
|
2669
|
+
Object.entries($.value).map(([m, p]) => [
|
|
2670
|
+
m,
|
|
2671
2671
|
{
|
|
2672
2672
|
// 保留原状态字段。
|
|
2673
2673
|
...p,
|
|
2674
2674
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
2675
|
-
editing:
|
|
2676
|
-
g.value[
|
|
2675
|
+
editing: j.value.includes(
|
|
2676
|
+
g.value[m] ?? m
|
|
2677
2677
|
)
|
|
2678
2678
|
}
|
|
2679
2679
|
])
|
|
@@ -2685,49 +2685,49 @@ const ea = (e) => {
|
|
|
2685
2685
|
adaptScene: e.adaptScene,
|
|
2686
2686
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
2687
2687
|
emplid: e.emplid
|
|
2688
|
-
}), k = (
|
|
2688
|
+
}), k = (m) => ({
|
|
2689
2689
|
// 复用基础参数,保证人员和场景一致。
|
|
2690
2690
|
...S(),
|
|
2691
2691
|
// infSchmId 指定当前模板方案。
|
|
2692
|
-
infSchmId:
|
|
2692
|
+
infSchmId: m.infSchmId,
|
|
2693
2693
|
// tagId 指定要展开的树节点。
|
|
2694
|
-
tagId:
|
|
2694
|
+
tagId: m.tagId,
|
|
2695
2695
|
// tagLevel 告诉后端当前节点层级。
|
|
2696
|
-
tagLevel:
|
|
2696
|
+
tagLevel: m.tagLevel,
|
|
2697
2697
|
// parentTagId 保留父子关系上下文。
|
|
2698
|
-
parentTagId:
|
|
2699
|
-
}), R = (
|
|
2698
|
+
parentTagId: m.parentTagId
|
|
2699
|
+
}), R = (m = i.value, p = a.value) => ({
|
|
2700
2700
|
// 详情接口同样需要基础人员和场景参数。
|
|
2701
2701
|
...S(),
|
|
2702
2702
|
// 当前节点所属模板方案。
|
|
2703
|
-
infSchmId:
|
|
2703
|
+
infSchmId: m?.infSchmId,
|
|
2704
2704
|
// 当前点击或加载的树节点 id。
|
|
2705
|
-
tagId:
|
|
2705
|
+
tagId: m?.tagId,
|
|
2706
2706
|
// 保存或刷新指定 section 时优先使用 section 自己的信息集 id。
|
|
2707
|
-
infSetId: p?.infSetId ??
|
|
2707
|
+
infSetId: p?.infSetId ?? m?.infSetId,
|
|
2708
2708
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
2709
|
-
setId: p?.setId ??
|
|
2710
|
-
}), y = async (
|
|
2709
|
+
setId: p?.setId ?? m?.setId
|
|
2710
|
+
}), y = async (m, p) => Ur({
|
|
2711
2711
|
service: e.service,
|
|
2712
2712
|
formatter: e.formatOperationParams,
|
|
2713
|
-
operation:
|
|
2713
|
+
operation: m,
|
|
2714
2714
|
context: p,
|
|
2715
2715
|
viewModel: s.value,
|
|
2716
|
-
sections:
|
|
2716
|
+
sections: A.value,
|
|
2717
2717
|
activeNode: i.value,
|
|
2718
2718
|
activeSection: a.value
|
|
2719
2719
|
}), h = er(
|
|
2720
|
-
async (
|
|
2720
|
+
async (m, p) => {
|
|
2721
2721
|
if (!e.service.requestOperation)
|
|
2722
2722
|
throw Re("service.requestOperation is required");
|
|
2723
|
-
return e.service.requestOperation(
|
|
2723
|
+
return e.service.requestOperation(m, p);
|
|
2724
2724
|
},
|
|
2725
|
-
(
|
|
2726
|
-
), D = async (
|
|
2725
|
+
(m) => Xr(m)
|
|
2726
|
+
), D = async (m, p) => {
|
|
2727
2727
|
const C = await Ln({
|
|
2728
2728
|
formatter: e.formatOperationParams,
|
|
2729
2729
|
params: p?.params,
|
|
2730
|
-
operation:
|
|
2730
|
+
operation: m,
|
|
2731
2731
|
type: p?.type,
|
|
2732
2732
|
requestSource: p?.requestSource,
|
|
2733
2733
|
tagId: p?.tagId,
|
|
@@ -2737,16 +2737,16 @@ const ea = (e) => {
|
|
|
2737
2737
|
row: p?.row,
|
|
2738
2738
|
node: p?.node,
|
|
2739
2739
|
viewModel: s.value,
|
|
2740
|
-
sections:
|
|
2740
|
+
sections: A.value,
|
|
2741
2741
|
activeNode: i.value,
|
|
2742
2742
|
activeSection: a.value,
|
|
2743
2743
|
searchText: p?.searchText
|
|
2744
|
-
}), Y = { ...
|
|
2745
|
-
return h(Y,
|
|
2746
|
-
}, b = (
|
|
2744
|
+
}), Y = { ...m, params: C }, U = p && { ...p, params: C };
|
|
2745
|
+
return h(Y, U);
|
|
2746
|
+
}, b = (m, p) => {
|
|
2747
2747
|
if (!p)
|
|
2748
|
-
return
|
|
2749
|
-
for (const C of
|
|
2748
|
+
return m[0] ?? null;
|
|
2749
|
+
for (const C of m) {
|
|
2750
2750
|
if (Xe(C).includes(p))
|
|
2751
2751
|
return C;
|
|
2752
2752
|
const Y = b(C.children, p);
|
|
@@ -2754,35 +2754,35 @@ const ea = (e) => {
|
|
|
2754
2754
|
return Y;
|
|
2755
2755
|
}
|
|
2756
2756
|
return null;
|
|
2757
|
-
},
|
|
2758
|
-
if (
|
|
2759
|
-
return typeof
|
|
2760
|
-
},
|
|
2761
|
-
const p =
|
|
2757
|
+
}, V = (m = a.value) => {
|
|
2758
|
+
if (m)
|
|
2759
|
+
return typeof m == "string" ? m : He(m) ? E(m) : Me(m);
|
|
2760
|
+
}, v = (m = a.value) => {
|
|
2761
|
+
const p = V(m);
|
|
2762
2762
|
if (!p)
|
|
2763
2763
|
return null;
|
|
2764
2764
|
const C = g.value[p] ?? p;
|
|
2765
2765
|
return l.value[C] ?? null;
|
|
2766
|
-
},
|
|
2767
|
-
const p =
|
|
2766
|
+
}, O = (m = a.value) => {
|
|
2767
|
+
const p = V(m);
|
|
2768
2768
|
if (p)
|
|
2769
2769
|
return g.value[p] ?? p;
|
|
2770
|
-
},
|
|
2771
|
-
if (
|
|
2772
|
-
return typeof
|
|
2773
|
-
},
|
|
2774
|
-
if (
|
|
2775
|
-
return
|
|
2776
|
-
if (typeof
|
|
2777
|
-
const p = b(c.value,
|
|
2770
|
+
}, E = (m = a.value) => {
|
|
2771
|
+
if (m)
|
|
2772
|
+
return typeof m == "string" ? m : He(m) ? m.setId ?? m.infSetId ?? m.key : Me(m);
|
|
2773
|
+
}, z = (m = a.value) => {
|
|
2774
|
+
if (He(m))
|
|
2775
|
+
return m;
|
|
2776
|
+
if (typeof m == "string") {
|
|
2777
|
+
const p = b(c.value, m);
|
|
2778
2778
|
if (p)
|
|
2779
2779
|
return p;
|
|
2780
|
-
const C = m
|
|
2781
|
-
return C?.ownerNodeKey ? b(c.value, C.ownerNodeKey) ?? i.value : C || i.value && Xe(i.value).includes(
|
|
2780
|
+
const C = v(m);
|
|
2781
|
+
return C?.ownerNodeKey ? b(c.value, C.ownerNodeKey) ?? i.value : C || i.value && Xe(i.value).includes(m) ? i.value : null;
|
|
2782
2782
|
}
|
|
2783
|
-
return
|
|
2784
|
-
}, re = (
|
|
2785
|
-
const p =
|
|
2783
|
+
return m?.ownerNodeKey ? b(c.value, m.ownerNodeKey) ?? i.value : i.value;
|
|
2784
|
+
}, re = (m = a.value) => !m || He(m) ? null : v(m), le = (m = a.value) => {
|
|
2785
|
+
const p = E(m);
|
|
2786
2786
|
if (!p)
|
|
2787
2787
|
return Je();
|
|
2788
2788
|
const C = g.value[p] ?? p;
|
|
@@ -2790,12 +2790,12 @@ const ea = (e) => {
|
|
|
2790
2790
|
...$.value[p],
|
|
2791
2791
|
...$.value[C],
|
|
2792
2792
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
2793
|
-
editing:
|
|
2793
|
+
editing: j.value.includes(
|
|
2794
2794
|
C
|
|
2795
2795
|
)
|
|
2796
2796
|
});
|
|
2797
|
-
}, N = (
|
|
2798
|
-
const C =
|
|
2797
|
+
}, N = (m, p) => {
|
|
2798
|
+
const C = E(m);
|
|
2799
2799
|
C && ($.value = {
|
|
2800
2800
|
...$.value,
|
|
2801
2801
|
[C]: Je({
|
|
@@ -2804,12 +2804,12 @@ const ea = (e) => {
|
|
|
2804
2804
|
// 合并本次状态补丁。
|
|
2805
2805
|
...p,
|
|
2806
2806
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
2807
|
-
editing:
|
|
2807
|
+
editing: j.value.includes(C)
|
|
2808
2808
|
})
|
|
2809
2809
|
});
|
|
2810
|
-
},
|
|
2811
|
-
const C =
|
|
2812
|
-
(
|
|
2810
|
+
}, F = (m = s.value?.raw ?? null, p = i.value) => {
|
|
2811
|
+
const C = A.value, Y = a.value && C.find(
|
|
2812
|
+
(U) => Me(U) === Me(a.value)
|
|
2813
2813
|
) ? a.value : null;
|
|
2814
2814
|
s.value = {
|
|
2815
2815
|
// 保留原 scheme。
|
|
@@ -2828,23 +2828,23 @@ const ea = (e) => {
|
|
|
2828
2828
|
// 当前 section 缓存。
|
|
2829
2829
|
sectionMap: l.value,
|
|
2830
2830
|
// 保留原始接口数据。
|
|
2831
|
-
raw:
|
|
2831
|
+
raw: m
|
|
2832
2832
|
}, a.value = Y;
|
|
2833
|
-
},
|
|
2833
|
+
}, B = (m, p = i.value, C) => {
|
|
2834
2834
|
const Y = Wr({
|
|
2835
2835
|
currentMap: l.value,
|
|
2836
2836
|
currentAliasMap: g.value,
|
|
2837
2837
|
currentOrder: w.value,
|
|
2838
2838
|
currentStatusMap: $.value,
|
|
2839
|
-
editingSectionKeys:
|
|
2840
|
-
nextViewModel:
|
|
2839
|
+
editingSectionKeys: j.value,
|
|
2840
|
+
nextViewModel: m,
|
|
2841
2841
|
node: p,
|
|
2842
2842
|
targetKey: C,
|
|
2843
2843
|
activeSection: a.value
|
|
2844
2844
|
});
|
|
2845
2845
|
return l.value = Y.sectionMap, g.value = Y.sectionAliasMap, w.value = Y.sectionOrder, $.value = Y.sectionStatusMap, s.value = {
|
|
2846
|
-
...
|
|
2847
|
-
scheme:
|
|
2846
|
+
...m,
|
|
2847
|
+
scheme: m.scheme ?? s.value?.scheme ?? null,
|
|
2848
2848
|
topNodes: c.value,
|
|
2849
2849
|
treeNodes: c.value,
|
|
2850
2850
|
activeNode: p,
|
|
@@ -2852,27 +2852,27 @@ const ea = (e) => {
|
|
|
2852
2852
|
sections: Y.targetSections,
|
|
2853
2853
|
sectionMap: l.value
|
|
2854
2854
|
}, a.value = Y.matchedSection, Y.matchedSection;
|
|
2855
|
-
}, d = (
|
|
2856
|
-
const C =
|
|
2855
|
+
}, d = (m, p) => {
|
|
2856
|
+
const C = O(m), Y = C ? l.value[C] : null;
|
|
2857
2857
|
if (!C || !Y)
|
|
2858
2858
|
return;
|
|
2859
|
-
const
|
|
2859
|
+
const U = p(Y);
|
|
2860
2860
|
l.value = {
|
|
2861
2861
|
...l.value,
|
|
2862
|
-
[C]:
|
|
2863
|
-
}, a.value = Me(a.value ??
|
|
2864
|
-
}, u = async (
|
|
2865
|
-
const p = re(
|
|
2862
|
+
[C]: U
|
|
2863
|
+
}, a.value = Me(a.value ?? U) === C ? U : a.value, F();
|
|
2864
|
+
}, u = async (m = a.value ?? i.value) => {
|
|
2865
|
+
const p = re(m), C = z(m) ?? i.value, Y = E(m);
|
|
2866
2866
|
if (!C)
|
|
2867
2867
|
return null;
|
|
2868
2868
|
if (!e.service.requestOperation)
|
|
2869
2869
|
throw Re("service.requestOperation is required");
|
|
2870
2870
|
n.value = !0, r.value = null, N(Y ?? C, { loading: !0, error: null });
|
|
2871
2871
|
try {
|
|
2872
|
-
const
|
|
2873
|
-
if (
|
|
2872
|
+
const U = p ? [{ infSetId: p.infSetId, setId: p.setId, operationInfo: p.operationInfo, raw: p.raw }] : C.infSetList;
|
|
2873
|
+
if (U.length === 0)
|
|
2874
2874
|
throw Re("node.infSetList is required");
|
|
2875
|
-
const $e = await Promise.all(
|
|
2875
|
+
const $e = await Promise.all(U.map(async (ie) => {
|
|
2876
2876
|
const he = Kr(p, C, ie.infSetId), Ae = p?.requestTagId ?? p?.tagId ?? C.tagId, ot = {
|
|
2877
2877
|
...R(C, p),
|
|
2878
2878
|
tagId: Ae,
|
|
@@ -2897,48 +2897,48 @@ const ea = (e) => {
|
|
|
2897
2897
|
sections: $e.flatMap((ie) => ie.sections),
|
|
2898
2898
|
sectionMap: Object.fromEntries($e.flatMap((ie) => ie.sections).map((ie) => [ie.key, ie]))
|
|
2899
2899
|
};
|
|
2900
|
-
return
|
|
2901
|
-
} catch (
|
|
2902
|
-
throw r.value =
|
|
2900
|
+
return B(ve, C, Y);
|
|
2901
|
+
} catch (U) {
|
|
2902
|
+
throw r.value = U, N(Y ?? C, { loading: !1, error: U }), U;
|
|
2903
2903
|
} finally {
|
|
2904
2904
|
n.value = !1, N(Y ?? C, { loading: !1 });
|
|
2905
2905
|
}
|
|
2906
|
-
}, _ = (
|
|
2907
|
-
if (!
|
|
2906
|
+
}, _ = (m = a.value) => u(m), L = (m = a.value) => {
|
|
2907
|
+
if (!m)
|
|
2908
2908
|
return null;
|
|
2909
|
-
if (!
|
|
2910
|
-
return m
|
|
2911
|
-
const p =
|
|
2909
|
+
if (!He(m) && typeof m != "string")
|
|
2910
|
+
return v(m);
|
|
2911
|
+
const p = E(m);
|
|
2912
2912
|
return p ? l.value[g.value[p] ?? p] ?? null : null;
|
|
2913
|
-
},
|
|
2914
|
-
const p = Gr(
|
|
2913
|
+
}, P = async (m = i.value) => m ? (await u(m), s.value) : (s.value = null, a.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {}, null), x = async (m) => {
|
|
2914
|
+
const p = Gr(m);
|
|
2915
2915
|
if (!p)
|
|
2916
|
-
return
|
|
2917
|
-
const C = k(
|
|
2916
|
+
return m.children;
|
|
2917
|
+
const C = k(m), Y = await y(p, {
|
|
2918
2918
|
type: "openTag",
|
|
2919
2919
|
requestSource: "sidebar",
|
|
2920
|
-
tagId:
|
|
2921
|
-
node:
|
|
2920
|
+
tagId: m.tagId,
|
|
2921
|
+
node: m,
|
|
2922
2922
|
params: C
|
|
2923
2923
|
});
|
|
2924
|
-
return
|
|
2925
|
-
},
|
|
2926
|
-
if (
|
|
2927
|
-
return
|
|
2928
|
-
const p = await
|
|
2929
|
-
return p.length > 0 && (c.value = Sn(c.value,
|
|
2930
|
-
},
|
|
2931
|
-
const p = typeof
|
|
2932
|
-
return p ? (i.value = p, a.value = null,
|
|
2924
|
+
return qt(Y).treeNodes;
|
|
2925
|
+
}, q = async (m) => {
|
|
2926
|
+
if (m.loaded)
|
|
2927
|
+
return m.children;
|
|
2928
|
+
const p = await x(m);
|
|
2929
|
+
return p.length > 0 && (c.value = Sn(c.value, m.key, p)), p;
|
|
2930
|
+
}, G = async (m) => {
|
|
2931
|
+
const p = typeof m == "string" ? b(c.value, m) : m;
|
|
2932
|
+
return p ? (i.value = p, a.value = null, j.value = [], await q(p), F(s.value?.raw, p), p) : null;
|
|
2933
2933
|
}, Q = async () => {
|
|
2934
|
-
const
|
|
2935
|
-
if (!
|
|
2934
|
+
const m = e.service.templateTree;
|
|
2935
|
+
if (!m)
|
|
2936
2936
|
throw Re("service.templateTree is required");
|
|
2937
2937
|
t.value = !0, r.value = null;
|
|
2938
2938
|
try {
|
|
2939
|
-
const p = await
|
|
2939
|
+
const p = await m(S()), C = qt(p), Y = await Promise.all(
|
|
2940
2940
|
C.treeNodes.map(async ($e) => {
|
|
2941
|
-
const ve = await
|
|
2941
|
+
const ve = await x($e);
|
|
2942
2942
|
return {
|
|
2943
2943
|
...$e,
|
|
2944
2944
|
children: ve,
|
|
@@ -2946,14 +2946,14 @@ const ea = (e) => {
|
|
|
2946
2946
|
};
|
|
2947
2947
|
})
|
|
2948
2948
|
);
|
|
2949
|
-
c.value = Y, a.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {},
|
|
2950
|
-
const
|
|
2951
|
-
return i.value =
|
|
2949
|
+
c.value = Y, a.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {}, j.value = [];
|
|
2950
|
+
const U = b(Y, e.initialActiveNodeKey) ?? b(Y);
|
|
2951
|
+
return i.value = U, s.value = {
|
|
2952
2952
|
...C,
|
|
2953
2953
|
treeNodes: Y,
|
|
2954
|
-
activeNode:
|
|
2954
|
+
activeNode: U,
|
|
2955
2955
|
sectionMap: l.value,
|
|
2956
|
-
sections:
|
|
2956
|
+
sections: A.value
|
|
2957
2957
|
}, c.value;
|
|
2958
2958
|
} catch (p) {
|
|
2959
2959
|
throw r.value = p, p;
|
|
@@ -2961,49 +2961,49 @@ const ea = (e) => {
|
|
|
2961
2961
|
t.value = !1;
|
|
2962
2962
|
}
|
|
2963
2963
|
}, T = async () => {
|
|
2964
|
-
const
|
|
2964
|
+
const m = V();
|
|
2965
2965
|
await _(a.value ?? i.value);
|
|
2966
|
-
const p =
|
|
2967
|
-
(C) => Me(C) ===
|
|
2966
|
+
const p = A.value.find(
|
|
2967
|
+
(C) => Me(C) === m
|
|
2968
2968
|
);
|
|
2969
|
-
return p && (a.value = p),
|
|
2970
|
-
},
|
|
2971
|
-
const p =
|
|
2972
|
-
return !!(p &&
|
|
2973
|
-
}, ue = (
|
|
2974
|
-
const p =
|
|
2975
|
-
!p ||
|
|
2976
|
-
}, de = (
|
|
2977
|
-
const p =
|
|
2978
|
-
p && (
|
|
2969
|
+
return p && (a.value = p), F(), s.value;
|
|
2970
|
+
}, Z = (m = a.value) => {
|
|
2971
|
+
const p = O(m);
|
|
2972
|
+
return !!(p && j.value.includes(p));
|
|
2973
|
+
}, ue = (m = a.value) => {
|
|
2974
|
+
const p = O(m);
|
|
2975
|
+
!p || Z(p) || (j.value = [...j.value, p], N(p, { editing: !0 }));
|
|
2976
|
+
}, de = (m = a.value) => {
|
|
2977
|
+
const p = O(m);
|
|
2978
|
+
p && (j.value = j.value.filter(
|
|
2979
2979
|
(C) => C !== p
|
|
2980
2980
|
), N(p, { editing: !1 }));
|
|
2981
|
-
}, me = (
|
|
2982
|
-
const Y = typeof p == "string" ? p :
|
|
2983
|
-
d(
|
|
2984
|
-
const ve = (typeof p == "string" ?
|
|
2985
|
-
...
|
|
2981
|
+
}, me = (m, p, C) => {
|
|
2982
|
+
const Y = typeof p == "string" ? p : Ee(p);
|
|
2983
|
+
d(m, (U) => {
|
|
2984
|
+
const ve = (typeof p == "string" ? U.fields.find((he) => Ee(he) === Y || he.code === Y) : p)?.cascadeClearFields ?? [], ie = {
|
|
2985
|
+
...U.model,
|
|
2986
2986
|
[Y]: C
|
|
2987
2987
|
};
|
|
2988
2988
|
return ve.forEach((he) => {
|
|
2989
2989
|
ie[he] = "";
|
|
2990
2990
|
}), {
|
|
2991
2991
|
// 保留 section 其它元数据。
|
|
2992
|
-
...
|
|
2992
|
+
...U,
|
|
2993
2993
|
// 更新表单 model。
|
|
2994
2994
|
model: ie,
|
|
2995
2995
|
// 表单类型同步更新第一行 rows,方便保存时统一从 rows 构造 payload。
|
|
2996
|
-
rows:
|
|
2996
|
+
rows: U.renderType === "form" ? [{ ...U.rows[0], ...ie }] : U.rows,
|
|
2997
2997
|
// 同步 fields.value,保证只读 renderer 立即显示新值。
|
|
2998
|
-
fields:
|
|
2999
|
-
const Ae =
|
|
2998
|
+
fields: U.fields.map((he) => {
|
|
2999
|
+
const Ae = Ee(he);
|
|
3000
3000
|
return Ae === Y || he.code === Y ? { ...he, value: C } : ve.includes(Ae) || ve.includes(he.code) ? { ...he, value: "" } : he;
|
|
3001
3001
|
})
|
|
3002
3002
|
};
|
|
3003
3003
|
});
|
|
3004
|
-
}, we = async (
|
|
3005
|
-
const
|
|
3006
|
-
if (!
|
|
3004
|
+
}, we = async (m, p, C = {}, Y = {}) => {
|
|
3005
|
+
const U = v(m);
|
|
3006
|
+
if (!U)
|
|
3007
3007
|
return [];
|
|
3008
3008
|
const $e = {
|
|
3009
3009
|
...C,
|
|
@@ -3014,16 +3014,16 @@ const ea = (e) => {
|
|
|
3014
3014
|
sourceModel: he,
|
|
3015
3015
|
sourceRow: Ae,
|
|
3016
3016
|
missingDependField: ot
|
|
3017
|
-
} = Rr(
|
|
3017
|
+
} = Rr(U, p, $e), Ke = ie?.interface;
|
|
3018
3018
|
if (!ie || !Ke)
|
|
3019
3019
|
return ie?.options ?? [];
|
|
3020
3020
|
if (zr(ie))
|
|
3021
3021
|
return ie.options ?? [];
|
|
3022
3022
|
if (ot)
|
|
3023
|
-
return d(
|
|
3023
|
+
return d(U, (Ye) => ({
|
|
3024
3024
|
...Ye,
|
|
3025
3025
|
fields: Ye.fields.map(
|
|
3026
|
-
(
|
|
3026
|
+
(Pe) => Ee(Pe) === ve || Pe.code === ve ? { ...Pe, options: [] } : Pe
|
|
3027
3027
|
)
|
|
3028
3028
|
})), [];
|
|
3029
3029
|
const Yn = await D(
|
|
@@ -3033,9 +3033,9 @@ const ea = (e) => {
|
|
|
3033
3033
|
{
|
|
3034
3034
|
type: "fieldOptions",
|
|
3035
3035
|
requestSource: "inner",
|
|
3036
|
-
tagId:
|
|
3037
|
-
node:
|
|
3038
|
-
section:
|
|
3036
|
+
tagId: U.requestTagId ?? U.tagId,
|
|
3037
|
+
node: z(U),
|
|
3038
|
+
section: U,
|
|
3039
3039
|
field: ie,
|
|
3040
3040
|
params: Te(Ke.params),
|
|
3041
3041
|
// searchText 参与本次查询时,需要一并透传到 model 上,避免被依赖检查视为缺失并提前截断请求。
|
|
@@ -3043,19 +3043,19 @@ const ea = (e) => {
|
|
|
3043
3043
|
row: Ae,
|
|
3044
3044
|
searchText: Y.searchText
|
|
3045
3045
|
}
|
|
3046
|
-
), Dt =
|
|
3047
|
-
return d(
|
|
3046
|
+
), Dt = xr(Yn);
|
|
3047
|
+
return d(U, (Ye) => ({
|
|
3048
3048
|
...Ye,
|
|
3049
3049
|
fields: Ye.fields.map(
|
|
3050
|
-
(
|
|
3050
|
+
(Pe) => Ee(Pe) === ve || Pe.code === ve ? { ...Pe, options: Dt } : Pe
|
|
3051
3051
|
)
|
|
3052
3052
|
})), Dt;
|
|
3053
|
-
}, De = (
|
|
3053
|
+
}, De = (m, p) => {
|
|
3054
3054
|
if (Array.isArray(p)) {
|
|
3055
|
-
Ie(
|
|
3055
|
+
Ie(m, p);
|
|
3056
3056
|
return;
|
|
3057
3057
|
}
|
|
3058
|
-
d(
|
|
3058
|
+
d(m, (C) => ({
|
|
3059
3059
|
...C,
|
|
3060
3060
|
// 替换当前 model。
|
|
3061
3061
|
model: p,
|
|
@@ -3064,11 +3064,11 @@ const ea = (e) => {
|
|
|
3064
3064
|
// fields.value 也同步成 model 中的值。
|
|
3065
3065
|
fields: C.fields.map((Y) => ({
|
|
3066
3066
|
...Y,
|
|
3067
|
-
value: p[
|
|
3067
|
+
value: p[Ee(Y)]
|
|
3068
3068
|
}))
|
|
3069
3069
|
}));
|
|
3070
|
-
}, Ie = (
|
|
3071
|
-
d(
|
|
3070
|
+
}, Ie = (m, p) => {
|
|
3071
|
+
d(m, (C) => ({
|
|
3072
3072
|
...C,
|
|
3073
3073
|
rows: p,
|
|
3074
3074
|
data: p
|
|
@@ -3077,9 +3077,9 @@ const ea = (e) => {
|
|
|
3077
3077
|
// 加载模板树。
|
|
3078
3078
|
loadTree: Q,
|
|
3079
3079
|
// 选中树节点。
|
|
3080
|
-
selectNode:
|
|
3080
|
+
selectNode: G,
|
|
3081
3081
|
// 加载当前节点详情。
|
|
3082
|
-
loadDetail:
|
|
3082
|
+
loadDetail: P,
|
|
3083
3083
|
// 刷新当前详情。
|
|
3084
3084
|
reloadActiveSection: T,
|
|
3085
3085
|
// 加载指定节点或 section。
|
|
@@ -3087,7 +3087,7 @@ const ea = (e) => {
|
|
|
3087
3087
|
// 重新加载指定节点或 section。
|
|
3088
3088
|
reloadSection: _,
|
|
3089
3089
|
// 获取指定节点或 section 的缓存数据。
|
|
3090
|
-
getSection:
|
|
3090
|
+
getSection: L,
|
|
3091
3091
|
// 获取指定节点或 section 的状态。
|
|
3092
3092
|
getSectionStatus: le,
|
|
3093
3093
|
// 开启编辑。
|
|
@@ -3103,20 +3103,20 @@ const ea = (e) => {
|
|
|
3103
3103
|
// 更新表格行。
|
|
3104
3104
|
updateTableRows: Ie,
|
|
3105
3105
|
// 保存单行到本地缓存。
|
|
3106
|
-
saveRow: (
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3106
|
+
saveRow: (m, p = {}, C = -1) => {
|
|
3107
|
+
const U = [...v(m)?.rows ?? []];
|
|
3108
|
+
U.splice(C >= 0 ? C : U.length, C >= 0 ? 1 : 0, p), Ie(m, U);
|
|
3109
3109
|
},
|
|
3110
3110
|
// 删除单行本地缓存。
|
|
3111
|
-
deleteRow: (
|
|
3112
|
-
const C = m
|
|
3111
|
+
deleteRow: (m, p) => {
|
|
3112
|
+
const C = v(m), Y = typeof p == "string" ? Number(p) : p, U = (C?.rows ?? []).filter(
|
|
3113
3113
|
($e, ve) => ve !== Y
|
|
3114
3114
|
);
|
|
3115
|
-
Ie(
|
|
3115
|
+
Ie(m, U);
|
|
3116
3116
|
},
|
|
3117
3117
|
// 调用接口保存 section。
|
|
3118
|
-
saveSection: async (
|
|
3119
|
-
const p =
|
|
3118
|
+
saveSection: async (m = a.value) => {
|
|
3119
|
+
const p = V(m), C = v(m);
|
|
3120
3120
|
if (!C)
|
|
3121
3121
|
return null;
|
|
3122
3122
|
const Y = Yr(C);
|
|
@@ -3125,7 +3125,7 @@ const ea = (e) => {
|
|
|
3125
3125
|
o.value = !0, r.value = null, p && p !== Me(C) && N(p, { saving: !0, error: null }), N(C, { saving: !0, error: null });
|
|
3126
3126
|
try {
|
|
3127
3127
|
const {
|
|
3128
|
-
tagId:
|
|
3128
|
+
tagId: U,
|
|
3129
3129
|
...$e
|
|
3130
3130
|
} = R(i.value, C), ve = $r(C, $e), ie = Zr(
|
|
3131
3131
|
C,
|
|
@@ -3150,22 +3150,22 @@ const ea = (e) => {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
);
|
|
3152
3152
|
return de(C), await _(C), he;
|
|
3153
|
-
} catch (
|
|
3154
|
-
throw r.value =
|
|
3153
|
+
} catch (U) {
|
|
3154
|
+
throw r.value = U, p && p !== Me(C) && N(p, { saving: !1, error: U }), N(C, { saving: !1, error: U }), U;
|
|
3155
3155
|
} finally {
|
|
3156
3156
|
o.value = !1, p && p !== Me(C) && N(p, { saving: !1 }), N(C, { saving: !1 });
|
|
3157
3157
|
}
|
|
3158
3158
|
},
|
|
3159
3159
|
// 判断编辑态。
|
|
3160
|
-
isEditing:
|
|
3160
|
+
isEditing: Z
|
|
3161
3161
|
};
|
|
3162
|
-
return
|
|
3162
|
+
return je(
|
|
3163
3163
|
// 监听当前人员 id。
|
|
3164
3164
|
() => e.emplid,
|
|
3165
3165
|
() => {
|
|
3166
3166
|
(e.autoLoad ?? !0) && Q();
|
|
3167
3167
|
}
|
|
3168
|
-
),
|
|
3168
|
+
), Ut(() => {
|
|
3169
3169
|
(e.autoLoad ?? !0) && Q();
|
|
3170
3170
|
}), {
|
|
3171
3171
|
// 当前 viewModel。
|
|
@@ -3173,7 +3173,7 @@ const ea = (e) => {
|
|
|
3173
3173
|
// 当前模板树节点。
|
|
3174
3174
|
nodes: c,
|
|
3175
3175
|
// 当前已加载 section 列表。
|
|
3176
|
-
sections:
|
|
3176
|
+
sections: A,
|
|
3177
3177
|
// 当前 section 缓存。
|
|
3178
3178
|
sectionMap: l,
|
|
3179
3179
|
// 当前 section 状态缓存。
|
|
@@ -3270,17 +3270,17 @@ const ta = {
|
|
|
3270
3270
|
() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)
|
|
3271
3271
|
), $ = M(
|
|
3272
3272
|
() => r.includes(s.value) ? n.field.props?.resize ?? "vertical" : void 0
|
|
3273
|
-
),
|
|
3273
|
+
), j = M(() => {
|
|
3274
3274
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "")
|
|
3275
3275
|
return;
|
|
3276
3276
|
const u = typeof n.modelValue == "number" ? n.modelValue : Number(n.modelValue);
|
|
3277
3277
|
return Number.isFinite(u) ? u : void 0;
|
|
3278
|
-
}),
|
|
3278
|
+
}), A = M(
|
|
3279
3279
|
() => ur(n.field, n.modelValue)
|
|
3280
3280
|
), f = M(
|
|
3281
3281
|
() => (n.field.options ?? []).map((u) => ({
|
|
3282
3282
|
...u,
|
|
3283
|
-
value:
|
|
3283
|
+
value: O(u)
|
|
3284
3284
|
}))
|
|
3285
3285
|
), S = M(() => {
|
|
3286
3286
|
const u = n.field.props?.popperClass ?? n.field.props?.["popper-class"];
|
|
@@ -3299,29 +3299,29 @@ const ta = {
|
|
|
3299
3299
|
() => mn(
|
|
3300
3300
|
n.field,
|
|
3301
3301
|
n.modelValue,
|
|
3302
|
-
|
|
3302
|
+
X("common.请选择文件")
|
|
3303
3303
|
)
|
|
3304
3304
|
), b = M(
|
|
3305
3305
|
() => hn(
|
|
3306
3306
|
n.field,
|
|
3307
3307
|
n.modelValue,
|
|
3308
|
-
|
|
3308
|
+
X("common.请选择文件")
|
|
3309
3309
|
)
|
|
3310
|
-
),
|
|
3311
|
-
let
|
|
3312
|
-
function
|
|
3313
|
-
if (Array.isArray(
|
|
3314
|
-
const _ =
|
|
3315
|
-
(
|
|
3310
|
+
), V = M(() => n.field.placeholder ? n.field.placeholder : i.value ? X("common.请输入关键词") : s.value === "select" ? X("common.请选择") : s.value === "date" ? X("common.请选择日期") : s.value === "file" ? X("common.请选择文件") : X("common.请输入"));
|
|
3311
|
+
let v;
|
|
3312
|
+
function O(u) {
|
|
3313
|
+
if (Array.isArray(A.value)) {
|
|
3314
|
+
const _ = A.value.find(
|
|
3315
|
+
(L) => Ze(u, L)
|
|
3316
3316
|
);
|
|
3317
3317
|
if (_ !== void 0) return _;
|
|
3318
3318
|
}
|
|
3319
|
-
return Ze(u,
|
|
3319
|
+
return Ze(u, A.value) ? A.value : u.value;
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function E(u) {
|
|
3322
3322
|
o("update:modelValue", re(u));
|
|
3323
3323
|
}
|
|
3324
|
-
function
|
|
3324
|
+
function z(u) {
|
|
3325
3325
|
o("change", re(u));
|
|
3326
3326
|
}
|
|
3327
3327
|
function re(u) {
|
|
@@ -3331,33 +3331,33 @@ const ta = {
|
|
|
3331
3331
|
u && o("loadOptions", i.value ? { searchText: "" } : void 0);
|
|
3332
3332
|
}
|
|
3333
3333
|
function N(u) {
|
|
3334
|
-
i.value && (
|
|
3334
|
+
i.value && (v && clearTimeout(v), v = setTimeout(() => {
|
|
3335
3335
|
o("loadOptions", { searchText: u });
|
|
3336
3336
|
}, 300));
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3338
|
+
function F() {
|
|
3339
3339
|
l.value || c.value?.click();
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function B(u) {
|
|
3342
3342
|
En(u);
|
|
3343
3343
|
}
|
|
3344
3344
|
Xn(() => {
|
|
3345
|
-
|
|
3345
|
+
v && clearTimeout(v);
|
|
3346
3346
|
});
|
|
3347
3347
|
function d(u) {
|
|
3348
|
-
const _ = u.target,
|
|
3349
|
-
P
|
|
3348
|
+
const _ = u.target, L = Array.from(_.files ?? []), P = n.field.props?.multiple ? L : L[0] ?? null;
|
|
3349
|
+
E(P), z(P);
|
|
3350
3350
|
}
|
|
3351
3351
|
return (u, _) => {
|
|
3352
|
-
const
|
|
3353
|
-
return s.value === "select" || s.value === "select_remote" ? (I(),
|
|
3352
|
+
const L = Xt, P = Qt, x = Wt, q = ao, G = so, Q = Zt;
|
|
3353
|
+
return s.value === "select" || s.value === "select_remote" ? (I(), H(P, ae({
|
|
3354
3354
|
key: 0,
|
|
3355
3355
|
class: "global-info-field-control"
|
|
3356
3356
|
}, u.field.props, {
|
|
3357
3357
|
"popper-class": S.value,
|
|
3358
3358
|
teleported: k.value,
|
|
3359
|
-
"model-value":
|
|
3360
|
-
placeholder:
|
|
3359
|
+
"model-value": A.value,
|
|
3360
|
+
placeholder: V.value,
|
|
3361
3361
|
disabled: l.value,
|
|
3362
3362
|
"collapse-tags": g.value,
|
|
3363
3363
|
"collapse-tags-tooltip": g.value,
|
|
@@ -3367,11 +3367,11 @@ const ta = {
|
|
|
3367
3367
|
"remote-method": i.value ? N : u.field.props?.remoteMethod,
|
|
3368
3368
|
clearable: "",
|
|
3369
3369
|
onVisibleChange: le,
|
|
3370
|
-
"onUpdate:modelValue":
|
|
3371
|
-
onChange:
|
|
3370
|
+
"onUpdate:modelValue": E,
|
|
3371
|
+
onChange: z
|
|
3372
3372
|
}), {
|
|
3373
3373
|
default: W(() => [
|
|
3374
|
-
(I(!0), K(Se, null, ye(f.value, (T) => (I(),
|
|
3374
|
+
(I(!0), K(Se, null, ye(f.value, (T) => (I(), H(L, {
|
|
3375
3375
|
key: String(T.value),
|
|
3376
3376
|
label: T.label,
|
|
3377
3377
|
value: T.value
|
|
@@ -3386,35 +3386,35 @@ const ta = {
|
|
|
3386
3386
|
}, 1032, ["label", "value"]))), 128))
|
|
3387
3387
|
]),
|
|
3388
3388
|
_: 1
|
|
3389
|
-
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (I(),
|
|
3389
|
+
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (I(), H(x, ae({
|
|
3390
3390
|
key: 1,
|
|
3391
3391
|
class: "global-info-field-control"
|
|
3392
3392
|
}, u.field.props, {
|
|
3393
3393
|
"model-value": u.modelValue,
|
|
3394
|
-
placeholder:
|
|
3394
|
+
placeholder: V.value,
|
|
3395
3395
|
disabled: l.value,
|
|
3396
3396
|
type: "date",
|
|
3397
3397
|
"value-format": "YYYY-MM-DD",
|
|
3398
|
-
"onUpdate:modelValue":
|
|
3399
|
-
onChange:
|
|
3400
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (I(),
|
|
3398
|
+
"onUpdate:modelValue": E,
|
|
3399
|
+
onChange: z
|
|
3400
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (I(), H(q, ae({
|
|
3401
3401
|
key: 2,
|
|
3402
3402
|
class: "global-info-field-control"
|
|
3403
3403
|
}, u.field.props, {
|
|
3404
|
-
"model-value":
|
|
3405
|
-
placeholder:
|
|
3404
|
+
"model-value": j.value,
|
|
3405
|
+
placeholder: V.value,
|
|
3406
3406
|
disabled: l.value,
|
|
3407
3407
|
"controls-position": "right",
|
|
3408
|
-
"onUpdate:modelValue":
|
|
3409
|
-
onChange:
|
|
3410
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (I(),
|
|
3408
|
+
"onUpdate:modelValue": E,
|
|
3409
|
+
onChange: z
|
|
3410
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (I(), H(G, ae({
|
|
3411
3411
|
key: 3,
|
|
3412
3412
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3413
3413
|
}, u.field.props, {
|
|
3414
3414
|
"model-value": R.value,
|
|
3415
3415
|
disabled: l.value,
|
|
3416
|
-
"onUpdate:modelValue":
|
|
3417
|
-
onChange:
|
|
3416
|
+
"onUpdate:modelValue": E,
|
|
3417
|
+
onChange: z
|
|
3418
3418
|
}), null, 16, ["model-value", "disabled"])) : s.value === "file" ? (I(), K("div", {
|
|
3419
3419
|
key: 4,
|
|
3420
3420
|
class: We(["global-info-field-control global-info-field-control--file", {
|
|
@@ -3422,7 +3422,7 @@ const ta = {
|
|
|
3422
3422
|
"is-empty": !h.value,
|
|
3423
3423
|
"is-filled": h.value
|
|
3424
3424
|
}]),
|
|
3425
|
-
onClick:
|
|
3425
|
+
onClick: F
|
|
3426
3426
|
}, [
|
|
3427
3427
|
ne("input", {
|
|
3428
3428
|
ref_key: "fileInputRef",
|
|
@@ -3435,25 +3435,25 @@ const ta = {
|
|
|
3435
3435
|
onChange: d
|
|
3436
3436
|
}, null, 40, ra),
|
|
3437
3437
|
b.value.length ? (I(), K("span", aa, [
|
|
3438
|
-
(I(!0), K(Se, null, ye(b.value, (T,
|
|
3438
|
+
(I(!0), K(Se, null, ye(b.value, (T, Z) => (I(), K(Se, {
|
|
3439
3439
|
key: T.key
|
|
3440
3440
|
}, [
|
|
3441
3441
|
T.action ? (I(), K("button", {
|
|
3442
3442
|
key: 0,
|
|
3443
3443
|
class: "global-info-field-control__file-preview",
|
|
3444
3444
|
type: "button",
|
|
3445
|
-
onClick:
|
|
3445
|
+
onClick: Ht((ue) => B(T), ["stop", "prevent"])
|
|
3446
3446
|
}, oe(T.text), 9, sa)) : (I(), K("span", la, oe(T.text), 1)),
|
|
3447
|
-
|
|
3447
|
+
Z < b.value.length - 1 ? (I(), K("span", ia, "、")) : fe("", !0)
|
|
3448
3448
|
], 64))), 128))
|
|
3449
|
-
])) : h.value ? (I(), K("span", ca, oe(D.value), 1)) : (I(), K("span", ua, oe(J(
|
|
3450
|
-
], 2)) : s.value === "empty" ? (I(),
|
|
3449
|
+
])) : h.value ? (I(), K("span", ca, oe(D.value), 1)) : (I(), K("span", ua, oe(J(X)("common.上传")), 1))
|
|
3450
|
+
], 2)) : s.value === "empty" ? (I(), H(Q, {
|
|
3451
3451
|
key: 5,
|
|
3452
3452
|
class: "global-info-field-control",
|
|
3453
3453
|
"model-value": "",
|
|
3454
3454
|
disabled: "",
|
|
3455
3455
|
placeholder: "-"
|
|
3456
|
-
})) : (I(),
|
|
3456
|
+
})) : (I(), H(Q, ae({
|
|
3457
3457
|
key: 6,
|
|
3458
3458
|
class: ["global-info-field-control", {
|
|
3459
3459
|
"global-info-field-control--textarea": r.includes(s.value),
|
|
@@ -3461,13 +3461,13 @@ const ta = {
|
|
|
3461
3461
|
}]
|
|
3462
3462
|
}, u.field.props, {
|
|
3463
3463
|
"model-value": w.value,
|
|
3464
|
-
placeholder:
|
|
3464
|
+
placeholder: V.value,
|
|
3465
3465
|
disabled: l.value,
|
|
3466
3466
|
type: r.includes(s.value) ? "textarea" : "text",
|
|
3467
3467
|
rows: r.includes(s.value) ? y.value : void 0,
|
|
3468
3468
|
resize: $.value,
|
|
3469
|
-
"onUpdate:modelValue":
|
|
3470
|
-
onChange:
|
|
3469
|
+
"onUpdate:modelValue": E,
|
|
3470
|
+
onChange: z
|
|
3471
3471
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
3472
3472
|
};
|
|
3473
3473
|
}
|
|
@@ -3541,7 +3541,7 @@ function Rn(e, t, n) {
|
|
|
3541
3541
|
function zn(e, t) {
|
|
3542
3542
|
return [e.code, e.key, e.id].map((o) => t[o]).filter((o) => !_e(o))[0] ?? e.value;
|
|
3543
3543
|
}
|
|
3544
|
-
function
|
|
3544
|
+
function qn(e, t) {
|
|
3545
3545
|
return ut(e) ? {
|
|
3546
3546
|
searchText: t == null ? "" : String(t)
|
|
3547
3547
|
} : {};
|
|
@@ -3563,7 +3563,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3563
3563
|
renderConfig: {}
|
|
3564
3564
|
},
|
|
3565
3565
|
setup(e) {
|
|
3566
|
-
const t = e, n =
|
|
3566
|
+
const t = e, n = Le(), o = M(() => t.model ?? t.section.model), r = /* @__PURE__ */ new Map(), c = M(() => ft(
|
|
3567
3567
|
t.section.fields,
|
|
3568
3568
|
t.section,
|
|
3569
3569
|
t.renderConfig,
|
|
@@ -3574,15 +3574,15 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3574
3574
|
);
|
|
3575
3575
|
function i(h, D) {
|
|
3576
3576
|
const b = { ...o.value, [h.code]: D };
|
|
3577
|
-
(h.cascadeClearFields ?? []).forEach((
|
|
3578
|
-
b[
|
|
3579
|
-
}), t.onUpdateModel?.(b), t.onUpdateModel || t.actions.updateField(t.section, h, D), a(h, D, b),
|
|
3577
|
+
(h.cascadeClearFields ?? []).forEach((V) => {
|
|
3578
|
+
b[V] = "";
|
|
3579
|
+
}), t.onUpdateModel?.(b), t.onUpdateModel || t.actions.updateField(t.section, h, D), a(h, D, b), j(b, h);
|
|
3580
3580
|
}
|
|
3581
3581
|
function a(h, D, b) {
|
|
3582
|
-
const
|
|
3583
|
-
if (
|
|
3582
|
+
const V = t.renderConfig?.onFieldBusinessChange;
|
|
3583
|
+
if (V)
|
|
3584
3584
|
try {
|
|
3585
|
-
const
|
|
3585
|
+
const v = l(h, D), O = {
|
|
3586
3586
|
field: h,
|
|
3587
3587
|
value: D,
|
|
3588
3588
|
section: t.section,
|
|
@@ -3593,72 +3593,68 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3593
3593
|
sections: g(),
|
|
3594
3594
|
sectionValues: w(t.section, b),
|
|
3595
3595
|
actions: t.actions,
|
|
3596
|
-
selectedOption:
|
|
3597
|
-
selectedOptions:
|
|
3596
|
+
selectedOption: v[0],
|
|
3597
|
+
selectedOptions: v
|
|
3598
3598
|
};
|
|
3599
|
-
Promise.resolve(
|
|
3600
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3599
|
+
Promise.resolve(V(O)).catch((E) => {
|
|
3600
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", E);
|
|
3601
3601
|
});
|
|
3602
|
-
} catch (
|
|
3603
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3602
|
+
} catch (v) {
|
|
3603
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", v);
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
function l(h, D) {
|
|
3607
3607
|
const b = dt(h, D);
|
|
3608
|
-
return (h.options ?? []).filter((
|
|
3608
|
+
return (h.options ?? []).filter((V) => b.some((v) => Ze(V, v)));
|
|
3609
3609
|
}
|
|
3610
3610
|
function g() {
|
|
3611
3611
|
return Object.values(t.state.sectionMap);
|
|
3612
3612
|
}
|
|
3613
3613
|
function w(h, D) {
|
|
3614
|
-
const
|
|
3615
|
-
const
|
|
3616
|
-
return [
|
|
3614
|
+
const V = g().flatMap((v) => {
|
|
3615
|
+
const O = v.key === h.key ? D : v.renderType === "table" ? v.rows : v.model;
|
|
3616
|
+
return [v.key, v.id, v.setId, v.infSetId, v.code].filter(Boolean).map((E) => [String(E), O]);
|
|
3617
3617
|
});
|
|
3618
|
-
return Object.fromEntries(
|
|
3618
|
+
return Object.fromEntries(V);
|
|
3619
3619
|
}
|
|
3620
3620
|
async function $(h, D = {}, b = o.value) {
|
|
3621
|
-
const
|
|
3622
|
-
if (!An(D) && lt(h,
|
|
3623
|
-
r.set(
|
|
3621
|
+
const V = b, v = k(h), O = st(t.section.key, h, V), E = r.get(v);
|
|
3622
|
+
if (!An(D) && lt(h, E, O)) {
|
|
3623
|
+
r.set(v, O);
|
|
3624
3624
|
return;
|
|
3625
3625
|
}
|
|
3626
3626
|
try {
|
|
3627
3627
|
if (D.searchText !== void 0) {
|
|
3628
|
-
await s(h,
|
|
3628
|
+
await s(h, V, D);
|
|
3629
3629
|
return;
|
|
3630
3630
|
}
|
|
3631
|
-
await t.actions.loadFieldOptions(t.section, h,
|
|
3631
|
+
await t.actions.loadFieldOptions(t.section, h, V, D), r.set(v, O);
|
|
3632
3632
|
} catch (re) {
|
|
3633
3633
|
console.error("[GlobalInfoFormRenderer] load field options failed", re);
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
|
-
async function
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3636
|
+
async function j(h = o.value, D) {
|
|
3637
|
+
const b = [];
|
|
3638
|
+
for (const V of c.value) {
|
|
3639
|
+
if (D && !Nn(V, D)) continue;
|
|
3640
|
+
const v = zn(V, h);
|
|
3641
|
+
if (!R(V, v)) continue;
|
|
3642
|
+
const O = st(t.section.key, V, h), E = k(V), z = r.get(E);
|
|
3643
|
+
if (lt(V, z, O)) {
|
|
3644
|
+
r.set(E, O);
|
|
3644
3645
|
continue;
|
|
3645
3646
|
}
|
|
3646
|
-
|
|
3647
|
+
z !== O && b.push($(V, qn(V, v), h));
|
|
3647
3648
|
}
|
|
3649
|
+
await Promise.allSettled(b);
|
|
3648
3650
|
}
|
|
3649
|
-
|
|
3651
|
+
je(
|
|
3650
3652
|
() => t.section.key,
|
|
3651
3653
|
() => {
|
|
3652
3654
|
r.clear();
|
|
3653
3655
|
}
|
|
3654
|
-
), Le(
|
|
3655
|
-
() => t.editing,
|
|
3656
|
-
() => {
|
|
3657
|
-
V();
|
|
3658
|
-
},
|
|
3659
|
-
{ immediate: !0 }
|
|
3660
3656
|
);
|
|
3661
|
-
function
|
|
3657
|
+
function A(h) {
|
|
3662
3658
|
const D = o.value[h.code];
|
|
3663
3659
|
return {
|
|
3664
3660
|
field: h,
|
|
@@ -3676,12 +3672,12 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3676
3672
|
function f(h) {
|
|
3677
3673
|
const D = String(h.code || "").trim(), b = D ? `field-${D}` : "";
|
|
3678
3674
|
if (b && n[b]) return b;
|
|
3679
|
-
const
|
|
3680
|
-
if (
|
|
3681
|
-
const
|
|
3682
|
-
if (
|
|
3683
|
-
const
|
|
3684
|
-
return
|
|
3675
|
+
const V = b.toLowerCase();
|
|
3676
|
+
if (V !== b && n[V]) return V;
|
|
3677
|
+
const v = String(h.raw?.type || h.fieldType || h.type || "").trim(), O = v ? `field-type-${v}` : "";
|
|
3678
|
+
if (O && n[O]) return O;
|
|
3679
|
+
const E = O.toLowerCase();
|
|
3680
|
+
return E !== O && n[E] ? E : "";
|
|
3685
3681
|
}
|
|
3686
3682
|
function S(h) {
|
|
3687
3683
|
return h.span ? Math.min(Math.max(h.span, 1), 24) : 6;
|
|
@@ -3696,44 +3692,44 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3696
3692
|
return h.required || h.isRequired;
|
|
3697
3693
|
}
|
|
3698
3694
|
return (h, D) => {
|
|
3699
|
-
const b = en,
|
|
3700
|
-
return I(),
|
|
3695
|
+
const b = en, V = tn;
|
|
3696
|
+
return I(), H(V, {
|
|
3701
3697
|
class: "global-info-form-renderer",
|
|
3702
3698
|
model: o.value,
|
|
3703
3699
|
"label-position": "top"
|
|
3704
3700
|
}, {
|
|
3705
3701
|
default: W(() => [
|
|
3706
3702
|
ne("div", Sa, [
|
|
3707
|
-
(I(!0), K(Se, null, ye(c.value, (
|
|
3708
|
-
key: k(
|
|
3703
|
+
(I(!0), K(Se, null, ye(c.value, (v) => (I(), K("div", {
|
|
3704
|
+
key: k(v),
|
|
3709
3705
|
class: "global-info-form-renderer__grid-item",
|
|
3710
|
-
style: $t({ gridColumn: `span ${S(
|
|
3706
|
+
style: $t({ gridColumn: `span ${S(v)}` })
|
|
3711
3707
|
}, [
|
|
3712
3708
|
ke(b, ae({
|
|
3713
|
-
prop:
|
|
3709
|
+
prop: v.code,
|
|
3714
3710
|
ref_for: !0
|
|
3715
|
-
},
|
|
3711
|
+
}, v.formItemProps), {
|
|
3716
3712
|
label: W(() => [
|
|
3717
3713
|
ne("span", _a, [
|
|
3718
|
-
y(
|
|
3719
|
-
|
|
3714
|
+
y(v) ? (I(), K("span", wa, "*")) : fe("", !0),
|
|
3715
|
+
Ue(" " + oe(v.label), 1)
|
|
3720
3716
|
])
|
|
3721
3717
|
]),
|
|
3722
3718
|
default: W(() => [
|
|
3723
|
-
f(
|
|
3719
|
+
f(v) ? te(h.$slots, f(v), ae({
|
|
3724
3720
|
key: 0,
|
|
3725
3721
|
ref_for: !0
|
|
3726
|
-
},
|
|
3722
|
+
}, A(v)), void 0, !0) : h.editing && !v.readonly ? (I(), H(Vn, {
|
|
3727
3723
|
key: 1,
|
|
3728
|
-
field:
|
|
3729
|
-
"model-value": o.value[
|
|
3724
|
+
field: v,
|
|
3725
|
+
"model-value": o.value[v.code],
|
|
3730
3726
|
section: h.section,
|
|
3731
|
-
onLoadOptions: (
|
|
3732
|
-
"onUpdate:modelValue": (
|
|
3733
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (I(),
|
|
3727
|
+
onLoadOptions: (O) => $(v, O),
|
|
3728
|
+
"onUpdate:modelValue": (O) => i(v, O)
|
|
3729
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
3734
3730
|
key: 2,
|
|
3735
|
-
field:
|
|
3736
|
-
value: o.value[
|
|
3731
|
+
field: v,
|
|
3732
|
+
value: o.value[v.code],
|
|
3737
3733
|
section: h.section
|
|
3738
3734
|
}, null, 8, ["field", "value", "section"]))
|
|
3739
3735
|
]),
|
|
@@ -3746,19 +3742,19 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3746
3742
|
}, 8, ["model"]);
|
|
3747
3743
|
};
|
|
3748
3744
|
}
|
|
3749
|
-
}), $a = /* @__PURE__ */ be(Ia, [["__scopeId", "data-v-
|
|
3745
|
+
}), $a = /* @__PURE__ */ be(Ia, [["__scopeId", "data-v-08b69ae0"]]), Ca = /* @__PURE__ */ pe({
|
|
3750
3746
|
name: "GlobalInfoDeleteConfirm",
|
|
3751
3747
|
__name: "GlobalInfoDeleteConfirm",
|
|
3752
3748
|
props: {
|
|
3753
|
-
title: { default:
|
|
3754
|
-
confirmText: { default:
|
|
3755
|
-
cancelText: { default:
|
|
3749
|
+
title: { default: X("common.确认删除吗?") },
|
|
3750
|
+
confirmText: { default: X("common.确认") },
|
|
3751
|
+
cancelText: { default: X("common.取消") }
|
|
3756
3752
|
},
|
|
3757
3753
|
emits: ["confirm", "cancel"],
|
|
3758
3754
|
setup(e) {
|
|
3759
3755
|
return (t, n) => {
|
|
3760
3756
|
const o = lo;
|
|
3761
|
-
return I(),
|
|
3757
|
+
return I(), H(o, {
|
|
3762
3758
|
title: t.title,
|
|
3763
3759
|
"confirm-button-text": t.confirmText,
|
|
3764
3760
|
"cancel-button-text": t.cancelText,
|
|
@@ -3791,10 +3787,10 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3791
3787
|
renderConfig: {}
|
|
3792
3788
|
},
|
|
3793
3789
|
setup(e) {
|
|
3794
|
-
const t = e, n =
|
|
3790
|
+
const t = e, n = Le(), o = M(
|
|
3795
3791
|
() => t.section.fields.some((d) => jt(d))
|
|
3796
3792
|
), r = M(() => o.value), c = M(
|
|
3797
|
-
() => t.renderConfig?.sequenceLabel ??
|
|
3793
|
+
() => t.renderConfig?.sequenceLabel ?? X("common.序号")
|
|
3798
3794
|
), s = M(
|
|
3799
3795
|
() => t.renderConfig?.sequenceWidth ?? 56
|
|
3800
3796
|
), i = M(() => {
|
|
@@ -3810,7 +3806,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3810
3806
|
return r.value ? d.filter((u) => !re(u)) : d;
|
|
3811
3807
|
}), l = /* @__PURE__ */ new Map(), g = ln(
|
|
3812
3808
|
async (d, u, _) => t.actions.loadFieldOptions(t.section, d, u, _),
|
|
3813
|
-
(d, u) => `${t.section.key}:${
|
|
3809
|
+
(d, u) => `${t.section.key}:${F(u)}:${E(d)}`
|
|
3814
3810
|
);
|
|
3815
3811
|
function w(d) {
|
|
3816
3812
|
t.actions.deleteRow(t.section, d);
|
|
@@ -3826,129 +3822,130 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3826
3822
|
actions: t.actions
|
|
3827
3823
|
}) : d.allowDelete !== !1);
|
|
3828
3824
|
}
|
|
3829
|
-
function
|
|
3830
|
-
const
|
|
3825
|
+
function j(d, u, _, L) {
|
|
3826
|
+
const P = t.section.rows.slice(), x = _.cascadeClearFields ?? [], q = {
|
|
3831
3827
|
...d,
|
|
3832
|
-
__rowKey:
|
|
3833
|
-
[_.code]:
|
|
3828
|
+
__rowKey: F(d),
|
|
3829
|
+
[_.code]: L
|
|
3834
3830
|
};
|
|
3835
|
-
|
|
3836
|
-
G
|
|
3837
|
-
}),
|
|
3838
|
-
...
|
|
3839
|
-
}, t.actions.updateTableRows(t.section,
|
|
3831
|
+
x.forEach((G) => {
|
|
3832
|
+
q[G] = "";
|
|
3833
|
+
}), P[u] = {
|
|
3834
|
+
...q
|
|
3835
|
+
}, t.actions.updateTableRows(t.section, P), A(_, L, q, u, P), y(_, q);
|
|
3840
3836
|
}
|
|
3841
|
-
function
|
|
3842
|
-
const
|
|
3843
|
-
if (
|
|
3837
|
+
function A(d, u, _, L, P) {
|
|
3838
|
+
const x = t.renderConfig?.onFieldBusinessChange;
|
|
3839
|
+
if (x)
|
|
3844
3840
|
try {
|
|
3845
|
-
const
|
|
3841
|
+
const q = f(d, u), G = { ...t.section.model, ..._ }, Q = {
|
|
3846
3842
|
field: d,
|
|
3847
3843
|
value: u,
|
|
3848
3844
|
section: t.section,
|
|
3849
|
-
model:
|
|
3850
|
-
values:
|
|
3845
|
+
model: G,
|
|
3846
|
+
values: G,
|
|
3851
3847
|
row: _,
|
|
3852
|
-
rowIndex:
|
|
3853
|
-
rows:
|
|
3848
|
+
rowIndex: L,
|
|
3849
|
+
rows: P,
|
|
3854
3850
|
node: t.node,
|
|
3855
3851
|
activeNode: t.node,
|
|
3856
3852
|
sections: S(),
|
|
3857
|
-
sectionValues: k(t.section,
|
|
3853
|
+
sectionValues: k(t.section, P),
|
|
3858
3854
|
actions: t.actions,
|
|
3859
|
-
selectedOption:
|
|
3860
|
-
selectedOptions:
|
|
3855
|
+
selectedOption: q[0],
|
|
3856
|
+
selectedOptions: q
|
|
3861
3857
|
};
|
|
3862
|
-
Promise.resolve(
|
|
3858
|
+
Promise.resolve(x(Q)).catch((T) => {
|
|
3863
3859
|
console.error(
|
|
3864
3860
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3865
3861
|
T
|
|
3866
3862
|
);
|
|
3867
3863
|
});
|
|
3868
|
-
} catch (
|
|
3864
|
+
} catch (q) {
|
|
3869
3865
|
console.error(
|
|
3870
3866
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3871
|
-
|
|
3867
|
+
q
|
|
3872
3868
|
);
|
|
3873
3869
|
}
|
|
3874
3870
|
}
|
|
3875
3871
|
function f(d, u) {
|
|
3876
3872
|
const _ = dt(d, u);
|
|
3877
3873
|
return (d.options ?? []).filter(
|
|
3878
|
-
(
|
|
3874
|
+
(L) => _.some((P) => Ze(L, P))
|
|
3879
3875
|
);
|
|
3880
3876
|
}
|
|
3881
3877
|
function S() {
|
|
3882
3878
|
return Object.values(t.state.sectionMap);
|
|
3883
3879
|
}
|
|
3884
3880
|
function k(d, u) {
|
|
3885
|
-
const
|
|
3886
|
-
const
|
|
3881
|
+
const L = S().flatMap((P) => {
|
|
3882
|
+
const x = P.key === d.key ? u : P.renderType === "table" ? P.rows : P.model;
|
|
3887
3883
|
return [
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
].filter(Boolean).map((
|
|
3884
|
+
P.key,
|
|
3885
|
+
P.id,
|
|
3886
|
+
P.setId,
|
|
3887
|
+
P.infSetId,
|
|
3888
|
+
P.code
|
|
3889
|
+
].filter(Boolean).map((q) => [String(q), x]);
|
|
3894
3890
|
});
|
|
3895
|
-
return Object.fromEntries(
|
|
3891
|
+
return Object.fromEntries(L);
|
|
3896
3892
|
}
|
|
3897
|
-
async function R(d, u, _ = {},
|
|
3898
|
-
const
|
|
3893
|
+
async function R(d, u, _ = {}, L = u) {
|
|
3894
|
+
const P = F(L), x = `${P}:${E(d)}`, q = st(
|
|
3899
3895
|
t.section.key,
|
|
3900
3896
|
d,
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
),
|
|
3904
|
-
if (!An(_) && lt(d,
|
|
3905
|
-
l.set(
|
|
3897
|
+
L,
|
|
3898
|
+
P
|
|
3899
|
+
), G = l.get(x);
|
|
3900
|
+
if (!An(_) && lt(d, G, q)) {
|
|
3901
|
+
l.set(x, q);
|
|
3906
3902
|
return;
|
|
3907
3903
|
}
|
|
3908
3904
|
try {
|
|
3909
3905
|
if (_.searchText !== void 0) {
|
|
3910
|
-
await g(d,
|
|
3906
|
+
await g(d, L, _);
|
|
3911
3907
|
return;
|
|
3912
3908
|
}
|
|
3913
3909
|
await t.actions.loadFieldOptions(
|
|
3914
3910
|
t.section,
|
|
3915
3911
|
d,
|
|
3916
|
-
|
|
3912
|
+
L,
|
|
3917
3913
|
_
|
|
3918
|
-
), l.set(
|
|
3914
|
+
), l.set(x, q);
|
|
3919
3915
|
} catch (T) {
|
|
3920
3916
|
console.error("[GlobalInfoTableRenderer] load field options failed", T);
|
|
3921
3917
|
}
|
|
3922
3918
|
}
|
|
3923
3919
|
async function y(d, u) {
|
|
3924
|
-
const _ = u ? [u] : t.section.rows;
|
|
3925
|
-
for (const
|
|
3926
|
-
const
|
|
3927
|
-
for (const
|
|
3928
|
-
if (d && !Nn(
|
|
3920
|
+
const _ = u ? [u] : t.section.rows, L = [];
|
|
3921
|
+
for (const P of _) {
|
|
3922
|
+
const x = F(P);
|
|
3923
|
+
for (const q of a.value) {
|
|
3924
|
+
if (d && !Nn(q, d))
|
|
3929
3925
|
continue;
|
|
3930
|
-
const G = zn(
|
|
3931
|
-
if (!
|
|
3932
|
-
const
|
|
3926
|
+
const G = zn(q, P);
|
|
3927
|
+
if (!V(q, G)) continue;
|
|
3928
|
+
const Q = st(
|
|
3933
3929
|
t.section.key,
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
),
|
|
3938
|
-
if (lt(
|
|
3939
|
-
l.set(
|
|
3930
|
+
q,
|
|
3931
|
+
P,
|
|
3932
|
+
x
|
|
3933
|
+
), T = `${x}:${E(q)}`, Z = l.get(T);
|
|
3934
|
+
if (lt(q, Z, Q)) {
|
|
3935
|
+
l.set(T, Q);
|
|
3940
3936
|
continue;
|
|
3941
3937
|
}
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
);
|
|
3938
|
+
Z !== Q && L.push(R(
|
|
3939
|
+
q,
|
|
3940
|
+
P,
|
|
3941
|
+
qn(q, G)
|
|
3942
|
+
));
|
|
3947
3943
|
}
|
|
3948
3944
|
}
|
|
3945
|
+
await Promise.allSettled(L);
|
|
3949
3946
|
}
|
|
3950
3947
|
function h(d, u, _) {
|
|
3951
|
-
const
|
|
3948
|
+
const L = u[d.code];
|
|
3952
3949
|
return {
|
|
3953
3950
|
field: d,
|
|
3954
3951
|
section: t.section,
|
|
@@ -3957,40 +3954,40 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3957
3954
|
row: u,
|
|
3958
3955
|
rowIndex: _,
|
|
3959
3956
|
editing: t.editing,
|
|
3960
|
-
modelValue:
|
|
3961
|
-
value:
|
|
3957
|
+
modelValue: L,
|
|
3958
|
+
value: L,
|
|
3962
3959
|
state: t.state,
|
|
3963
3960
|
actions: t.actions,
|
|
3964
|
-
updateModelValue: (
|
|
3961
|
+
updateModelValue: (P) => j(u, _, d, P)
|
|
3965
3962
|
};
|
|
3966
3963
|
}
|
|
3967
3964
|
function D(d) {
|
|
3968
3965
|
const u = String(d.code || "").trim(), _ = u ? `field-${u}` : "";
|
|
3969
3966
|
if (_ && n[_]) return _;
|
|
3970
|
-
const
|
|
3971
|
-
if (
|
|
3972
|
-
const
|
|
3973
|
-
if (
|
|
3974
|
-
const
|
|
3975
|
-
return
|
|
3967
|
+
const L = _.toLowerCase();
|
|
3968
|
+
if (L !== _ && n[L]) return L;
|
|
3969
|
+
const P = String(d.raw?.type || d.fieldType || d.type || "").trim(), x = P ? `field-type-${P}` : "";
|
|
3970
|
+
if (x && n[x]) return x;
|
|
3971
|
+
const q = x.toLowerCase();
|
|
3972
|
+
return q !== x && n[q] ? q : "";
|
|
3976
3973
|
}
|
|
3977
3974
|
function b(d) {
|
|
3978
3975
|
return !d.readonly && !d.disabled;
|
|
3979
3976
|
}
|
|
3980
|
-
function
|
|
3977
|
+
function V(d, u) {
|
|
3981
3978
|
return Rn(d, u, t.editing);
|
|
3982
3979
|
}
|
|
3983
|
-
function
|
|
3980
|
+
function v(d) {
|
|
3984
3981
|
return d.width ?? (Vt(d) ? 56 : void 0);
|
|
3985
3982
|
}
|
|
3986
|
-
function
|
|
3983
|
+
function O(d) {
|
|
3987
3984
|
if (!d.width)
|
|
3988
3985
|
return d.minWidth ?? (Vt(d) ? 56 : void 0);
|
|
3989
3986
|
}
|
|
3990
|
-
function
|
|
3987
|
+
function E(d) {
|
|
3991
3988
|
return d.key || d.id || d.code;
|
|
3992
3989
|
}
|
|
3993
|
-
function
|
|
3990
|
+
function z(d) {
|
|
3994
3991
|
return i.value + d;
|
|
3995
3992
|
}
|
|
3996
3993
|
function re(d) {
|
|
@@ -3998,81 +3995,75 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3998
3995
|
}
|
|
3999
3996
|
let le = 0;
|
|
4000
3997
|
const N = /* @__PURE__ */ new WeakMap();
|
|
4001
|
-
function
|
|
3998
|
+
function F(d) {
|
|
4002
3999
|
const u = d.__rowKey ?? d.key ?? d.id ?? d.setId ?? d.infSetId;
|
|
4003
4000
|
if (u != null && u !== "")
|
|
4004
4001
|
return String(u);
|
|
4005
|
-
const _ = d,
|
|
4006
|
-
if (
|
|
4002
|
+
const _ = d, L = N.get(_);
|
|
4003
|
+
if (L) return L;
|
|
4007
4004
|
le += 1;
|
|
4008
|
-
const
|
|
4009
|
-
return N.set(_,
|
|
4005
|
+
const P = `local-${le}`;
|
|
4006
|
+
return N.set(_, P), P;
|
|
4010
4007
|
}
|
|
4011
|
-
function
|
|
4008
|
+
function B(d) {
|
|
4012
4009
|
return d.required || d.isRequired;
|
|
4013
4010
|
}
|
|
4014
|
-
return
|
|
4011
|
+
return je(
|
|
4015
4012
|
() => t.section.key,
|
|
4016
4013
|
() => {
|
|
4017
4014
|
l.clear();
|
|
4018
4015
|
}
|
|
4019
|
-
), Le(
|
|
4020
|
-
() => t.editing,
|
|
4021
|
-
() => {
|
|
4022
|
-
y();
|
|
4023
|
-
},
|
|
4024
|
-
{ immediate: !0 }
|
|
4025
4016
|
), (d, u) => {
|
|
4026
|
-
const _ = on,
|
|
4017
|
+
const _ = on, L = eo("Delete"), P = Jt, x = Ct, q = nn;
|
|
4027
4018
|
return I(), K("div", {
|
|
4028
4019
|
class: We(["global-info-table-renderer", { "global-info-table-renderer--editing": d.editing }])
|
|
4029
4020
|
}, [
|
|
4030
4021
|
ne("div", ka, [
|
|
4031
|
-
ke(
|
|
4022
|
+
ke(q, {
|
|
4032
4023
|
class: "global-info-table-renderer__table",
|
|
4033
4024
|
data: d.section.rows,
|
|
4034
4025
|
fit: !0,
|
|
4035
4026
|
"table-layout": "auto",
|
|
4036
|
-
"row-key":
|
|
4027
|
+
"row-key": F
|
|
4037
4028
|
}, {
|
|
4038
4029
|
default: W(() => [
|
|
4039
|
-
r.value ? (I(),
|
|
4030
|
+
r.value ? (I(), H(_, {
|
|
4040
4031
|
key: 0,
|
|
4041
4032
|
type: "index",
|
|
4042
4033
|
label: c.value,
|
|
4043
4034
|
width: s.value,
|
|
4044
|
-
index:
|
|
4035
|
+
index: z
|
|
4045
4036
|
}, null, 8, ["label", "width"])) : fe("", !0),
|
|
4046
|
-
(I(!0), K(Se, null, ye(a.value, (
|
|
4047
|
-
key:
|
|
4048
|
-
prop:
|
|
4049
|
-
label:
|
|
4050
|
-
width:
|
|
4051
|
-
"min-width":
|
|
4037
|
+
(I(!0), K(Se, null, ye(a.value, (G) => (I(), H(_, {
|
|
4038
|
+
key: E(G),
|
|
4039
|
+
prop: G.code,
|
|
4040
|
+
label: G.label,
|
|
4041
|
+
width: v(G),
|
|
4042
|
+
"min-width": O(G)
|
|
4052
4043
|
}, {
|
|
4053
4044
|
header: W(() => [
|
|
4054
4045
|
ne("span", Ta, [
|
|
4055
|
-
|
|
4056
|
-
ne("span", null, oe(
|
|
4046
|
+
B(G) ? (I(), K("span", Ma, "*")) : fe("", !0),
|
|
4047
|
+
ne("span", null, oe(G.label), 1)
|
|
4057
4048
|
])
|
|
4058
4049
|
]),
|
|
4059
4050
|
default: W(({ row: Q, $index: T }) => [
|
|
4060
|
-
D(
|
|
4051
|
+
D(G) ? te(d.$slots, D(G), ae({
|
|
4061
4052
|
key: 0,
|
|
4062
4053
|
ref_for: !0
|
|
4063
|
-
}, h(
|
|
4054
|
+
}, h(G, Q, T)), void 0, !0) : d.editing && b(G) ? (I(), H(Vn, {
|
|
4064
4055
|
key: 1,
|
|
4065
|
-
field:
|
|
4066
|
-
"model-value": Q[
|
|
4056
|
+
field: G,
|
|
4057
|
+
"model-value": Q[G.code],
|
|
4067
4058
|
section: d.section,
|
|
4068
4059
|
row: Q,
|
|
4069
4060
|
"row-index": T,
|
|
4070
|
-
onLoadOptions: (
|
|
4071
|
-
"onUpdate:modelValue": (
|
|
4072
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (I(),
|
|
4061
|
+
onLoadOptions: (Z) => R(G, Q, Z),
|
|
4062
|
+
"onUpdate:modelValue": (Z) => j(Q, T, G, Z)
|
|
4063
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
4073
4064
|
key: 2,
|
|
4074
|
-
field:
|
|
4075
|
-
value: Q[
|
|
4065
|
+
field: G,
|
|
4066
|
+
value: Q[G.code],
|
|
4076
4067
|
section: d.section,
|
|
4077
4068
|
row: Q,
|
|
4078
4069
|
"row-index": T
|
|
@@ -4080,31 +4071,31 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4080
4071
|
]),
|
|
4081
4072
|
_: 2
|
|
4082
4073
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
4083
|
-
d.editing ? (I(),
|
|
4074
|
+
d.editing ? (I(), H(_, {
|
|
4084
4075
|
key: 1,
|
|
4085
|
-
label: J(
|
|
4076
|
+
label: J(X)("common.操作"),
|
|
4086
4077
|
width: "104",
|
|
4087
4078
|
fixed: "right"
|
|
4088
4079
|
}, {
|
|
4089
|
-
default: W(({ row:
|
|
4090
|
-
$(
|
|
4080
|
+
default: W(({ row: G, $index: Q }) => [
|
|
4081
|
+
$(G, Q) ? (I(), H(Ca, {
|
|
4091
4082
|
key: 0,
|
|
4092
4083
|
onConfirm: (T) => w(Q)
|
|
4093
4084
|
}, {
|
|
4094
4085
|
default: W(() => [
|
|
4095
|
-
ke(
|
|
4086
|
+
ke(x, {
|
|
4096
4087
|
class: "global-info-table-renderer__delete",
|
|
4097
4088
|
link: "",
|
|
4098
4089
|
type: "danger"
|
|
4099
4090
|
}, {
|
|
4100
4091
|
default: W(() => [
|
|
4101
|
-
ke(
|
|
4092
|
+
ke(P, { class: "global-info-table-renderer__delete-icon" }, {
|
|
4102
4093
|
default: W(() => [
|
|
4103
|
-
ke(
|
|
4094
|
+
ke(L)
|
|
4104
4095
|
]),
|
|
4105
4096
|
_: 1
|
|
4106
4097
|
}),
|
|
4107
|
-
|
|
4098
|
+
Ue(oe(J(X)("common.删除")), 1)
|
|
4108
4099
|
]),
|
|
4109
4100
|
_: 1
|
|
4110
4101
|
})
|
|
@@ -4121,7 +4112,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4121
4112
|
], 2);
|
|
4122
4113
|
};
|
|
4123
4114
|
}
|
|
4124
|
-
}), Da = /* @__PURE__ */ be(Oa, [["__scopeId", "data-v-
|
|
4115
|
+
}), Da = /* @__PURE__ */ be(Oa, [["__scopeId", "data-v-f4ab9070"]]), Fa = /* @__PURE__ */ pe({
|
|
4125
4116
|
name: "GlobalInfoAutoRenderer",
|
|
4126
4117
|
__name: "GlobalInfoAutoRenderer",
|
|
4127
4118
|
props: {
|
|
@@ -4133,7 +4124,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4133
4124
|
renderConfig: {}
|
|
4134
4125
|
},
|
|
4135
4126
|
setup(e) {
|
|
4136
|
-
return (t, n) => t.section.renderType === "table" ? (I(),
|
|
4127
|
+
return (t, n) => t.section.renderType === "table" ? (I(), H(Da, {
|
|
4137
4128
|
key: 0,
|
|
4138
4129
|
section: t.section,
|
|
4139
4130
|
node: t.node,
|
|
@@ -4141,7 +4132,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4141
4132
|
state: t.state,
|
|
4142
4133
|
actions: t.actions,
|
|
4143
4134
|
"render-config": t.renderConfig
|
|
4144
|
-
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (I(),
|
|
4135
|
+
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (I(), H($a, {
|
|
4145
4136
|
key: 1,
|
|
4146
4137
|
section: t.section,
|
|
4147
4138
|
node: t.node,
|
|
@@ -4152,11 +4143,11 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4152
4143
|
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"]));
|
|
4153
4144
|
}
|
|
4154
4145
|
});
|
|
4155
|
-
function
|
|
4146
|
+
function xn(e) {
|
|
4156
4147
|
return Kn(e.code);
|
|
4157
4148
|
}
|
|
4158
4149
|
function Gn(e, t) {
|
|
4159
|
-
return
|
|
4150
|
+
return xn(e) || Kn(t?.code);
|
|
4160
4151
|
}
|
|
4161
4152
|
function Ot(e, t, n) {
|
|
4162
4153
|
if (!n) return "";
|
|
@@ -4180,7 +4171,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4180
4171
|
renderConfig: {}
|
|
4181
4172
|
},
|
|
4182
4173
|
setup(e) {
|
|
4183
|
-
const t = e, n =
|
|
4174
|
+
const t = e, n = Le(), o = M(() => ft(
|
|
4184
4175
|
t.section.fields,
|
|
4185
4176
|
t.section,
|
|
4186
4177
|
t.renderConfig,
|
|
@@ -4215,7 +4206,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4215
4206
|
renderConfig: a.renderConfig,
|
|
4216
4207
|
state: a.state,
|
|
4217
4208
|
actions: a.actions
|
|
4218
|
-
}) : (I(),
|
|
4209
|
+
}) : (I(), H(Fa, {
|
|
4219
4210
|
key: 1,
|
|
4220
4211
|
section: a.section,
|
|
4221
4212
|
node: a.node,
|
|
@@ -4242,7 +4233,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4242
4233
|
},
|
|
4243
4234
|
setup(e, { emit: t, slots: n }) {
|
|
4244
4235
|
const o = ge(!1);
|
|
4245
|
-
|
|
4236
|
+
je(
|
|
4246
4237
|
() => e.boundaryKey,
|
|
4247
4238
|
() => {
|
|
4248
4239
|
o.value = !1;
|
|
@@ -4267,7 +4258,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4267
4258
|
}, Va = { class: "global-info-section-block__title-wrap" }, ja = { class: "global-info-section-block__title" }, Aa = {
|
|
4268
4259
|
key: 0,
|
|
4269
4260
|
class: "global-info-section-block__actions"
|
|
4270
|
-
}, Na = { class: "global-info-section-block__body" }, Ra = { class: "global-info-section-block__status" }, za = { class: "global-info-section-block__status" },
|
|
4261
|
+
}, Na = { class: "global-info-section-block__body" }, Ra = { class: "global-info-section-block__status" }, za = { class: "global-info-section-block__status" }, qa = { class: "global-info-section-block__status" }, xa = /* @__PURE__ */ pe({
|
|
4271
4262
|
name: "GlobalInfoSectionBlock",
|
|
4272
4263
|
__name: "GlobalInfoSectionBlock",
|
|
4273
4264
|
props: {
|
|
@@ -4281,17 +4272,17 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4281
4272
|
onSave: { type: Function }
|
|
4282
4273
|
},
|
|
4283
4274
|
setup(e) {
|
|
4284
|
-
const t = e, n =
|
|
4275
|
+
const t = e, n = Le(), o = ge(!1), r = ge(null), c = ge(null), s = M(() => !!t.hideHeader), i = M(() => t.actions.getSectionStatus(t.node)), a = M(
|
|
4285
4276
|
() => t.actions.getSection(t.node) ?? c.value
|
|
4286
4277
|
), l = M(() => {
|
|
4287
|
-
const
|
|
4288
|
-
return
|
|
4289
|
-
|
|
4290
|
-
|
|
4278
|
+
const v = a.value;
|
|
4279
|
+
return v ? ft(
|
|
4280
|
+
v.fields,
|
|
4281
|
+
v,
|
|
4291
4282
|
t.renderConfig,
|
|
4292
4283
|
{
|
|
4293
|
-
values:
|
|
4294
|
-
rows:
|
|
4284
|
+
values: v.model,
|
|
4285
|
+
rows: v.renderType === "table" ? v.rows : void 0
|
|
4295
4286
|
}
|
|
4296
4287
|
) : [];
|
|
4297
4288
|
}), g = M(
|
|
@@ -4300,11 +4291,11 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4300
4291
|
() => !!(a.value && t.actions.isEditing(a.value))
|
|
4301
4292
|
), $ = M(
|
|
4302
4293
|
() => a.value?.renderType === "table"
|
|
4303
|
-
),
|
|
4294
|
+
), j = M(() => o.value || i.value.loading), A = M(
|
|
4304
4295
|
() => k(r.value || i.value.error)
|
|
4305
4296
|
), f = M(() => {
|
|
4306
|
-
const
|
|
4307
|
-
return
|
|
4297
|
+
const v = a.value;
|
|
4298
|
+
return v ? v.renderType === "table" && v.rows.length === 0 || l.value.length === 0 : !0;
|
|
4308
4299
|
}), S = M(() => ({
|
|
4309
4300
|
node: t.node,
|
|
4310
4301
|
section: a.value,
|
|
@@ -4313,124 +4304,124 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4313
4304
|
renderConfig: t.renderConfig,
|
|
4314
4305
|
title: g.value,
|
|
4315
4306
|
editing: w.value,
|
|
4316
|
-
loading:
|
|
4307
|
+
loading: j.value,
|
|
4317
4308
|
error: r.value || i.value.error,
|
|
4318
|
-
errorMessage:
|
|
4309
|
+
errorMessage: A.value,
|
|
4319
4310
|
isEmpty: f.value,
|
|
4320
4311
|
empty: f.value,
|
|
4321
4312
|
sectionStatus: i.value,
|
|
4322
4313
|
state: t.state,
|
|
4323
4314
|
actions: t.actions,
|
|
4324
|
-
reload:
|
|
4315
|
+
reload: V,
|
|
4325
4316
|
handleEdit: R,
|
|
4326
4317
|
handleCancel: y,
|
|
4327
4318
|
handleAddTableRow: h,
|
|
4328
4319
|
handleSave: D
|
|
4329
4320
|
}));
|
|
4330
|
-
function k(
|
|
4331
|
-
return
|
|
4321
|
+
function k(v) {
|
|
4322
|
+
return v ? v instanceof Error ? v.message : String(v) : "";
|
|
4332
4323
|
}
|
|
4333
4324
|
async function R() {
|
|
4334
|
-
const
|
|
4335
|
-
|
|
4325
|
+
const v = a.value;
|
|
4326
|
+
v && (await t.onEdit?.(v, t.node), t.onEdit || t.actions.startEdit(v));
|
|
4336
4327
|
}
|
|
4337
4328
|
async function y() {
|
|
4338
|
-
const
|
|
4339
|
-
|
|
4329
|
+
const v = a.value;
|
|
4330
|
+
v && (await t.onCancel?.(v, t.node), t.onCancel || t.actions.cancelEdit(v));
|
|
4340
4331
|
}
|
|
4341
4332
|
function h() {
|
|
4342
|
-
const
|
|
4343
|
-
if (!
|
|
4344
|
-
const
|
|
4345
|
-
(
|
|
4333
|
+
const v = a.value;
|
|
4334
|
+
if (!v) return;
|
|
4335
|
+
const O = v.fields.reduce(
|
|
4336
|
+
(E, z) => (E[z.code] = z.value ?? "", E),
|
|
4346
4337
|
{ __rowKey: `new-${Date.now()}` }
|
|
4347
4338
|
);
|
|
4348
|
-
t.actions.saveRow(
|
|
4339
|
+
t.actions.saveRow(v, O, -1);
|
|
4349
4340
|
}
|
|
4350
4341
|
async function D() {
|
|
4351
|
-
const
|
|
4352
|
-
if (
|
|
4342
|
+
const v = a.value;
|
|
4343
|
+
if (v)
|
|
4353
4344
|
try {
|
|
4354
4345
|
if (t.onSave) {
|
|
4355
|
-
await t.onSave(
|
|
4346
|
+
await t.onSave(v, t.node);
|
|
4356
4347
|
return;
|
|
4357
4348
|
}
|
|
4358
|
-
await t.actions.saveSection(
|
|
4359
|
-
} catch (
|
|
4360
|
-
r.value =
|
|
4349
|
+
await t.actions.saveSection(v);
|
|
4350
|
+
} catch (O) {
|
|
4351
|
+
r.value = O, console.error("[GlobalInfoSectionBlock] save section failed", O);
|
|
4361
4352
|
}
|
|
4362
4353
|
}
|
|
4363
|
-
function b(
|
|
4364
|
-
r.value =
|
|
4354
|
+
function b(v) {
|
|
4355
|
+
r.value = v;
|
|
4365
4356
|
}
|
|
4366
|
-
async function
|
|
4357
|
+
async function V() {
|
|
4367
4358
|
o.value = !0, r.value = null, c.value = null;
|
|
4368
4359
|
try {
|
|
4369
4360
|
c.value = await t.actions.loadSection(t.node);
|
|
4370
|
-
} catch (
|
|
4371
|
-
r.value =
|
|
4361
|
+
} catch (v) {
|
|
4362
|
+
r.value = v, console.error("[GlobalInfoSectionBlock] load section failed", v);
|
|
4372
4363
|
} finally {
|
|
4373
4364
|
o.value = !1;
|
|
4374
4365
|
}
|
|
4375
4366
|
}
|
|
4376
|
-
return
|
|
4377
|
-
|
|
4378
|
-
}),
|
|
4367
|
+
return Ut(() => {
|
|
4368
|
+
V();
|
|
4369
|
+
}), je(
|
|
4379
4370
|
() => t.node.key,
|
|
4380
4371
|
() => {
|
|
4381
|
-
|
|
4372
|
+
V();
|
|
4382
4373
|
}
|
|
4383
|
-
), (
|
|
4384
|
-
const
|
|
4374
|
+
), (v, O) => {
|
|
4375
|
+
const E = Ct;
|
|
4385
4376
|
return I(), K("section", Pa, [
|
|
4386
4377
|
s.value ? fe("", !0) : (I(), K("header", Ea, [
|
|
4387
|
-
te(
|
|
4378
|
+
te(v.$slots, "header", Oe(Be(S.value)), () => [
|
|
4388
4379
|
ne("div", Va, [
|
|
4389
|
-
|
|
4380
|
+
O[0] || (O[0] = ne("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4390
4381
|
ne("h3", ja, oe(g.value), 1)
|
|
4391
4382
|
]),
|
|
4392
|
-
te(
|
|
4383
|
+
te(v.$slots, "actions", Oe(Be(S.value)), () => [
|
|
4393
4384
|
a.value ? (I(), K("div", Aa, [
|
|
4394
4385
|
w.value ? (I(), K(Se, { key: 1 }, [
|
|
4395
|
-
ke(
|
|
4386
|
+
ke(E, {
|
|
4396
4387
|
class: "global-info-section-block__cancel",
|
|
4397
4388
|
disabled: i.value.saving,
|
|
4398
4389
|
onClick: y
|
|
4399
4390
|
}, {
|
|
4400
4391
|
default: W(() => [
|
|
4401
|
-
|
|
4392
|
+
Ue(oe(J(X)("common.取消")), 1)
|
|
4402
4393
|
]),
|
|
4403
4394
|
_: 1
|
|
4404
4395
|
}, 8, ["disabled"]),
|
|
4405
|
-
$.value ? (I(),
|
|
4396
|
+
$.value ? (I(), H(E, {
|
|
4406
4397
|
key: 0,
|
|
4407
4398
|
class: "global-info-section-block__add",
|
|
4408
4399
|
disabled: i.value.saving,
|
|
4409
4400
|
onClick: h
|
|
4410
4401
|
}, {
|
|
4411
4402
|
default: W(() => [
|
|
4412
|
-
|
|
4403
|
+
Ue(oe(J(X)("common.新增")), 1)
|
|
4413
4404
|
]),
|
|
4414
4405
|
_: 1
|
|
4415
4406
|
}, 8, ["disabled"])) : fe("", !0),
|
|
4416
|
-
ke(
|
|
4407
|
+
ke(E, {
|
|
4417
4408
|
class: "global-info-section-block__confirm",
|
|
4418
4409
|
loading: i.value.saving,
|
|
4419
4410
|
onClick: D
|
|
4420
4411
|
}, {
|
|
4421
4412
|
default: W(() => [
|
|
4422
|
-
|
|
4413
|
+
Ue(oe($.value ? J(X)("common.确认") : J(X)("common.保存")), 1)
|
|
4423
4414
|
]),
|
|
4424
4415
|
_: 1
|
|
4425
4416
|
}, 8, ["loading"])
|
|
4426
|
-
], 64)) : (I(),
|
|
4417
|
+
], 64)) : (I(), H(E, {
|
|
4427
4418
|
key: 0,
|
|
4428
4419
|
class: "global-info-section-block__edit",
|
|
4429
|
-
disabled: i.value.saving ||
|
|
4420
|
+
disabled: i.value.saving || j.value,
|
|
4430
4421
|
onClick: R
|
|
4431
4422
|
}, {
|
|
4432
4423
|
default: W(() => [
|
|
4433
|
-
|
|
4424
|
+
O[1] || (O[1] = ne("svg", {
|
|
4434
4425
|
class: "global-info-section-block__edit-icon",
|
|
4435
4426
|
viewBox: "0 0 12 12",
|
|
4436
4427
|
"aria-hidden": "true",
|
|
@@ -4441,7 +4432,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4441
4432
|
fill: "currentColor"
|
|
4442
4433
|
})
|
|
4443
4434
|
], -1)),
|
|
4444
|
-
ne("span", null, oe(J(
|
|
4435
|
+
ne("span", null, oe(J(X)("common.编辑")), 1)
|
|
4445
4436
|
]),
|
|
4446
4437
|
_: 1
|
|
4447
4438
|
}, 8, ["disabled"]))
|
|
@@ -4450,34 +4441,34 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4450
4441
|
], !0)
|
|
4451
4442
|
])),
|
|
4452
4443
|
ne("div", Na, [
|
|
4453
|
-
|
|
4454
|
-
ne("div", Ra, oe(J(
|
|
4455
|
-
], !0) : !a.value || f.value ? te(
|
|
4456
|
-
ne("div", za, oe(J(
|
|
4457
|
-
], !0) : (I(),
|
|
4444
|
+
j.value ? te(v.$slots, "loading", Oe(ae({ key: 0 }, S.value)), () => [
|
|
4445
|
+
ne("div", Ra, oe(J(X)("common.加载中___")), 1)
|
|
4446
|
+
], !0) : !a.value || f.value ? te(v.$slots, "empty", Oe(ae({ key: 1 }, S.value)), () => [
|
|
4447
|
+
ne("div", za, oe(J(X)("common.暂无数据")), 1)
|
|
4448
|
+
], !0) : (I(), H(La, {
|
|
4458
4449
|
key: 2,
|
|
4459
|
-
"boundary-key":
|
|
4450
|
+
"boundary-key": v.node.key,
|
|
4460
4451
|
label: g.value,
|
|
4461
4452
|
onError: b
|
|
4462
4453
|
}, {
|
|
4463
4454
|
fallback: W(() => [
|
|
4464
|
-
te(
|
|
4465
|
-
ne("div",
|
|
4455
|
+
te(v.$slots, "empty", Oe(Be(S.value)), () => [
|
|
4456
|
+
ne("div", qa, oe(J(X)("common.暂无数据")), 1)
|
|
4466
4457
|
], !0)
|
|
4467
4458
|
]),
|
|
4468
4459
|
default: W(() => [
|
|
4469
4460
|
ke(Ba, {
|
|
4470
4461
|
section: a.value,
|
|
4471
|
-
node:
|
|
4462
|
+
node: v.node,
|
|
4472
4463
|
editing: w.value,
|
|
4473
|
-
state:
|
|
4474
|
-
actions:
|
|
4475
|
-
"render-config":
|
|
4464
|
+
state: v.state,
|
|
4465
|
+
actions: v.actions,
|
|
4466
|
+
"render-config": v.renderConfig
|
|
4476
4467
|
}, Ne({ _: 2 }, [
|
|
4477
|
-
ye(J(n), (
|
|
4468
|
+
ye(J(n), (z, re) => ({
|
|
4478
4469
|
name: re,
|
|
4479
4470
|
fn: W((le) => [
|
|
4480
|
-
te(
|
|
4471
|
+
te(v.$slots, re, Oe(Be({ ...S.value, ...le })), void 0, !0)
|
|
4481
4472
|
])
|
|
4482
4473
|
}))
|
|
4483
4474
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4488,7 +4479,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4488
4479
|
]);
|
|
4489
4480
|
};
|
|
4490
4481
|
}
|
|
4491
|
-
}), Ga = /* @__PURE__ */ be(
|
|
4482
|
+
}), Ga = /* @__PURE__ */ be(xa, [["__scopeId", "data-v-01e68445"]]), Ka = { class: "global-info-group" }, Ya = { class: "global-info-group__header" }, Ha = { class: "global-info-group__title" }, Ua = { class: "global-info-group__body" }, Ja = ["id"], Wa = { class: "global-info-group__empty" }, Za = /* @__PURE__ */ pe({
|
|
4492
4483
|
name: "GlobalInfoGroup",
|
|
4493
4484
|
__name: "GlobalInfoGroup",
|
|
4494
4485
|
props: {
|
|
@@ -4500,7 +4491,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4500
4491
|
renderConfig: {}
|
|
4501
4492
|
},
|
|
4502
4493
|
setup(e) {
|
|
4503
|
-
const t = e, n =
|
|
4494
|
+
const t = e, n = Le(), o = M(
|
|
4504
4495
|
() => t.group.tagName || t.group.label || "-"
|
|
4505
4496
|
), r = M(() => t.children.length <= 1);
|
|
4506
4497
|
function c(l, g) {
|
|
@@ -4550,10 +4541,10 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4550
4541
|
}, () => [
|
|
4551
4542
|
ne("header", Ya, [
|
|
4552
4543
|
g[0] || (g[0] = ne("span", { class: "global-info-group__marker" }, null, -1)),
|
|
4553
|
-
ne("h2",
|
|
4544
|
+
ne("h2", Ha, oe(o.value), 1)
|
|
4554
4545
|
])
|
|
4555
4546
|
], !0),
|
|
4556
|
-
ne("div",
|
|
4547
|
+
ne("div", Ua, [
|
|
4557
4548
|
J(n).default ? te(l.$slots, "default", {
|
|
4558
4549
|
key: 0,
|
|
4559
4550
|
group: l.group,
|
|
@@ -4575,7 +4566,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4575
4566
|
}, c(w, $)), void 0, !0) : J(n).section ? te(l.$slots, "section", ae({
|
|
4576
4567
|
key: 1,
|
|
4577
4568
|
ref_for: !0
|
|
4578
|
-
}, c(w, $)), void 0, !0) : (I(),
|
|
4569
|
+
}, c(w, $)), void 0, !0) : (I(), H(Ga, {
|
|
4579
4570
|
key: 2,
|
|
4580
4571
|
node: w,
|
|
4581
4572
|
state: l.state,
|
|
@@ -4583,10 +4574,10 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4583
4574
|
"hide-header": r.value,
|
|
4584
4575
|
"render-config": l.renderConfig
|
|
4585
4576
|
}, Ne({ _: 2 }, [
|
|
4586
|
-
ye(J(n), (
|
|
4587
|
-
name:
|
|
4577
|
+
ye(J(n), (j, A) => ({
|
|
4578
|
+
name: A,
|
|
4588
4579
|
fn: W((f) => [
|
|
4589
|
-
te(l.$slots,
|
|
4580
|
+
te(l.$slots, A, ae({ ref_for: !0 }, f), void 0, !0)
|
|
4590
4581
|
])
|
|
4591
4582
|
}))
|
|
4592
4583
|
]), 1032, ["node", "state", "actions", "hide-header", "render-config"]))
|
|
@@ -4601,7 +4592,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4601
4592
|
index: -1,
|
|
4602
4593
|
renderConfig: l.renderConfig
|
|
4603
4594
|
}, () => [
|
|
4604
|
-
ne("div", Wa, oe(J(
|
|
4595
|
+
ne("div", Wa, oe(J(X)("common.暂无数据")), 1)
|
|
4605
4596
|
], !0) : fe("", !0)
|
|
4606
4597
|
], 64))
|
|
4607
4598
|
])
|
|
@@ -4617,20 +4608,20 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4617
4608
|
renderConfig: {}
|
|
4618
4609
|
},
|
|
4619
4610
|
setup(e) {
|
|
4620
|
-
const t = e, n =
|
|
4611
|
+
const t = e, n = Le(), o = M(() => {
|
|
4621
4612
|
const g = t.nodes.filter(
|
|
4622
4613
|
(k) => r(k).length > 0
|
|
4623
|
-
), w = t.nodes.filter((k) => r(k).length === 0), $ = w.filter((k) => c(k)),
|
|
4614
|
+
), w = t.nodes.filter((k) => r(k).length === 0), $ = w.filter((k) => c(k)), j = w.filter((k) => !c(k)), A = g.map((k) => ({
|
|
4624
4615
|
group: k,
|
|
4625
4616
|
children: r(k)
|
|
4626
4617
|
})), f = $.map((k) => ({
|
|
4627
4618
|
group: k,
|
|
4628
4619
|
children: [k]
|
|
4629
4620
|
}));
|
|
4630
|
-
if (
|
|
4631
|
-
return $.length > 0 ? f : l(
|
|
4632
|
-
const S = l(
|
|
4633
|
-
return [...
|
|
4621
|
+
if (A.length === 0)
|
|
4622
|
+
return $.length > 0 ? f : l(j);
|
|
4623
|
+
const S = l(j);
|
|
4624
|
+
return [...A, ...f, ...S];
|
|
4634
4625
|
});
|
|
4635
4626
|
function r(g) {
|
|
4636
4627
|
return g.children ?? [];
|
|
@@ -4639,14 +4630,14 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4639
4630
|
return !String(g.parentId || g.parentTagId || "").trim();
|
|
4640
4631
|
}
|
|
4641
4632
|
function s(g) {
|
|
4642
|
-
return Ot(n, "group",
|
|
4633
|
+
return Ot(n, "group", xn(g));
|
|
4643
4634
|
}
|
|
4644
4635
|
function i(g, w) {
|
|
4645
4636
|
return g.key || g.id || g.tagId || `${w}`;
|
|
4646
4637
|
}
|
|
4647
4638
|
function a(g) {
|
|
4648
|
-
const w = g[0], $ = w?.raw ?? {},
|
|
4649
|
-
$.parentTagName || $.parentName || $.parentLabel || w?.parentId ||
|
|
4639
|
+
const w = g[0], $ = w?.raw ?? {}, j = String(
|
|
4640
|
+
$.parentTagName || $.parentName || $.parentLabel || w?.parentId || X("common.信息")
|
|
4650
4641
|
);
|
|
4651
4642
|
return {
|
|
4652
4643
|
...w,
|
|
@@ -4657,26 +4648,26 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4657
4648
|
tagId: String(
|
|
4658
4649
|
w?.parentTagId || w?.parentId || w?.tagId || "global-info-group"
|
|
4659
4650
|
),
|
|
4660
|
-
tagName:
|
|
4661
|
-
label:
|
|
4651
|
+
tagName: j,
|
|
4652
|
+
label: j,
|
|
4662
4653
|
children: g
|
|
4663
4654
|
};
|
|
4664
4655
|
}
|
|
4665
4656
|
function l(g) {
|
|
4666
4657
|
const w = /* @__PURE__ */ new Map();
|
|
4667
4658
|
return g.forEach(($) => {
|
|
4668
|
-
const
|
|
4659
|
+
const j = String(
|
|
4669
4660
|
$.parentId || $.parentTagId || "global-info-flat"
|
|
4670
|
-
),
|
|
4671
|
-
|
|
4661
|
+
), A = w.get(j) ?? [];
|
|
4662
|
+
A.push($), w.set(j, A);
|
|
4672
4663
|
}), Array.from(w.values()).map(($) => ({
|
|
4673
4664
|
group: a($),
|
|
4674
4665
|
children: $
|
|
4675
4666
|
}));
|
|
4676
4667
|
}
|
|
4677
4668
|
return (g, w) => (I(), K("div", Xa, [
|
|
4678
|
-
(I(!0), K(Se, null, ye(o.value, ($,
|
|
4679
|
-
key: i($.group,
|
|
4669
|
+
(I(!0), K(Se, null, ye(o.value, ($, j) => (I(), K(Se, {
|
|
4670
|
+
key: i($.group, j)
|
|
4680
4671
|
}, [
|
|
4681
4672
|
s($.group) ? te(g.$slots, s($.group), {
|
|
4682
4673
|
key: 0,
|
|
@@ -4685,7 +4676,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4685
4676
|
state: g.state,
|
|
4686
4677
|
actions: g.actions,
|
|
4687
4678
|
renderConfig: g.renderConfig,
|
|
4688
|
-
index:
|
|
4679
|
+
index: j,
|
|
4689
4680
|
isEmpty: $.children.length === 0
|
|
4690
4681
|
}, void 0, !0) : J(n).group ? te(g.$slots, "group", {
|
|
4691
4682
|
key: 1,
|
|
@@ -4694,18 +4685,18 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4694
4685
|
state: g.state,
|
|
4695
4686
|
actions: g.actions,
|
|
4696
4687
|
renderConfig: g.renderConfig,
|
|
4697
|
-
index:
|
|
4688
|
+
index: j,
|
|
4698
4689
|
isEmpty: $.children.length === 0
|
|
4699
|
-
}, void 0, !0) : (I(),
|
|
4690
|
+
}, void 0, !0) : (I(), H(Qa, {
|
|
4700
4691
|
key: 2,
|
|
4701
4692
|
group: $.group,
|
|
4702
4693
|
children: $.children,
|
|
4703
4694
|
state: g.state,
|
|
4704
4695
|
actions: g.actions,
|
|
4705
4696
|
"render-config": g.renderConfig,
|
|
4706
|
-
index:
|
|
4697
|
+
index: j
|
|
4707
4698
|
}, Ne({ _: 2 }, [
|
|
4708
|
-
ye(J(n), (
|
|
4699
|
+
ye(J(n), (A, f) => ({
|
|
4709
4700
|
name: f,
|
|
4710
4701
|
fn: W((S) => [
|
|
4711
4702
|
te(g.$slots, f, ae({ ref_for: !0 }, S), void 0, !0)
|
|
@@ -4717,7 +4708,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4717
4708
|
}
|
|
4718
4709
|
}), cs = /* @__PURE__ */ be(es, [["__scopeId", "data-v-d4ed3f80"]]);
|
|
4719
4710
|
function us(e, t = {}) {
|
|
4720
|
-
|
|
4711
|
+
Hn(e, t);
|
|
4721
4712
|
}
|
|
4722
4713
|
export {
|
|
4723
4714
|
Pn as DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE,
|
|
@@ -4742,18 +4733,18 @@ export {
|
|
|
4742
4733
|
$o as JtFormItems,
|
|
4743
4734
|
ht as JtInput,
|
|
4744
4735
|
ss as JtPageHeader,
|
|
4745
|
-
|
|
4736
|
+
xo as JtPagination,
|
|
4746
4737
|
_o as JtSelect,
|
|
4747
4738
|
No as JtTable,
|
|
4748
4739
|
$r as buildGlobalInfoUpdatePayload,
|
|
4749
4740
|
_r as createEmptyGlobalInfoViewModel,
|
|
4750
4741
|
ms as getJtLocale,
|
|
4751
4742
|
us as install,
|
|
4752
|
-
|
|
4743
|
+
Hn as installLocale,
|
|
4753
4744
|
ls as isGlobalInfoNode,
|
|
4754
4745
|
Sn as mergeGlobalInfoChildren,
|
|
4755
4746
|
wr as normalizeGlobalInfoDetail,
|
|
4756
|
-
|
|
4747
|
+
qt as normalizeGlobalInfoTree,
|
|
4757
4748
|
vs as normalizeLocale,
|
|
4758
4749
|
hs as resetJtLocale,
|
|
4759
4750
|
Ir as resolveGlobalInfoRenderType,
|