@jt-home/mfe-components 1.0.57 → 1.0.59
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/index.cjs +2 -2
- package/dist/index.mjs +787 -798
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as X, J as Ft, i as Hn } from "./index-D67nILVt.js";
|
|
3
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
|
|
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
|
-
import { cascaderEmits as io, inputEmits as Lt, selectEmits as
|
|
6
|
+
import { cascaderEmits as io, inputEmits as Lt, selectEmits as Pt } from "element-plus";
|
|
7
7
|
const bt = 2, co = 3;
|
|
8
8
|
function uo(e) {
|
|
9
9
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -100,14 +100,14 @@ const po = /* @__PURE__ */ pe({
|
|
|
100
100
|
clearable: !0,
|
|
101
101
|
persistent: !0
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function Et(e) {
|
|
104
104
|
return Object.fromEntries(
|
|
105
105
|
Object.entries(e).filter(([, t]) => t !== void 0)
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
function vo(e) {
|
|
109
|
-
const t =
|
|
110
|
-
return t.props && (t.props =
|
|
109
|
+
const t = Et(e);
|
|
110
|
+
return t.props && (t.props = Et(
|
|
111
111
|
t.props
|
|
112
112
|
)), t;
|
|
113
113
|
}
|
|
@@ -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,10 +190,10 @@ 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) => {
|
|
@@ -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) {
|
|
@@ -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")
|
|
@@ -411,17 +411,17 @@ const ho = /* @__PURE__ */ pe({
|
|
|
411
411
|
appendTo: {},
|
|
412
412
|
props: {}
|
|
413
413
|
},
|
|
414
|
-
emits:
|
|
414
|
+
emits: Pt,
|
|
415
415
|
setup(e, { emit: t }) {
|
|
416
416
|
const n = e, o = M(() => {
|
|
417
417
|
const { options: s, placeholder: i, preservePlaceholderWhenDisabled: a, ...l } = n;
|
|
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
|
-
Object.keys(
|
|
424
|
+
Object.keys(Pt).map((s) => [
|
|
425
425
|
s,
|
|
426
426
|
(...i) => r(s, ...i)
|
|
427
427
|
])
|
|
@@ -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
|
});
|
|
@@ -519,7 +519,7 @@ const ho = /* @__PURE__ */ pe({
|
|
|
519
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,
|
|
@@ -531,9 +531,9 @@ const ho = /* @__PURE__ */ pe({
|
|
|
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
|
|
@@ -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 = P(
|
|
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
|
-
}),
|
|
606
|
+
}), z = M(
|
|
607
607
|
() => E.value.filter((T) => !!s[`${T.prop}-search`])
|
|
608
608
|
), re = M(() => {
|
|
609
|
-
const T =
|
|
610
|
-
return E.value.length > 0 && E.value.length <= 2 && T <
|
|
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
|
-
() => E.value.map((T) =>
|
|
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
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
687
|
function P(T) {
|
|
688
|
-
return Math.min(
|
|
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)
|
|
@@ -827,7 +827,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
827
827
|
], 6);
|
|
828
828
|
};
|
|
829
829
|
}
|
|
830
|
-
}),
|
|
830
|
+
}), Po = /* @__PURE__ */ be(Lo, [["__scopeId", "data-v-5e920e01"]]), Eo = { key: 1 }, Vo = { key: 2 }, jo = { key: 3 }, Ao = /* @__PURE__ */ pe({
|
|
831
831
|
name: "JtTable",
|
|
832
832
|
__name: "JtTable",
|
|
833
833
|
props: {
|
|
@@ -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,15 +856,15 @@ 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) => {
|
|
@@ -887,7 +887,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
887
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),
|
|
@@ -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",
|
|
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],
|
|
@@ -923,7 +923,7 @@ const ko = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
923
923
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
924
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",
|
|
@@ -968,7 +968,7 @@ 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
|
}
|
|
@@ -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,26 +1032,26 @@ 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(), H(
|
|
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: `${
|
|
1051
|
+
ye(A.value, (O) => ({
|
|
1052
|
+
name: `${O.prop}-search`,
|
|
1053
1053
|
fn: W((E) => [
|
|
1054
|
-
te(b.$slots, `${
|
|
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)
|
|
@@ -1069,39 +1069,39 @@ 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: `${
|
|
1072
|
+
ye(f.value, (O) => ({
|
|
1073
|
+
name: `${O.prop}-header`,
|
|
1074
1074
|
fn: W((E) => [
|
|
1075
|
-
te(b.$slots, `${
|
|
1075
|
+
te(b.$slots, `${O.prop}-header`, Oe(Be(E)), void 0, !0)
|
|
1076
1076
|
])
|
|
1077
1077
|
})),
|
|
1078
|
-
ye(S.value, (
|
|
1079
|
-
name: `${
|
|
1078
|
+
ye(S.value, (O) => ({
|
|
1079
|
+
name: `${O.prop}-data`,
|
|
1080
1080
|
fn: W((E) => [
|
|
1081
|
-
te(b.$slots, `${
|
|
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
|
]);
|
|
@@ -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
|
}
|
|
@@ -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 P =
|
|
1235
|
-
b[P] =
|
|
1234
|
+
var P = F.name;
|
|
1235
|
+
b[P] = F, u = P;
|
|
1236
1236
|
}
|
|
1237
1237
|
return !d && u && (D = u), u || !d && D;
|
|
1238
|
-
}, E = function(N,
|
|
1239
|
-
if (
|
|
1240
|
-
var
|
|
1241
|
-
return
|
|
1242
|
-
},
|
|
1243
|
-
|
|
1244
|
-
return E(N, { locale:
|
|
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 P =
|
|
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 = E(
|
|
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 E(
|
|
1278
|
-
},
|
|
1279
|
-
return this.endOf(d) < E(
|
|
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
|
|
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
1295
|
return _ ? P(1, 0) : P(31, 11);
|
|
1296
1296
|
case w:
|
|
1297
|
-
return _ ? P(1,
|
|
1297
|
+
return _ ? P(1, G) : P(0, G + 1);
|
|
1298
1298
|
case g:
|
|
1299
|
-
var
|
|
1300
|
-
return P(_ ? Q - ue : Q + (6 - ue),
|
|
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 P && this.$d[P](
|
|
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
|
|
1328
|
+
B = Number(B);
|
|
1329
|
+
var L = z.p(d), P = function(G) {
|
|
1330
1330
|
var Q = E(_);
|
|
1331
|
-
return
|
|
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
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(P,
|
|
1388
|
+
return de(P, x, !0);
|
|
1389
1389
|
case "A":
|
|
1390
|
-
return de(P,
|
|
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
1413
|
switch (P) {
|
|
1414
|
-
case
|
|
1414
|
+
case j:
|
|
1415
1415
|
_ = Q() / 12;
|
|
1416
1416
|
break;
|
|
1417
1417
|
case w:
|
|
@@ -1421,51 +1421,51 @@ 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 E.prototype = le, [["$ms", c], ["$s", s], ["$m", i], ["$H", a], ["$W", l], ["$M", w], ["$y",
|
|
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
|
-
}), E.extend = function(N,
|
|
1467
|
-
return N.$i || (N(
|
|
1468
|
-
}, E.locale =
|
|
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
1469
|
return E(1e3 * N);
|
|
1470
1470
|
}, E.en = b[D], E.Ls = b, E.p = {}, E;
|
|
1471
1471
|
});
|
|
@@ -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(E,
|
|
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
1544
|
return function(E) {
|
|
1545
|
-
for (var
|
|
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 (
|
|
1554
|
+
var L = _.afternoon;
|
|
1555
|
+
if (L !== void 0) {
|
|
1556
1556
|
var P = _.hours;
|
|
1557
|
-
|
|
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 E =
|
|
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 P = f(u)(d),
|
|
1575
|
-
|
|
1576
|
-
var xe, nt = Q || 0, Ge = T || 0,
|
|
1577
|
-
return de ? new Date(Date.UTC(Ie, qe, De, nt, Ge,
|
|
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 E ===
|
|
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",
|
|
@@ -2162,14 +2162,14 @@ function xt(e, t, n, o) {
|
|
|
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,
|
|
@@ -2214,10 +2214,10 @@ function Mr(e, t) {
|
|
|
2214
2214
|
code: o,
|
|
2215
2215
|
label: r,
|
|
2216
2216
|
value: n.value ?? n.defaultValue ?? "",
|
|
2217
|
-
type:
|
|
2217
|
+
type: Er(n),
|
|
2218
2218
|
fieldType: se(n.fieldType),
|
|
2219
2219
|
frontInputType: se(n.frontInputType),
|
|
2220
|
-
renderType:
|
|
2220
|
+
renderType: Pr(n),
|
|
2221
2221
|
required: Ce(n.required ?? n.isRequired),
|
|
2222
2222
|
readonly: Ce(n.readonly ?? n.disabled),
|
|
2223
2223
|
visible: n.visible === void 0 ? Ce(n.visibled ?? !0) : Ce(n.visible),
|
|
@@ -2408,13 +2408,13 @@ function Gt(e) {
|
|
|
2408
2408
|
const t = e.map((n) => ee(n)).filter(Boolean);
|
|
2409
2409
|
return t.length ? t : void 0;
|
|
2410
2410
|
}
|
|
2411
|
-
function
|
|
2411
|
+
function Pr(e) {
|
|
2412
2412
|
if (Ce(e.htmlDisplay)) return "html";
|
|
2413
2413
|
if (Ce(e.multRow)) return "multi-row";
|
|
2414
2414
|
const t = ee(e.renderType).toLowerCase();
|
|
2415
2415
|
return t === "code" || t === "empty" ? t : "text";
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function Er(e) {
|
|
2418
2418
|
const t = ee(
|
|
2419
2419
|
e.fieldType ?? e.type ?? e.frontInputType ?? e.renderType
|
|
2420
2420
|
).toLowerCase();
|
|
@@ -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,7 +2481,7 @@ 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 :
|
|
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
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];
|
|
@@ -2499,7 +2499,7 @@ function zr(e) {
|
|
|
2499
2499
|
return !!(e && !ut(e) && ze(e).length === 0 && (e.options ?? []).length > 0);
|
|
2500
2500
|
}
|
|
2501
2501
|
function qr(e, t) {
|
|
2502
|
-
return e.fields.some((n) => n.code === t || n.key === t || n.id === t ||
|
|
2502
|
+
return e.fields.some((n) => n.code === t || n.key === t || n.id === t || Ee(n) === t);
|
|
2503
2503
|
}
|
|
2504
2504
|
function xr(e) {
|
|
2505
2505
|
return wn(e);
|
|
@@ -2627,17 +2627,17 @@ function Wr(e) {
|
|
|
2627
2627
|
targetSections: c
|
|
2628
2628
|
};
|
|
2629
2629
|
}
|
|
2630
|
-
const
|
|
2630
|
+
const Pn = X(
|
|
2631
2631
|
"common.信息集不能为空,最后一条数据不可删除"
|
|
2632
2632
|
);
|
|
2633
2633
|
function Zr(e, t = [], n = {}) {
|
|
2634
2634
|
return !e.mark.isRequired || t.length > 0 ? null : Qr(n.emptyMessage, {
|
|
2635
2635
|
section: e,
|
|
2636
2636
|
infSetValues: t
|
|
2637
|
-
}) ||
|
|
2637
|
+
}) || Pn;
|
|
2638
2638
|
}
|
|
2639
2639
|
function Qr(e, t) {
|
|
2640
|
-
return typeof e == "function" ? e(t) : typeof e == "string" ? e :
|
|
2640
|
+
return typeof e == "function" ? e(t) : typeof e == "string" ? e : Pn;
|
|
2641
2641
|
}
|
|
2642
2642
|
const Re = (e) => new Error(`[GlobalInfo] ${e}`), Xr = (e) => [
|
|
2643
2643
|
String(e.method ?? "").toLowerCase(),
|
|
@@ -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 = { ...
|
|
2744
|
+
}), Y = { ...m, params: C }, U = p && { ...p, params: C };
|
|
2745
2745
|
return h(Y, U);
|
|
2746
|
-
}, b = (
|
|
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
|
-
}, E = (
|
|
2771
|
-
if (
|
|
2772
|
-
return typeof
|
|
2773
|
-
},
|
|
2774
|
-
if (He(
|
|
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 = E(
|
|
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 = E(
|
|
2797
|
+
}, N = (m, p) => {
|
|
2798
|
+
const C = E(m);
|
|
2799
2799
|
C && ($.value = {
|
|
2800
2800
|
...$.value,
|
|
2801
2801
|
[C]: Je({
|
|
@@ -2804,11 +2804,11 @@ 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 =
|
|
2810
|
+
}, F = (m = s.value?.raw ?? null, p = i.value) => {
|
|
2811
|
+
const C = A.value, Y = a.value && C.find(
|
|
2812
2812
|
(U) => Me(U) === Me(a.value)
|
|
2813
2813
|
) ? a.value : null;
|
|
2814
2814
|
s.value = {
|
|
@@ -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,17 +2852,17 @@ 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
2859
|
const U = p(Y);
|
|
2860
2860
|
l.value = {
|
|
2861
2861
|
...l.value,
|
|
2862
2862
|
[C]: U
|
|
2863
|
-
}, a.value = Me(a.value ?? U) === C ? U : a.value,
|
|
2864
|
-
}, u = async (
|
|
2865
|
-
const p = re(
|
|
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)
|
|
@@ -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
|
|
2900
|
+
return B(ve, C, Y);
|
|
2901
2901
|
} catch (U) {
|
|
2902
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 (!He(
|
|
2910
|
-
return m
|
|
2911
|
-
const p = E(
|
|
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
|
-
}, P = async (
|
|
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
2924
|
return qt(Y).treeNodes;
|
|
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,
|
|
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 = {},
|
|
2949
|
+
c.value = Y, a.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {}, j.value = [];
|
|
2950
2950
|
const U = b(Y, e.initialActiveNodeKey) ?? b(Y);
|
|
2951
2951
|
return i.value = U, s.value = {
|
|
2952
2952
|
...C,
|
|
2953
2953
|
treeNodes: Y,
|
|
2954
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,27 +2961,27 @@ 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" ? U.fields.find((he) =>
|
|
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
2985
|
...U.model,
|
|
2986
2986
|
[Y]: C
|
|
2987
2987
|
};
|
|
@@ -2996,13 +2996,13 @@ const ea = (e) => {
|
|
|
2996
2996
|
rows: U.renderType === "form" ? [{ ...U.rows[0], ...ie }] : U.rows,
|
|
2997
2997
|
// 同步 fields.value,保证只读 renderer 立即显示新值。
|
|
2998
2998
|
fields: U.fields.map((he) => {
|
|
2999
|
-
const Ae =
|
|
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 U = m
|
|
3004
|
+
}, we = async (m, p, C = {}, Y = {}) => {
|
|
3005
|
+
const U = v(m);
|
|
3006
3006
|
if (!U)
|
|
3007
3007
|
return [];
|
|
3008
3008
|
const $e = {
|
|
@@ -3023,7 +3023,7 @@ const ea = (e) => {
|
|
|
3023
3023
|
return d(U, (Ye) => ({
|
|
3024
3024
|
...Ye,
|
|
3025
3025
|
fields: Ye.fields.map(
|
|
3026
|
-
(Pe) =>
|
|
3026
|
+
(Pe) => Ee(Pe) === ve || Pe.code === ve ? { ...Pe, options: [] } : Pe
|
|
3027
3027
|
)
|
|
3028
3028
|
})), [];
|
|
3029
3029
|
const Yn = await D(
|
|
@@ -3034,7 +3034,7 @@ const ea = (e) => {
|
|
|
3034
3034
|
type: "fieldOptions",
|
|
3035
3035
|
requestSource: "inner",
|
|
3036
3036
|
tagId: U.requestTagId ?? U.tagId,
|
|
3037
|
-
node:
|
|
3037
|
+
node: z(U),
|
|
3038
3038
|
section: U,
|
|
3039
3039
|
field: ie,
|
|
3040
3040
|
params: Te(Ke.params),
|
|
@@ -3047,15 +3047,15 @@ const ea = (e) => {
|
|
|
3047
3047
|
return d(U, (Ye) => ({
|
|
3048
3048
|
...Ye,
|
|
3049
3049
|
fields: Ye.fields.map(
|
|
3050
|
-
(Pe) =>
|
|
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,7 +3077,7 @@ const ea = (e) => {
|
|
|
3077
3077
|
// 加载模板树。
|
|
3078
3078
|
loadTree: Q,
|
|
3079
3079
|
// 选中树节点。
|
|
3080
|
-
selectNode:
|
|
3080
|
+
selectNode: G,
|
|
3081
3081
|
// 加载当前节点详情。
|
|
3082
3082
|
loadDetail: P,
|
|
3083
3083
|
// 刷新当前详情。
|
|
@@ -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 U = [...m
|
|
3108
|
-
U.splice(C >= 0 ? C : U.length, C >= 0 ? 1 : 0, p), Ie(
|
|
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);
|
|
@@ -3157,9 +3157,9 @@ const ea = (e) => {
|
|
|
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
|
() => {
|
|
@@ -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 状态缓存。
|
|
@@ -3213,7 +3213,7 @@ const ea = (e) => {
|
|
|
3213
3213
|
})));
|
|
3214
3214
|
}
|
|
3215
3215
|
});
|
|
3216
|
-
function
|
|
3216
|
+
function En(e) {
|
|
3217
3217
|
if (e.action) {
|
|
3218
3218
|
if (e.action.type === "direct") {
|
|
3219
3219
|
Ft(e.action.options);
|
|
@@ -3270,27 +3270,25 @@ 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"];
|
|
3287
3287
|
return a.value ? [u, "global-info-field-control__descr-popper"].filter(Boolean).join(" ") : u;
|
|
3288
|
-
}), k = M(
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
)
|
|
3293
|
-
), R = M(() => {
|
|
3288
|
+
}), k = M(() => {
|
|
3289
|
+
const u = n.field.props?.teleported;
|
|
3290
|
+
return u === void 0 ? !0 : u;
|
|
3291
|
+
}), R = M(() => {
|
|
3294
3292
|
const u = n.field.props?.activeValue ?? n.field.props?.["active-value"], _ = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
3295
3293
|
return u !== void 0 || _ !== void 0 ? n.modelValue ?? _ ?? !1 : vn(n.modelValue);
|
|
3296
3294
|
}), y = M(() => s.value === "code" ? 5 : 1), h = M(
|
|
@@ -3299,29 +3297,29 @@ const ta = {
|
|
|
3299
3297
|
() => mn(
|
|
3300
3298
|
n.field,
|
|
3301
3299
|
n.modelValue,
|
|
3302
|
-
|
|
3300
|
+
X("common.请选择文件")
|
|
3303
3301
|
)
|
|
3304
3302
|
), b = M(
|
|
3305
3303
|
() => hn(
|
|
3306
3304
|
n.field,
|
|
3307
3305
|
n.modelValue,
|
|
3308
|
-
|
|
3306
|
+
X("common.请选择文件")
|
|
3309
3307
|
)
|
|
3310
|
-
),
|
|
3311
|
-
let
|
|
3312
|
-
function
|
|
3313
|
-
if (Array.isArray(
|
|
3314
|
-
const _ =
|
|
3315
|
-
(
|
|
3308
|
+
), 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.请输入"));
|
|
3309
|
+
let v;
|
|
3310
|
+
function O(u) {
|
|
3311
|
+
if (Array.isArray(A.value)) {
|
|
3312
|
+
const _ = A.value.find(
|
|
3313
|
+
(L) => Ze(u, L)
|
|
3316
3314
|
);
|
|
3317
3315
|
if (_ !== void 0) return _;
|
|
3318
3316
|
}
|
|
3319
|
-
return Ze(u,
|
|
3317
|
+
return Ze(u, A.value) ? A.value : u.value;
|
|
3320
3318
|
}
|
|
3321
3319
|
function E(u) {
|
|
3322
3320
|
o("update:modelValue", re(u));
|
|
3323
3321
|
}
|
|
3324
|
-
function
|
|
3322
|
+
function z(u) {
|
|
3325
3323
|
o("change", re(u));
|
|
3326
3324
|
}
|
|
3327
3325
|
function re(u) {
|
|
@@ -3331,33 +3329,33 @@ const ta = {
|
|
|
3331
3329
|
u && o("loadOptions", i.value ? { searchText: "" } : void 0);
|
|
3332
3330
|
}
|
|
3333
3331
|
function N(u) {
|
|
3334
|
-
i.value && (
|
|
3332
|
+
i.value && (v && clearTimeout(v), v = setTimeout(() => {
|
|
3335
3333
|
o("loadOptions", { searchText: u });
|
|
3336
3334
|
}, 300));
|
|
3337
3335
|
}
|
|
3338
|
-
function
|
|
3336
|
+
function F() {
|
|
3339
3337
|
l.value || c.value?.click();
|
|
3340
3338
|
}
|
|
3341
|
-
function
|
|
3342
|
-
|
|
3339
|
+
function B(u) {
|
|
3340
|
+
En(u);
|
|
3343
3341
|
}
|
|
3344
3342
|
Xn(() => {
|
|
3345
|
-
|
|
3343
|
+
v && clearTimeout(v);
|
|
3346
3344
|
});
|
|
3347
3345
|
function d(u) {
|
|
3348
|
-
const _ = u.target,
|
|
3349
|
-
E(P),
|
|
3346
|
+
const _ = u.target, L = Array.from(_.files ?? []), P = n.field.props?.multiple ? L : L[0] ?? null;
|
|
3347
|
+
E(P), z(P);
|
|
3350
3348
|
}
|
|
3351
3349
|
return (u, _) => {
|
|
3352
|
-
const
|
|
3350
|
+
const L = Xt, P = Qt, x = Wt, q = ao, G = so, Q = Zt;
|
|
3353
3351
|
return s.value === "select" || s.value === "select_remote" ? (I(), H(P, ae({
|
|
3354
3352
|
key: 0,
|
|
3355
|
-
class: "global-info-field-control"
|
|
3353
|
+
class: ["global-info-field-control", { "global-info-field-control--select-descr": a.value }]
|
|
3356
3354
|
}, u.field.props, {
|
|
3357
3355
|
"popper-class": S.value,
|
|
3358
3356
|
teleported: k.value,
|
|
3359
|
-
"model-value":
|
|
3360
|
-
placeholder:
|
|
3357
|
+
"model-value": A.value,
|
|
3358
|
+
placeholder: V.value,
|
|
3361
3359
|
disabled: l.value,
|
|
3362
3360
|
"collapse-tags": g.value,
|
|
3363
3361
|
"collapse-tags-tooltip": g.value,
|
|
@@ -3368,10 +3366,10 @@ const ta = {
|
|
|
3368
3366
|
clearable: "",
|
|
3369
3367
|
onVisibleChange: le,
|
|
3370
3368
|
"onUpdate:modelValue": E,
|
|
3371
|
-
onChange:
|
|
3369
|
+
onChange: z
|
|
3372
3370
|
}), {
|
|
3373
3371
|
default: W(() => [
|
|
3374
|
-
(I(!0), K(Se, null, ye(f.value, (T) => (I(), H(
|
|
3372
|
+
(I(!0), K(Se, null, ye(f.value, (T) => (I(), H(L, {
|
|
3375
3373
|
key: String(T.value),
|
|
3376
3374
|
label: T.label,
|
|
3377
3375
|
value: T.value
|
|
@@ -3386,35 +3384,35 @@ const ta = {
|
|
|
3386
3384
|
}, 1032, ["label", "value"]))), 128))
|
|
3387
3385
|
]),
|
|
3388
3386
|
_: 1
|
|
3389
|
-
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (I(), H(
|
|
3387
|
+
}, 16, ["class", "popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (I(), H(x, ae({
|
|
3390
3388
|
key: 1,
|
|
3391
3389
|
class: "global-info-field-control"
|
|
3392
3390
|
}, u.field.props, {
|
|
3393
3391
|
"model-value": u.modelValue,
|
|
3394
|
-
placeholder:
|
|
3392
|
+
placeholder: V.value,
|
|
3395
3393
|
disabled: l.value,
|
|
3396
3394
|
type: "date",
|
|
3397
3395
|
"value-format": "YYYY-MM-DD",
|
|
3398
3396
|
"onUpdate:modelValue": E,
|
|
3399
|
-
onChange:
|
|
3400
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (I(), H(
|
|
3397
|
+
onChange: z
|
|
3398
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (I(), H(q, ae({
|
|
3401
3399
|
key: 2,
|
|
3402
3400
|
class: "global-info-field-control"
|
|
3403
3401
|
}, u.field.props, {
|
|
3404
|
-
"model-value":
|
|
3405
|
-
placeholder:
|
|
3402
|
+
"model-value": j.value,
|
|
3403
|
+
placeholder: V.value,
|
|
3406
3404
|
disabled: l.value,
|
|
3407
3405
|
"controls-position": "right",
|
|
3408
3406
|
"onUpdate:modelValue": E,
|
|
3409
|
-
onChange:
|
|
3410
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (I(), H(
|
|
3407
|
+
onChange: z
|
|
3408
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (I(), H(G, ae({
|
|
3411
3409
|
key: 3,
|
|
3412
3410
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3413
3411
|
}, u.field.props, {
|
|
3414
3412
|
"model-value": R.value,
|
|
3415
3413
|
disabled: l.value,
|
|
3416
3414
|
"onUpdate:modelValue": E,
|
|
3417
|
-
onChange:
|
|
3415
|
+
onChange: z
|
|
3418
3416
|
}), null, 16, ["model-value", "disabled"])) : s.value === "file" ? (I(), K("div", {
|
|
3419
3417
|
key: 4,
|
|
3420
3418
|
class: We(["global-info-field-control global-info-field-control--file", {
|
|
@@ -3422,7 +3420,7 @@ const ta = {
|
|
|
3422
3420
|
"is-empty": !h.value,
|
|
3423
3421
|
"is-filled": h.value
|
|
3424
3422
|
}]),
|
|
3425
|
-
onClick:
|
|
3423
|
+
onClick: F
|
|
3426
3424
|
}, [
|
|
3427
3425
|
ne("input", {
|
|
3428
3426
|
ref_key: "fileInputRef",
|
|
@@ -3435,18 +3433,18 @@ const ta = {
|
|
|
3435
3433
|
onChange: d
|
|
3436
3434
|
}, null, 40, ra),
|
|
3437
3435
|
b.value.length ? (I(), K("span", aa, [
|
|
3438
|
-
(I(!0), K(Se, null, ye(b.value, (T,
|
|
3436
|
+
(I(!0), K(Se, null, ye(b.value, (T, Z) => (I(), K(Se, {
|
|
3439
3437
|
key: T.key
|
|
3440
3438
|
}, [
|
|
3441
3439
|
T.action ? (I(), K("button", {
|
|
3442
3440
|
key: 0,
|
|
3443
3441
|
class: "global-info-field-control__file-preview",
|
|
3444
3442
|
type: "button",
|
|
3445
|
-
onClick: Ht((ue) =>
|
|
3443
|
+
onClick: Ht((ue) => B(T), ["stop", "prevent"])
|
|
3446
3444
|
}, oe(T.text), 9, sa)) : (I(), K("span", la, oe(T.text), 1)),
|
|
3447
|
-
|
|
3445
|
+
Z < b.value.length - 1 ? (I(), K("span", ia, "、")) : fe("", !0)
|
|
3448
3446
|
], 64))), 128))
|
|
3449
|
-
])) : h.value ? (I(), K("span", ca, oe(D.value), 1)) : (I(), K("span", ua, oe(J(
|
|
3447
|
+
])) : h.value ? (I(), K("span", ca, oe(D.value), 1)) : (I(), K("span", ua, oe(J(X)("common.上传")), 1))
|
|
3450
3448
|
], 2)) : s.value === "empty" ? (I(), H(Q, {
|
|
3451
3449
|
key: 5,
|
|
3452
3450
|
class: "global-info-field-control",
|
|
@@ -3461,17 +3459,17 @@ const ta = {
|
|
|
3461
3459
|
}]
|
|
3462
3460
|
}, u.field.props, {
|
|
3463
3461
|
"model-value": w.value,
|
|
3464
|
-
placeholder:
|
|
3462
|
+
placeholder: V.value,
|
|
3465
3463
|
disabled: l.value,
|
|
3466
3464
|
type: r.includes(s.value) ? "textarea" : "text",
|
|
3467
3465
|
rows: r.includes(s.value) ? y.value : void 0,
|
|
3468
3466
|
resize: $.value,
|
|
3469
3467
|
"onUpdate:modelValue": E,
|
|
3470
|
-
onChange:
|
|
3468
|
+
onChange: z
|
|
3471
3469
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
3472
3470
|
};
|
|
3473
3471
|
}
|
|
3474
|
-
}), Vn = /* @__PURE__ */ be(da, [["__scopeId", "data-v-
|
|
3472
|
+
}), Vn = /* @__PURE__ */ be(da, [["__scopeId", "data-v-0cf322fd"]]), fa = ["innerHTML"], pa = {
|
|
3475
3473
|
key: 1,
|
|
3476
3474
|
class: "global-info-field-value global-info-field-value--code"
|
|
3477
3475
|
}, ma = {
|
|
@@ -3488,7 +3486,7 @@ const ta = {
|
|
|
3488
3486
|
setup(e) {
|
|
3489
3487
|
const t = e, n = M(() => Mt(t.field)), o = M(() => n.value === "empty" || _e(t.value)), r = M(() => mn(t.field, t.value, t.emptyText)), c = M(() => hn(t.field, t.value, t.emptyText));
|
|
3490
3488
|
function s(i) {
|
|
3491
|
-
|
|
3489
|
+
En(i);
|
|
3492
3490
|
}
|
|
3493
3491
|
return (i, a) => n.value === "html" && !o.value ? (I(), K("span", {
|
|
3494
3492
|
key: 0,
|
|
@@ -3563,7 +3561,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3563
3561
|
renderConfig: {}
|
|
3564
3562
|
},
|
|
3565
3563
|
setup(e) {
|
|
3566
|
-
const t = e, n =
|
|
3564
|
+
const t = e, n = Le(), o = M(() => t.model ?? t.section.model), r = /* @__PURE__ */ new Map(), c = M(() => ft(
|
|
3567
3565
|
t.section.fields,
|
|
3568
3566
|
t.section,
|
|
3569
3567
|
t.renderConfig,
|
|
@@ -3574,15 +3572,15 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3574
3572
|
);
|
|
3575
3573
|
function i(h, D) {
|
|
3576
3574
|
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),
|
|
3575
|
+
(h.cascadeClearFields ?? []).forEach((V) => {
|
|
3576
|
+
b[V] = "";
|
|
3577
|
+
}), t.onUpdateModel?.(b), t.onUpdateModel || t.actions.updateField(t.section, h, D), a(h, D, b), j(b, h);
|
|
3580
3578
|
}
|
|
3581
3579
|
function a(h, D, b) {
|
|
3582
|
-
const
|
|
3583
|
-
if (
|
|
3580
|
+
const V = t.renderConfig?.onFieldBusinessChange;
|
|
3581
|
+
if (V)
|
|
3584
3582
|
try {
|
|
3585
|
-
const
|
|
3583
|
+
const v = l(h, D), O = {
|
|
3586
3584
|
field: h,
|
|
3587
3585
|
value: D,
|
|
3588
3586
|
section: t.section,
|
|
@@ -3593,72 +3591,68 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3593
3591
|
sections: g(),
|
|
3594
3592
|
sectionValues: w(t.section, b),
|
|
3595
3593
|
actions: t.actions,
|
|
3596
|
-
selectedOption:
|
|
3597
|
-
selectedOptions:
|
|
3594
|
+
selectedOption: v[0],
|
|
3595
|
+
selectedOptions: v
|
|
3598
3596
|
};
|
|
3599
|
-
Promise.resolve(
|
|
3597
|
+
Promise.resolve(V(O)).catch((E) => {
|
|
3600
3598
|
console.error("[GlobalInfoFormRenderer] field business change failed", E);
|
|
3601
3599
|
});
|
|
3602
|
-
} catch (
|
|
3603
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3600
|
+
} catch (v) {
|
|
3601
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", v);
|
|
3604
3602
|
}
|
|
3605
3603
|
}
|
|
3606
3604
|
function l(h, D) {
|
|
3607
3605
|
const b = dt(h, D);
|
|
3608
|
-
return (h.options ?? []).filter((
|
|
3606
|
+
return (h.options ?? []).filter((V) => b.some((v) => Ze(V, v)));
|
|
3609
3607
|
}
|
|
3610
3608
|
function g() {
|
|
3611
3609
|
return Object.values(t.state.sectionMap);
|
|
3612
3610
|
}
|
|
3613
3611
|
function w(h, D) {
|
|
3614
|
-
const
|
|
3615
|
-
const
|
|
3616
|
-
return [
|
|
3612
|
+
const V = g().flatMap((v) => {
|
|
3613
|
+
const O = v.key === h.key ? D : v.renderType === "table" ? v.rows : v.model;
|
|
3614
|
+
return [v.key, v.id, v.setId, v.infSetId, v.code].filter(Boolean).map((E) => [String(E), O]);
|
|
3617
3615
|
});
|
|
3618
|
-
return Object.fromEntries(
|
|
3616
|
+
return Object.fromEntries(V);
|
|
3619
3617
|
}
|
|
3620
3618
|
async function $(h, D = {}, b = o.value) {
|
|
3621
|
-
const
|
|
3622
|
-
if (!An(D) && lt(h, E,
|
|
3623
|
-
r.set(
|
|
3619
|
+
const V = b, v = k(h), O = st(t.section.key, h, V), E = r.get(v);
|
|
3620
|
+
if (!An(D) && lt(h, E, O)) {
|
|
3621
|
+
r.set(v, O);
|
|
3624
3622
|
return;
|
|
3625
3623
|
}
|
|
3626
3624
|
try {
|
|
3627
3625
|
if (D.searchText !== void 0) {
|
|
3628
|
-
await s(h,
|
|
3626
|
+
await s(h, V, D);
|
|
3629
3627
|
return;
|
|
3630
3628
|
}
|
|
3631
|
-
await t.actions.loadFieldOptions(t.section, h,
|
|
3629
|
+
await t.actions.loadFieldOptions(t.section, h, V, D), r.set(v, O);
|
|
3632
3630
|
} catch (re) {
|
|
3633
3631
|
console.error("[GlobalInfoFormRenderer] load field options failed", re);
|
|
3634
3632
|
}
|
|
3635
3633
|
}
|
|
3636
|
-
async function
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3634
|
+
async function j(h = o.value, D) {
|
|
3635
|
+
const b = [];
|
|
3636
|
+
for (const V of c.value) {
|
|
3637
|
+
if (D && !Nn(V, D)) continue;
|
|
3638
|
+
const v = zn(V, h);
|
|
3639
|
+
if (!R(V, v)) continue;
|
|
3640
|
+
const O = st(t.section.key, V, h), E = k(V), z = r.get(E);
|
|
3641
|
+
if (lt(V, z, O)) {
|
|
3642
|
+
r.set(E, O);
|
|
3644
3643
|
continue;
|
|
3645
3644
|
}
|
|
3646
|
-
|
|
3645
|
+
z !== O && b.push($(V, qn(V, v), h));
|
|
3647
3646
|
}
|
|
3647
|
+
await Promise.allSettled(b);
|
|
3648
3648
|
}
|
|
3649
|
-
|
|
3649
|
+
je(
|
|
3650
3650
|
() => t.section.key,
|
|
3651
3651
|
() => {
|
|
3652
3652
|
r.clear();
|
|
3653
3653
|
}
|
|
3654
|
-
), Le(
|
|
3655
|
-
() => t.editing,
|
|
3656
|
-
() => {
|
|
3657
|
-
V();
|
|
3658
|
-
},
|
|
3659
|
-
{ immediate: !0 }
|
|
3660
3654
|
);
|
|
3661
|
-
function
|
|
3655
|
+
function A(h) {
|
|
3662
3656
|
const D = o.value[h.code];
|
|
3663
3657
|
return {
|
|
3664
3658
|
field: h,
|
|
@@ -3676,12 +3670,12 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3676
3670
|
function f(h) {
|
|
3677
3671
|
const D = String(h.code || "").trim(), b = D ? `field-${D}` : "";
|
|
3678
3672
|
if (b && n[b]) return b;
|
|
3679
|
-
const
|
|
3680
|
-
if (
|
|
3681
|
-
const
|
|
3682
|
-
if (
|
|
3683
|
-
const E =
|
|
3684
|
-
return E !==
|
|
3673
|
+
const V = b.toLowerCase();
|
|
3674
|
+
if (V !== b && n[V]) return V;
|
|
3675
|
+
const v = String(h.raw?.type || h.fieldType || h.type || "").trim(), O = v ? `field-type-${v}` : "";
|
|
3676
|
+
if (O && n[O]) return O;
|
|
3677
|
+
const E = O.toLowerCase();
|
|
3678
|
+
return E !== O && n[E] ? E : "";
|
|
3685
3679
|
}
|
|
3686
3680
|
function S(h) {
|
|
3687
3681
|
return h.span ? Math.min(Math.max(h.span, 1), 24) : 6;
|
|
@@ -3696,44 +3690,44 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3696
3690
|
return h.required || h.isRequired;
|
|
3697
3691
|
}
|
|
3698
3692
|
return (h, D) => {
|
|
3699
|
-
const b = en,
|
|
3700
|
-
return I(), H(
|
|
3693
|
+
const b = en, V = tn;
|
|
3694
|
+
return I(), H(V, {
|
|
3701
3695
|
class: "global-info-form-renderer",
|
|
3702
3696
|
model: o.value,
|
|
3703
3697
|
"label-position": "top"
|
|
3704
3698
|
}, {
|
|
3705
3699
|
default: W(() => [
|
|
3706
3700
|
ne("div", Sa, [
|
|
3707
|
-
(I(!0), K(Se, null, ye(c.value, (
|
|
3708
|
-
key: k(
|
|
3701
|
+
(I(!0), K(Se, null, ye(c.value, (v) => (I(), K("div", {
|
|
3702
|
+
key: k(v),
|
|
3709
3703
|
class: "global-info-form-renderer__grid-item",
|
|
3710
|
-
style: $t({ gridColumn: `span ${S(
|
|
3704
|
+
style: $t({ gridColumn: `span ${S(v)}` })
|
|
3711
3705
|
}, [
|
|
3712
3706
|
ke(b, ae({
|
|
3713
|
-
prop:
|
|
3707
|
+
prop: v.code,
|
|
3714
3708
|
ref_for: !0
|
|
3715
|
-
},
|
|
3709
|
+
}, v.formItemProps), {
|
|
3716
3710
|
label: W(() => [
|
|
3717
3711
|
ne("span", _a, [
|
|
3718
|
-
y(
|
|
3719
|
-
Ue(" " + oe(
|
|
3712
|
+
y(v) ? (I(), K("span", wa, "*")) : fe("", !0),
|
|
3713
|
+
Ue(" " + oe(v.label), 1)
|
|
3720
3714
|
])
|
|
3721
3715
|
]),
|
|
3722
3716
|
default: W(() => [
|
|
3723
|
-
f(
|
|
3717
|
+
f(v) ? te(h.$slots, f(v), ae({
|
|
3724
3718
|
key: 0,
|
|
3725
3719
|
ref_for: !0
|
|
3726
|
-
},
|
|
3720
|
+
}, A(v)), void 0, !0) : h.editing && !v.readonly ? (I(), H(Vn, {
|
|
3727
3721
|
key: 1,
|
|
3728
|
-
field:
|
|
3729
|
-
"model-value": o.value[
|
|
3722
|
+
field: v,
|
|
3723
|
+
"model-value": o.value[v.code],
|
|
3730
3724
|
section: h.section,
|
|
3731
|
-
onLoadOptions: (
|
|
3732
|
-
"onUpdate:modelValue": (
|
|
3725
|
+
onLoadOptions: (O) => $(v, O),
|
|
3726
|
+
"onUpdate:modelValue": (O) => i(v, O)
|
|
3733
3727
|
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
3734
3728
|
key: 2,
|
|
3735
|
-
field:
|
|
3736
|
-
value: o.value[
|
|
3729
|
+
field: v,
|
|
3730
|
+
value: o.value[v.code],
|
|
3737
3731
|
section: h.section
|
|
3738
3732
|
}, null, 8, ["field", "value", "section"]))
|
|
3739
3733
|
]),
|
|
@@ -3746,13 +3740,13 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3746
3740
|
}, 8, ["model"]);
|
|
3747
3741
|
};
|
|
3748
3742
|
}
|
|
3749
|
-
}), $a = /* @__PURE__ */ be(Ia, [["__scopeId", "data-v-
|
|
3743
|
+
}), $a = /* @__PURE__ */ be(Ia, [["__scopeId", "data-v-291cb2b3"]]), Ca = /* @__PURE__ */ pe({
|
|
3750
3744
|
name: "GlobalInfoDeleteConfirm",
|
|
3751
3745
|
__name: "GlobalInfoDeleteConfirm",
|
|
3752
3746
|
props: {
|
|
3753
|
-
title: { default:
|
|
3754
|
-
confirmText: { default:
|
|
3755
|
-
cancelText: { default:
|
|
3747
|
+
title: { default: X("common.确认删除吗?") },
|
|
3748
|
+
confirmText: { default: X("common.确认") },
|
|
3749
|
+
cancelText: { default: X("common.取消") }
|
|
3756
3750
|
},
|
|
3757
3751
|
emits: ["confirm", "cancel"],
|
|
3758
3752
|
setup(e) {
|
|
@@ -3791,10 +3785,10 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3791
3785
|
renderConfig: {}
|
|
3792
3786
|
},
|
|
3793
3787
|
setup(e) {
|
|
3794
|
-
const t = e, n =
|
|
3788
|
+
const t = e, n = Le(), o = M(
|
|
3795
3789
|
() => t.section.fields.some((d) => jt(d))
|
|
3796
3790
|
), r = M(() => o.value), c = M(
|
|
3797
|
-
() => t.renderConfig?.sequenceLabel ??
|
|
3791
|
+
() => t.renderConfig?.sequenceLabel ?? X("common.序号")
|
|
3798
3792
|
), s = M(
|
|
3799
3793
|
() => t.renderConfig?.sequenceWidth ?? 56
|
|
3800
3794
|
), i = M(() => {
|
|
@@ -3810,7 +3804,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3810
3804
|
return r.value ? d.filter((u) => !re(u)) : d;
|
|
3811
3805
|
}), l = /* @__PURE__ */ new Map(), g = ln(
|
|
3812
3806
|
async (d, u, _) => t.actions.loadFieldOptions(t.section, d, u, _),
|
|
3813
|
-
(d, u) => `${t.section.key}:${
|
|
3807
|
+
(d, u) => `${t.section.key}:${F(u)}:${E(d)}`
|
|
3814
3808
|
);
|
|
3815
3809
|
function w(d) {
|
|
3816
3810
|
t.actions.deleteRow(t.section, d);
|
|
@@ -3826,129 +3820,130 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3826
3820
|
actions: t.actions
|
|
3827
3821
|
}) : d.allowDelete !== !1);
|
|
3828
3822
|
}
|
|
3829
|
-
function
|
|
3830
|
-
const P = t.section.rows.slice(),
|
|
3823
|
+
function j(d, u, _, L) {
|
|
3824
|
+
const P = t.section.rows.slice(), x = _.cascadeClearFields ?? [], q = {
|
|
3831
3825
|
...d,
|
|
3832
|
-
__rowKey:
|
|
3833
|
-
[_.code]:
|
|
3826
|
+
__rowKey: F(d),
|
|
3827
|
+
[_.code]: L
|
|
3834
3828
|
};
|
|
3835
|
-
|
|
3836
|
-
G
|
|
3829
|
+
x.forEach((G) => {
|
|
3830
|
+
q[G] = "";
|
|
3837
3831
|
}), P[u] = {
|
|
3838
|
-
...
|
|
3839
|
-
}, t.actions.updateTableRows(t.section, P),
|
|
3832
|
+
...q
|
|
3833
|
+
}, t.actions.updateTableRows(t.section, P), A(_, L, q, u, P), y(_, q);
|
|
3840
3834
|
}
|
|
3841
|
-
function
|
|
3842
|
-
const
|
|
3843
|
-
if (
|
|
3835
|
+
function A(d, u, _, L, P) {
|
|
3836
|
+
const x = t.renderConfig?.onFieldBusinessChange;
|
|
3837
|
+
if (x)
|
|
3844
3838
|
try {
|
|
3845
|
-
const
|
|
3839
|
+
const q = f(d, u), G = { ...t.section.model, ..._ }, Q = {
|
|
3846
3840
|
field: d,
|
|
3847
3841
|
value: u,
|
|
3848
3842
|
section: t.section,
|
|
3849
|
-
model:
|
|
3850
|
-
values:
|
|
3843
|
+
model: G,
|
|
3844
|
+
values: G,
|
|
3851
3845
|
row: _,
|
|
3852
|
-
rowIndex:
|
|
3846
|
+
rowIndex: L,
|
|
3853
3847
|
rows: P,
|
|
3854
3848
|
node: t.node,
|
|
3855
3849
|
activeNode: t.node,
|
|
3856
3850
|
sections: S(),
|
|
3857
3851
|
sectionValues: k(t.section, P),
|
|
3858
3852
|
actions: t.actions,
|
|
3859
|
-
selectedOption:
|
|
3860
|
-
selectedOptions:
|
|
3853
|
+
selectedOption: q[0],
|
|
3854
|
+
selectedOptions: q
|
|
3861
3855
|
};
|
|
3862
|
-
Promise.resolve(
|
|
3856
|
+
Promise.resolve(x(Q)).catch((T) => {
|
|
3863
3857
|
console.error(
|
|
3864
3858
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3865
3859
|
T
|
|
3866
3860
|
);
|
|
3867
3861
|
});
|
|
3868
|
-
} catch (
|
|
3862
|
+
} catch (q) {
|
|
3869
3863
|
console.error(
|
|
3870
3864
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3871
|
-
|
|
3865
|
+
q
|
|
3872
3866
|
);
|
|
3873
3867
|
}
|
|
3874
3868
|
}
|
|
3875
3869
|
function f(d, u) {
|
|
3876
3870
|
const _ = dt(d, u);
|
|
3877
3871
|
return (d.options ?? []).filter(
|
|
3878
|
-
(
|
|
3872
|
+
(L) => _.some((P) => Ze(L, P))
|
|
3879
3873
|
);
|
|
3880
3874
|
}
|
|
3881
3875
|
function S() {
|
|
3882
3876
|
return Object.values(t.state.sectionMap);
|
|
3883
3877
|
}
|
|
3884
3878
|
function k(d, u) {
|
|
3885
|
-
const
|
|
3886
|
-
const
|
|
3879
|
+
const L = S().flatMap((P) => {
|
|
3880
|
+
const x = P.key === d.key ? u : P.renderType === "table" ? P.rows : P.model;
|
|
3887
3881
|
return [
|
|
3888
3882
|
P.key,
|
|
3889
3883
|
P.id,
|
|
3890
3884
|
P.setId,
|
|
3891
3885
|
P.infSetId,
|
|
3892
3886
|
P.code
|
|
3893
|
-
].filter(Boolean).map((
|
|
3887
|
+
].filter(Boolean).map((q) => [String(q), x]);
|
|
3894
3888
|
});
|
|
3895
|
-
return Object.fromEntries(
|
|
3889
|
+
return Object.fromEntries(L);
|
|
3896
3890
|
}
|
|
3897
|
-
async function R(d, u, _ = {},
|
|
3898
|
-
const P =
|
|
3891
|
+
async function R(d, u, _ = {}, L = u) {
|
|
3892
|
+
const P = F(L), x = `${P}:${E(d)}`, q = st(
|
|
3899
3893
|
t.section.key,
|
|
3900
3894
|
d,
|
|
3901
|
-
|
|
3895
|
+
L,
|
|
3902
3896
|
P
|
|
3903
|
-
),
|
|
3904
|
-
if (!An(_) && lt(d,
|
|
3905
|
-
l.set(
|
|
3897
|
+
), G = l.get(x);
|
|
3898
|
+
if (!An(_) && lt(d, G, q)) {
|
|
3899
|
+
l.set(x, q);
|
|
3906
3900
|
return;
|
|
3907
3901
|
}
|
|
3908
3902
|
try {
|
|
3909
3903
|
if (_.searchText !== void 0) {
|
|
3910
|
-
await g(d,
|
|
3904
|
+
await g(d, L, _);
|
|
3911
3905
|
return;
|
|
3912
3906
|
}
|
|
3913
3907
|
await t.actions.loadFieldOptions(
|
|
3914
3908
|
t.section,
|
|
3915
3909
|
d,
|
|
3916
|
-
|
|
3910
|
+
L,
|
|
3917
3911
|
_
|
|
3918
|
-
), l.set(
|
|
3912
|
+
), l.set(x, q);
|
|
3919
3913
|
} catch (T) {
|
|
3920
3914
|
console.error("[GlobalInfoTableRenderer] load field options failed", T);
|
|
3921
3915
|
}
|
|
3922
3916
|
}
|
|
3923
3917
|
async function y(d, u) {
|
|
3924
|
-
const _ = u ? [u] : t.section.rows;
|
|
3925
|
-
for (const
|
|
3926
|
-
const
|
|
3927
|
-
for (const
|
|
3928
|
-
if (d && !Nn(
|
|
3918
|
+
const _ = u ? [u] : t.section.rows, L = [];
|
|
3919
|
+
for (const P of _) {
|
|
3920
|
+
const x = F(P);
|
|
3921
|
+
for (const q of a.value) {
|
|
3922
|
+
if (d && !Nn(q, d))
|
|
3929
3923
|
continue;
|
|
3930
|
-
const G = zn(
|
|
3931
|
-
if (!
|
|
3932
|
-
const
|
|
3924
|
+
const G = zn(q, P);
|
|
3925
|
+
if (!V(q, G)) continue;
|
|
3926
|
+
const Q = st(
|
|
3933
3927
|
t.section.key,
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
),
|
|
3938
|
-
if (lt(
|
|
3939
|
-
l.set(
|
|
3928
|
+
q,
|
|
3929
|
+
P,
|
|
3930
|
+
x
|
|
3931
|
+
), T = `${x}:${E(q)}`, Z = l.get(T);
|
|
3932
|
+
if (lt(q, Z, Q)) {
|
|
3933
|
+
l.set(T, Q);
|
|
3940
3934
|
continue;
|
|
3941
3935
|
}
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
qn(
|
|
3946
|
-
);
|
|
3936
|
+
Z !== Q && L.push(R(
|
|
3937
|
+
q,
|
|
3938
|
+
P,
|
|
3939
|
+
qn(q, G)
|
|
3940
|
+
));
|
|
3947
3941
|
}
|
|
3948
3942
|
}
|
|
3943
|
+
await Promise.allSettled(L);
|
|
3949
3944
|
}
|
|
3950
3945
|
function h(d, u, _) {
|
|
3951
|
-
const
|
|
3946
|
+
const L = u[d.code];
|
|
3952
3947
|
return {
|
|
3953
3948
|
field: d,
|
|
3954
3949
|
section: t.section,
|
|
@@ -3957,40 +3952,40 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3957
3952
|
row: u,
|
|
3958
3953
|
rowIndex: _,
|
|
3959
3954
|
editing: t.editing,
|
|
3960
|
-
modelValue:
|
|
3961
|
-
value:
|
|
3955
|
+
modelValue: L,
|
|
3956
|
+
value: L,
|
|
3962
3957
|
state: t.state,
|
|
3963
3958
|
actions: t.actions,
|
|
3964
|
-
updateModelValue: (P) =>
|
|
3959
|
+
updateModelValue: (P) => j(u, _, d, P)
|
|
3965
3960
|
};
|
|
3966
3961
|
}
|
|
3967
3962
|
function D(d) {
|
|
3968
3963
|
const u = String(d.code || "").trim(), _ = u ? `field-${u}` : "";
|
|
3969
3964
|
if (_ && n[_]) return _;
|
|
3970
|
-
const
|
|
3971
|
-
if (
|
|
3972
|
-
const P = String(d.raw?.type || d.fieldType || d.type || "").trim(),
|
|
3973
|
-
if (
|
|
3974
|
-
const
|
|
3975
|
-
return
|
|
3965
|
+
const L = _.toLowerCase();
|
|
3966
|
+
if (L !== _ && n[L]) return L;
|
|
3967
|
+
const P = String(d.raw?.type || d.fieldType || d.type || "").trim(), x = P ? `field-type-${P}` : "";
|
|
3968
|
+
if (x && n[x]) return x;
|
|
3969
|
+
const q = x.toLowerCase();
|
|
3970
|
+
return q !== x && n[q] ? q : "";
|
|
3976
3971
|
}
|
|
3977
3972
|
function b(d) {
|
|
3978
3973
|
return !d.readonly && !d.disabled;
|
|
3979
3974
|
}
|
|
3980
|
-
function
|
|
3975
|
+
function V(d, u) {
|
|
3981
3976
|
return Rn(d, u, t.editing);
|
|
3982
3977
|
}
|
|
3983
|
-
function
|
|
3978
|
+
function v(d) {
|
|
3984
3979
|
return d.width ?? (Vt(d) ? 56 : void 0);
|
|
3985
3980
|
}
|
|
3986
|
-
function
|
|
3981
|
+
function O(d) {
|
|
3987
3982
|
if (!d.width)
|
|
3988
3983
|
return d.minWidth ?? (Vt(d) ? 56 : void 0);
|
|
3989
3984
|
}
|
|
3990
3985
|
function E(d) {
|
|
3991
3986
|
return d.key || d.id || d.code;
|
|
3992
3987
|
}
|
|
3993
|
-
function
|
|
3988
|
+
function z(d) {
|
|
3994
3989
|
return i.value + d;
|
|
3995
3990
|
}
|
|
3996
3991
|
function re(d) {
|
|
@@ -3998,42 +3993,36 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
3998
3993
|
}
|
|
3999
3994
|
let le = 0;
|
|
4000
3995
|
const N = /* @__PURE__ */ new WeakMap();
|
|
4001
|
-
function
|
|
3996
|
+
function F(d) {
|
|
4002
3997
|
const u = d.__rowKey ?? d.key ?? d.id ?? d.setId ?? d.infSetId;
|
|
4003
3998
|
if (u != null && u !== "")
|
|
4004
3999
|
return String(u);
|
|
4005
|
-
const _ = d,
|
|
4006
|
-
if (
|
|
4000
|
+
const _ = d, L = N.get(_);
|
|
4001
|
+
if (L) return L;
|
|
4007
4002
|
le += 1;
|
|
4008
4003
|
const P = `local-${le}`;
|
|
4009
4004
|
return N.set(_, P), P;
|
|
4010
4005
|
}
|
|
4011
|
-
function
|
|
4006
|
+
function B(d) {
|
|
4012
4007
|
return d.required || d.isRequired;
|
|
4013
4008
|
}
|
|
4014
|
-
return
|
|
4009
|
+
return je(
|
|
4015
4010
|
() => t.section.key,
|
|
4016
4011
|
() => {
|
|
4017
4012
|
l.clear();
|
|
4018
4013
|
}
|
|
4019
|
-
), Le(
|
|
4020
|
-
() => t.editing,
|
|
4021
|
-
() => {
|
|
4022
|
-
y();
|
|
4023
|
-
},
|
|
4024
|
-
{ immediate: !0 }
|
|
4025
4014
|
), (d, u) => {
|
|
4026
|
-
const _ = on,
|
|
4015
|
+
const _ = on, L = eo("Delete"), P = Jt, x = Ct, q = nn;
|
|
4027
4016
|
return I(), K("div", {
|
|
4028
4017
|
class: We(["global-info-table-renderer", { "global-info-table-renderer--editing": d.editing }])
|
|
4029
4018
|
}, [
|
|
4030
4019
|
ne("div", ka, [
|
|
4031
|
-
ke(
|
|
4020
|
+
ke(q, {
|
|
4032
4021
|
class: "global-info-table-renderer__table",
|
|
4033
4022
|
data: d.section.rows,
|
|
4034
4023
|
fit: !0,
|
|
4035
4024
|
"table-layout": "auto",
|
|
4036
|
-
"row-key":
|
|
4025
|
+
"row-key": F
|
|
4037
4026
|
}, {
|
|
4038
4027
|
default: W(() => [
|
|
4039
4028
|
r.value ? (I(), H(_, {
|
|
@@ -4041,38 +4030,38 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4041
4030
|
type: "index",
|
|
4042
4031
|
label: c.value,
|
|
4043
4032
|
width: s.value,
|
|
4044
|
-
index:
|
|
4033
|
+
index: z
|
|
4045
4034
|
}, null, 8, ["label", "width"])) : fe("", !0),
|
|
4046
|
-
(I(!0), K(Se, null, ye(a.value, (
|
|
4047
|
-
key: E(
|
|
4048
|
-
prop:
|
|
4049
|
-
label:
|
|
4050
|
-
width:
|
|
4051
|
-
"min-width":
|
|
4035
|
+
(I(!0), K(Se, null, ye(a.value, (G) => (I(), H(_, {
|
|
4036
|
+
key: E(G),
|
|
4037
|
+
prop: G.code,
|
|
4038
|
+
label: G.label,
|
|
4039
|
+
width: v(G),
|
|
4040
|
+
"min-width": O(G)
|
|
4052
4041
|
}, {
|
|
4053
4042
|
header: W(() => [
|
|
4054
4043
|
ne("span", Ta, [
|
|
4055
|
-
|
|
4056
|
-
ne("span", null, oe(
|
|
4044
|
+
B(G) ? (I(), K("span", Ma, "*")) : fe("", !0),
|
|
4045
|
+
ne("span", null, oe(G.label), 1)
|
|
4057
4046
|
])
|
|
4058
4047
|
]),
|
|
4059
4048
|
default: W(({ row: Q, $index: T }) => [
|
|
4060
|
-
D(
|
|
4049
|
+
D(G) ? te(d.$slots, D(G), ae({
|
|
4061
4050
|
key: 0,
|
|
4062
4051
|
ref_for: !0
|
|
4063
|
-
}, h(
|
|
4052
|
+
}, h(G, Q, T)), void 0, !0) : d.editing && b(G) ? (I(), H(Vn, {
|
|
4064
4053
|
key: 1,
|
|
4065
|
-
field:
|
|
4066
|
-
"model-value": Q[
|
|
4054
|
+
field: G,
|
|
4055
|
+
"model-value": Q[G.code],
|
|
4067
4056
|
section: d.section,
|
|
4068
4057
|
row: Q,
|
|
4069
4058
|
"row-index": T,
|
|
4070
|
-
onLoadOptions: (
|
|
4071
|
-
"onUpdate:modelValue": (
|
|
4059
|
+
onLoadOptions: (Z) => R(G, Q, Z),
|
|
4060
|
+
"onUpdate:modelValue": (Z) => j(Q, T, G, Z)
|
|
4072
4061
|
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
4073
4062
|
key: 2,
|
|
4074
|
-
field:
|
|
4075
|
-
value: Q[
|
|
4063
|
+
field: G,
|
|
4064
|
+
value: Q[G.code],
|
|
4076
4065
|
section: d.section,
|
|
4077
4066
|
row: Q,
|
|
4078
4067
|
"row-index": T
|
|
@@ -4082,17 +4071,17 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4082
4071
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
4083
4072
|
d.editing ? (I(), H(_, {
|
|
4084
4073
|
key: 1,
|
|
4085
|
-
label: J(
|
|
4074
|
+
label: J(X)("common.操作"),
|
|
4086
4075
|
width: "104",
|
|
4087
4076
|
fixed: "right"
|
|
4088
4077
|
}, {
|
|
4089
|
-
default: W(({ row:
|
|
4090
|
-
$(
|
|
4078
|
+
default: W(({ row: G, $index: Q }) => [
|
|
4079
|
+
$(G, Q) ? (I(), H(Ca, {
|
|
4091
4080
|
key: 0,
|
|
4092
4081
|
onConfirm: (T) => w(Q)
|
|
4093
4082
|
}, {
|
|
4094
4083
|
default: W(() => [
|
|
4095
|
-
ke(
|
|
4084
|
+
ke(x, {
|
|
4096
4085
|
class: "global-info-table-renderer__delete",
|
|
4097
4086
|
link: "",
|
|
4098
4087
|
type: "danger"
|
|
@@ -4100,11 +4089,11 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4100
4089
|
default: W(() => [
|
|
4101
4090
|
ke(P, { class: "global-info-table-renderer__delete-icon" }, {
|
|
4102
4091
|
default: W(() => [
|
|
4103
|
-
ke(
|
|
4092
|
+
ke(L)
|
|
4104
4093
|
]),
|
|
4105
4094
|
_: 1
|
|
4106
4095
|
}),
|
|
4107
|
-
Ue(oe(J(
|
|
4096
|
+
Ue(oe(J(X)("common.删除")), 1)
|
|
4108
4097
|
]),
|
|
4109
4098
|
_: 1
|
|
4110
4099
|
})
|
|
@@ -4121,7 +4110,7 @@ const Sa = { class: "global-info-form-renderer__grid" }, _a = { class: "global-i
|
|
|
4121
4110
|
], 2);
|
|
4122
4111
|
};
|
|
4123
4112
|
}
|
|
4124
|
-
}), Da = /* @__PURE__ */ be(Oa, [["__scopeId", "data-v-
|
|
4113
|
+
}), Da = /* @__PURE__ */ be(Oa, [["__scopeId", "data-v-d5384101"]]), Fa = /* @__PURE__ */ pe({
|
|
4125
4114
|
name: "GlobalInfoAutoRenderer",
|
|
4126
4115
|
__name: "GlobalInfoAutoRenderer",
|
|
4127
4116
|
props: {
|
|
@@ -4180,7 +4169,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4180
4169
|
renderConfig: {}
|
|
4181
4170
|
},
|
|
4182
4171
|
setup(e) {
|
|
4183
|
-
const t = e, n =
|
|
4172
|
+
const t = e, n = Le(), o = M(() => ft(
|
|
4184
4173
|
t.section.fields,
|
|
4185
4174
|
t.section,
|
|
4186
4175
|
t.renderConfig,
|
|
@@ -4242,7 +4231,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4242
4231
|
},
|
|
4243
4232
|
setup(e, { emit: t, slots: n }) {
|
|
4244
4233
|
const o = ge(!1);
|
|
4245
|
-
|
|
4234
|
+
je(
|
|
4246
4235
|
() => e.boundaryKey,
|
|
4247
4236
|
() => {
|
|
4248
4237
|
o.value = !1;
|
|
@@ -4261,7 +4250,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4261
4250
|
}
|
|
4262
4251
|
};
|
|
4263
4252
|
}
|
|
4264
|
-
}),
|
|
4253
|
+
}), Pa = { class: "global-info-section-block" }, Ea = {
|
|
4265
4254
|
key: 0,
|
|
4266
4255
|
class: "global-info-section-block__header"
|
|
4267
4256
|
}, Va = { class: "global-info-section-block__title-wrap" }, ja = { class: "global-info-section-block__title" }, Aa = {
|
|
@@ -4281,17 +4270,17 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4281
4270
|
onSave: { type: Function }
|
|
4282
4271
|
},
|
|
4283
4272
|
setup(e) {
|
|
4284
|
-
const t = e, n =
|
|
4273
|
+
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
4274
|
() => t.actions.getSection(t.node) ?? c.value
|
|
4286
4275
|
), l = M(() => {
|
|
4287
|
-
const
|
|
4288
|
-
return
|
|
4289
|
-
|
|
4290
|
-
|
|
4276
|
+
const v = a.value;
|
|
4277
|
+
return v ? ft(
|
|
4278
|
+
v.fields,
|
|
4279
|
+
v,
|
|
4291
4280
|
t.renderConfig,
|
|
4292
4281
|
{
|
|
4293
|
-
values:
|
|
4294
|
-
rows:
|
|
4282
|
+
values: v.model,
|
|
4283
|
+
rows: v.renderType === "table" ? v.rows : void 0
|
|
4295
4284
|
}
|
|
4296
4285
|
) : [];
|
|
4297
4286
|
}), g = M(
|
|
@@ -4300,11 +4289,11 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4300
4289
|
() => !!(a.value && t.actions.isEditing(a.value))
|
|
4301
4290
|
), $ = M(
|
|
4302
4291
|
() => a.value?.renderType === "table"
|
|
4303
|
-
),
|
|
4292
|
+
), j = M(() => o.value || i.value.loading), A = M(
|
|
4304
4293
|
() => k(r.value || i.value.error)
|
|
4305
4294
|
), f = M(() => {
|
|
4306
|
-
const
|
|
4307
|
-
return
|
|
4295
|
+
const v = a.value;
|
|
4296
|
+
return v ? v.renderType === "table" && v.rows.length === 0 || l.value.length === 0 : !0;
|
|
4308
4297
|
}), S = M(() => ({
|
|
4309
4298
|
node: t.node,
|
|
4310
4299
|
section: a.value,
|
|
@@ -4313,83 +4302,83 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4313
4302
|
renderConfig: t.renderConfig,
|
|
4314
4303
|
title: g.value,
|
|
4315
4304
|
editing: w.value,
|
|
4316
|
-
loading:
|
|
4305
|
+
loading: j.value,
|
|
4317
4306
|
error: r.value || i.value.error,
|
|
4318
|
-
errorMessage:
|
|
4307
|
+
errorMessage: A.value,
|
|
4319
4308
|
isEmpty: f.value,
|
|
4320
4309
|
empty: f.value,
|
|
4321
4310
|
sectionStatus: i.value,
|
|
4322
4311
|
state: t.state,
|
|
4323
4312
|
actions: t.actions,
|
|
4324
|
-
reload:
|
|
4313
|
+
reload: V,
|
|
4325
4314
|
handleEdit: R,
|
|
4326
4315
|
handleCancel: y,
|
|
4327
4316
|
handleAddTableRow: h,
|
|
4328
4317
|
handleSave: D
|
|
4329
4318
|
}));
|
|
4330
|
-
function k(
|
|
4331
|
-
return
|
|
4319
|
+
function k(v) {
|
|
4320
|
+
return v ? v instanceof Error ? v.message : String(v) : "";
|
|
4332
4321
|
}
|
|
4333
4322
|
async function R() {
|
|
4334
|
-
const
|
|
4335
|
-
|
|
4323
|
+
const v = a.value;
|
|
4324
|
+
v && (await t.onEdit?.(v, t.node), t.onEdit || t.actions.startEdit(v));
|
|
4336
4325
|
}
|
|
4337
4326
|
async function y() {
|
|
4338
|
-
const
|
|
4339
|
-
|
|
4327
|
+
const v = a.value;
|
|
4328
|
+
v && (await t.onCancel?.(v, t.node), t.onCancel || t.actions.cancelEdit(v));
|
|
4340
4329
|
}
|
|
4341
4330
|
function h() {
|
|
4342
|
-
const
|
|
4343
|
-
if (!
|
|
4344
|
-
const
|
|
4345
|
-
(E,
|
|
4331
|
+
const v = a.value;
|
|
4332
|
+
if (!v) return;
|
|
4333
|
+
const O = v.fields.reduce(
|
|
4334
|
+
(E, z) => (E[z.code] = z.value ?? "", E),
|
|
4346
4335
|
{ __rowKey: `new-${Date.now()}` }
|
|
4347
4336
|
);
|
|
4348
|
-
t.actions.saveRow(
|
|
4337
|
+
t.actions.saveRow(v, O, -1);
|
|
4349
4338
|
}
|
|
4350
4339
|
async function D() {
|
|
4351
|
-
const
|
|
4352
|
-
if (
|
|
4340
|
+
const v = a.value;
|
|
4341
|
+
if (v)
|
|
4353
4342
|
try {
|
|
4354
4343
|
if (t.onSave) {
|
|
4355
|
-
await t.onSave(
|
|
4344
|
+
await t.onSave(v, t.node);
|
|
4356
4345
|
return;
|
|
4357
4346
|
}
|
|
4358
|
-
await t.actions.saveSection(
|
|
4359
|
-
} catch (
|
|
4360
|
-
r.value =
|
|
4347
|
+
await t.actions.saveSection(v);
|
|
4348
|
+
} catch (O) {
|
|
4349
|
+
r.value = O, console.error("[GlobalInfoSectionBlock] save section failed", O);
|
|
4361
4350
|
}
|
|
4362
4351
|
}
|
|
4363
|
-
function b(
|
|
4364
|
-
r.value =
|
|
4352
|
+
function b(v) {
|
|
4353
|
+
r.value = v;
|
|
4365
4354
|
}
|
|
4366
|
-
async function
|
|
4355
|
+
async function V() {
|
|
4367
4356
|
o.value = !0, r.value = null, c.value = null;
|
|
4368
4357
|
try {
|
|
4369
4358
|
c.value = await t.actions.loadSection(t.node);
|
|
4370
|
-
} catch (
|
|
4371
|
-
r.value =
|
|
4359
|
+
} catch (v) {
|
|
4360
|
+
r.value = v, console.error("[GlobalInfoSectionBlock] load section failed", v);
|
|
4372
4361
|
} finally {
|
|
4373
4362
|
o.value = !1;
|
|
4374
4363
|
}
|
|
4375
4364
|
}
|
|
4376
4365
|
return Ut(() => {
|
|
4377
|
-
|
|
4378
|
-
}),
|
|
4366
|
+
V();
|
|
4367
|
+
}), je(
|
|
4379
4368
|
() => t.node.key,
|
|
4380
4369
|
() => {
|
|
4381
|
-
|
|
4370
|
+
V();
|
|
4382
4371
|
}
|
|
4383
|
-
), (
|
|
4372
|
+
), (v, O) => {
|
|
4384
4373
|
const E = Ct;
|
|
4385
|
-
return I(), K("section",
|
|
4386
|
-
s.value ? fe("", !0) : (I(), K("header",
|
|
4387
|
-
te(
|
|
4374
|
+
return I(), K("section", Pa, [
|
|
4375
|
+
s.value ? fe("", !0) : (I(), K("header", Ea, [
|
|
4376
|
+
te(v.$slots, "header", Oe(Be(S.value)), () => [
|
|
4388
4377
|
ne("div", Va, [
|
|
4389
|
-
|
|
4378
|
+
O[0] || (O[0] = ne("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4390
4379
|
ne("h3", ja, oe(g.value), 1)
|
|
4391
4380
|
]),
|
|
4392
|
-
te(
|
|
4381
|
+
te(v.$slots, "actions", Oe(Be(S.value)), () => [
|
|
4393
4382
|
a.value ? (I(), K("div", Aa, [
|
|
4394
4383
|
w.value ? (I(), K(Se, { key: 1 }, [
|
|
4395
4384
|
ke(E, {
|
|
@@ -4398,7 +4387,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4398
4387
|
onClick: y
|
|
4399
4388
|
}, {
|
|
4400
4389
|
default: W(() => [
|
|
4401
|
-
Ue(oe(J(
|
|
4390
|
+
Ue(oe(J(X)("common.取消")), 1)
|
|
4402
4391
|
]),
|
|
4403
4392
|
_: 1
|
|
4404
4393
|
}, 8, ["disabled"]),
|
|
@@ -4409,7 +4398,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4409
4398
|
onClick: h
|
|
4410
4399
|
}, {
|
|
4411
4400
|
default: W(() => [
|
|
4412
|
-
Ue(oe(J(
|
|
4401
|
+
Ue(oe(J(X)("common.新增")), 1)
|
|
4413
4402
|
]),
|
|
4414
4403
|
_: 1
|
|
4415
4404
|
}, 8, ["disabled"])) : fe("", !0),
|
|
@@ -4419,18 +4408,18 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4419
4408
|
onClick: D
|
|
4420
4409
|
}, {
|
|
4421
4410
|
default: W(() => [
|
|
4422
|
-
Ue(oe($.value ? J(
|
|
4411
|
+
Ue(oe($.value ? J(X)("common.确认") : J(X)("common.保存")), 1)
|
|
4423
4412
|
]),
|
|
4424
4413
|
_: 1
|
|
4425
4414
|
}, 8, ["loading"])
|
|
4426
4415
|
], 64)) : (I(), H(E, {
|
|
4427
4416
|
key: 0,
|
|
4428
4417
|
class: "global-info-section-block__edit",
|
|
4429
|
-
disabled: i.value.saving ||
|
|
4418
|
+
disabled: i.value.saving || j.value,
|
|
4430
4419
|
onClick: R
|
|
4431
4420
|
}, {
|
|
4432
4421
|
default: W(() => [
|
|
4433
|
-
|
|
4422
|
+
O[1] || (O[1] = ne("svg", {
|
|
4434
4423
|
class: "global-info-section-block__edit-icon",
|
|
4435
4424
|
viewBox: "0 0 12 12",
|
|
4436
4425
|
"aria-hidden": "true",
|
|
@@ -4441,7 +4430,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4441
4430
|
fill: "currentColor"
|
|
4442
4431
|
})
|
|
4443
4432
|
], -1)),
|
|
4444
|
-
ne("span", null, oe(J(
|
|
4433
|
+
ne("span", null, oe(J(X)("common.编辑")), 1)
|
|
4445
4434
|
]),
|
|
4446
4435
|
_: 1
|
|
4447
4436
|
}, 8, ["disabled"]))
|
|
@@ -4450,34 +4439,34 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4450
4439
|
], !0)
|
|
4451
4440
|
])),
|
|
4452
4441
|
ne("div", Na, [
|
|
4453
|
-
|
|
4454
|
-
ne("div", Ra, oe(J(
|
|
4455
|
-
], !0) : !a.value || f.value ? te(
|
|
4456
|
-
ne("div", za, oe(J(
|
|
4442
|
+
j.value ? te(v.$slots, "loading", Oe(ae({ key: 0 }, S.value)), () => [
|
|
4443
|
+
ne("div", Ra, oe(J(X)("common.加载中___")), 1)
|
|
4444
|
+
], !0) : !a.value || f.value ? te(v.$slots, "empty", Oe(ae({ key: 1 }, S.value)), () => [
|
|
4445
|
+
ne("div", za, oe(J(X)("common.暂无数据")), 1)
|
|
4457
4446
|
], !0) : (I(), H(La, {
|
|
4458
4447
|
key: 2,
|
|
4459
|
-
"boundary-key":
|
|
4448
|
+
"boundary-key": v.node.key,
|
|
4460
4449
|
label: g.value,
|
|
4461
4450
|
onError: b
|
|
4462
4451
|
}, {
|
|
4463
4452
|
fallback: W(() => [
|
|
4464
|
-
te(
|
|
4465
|
-
ne("div", qa, oe(J(
|
|
4453
|
+
te(v.$slots, "empty", Oe(Be(S.value)), () => [
|
|
4454
|
+
ne("div", qa, oe(J(X)("common.暂无数据")), 1)
|
|
4466
4455
|
], !0)
|
|
4467
4456
|
]),
|
|
4468
4457
|
default: W(() => [
|
|
4469
4458
|
ke(Ba, {
|
|
4470
4459
|
section: a.value,
|
|
4471
|
-
node:
|
|
4460
|
+
node: v.node,
|
|
4472
4461
|
editing: w.value,
|
|
4473
|
-
state:
|
|
4474
|
-
actions:
|
|
4475
|
-
"render-config":
|
|
4462
|
+
state: v.state,
|
|
4463
|
+
actions: v.actions,
|
|
4464
|
+
"render-config": v.renderConfig
|
|
4476
4465
|
}, Ne({ _: 2 }, [
|
|
4477
|
-
ye(J(n), (
|
|
4466
|
+
ye(J(n), (z, re) => ({
|
|
4478
4467
|
name: re,
|
|
4479
4468
|
fn: W((le) => [
|
|
4480
|
-
te(
|
|
4469
|
+
te(v.$slots, re, Oe(Be({ ...S.value, ...le })), void 0, !0)
|
|
4481
4470
|
])
|
|
4482
4471
|
}))
|
|
4483
4472
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4500,7 +4489,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4500
4489
|
renderConfig: {}
|
|
4501
4490
|
},
|
|
4502
4491
|
setup(e) {
|
|
4503
|
-
const t = e, n =
|
|
4492
|
+
const t = e, n = Le(), o = M(
|
|
4504
4493
|
() => t.group.tagName || t.group.label || "-"
|
|
4505
4494
|
), r = M(() => t.children.length <= 1);
|
|
4506
4495
|
function c(l, g) {
|
|
@@ -4583,10 +4572,10 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4583
4572
|
"hide-header": r.value,
|
|
4584
4573
|
"render-config": l.renderConfig
|
|
4585
4574
|
}, Ne({ _: 2 }, [
|
|
4586
|
-
ye(J(n), (
|
|
4587
|
-
name:
|
|
4575
|
+
ye(J(n), (j, A) => ({
|
|
4576
|
+
name: A,
|
|
4588
4577
|
fn: W((f) => [
|
|
4589
|
-
te(l.$slots,
|
|
4578
|
+
te(l.$slots, A, ae({ ref_for: !0 }, f), void 0, !0)
|
|
4590
4579
|
])
|
|
4591
4580
|
}))
|
|
4592
4581
|
]), 1032, ["node", "state", "actions", "hide-header", "render-config"]))
|
|
@@ -4601,7 +4590,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4601
4590
|
index: -1,
|
|
4602
4591
|
renderConfig: l.renderConfig
|
|
4603
4592
|
}, () => [
|
|
4604
|
-
ne("div", Wa, oe(J(
|
|
4593
|
+
ne("div", Wa, oe(J(X)("common.暂无数据")), 1)
|
|
4605
4594
|
], !0) : fe("", !0)
|
|
4606
4595
|
], 64))
|
|
4607
4596
|
])
|
|
@@ -4617,20 +4606,20 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4617
4606
|
renderConfig: {}
|
|
4618
4607
|
},
|
|
4619
4608
|
setup(e) {
|
|
4620
|
-
const t = e, n =
|
|
4609
|
+
const t = e, n = Le(), o = M(() => {
|
|
4621
4610
|
const g = t.nodes.filter(
|
|
4622
4611
|
(k) => r(k).length > 0
|
|
4623
|
-
), w = t.nodes.filter((k) => r(k).length === 0), $ = w.filter((k) => c(k)),
|
|
4612
|
+
), 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
4613
|
group: k,
|
|
4625
4614
|
children: r(k)
|
|
4626
4615
|
})), f = $.map((k) => ({
|
|
4627
4616
|
group: k,
|
|
4628
4617
|
children: [k]
|
|
4629
4618
|
}));
|
|
4630
|
-
if (
|
|
4631
|
-
return $.length > 0 ? f : l(
|
|
4632
|
-
const S = l(
|
|
4633
|
-
return [...
|
|
4619
|
+
if (A.length === 0)
|
|
4620
|
+
return $.length > 0 ? f : l(j);
|
|
4621
|
+
const S = l(j);
|
|
4622
|
+
return [...A, ...f, ...S];
|
|
4634
4623
|
});
|
|
4635
4624
|
function r(g) {
|
|
4636
4625
|
return g.children ?? [];
|
|
@@ -4645,8 +4634,8 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4645
4634
|
return g.key || g.id || g.tagId || `${w}`;
|
|
4646
4635
|
}
|
|
4647
4636
|
function a(g) {
|
|
4648
|
-
const w = g[0], $ = w?.raw ?? {},
|
|
4649
|
-
$.parentTagName || $.parentName || $.parentLabel || w?.parentId ||
|
|
4637
|
+
const w = g[0], $ = w?.raw ?? {}, j = String(
|
|
4638
|
+
$.parentTagName || $.parentName || $.parentLabel || w?.parentId || X("common.信息")
|
|
4650
4639
|
);
|
|
4651
4640
|
return {
|
|
4652
4641
|
...w,
|
|
@@ -4657,26 +4646,26 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4657
4646
|
tagId: String(
|
|
4658
4647
|
w?.parentTagId || w?.parentId || w?.tagId || "global-info-group"
|
|
4659
4648
|
),
|
|
4660
|
-
tagName:
|
|
4661
|
-
label:
|
|
4649
|
+
tagName: j,
|
|
4650
|
+
label: j,
|
|
4662
4651
|
children: g
|
|
4663
4652
|
};
|
|
4664
4653
|
}
|
|
4665
4654
|
function l(g) {
|
|
4666
4655
|
const w = /* @__PURE__ */ new Map();
|
|
4667
4656
|
return g.forEach(($) => {
|
|
4668
|
-
const
|
|
4657
|
+
const j = String(
|
|
4669
4658
|
$.parentId || $.parentTagId || "global-info-flat"
|
|
4670
|
-
),
|
|
4671
|
-
|
|
4659
|
+
), A = w.get(j) ?? [];
|
|
4660
|
+
A.push($), w.set(j, A);
|
|
4672
4661
|
}), Array.from(w.values()).map(($) => ({
|
|
4673
4662
|
group: a($),
|
|
4674
4663
|
children: $
|
|
4675
4664
|
}));
|
|
4676
4665
|
}
|
|
4677
4666
|
return (g, w) => (I(), K("div", Xa, [
|
|
4678
|
-
(I(!0), K(Se, null, ye(o.value, ($,
|
|
4679
|
-
key: i($.group,
|
|
4667
|
+
(I(!0), K(Se, null, ye(o.value, ($, j) => (I(), K(Se, {
|
|
4668
|
+
key: i($.group, j)
|
|
4680
4669
|
}, [
|
|
4681
4670
|
s($.group) ? te(g.$slots, s($.group), {
|
|
4682
4671
|
key: 0,
|
|
@@ -4685,7 +4674,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4685
4674
|
state: g.state,
|
|
4686
4675
|
actions: g.actions,
|
|
4687
4676
|
renderConfig: g.renderConfig,
|
|
4688
|
-
index:
|
|
4677
|
+
index: j,
|
|
4689
4678
|
isEmpty: $.children.length === 0
|
|
4690
4679
|
}, void 0, !0) : J(n).group ? te(g.$slots, "group", {
|
|
4691
4680
|
key: 1,
|
|
@@ -4694,7 +4683,7 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4694
4683
|
state: g.state,
|
|
4695
4684
|
actions: g.actions,
|
|
4696
4685
|
renderConfig: g.renderConfig,
|
|
4697
|
-
index:
|
|
4686
|
+
index: j,
|
|
4698
4687
|
isEmpty: $.children.length === 0
|
|
4699
4688
|
}, void 0, !0) : (I(), H(Qa, {
|
|
4700
4689
|
key: 2,
|
|
@@ -4703,9 +4692,9 @@ const Ba = /* @__PURE__ */ pe({
|
|
|
4703
4692
|
state: g.state,
|
|
4704
4693
|
actions: g.actions,
|
|
4705
4694
|
"render-config": g.renderConfig,
|
|
4706
|
-
index:
|
|
4695
|
+
index: j
|
|
4707
4696
|
}, Ne({ _: 2 }, [
|
|
4708
|
-
ye(J(n), (
|
|
4697
|
+
ye(J(n), (A, f) => ({
|
|
4709
4698
|
name: f,
|
|
4710
4699
|
fn: W((S) => [
|
|
4711
4700
|
te(g.$slots, f, ae({ ref_for: !0 }, S), void 0, !0)
|
|
@@ -4720,7 +4709,7 @@ function us(e, t = {}) {
|
|
|
4720
4709
|
Hn(e, t);
|
|
4721
4710
|
}
|
|
4722
4711
|
export {
|
|
4723
|
-
|
|
4712
|
+
Pn as DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE,
|
|
4724
4713
|
Fa as GlobalInfoAutoRenderer,
|
|
4725
4714
|
Ca as GlobalInfoDeleteConfirm,
|
|
4726
4715
|
Vn as GlobalInfoFieldControl,
|
|
@@ -4738,7 +4727,7 @@ export {
|
|
|
4738
4727
|
ho as JtCascader,
|
|
4739
4728
|
as as JtCrudTable,
|
|
4740
4729
|
yo as JtDatePicker,
|
|
4741
|
-
|
|
4730
|
+
Po as JtFilterBar,
|
|
4742
4731
|
$o as JtFormItems,
|
|
4743
4732
|
ht as JtInput,
|
|
4744
4733
|
ss as JtPageHeader,
|