@jt-home/mfe-components 1.0.17 → 1.0.19
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 +1238 -1227
- package/dist/style.css +1 -1
- package/dist/types/components/globalInfo/index.d.ts +1 -1
- package/dist/types/components/globalInfo/model/types.d.ts +19 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/table/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { defineComponent as ce, useAttrs as
|
|
2
|
+
import { defineComponent as ce, useAttrs as Rn, computed as V, openBlock as k, createBlock as U, mergeProps as oe, toHandlers as Ze, withCtx as J, renderSlot as ee, resolveDynamicComponent as xt, createCommentVNode as ue, ref as me, watch as Be, mergeDefaults as xn, withKeys as qn, createElementBlock as Y, Fragment as be, renderList as ve, normalizeStyle as qt, nextTick as Kn, useSlots as Le, normalizeClass as Ue, createVNode as we, withModifiers as Kt, unref as re, createSlots as je, createElementVNode as te, toDisplayString as fe, normalizeProps as Me, guardReactiveProps as Fe, useModel as pt, withDirectives as Gn, mergeModels as Mt, shallowRef as Pe, onMounted as Gt, onBeforeUnmount as Yn, createTextVNode as Ye, resolveComponent as Hn, onErrorCaptured as Un } from "vue";
|
|
3
3
|
import { ElButton as It, ElIcon as Yt, ElCascader as Jn, ElDatePicker as Ht, ElInput as Ut, ElSelect as Jt, ElOption as Wt, ElFormItem as Zt, ElForm as Qt, ElTable as Xt, ElTableColumn as en, ElPagination as Wn, ElLoadingDirective as Zn, ElInputNumber as Qn, ElSwitch as Xn, ElRow as eo, ElCol as to, ElPopconfirm as no } from "element-plus/es";
|
|
4
4
|
import { JtAttachmentPreview as Tt } from "./JtAttachmentPreview/index.mjs";
|
|
5
5
|
import { JtAttachmentPreviewByParams as Ga, setupJtAttachmentPreview as Ya } from "./JtAttachmentPreview/index.mjs";
|
|
@@ -55,35 +55,35 @@ const io = /* @__PURE__ */ ce({
|
|
|
55
55
|
tag: {}
|
|
56
56
|
},
|
|
57
57
|
setup(e) {
|
|
58
|
-
const t = e, n =
|
|
58
|
+
const t = e, n = Rn(), o = V(() => {
|
|
59
59
|
const { icon: i, ...s } = t;
|
|
60
60
|
return {
|
|
61
61
|
...on(n),
|
|
62
62
|
...s
|
|
63
63
|
};
|
|
64
|
-
}), r =
|
|
64
|
+
}), r = V(() => nn(n));
|
|
65
65
|
return (i, s) => {
|
|
66
66
|
const l = Yt, a = It;
|
|
67
|
-
return k(),
|
|
68
|
-
default:
|
|
69
|
-
i.$slots.icon ? (k(),
|
|
67
|
+
return k(), U(a, oe({ class: "jt-button" }, o.value, Ze(r.value)), {
|
|
68
|
+
default: J(() => [
|
|
69
|
+
i.$slots.icon ? (k(), U(l, {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "jt-button__icon"
|
|
72
72
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
|
|
73
|
+
default: J(() => [
|
|
74
|
+
ee(i.$slots, "icon", {}, void 0, !0)
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
77
|
-
})) : t.icon ? (k(),
|
|
77
|
+
})) : t.icon ? (k(), U(l, {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "jt-button__icon"
|
|
80
80
|
}, {
|
|
81
|
-
default:
|
|
82
|
-
(k(),
|
|
81
|
+
default: J(() => [
|
|
82
|
+
(k(), U(xt(t.icon)))
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
85
|
})) : ue("", !0),
|
|
86
|
-
|
|
86
|
+
ee(i.$slots, "default", {}, void 0, !0)
|
|
87
87
|
]),
|
|
88
88
|
_: 3
|
|
89
89
|
}, 16);
|
|
@@ -115,7 +115,7 @@ function co(e) {
|
|
|
115
115
|
const uo = /* @__PURE__ */ ce({
|
|
116
116
|
name: "JtCascader",
|
|
117
117
|
__name: "index",
|
|
118
|
-
props: /* @__PURE__ */
|
|
118
|
+
props: /* @__PURE__ */ xn({
|
|
119
119
|
size: {},
|
|
120
120
|
placeholder: {},
|
|
121
121
|
disabled: { type: Boolean },
|
|
@@ -156,7 +156,7 @@ const uo = /* @__PURE__ */ ce({
|
|
|
156
156
|
}, lo),
|
|
157
157
|
emits: oo,
|
|
158
158
|
setup(e, { emit: t }) {
|
|
159
|
-
const n = e, o =
|
|
159
|
+
const n = e, o = V(() => co(n)), r = me(n.modelValue);
|
|
160
160
|
Be(
|
|
161
161
|
() => n.modelValue,
|
|
162
162
|
(g) => {
|
|
@@ -165,8 +165,8 @@ const uo = /* @__PURE__ */ ce({
|
|
|
165
165
|
{ deep: !0 }
|
|
166
166
|
);
|
|
167
167
|
const i = t;
|
|
168
|
-
function s(g, ...
|
|
169
|
-
i(g, ...
|
|
168
|
+
function s(g, ...w) {
|
|
169
|
+
i(g, ...w);
|
|
170
170
|
}
|
|
171
171
|
function l(g) {
|
|
172
172
|
r.value = g, s("update:modelValue", g);
|
|
@@ -180,30 +180,30 @@ const uo = /* @__PURE__ */ ce({
|
|
|
180
180
|
function p(g) {
|
|
181
181
|
s("blur", g);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function _() {
|
|
184
184
|
s("clear");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function $(g) {
|
|
187
187
|
s("visibleChange", g);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function S(g) {
|
|
190
190
|
s("expandChange", g);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function A(g) {
|
|
193
193
|
s("removeTag", g);
|
|
194
194
|
}
|
|
195
|
-
return (g,
|
|
195
|
+
return (g, w) => {
|
|
196
196
|
const b = Jn;
|
|
197
|
-
return k(),
|
|
197
|
+
return k(), U(b, oe({ class: "jt-cascader" }, o.value, {
|
|
198
198
|
"model-value": r.value,
|
|
199
199
|
"onUpdate:modelValue": l,
|
|
200
200
|
onChange: a,
|
|
201
201
|
onFocus: c,
|
|
202
202
|
onBlur: p,
|
|
203
|
-
onClear:
|
|
204
|
-
onVisibleChange:
|
|
205
|
-
onExpandChange:
|
|
206
|
-
onRemoveTag:
|
|
203
|
+
onClear: _,
|
|
204
|
+
onVisibleChange: $,
|
|
205
|
+
onExpandChange: S,
|
|
206
|
+
onRemoveTag: A
|
|
207
207
|
}), null, 16, ["model-value"]);
|
|
208
208
|
};
|
|
209
209
|
}
|
|
@@ -260,7 +260,7 @@ const uo = /* @__PURE__ */ ce({
|
|
|
260
260
|
isRange: { type: Boolean }
|
|
261
261
|
},
|
|
262
262
|
setup(e) {
|
|
263
|
-
const t = e, n =
|
|
263
|
+
const t = e, n = V(() => ({
|
|
264
264
|
...t,
|
|
265
265
|
startPlaceholder: t.startPlaceholder ?? (o(t.type) ? "开始日期" : void 0),
|
|
266
266
|
endPlaceholder: t.endPlaceholder ?? (o(t.type) ? "结束日期" : void 0)
|
|
@@ -270,7 +270,7 @@ const uo = /* @__PURE__ */ ce({
|
|
|
270
270
|
}
|
|
271
271
|
return (r, i) => {
|
|
272
272
|
const s = Ht;
|
|
273
|
-
return k(),
|
|
273
|
+
return k(), U(s, oe({ class: "jt-date-picker" }, n.value, {
|
|
274
274
|
"onUpdate:modelValue": i[0] || (i[0] = (l) => r.$emit("update:modelValue", l))
|
|
275
275
|
}), null, 16);
|
|
276
276
|
};
|
|
@@ -318,7 +318,7 @@ const uo = /* @__PURE__ */ ce({
|
|
|
318
318
|
enter: () => !0
|
|
319
319
|
},
|
|
320
320
|
setup(e, { emit: t }) {
|
|
321
|
-
const n = e, o = t, r =
|
|
321
|
+
const n = e, o = t, r = V(() => Object.fromEntries(
|
|
322
322
|
Object.keys(Ot).map((i) => [
|
|
323
323
|
i,
|
|
324
324
|
(...s) => o(i, ...s)
|
|
@@ -326,7 +326,7 @@ const uo = /* @__PURE__ */ ce({
|
|
|
326
326
|
));
|
|
327
327
|
return (i, s) => {
|
|
328
328
|
const l = Ut;
|
|
329
|
-
return k(),
|
|
329
|
+
return k(), U(l, oe({ class: "jt-input" }, n, Ze(r.value), {
|
|
330
330
|
onKeyup: s[0] || (s[0] = qn((a) => o("enter"), ["enter"]))
|
|
331
331
|
}), null, 16);
|
|
332
332
|
};
|
|
@@ -390,10 +390,10 @@ const uo = /* @__PURE__ */ ce({
|
|
|
390
390
|
},
|
|
391
391
|
emits: Dt,
|
|
392
392
|
setup(e, { emit: t }) {
|
|
393
|
-
const n = e, o =
|
|
393
|
+
const n = e, o = V(() => {
|
|
394
394
|
const { options: s, ...l } = n;
|
|
395
395
|
return l;
|
|
396
|
-
}), r = t, i =
|
|
396
|
+
}), r = t, i = V(() => Object.fromEntries(
|
|
397
397
|
Object.keys(Dt).map((s) => [
|
|
398
398
|
s,
|
|
399
399
|
(...l) => r(s, ...l)
|
|
@@ -401,9 +401,9 @@ const uo = /* @__PURE__ */ ce({
|
|
|
401
401
|
));
|
|
402
402
|
return (s, l) => {
|
|
403
403
|
const a = Wt, c = Jt;
|
|
404
|
-
return k(),
|
|
405
|
-
default:
|
|
406
|
-
(k(!0), Y(be, null, ve(s.options ?? [], (p) => (k(),
|
|
404
|
+
return k(), U(c, oe({ class: "jt-select" }, o.value, Ze(i.value)), {
|
|
405
|
+
default: J(() => [
|
|
406
|
+
(k(!0), Y(be, null, ve(s.options ?? [], (p) => (k(), U(a, oe({
|
|
407
407
|
key: p.value,
|
|
408
408
|
ref_for: !0
|
|
409
409
|
}, p), null, 16))), 128))
|
|
@@ -432,92 +432,92 @@ const uo = /* @__PURE__ */ ce({
|
|
|
432
432
|
daterange: "date-picker",
|
|
433
433
|
"date-range": "date-picker",
|
|
434
434
|
dateRange: "date-picker"
|
|
435
|
-
}, r = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), i = Object.keys(n), s = /* @__PURE__ */ new Map(), l =
|
|
436
|
-
const { itemType:
|
|
437
|
-
if (!
|
|
438
|
-
if (typeof
|
|
439
|
-
const
|
|
440
|
-
return i.includes(
|
|
441
|
-
`[JtFormItems] 不支持的 itemType: "${
|
|
435
|
+
}, r = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), i = Object.keys(n), s = /* @__PURE__ */ new Map(), l = V(() => t.configs.filter((I) => I.show !== !1)), a = (I) => {
|
|
436
|
+
const { itemType: v } = I;
|
|
437
|
+
if (!v) return mt;
|
|
438
|
+
if (typeof v != "string") return v;
|
|
439
|
+
const T = o[v] ?? v;
|
|
440
|
+
return i.includes(T) ? n[T] : (console.error(
|
|
441
|
+
`[JtFormItems] 不支持的 itemType: "${v}",支持的类型: ${i.join(", ")}`
|
|
442
442
|
), mt);
|
|
443
|
-
}, c = (
|
|
444
|
-
const
|
|
445
|
-
return
|
|
446
|
-
...
|
|
447
|
-
options:
|
|
448
|
-
} : j(
|
|
449
|
-
...
|
|
443
|
+
}, c = (I) => {
|
|
444
|
+
const v = on(I, r);
|
|
445
|
+
return I.itemType === "select" || I.itemType === "remote-select" || I.itemType === "cascader" ? {
|
|
446
|
+
...v,
|
|
447
|
+
options: I.options
|
|
448
|
+
} : j(I.itemType) ? {
|
|
449
|
+
...v,
|
|
450
450
|
type: "daterange"
|
|
451
|
-
} :
|
|
452
|
-
}, p = (
|
|
453
|
-
rules:
|
|
454
|
-
...
|
|
455
|
-
}),
|
|
456
|
-
t.formData[
|
|
451
|
+
} : v;
|
|
452
|
+
}, p = (I) => nn(I, r), _ = (I) => ({
|
|
453
|
+
rules: I.rules,
|
|
454
|
+
...I.formItemProps
|
|
455
|
+
}), $ = (I, v) => {
|
|
456
|
+
t.formData[I] = v;
|
|
457
457
|
};
|
|
458
|
-
function
|
|
459
|
-
return (
|
|
460
|
-
if (
|
|
461
|
-
s.set(
|
|
458
|
+
function S(I) {
|
|
459
|
+
return (v) => {
|
|
460
|
+
if (v) {
|
|
461
|
+
s.set(I, v);
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
s.delete(
|
|
464
|
+
s.delete(I);
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function A(I, v) {
|
|
468
468
|
Kn(() => {
|
|
469
|
-
s.get(
|
|
469
|
+
s.get(I)?.validate(v).catch(() => {
|
|
470
470
|
});
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
const g = (
|
|
474
|
-
const
|
|
475
|
-
(
|
|
473
|
+
const g = (I) => Math.min(Math.max(Math.trunc(I || 1), 1), 4), w = V(() => {
|
|
474
|
+
const v = l.value.reduce(
|
|
475
|
+
(T, h) => T + g(t.span || h.span),
|
|
476
476
|
0
|
|
477
477
|
) % vt;
|
|
478
|
-
return
|
|
478
|
+
return v === 0 ? {
|
|
479
479
|
gridColumn: `1 / span ${vt}`
|
|
480
480
|
} : {
|
|
481
|
-
gridColumn: `${
|
|
481
|
+
gridColumn: `${v + 1} / span ${vt - v}`
|
|
482
482
|
};
|
|
483
|
-
}), b = (
|
|
484
|
-
gridColumn: `span ${g(t.span ||
|
|
483
|
+
}), b = (I) => ({
|
|
484
|
+
gridColumn: `span ${g(t.span || I.span)}`
|
|
485
485
|
});
|
|
486
|
-
function j(
|
|
487
|
-
return
|
|
486
|
+
function j(I) {
|
|
487
|
+
return I === "daterange" || I === "date-range" || I === "dateRange";
|
|
488
488
|
}
|
|
489
|
-
return (
|
|
490
|
-
const
|
|
489
|
+
return (I, v) => {
|
|
490
|
+
const T = Zt;
|
|
491
491
|
return k(), Y("div", go, [
|
|
492
|
-
(k(!0), Y(be, null, ve(l.value, (
|
|
493
|
-
key:
|
|
492
|
+
(k(!0), Y(be, null, ve(l.value, (h) => (k(), U(T, oe({
|
|
493
|
+
key: h.prop,
|
|
494
494
|
ref_for: !0,
|
|
495
|
-
ref:
|
|
495
|
+
ref: S(h.prop),
|
|
496
496
|
class: "jt-form-items__item",
|
|
497
|
-
style: b(
|
|
498
|
-
label:
|
|
499
|
-
prop:
|
|
500
|
-
},
|
|
501
|
-
default:
|
|
502
|
-
|
|
497
|
+
style: b(h),
|
|
498
|
+
label: h.label,
|
|
499
|
+
prop: h.prop
|
|
500
|
+
}, _(h)), {
|
|
501
|
+
default: J(() => [
|
|
502
|
+
h.showSlot ? ee(I.$slots, h.prop, { key: 0 }, void 0, !0) : (k(), U(xt(a(h)), oe({
|
|
503
503
|
key: 1,
|
|
504
|
-
"model-value":
|
|
504
|
+
"model-value": I.formData[h.prop],
|
|
505
505
|
ref_for: !0
|
|
506
|
-
}, c(
|
|
507
|
-
"onUpdate:modelValue": (N) =>
|
|
508
|
-
onChange: () =>
|
|
509
|
-
onBlur: () =>
|
|
506
|
+
}, c(h), Ze(p(h)), {
|
|
507
|
+
"onUpdate:modelValue": (N) => $(h.prop, N),
|
|
508
|
+
onChange: () => A(h.prop, "change"),
|
|
509
|
+
onBlur: () => A(h.prop, "blur")
|
|
510
510
|
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
511
511
|
]),
|
|
512
512
|
_: 2
|
|
513
513
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
514
|
-
|
|
514
|
+
I.$slots.actions ? (k(), U(T, {
|
|
515
515
|
key: 0,
|
|
516
516
|
class: "jt-form-items__actions",
|
|
517
|
-
style: qt(
|
|
517
|
+
style: qt(w.value)
|
|
518
518
|
}, {
|
|
519
|
-
default:
|
|
520
|
-
|
|
519
|
+
default: J(() => [
|
|
520
|
+
ee(I.$slots, "actions", {}, void 0, !0)
|
|
521
521
|
]),
|
|
522
522
|
_: 3
|
|
523
523
|
}, 8, ["style"])) : ue("", !0)
|
|
@@ -553,81 +553,81 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
553
553
|
searchDisabled: a,
|
|
554
554
|
searchLoading: c,
|
|
555
555
|
searchDone: p
|
|
556
|
-
} = So(),
|
|
557
|
-
() => Math.max(1,
|
|
558
|
-
), g =
|
|
559
|
-
() => Math.max(1,
|
|
560
|
-
), j =
|
|
561
|
-
if (!
|
|
562
|
-
let
|
|
563
|
-
return
|
|
564
|
-
const ae =
|
|
565
|
-
return
|
|
556
|
+
} = So(), _ = V(() => o.option), $ = me(_.value.searchCollapsed ?? !0), S = V(() => o.columns.filter((P) => P.search === !0)), A = V(
|
|
557
|
+
() => Math.max(1, _.value.searchSpan ?? 4)
|
|
558
|
+
), g = V(() => Math.max(1, _.value.searchCollapsedRows ?? 1)), w = V(() => A.value), b = V(
|
|
559
|
+
() => Math.max(1, w.value * g.value)
|
|
560
|
+
), j = V(() => A.value), I = V(() => F.value ? "264px" : "174px"), v = V(() => H(_.value.searchLabelWidth ?? 84)), T = V(() => _.value.searchLabelPosition ?? "top"), h = V(() => K(_.value.searchGutter, 14)), N = V(() => K(_.value.searchRowGap, 14)), y = V(() => X(_.value.searchPadding ?? "18px 4px 0")), F = V(() => _.value.searchCollapse === !1 ? !1 : q(S.value) > b.value), O = V(() => {
|
|
561
|
+
if (!F.value || !$.value) return S.value;
|
|
562
|
+
let P = 0;
|
|
563
|
+
return S.value.filter((Z) => {
|
|
564
|
+
const ae = L(Z);
|
|
565
|
+
return P + ae > b.value ? !1 : (P += ae, !0);
|
|
566
566
|
});
|
|
567
|
-
}),
|
|
568
|
-
() =>
|
|
569
|
-
), ne =
|
|
570
|
-
const [
|
|
571
|
-
return !!
|
|
572
|
-
}),
|
|
573
|
-
const [
|
|
574
|
-
return `${Math.min(
|
|
575
|
-
}),
|
|
576
|
-
() =>
|
|
567
|
+
}), R = V(
|
|
568
|
+
() => O.value.filter((P) => !!s[`${P.prop}-search`])
|
|
569
|
+
), ne = V(() => {
|
|
570
|
+
const [P] = O.value;
|
|
571
|
+
return !!P && O.value.length === 1 && L(P) < A.value;
|
|
572
|
+
}), x = V(() => {
|
|
573
|
+
const [P] = O.value;
|
|
574
|
+
return `${Math.min(A.value, P ? L(P) + 1 : 1)}`;
|
|
575
|
+
}), z = V(
|
|
576
|
+
() => O.value.map((P) => B(P))
|
|
577
577
|
);
|
|
578
578
|
Be(
|
|
579
|
-
() =>
|
|
580
|
-
(
|
|
581
|
-
typeof
|
|
579
|
+
() => _.value.searchCollapsed,
|
|
580
|
+
(P) => {
|
|
581
|
+
typeof P == "boolean" && ($.value = P);
|
|
582
582
|
}
|
|
583
583
|
), Be(
|
|
584
584
|
() => o.modelValue,
|
|
585
|
-
(
|
|
586
|
-
l.value = { ...
|
|
585
|
+
(P) => {
|
|
586
|
+
l.value = { ...P };
|
|
587
587
|
},
|
|
588
588
|
{ deep: !0, immediate: !0 }
|
|
589
589
|
);
|
|
590
|
-
function
|
|
590
|
+
function D(P, Z) {
|
|
591
591
|
if (a.value) return;
|
|
592
|
-
const ae = { ...l.value, [
|
|
592
|
+
const ae = { ...l.value, [P]: Z };
|
|
593
593
|
l.value = ae, r("update:modelValue", ae);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
const
|
|
595
|
+
function B(P) {
|
|
596
|
+
const Z = P.searchProps ?? {};
|
|
597
597
|
return {
|
|
598
|
-
...
|
|
599
|
-
prop:
|
|
600
|
-
label:
|
|
601
|
-
span:
|
|
602
|
-
itemType:
|
|
598
|
+
...Z,
|
|
599
|
+
prop: P.prop,
|
|
600
|
+
label: P.searchLabel ?? P.label,
|
|
601
|
+
span: L(P),
|
|
602
|
+
itemType: P.searchType ?? "input",
|
|
603
603
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
604
|
-
showSlot: !!s[`${
|
|
605
|
-
options:
|
|
606
|
-
placeholder:
|
|
607
|
-
valueFormat:
|
|
608
|
-
disabled: a.value ||
|
|
604
|
+
showSlot: !!s[`${P.prop}-search`],
|
|
605
|
+
options: Z.options ?? P.searchOptions ?? P.dicData,
|
|
606
|
+
placeholder: Z.placeholder ?? P.searchPlaceholder,
|
|
607
|
+
valueFormat: Z.valueFormat ?? P.searchValueFormat,
|
|
608
|
+
disabled: a.value || Z.disabled === !0,
|
|
609
609
|
formItemProps: {
|
|
610
|
-
required:
|
|
611
|
-
class: ["jt-filter-bar__item", { "is-required":
|
|
610
|
+
required: P.searchRequired,
|
|
611
|
+
class: ["jt-filter-bar__item", { "is-required": P.searchRequired }]
|
|
612
612
|
},
|
|
613
613
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
614
614
|
onEnter: (...ae) => {
|
|
615
|
-
|
|
615
|
+
u(Z.onEnter, ...ae), m();
|
|
616
616
|
},
|
|
617
617
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
618
618
|
"onUpdate:modelValue": (ae) => {
|
|
619
|
-
|
|
619
|
+
u(Z["onUpdate:modelValue"], ae), D(P.prop, ae);
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
if (Array.isArray(
|
|
625
|
-
|
|
623
|
+
function u(P, ...Z) {
|
|
624
|
+
if (Array.isArray(P)) {
|
|
625
|
+
P.forEach((ae) => u(ae, ...Z));
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
typeof
|
|
628
|
+
typeof P == "function" && P(...Z);
|
|
629
629
|
}
|
|
630
|
-
async function
|
|
630
|
+
async function m() {
|
|
631
631
|
if (!a.value) {
|
|
632
632
|
if (i.value)
|
|
633
633
|
try {
|
|
@@ -638,26 +638,26 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
638
638
|
r("search");
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function C() {
|
|
642
642
|
a.value || r("reset");
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
644
|
+
function E() {
|
|
645
|
+
$.value = !$.value;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
return Math.min(
|
|
647
|
+
function L(P) {
|
|
648
|
+
return Math.min(A.value, Math.max(1, P.searchSpan ?? 1));
|
|
649
649
|
}
|
|
650
|
-
function
|
|
651
|
-
return
|
|
650
|
+
function q(P) {
|
|
651
|
+
return P.reduce((Z, ae) => Z + L(ae), 0);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return typeof
|
|
653
|
+
function H(P) {
|
|
654
|
+
return typeof P == "number" ? `${P}px` : P;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return typeof
|
|
656
|
+
function K(P, Z) {
|
|
657
|
+
return typeof P == "number" ? P : Z;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return typeof
|
|
659
|
+
function X(P) {
|
|
660
|
+
return typeof P == "number" ? `${P}px` : P;
|
|
661
661
|
}
|
|
662
662
|
return t({
|
|
663
663
|
/** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
|
|
@@ -668,17 +668,17 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
668
668
|
searchLoading: c,
|
|
669
669
|
/** 关闭筛选表单禁用。 */
|
|
670
670
|
searchDone: p
|
|
671
|
-
}), (
|
|
671
|
+
}), (P, Z) => {
|
|
672
672
|
const ae = Qt;
|
|
673
673
|
return k(), Y("div", {
|
|
674
|
-
class: Ue(["jt-filter-bar", [`is-label-${
|
|
674
|
+
class: Ue(["jt-filter-bar", [`is-label-${T.value}`, { "is-single-filter": ne.value }]]),
|
|
675
675
|
style: qt({
|
|
676
|
-
"--jt-filter-columns":
|
|
676
|
+
"--jt-filter-columns": A.value,
|
|
677
677
|
"--jt-filter-field-columns": j.value,
|
|
678
|
-
"--jt-filter-btns-width":
|
|
679
|
-
"--jt-filter-actions-start":
|
|
680
|
-
"--jt-filter-label-width":
|
|
681
|
-
"--jt-filter-column-gap": `${
|
|
678
|
+
"--jt-filter-btns-width": I.value,
|
|
679
|
+
"--jt-filter-actions-start": x.value,
|
|
680
|
+
"--jt-filter-label-width": v.value,
|
|
681
|
+
"--jt-filter-column-gap": `${h.value}px`,
|
|
682
682
|
"--jt-filter-row-gap": `${N.value}px`,
|
|
683
683
|
"--jt-filter-padding": y.value
|
|
684
684
|
})
|
|
@@ -688,56 +688,56 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
688
688
|
ref: i,
|
|
689
689
|
class: "jt-filter-bar__form",
|
|
690
690
|
model: l.value,
|
|
691
|
-
"label-position":
|
|
692
|
-
"label-width":
|
|
691
|
+
"label-position": T.value,
|
|
692
|
+
"label-width": v.value,
|
|
693
693
|
disabled: re(a),
|
|
694
|
-
onSubmit:
|
|
694
|
+
onSubmit: Z[0] || (Z[0] = Kt(() => {
|
|
695
695
|
}, ["prevent"]))
|
|
696
696
|
}, {
|
|
697
|
-
default:
|
|
697
|
+
default: J(() => [
|
|
698
698
|
we(re(bo), {
|
|
699
|
-
configs:
|
|
699
|
+
configs: z.value,
|
|
700
700
|
"form-data": l.value
|
|
701
701
|
}, je({
|
|
702
|
-
actions:
|
|
702
|
+
actions: J(() => [
|
|
703
703
|
te("div", $o, [
|
|
704
|
-
|
|
705
|
-
search:
|
|
706
|
-
reset:
|
|
704
|
+
ee(P.$slots, "search-menu", {
|
|
705
|
+
search: m,
|
|
706
|
+
reset: C,
|
|
707
707
|
disabled: re(a),
|
|
708
|
-
collapsed:
|
|
709
|
-
toggleCollapse:
|
|
708
|
+
collapsed: $.value,
|
|
709
|
+
toggleCollapse: E
|
|
710
710
|
}, () => [
|
|
711
|
-
|
|
711
|
+
F.value ? (k(), U(re(tt), {
|
|
712
712
|
key: 0,
|
|
713
713
|
class: "jt-filter-bar__btn-collapse",
|
|
714
|
-
onClick:
|
|
714
|
+
onClick: E
|
|
715
715
|
}, {
|
|
716
|
-
icon:
|
|
716
|
+
icon: J(() => [
|
|
717
717
|
te("img", {
|
|
718
|
-
class: Ue(["jt-filter-bar__icon-arrow", { "is-collapsed":
|
|
718
|
+
class: Ue(["jt-filter-bar__icon-arrow", { "is-collapsed": $.value }]),
|
|
719
719
|
src: re(wo),
|
|
720
720
|
alt: ""
|
|
721
721
|
}, null, 10, Co)
|
|
722
722
|
]),
|
|
723
|
-
default:
|
|
724
|
-
te("span", null, fe(
|
|
723
|
+
default: J(() => [
|
|
724
|
+
te("span", null, fe($.value ? "展 开" : "收 起"), 1)
|
|
725
725
|
]),
|
|
726
726
|
_: 1
|
|
727
727
|
})) : ue("", !0),
|
|
728
728
|
we(re(tt), {
|
|
729
729
|
class: "jt-filter-bar__btn-reset",
|
|
730
730
|
disabled: re(a),
|
|
731
|
-
onClick:
|
|
731
|
+
onClick: C
|
|
732
732
|
}, {
|
|
733
|
-
icon:
|
|
733
|
+
icon: J(() => [
|
|
734
734
|
te("img", {
|
|
735
735
|
src: re(Io),
|
|
736
736
|
alt: ""
|
|
737
737
|
}, null, 8, ko)
|
|
738
738
|
]),
|
|
739
|
-
default:
|
|
740
|
-
te("span", null, fe(
|
|
739
|
+
default: J(() => [
|
|
740
|
+
te("span", null, fe(_.value.resetBtnText ?? "重 置"), 1)
|
|
741
741
|
]),
|
|
742
742
|
_: 1
|
|
743
743
|
}, 8, ["disabled"]),
|
|
@@ -745,16 +745,16 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
745
745
|
class: "jt-filter-bar__btn-query",
|
|
746
746
|
type: "primary",
|
|
747
747
|
disabled: re(a),
|
|
748
|
-
onClick:
|
|
748
|
+
onClick: m
|
|
749
749
|
}, {
|
|
750
|
-
icon:
|
|
750
|
+
icon: J(() => [
|
|
751
751
|
te("img", {
|
|
752
752
|
src: re(_o),
|
|
753
753
|
alt: ""
|
|
754
754
|
}, null, 8, Mo)
|
|
755
755
|
]),
|
|
756
|
-
default:
|
|
757
|
-
te("span", null, fe(
|
|
756
|
+
default: J(() => [
|
|
757
|
+
te("span", null, fe(_.value.searchBtnText ?? "查 询"), 1)
|
|
758
758
|
]),
|
|
759
759
|
_: 1
|
|
760
760
|
}, 8, ["disabled"])
|
|
@@ -763,15 +763,15 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
763
763
|
]),
|
|
764
764
|
_: 2
|
|
765
765
|
}, [
|
|
766
|
-
ve(
|
|
766
|
+
ve(R.value, (pe) => ({
|
|
767
767
|
name: pe.prop,
|
|
768
|
-
fn:
|
|
769
|
-
|
|
768
|
+
fn: J(() => [
|
|
769
|
+
ee(P.$slots, `${pe.prop}-search`, {
|
|
770
770
|
value: l.value[pe.prop],
|
|
771
771
|
column: pe,
|
|
772
|
-
setValue: (de) =>
|
|
773
|
-
search:
|
|
774
|
-
reset:
|
|
772
|
+
setValue: (de) => D(pe.prop, de),
|
|
773
|
+
search: m,
|
|
774
|
+
reset: C,
|
|
775
775
|
disabled: re(a)
|
|
776
776
|
}, void 0, !0)
|
|
777
777
|
])
|
|
@@ -783,7 +783,7 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
783
783
|
], 6);
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
|
-
}), Oo = /* @__PURE__ */ ge(To, [["__scopeId", "data-v-
|
|
786
|
+
}), Oo = /* @__PURE__ */ ge(To, [["__scopeId", "data-v-6a794691"]]), Do = { key: 1 }, Fo = { key: 2 }, Bo = { key: 3 }, Lo = /* @__PURE__ */ ce({
|
|
787
787
|
name: "JtTable",
|
|
788
788
|
__name: "JtTable",
|
|
789
789
|
props: {
|
|
@@ -793,60 +793,60 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
793
793
|
tableEvents: {}
|
|
794
794
|
},
|
|
795
795
|
setup(e, { expose: t }) {
|
|
796
|
-
const n = e, o = Le(), r = me(), i =
|
|
797
|
-
function l(
|
|
798
|
-
return !!o[`${
|
|
796
|
+
const n = e, o = Le(), r = me(), i = V(() => n.option ?? {}), s = V(() => n.columns.filter((S) => !S.hide));
|
|
797
|
+
function l(S) {
|
|
798
|
+
return !!o[`${S}-header`];
|
|
799
799
|
}
|
|
800
|
-
function a(
|
|
801
|
-
return !!o[`${
|
|
800
|
+
function a(S) {
|
|
801
|
+
return !!o[`${S}-data`];
|
|
802
802
|
}
|
|
803
|
-
function c(
|
|
803
|
+
function c(S) {
|
|
804
804
|
return {
|
|
805
|
-
width:
|
|
806
|
-
minWidth:
|
|
807
|
-
align:
|
|
808
|
-
fixed:
|
|
809
|
-
sortable:
|
|
810
|
-
showOverflowTooltip:
|
|
811
|
-
...
|
|
805
|
+
width: S.width,
|
|
806
|
+
minWidth: S.minWidth,
|
|
807
|
+
align: S.align,
|
|
808
|
+
fixed: S.fixed,
|
|
809
|
+
sortable: S.sortable,
|
|
810
|
+
showOverflowTooltip: S.showOverflowTooltip,
|
|
811
|
+
...S.columnOptions
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
function p(
|
|
815
|
-
return
|
|
814
|
+
function p(S) {
|
|
815
|
+
return !_(S.columnOptions?.type);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
return
|
|
817
|
+
function _(S) {
|
|
818
|
+
return S === "selection" || S === "index" || S === "expand";
|
|
819
819
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
820
|
+
function $(S, A) {
|
|
821
|
+
return S.find((g) => g.value === A)?.label ?? String(A ?? "");
|
|
822
822
|
}
|
|
823
|
-
return t({ tableRef: r }), (
|
|
824
|
-
const g = en,
|
|
825
|
-
return k(),
|
|
823
|
+
return t({ tableRef: r }), (S, A) => {
|
|
824
|
+
const g = en, w = Xt;
|
|
825
|
+
return k(), U(w, oe({
|
|
826
826
|
ref_key: "tableRef",
|
|
827
827
|
ref: r,
|
|
828
|
-
data:
|
|
828
|
+
data: S.data,
|
|
829
829
|
"row-key": i.value.rowKey ?? "id",
|
|
830
830
|
height: i.value.height,
|
|
831
831
|
"max-height": i.value.maxHeight,
|
|
832
832
|
"empty-text": i.value.emptyText,
|
|
833
833
|
class: "jt-table"
|
|
834
|
-
}, i.value.tableProps, Ze(
|
|
835
|
-
default:
|
|
836
|
-
i.value.selection ? (k(),
|
|
834
|
+
}, i.value.tableProps, Ze(S.tableEvents)), {
|
|
835
|
+
default: J(() => [
|
|
836
|
+
i.value.selection ? (k(), U(g, {
|
|
837
837
|
key: 0,
|
|
838
838
|
type: "selection",
|
|
839
839
|
width: "55",
|
|
840
840
|
align: "center"
|
|
841
841
|
})) : ue("", !0),
|
|
842
|
-
i.value.index ? (k(),
|
|
842
|
+
i.value.index ? (k(), U(g, {
|
|
843
843
|
key: 1,
|
|
844
844
|
type: "index",
|
|
845
845
|
label: i.value.indexLabel ?? "序号",
|
|
846
846
|
width: "60",
|
|
847
847
|
align: "center"
|
|
848
848
|
}, null, 8, ["label"])) : ue("", !0),
|
|
849
|
-
(k(!0), Y(be, null, ve(s.value, (b) => (k(),
|
|
849
|
+
(k(!0), Y(be, null, ve(s.value, (b) => (k(), U(g, oe({
|
|
850
850
|
key: b.prop,
|
|
851
851
|
prop: b.prop,
|
|
852
852
|
label: b.label,
|
|
@@ -855,23 +855,23 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
855
855
|
}, c(b)), je({ _: 2 }, [
|
|
856
856
|
l(b.prop) ? {
|
|
857
857
|
name: "header",
|
|
858
|
-
fn:
|
|
859
|
-
|
|
858
|
+
fn: J((j) => [
|
|
859
|
+
ee(S.$slots, `${b.prop}-header`, oe({ ref_for: !0 }, j), void 0, !0)
|
|
860
860
|
]),
|
|
861
861
|
key: "0"
|
|
862
862
|
} : void 0,
|
|
863
863
|
p(b) ? {
|
|
864
864
|
name: "default",
|
|
865
|
-
fn:
|
|
866
|
-
a(b.prop) ?
|
|
865
|
+
fn: J((j) => [
|
|
866
|
+
a(b.prop) ? ee(S.$slots, `${b.prop}-data`, oe({
|
|
867
867
|
key: 0,
|
|
868
868
|
ref_for: !0
|
|
869
|
-
}, j), void 0, !0) : b.dicData ? (k(), Y("span", Do, fe(
|
|
869
|
+
}, j), void 0, !0) : b.dicData ? (k(), Y("span", Do, fe($(b.dicData, j.row[b.prop])), 1)) : b.formatter ? (k(), Y("span", Fo, fe(b.formatter(j.row, j.column, j.row[b.prop], j.$index)), 1)) : (k(), Y("span", Bo, fe(j.row[b.prop]), 1))
|
|
870
870
|
]),
|
|
871
871
|
key: "1"
|
|
872
872
|
} : void 0
|
|
873
873
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
874
|
-
i.value.menu ? (k(),
|
|
874
|
+
i.value.menu ? (k(), U(g, {
|
|
875
875
|
key: 2,
|
|
876
876
|
label: i.value.menuLabel ?? "操作",
|
|
877
877
|
width: i.value.menuWidth,
|
|
@@ -879,8 +879,8 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
879
879
|
align: i.value.menuAlign ?? "center",
|
|
880
880
|
fixed: i.value.menuFixed
|
|
881
881
|
}, {
|
|
882
|
-
default:
|
|
883
|
-
|
|
882
|
+
default: J((b) => [
|
|
883
|
+
ee(S.$slots, "menu", Me(Fe(b)), void 0, !0)
|
|
884
884
|
]),
|
|
885
885
|
_: 3
|
|
886
886
|
}, 8, ["label", "width", "min-width", "align", "fixed"])) : ue("", !0)
|
|
@@ -900,7 +900,7 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
900
900
|
},
|
|
901
901
|
emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
|
|
902
902
|
setup(e, { emit: t }) {
|
|
903
|
-
const n = e, o =
|
|
903
|
+
const n = e, o = V(() => n.option ?? {}), r = t;
|
|
904
904
|
function i(s) {
|
|
905
905
|
r("current-change", s), r("page-change", s);
|
|
906
906
|
}
|
|
@@ -925,7 +925,7 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
925
925
|
}), jo = /* @__PURE__ */ ge(Ao, [["__scopeId", "data-v-c6e8a4b5"]]), No = { class: "jt-crud-table" }, zo = {
|
|
926
926
|
key: 1,
|
|
927
927
|
class: "jt-crud-table__toolbar"
|
|
928
|
-
},
|
|
928
|
+
}, Ro = /* @__PURE__ */ ce({
|
|
929
929
|
name: "JtCrudTable",
|
|
930
930
|
__name: "JtCrudTable",
|
|
931
931
|
props: /* @__PURE__ */ Mt({
|
|
@@ -944,110 +944,110 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
944
944
|
}),
|
|
945
945
|
emits: /* @__PURE__ */ Mt(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
946
946
|
setup(e, { expose: t, emit: n }) {
|
|
947
|
-
const o = e, r = n, i = pt(e, "currentPage"), s = pt(e, "pageSize"), l = pt(e, "searchModel"), a = Le(), c = me(), p = me(),
|
|
948
|
-
() => o.columns.filter((
|
|
949
|
-
), g =
|
|
950
|
-
() => o.columns.filter((
|
|
951
|
-
),
|
|
952
|
-
() => o.columns.filter((
|
|
947
|
+
const o = e, r = n, i = pt(e, "currentPage"), s = pt(e, "pageSize"), l = pt(e, "searchModel"), a = Le(), c = me(), p = me(), _ = V(() => o.option), $ = V(() => _.value.searchShow !== !1), S = V(() => _.value.paginationShow !== !1), A = V(
|
|
948
|
+
() => o.columns.filter((h) => h.search && !!a[`${h.prop}-search`])
|
|
949
|
+
), g = V(
|
|
950
|
+
() => o.columns.filter((h) => !h.hide && !!a[`${h.prop}-header`])
|
|
951
|
+
), w = V(
|
|
952
|
+
() => o.columns.filter((h) => !h.hide && !!a[`${h.prop}-data`])
|
|
953
953
|
);
|
|
954
954
|
function b() {
|
|
955
|
-
const
|
|
955
|
+
const h = {};
|
|
956
956
|
return o.columns.forEach((N) => {
|
|
957
|
-
N.search && (
|
|
958
|
-
}),
|
|
957
|
+
N.search && (h[N.prop] = void 0);
|
|
958
|
+
}), h;
|
|
959
959
|
}
|
|
960
960
|
function j() {
|
|
961
961
|
r("search", { ...l.value });
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function I() {
|
|
964
964
|
l.value = b(), r("reset");
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function v() {
|
|
967
967
|
p.value?.searchLoading();
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function T() {
|
|
970
970
|
p.value?.searchDone();
|
|
971
971
|
}
|
|
972
972
|
return t({
|
|
973
973
|
/** 获取内部 el-table 实例 */
|
|
974
|
-
tableRef:
|
|
974
|
+
tableRef: V(() => c.value?.tableRef),
|
|
975
975
|
/** 获取内部筛选条实例 */
|
|
976
976
|
filterBarRef: p,
|
|
977
977
|
/** 开启筛选表单禁用。 */
|
|
978
|
-
searchLoading:
|
|
978
|
+
searchLoading: v,
|
|
979
979
|
/** 关闭筛选表单禁用。 */
|
|
980
|
-
searchDone:
|
|
981
|
-
}), (
|
|
980
|
+
searchDone: T
|
|
981
|
+
}), (h, N) => {
|
|
982
982
|
const y = Zn;
|
|
983
983
|
return k(), Y("div", No, [
|
|
984
|
-
|
|
985
|
-
|
|
984
|
+
ee(h.$slots, "header", {}, void 0, !0),
|
|
985
|
+
$.value ? (k(), U(Oo, {
|
|
986
986
|
key: 0,
|
|
987
987
|
ref_key: "filterBarRef",
|
|
988
988
|
ref: p,
|
|
989
989
|
modelValue: l.value,
|
|
990
|
-
"onUpdate:modelValue": N[0] || (N[0] = (
|
|
991
|
-
columns:
|
|
992
|
-
option:
|
|
990
|
+
"onUpdate:modelValue": N[0] || (N[0] = (F) => l.value = F),
|
|
991
|
+
columns: h.columns,
|
|
992
|
+
option: _.value,
|
|
993
993
|
onSearch: j,
|
|
994
|
-
onReset:
|
|
994
|
+
onReset: I
|
|
995
995
|
}, je({ _: 2 }, [
|
|
996
|
-
ve(
|
|
997
|
-
name: `${
|
|
998
|
-
fn:
|
|
999
|
-
|
|
996
|
+
ve(A.value, (F) => ({
|
|
997
|
+
name: `${F.prop}-search`,
|
|
998
|
+
fn: J((O) => [
|
|
999
|
+
ee(h.$slots, `${F.prop}-search`, Me(Fe(O)), void 0, !0)
|
|
1000
1000
|
])
|
|
1001
1001
|
}))
|
|
1002
1002
|
]), 1032, ["modelValue", "columns", "option"])) : ue("", !0),
|
|
1003
1003
|
re(a).toolbar ? (k(), Y("div", zo, [
|
|
1004
|
-
|
|
1004
|
+
ee(h.$slots, "toolbar", {}, void 0, !0)
|
|
1005
1005
|
])) : ue("", !0),
|
|
1006
|
-
Gn((k(),
|
|
1006
|
+
Gn((k(), U(Eo, {
|
|
1007
1007
|
ref_key: "jtTableRef",
|
|
1008
1008
|
ref: c,
|
|
1009
|
-
data:
|
|
1010
|
-
columns:
|
|
1011
|
-
option:
|
|
1012
|
-
"table-events":
|
|
1009
|
+
data: h.data,
|
|
1010
|
+
columns: h.columns,
|
|
1011
|
+
option: _.value,
|
|
1012
|
+
"table-events": h.tableEvents
|
|
1013
1013
|
}, je({ _: 2 }, [
|
|
1014
|
-
ve(g.value, (
|
|
1015
|
-
name: `${
|
|
1016
|
-
fn:
|
|
1017
|
-
|
|
1014
|
+
ve(g.value, (F) => ({
|
|
1015
|
+
name: `${F.prop}-header`,
|
|
1016
|
+
fn: J((O) => [
|
|
1017
|
+
ee(h.$slots, `${F.prop}-header`, Me(Fe(O)), void 0, !0)
|
|
1018
1018
|
])
|
|
1019
1019
|
})),
|
|
1020
|
-
ve(
|
|
1021
|
-
name: `${
|
|
1022
|
-
fn:
|
|
1023
|
-
|
|
1020
|
+
ve(w.value, (F) => ({
|
|
1021
|
+
name: `${F.prop}-data`,
|
|
1022
|
+
fn: J((O) => [
|
|
1023
|
+
ee(h.$slots, `${F.prop}-data`, Me(Fe(O)), void 0, !0)
|
|
1024
1024
|
])
|
|
1025
1025
|
})),
|
|
1026
|
-
|
|
1026
|
+
_.value.menu ? {
|
|
1027
1027
|
name: "menu",
|
|
1028
|
-
fn:
|
|
1029
|
-
|
|
1028
|
+
fn: J((F) => [
|
|
1029
|
+
ee(h.$slots, "menu", Me(Fe(F)), void 0, !0)
|
|
1030
1030
|
]),
|
|
1031
1031
|
key: "0"
|
|
1032
1032
|
} : void 0
|
|
1033
1033
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
1034
|
-
[y,
|
|
1034
|
+
[y, _.value.loading]
|
|
1035
1035
|
]),
|
|
1036
|
-
|
|
1036
|
+
S.value ? (k(), U(jo, {
|
|
1037
1037
|
key: 2,
|
|
1038
1038
|
"current-page": i.value,
|
|
1039
|
-
"onUpdate:currentPage": N[1] || (N[1] = (
|
|
1039
|
+
"onUpdate:currentPage": N[1] || (N[1] = (F) => i.value = F),
|
|
1040
1040
|
"page-size": s.value,
|
|
1041
|
-
"onUpdate:pageSize": N[2] || (N[2] = (
|
|
1042
|
-
total:
|
|
1043
|
-
option:
|
|
1044
|
-
onPageChange: N[3] || (N[3] = (
|
|
1045
|
-
onSizeChange: N[4] || (N[4] = (
|
|
1041
|
+
"onUpdate:pageSize": N[2] || (N[2] = (F) => s.value = F),
|
|
1042
|
+
total: h.total,
|
|
1043
|
+
option: _.value,
|
|
1044
|
+
onPageChange: N[3] || (N[3] = (F) => h.$emit("page-change", F)),
|
|
1045
|
+
onSizeChange: N[4] || (N[4] = (F) => h.$emit("size-change", F))
|
|
1046
1046
|
}, null, 8, ["current-page", "page-size", "total", "option"])) : ue("", !0)
|
|
1047
1047
|
]);
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
}), ja = /* @__PURE__ */ ge(
|
|
1050
|
+
}), ja = /* @__PURE__ */ ge(Ro, [["__scopeId", "data-v-ad466273"]]), xo = { class: "jt-page-header__title" }, qo = { key: 0 }, Ko = {
|
|
1051
1051
|
key: 0,
|
|
1052
1052
|
class: "jt-page-header__operates"
|
|
1053
1053
|
}, Go = /* @__PURE__ */ ce({
|
|
@@ -1060,21 +1060,21 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1060
1060
|
},
|
|
1061
1061
|
emits: ["operate-click"],
|
|
1062
1062
|
setup(e, { emit: t }) {
|
|
1063
|
-
const n = e, o = t, r = Le(), i =
|
|
1063
|
+
const n = e, o = t, r = Le(), i = V(() => n.operates.length > 0 || !!r.operates);
|
|
1064
1064
|
function s(l, a) {
|
|
1065
1065
|
l.onClick?.(l, a), o("operate-click", l, a);
|
|
1066
1066
|
}
|
|
1067
1067
|
return (l, a) => (k(), Y("div", oe({
|
|
1068
1068
|
class: ["jt-page-header", `jt-page-header--${l.type}`]
|
|
1069
1069
|
}, l.$attrs), [
|
|
1070
|
-
te("div",
|
|
1071
|
-
|
|
1070
|
+
te("div", xo, [
|
|
1071
|
+
ee(l.$slots, "title", {}, () => [
|
|
1072
1072
|
l.title ? (k(), Y("span", qo, fe(l.title), 1)) : ue("", !0)
|
|
1073
1073
|
], !0)
|
|
1074
1074
|
]),
|
|
1075
1075
|
i.value ? (k(), Y("div", Ko, [
|
|
1076
|
-
|
|
1077
|
-
(k(!0), Y(be, null, ve(l.operates, (c) => (k(),
|
|
1076
|
+
ee(l.$slots, "operates", { operates: l.operates }, () => [
|
|
1077
|
+
(k(!0), Y(be, null, ve(l.operates, (c) => (k(), U(re(tt), oe({
|
|
1078
1078
|
key: c.key ?? c.label,
|
|
1079
1079
|
ref_for: !0
|
|
1080
1080
|
}, c.buttonProps, {
|
|
@@ -1087,7 +1087,7 @@ const wo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1087
1087
|
icon: c.icon,
|
|
1088
1088
|
onClick: (p) => s(c, p)
|
|
1089
1089
|
}), {
|
|
1090
|
-
default:
|
|
1090
|
+
default: J(() => [
|
|
1091
1091
|
te("span", null, fe(c.label), 1)
|
|
1092
1092
|
]),
|
|
1093
1093
|
_: 2
|
|
@@ -1139,275 +1139,275 @@ var an = { exports: {} };
|
|
|
1139
1139
|
(function(n, o) {
|
|
1140
1140
|
e.exports = o();
|
|
1141
1141
|
})(at, function() {
|
|
1142
|
-
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", l = "minute", a = "hour", c = "day", p = "week",
|
|
1143
|
-
var
|
|
1144
|
-
return "[" +
|
|
1145
|
-
} },
|
|
1146
|
-
var
|
|
1147
|
-
return !
|
|
1148
|
-
},
|
|
1149
|
-
var
|
|
1150
|
-
return (
|
|
1151
|
-
}, m: function
|
|
1152
|
-
if (
|
|
1153
|
-
var
|
|
1154
|
-
return +(-(
|
|
1155
|
-
}, a: function(
|
|
1156
|
-
return
|
|
1157
|
-
}, p: function(
|
|
1158
|
-
return { M:
|
|
1159
|
-
}, u: function(
|
|
1160
|
-
return
|
|
1161
|
-
} },
|
|
1162
|
-
|
|
1163
|
-
var N = "$isDayjsObject", y = function(
|
|
1164
|
-
return
|
|
1165
|
-
},
|
|
1166
|
-
var
|
|
1167
|
-
if (!
|
|
1168
|
-
if (typeof
|
|
1169
|
-
var
|
|
1170
|
-
|
|
1171
|
-
var
|
|
1172
|
-
if (!
|
|
1142
|
+
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", l = "minute", a = "hour", c = "day", p = "week", _ = "month", $ = "quarter", S = "year", A = "date", g = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|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, j = { 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(z) {
|
|
1143
|
+
var D = ["th", "st", "nd", "rd"], B = z % 100;
|
|
1144
|
+
return "[" + z + (D[(B - 20) % 10] || D[B] || D[0]) + "]";
|
|
1145
|
+
} }, I = function(z, D, B) {
|
|
1146
|
+
var u = String(z);
|
|
1147
|
+
return !u || u.length >= D ? z : "" + Array(D + 1 - u.length).join(B) + z;
|
|
1148
|
+
}, v = { s: I, z: function(z) {
|
|
1149
|
+
var D = -z.utcOffset(), B = Math.abs(D), u = Math.floor(B / 60), m = B % 60;
|
|
1150
|
+
return (D <= 0 ? "+" : "-") + I(u, 2, "0") + ":" + I(m, 2, "0");
|
|
1151
|
+
}, m: function z(D, B) {
|
|
1152
|
+
if (D.date() < B.date()) return -z(B, D);
|
|
1153
|
+
var u = 12 * (B.year() - D.year()) + (B.month() - D.month()), m = D.clone().add(u, _), C = B - m < 0, E = D.clone().add(u + (C ? -1 : 1), _);
|
|
1154
|
+
return +(-(u + (B - m) / (C ? m - E : E - m)) || 0);
|
|
1155
|
+
}, a: function(z) {
|
|
1156
|
+
return z < 0 ? Math.ceil(z) || 0 : Math.floor(z);
|
|
1157
|
+
}, p: function(z) {
|
|
1158
|
+
return { M: _, y: S, w: p, d: c, D: A, h: a, m: l, s, ms: i, Q: $ }[z] || String(z || "").toLowerCase().replace(/s$/, "");
|
|
1159
|
+
}, u: function(z) {
|
|
1160
|
+
return z === void 0;
|
|
1161
|
+
} }, T = "en", h = {};
|
|
1162
|
+
h[T] = j;
|
|
1163
|
+
var N = "$isDayjsObject", y = function(z) {
|
|
1164
|
+
return z instanceof ne || !(!z || !z[N]);
|
|
1165
|
+
}, F = function z(D, B, u) {
|
|
1166
|
+
var m;
|
|
1167
|
+
if (!D) return T;
|
|
1168
|
+
if (typeof D == "string") {
|
|
1169
|
+
var C = D.toLowerCase();
|
|
1170
|
+
h[C] && (m = C), B && (h[C] = B, m = C);
|
|
1171
|
+
var E = D.split("-");
|
|
1172
|
+
if (!m && E.length > 1) return z(E[0]);
|
|
1173
1173
|
} else {
|
|
1174
|
-
var
|
|
1175
|
-
|
|
1174
|
+
var L = D.name;
|
|
1175
|
+
h[L] = D, m = L;
|
|
1176
1176
|
}
|
|
1177
|
-
return !
|
|
1178
|
-
},
|
|
1179
|
-
if (y(
|
|
1180
|
-
var
|
|
1181
|
-
return
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
|
-
return
|
|
1177
|
+
return !u && m && (T = m), m || !u && T;
|
|
1178
|
+
}, O = function(z, D) {
|
|
1179
|
+
if (y(z)) return z.clone();
|
|
1180
|
+
var B = typeof D == "object" ? D : {};
|
|
1181
|
+
return B.date = z, B.args = arguments, new ne(B);
|
|
1182
|
+
}, R = v;
|
|
1183
|
+
R.l = F, R.i = y, R.w = function(z, D) {
|
|
1184
|
+
return O(z, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset });
|
|
1185
1185
|
};
|
|
1186
1186
|
var ne = function() {
|
|
1187
|
-
function
|
|
1188
|
-
this.$L =
|
|
1187
|
+
function z(B) {
|
|
1188
|
+
this.$L = F(B.locale, null, !0), this.parse(B), this.$x = this.$x || B.x || {}, this[N] = !0;
|
|
1189
1189
|
}
|
|
1190
|
-
var
|
|
1191
|
-
return
|
|
1192
|
-
this.$d = function(
|
|
1193
|
-
var
|
|
1194
|
-
if (
|
|
1195
|
-
if (
|
|
1196
|
-
if (
|
|
1197
|
-
if (typeof
|
|
1198
|
-
var
|
|
1199
|
-
if (
|
|
1200
|
-
var
|
|
1201
|
-
return
|
|
1190
|
+
var D = z.prototype;
|
|
1191
|
+
return D.parse = function(B) {
|
|
1192
|
+
this.$d = function(u) {
|
|
1193
|
+
var m = u.date, C = u.utc;
|
|
1194
|
+
if (m === null) return /* @__PURE__ */ new Date(NaN);
|
|
1195
|
+
if (R.u(m)) return /* @__PURE__ */ new Date();
|
|
1196
|
+
if (m instanceof Date) return new Date(m);
|
|
1197
|
+
if (typeof m == "string" && !/Z$/i.test(m)) {
|
|
1198
|
+
var E = m.match(w);
|
|
1199
|
+
if (E) {
|
|
1200
|
+
var L = E[2] - 1 || 0, q = (E[7] || "0").substring(0, 3);
|
|
1201
|
+
return C ? new Date(Date.UTC(E[1], L, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, q)) : new Date(E[1], L, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, q);
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
return new Date(
|
|
1205
|
-
}(
|
|
1206
|
-
},
|
|
1207
|
-
var
|
|
1208
|
-
this.$y =
|
|
1209
|
-
},
|
|
1210
|
-
return
|
|
1211
|
-
},
|
|
1204
|
+
return new Date(m);
|
|
1205
|
+
}(B), this.init();
|
|
1206
|
+
}, D.init = function() {
|
|
1207
|
+
var B = this.$d;
|
|
1208
|
+
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();
|
|
1209
|
+
}, D.$utils = function() {
|
|
1210
|
+
return R;
|
|
1211
|
+
}, D.isValid = function() {
|
|
1212
1212
|
return this.$d.toString() !== g;
|
|
1213
|
-
},
|
|
1214
|
-
var
|
|
1215
|
-
return this.startOf(
|
|
1216
|
-
},
|
|
1217
|
-
return
|
|
1218
|
-
},
|
|
1219
|
-
return this.endOf(
|
|
1220
|
-
},
|
|
1221
|
-
return
|
|
1222
|
-
},
|
|
1213
|
+
}, D.isSame = function(B, u) {
|
|
1214
|
+
var m = O(B);
|
|
1215
|
+
return this.startOf(u) <= m && m <= this.endOf(u);
|
|
1216
|
+
}, D.isAfter = function(B, u) {
|
|
1217
|
+
return O(B) < this.startOf(u);
|
|
1218
|
+
}, D.isBefore = function(B, u) {
|
|
1219
|
+
return this.endOf(u) < O(B);
|
|
1220
|
+
}, D.$g = function(B, u, m) {
|
|
1221
|
+
return R.u(B) ? this[u] : this.set(m, B);
|
|
1222
|
+
}, D.unix = function() {
|
|
1223
1223
|
return Math.floor(this.valueOf() / 1e3);
|
|
1224
|
-
},
|
|
1224
|
+
}, D.valueOf = function() {
|
|
1225
1225
|
return this.$d.getTime();
|
|
1226
|
-
},
|
|
1227
|
-
var
|
|
1228
|
-
var Se =
|
|
1229
|
-
return
|
|
1230
|
-
},
|
|
1231
|
-
return
|
|
1232
|
-
},
|
|
1233
|
-
switch (
|
|
1234
|
-
case
|
|
1235
|
-
return
|
|
1236
|
-
case
|
|
1237
|
-
return
|
|
1226
|
+
}, D.startOf = function(B, u) {
|
|
1227
|
+
var m = this, C = !!R.u(u) || u, E = R.p(B), L = function(pe, de) {
|
|
1228
|
+
var Se = R.w(m.$u ? Date.UTC(m.$y, de, pe) : new Date(m.$y, de, pe), m);
|
|
1229
|
+
return C ? Se : Se.endOf(c);
|
|
1230
|
+
}, q = function(pe, de) {
|
|
1231
|
+
return R.w(m.toDate()[pe].apply(m.toDate("s"), (C ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(de)), m);
|
|
1232
|
+
}, H = this.$W, K = this.$M, X = this.$D, P = "set" + (this.$u ? "UTC" : "");
|
|
1233
|
+
switch (E) {
|
|
1234
|
+
case S:
|
|
1235
|
+
return C ? L(1, 0) : L(31, 11);
|
|
1236
|
+
case _:
|
|
1237
|
+
return C ? L(1, K) : L(0, K + 1);
|
|
1238
1238
|
case p:
|
|
1239
|
-
var
|
|
1240
|
-
return
|
|
1239
|
+
var Z = this.$locale().weekStart || 0, ae = (H < Z ? H + 7 : H) - Z;
|
|
1240
|
+
return L(C ? X - ae : X + (6 - ae), K);
|
|
1241
1241
|
case c:
|
|
1242
|
-
case
|
|
1243
|
-
return
|
|
1242
|
+
case A:
|
|
1243
|
+
return q(P + "Hours", 0);
|
|
1244
1244
|
case a:
|
|
1245
|
-
return
|
|
1245
|
+
return q(P + "Minutes", 1);
|
|
1246
1246
|
case l:
|
|
1247
|
-
return
|
|
1247
|
+
return q(P + "Seconds", 2);
|
|
1248
1248
|
case s:
|
|
1249
|
-
return
|
|
1249
|
+
return q(P + "Milliseconds", 3);
|
|
1250
1250
|
default:
|
|
1251
1251
|
return this.clone();
|
|
1252
1252
|
}
|
|
1253
|
-
},
|
|
1254
|
-
return this.startOf(
|
|
1255
|
-
},
|
|
1256
|
-
var
|
|
1257
|
-
if (
|
|
1258
|
-
var
|
|
1259
|
-
|
|
1260
|
-
} else
|
|
1253
|
+
}, D.endOf = function(B) {
|
|
1254
|
+
return this.startOf(B, !1);
|
|
1255
|
+
}, D.$set = function(B, u) {
|
|
1256
|
+
var m, C = R.p(B), E = "set" + (this.$u ? "UTC" : ""), L = (m = {}, m[c] = E + "Date", m[A] = E + "Date", m[_] = E + "Month", m[S] = E + "FullYear", m[a] = E + "Hours", m[l] = E + "Minutes", m[s] = E + "Seconds", m[i] = E + "Milliseconds", m)[C], q = C === c ? this.$D + (u - this.$W) : u;
|
|
1257
|
+
if (C === _ || C === S) {
|
|
1258
|
+
var H = this.clone().set(A, 1);
|
|
1259
|
+
H.$d[L](q), H.init(), this.$d = H.set(A, Math.min(this.$D, H.daysInMonth())).$d;
|
|
1260
|
+
} else L && this.$d[L](q);
|
|
1261
1261
|
return this.init(), this;
|
|
1262
|
-
},
|
|
1263
|
-
return this.clone().$set(
|
|
1264
|
-
},
|
|
1265
|
-
return this[
|
|
1266
|
-
},
|
|
1267
|
-
var
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1270
|
-
var
|
|
1271
|
-
return
|
|
1262
|
+
}, D.set = function(B, u) {
|
|
1263
|
+
return this.clone().$set(B, u);
|
|
1264
|
+
}, D.get = function(B) {
|
|
1265
|
+
return this[R.p(B)]();
|
|
1266
|
+
}, D.add = function(B, u) {
|
|
1267
|
+
var m, C = this;
|
|
1268
|
+
B = Number(B);
|
|
1269
|
+
var E = R.p(u), L = function(K) {
|
|
1270
|
+
var X = O(C);
|
|
1271
|
+
return R.w(X.date(X.date() + Math.round(K * B)), C);
|
|
1272
1272
|
};
|
|
1273
|
-
if (
|
|
1274
|
-
if (
|
|
1275
|
-
if (
|
|
1276
|
-
if (
|
|
1277
|
-
var
|
|
1278
|
-
return
|
|
1279
|
-
},
|
|
1280
|
-
return this.add(-1 *
|
|
1281
|
-
},
|
|
1282
|
-
var
|
|
1283
|
-
if (!this.isValid()) return
|
|
1284
|
-
var
|
|
1285
|
-
return de && (de[Se] || de(
|
|
1273
|
+
if (E === _) return this.set(_, this.$M + B);
|
|
1274
|
+
if (E === S) return this.set(S, this.$y + B);
|
|
1275
|
+
if (E === c) return L(1);
|
|
1276
|
+
if (E === p) return L(7);
|
|
1277
|
+
var q = (m = {}, m[l] = o, m[a] = r, m[s] = n, m)[E] || 1, H = this.$d.getTime() + B * q;
|
|
1278
|
+
return R.w(H, this);
|
|
1279
|
+
}, D.subtract = function(B, u) {
|
|
1280
|
+
return this.add(-1 * B, u);
|
|
1281
|
+
}, D.format = function(B) {
|
|
1282
|
+
var u = this, m = this.$locale();
|
|
1283
|
+
if (!this.isValid()) return m.invalidDate || g;
|
|
1284
|
+
var C = B || "YYYY-MM-DDTHH:mm:ssZ", E = R.z(this), L = this.$H, q = this.$m, H = this.$M, K = m.weekdays, X = m.months, P = m.meridiem, Z = function(de, Se, Oe, Ie) {
|
|
1285
|
+
return de && (de[Se] || de(u, C)) || Oe[Se].slice(0, Ie);
|
|
1286
1286
|
}, ae = function(de) {
|
|
1287
|
-
return
|
|
1288
|
-
}, pe =
|
|
1287
|
+
return R.s(L % 12 || 12, de, "0");
|
|
1288
|
+
}, pe = P || function(de, Se, Oe) {
|
|
1289
1289
|
var Ie = de < 12 ? "AM" : "PM";
|
|
1290
1290
|
return Oe ? Ie.toLowerCase() : Ie;
|
|
1291
1291
|
};
|
|
1292
|
-
return
|
|
1292
|
+
return C.replace(b, function(de, Se) {
|
|
1293
1293
|
return Se || function(Oe) {
|
|
1294
1294
|
switch (Oe) {
|
|
1295
1295
|
case "YY":
|
|
1296
|
-
return String(
|
|
1296
|
+
return String(u.$y).slice(-2);
|
|
1297
1297
|
case "YYYY":
|
|
1298
|
-
return
|
|
1298
|
+
return R.s(u.$y, 4, "0");
|
|
1299
1299
|
case "M":
|
|
1300
|
-
return
|
|
1300
|
+
return H + 1;
|
|
1301
1301
|
case "MM":
|
|
1302
|
-
return
|
|
1302
|
+
return R.s(H + 1, 2, "0");
|
|
1303
1303
|
case "MMM":
|
|
1304
|
-
return
|
|
1304
|
+
return Z(m.monthsShort, H, X, 3);
|
|
1305
1305
|
case "MMMM":
|
|
1306
|
-
return X
|
|
1306
|
+
return Z(X, H);
|
|
1307
1307
|
case "D":
|
|
1308
|
-
return
|
|
1308
|
+
return u.$D;
|
|
1309
1309
|
case "DD":
|
|
1310
|
-
return
|
|
1310
|
+
return R.s(u.$D, 2, "0");
|
|
1311
1311
|
case "d":
|
|
1312
|
-
return String(
|
|
1312
|
+
return String(u.$W);
|
|
1313
1313
|
case "dd":
|
|
1314
|
-
return
|
|
1314
|
+
return Z(m.weekdaysMin, u.$W, K, 2);
|
|
1315
1315
|
case "ddd":
|
|
1316
|
-
return
|
|
1316
|
+
return Z(m.weekdaysShort, u.$W, K, 3);
|
|
1317
1317
|
case "dddd":
|
|
1318
|
-
return
|
|
1318
|
+
return K[u.$W];
|
|
1319
1319
|
case "H":
|
|
1320
|
-
return String(
|
|
1320
|
+
return String(L);
|
|
1321
1321
|
case "HH":
|
|
1322
|
-
return
|
|
1322
|
+
return R.s(L, 2, "0");
|
|
1323
1323
|
case "h":
|
|
1324
1324
|
return ae(1);
|
|
1325
1325
|
case "hh":
|
|
1326
1326
|
return ae(2);
|
|
1327
1327
|
case "a":
|
|
1328
|
-
return pe(
|
|
1328
|
+
return pe(L, q, !0);
|
|
1329
1329
|
case "A":
|
|
1330
|
-
return pe(
|
|
1330
|
+
return pe(L, q, !1);
|
|
1331
1331
|
case "m":
|
|
1332
|
-
return String(
|
|
1332
|
+
return String(q);
|
|
1333
1333
|
case "mm":
|
|
1334
|
-
return
|
|
1334
|
+
return R.s(q, 2, "0");
|
|
1335
1335
|
case "s":
|
|
1336
|
-
return String(
|
|
1336
|
+
return String(u.$s);
|
|
1337
1337
|
case "ss":
|
|
1338
|
-
return
|
|
1338
|
+
return R.s(u.$s, 2, "0");
|
|
1339
1339
|
case "SSS":
|
|
1340
|
-
return
|
|
1340
|
+
return R.s(u.$ms, 3, "0");
|
|
1341
1341
|
case "Z":
|
|
1342
|
-
return
|
|
1342
|
+
return E;
|
|
1343
1343
|
}
|
|
1344
1344
|
return null;
|
|
1345
|
-
}(de) ||
|
|
1345
|
+
}(de) || E.replace(":", "");
|
|
1346
1346
|
});
|
|
1347
|
-
},
|
|
1347
|
+
}, D.utcOffset = function() {
|
|
1348
1348
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1349
|
-
},
|
|
1350
|
-
var
|
|
1351
|
-
return
|
|
1349
|
+
}, D.diff = function(B, u, m) {
|
|
1350
|
+
var C, E = this, L = R.p(u), q = O(B), H = (q.utcOffset() - this.utcOffset()) * o, K = this - q, X = function() {
|
|
1351
|
+
return R.m(E, q);
|
|
1352
1352
|
};
|
|
1353
|
-
switch (
|
|
1354
|
-
case
|
|
1355
|
-
|
|
1353
|
+
switch (L) {
|
|
1354
|
+
case S:
|
|
1355
|
+
C = X() / 12;
|
|
1356
1356
|
break;
|
|
1357
|
-
case
|
|
1358
|
-
|
|
1357
|
+
case _:
|
|
1358
|
+
C = X();
|
|
1359
1359
|
break;
|
|
1360
|
-
case
|
|
1361
|
-
|
|
1360
|
+
case $:
|
|
1361
|
+
C = X() / 3;
|
|
1362
1362
|
break;
|
|
1363
1363
|
case p:
|
|
1364
|
-
|
|
1364
|
+
C = (K - H) / 6048e5;
|
|
1365
1365
|
break;
|
|
1366
1366
|
case c:
|
|
1367
|
-
|
|
1367
|
+
C = (K - H) / 864e5;
|
|
1368
1368
|
break;
|
|
1369
1369
|
case a:
|
|
1370
|
-
|
|
1370
|
+
C = K / r;
|
|
1371
1371
|
break;
|
|
1372
1372
|
case l:
|
|
1373
|
-
|
|
1373
|
+
C = K / o;
|
|
1374
1374
|
break;
|
|
1375
1375
|
case s:
|
|
1376
|
-
|
|
1376
|
+
C = K / n;
|
|
1377
1377
|
break;
|
|
1378
1378
|
default:
|
|
1379
|
-
|
|
1379
|
+
C = K;
|
|
1380
1380
|
}
|
|
1381
|
-
return
|
|
1382
|
-
},
|
|
1383
|
-
return this.endOf(
|
|
1384
|
-
},
|
|
1385
|
-
return
|
|
1386
|
-
},
|
|
1387
|
-
if (!
|
|
1388
|
-
var
|
|
1389
|
-
return
|
|
1390
|
-
},
|
|
1391
|
-
return
|
|
1392
|
-
},
|
|
1381
|
+
return m ? C : R.a(C);
|
|
1382
|
+
}, D.daysInMonth = function() {
|
|
1383
|
+
return this.endOf(_).$D;
|
|
1384
|
+
}, D.$locale = function() {
|
|
1385
|
+
return h[this.$L];
|
|
1386
|
+
}, D.locale = function(B, u) {
|
|
1387
|
+
if (!B) return this.$L;
|
|
1388
|
+
var m = this.clone(), C = F(B, u, !0);
|
|
1389
|
+
return C && (m.$L = C), m;
|
|
1390
|
+
}, D.clone = function() {
|
|
1391
|
+
return R.w(this.$d, this);
|
|
1392
|
+
}, D.toDate = function() {
|
|
1393
1393
|
return new Date(this.valueOf());
|
|
1394
|
-
},
|
|
1394
|
+
}, D.toJSON = function() {
|
|
1395
1395
|
return this.isValid() ? this.toISOString() : null;
|
|
1396
|
-
},
|
|
1396
|
+
}, D.toISOString = function() {
|
|
1397
1397
|
return this.$d.toISOString();
|
|
1398
|
-
},
|
|
1398
|
+
}, D.toString = function() {
|
|
1399
1399
|
return this.$d.toUTCString();
|
|
1400
|
-
},
|
|
1401
|
-
}(),
|
|
1402
|
-
return
|
|
1403
|
-
|
|
1404
|
-
return this.$g(
|
|
1400
|
+
}, z;
|
|
1401
|
+
}(), x = ne.prototype;
|
|
1402
|
+
return O.prototype = x, [["$ms", i], ["$s", s], ["$m", l], ["$H", a], ["$W", c], ["$M", _], ["$y", S], ["$D", A]].forEach(function(z) {
|
|
1403
|
+
x[z[1]] = function(D) {
|
|
1404
|
+
return this.$g(D, z[0], z[1]);
|
|
1405
1405
|
};
|
|
1406
|
-
}),
|
|
1407
|
-
return
|
|
1408
|
-
},
|
|
1409
|
-
return
|
|
1410
|
-
},
|
|
1406
|
+
}), O.extend = function(z, D) {
|
|
1407
|
+
return z.$i || (z(D, ne, O), z.$i = !0), O;
|
|
1408
|
+
}, O.locale = F, O.isDayjs = y, O.unix = function(z) {
|
|
1409
|
+
return O(1e3 * z);
|
|
1410
|
+
}, O.en = h[T], O.Ls = h, O.p = {}, O;
|
|
1411
1411
|
});
|
|
1412
1412
|
})(an);
|
|
1413
1413
|
var Ho = an.exports;
|
|
@@ -1417,118 +1417,118 @@ var sn = { exports: {} };
|
|
|
1417
1417
|
(function(n, o) {
|
|
1418
1418
|
e.exports = o();
|
|
1419
1419
|
})(at, function() {
|
|
1420
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d/, i = /\d\d/, s = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, a = {}, c = function(
|
|
1421
|
-
return (
|
|
1422
|
-
}, p = function(
|
|
1420
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d/, i = /\d\d/, s = /\d\d?/, l = /\d*[^-_:/,()\s\d]+/, a = {}, c = function(w) {
|
|
1421
|
+
return (w = +w) + (w > 68 ? 1900 : 2e3);
|
|
1422
|
+
}, p = function(w) {
|
|
1423
1423
|
return function(b) {
|
|
1424
|
-
this[
|
|
1424
|
+
this[w] = +b;
|
|
1425
1425
|
};
|
|
1426
|
-
},
|
|
1426
|
+
}, _ = [/[+-]\d\d:?(\d\d)?|Z/, function(w) {
|
|
1427
1427
|
(this.zone || (this.zone = {})).offset = function(b) {
|
|
1428
1428
|
if (!b || b === "Z") return 0;
|
|
1429
|
-
var j = b.match(/([+-]|\d\d)/g),
|
|
1430
|
-
return
|
|
1431
|
-
}(
|
|
1432
|
-
}],
|
|
1433
|
-
var b = a[
|
|
1429
|
+
var j = b.match(/([+-]|\d\d)/g), I = 60 * j[1] + (+j[2] || 0);
|
|
1430
|
+
return I === 0 ? 0 : j[0] === "+" ? -I : I;
|
|
1431
|
+
}(w);
|
|
1432
|
+
}], $ = function(w) {
|
|
1433
|
+
var b = a[w];
|
|
1434
1434
|
return b && (b.indexOf ? b : b.s.concat(b.f));
|
|
1435
|
-
},
|
|
1436
|
-
var j,
|
|
1437
|
-
if (
|
|
1438
|
-
for (var
|
|
1439
|
-
j =
|
|
1435
|
+
}, S = function(w, b) {
|
|
1436
|
+
var j, I = a.meridiem;
|
|
1437
|
+
if (I) {
|
|
1438
|
+
for (var v = 1; v <= 24; v += 1) if (w.indexOf(I(v, 0, b)) > -1) {
|
|
1439
|
+
j = v > 12;
|
|
1440
1440
|
break;
|
|
1441
1441
|
}
|
|
1442
|
-
} else j =
|
|
1442
|
+
} else j = w === (b ? "pm" : "PM");
|
|
1443
1443
|
return j;
|
|
1444
|
-
},
|
|
1445
|
-
this.afternoon = w
|
|
1446
|
-
}], a: [l, function(
|
|
1447
|
-
this.afternoon = w
|
|
1448
|
-
}], Q: [r, function(
|
|
1449
|
-
this.month = 3 * (
|
|
1450
|
-
}], S: [r, function(
|
|
1451
|
-
this.milliseconds = 100 * +
|
|
1452
|
-
}], SS: [i, function(
|
|
1453
|
-
this.milliseconds = 10 * +
|
|
1454
|
-
}], SSS: [/\d{3}/, function(
|
|
1455
|
-
this.milliseconds = +
|
|
1456
|
-
}], s: [s, p("seconds")], ss: [s, p("seconds")], m: [s, p("minutes")], mm: [s, p("minutes")], H: [s, p("hours")], h: [s, p("hours")], HH: [s, p("hours")], hh: [s, p("hours")], D: [s, p("day")], DD: [i, p("day")], Do: [l, function(
|
|
1457
|
-
var b = a.ordinal, j =
|
|
1458
|
-
if (this.day = j[0], b) for (var
|
|
1459
|
-
}], w: [s, p("week")], ww: [i, p("week")], M: [s, p("month")], MM: [i, p("month")], MMM: [l, function(
|
|
1460
|
-
var b =
|
|
1461
|
-
return
|
|
1462
|
-
})).indexOf(
|
|
1444
|
+
}, A = { A: [l, function(w) {
|
|
1445
|
+
this.afternoon = S(w, !1);
|
|
1446
|
+
}], a: [l, function(w) {
|
|
1447
|
+
this.afternoon = S(w, !0);
|
|
1448
|
+
}], Q: [r, function(w) {
|
|
1449
|
+
this.month = 3 * (w - 1) + 1;
|
|
1450
|
+
}], S: [r, function(w) {
|
|
1451
|
+
this.milliseconds = 100 * +w;
|
|
1452
|
+
}], SS: [i, function(w) {
|
|
1453
|
+
this.milliseconds = 10 * +w;
|
|
1454
|
+
}], SSS: [/\d{3}/, function(w) {
|
|
1455
|
+
this.milliseconds = +w;
|
|
1456
|
+
}], s: [s, p("seconds")], ss: [s, p("seconds")], m: [s, p("minutes")], mm: [s, p("minutes")], H: [s, p("hours")], h: [s, p("hours")], HH: [s, p("hours")], hh: [s, p("hours")], D: [s, p("day")], DD: [i, p("day")], Do: [l, function(w) {
|
|
1457
|
+
var b = a.ordinal, j = w.match(/\d+/);
|
|
1458
|
+
if (this.day = j[0], b) for (var I = 1; I <= 31; I += 1) b(I).replace(/\[|\]/g, "") === w && (this.day = I);
|
|
1459
|
+
}], w: [s, p("week")], ww: [i, p("week")], M: [s, p("month")], MM: [i, p("month")], MMM: [l, function(w) {
|
|
1460
|
+
var b = $("months"), j = ($("monthsShort") || b.map(function(I) {
|
|
1461
|
+
return I.slice(0, 3);
|
|
1462
|
+
})).indexOf(w) + 1;
|
|
1463
1463
|
if (j < 1) throw new Error();
|
|
1464
1464
|
this.month = j % 12 || j;
|
|
1465
|
-
}], MMMM: [l, function(
|
|
1466
|
-
var b =
|
|
1465
|
+
}], MMMM: [l, function(w) {
|
|
1466
|
+
var b = $("months").indexOf(w) + 1;
|
|
1467
1467
|
if (b < 1) throw new Error();
|
|
1468
1468
|
this.month = b % 12 || b;
|
|
1469
|
-
}], Y: [/[+-]?\d+/, p("year")], YY: [i, function(
|
|
1470
|
-
this.year = c(
|
|
1471
|
-
}], YYYY: [/\d{4}/, p("year")], Z:
|
|
1472
|
-
function g(
|
|
1469
|
+
}], Y: [/[+-]?\d+/, p("year")], YY: [i, function(w) {
|
|
1470
|
+
this.year = c(w);
|
|
1471
|
+
}], YYYY: [/\d{4}/, p("year")], Z: _, ZZ: _ };
|
|
1472
|
+
function g(w) {
|
|
1473
1473
|
var b, j;
|
|
1474
|
-
b =
|
|
1475
|
-
for (var
|
|
1476
|
-
var
|
|
1477
|
-
return
|
|
1478
|
-
return
|
|
1474
|
+
b = w, j = a && a.formats;
|
|
1475
|
+
for (var I = (w = b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(O, R, ne) {
|
|
1476
|
+
var x = ne && ne.toUpperCase();
|
|
1477
|
+
return R || j[ne] || n[ne] || j[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(z, D, B) {
|
|
1478
|
+
return D || B.slice(1);
|
|
1479
1479
|
});
|
|
1480
|
-
})).match(o),
|
|
1481
|
-
var
|
|
1482
|
-
|
|
1480
|
+
})).match(o), v = I.length, T = 0; T < v; T += 1) {
|
|
1481
|
+
var h = I[T], N = A[h], y = N && N[0], F = N && N[1];
|
|
1482
|
+
I[T] = F ? { regex: y, parser: F } : h.replace(/^\[|\]$/g, "");
|
|
1483
1483
|
}
|
|
1484
|
-
return function(
|
|
1485
|
-
for (var
|
|
1486
|
-
var
|
|
1487
|
-
if (typeof
|
|
1484
|
+
return function(O) {
|
|
1485
|
+
for (var R = {}, ne = 0, x = 0; ne < v; ne += 1) {
|
|
1486
|
+
var z = I[ne];
|
|
1487
|
+
if (typeof z == "string") x += z.length;
|
|
1488
1488
|
else {
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1489
|
+
var D = z.regex, B = z.parser, u = O.slice(x), m = D.exec(u)[0];
|
|
1490
|
+
B.call(R, m), O = O.replace(m, "");
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
|
-
return function(
|
|
1494
|
-
var
|
|
1495
|
-
if (
|
|
1496
|
-
var
|
|
1497
|
-
|
|
1493
|
+
return function(C) {
|
|
1494
|
+
var E = C.afternoon;
|
|
1495
|
+
if (E !== void 0) {
|
|
1496
|
+
var L = C.hours;
|
|
1497
|
+
E ? L < 12 && (C.hours += 12) : L === 12 && (C.hours = 0), delete C.afternoon;
|
|
1498
1498
|
}
|
|
1499
|
-
}(
|
|
1499
|
+
}(R), R;
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
return function(
|
|
1503
|
-
j.p.customParseFormat = !0,
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1506
|
-
var
|
|
1502
|
+
return function(w, b, j) {
|
|
1503
|
+
j.p.customParseFormat = !0, w && w.parseTwoDigitYear && (c = w.parseTwoDigitYear);
|
|
1504
|
+
var I = b.prototype, v = I.parse;
|
|
1505
|
+
I.parse = function(T) {
|
|
1506
|
+
var h = T.date, N = T.utc, y = T.args;
|
|
1507
1507
|
this.$u = N;
|
|
1508
|
-
var
|
|
1509
|
-
if (typeof
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1508
|
+
var F = y[1];
|
|
1509
|
+
if (typeof F == "string") {
|
|
1510
|
+
var O = y[2] === !0, R = y[3] === !0, ne = O || R, x = y[2];
|
|
1511
|
+
R && (x = y[2]), a = this.$locale(), !O && x && (a = j.Ls[x]), this.$d = function(u, m, C, E) {
|
|
1512
1512
|
try {
|
|
1513
|
-
if (["x", "X"].indexOf(
|
|
1514
|
-
var
|
|
1515
|
-
|
|
1516
|
-
var
|
|
1517
|
-
return pe ? new Date(Date.UTC(Ie,
|
|
1513
|
+
if (["x", "X"].indexOf(m) > -1) return new Date((m === "X" ? 1e3 : 1) * u);
|
|
1514
|
+
var L = g(m)(u), q = L.year, H = L.month, K = L.day, X = L.hours, P = L.minutes, Z = L.seconds, ae = L.milliseconds, pe = L.zone, de = L.week, Se = /* @__PURE__ */ new Date(), Oe = K || (q || H ? 1 : Se.getDate()), Ie = q || Se.getFullYear(), Re = 0;
|
|
1515
|
+
q && !H || (Re = H > 0 ? H - 1 : Se.getMonth());
|
|
1516
|
+
var xe, et = X || 0, qe = P || 0, f = Z || 0, d = ae || 0;
|
|
1517
|
+
return pe ? new Date(Date.UTC(Ie, Re, Oe, et, qe, f, d + 60 * pe.offset * 1e3)) : C ? new Date(Date.UTC(Ie, Re, Oe, et, qe, f, d)) : (xe = new Date(Ie, Re, Oe, et, qe, f, d), de && (xe = E(xe).week(de).toDate()), xe);
|
|
1518
1518
|
} catch {
|
|
1519
1519
|
return /* @__PURE__ */ new Date("");
|
|
1520
1520
|
}
|
|
1521
|
-
}(
|
|
1522
|
-
} else if (
|
|
1523
|
-
y[1] =
|
|
1524
|
-
var
|
|
1525
|
-
if (
|
|
1526
|
-
this.$d =
|
|
1521
|
+
}(h, F, N, j), this.init(), x && x !== !0 && (this.$L = this.locale(x).$L), ne && h != this.format(F) && (this.$d = /* @__PURE__ */ new Date("")), a = {};
|
|
1522
|
+
} else if (F instanceof Array) for (var z = F.length, D = 1; D <= z; D += 1) {
|
|
1523
|
+
y[1] = F[D - 1];
|
|
1524
|
+
var B = j.apply(this, y);
|
|
1525
|
+
if (B.isValid()) {
|
|
1526
|
+
this.$d = B.$d, this.$L = B.$L, this.init();
|
|
1527
1527
|
break;
|
|
1528
1528
|
}
|
|
1529
|
-
|
|
1529
|
+
D === z && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1530
1530
|
}
|
|
1531
|
-
else
|
|
1531
|
+
else v.call(this, T);
|
|
1532
1532
|
};
|
|
1533
1533
|
};
|
|
1534
1534
|
});
|
|
@@ -1542,56 +1542,56 @@ var ln = { exports: {} };
|
|
|
1542
1542
|
})(at, function() {
|
|
1543
1543
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
1544
1544
|
return function(r, i, s) {
|
|
1545
|
-
var l, a = function(
|
|
1546
|
-
|
|
1547
|
-
var g = new Date(
|
|
1545
|
+
var l, a = function($, S, A) {
|
|
1546
|
+
A === void 0 && (A = {});
|
|
1547
|
+
var g = new Date($), w = function(b, j) {
|
|
1548
1548
|
j === void 0 && (j = {});
|
|
1549
|
-
var
|
|
1550
|
-
return
|
|
1551
|
-
}(
|
|
1552
|
-
return
|
|
1553
|
-
}, c = function(
|
|
1554
|
-
for (var
|
|
1555
|
-
var b =
|
|
1556
|
-
|
|
1549
|
+
var I = j.timeZoneName || "short", v = b + "|" + I, T = o[v];
|
|
1550
|
+
return T || (T = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: I }), o[v] = T), T;
|
|
1551
|
+
}(S, A);
|
|
1552
|
+
return w.formatToParts(g);
|
|
1553
|
+
}, c = function($, S) {
|
|
1554
|
+
for (var A = a($, S), g = [], w = 0; w < A.length; w += 1) {
|
|
1555
|
+
var b = A[w], j = b.type, I = b.value, v = n[j];
|
|
1556
|
+
v >= 0 && (g[v] = parseInt(I, 10));
|
|
1557
1557
|
}
|
|
1558
|
-
var
|
|
1558
|
+
var T = g[3], h = T === 24 ? 0 : T, N = g[0] + "-" + g[1] + "-" + g[2] + " " + h + ":" + g[4] + ":" + g[5] + ":000", y = +$;
|
|
1559
1559
|
return (s.utc(N).valueOf() - (y -= y % 1e3)) / 6e4;
|
|
1560
1560
|
}, p = i.prototype;
|
|
1561
|
-
p.tz = function(
|
|
1562
|
-
|
|
1563
|
-
var
|
|
1564
|
-
if (!Number(
|
|
1565
|
-
else if (
|
|
1566
|
-
var
|
|
1567
|
-
|
|
1561
|
+
p.tz = function($, S) {
|
|
1562
|
+
$ === void 0 && ($ = l);
|
|
1563
|
+
var A, g = this.utcOffset(), w = this.toDate(), b = w.toLocaleString("en-US", { timeZone: $ }), j = Math.round((w - new Date(b)) / 1e3 / 60), I = 15 * -Math.round(w.getTimezoneOffset() / 15) - j;
|
|
1564
|
+
if (!Number(I)) A = this.utcOffset(0, S);
|
|
1565
|
+
else if (A = s(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(I, !0), S) {
|
|
1566
|
+
var v = A.utcOffset();
|
|
1567
|
+
A = A.add(g - v, "minute");
|
|
1568
1568
|
}
|
|
1569
|
-
return
|
|
1570
|
-
}, p.offsetName = function(
|
|
1571
|
-
var
|
|
1569
|
+
return A.$x.$timezone = $, A;
|
|
1570
|
+
}, p.offsetName = function($) {
|
|
1571
|
+
var S = this.$x.$timezone || s.tz.guess(), A = a(this.valueOf(), S, { timeZoneName: $ }).find(function(g) {
|
|
1572
1572
|
return g.type.toLowerCase() === "timezonename";
|
|
1573
1573
|
});
|
|
1574
|
-
return
|
|
1574
|
+
return A && A.value;
|
|
1575
1575
|
};
|
|
1576
|
-
var
|
|
1577
|
-
p.startOf = function(
|
|
1578
|
-
if (!this.$x || !this.$x.$timezone) return
|
|
1579
|
-
var
|
|
1580
|
-
return
|
|
1581
|
-
}, s.tz = function(
|
|
1582
|
-
var g =
|
|
1583
|
-
if (typeof
|
|
1584
|
-
var j = function(
|
|
1585
|
-
var
|
|
1586
|
-
if (N ===
|
|
1587
|
-
var
|
|
1588
|
-
return
|
|
1589
|
-
}(s.utc(
|
|
1590
|
-
return
|
|
1576
|
+
var _ = p.startOf;
|
|
1577
|
+
p.startOf = function($, S) {
|
|
1578
|
+
if (!this.$x || !this.$x.$timezone) return _.call(this, $, S);
|
|
1579
|
+
var A = s(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1580
|
+
return _.call(A, $, S).tz(this.$x.$timezone, !0);
|
|
1581
|
+
}, s.tz = function($, S, A) {
|
|
1582
|
+
var g = A && S, w = A || S || l, b = c(+s(), w);
|
|
1583
|
+
if (typeof $ != "string") return s($).tz(w);
|
|
1584
|
+
var j = function(h, N, y) {
|
|
1585
|
+
var F = h - 60 * N * 1e3, O = c(F, y);
|
|
1586
|
+
if (N === O) return [F, N];
|
|
1587
|
+
var R = c(F -= 60 * (O - N) * 1e3, y);
|
|
1588
|
+
return O === R ? [F, O] : [h - 60 * Math.min(O, R) * 1e3, Math.max(O, R)];
|
|
1589
|
+
}(s.utc($, g).valueOf(), b, w), I = j[0], v = j[1], T = s(I).utcOffset(v);
|
|
1590
|
+
return T.$x.$timezone = w, T;
|
|
1591
1591
|
}, s.tz.guess = function() {
|
|
1592
1592
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1593
|
-
}, s.tz.setDefault = function(
|
|
1594
|
-
l =
|
|
1593
|
+
}, s.tz.setDefault = function($) {
|
|
1594
|
+
l = $;
|
|
1595
1595
|
};
|
|
1596
1596
|
};
|
|
1597
1597
|
});
|
|
@@ -1607,11 +1607,11 @@ var cn = { exports: {} };
|
|
|
1607
1607
|
return function(i, s, l) {
|
|
1608
1608
|
var a = s.prototype;
|
|
1609
1609
|
l.utc = function(g) {
|
|
1610
|
-
var
|
|
1611
|
-
return new s(
|
|
1610
|
+
var w = { date: g, utc: !0, args: arguments };
|
|
1611
|
+
return new s(w);
|
|
1612
1612
|
}, a.utc = function(g) {
|
|
1613
|
-
var
|
|
1614
|
-
return g ?
|
|
1613
|
+
var w = l(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1614
|
+
return g ? w.add(this.utcOffset(), n) : w;
|
|
1615
1615
|
}, a.local = function() {
|
|
1616
1616
|
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1617
1617
|
};
|
|
@@ -1626,28 +1626,28 @@ var cn = { exports: {} };
|
|
|
1626
1626
|
this.$y = g.getUTCFullYear(), this.$M = g.getUTCMonth(), this.$D = g.getUTCDate(), this.$W = g.getUTCDay(), this.$H = g.getUTCHours(), this.$m = g.getUTCMinutes(), this.$s = g.getUTCSeconds(), this.$ms = g.getUTCMilliseconds();
|
|
1627
1627
|
} else p.call(this);
|
|
1628
1628
|
};
|
|
1629
|
-
var
|
|
1630
|
-
a.utcOffset = function(g,
|
|
1629
|
+
var _ = a.utcOffset;
|
|
1630
|
+
a.utcOffset = function(g, w) {
|
|
1631
1631
|
var b = this.$utils().u;
|
|
1632
|
-
if (b(g)) return this.$u ? 0 : b(this.$offset) ?
|
|
1633
|
-
if (typeof g == "string" && (g = function(
|
|
1634
|
-
|
|
1635
|
-
var
|
|
1636
|
-
if (!
|
|
1637
|
-
var N = ("" +
|
|
1638
|
-
return
|
|
1632
|
+
if (b(g)) return this.$u ? 0 : b(this.$offset) ? _.call(this) : this.$offset;
|
|
1633
|
+
if (typeof g == "string" && (g = function(T) {
|
|
1634
|
+
T === void 0 && (T = "");
|
|
1635
|
+
var h = T.match(o);
|
|
1636
|
+
if (!h) return null;
|
|
1637
|
+
var N = ("" + h[0]).match(r) || ["-", 0, 0], y = N[0], F = 60 * +N[1] + +N[2];
|
|
1638
|
+
return F === 0 ? 0 : y === "+" ? F : -F;
|
|
1639
1639
|
}(g), g === null)) return this;
|
|
1640
1640
|
var j = Math.abs(g) <= 16 ? 60 * g : g;
|
|
1641
|
-
if (j === 0) return this.utc(
|
|
1642
|
-
var
|
|
1643
|
-
if (
|
|
1644
|
-
var
|
|
1645
|
-
return (
|
|
1641
|
+
if (j === 0) return this.utc(w);
|
|
1642
|
+
var I = this.clone();
|
|
1643
|
+
if (w) return I.$offset = j, I.$u = !1, I;
|
|
1644
|
+
var v = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1645
|
+
return (I = this.local().add(j + v, n)).$offset = j, I.$x.$localOffset = v, I;
|
|
1646
1646
|
};
|
|
1647
|
-
var
|
|
1647
|
+
var $ = a.format;
|
|
1648
1648
|
a.format = function(g) {
|
|
1649
|
-
var
|
|
1650
|
-
return
|
|
1649
|
+
var w = g || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1650
|
+
return $.call(this, w);
|
|
1651
1651
|
}, a.valueOf = function() {
|
|
1652
1652
|
var g = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1653
1653
|
return this.$d.valueOf() - 6e4 * g;
|
|
@@ -1658,15 +1658,15 @@ var cn = { exports: {} };
|
|
|
1658
1658
|
}, a.toString = function() {
|
|
1659
1659
|
return this.toDate().toUTCString();
|
|
1660
1660
|
};
|
|
1661
|
-
var
|
|
1661
|
+
var S = a.toDate;
|
|
1662
1662
|
a.toDate = function(g) {
|
|
1663
|
-
return g === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() :
|
|
1663
|
+
return g === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : S.call(this);
|
|
1664
1664
|
};
|
|
1665
|
-
var
|
|
1666
|
-
a.diff = function(g,
|
|
1667
|
-
if (g && this.$u === g.$u) return
|
|
1668
|
-
var j = this.local(),
|
|
1669
|
-
return
|
|
1665
|
+
var A = a.diff;
|
|
1666
|
+
a.diff = function(g, w, b) {
|
|
1667
|
+
if (g && this.$u === g.$u) return A.call(this, g, w, b);
|
|
1668
|
+
var j = this.local(), I = l(g).local();
|
|
1669
|
+
return A.call(j, I, w, b);
|
|
1670
1670
|
};
|
|
1671
1671
|
};
|
|
1672
1672
|
});
|
|
@@ -1965,7 +1965,7 @@ function vr(e, t = {}) {
|
|
|
1965
1965
|
infSchmId: t.infSchmId ?? se(e.raw.infSchmId),
|
|
1966
1966
|
emplid: t.emplid ?? se(e.raw.emplid),
|
|
1967
1967
|
// 保存优先使用接口出参里的信息集挂载 tagId,其次才回退到请求节点 tagId。
|
|
1968
|
-
tagId:
|
|
1968
|
+
tagId: Q(
|
|
1969
1969
|
e.tagId || i.tagId || l.tagId || t.tagId || e.requestTagId
|
|
1970
1970
|
),
|
|
1971
1971
|
infSetId: t.infSetId ?? e.infSetId,
|
|
@@ -1994,7 +1994,7 @@ function yn(e) {
|
|
|
1994
1994
|
return {
|
|
1995
1995
|
id: r.id,
|
|
1996
1996
|
code: r.code ?? i ?? r.value ?? r.id,
|
|
1997
|
-
label:
|
|
1997
|
+
label: Q(r.label ?? r.name ?? r.descr ?? r.descrshort ?? r.text ?? i ?? r.value ?? r.code),
|
|
1998
1998
|
name: se(r.name),
|
|
1999
1999
|
value: r.value ?? i ?? r.code ?? r.id ?? r.label ?? r.name,
|
|
2000
2000
|
raw: o
|
|
@@ -2006,18 +2006,18 @@ function hr(e, t, n) {
|
|
|
2006
2006
|
return o.length > 0 ? o.map((r) => Nt(r, t, n, o.length === 1)) : e.infSetMark || e.infSetFields || e.fields ? [Nt(e, t, n, !0)] : [];
|
|
2007
2007
|
}
|
|
2008
2008
|
function Nt(e, t, n, o) {
|
|
2009
|
-
const r = ie(e), i = gr(r.infSetMark ?? r), s = yr(r.infSetFields ?? r.fields ?? []), l = Sr(r.infSetValues ?? r.rows ?? r.data, s), a = l[0] ? St(l[0]) : bn(s), c = ie(r.tag), p =
|
|
2009
|
+
const r = ie(e), i = gr(r.infSetMark ?? r), s = yr(r.infSetFields ?? r.fields ?? []), l = Sr(r.infSetValues ?? r.rows ?? r.data, s), a = l[0] ? St(l[0]) : bn(s), c = ie(r.tag), p = Q(
|
|
2010
2010
|
r.tagId ?? r.infTagId ?? c.tagId ?? c.infTagId ?? i.raw.tagId ?? i.raw.infTagId
|
|
2011
|
-
),
|
|
2012
|
-
key:
|
|
2013
|
-
id:
|
|
2011
|
+
), _ = Q(t.tagId ?? n?.tagId), $ = Q(n?.key), S = o ? t.infSetId ?? n?.infSetId : void 0, A = o ? t.setId : void 0, g = o ? n?.code : void 0, w = i.setId || Q(r.setId), b = Q(r.infSetId) || w || Q(S), j = w || Q(A ?? b), I = i.code || Q(r.code ?? g ?? j), v = j || I || b || p, T = {
|
|
2012
|
+
key: v,
|
|
2013
|
+
id: v,
|
|
2014
2014
|
setId: j,
|
|
2015
|
-
code:
|
|
2015
|
+
code: I,
|
|
2016
2016
|
tagId: p,
|
|
2017
|
-
requestTagId:
|
|
2018
|
-
ownerNodeKey:
|
|
2017
|
+
requestTagId: _ || void 0,
|
|
2018
|
+
ownerNodeKey: $ || void 0,
|
|
2019
2019
|
infSetId: b,
|
|
2020
|
-
title: i.name ||
|
|
2020
|
+
title: i.name || Q(r.name ?? n?.tagName ?? v),
|
|
2021
2021
|
renderType: mr(i),
|
|
2022
2022
|
mark: i,
|
|
2023
2023
|
fields: s,
|
|
@@ -2026,17 +2026,17 @@ function Nt(e, t, n, o) {
|
|
|
2026
2026
|
operationInfo: ut(t.operationInfo ?? r.operationInfo),
|
|
2027
2027
|
raw: r
|
|
2028
2028
|
};
|
|
2029
|
-
return
|
|
2029
|
+
return T.renderType === "form" && l.length === 0 && (T.rows = [{ ...a, __rowKey: `${v}-0` }]), T;
|
|
2030
2030
|
}
|
|
2031
2031
|
function gr(e) {
|
|
2032
|
-
const t = ie(e), n =
|
|
2032
|
+
const t = ie(e), n = Q(t.htmlDisplay || "F");
|
|
2033
2033
|
return {
|
|
2034
|
-
name:
|
|
2034
|
+
name: Q(t.name ?? t.title),
|
|
2035
2035
|
parentName: se(t.parentName),
|
|
2036
2036
|
value: se(t.value),
|
|
2037
2037
|
type: se(t.type),
|
|
2038
|
-
code:
|
|
2039
|
-
setId:
|
|
2038
|
+
code: Q(t.code),
|
|
2039
|
+
setId: Q(t.setId ?? t.id ?? t.key),
|
|
2040
2040
|
htmlDisplay: n,
|
|
2041
2041
|
multRow: $e(t.multRow),
|
|
2042
2042
|
isRequired: $e(t.isRequired),
|
|
@@ -2047,10 +2047,10 @@ function yr(e) {
|
|
|
2047
2047
|
return (Array.isArray(e) ? e : []).map((n, o) => br(n, o));
|
|
2048
2048
|
}
|
|
2049
2049
|
function br(e, t) {
|
|
2050
|
-
const n = ie(e), o =
|
|
2050
|
+
const n = ie(e), o = Q(n.code ?? n.fieldCode ?? n.prop ?? n.key ?? `field_${t}`), r = Q(n.label ?? n.name ?? n.tagName ?? o), i = $n(n.interface ?? n.interfaceField), s = zt(n.cascadeDependFields);
|
|
2051
2051
|
return {
|
|
2052
|
-
id:
|
|
2053
|
-
key:
|
|
2052
|
+
id: Q(n.id ?? n.key ?? n.prop ?? o),
|
|
2053
|
+
key: Q(n.key ?? n.prop ?? o),
|
|
2054
2054
|
code: o,
|
|
2055
2055
|
label: r,
|
|
2056
2056
|
value: n.value ?? n.defaultValue ?? "",
|
|
@@ -2066,8 +2066,8 @@ function br(e, t) {
|
|
|
2066
2066
|
isRequired: $e(n.isRequired),
|
|
2067
2067
|
disabled: n.disabled === void 0 ? void 0 : $e(n.disabled),
|
|
2068
2068
|
span: Mn(n.span ?? n.colSpan),
|
|
2069
|
-
width:
|
|
2070
|
-
minWidth:
|
|
2069
|
+
width: Rt(n.width),
|
|
2070
|
+
minWidth: Rt(n.minWidth),
|
|
2071
2071
|
placeholder: se(n.placeholder),
|
|
2072
2072
|
options: yn(n.options),
|
|
2073
2073
|
interface: i,
|
|
@@ -2086,7 +2086,7 @@ function Sr(e, t) {
|
|
|
2086
2086
|
const i = ie(r);
|
|
2087
2087
|
return t.some((s) => i[s.code] !== void 0 || i[s.key] !== void 0);
|
|
2088
2088
|
}))
|
|
2089
|
-
return e.map((r, i) => ({ ...ie(r), __rowKey:
|
|
2089
|
+
return e.map((r, i) => ({ ...ie(r), __rowKey: Q(ie(r).__rowKey ?? ie(r).key ?? i) }));
|
|
2090
2090
|
const n = bn(t);
|
|
2091
2091
|
return Object.keys(n).length ? [{ ...n, __rowKey: "0" }] : [];
|
|
2092
2092
|
}
|
|
@@ -2094,13 +2094,13 @@ function bn(e) {
|
|
|
2094
2094
|
return e.reduce((t, n) => (t[n.code || n.key] = n.value, t), {});
|
|
2095
2095
|
}
|
|
2096
2096
|
function Sn(e, t, n = "") {
|
|
2097
|
-
const o = ie(e), r = Je(o, ["children", "list", "tags"]).flatMap((s) => Sn(s, t,
|
|
2097
|
+
const o = ie(e), r = Je(o, ["children", "list", "tags"]).flatMap((s) => Sn(s, t, Q(o.tagId ?? o.id ?? o.key))), i = $r(o.infSetList);
|
|
2098
2098
|
return r.length === 0 && i.length > 0 ? i.map((s, l) => Ir(o, s, t, n, l)) : [wr(o, t, n, r)];
|
|
2099
2099
|
}
|
|
2100
2100
|
function wr(e, t, n, o) {
|
|
2101
|
-
const r =
|
|
2101
|
+
const r = Q(e.tagId ?? e.id ?? e.key), i = Q(e.tagName ?? e.name ?? e.label ?? r);
|
|
2102
2102
|
return {
|
|
2103
|
-
key:
|
|
2103
|
+
key: Q(e.key ?? r),
|
|
2104
2104
|
id: r,
|
|
2105
2105
|
tagId: r,
|
|
2106
2106
|
tagName: i,
|
|
@@ -2110,7 +2110,7 @@ function wr(e, t, n, o) {
|
|
|
2110
2110
|
parentTagId: se(e.parentTagId ?? e.parentId ?? n),
|
|
2111
2111
|
parentId: se(e.parentTagId ?? e.parentId ?? n) ?? null,
|
|
2112
2112
|
infSchmId: se(e.infSchmId ?? t?.infSchmId),
|
|
2113
|
-
schemeId:
|
|
2113
|
+
schemeId: Q(e.infSchmId ?? t?.infSchmId),
|
|
2114
2114
|
infSetId: se(e.infSetId ?? e.setId),
|
|
2115
2115
|
setId: se(e.setId),
|
|
2116
2116
|
code: se(e.code),
|
|
@@ -2122,7 +2122,7 @@ function wr(e, t, n, o) {
|
|
|
2122
2122
|
};
|
|
2123
2123
|
}
|
|
2124
2124
|
function Ir(e, t, n, o, r) {
|
|
2125
|
-
const i =
|
|
2125
|
+
const i = Q(e.tagId ?? e.id ?? e.key), s = Q(e.tagName ?? e.name ?? e.label ?? i), l = t.infSetId || Q(t.setId), a = t.setId || l, c = l || `${i}-${r}`, p = t.code || se(e.code ?? l);
|
|
2126
2126
|
return {
|
|
2127
2127
|
key: c,
|
|
2128
2128
|
id: c,
|
|
@@ -2134,7 +2134,7 @@ function Ir(e, t, n, o, r) {
|
|
|
2134
2134
|
parentTagId: se(e.parentTagId ?? e.parentId ?? o),
|
|
2135
2135
|
parentId: se(e.parentTagId ?? e.parentId ?? o) ?? null,
|
|
2136
2136
|
infSchmId: se(e.infSchmId ?? n?.infSchmId),
|
|
2137
|
-
schemeId:
|
|
2137
|
+
schemeId: Q(e.infSchmId ?? n?.infSchmId),
|
|
2138
2138
|
infSetId: l,
|
|
2139
2139
|
setId: a,
|
|
2140
2140
|
code: p,
|
|
@@ -2151,13 +2151,13 @@ function Ir(e, t, n, o, r) {
|
|
|
2151
2151
|
};
|
|
2152
2152
|
}
|
|
2153
2153
|
function wn(e, t = {}) {
|
|
2154
|
-
const n = ie(e.globalInfoSchmMark ?? e.scheme ?? e), o =
|
|
2154
|
+
const n = ie(e.globalInfoSchmMark ?? e.scheme ?? e), o = Q(n.infSchmId ?? t.infSchmId), r = Q(n.emplid ?? t.emplid);
|
|
2155
2155
|
return !o && !r && Object.keys(n).length === 0 ? null : {
|
|
2156
2156
|
infSchmId: o,
|
|
2157
2157
|
emplid: r,
|
|
2158
2158
|
id: o,
|
|
2159
|
-
mark:
|
|
2160
|
-
config: Array.isArray(e.globalInfoSchmConfig) ? "" :
|
|
2159
|
+
mark: Q(n.globalInfoSchmMark ?? e.globalInfoSchmMark),
|
|
2160
|
+
config: Array.isArray(e.globalInfoSchmConfig) ? "" : Q(n.globalInfoSchmConfig ?? e.globalInfoSchmConfig),
|
|
2161
2161
|
raw: n
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
@@ -2171,7 +2171,7 @@ function $r(e) {
|
|
|
2171
2171
|
return Array.isArray(e) ? e.map((t) => {
|
|
2172
2172
|
const n = ie(t);
|
|
2173
2173
|
return {
|
|
2174
|
-
infSetId:
|
|
2174
|
+
infSetId: Q(n.infSetId ?? n.setId ?? n.id),
|
|
2175
2175
|
setId: se(n.setId),
|
|
2176
2176
|
// 信息集列表里的 code 是页面 section 插槽接管点,必须从树接口阶段保留下来。
|
|
2177
2177
|
code: se(n.code),
|
|
@@ -2219,17 +2219,17 @@ function ut(e) {
|
|
|
2219
2219
|
function zt(e) {
|
|
2220
2220
|
if (!Array.isArray(e))
|
|
2221
2221
|
return;
|
|
2222
|
-
const t = e.map((n) =>
|
|
2222
|
+
const t = e.map((n) => Q(n)).filter(Boolean);
|
|
2223
2223
|
return t.length ? t : void 0;
|
|
2224
2224
|
}
|
|
2225
2225
|
function Cr(e) {
|
|
2226
2226
|
if ($e(e.htmlDisplay)) return "html";
|
|
2227
2227
|
if ($e(e.multRow)) return "multi-row";
|
|
2228
|
-
const t =
|
|
2228
|
+
const t = Q(e.renderType).toLowerCase();
|
|
2229
2229
|
return t === "code" || t === "empty" ? t : "text";
|
|
2230
2230
|
}
|
|
2231
2231
|
function kr(e) {
|
|
2232
|
-
const t =
|
|
2232
|
+
const t = Q(e.fieldType ?? e.type ?? e.frontInputType ?? e.renderType).toLowerCase();
|
|
2233
2233
|
return t === "dtpicker" || t.includes("date") ? "date" : t === "select_remote" ? "select_remote" : t.includes("select") || t.includes("enum") || t.includes("radio") || t.includes("checkbox") ? "select" : t.includes("number") || t.includes("int") ? "number" : t.includes("bool") || t.includes("switch") ? "switch" : t.includes("file") || t.includes("upload") || t.includes("attachment") || t === "attach" ? "file" : t.includes("textarea") || t.includes("text_area") ? "textarea" : "text";
|
|
2234
2234
|
}
|
|
2235
2235
|
function Cn(e) {
|
|
@@ -2242,17 +2242,17 @@ function Mr(e) {
|
|
|
2242
2242
|
};
|
|
2243
2243
|
return e.multiple !== void 0 && (t.multiple = $e(e.multiple)), Object.keys(t).length ? t : void 0;
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function Rt(e) {
|
|
2246
2246
|
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
2247
2247
|
}
|
|
2248
2248
|
function ie(e) {
|
|
2249
2249
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function Q(e) {
|
|
2252
2252
|
return e == null ? "" : String(e).trim();
|
|
2253
2253
|
}
|
|
2254
2254
|
function se(e) {
|
|
2255
|
-
return
|
|
2255
|
+
return Q(e) || void 0;
|
|
2256
2256
|
}
|
|
2257
2257
|
function kn(e) {
|
|
2258
2258
|
const t = Mn(e);
|
|
@@ -2433,13 +2433,13 @@ const Ne = (e) => new Error(`[GlobalInfo] ${e}`), zr = (e) => [
|
|
|
2433
2433
|
function wt(e) {
|
|
2434
2434
|
return Array.isArray(e) ? `[${e.map((t) => wt(t)).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => `${JSON.stringify(n)}:${wt(o)}`).join(",")}}` : JSON.stringify(e);
|
|
2435
2435
|
}
|
|
2436
|
-
const
|
|
2437
|
-
const t = me(!1), n = me(!1), o = me(!1), r = Pe(null), i = Pe([]), s = Pe(null), l = Pe(null), a = Pe(null), c = Pe({}), p = Pe({}),
|
|
2436
|
+
const Rr = (e) => {
|
|
2437
|
+
const t = me(!1), n = me(!1), o = me(!1), r = Pe(null), i = Pe([]), s = Pe(null), l = Pe(null), a = Pe(null), c = Pe({}), p = Pe({}), _ = me([]), $ = Pe({}), S = me([]), A = V(
|
|
2438
2438
|
() => {
|
|
2439
|
-
const f =
|
|
2439
|
+
const f = _.value.map((M) => c.value[M]).filter((M) => !!M), d = Object.entries(c.value).filter(([M]) => !_.value.includes(M)).map(([, M]) => M);
|
|
2440
2440
|
return [...f, ...d];
|
|
2441
2441
|
}
|
|
2442
|
-
), g =
|
|
2442
|
+
), g = V(() => ({
|
|
2443
2443
|
// 整棵树是否正在加载。
|
|
2444
2444
|
loading: t.value,
|
|
2445
2445
|
// 当前详情是否正在加载。
|
|
@@ -2447,18 +2447,18 @@ const xr = (e) => {
|
|
|
2447
2447
|
// 当前是否正在保存。
|
|
2448
2448
|
saving: o.value,
|
|
2449
2449
|
// 当前所有编辑中的 section key。
|
|
2450
|
-
editingSectionKeys:
|
|
2450
|
+
editingSectionKeys: S.value,
|
|
2451
2451
|
// 已加载 section 映射。
|
|
2452
2452
|
sectionMap: c.value,
|
|
2453
2453
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
2454
2454
|
sectionStatusMap: Object.fromEntries(
|
|
2455
|
-
Object.entries(
|
|
2455
|
+
Object.entries($.value).map(([f, d]) => [
|
|
2456
2456
|
f,
|
|
2457
2457
|
{
|
|
2458
2458
|
// 保留原状态字段。
|
|
2459
2459
|
...d,
|
|
2460
2460
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
2461
|
-
editing:
|
|
2461
|
+
editing: S.value.includes(
|
|
2462
2462
|
p.value[f] ?? f
|
|
2463
2463
|
)
|
|
2464
2464
|
}
|
|
@@ -2466,14 +2466,14 @@ const xr = (e) => {
|
|
|
2466
2466
|
),
|
|
2467
2467
|
// 最近一次全局错误。
|
|
2468
2468
|
error: r.value
|
|
2469
|
-
})),
|
|
2469
|
+
})), w = () => ({
|
|
2470
2470
|
// adaptScene 透传给新接口形态。
|
|
2471
2471
|
adaptScene: e.adaptScene,
|
|
2472
2472
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
2473
2473
|
emplid: e.emplid
|
|
2474
2474
|
}), b = (f) => ({
|
|
2475
2475
|
// 复用基础参数,保证人员和场景一致。
|
|
2476
|
-
...
|
|
2476
|
+
...w(),
|
|
2477
2477
|
// infSchmId 指定当前模板方案。
|
|
2478
2478
|
infSchmId: f.infSchmId,
|
|
2479
2479
|
// tagId 指定要展开的树节点。
|
|
@@ -2484,7 +2484,7 @@ const xr = (e) => {
|
|
|
2484
2484
|
parentTagId: f.parentTagId
|
|
2485
2485
|
}), j = (f = l.value, d = a.value) => ({
|
|
2486
2486
|
// 详情接口同样需要基础人员和场景参数。
|
|
2487
|
-
...
|
|
2487
|
+
...w(),
|
|
2488
2488
|
// 当前节点所属模板方案。
|
|
2489
2489
|
infSchmId: f?.infSchmId,
|
|
2490
2490
|
// 当前点击或加载的树节点 id。
|
|
@@ -2493,23 +2493,23 @@ const xr = (e) => {
|
|
|
2493
2493
|
infSetId: d?.infSetId ?? f?.infSetId,
|
|
2494
2494
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
2495
2495
|
setId: d?.setId ?? f?.setId
|
|
2496
|
-
}),
|
|
2496
|
+
}), I = async (f, d) => jr({
|
|
2497
2497
|
service: e.service,
|
|
2498
2498
|
formatter: e.formatOperationParams,
|
|
2499
2499
|
operation: f,
|
|
2500
2500
|
context: d,
|
|
2501
2501
|
viewModel: s.value,
|
|
2502
|
-
sections:
|
|
2502
|
+
sections: A.value,
|
|
2503
2503
|
activeNode: l.value,
|
|
2504
2504
|
activeSection: a.value
|
|
2505
|
-
}),
|
|
2505
|
+
}), v = Yo(
|
|
2506
2506
|
async (f, d) => {
|
|
2507
2507
|
if (!e.service.requestOperation)
|
|
2508
2508
|
throw Ne("service.requestOperation is required");
|
|
2509
2509
|
return e.service.requestOperation(f, d);
|
|
2510
2510
|
},
|
|
2511
2511
|
(f) => zr(f)
|
|
2512
|
-
),
|
|
2512
|
+
), T = async (f, d) => {
|
|
2513
2513
|
const M = await On({
|
|
2514
2514
|
formatter: e.formatOperationParams,
|
|
2515
2515
|
params: d?.params,
|
|
@@ -2523,79 +2523,79 @@ const xr = (e) => {
|
|
|
2523
2523
|
row: d?.row,
|
|
2524
2524
|
node: d?.node,
|
|
2525
2525
|
viewModel: s.value,
|
|
2526
|
-
sections:
|
|
2526
|
+
sections: A.value,
|
|
2527
2527
|
activeNode: l.value,
|
|
2528
2528
|
activeSection: a.value,
|
|
2529
2529
|
searchText: d?.searchText
|
|
2530
|
-
}), G = { ...f, params: M },
|
|
2531
|
-
return
|
|
2532
|
-
},
|
|
2530
|
+
}), G = { ...f, params: M }, W = d && { ...d, params: M };
|
|
2531
|
+
return v(G, W);
|
|
2532
|
+
}, h = (f, d) => {
|
|
2533
2533
|
if (!d)
|
|
2534
2534
|
return f[0] ?? null;
|
|
2535
2535
|
for (const M of f) {
|
|
2536
2536
|
if (We(M).includes(d))
|
|
2537
2537
|
return M;
|
|
2538
|
-
const G =
|
|
2538
|
+
const G = h(M.children, d);
|
|
2539
2539
|
if (G)
|
|
2540
2540
|
return G;
|
|
2541
2541
|
}
|
|
2542
2542
|
return null;
|
|
2543
2543
|
}, N = (f = a.value) => {
|
|
2544
2544
|
if (f)
|
|
2545
|
-
return typeof f == "string" ? f : Ge(f) ?
|
|
2545
|
+
return typeof f == "string" ? f : Ge(f) ? O(f) : ke(f);
|
|
2546
2546
|
}, y = (f = a.value) => {
|
|
2547
2547
|
const d = N(f);
|
|
2548
2548
|
if (!d)
|
|
2549
2549
|
return null;
|
|
2550
2550
|
const M = p.value[d] ?? d;
|
|
2551
2551
|
return c.value[M] ?? null;
|
|
2552
|
-
},
|
|
2552
|
+
}, F = (f = a.value) => {
|
|
2553
2553
|
const d = N(f);
|
|
2554
2554
|
if (d)
|
|
2555
2555
|
return p.value[d] ?? d;
|
|
2556
|
-
},
|
|
2556
|
+
}, O = (f = a.value) => {
|
|
2557
2557
|
if (f)
|
|
2558
2558
|
return typeof f == "string" ? f : Ge(f) ? f.setId ?? f.infSetId ?? f.key : ke(f);
|
|
2559
|
-
},
|
|
2559
|
+
}, R = (f = a.value) => {
|
|
2560
2560
|
if (Ge(f))
|
|
2561
2561
|
return f;
|
|
2562
2562
|
if (typeof f == "string") {
|
|
2563
|
-
const d =
|
|
2563
|
+
const d = h(i.value, f);
|
|
2564
2564
|
if (d)
|
|
2565
2565
|
return d;
|
|
2566
2566
|
const M = y(f);
|
|
2567
|
-
return M?.ownerNodeKey ?
|
|
2567
|
+
return M?.ownerNodeKey ? h(i.value, M.ownerNodeKey) ?? l.value : M || l.value && We(l.value).includes(f) ? l.value : null;
|
|
2568
2568
|
}
|
|
2569
|
-
return f?.ownerNodeKey ?
|
|
2570
|
-
}, ne = (f = a.value) => !f || Ge(f) ? null : y(f),
|
|
2571
|
-
const d =
|
|
2569
|
+
return f?.ownerNodeKey ? h(i.value, f.ownerNodeKey) ?? l.value : l.value;
|
|
2570
|
+
}, ne = (f = a.value) => !f || Ge(f) ? null : y(f), x = (f = a.value) => {
|
|
2571
|
+
const d = O(f);
|
|
2572
2572
|
if (!d)
|
|
2573
2573
|
return He();
|
|
2574
2574
|
const M = p.value[d] ?? d;
|
|
2575
2575
|
return He({
|
|
2576
|
-
|
|
2577
|
-
|
|
2576
|
+
...$.value[d],
|
|
2577
|
+
...$.value[M],
|
|
2578
2578
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
2579
|
-
editing:
|
|
2579
|
+
editing: S.value.includes(
|
|
2580
2580
|
M
|
|
2581
2581
|
)
|
|
2582
2582
|
});
|
|
2583
|
-
},
|
|
2584
|
-
const M =
|
|
2585
|
-
M && (
|
|
2586
|
-
|
|
2583
|
+
}, z = (f, d) => {
|
|
2584
|
+
const M = O(f);
|
|
2585
|
+
M && ($.value = {
|
|
2586
|
+
...$.value,
|
|
2587
2587
|
[M]: He({
|
|
2588
2588
|
// 保留已有状态。
|
|
2589
|
-
|
|
2589
|
+
...$.value[M],
|
|
2590
2590
|
// 合并本次状态补丁。
|
|
2591
2591
|
...d,
|
|
2592
2592
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
2593
|
-
editing:
|
|
2593
|
+
editing: S.value.includes(M)
|
|
2594
2594
|
})
|
|
2595
2595
|
});
|
|
2596
|
-
},
|
|
2597
|
-
const M =
|
|
2598
|
-
(
|
|
2596
|
+
}, D = (f = s.value?.raw ?? null, d = l.value) => {
|
|
2597
|
+
const M = A.value, G = a.value && M.find(
|
|
2598
|
+
(W) => ke(W) === ke(a.value)
|
|
2599
2599
|
) ? a.value : null;
|
|
2600
2600
|
s.value = {
|
|
2601
2601
|
// 保留原 scheme。
|
|
@@ -2616,19 +2616,19 @@ const xr = (e) => {
|
|
|
2616
2616
|
// 保留原始接口数据。
|
|
2617
2617
|
raw: f
|
|
2618
2618
|
}, a.value = G;
|
|
2619
|
-
},
|
|
2619
|
+
}, B = (f, d = l.value, M) => {
|
|
2620
2620
|
const G = Nr({
|
|
2621
2621
|
currentMap: c.value,
|
|
2622
2622
|
currentAliasMap: p.value,
|
|
2623
|
-
currentOrder:
|
|
2624
|
-
currentStatusMap:
|
|
2625
|
-
editingSectionKeys:
|
|
2623
|
+
currentOrder: _.value,
|
|
2624
|
+
currentStatusMap: $.value,
|
|
2625
|
+
editingSectionKeys: S.value,
|
|
2626
2626
|
nextViewModel: f,
|
|
2627
2627
|
node: d,
|
|
2628
2628
|
targetKey: M,
|
|
2629
2629
|
activeSection: a.value
|
|
2630
2630
|
});
|
|
2631
|
-
return c.value = G.sectionMap, p.value = G.sectionAliasMap,
|
|
2631
|
+
return c.value = G.sectionMap, p.value = G.sectionAliasMap, _.value = G.sectionOrder, $.value = G.sectionStatusMap, s.value = {
|
|
2632
2632
|
...f,
|
|
2633
2633
|
scheme: f.scheme ?? s.value?.scheme ?? null,
|
|
2634
2634
|
topNodes: i.value,
|
|
@@ -2638,27 +2638,27 @@ const xr = (e) => {
|
|
|
2638
2638
|
sections: G.targetSections,
|
|
2639
2639
|
sectionMap: c.value
|
|
2640
2640
|
}, a.value = G.matchedSection, G.matchedSection;
|
|
2641
|
-
},
|
|
2642
|
-
const M =
|
|
2641
|
+
}, u = (f, d) => {
|
|
2642
|
+
const M = F(f), G = M ? c.value[M] : null;
|
|
2643
2643
|
if (!M || !G)
|
|
2644
2644
|
return;
|
|
2645
|
-
const
|
|
2645
|
+
const W = d(G);
|
|
2646
2646
|
c.value = {
|
|
2647
2647
|
...c.value,
|
|
2648
|
-
[M]:
|
|
2649
|
-
}, a.value = ke(a.value ??
|
|
2650
|
-
},
|
|
2651
|
-
const d = ne(f), M =
|
|
2648
|
+
[M]: W
|
|
2649
|
+
}, a.value = ke(a.value ?? W) === M ? W : a.value, D();
|
|
2650
|
+
}, m = async (f = a.value ?? l.value) => {
|
|
2651
|
+
const d = ne(f), M = R(f) ?? l.value, G = O(f);
|
|
2652
2652
|
if (!M)
|
|
2653
2653
|
return null;
|
|
2654
2654
|
if (!e.service.requestOperation)
|
|
2655
2655
|
throw Ne("service.requestOperation is required");
|
|
2656
|
-
n.value = !0, r.value = null,
|
|
2656
|
+
n.value = !0, r.value = null, z(G ?? M, { loading: !0, error: null });
|
|
2657
2657
|
try {
|
|
2658
|
-
const
|
|
2659
|
-
if (
|
|
2658
|
+
const W = d ? [{ infSetId: d.infSetId, setId: d.setId, operationInfo: d.operationInfo, raw: d.raw }] : M.infSetList;
|
|
2659
|
+
if (W.length === 0)
|
|
2660
2660
|
throw Ne("node.infSetList is required");
|
|
2661
|
-
const _e = await Promise.all(
|
|
2661
|
+
const _e = await Promise.all(W.map(async (le) => {
|
|
2662
2662
|
const ye = Pr(d, M, le.infSetId), Ae = {
|
|
2663
2663
|
...j(M, d),
|
|
2664
2664
|
infSetId: le.infSetId,
|
|
@@ -2666,7 +2666,7 @@ const xr = (e) => {
|
|
|
2666
2666
|
operationInfo: le.operationInfo
|
|
2667
2667
|
};
|
|
2668
2668
|
if (ye) {
|
|
2669
|
-
const dt = await
|
|
2669
|
+
const dt = await I(ye, {
|
|
2670
2670
|
type: "queryInfoSet",
|
|
2671
2671
|
requestSource: "inner",
|
|
2672
2672
|
tagId: d?.requestTagId ?? d?.tagId ?? M.tagId,
|
|
@@ -2682,24 +2682,24 @@ const xr = (e) => {
|
|
|
2682
2682
|
sections: _e.flatMap((le) => le.sections),
|
|
2683
2683
|
sectionMap: Object.fromEntries(_e.flatMap((le) => le.sections).map((le) => [le.key, le]))
|
|
2684
2684
|
};
|
|
2685
|
-
return
|
|
2686
|
-
} catch (
|
|
2687
|
-
throw r.value =
|
|
2685
|
+
return B(he, M, G);
|
|
2686
|
+
} catch (W) {
|
|
2687
|
+
throw r.value = W, z(G ?? M, { loading: !1, error: W }), W;
|
|
2688
2688
|
} finally {
|
|
2689
|
-
n.value = !1,
|
|
2689
|
+
n.value = !1, z(G ?? M, { loading: !1 });
|
|
2690
2690
|
}
|
|
2691
|
-
},
|
|
2691
|
+
}, C = (f = a.value) => m(f), E = (f = a.value) => {
|
|
2692
2692
|
if (!f)
|
|
2693
2693
|
return null;
|
|
2694
2694
|
if (!Ge(f) && typeof f != "string")
|
|
2695
2695
|
return y(f);
|
|
2696
|
-
const d =
|
|
2696
|
+
const d = O(f);
|
|
2697
2697
|
return d ? c.value[p.value[d] ?? d] ?? null : null;
|
|
2698
|
-
},
|
|
2698
|
+
}, L = async (f = l.value) => f ? (await m(f), s.value) : (s.value = null, a.value = null, c.value = {}, p.value = {}, _.value = [], $.value = {}, null), q = async (f) => {
|
|
2699
2699
|
const d = Vr(f);
|
|
2700
2700
|
if (!d)
|
|
2701
2701
|
return f.children;
|
|
2702
|
-
const M = b(f), G = await
|
|
2702
|
+
const M = b(f), G = await I(d, {
|
|
2703
2703
|
type: "openTag",
|
|
2704
2704
|
requestSource: "sidebar",
|
|
2705
2705
|
tagId: f.tagId,
|
|
@@ -2707,23 +2707,23 @@ const xr = (e) => {
|
|
|
2707
2707
|
params: M
|
|
2708
2708
|
});
|
|
2709
2709
|
return jt(G).treeNodes;
|
|
2710
|
-
},
|
|
2710
|
+
}, H = async (f) => {
|
|
2711
2711
|
if (f.loaded)
|
|
2712
2712
|
return f.children;
|
|
2713
|
-
const d = await
|
|
2713
|
+
const d = await q(f);
|
|
2714
2714
|
return d.length > 0 && (i.value = hn(i.value, f.key, d)), d;
|
|
2715
|
-
},
|
|
2716
|
-
const d = typeof f == "string" ?
|
|
2717
|
-
return d ? (l.value = d, a.value = null,
|
|
2718
|
-
},
|
|
2715
|
+
}, K = async (f) => {
|
|
2716
|
+
const d = typeof f == "string" ? h(i.value, f) : f;
|
|
2717
|
+
return d ? (l.value = d, a.value = null, S.value = [], await H(d), D(s.value?.raw, d), d) : null;
|
|
2718
|
+
}, X = async () => {
|
|
2719
2719
|
const f = e.service.templateTree;
|
|
2720
2720
|
if (!f)
|
|
2721
2721
|
throw Ne("service.templateTree is required");
|
|
2722
2722
|
t.value = !0, r.value = null;
|
|
2723
2723
|
try {
|
|
2724
|
-
const d = await f(
|
|
2724
|
+
const d = await f(w()), M = jt(d), G = await Promise.all(
|
|
2725
2725
|
M.treeNodes.map(async (_e) => {
|
|
2726
|
-
const he = await
|
|
2726
|
+
const he = await q(_e);
|
|
2727
2727
|
return {
|
|
2728
2728
|
..._e,
|
|
2729
2729
|
children: he,
|
|
@@ -2731,64 +2731,64 @@ const xr = (e) => {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
})
|
|
2733
2733
|
);
|
|
2734
|
-
i.value = G, a.value = null, c.value = {}, p.value = {},
|
|
2735
|
-
const
|
|
2736
|
-
return l.value =
|
|
2734
|
+
i.value = G, a.value = null, c.value = {}, p.value = {}, _.value = [], $.value = {}, S.value = [];
|
|
2735
|
+
const W = h(G, e.initialActiveNodeKey) ?? h(G);
|
|
2736
|
+
return l.value = W, s.value = {
|
|
2737
2737
|
...M,
|
|
2738
2738
|
treeNodes: G,
|
|
2739
|
-
activeNode:
|
|
2739
|
+
activeNode: W,
|
|
2740
2740
|
sectionMap: c.value,
|
|
2741
|
-
sections:
|
|
2741
|
+
sections: A.value
|
|
2742
2742
|
}, i.value;
|
|
2743
2743
|
} catch (d) {
|
|
2744
2744
|
throw r.value = d, d;
|
|
2745
2745
|
} finally {
|
|
2746
2746
|
t.value = !1;
|
|
2747
2747
|
}
|
|
2748
|
-
},
|
|
2748
|
+
}, P = async () => {
|
|
2749
2749
|
const f = N();
|
|
2750
|
-
await
|
|
2751
|
-
const d =
|
|
2750
|
+
await C(a.value ?? l.value);
|
|
2751
|
+
const d = A.value.find(
|
|
2752
2752
|
(M) => ke(M) === f
|
|
2753
2753
|
);
|
|
2754
|
-
return d && (a.value = d),
|
|
2755
|
-
},
|
|
2756
|
-
const d =
|
|
2757
|
-
return !!(d &&
|
|
2754
|
+
return d && (a.value = d), D(), s.value;
|
|
2755
|
+
}, Z = (f = a.value) => {
|
|
2756
|
+
const d = F(f);
|
|
2757
|
+
return !!(d && S.value.includes(d));
|
|
2758
2758
|
}, ae = (f = a.value) => {
|
|
2759
|
-
const d =
|
|
2760
|
-
!d ||
|
|
2759
|
+
const d = F(f);
|
|
2760
|
+
!d || Z(d) || (S.value = [...S.value, d], z(d, { editing: !0 }));
|
|
2761
2761
|
}, pe = (f = a.value) => {
|
|
2762
|
-
const d =
|
|
2763
|
-
d && (
|
|
2762
|
+
const d = F(f);
|
|
2763
|
+
d && (S.value = S.value.filter(
|
|
2764
2764
|
(M) => M !== d
|
|
2765
|
-
),
|
|
2765
|
+
), z(d, { editing: !1 }));
|
|
2766
2766
|
}, de = (f, d, M) => {
|
|
2767
2767
|
const G = typeof d == "string" ? d : Ve(d);
|
|
2768
|
-
|
|
2769
|
-
const he = (typeof d == "string" ?
|
|
2770
|
-
...
|
|
2768
|
+
u(f, (W) => {
|
|
2769
|
+
const he = (typeof d == "string" ? W.fields.find((ye) => Ve(ye) === G || ye.code === G) : d)?.cascadeClearFields ?? [], le = {
|
|
2770
|
+
...W.model,
|
|
2771
2771
|
[G]: M
|
|
2772
2772
|
};
|
|
2773
2773
|
return he.forEach((ye) => {
|
|
2774
2774
|
le[ye] = "";
|
|
2775
2775
|
}), {
|
|
2776
2776
|
// 保留 section 其它元数据。
|
|
2777
|
-
...
|
|
2777
|
+
...W,
|
|
2778
2778
|
// 更新表单 model。
|
|
2779
2779
|
model: le,
|
|
2780
2780
|
// 表单类型同步更新第一行 rows,方便保存时统一从 rows 构造 payload。
|
|
2781
|
-
rows:
|
|
2781
|
+
rows: W.renderType === "form" ? [{ ...W.rows[0], ...le }] : W.rows,
|
|
2782
2782
|
// 同步 fields.value,保证只读 renderer 立即显示新值。
|
|
2783
|
-
fields:
|
|
2783
|
+
fields: W.fields.map((ye) => {
|
|
2784
2784
|
const Ae = Ve(ye);
|
|
2785
2785
|
return Ae === G || ye.code === G ? { ...ye, value: M } : he.includes(Ae) || he.includes(ye.code) ? { ...ye, value: "" } : ye;
|
|
2786
2786
|
})
|
|
2787
2787
|
};
|
|
2788
2788
|
});
|
|
2789
2789
|
}, Se = async (f, d, M = {}, G = {}) => {
|
|
2790
|
-
const
|
|
2791
|
-
if (!
|
|
2790
|
+
const W = y(f);
|
|
2791
|
+
if (!W)
|
|
2792
2792
|
return [];
|
|
2793
2793
|
const _e = {
|
|
2794
2794
|
...M,
|
|
@@ -2799,28 +2799,28 @@ const xr = (e) => {
|
|
|
2799
2799
|
sourceModel: ye,
|
|
2800
2800
|
sourceRow: Ae,
|
|
2801
2801
|
missingDependField: dt
|
|
2802
|
-
} = Fr(
|
|
2802
|
+
} = Fr(W, d, _e), ft = le?.interface;
|
|
2803
2803
|
if (!le || !ft)
|
|
2804
2804
|
return le?.options ?? [];
|
|
2805
2805
|
if (Br(le))
|
|
2806
2806
|
return le.options ?? [];
|
|
2807
2807
|
if (dt)
|
|
2808
|
-
return
|
|
2808
|
+
return u(W, (Ke) => ({
|
|
2809
2809
|
...Ke,
|
|
2810
2810
|
fields: Ke.fields.map(
|
|
2811
2811
|
(Ee) => Ve(Ee) === he || Ee.code === he ? { ...Ee, options: [] } : Ee
|
|
2812
2812
|
)
|
|
2813
2813
|
})), [];
|
|
2814
|
-
const zn = await
|
|
2814
|
+
const zn = await T(
|
|
2815
2815
|
{
|
|
2816
2816
|
...ft
|
|
2817
2817
|
},
|
|
2818
2818
|
{
|
|
2819
2819
|
type: "fieldOptions",
|
|
2820
2820
|
requestSource: "inner",
|
|
2821
|
-
tagId:
|
|
2822
|
-
node:
|
|
2823
|
-
section:
|
|
2821
|
+
tagId: W.requestTagId ?? W.tagId,
|
|
2822
|
+
node: R(W),
|
|
2823
|
+
section: W,
|
|
2824
2824
|
field: le,
|
|
2825
2825
|
params: Te(ft.params),
|
|
2826
2826
|
// searchText 参与本次查询时,需要一并透传到 model 上,避免被依赖检查视为缺失并提前截断请求。
|
|
@@ -2829,7 +2829,7 @@ const xr = (e) => {
|
|
|
2829
2829
|
searchText: G.searchText
|
|
2830
2830
|
}
|
|
2831
2831
|
), kt = Er(zn);
|
|
2832
|
-
return
|
|
2832
|
+
return u(W, (Ke) => ({
|
|
2833
2833
|
...Ke,
|
|
2834
2834
|
fields: Ke.fields.map(
|
|
2835
2835
|
(Ee) => Ve(Ee) === he || Ee.code === he ? { ...Ee, options: kt } : Ee
|
|
@@ -2840,7 +2840,7 @@ const xr = (e) => {
|
|
|
2840
2840
|
Ie(f, d);
|
|
2841
2841
|
return;
|
|
2842
2842
|
}
|
|
2843
|
-
|
|
2843
|
+
u(f, (M) => ({
|
|
2844
2844
|
...M,
|
|
2845
2845
|
// 替换当前 model。
|
|
2846
2846
|
model: d,
|
|
@@ -2853,28 +2853,28 @@ const xr = (e) => {
|
|
|
2853
2853
|
}))
|
|
2854
2854
|
}));
|
|
2855
2855
|
}, Ie = (f, d) => {
|
|
2856
|
-
|
|
2856
|
+
u(f, (M) => ({
|
|
2857
2857
|
...M,
|
|
2858
2858
|
rows: d,
|
|
2859
2859
|
data: d
|
|
2860
2860
|
}));
|
|
2861
2861
|
}, qe = {
|
|
2862
2862
|
// 加载模板树。
|
|
2863
|
-
loadTree:
|
|
2863
|
+
loadTree: X,
|
|
2864
2864
|
// 选中树节点。
|
|
2865
|
-
selectNode:
|
|
2865
|
+
selectNode: K,
|
|
2866
2866
|
// 加载当前节点详情。
|
|
2867
|
-
loadDetail:
|
|
2867
|
+
loadDetail: L,
|
|
2868
2868
|
// 刷新当前详情。
|
|
2869
|
-
reloadActiveSection:
|
|
2869
|
+
reloadActiveSection: P,
|
|
2870
2870
|
// 加载指定节点或 section。
|
|
2871
|
-
loadSection:
|
|
2871
|
+
loadSection: m,
|
|
2872
2872
|
// 重新加载指定节点或 section。
|
|
2873
|
-
reloadSection:
|
|
2873
|
+
reloadSection: C,
|
|
2874
2874
|
// 获取指定节点或 section 的缓存数据。
|
|
2875
|
-
getSection:
|
|
2875
|
+
getSection: E,
|
|
2876
2876
|
// 获取指定节点或 section 的状态。
|
|
2877
|
-
getSectionStatus:
|
|
2877
|
+
getSectionStatus: x,
|
|
2878
2878
|
// 开启编辑。
|
|
2879
2879
|
startEdit: ae,
|
|
2880
2880
|
// 取消编辑。
|
|
@@ -2889,15 +2889,15 @@ const xr = (e) => {
|
|
|
2889
2889
|
updateTableRows: Ie,
|
|
2890
2890
|
// 保存单行到本地缓存。
|
|
2891
2891
|
saveRow: (f, d = {}, M = -1) => {
|
|
2892
|
-
const
|
|
2893
|
-
|
|
2892
|
+
const W = [...y(f)?.rows ?? []];
|
|
2893
|
+
W.splice(M >= 0 ? M : W.length, M >= 0 ? 1 : 0, d), Ie(f, W);
|
|
2894
2894
|
},
|
|
2895
2895
|
// 删除单行本地缓存。
|
|
2896
2896
|
deleteRow: (f, d) => {
|
|
2897
|
-
const M = y(f), G = typeof d == "string" ? Number(d) : d,
|
|
2897
|
+
const M = y(f), G = typeof d == "string" ? Number(d) : d, W = (M?.rows ?? []).filter(
|
|
2898
2898
|
(_e, he) => he !== G
|
|
2899
2899
|
);
|
|
2900
|
-
Ie(f,
|
|
2900
|
+
Ie(f, W);
|
|
2901
2901
|
},
|
|
2902
2902
|
// 调用接口保存 section。
|
|
2903
2903
|
saveSection: async (f = a.value) => {
|
|
@@ -2907,12 +2907,12 @@ const xr = (e) => {
|
|
|
2907
2907
|
const G = Ar(M);
|
|
2908
2908
|
if (!G)
|
|
2909
2909
|
throw Ne("section.operationInfo.editInfoSet is required");
|
|
2910
|
-
o.value = !0, r.value = null, d && d !== ke(M) &&
|
|
2910
|
+
o.value = !0, r.value = null, d && d !== ke(M) && z(d, { saving: !0, error: null }), z(M, { saving: !0, error: null });
|
|
2911
2911
|
try {
|
|
2912
2912
|
const {
|
|
2913
|
-
tagId:
|
|
2913
|
+
tagId: W,
|
|
2914
2914
|
..._e
|
|
2915
|
-
} = j(l.value, M), he = vr(M, _e), le = await
|
|
2915
|
+
} = j(l.value, M), he = vr(M, _e), le = await I(
|
|
2916
2916
|
// 保存时保留后端给的 method/url,但不再把 editOperation.params 混入实际提交数据。
|
|
2917
2917
|
G,
|
|
2918
2918
|
{
|
|
@@ -2925,35 +2925,35 @@ const xr = (e) => {
|
|
|
2925
2925
|
model: M.model
|
|
2926
2926
|
}
|
|
2927
2927
|
);
|
|
2928
|
-
return pe(M), await
|
|
2929
|
-
} catch (
|
|
2930
|
-
throw r.value =
|
|
2928
|
+
return pe(M), await C(M), le;
|
|
2929
|
+
} catch (W) {
|
|
2930
|
+
throw r.value = W, d && d !== ke(M) && z(d, { saving: !1, error: W }), z(M, { saving: !1, error: W }), W;
|
|
2931
2931
|
} finally {
|
|
2932
|
-
o.value = !1, d && d !== ke(M) &&
|
|
2932
|
+
o.value = !1, d && d !== ke(M) && z(d, { saving: !1 }), z(M, { saving: !1 });
|
|
2933
2933
|
}
|
|
2934
2934
|
},
|
|
2935
2935
|
// 判断编辑态。
|
|
2936
|
-
isEditing:
|
|
2936
|
+
isEditing: Z
|
|
2937
2937
|
};
|
|
2938
2938
|
return Be(
|
|
2939
2939
|
// 监听当前人员 id。
|
|
2940
2940
|
() => e.emplid,
|
|
2941
2941
|
() => {
|
|
2942
|
-
(e.autoLoad ?? !0) &&
|
|
2942
|
+
(e.autoLoad ?? !0) && X();
|
|
2943
2943
|
}
|
|
2944
2944
|
), Gt(() => {
|
|
2945
|
-
(e.autoLoad ?? !0) &&
|
|
2945
|
+
(e.autoLoad ?? !0) && X();
|
|
2946
2946
|
}), {
|
|
2947
2947
|
// 当前 viewModel。
|
|
2948
2948
|
viewModel: s,
|
|
2949
2949
|
// 当前模板树节点。
|
|
2950
2950
|
nodes: i,
|
|
2951
2951
|
// 当前已加载 section 列表。
|
|
2952
|
-
sections:
|
|
2952
|
+
sections: A,
|
|
2953
2953
|
// 当前 section 缓存。
|
|
2954
2954
|
sectionMap: c,
|
|
2955
2955
|
// 当前 section 状态缓存。
|
|
2956
|
-
sectionStatusMap:
|
|
2956
|
+
sectionStatusMap: $,
|
|
2957
2957
|
// 当前激活节点。
|
|
2958
2958
|
activeNode: l,
|
|
2959
2959
|
// 当前激活 section。
|
|
@@ -2963,7 +2963,7 @@ const xr = (e) => {
|
|
|
2963
2963
|
// 给页面消费的操作集合。
|
|
2964
2964
|
actions: qe
|
|
2965
2965
|
};
|
|
2966
|
-
},
|
|
2966
|
+
}, Ra = /* @__PURE__ */ ce({
|
|
2967
2967
|
name: "GlobalInfoProvider",
|
|
2968
2968
|
__name: "GlobalInfoProvider",
|
|
2969
2969
|
props: {
|
|
@@ -2976,8 +2976,8 @@ const xr = (e) => {
|
|
|
2976
2976
|
formatOperationParams: {}
|
|
2977
2977
|
},
|
|
2978
2978
|
setup(e) {
|
|
2979
|
-
const t = e, n =
|
|
2980
|
-
return (p,
|
|
2979
|
+
const t = e, n = Rr(t), { viewModel: o, nodes: r, sections: i, activeNode: s, activeSection: l, state: a, actions: c } = n;
|
|
2980
|
+
return (p, _) => ee(p.$slots, "default", Me(Fe({
|
|
2981
2981
|
viewModel: re(o),
|
|
2982
2982
|
nodes: re(r),
|
|
2983
2983
|
sections: re(i),
|
|
@@ -2998,7 +2998,7 @@ function Dn(e) {
|
|
|
2998
2998
|
Tt.openByParams(e.action.params);
|
|
2999
2999
|
}
|
|
3000
3000
|
}
|
|
3001
|
-
const
|
|
3001
|
+
const xr = ["disabled", "accept", "multiple"], qr = {
|
|
3002
3002
|
key: 0,
|
|
3003
3003
|
class: "global-info-field-control__file-preview-list"
|
|
3004
3004
|
}, Kr = ["onClick"], Gr = {
|
|
@@ -3023,110 +3023,110 @@ const Rr = ["disabled", "accept", "multiple"], qr = {
|
|
|
3023
3023
|
},
|
|
3024
3024
|
emits: ["update:modelValue", "change", "loadOptions"],
|
|
3025
3025
|
setup(e, { emit: t }) {
|
|
3026
|
-
const n = e, o = t, r = ["textarea", "html", "code", "multi-row"], i = me(null), s =
|
|
3026
|
+
const n = e, o = t, r = ["textarea", "html", "code", "multi-row"], i = me(null), s = V(() => Qe(n.field)), l = V(() => s.value === "select_remote"), a = V(() => n.disabled || n.field.disabled || n.field.readonly), c = V(() => !!n.field.props?.multiple), p = V(() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)), _ = V(() => r.includes(s.value) ? n.field.props?.resize ?? "vertical" : void 0), $ = V(() => {
|
|
3027
3027
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "") return;
|
|
3028
|
-
const
|
|
3029
|
-
return Number.isFinite(
|
|
3030
|
-
}),
|
|
3031
|
-
const
|
|
3032
|
-
return
|
|
3033
|
-
}), g =
|
|
3034
|
-
let
|
|
3035
|
-
function
|
|
3036
|
-
o("update:modelValue", N(
|
|
3028
|
+
const x = typeof n.modelValue == "number" ? n.modelValue : Number(n.modelValue);
|
|
3029
|
+
return Number.isFinite(x) ? x : void 0;
|
|
3030
|
+
}), S = V(() => tr(n.field, n.modelValue)), A = V(() => {
|
|
3031
|
+
const x = n.field.props?.activeValue ?? n.field.props?.["active-value"], z = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
3032
|
+
return x !== void 0 || z !== void 0 ? n.modelValue ?? z ?? !1 : fn(n.modelValue);
|
|
3033
|
+
}), g = V(() => s.value === "code" ? 5 : 1), w = V(() => s.value === "file" && !Ce(n.modelValue)), b = V(() => dn(n.field, n.modelValue, "请选择文件")), j = V(() => pn(n.field, n.modelValue, "请选择文件")), I = V(() => n.field.placeholder ? n.field.placeholder : s.value === "select_remote" ? "请输入关键词" : s.value === "select" ? "请选择" : s.value === "date" ? "请选择日期" : s.value === "file" ? "请选择文件" : "请输入");
|
|
3034
|
+
let v;
|
|
3035
|
+
function T(x) {
|
|
3036
|
+
o("update:modelValue", N(x));
|
|
3037
3037
|
}
|
|
3038
|
-
function
|
|
3039
|
-
o("change", N(
|
|
3038
|
+
function h(x) {
|
|
3039
|
+
o("change", N(x));
|
|
3040
3040
|
}
|
|
3041
|
-
function N(
|
|
3042
|
-
return s.value === "select" || s.value === "select_remote" ? nr(n.field,
|
|
3041
|
+
function N(x) {
|
|
3042
|
+
return s.value === "select" || s.value === "select_remote" ? nr(n.field, x) : x;
|
|
3043
3043
|
}
|
|
3044
|
-
function y(
|
|
3045
|
-
|
|
3044
|
+
function y(x) {
|
|
3045
|
+
x && o("loadOptions", l.value ? { searchText: "" } : void 0);
|
|
3046
3046
|
}
|
|
3047
|
-
function
|
|
3048
|
-
l.value && (
|
|
3049
|
-
o("loadOptions", { searchText:
|
|
3047
|
+
function F(x) {
|
|
3048
|
+
l.value && (v && clearTimeout(v), v = setTimeout(() => {
|
|
3049
|
+
o("loadOptions", { searchText: x });
|
|
3050
3050
|
}, 300));
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3052
|
+
function O() {
|
|
3053
3053
|
a.value || i.value?.click();
|
|
3054
3054
|
}
|
|
3055
|
-
function x
|
|
3056
|
-
Dn(
|
|
3055
|
+
function R(x) {
|
|
3056
|
+
Dn(x);
|
|
3057
3057
|
}
|
|
3058
3058
|
Yn(() => {
|
|
3059
|
-
|
|
3059
|
+
v && clearTimeout(v);
|
|
3060
3060
|
});
|
|
3061
|
-
function ne(
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3061
|
+
function ne(x) {
|
|
3062
|
+
const z = x.target, D = Array.from(z.files ?? []), B = n.field.props?.multiple ? D : D[0] ?? null;
|
|
3063
|
+
T(B), h(B);
|
|
3064
3064
|
}
|
|
3065
|
-
return (
|
|
3066
|
-
const
|
|
3067
|
-
return s.value === "select" || s.value === "select_remote" ? (k(),
|
|
3065
|
+
return (x, z) => {
|
|
3066
|
+
const D = Wt, B = Jt, u = Ht, m = Qn, C = Xn, E = Ut;
|
|
3067
|
+
return s.value === "select" || s.value === "select_remote" ? (k(), U(B, oe({
|
|
3068
3068
|
key: 0,
|
|
3069
3069
|
class: "global-info-field-control"
|
|
3070
|
-
},
|
|
3071
|
-
"model-value":
|
|
3072
|
-
placeholder:
|
|
3070
|
+
}, x.field.props, {
|
|
3071
|
+
"model-value": S.value,
|
|
3072
|
+
placeholder: I.value,
|
|
3073
3073
|
disabled: a.value,
|
|
3074
3074
|
"collapse-tags": c.value,
|
|
3075
3075
|
"collapse-tags-tooltip": c.value,
|
|
3076
3076
|
"max-collapse-tags": 1,
|
|
3077
|
-
filterable: l.value || !!
|
|
3078
|
-
remote: l.value || !!
|
|
3079
|
-
"remote-method": l.value ?
|
|
3077
|
+
filterable: l.value || !!x.field.props?.filterable,
|
|
3078
|
+
remote: l.value || !!x.field.props?.remote,
|
|
3079
|
+
"remote-method": l.value ? F : x.field.props?.remoteMethod,
|
|
3080
3080
|
clearable: "",
|
|
3081
3081
|
onVisibleChange: y,
|
|
3082
|
-
"onUpdate:modelValue":
|
|
3083
|
-
onChange:
|
|
3082
|
+
"onUpdate:modelValue": T,
|
|
3083
|
+
onChange: h
|
|
3084
3084
|
}), {
|
|
3085
|
-
default:
|
|
3086
|
-
(k(!0), Y(be, null, ve(
|
|
3087
|
-
key: String(
|
|
3088
|
-
label:
|
|
3089
|
-
value:
|
|
3085
|
+
default: J(() => [
|
|
3086
|
+
(k(!0), Y(be, null, ve(x.field.options || [], (L) => (k(), U(D, {
|
|
3087
|
+
key: String(L.value),
|
|
3088
|
+
label: L.label,
|
|
3089
|
+
value: L.value
|
|
3090
3090
|
}, null, 8, ["label", "value"]))), 128))
|
|
3091
3091
|
]),
|
|
3092
3092
|
_: 1
|
|
3093
|
-
}, 16, ["model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (k(),
|
|
3093
|
+
}, 16, ["model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (k(), U(u, oe({
|
|
3094
3094
|
key: 1,
|
|
3095
3095
|
class: "global-info-field-control"
|
|
3096
|
-
},
|
|
3097
|
-
"model-value":
|
|
3098
|
-
placeholder:
|
|
3096
|
+
}, x.field.props, {
|
|
3097
|
+
"model-value": x.modelValue,
|
|
3098
|
+
placeholder: I.value,
|
|
3099
3099
|
disabled: a.value,
|
|
3100
3100
|
type: "date",
|
|
3101
3101
|
"value-format": "YYYY-MM-DD",
|
|
3102
|
-
"onUpdate:modelValue":
|
|
3103
|
-
onChange:
|
|
3104
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (k(),
|
|
3102
|
+
"onUpdate:modelValue": T,
|
|
3103
|
+
onChange: h
|
|
3104
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (k(), U(m, oe({
|
|
3105
3105
|
key: 2,
|
|
3106
3106
|
class: "global-info-field-control"
|
|
3107
|
-
},
|
|
3108
|
-
"model-value":
|
|
3109
|
-
placeholder:
|
|
3107
|
+
}, x.field.props, {
|
|
3108
|
+
"model-value": $.value,
|
|
3109
|
+
placeholder: I.value,
|
|
3110
3110
|
disabled: a.value,
|
|
3111
3111
|
"controls-position": "right",
|
|
3112
|
-
"onUpdate:modelValue":
|
|
3113
|
-
onChange:
|
|
3114
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (k(),
|
|
3112
|
+
"onUpdate:modelValue": T,
|
|
3113
|
+
onChange: h
|
|
3114
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (k(), U(C, oe({
|
|
3115
3115
|
key: 3,
|
|
3116
3116
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3117
|
-
},
|
|
3118
|
-
"model-value":
|
|
3117
|
+
}, x.field.props, {
|
|
3118
|
+
"model-value": A.value,
|
|
3119
3119
|
disabled: a.value,
|
|
3120
|
-
"onUpdate:modelValue":
|
|
3121
|
-
onChange:
|
|
3120
|
+
"onUpdate:modelValue": T,
|
|
3121
|
+
onChange: h
|
|
3122
3122
|
}), null, 16, ["model-value", "disabled"])) : s.value === "file" ? (k(), Y("div", {
|
|
3123
3123
|
key: 4,
|
|
3124
3124
|
class: Ue(["global-info-field-control global-info-field-control--file", {
|
|
3125
3125
|
"is-disabled": a.value,
|
|
3126
|
-
"is-empty": !
|
|
3127
|
-
"is-filled":
|
|
3126
|
+
"is-empty": !w.value,
|
|
3127
|
+
"is-filled": w.value
|
|
3128
3128
|
}]),
|
|
3129
|
-
onClick:
|
|
3129
|
+
onClick: O
|
|
3130
3130
|
}, [
|
|
3131
3131
|
te("input", {
|
|
3132
3132
|
ref_key: "fileInputRef",
|
|
@@ -3134,44 +3134,44 @@ const Rr = ["disabled", "accept", "multiple"], qr = {
|
|
|
3134
3134
|
class: "global-info-field-control__file-input",
|
|
3135
3135
|
type: "file",
|
|
3136
3136
|
disabled: a.value,
|
|
3137
|
-
accept: String(
|
|
3138
|
-
multiple: !!
|
|
3137
|
+
accept: String(x.field.props?.accept ?? ""),
|
|
3138
|
+
multiple: !!x.field.props?.multiple,
|
|
3139
3139
|
onChange: ne
|
|
3140
|
-
}, null, 40,
|
|
3140
|
+
}, null, 40, xr),
|
|
3141
3141
|
j.value.length ? (k(), Y("span", qr, [
|
|
3142
|
-
(k(!0), Y(be, null, ve(j.value, (
|
|
3143
|
-
key:
|
|
3142
|
+
(k(!0), Y(be, null, ve(j.value, (L, q) => (k(), Y(be, {
|
|
3143
|
+
key: L.key
|
|
3144
3144
|
}, [
|
|
3145
|
-
|
|
3145
|
+
L.action ? (k(), Y("button", {
|
|
3146
3146
|
key: 0,
|
|
3147
3147
|
class: "global-info-field-control__file-preview",
|
|
3148
3148
|
type: "button",
|
|
3149
|
-
onClick: Kt((
|
|
3150
|
-
}, fe(
|
|
3151
|
-
|
|
3149
|
+
onClick: Kt((H) => R(L), ["stop", "prevent"])
|
|
3150
|
+
}, fe(L.text), 9, Kr)) : (k(), Y("span", Gr, fe(L.text), 1)),
|
|
3151
|
+
q < j.value.length - 1 ? (k(), Y("span", Yr, "、")) : ue("", !0)
|
|
3152
3152
|
], 64))), 128))
|
|
3153
|
-
])) :
|
|
3154
|
-
], 2)) : s.value === "empty" ? (k(),
|
|
3153
|
+
])) : w.value ? (k(), Y("span", Hr, fe(b.value), 1)) : (k(), Y("span", Ur, "上 传"))
|
|
3154
|
+
], 2)) : s.value === "empty" ? (k(), U(E, {
|
|
3155
3155
|
key: 5,
|
|
3156
3156
|
class: "global-info-field-control",
|
|
3157
3157
|
"model-value": "",
|
|
3158
3158
|
disabled: "",
|
|
3159
3159
|
placeholder: "-"
|
|
3160
|
-
})) : (k(),
|
|
3160
|
+
})) : (k(), U(E, oe({
|
|
3161
3161
|
key: 6,
|
|
3162
3162
|
class: ["global-info-field-control", {
|
|
3163
3163
|
"global-info-field-control--textarea": r.includes(s.value),
|
|
3164
3164
|
"global-info-field-control--code": s.value === "code"
|
|
3165
3165
|
}]
|
|
3166
|
-
},
|
|
3166
|
+
}, x.field.props, {
|
|
3167
3167
|
"model-value": p.value,
|
|
3168
|
-
placeholder:
|
|
3168
|
+
placeholder: I.value,
|
|
3169
3169
|
disabled: a.value,
|
|
3170
3170
|
type: r.includes(s.value) ? "textarea" : "text",
|
|
3171
3171
|
rows: r.includes(s.value) ? g.value : void 0,
|
|
3172
|
-
resize:
|
|
3173
|
-
"onUpdate:modelValue":
|
|
3174
|
-
onChange:
|
|
3172
|
+
resize: _.value,
|
|
3173
|
+
"onUpdate:modelValue": T,
|
|
3174
|
+
onChange: h
|
|
3175
3175
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
3176
3176
|
};
|
|
3177
3177
|
}
|
|
@@ -3190,7 +3190,7 @@ const Rr = ["disabled", "accept", "multiple"], qr = {
|
|
|
3190
3190
|
emptyText: { default: "-" }
|
|
3191
3191
|
},
|
|
3192
3192
|
setup(e) {
|
|
3193
|
-
const t = e, n =
|
|
3193
|
+
const t = e, n = V(() => $t(t.field)), o = V(() => n.value === "empty" || Ce(t.value)), r = V(() => dn(t.field, t.value, t.emptyText)), i = V(() => pn(t.field, t.value, t.emptyText));
|
|
3194
3194
|
function s(l) {
|
|
3195
3195
|
Dn(l);
|
|
3196
3196
|
}
|
|
@@ -3206,7 +3206,7 @@ const Rr = ["disabled", "accept", "multiple"], qr = {
|
|
|
3206
3206
|
key: 0,
|
|
3207
3207
|
class: "global-info-field-value__attachment-preview",
|
|
3208
3208
|
type: "button",
|
|
3209
|
-
onClick: (
|
|
3209
|
+
onClick: (_) => s(c)
|
|
3210
3210
|
}, fe(c.text), 9, Xr)) : (k(), Y("span", ea, fe(c.text), 1)),
|
|
3211
3211
|
p < i.value.length - 1 ? (k(), Y("span", ta, "、")) : ue("", !0)
|
|
3212
3212
|
], 64))), 128))
|
|
@@ -3265,87 +3265,87 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3265
3265
|
renderConfig: {}
|
|
3266
3266
|
},
|
|
3267
3267
|
setup(e) {
|
|
3268
|
-
const t = e, n = Le(), o =
|
|
3268
|
+
const t = e, n = Le(), o = V(() => t.model ?? t.section.model), r = /* @__PURE__ */ new Map(), i = V(() => lt(
|
|
3269
3269
|
t.section.fields,
|
|
3270
3270
|
t.section,
|
|
3271
3271
|
t.renderConfig,
|
|
3272
3272
|
{ values: o.value }
|
|
3273
3273
|
)), s = rn(
|
|
3274
|
-
async (
|
|
3275
|
-
(
|
|
3274
|
+
async (v, T, h) => t.actions.loadFieldOptions(t.section, v, T, h),
|
|
3275
|
+
(v) => `${t.section.key}:${b(v)}`
|
|
3276
3276
|
);
|
|
3277
|
-
function l(
|
|
3278
|
-
const
|
|
3279
|
-
(
|
|
3280
|
-
|
|
3281
|
-
}), t.onUpdateModel?.(
|
|
3277
|
+
function l(v, T) {
|
|
3278
|
+
const h = { ...o.value, [v.code]: T };
|
|
3279
|
+
(v.cascadeClearFields ?? []).forEach((N) => {
|
|
3280
|
+
h[N] = "";
|
|
3281
|
+
}), t.onUpdateModel?.(h), t.onUpdateModel || t.actions.updateField(t.section, v, T), a(v, T, h), S(h, v);
|
|
3282
3282
|
}
|
|
3283
|
-
function a(
|
|
3283
|
+
function a(v, T, h) {
|
|
3284
3284
|
const N = t.renderConfig?.onFieldBusinessChange;
|
|
3285
3285
|
if (N)
|
|
3286
3286
|
try {
|
|
3287
|
-
const y = c(
|
|
3288
|
-
field:
|
|
3289
|
-
value:
|
|
3287
|
+
const y = c(v, T), F = {
|
|
3288
|
+
field: v,
|
|
3289
|
+
value: T,
|
|
3290
3290
|
section: t.section,
|
|
3291
|
-
model:
|
|
3292
|
-
values:
|
|
3291
|
+
model: h,
|
|
3292
|
+
values: h,
|
|
3293
3293
|
node: t.node,
|
|
3294
3294
|
activeNode: t.node,
|
|
3295
3295
|
sections: p(),
|
|
3296
|
-
sectionValues:
|
|
3296
|
+
sectionValues: _(t.section, h),
|
|
3297
3297
|
actions: t.actions,
|
|
3298
3298
|
selectedOption: y[0],
|
|
3299
3299
|
selectedOptions: y
|
|
3300
3300
|
};
|
|
3301
|
-
Promise.resolve(N(
|
|
3302
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3301
|
+
Promise.resolve(N(F)).catch((O) => {
|
|
3302
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", O);
|
|
3303
3303
|
});
|
|
3304
3304
|
} catch (y) {
|
|
3305
3305
|
console.error("[GlobalInfoFormRenderer] field business change failed", y);
|
|
3306
3306
|
}
|
|
3307
3307
|
}
|
|
3308
|
-
function c(
|
|
3309
|
-
const
|
|
3310
|
-
return (
|
|
3308
|
+
function c(v, T) {
|
|
3309
|
+
const h = it(v, T);
|
|
3310
|
+
return (v.options ?? []).filter((N) => h.some((y) => N.value === y || String(N.value) === String(y)));
|
|
3311
3311
|
}
|
|
3312
3312
|
function p() {
|
|
3313
3313
|
return Object.values(t.state.sectionMap);
|
|
3314
3314
|
}
|
|
3315
|
-
function
|
|
3315
|
+
function _(v, T) {
|
|
3316
3316
|
const N = p().flatMap((y) => {
|
|
3317
|
-
const
|
|
3318
|
-
return [y.key, y.id, y.setId, y.infSetId, y.code].filter(Boolean).map((
|
|
3317
|
+
const F = y.key === v.key ? T : y.renderType === "table" ? y.rows : y.model;
|
|
3318
|
+
return [y.key, y.id, y.setId, y.infSetId, y.code].filter(Boolean).map((O) => [String(O), F]);
|
|
3319
3319
|
});
|
|
3320
3320
|
return Object.fromEntries(N);
|
|
3321
3321
|
}
|
|
3322
|
-
async function
|
|
3323
|
-
const N =
|
|
3324
|
-
if (!Ln(
|
|
3325
|
-
r.set(y,
|
|
3322
|
+
async function $(v, T = {}, h = o.value) {
|
|
3323
|
+
const N = h, y = b(v), F = ot(t.section.key, v, N), O = r.get(y);
|
|
3324
|
+
if (!Ln(T) && rt(v, O, F)) {
|
|
3325
|
+
r.set(y, F);
|
|
3326
3326
|
return;
|
|
3327
3327
|
}
|
|
3328
3328
|
try {
|
|
3329
|
-
if (
|
|
3330
|
-
await s(
|
|
3329
|
+
if (T.searchText !== void 0) {
|
|
3330
|
+
await s(v, N, T);
|
|
3331
3331
|
return;
|
|
3332
3332
|
}
|
|
3333
|
-
await t.actions.loadFieldOptions(t.section,
|
|
3333
|
+
await t.actions.loadFieldOptions(t.section, v, N, T), r.set(y, F);
|
|
3334
3334
|
} catch (ne) {
|
|
3335
3335
|
console.error("[GlobalInfoFormRenderer] load field options failed", ne);
|
|
3336
3336
|
}
|
|
3337
3337
|
}
|
|
3338
|
-
async function
|
|
3339
|
-
for (const
|
|
3340
|
-
if (
|
|
3341
|
-
const N =
|
|
3342
|
-
if (!j(
|
|
3343
|
-
const y = ot(t.section.key,
|
|
3344
|
-
if (rt(
|
|
3345
|
-
r.set(
|
|
3338
|
+
async function S(v = o.value, T) {
|
|
3339
|
+
for (const h of i.value) {
|
|
3340
|
+
if (T && !En(h, T)) continue;
|
|
3341
|
+
const N = v[h.code];
|
|
3342
|
+
if (!j(h, N)) continue;
|
|
3343
|
+
const y = ot(t.section.key, h, v), F = b(h), O = r.get(F);
|
|
3344
|
+
if (rt(h, O, y)) {
|
|
3345
|
+
r.set(F, y);
|
|
3346
3346
|
continue;
|
|
3347
3347
|
}
|
|
3348
|
-
|
|
3348
|
+
O !== y && await $(h, Pn(h, N), v);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
3351
|
Be(
|
|
@@ -3356,84 +3356,84 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3356
3356
|
), Be(
|
|
3357
3357
|
() => t.editing,
|
|
3358
3358
|
() => {
|
|
3359
|
-
|
|
3359
|
+
S();
|
|
3360
3360
|
},
|
|
3361
3361
|
{ immediate: !0 }
|
|
3362
3362
|
);
|
|
3363
|
-
function
|
|
3364
|
-
const
|
|
3363
|
+
function A(v) {
|
|
3364
|
+
const T = o.value[v.code];
|
|
3365
3365
|
return {
|
|
3366
|
-
field:
|
|
3366
|
+
field: v,
|
|
3367
3367
|
section: t.section,
|
|
3368
3368
|
sectionView: t.section,
|
|
3369
3369
|
node: t.node,
|
|
3370
3370
|
editing: t.editing,
|
|
3371
|
-
modelValue:
|
|
3372
|
-
value:
|
|
3371
|
+
modelValue: T,
|
|
3372
|
+
value: T,
|
|
3373
3373
|
state: t.state,
|
|
3374
3374
|
actions: t.actions,
|
|
3375
|
-
updateModelValue: (
|
|
3375
|
+
updateModelValue: (h) => l(v, h)
|
|
3376
3376
|
};
|
|
3377
3377
|
}
|
|
3378
|
-
function g(
|
|
3379
|
-
const
|
|
3380
|
-
if (
|
|
3381
|
-
const N =
|
|
3382
|
-
return N !==
|
|
3378
|
+
function g(v) {
|
|
3379
|
+
const T = String(v.code || "").trim(), h = T ? `field-${T}` : "";
|
|
3380
|
+
if (h && n[h]) return h;
|
|
3381
|
+
const N = h.toLowerCase();
|
|
3382
|
+
return N !== h && n[N] ? N : "";
|
|
3383
3383
|
}
|
|
3384
|
-
function
|
|
3385
|
-
return
|
|
3384
|
+
function w(v) {
|
|
3385
|
+
return v.span ? Math.min(Math.max(v.span, 1), 24) : 6;
|
|
3386
3386
|
}
|
|
3387
|
-
function b(
|
|
3388
|
-
return
|
|
3387
|
+
function b(v) {
|
|
3388
|
+
return v.key || v.id || v.code;
|
|
3389
3389
|
}
|
|
3390
|
-
function j(
|
|
3391
|
-
return Vn(
|
|
3390
|
+
function j(v, T) {
|
|
3391
|
+
return Vn(v, T, t.editing);
|
|
3392
3392
|
}
|
|
3393
|
-
function
|
|
3394
|
-
return
|
|
3393
|
+
function I(v) {
|
|
3394
|
+
return v.required || v.isRequired;
|
|
3395
3395
|
}
|
|
3396
|
-
return (
|
|
3397
|
-
const
|
|
3398
|
-
return k(),
|
|
3396
|
+
return (v, T) => {
|
|
3397
|
+
const h = Zt, N = to, y = eo, F = Qt;
|
|
3398
|
+
return k(), U(F, {
|
|
3399
3399
|
class: "global-info-form-renderer",
|
|
3400
3400
|
model: o.value,
|
|
3401
3401
|
"label-position": "top"
|
|
3402
3402
|
}, {
|
|
3403
|
-
default:
|
|
3403
|
+
default: J(() => [
|
|
3404
3404
|
we(y, { gutter: 24 }, {
|
|
3405
|
-
default:
|
|
3406
|
-
(k(!0), Y(be, null, ve(i.value, (
|
|
3407
|
-
key: b(
|
|
3408
|
-
span:
|
|
3405
|
+
default: J(() => [
|
|
3406
|
+
(k(!0), Y(be, null, ve(i.value, (O) => (k(), U(N, {
|
|
3407
|
+
key: b(O),
|
|
3408
|
+
span: w(O)
|
|
3409
3409
|
}, {
|
|
3410
|
-
default:
|
|
3411
|
-
we(
|
|
3412
|
-
prop:
|
|
3410
|
+
default: J(() => [
|
|
3411
|
+
we(h, oe({
|
|
3412
|
+
prop: O.code,
|
|
3413
3413
|
ref_for: !0
|
|
3414
|
-
},
|
|
3415
|
-
label:
|
|
3414
|
+
}, O.formItemProps), {
|
|
3415
|
+
label: J(() => [
|
|
3416
3416
|
te("span", ra, [
|
|
3417
|
-
|
|
3418
|
-
Ye(" " + fe(
|
|
3417
|
+
I(O) ? (k(), Y("span", aa, "*")) : ue("", !0),
|
|
3418
|
+
Ye(" " + fe(O.label), 1)
|
|
3419
3419
|
])
|
|
3420
3420
|
]),
|
|
3421
|
-
default:
|
|
3422
|
-
g(
|
|
3421
|
+
default: J(() => [
|
|
3422
|
+
g(O) ? ee(v.$slots, g(O), oe({
|
|
3423
3423
|
key: 0,
|
|
3424
3424
|
ref_for: !0
|
|
3425
|
-
},
|
|
3425
|
+
}, A(O)), void 0, !0) : v.editing && !O.readonly ? (k(), U(Fn, {
|
|
3426
3426
|
key: 1,
|
|
3427
|
-
field:
|
|
3428
|
-
"model-value": o.value[
|
|
3429
|
-
section:
|
|
3430
|
-
onLoadOptions: (
|
|
3431
|
-
"onUpdate:modelValue": (
|
|
3432
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (k(),
|
|
3427
|
+
field: O,
|
|
3428
|
+
"model-value": o.value[O.code],
|
|
3429
|
+
section: v.section,
|
|
3430
|
+
onLoadOptions: (R) => $(O, R),
|
|
3431
|
+
"onUpdate:modelValue": (R) => l(O, R)
|
|
3432
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (k(), U(Bn, {
|
|
3433
3433
|
key: 2,
|
|
3434
|
-
field:
|
|
3435
|
-
value: o.value[
|
|
3436
|
-
section:
|
|
3434
|
+
field: O,
|
|
3435
|
+
value: o.value[O.code],
|
|
3436
|
+
section: v.section
|
|
3437
3437
|
}, null, 8, ["field", "value", "section"]))
|
|
3438
3438
|
]),
|
|
3439
3439
|
_: 2
|
|
@@ -3461,7 +3461,7 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3461
3461
|
setup(e) {
|
|
3462
3462
|
return (t, n) => {
|
|
3463
3463
|
const o = no;
|
|
3464
|
-
return k(),
|
|
3464
|
+
return k(), U(o, {
|
|
3465
3465
|
title: t.title,
|
|
3466
3466
|
"confirm-button-text": t.confirmText,
|
|
3467
3467
|
"cancel-button-text": t.cancelText,
|
|
@@ -3470,8 +3470,8 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3470
3470
|
onConfirm: n[0] || (n[0] = (r) => t.$emit("confirm")),
|
|
3471
3471
|
onCancel: n[1] || (n[1] = (r) => t.$emit("cancel"))
|
|
3472
3472
|
}, {
|
|
3473
|
-
reference:
|
|
3474
|
-
|
|
3473
|
+
reference: J(() => [
|
|
3474
|
+
ee(t.$slots, "default")
|
|
3475
3475
|
]),
|
|
3476
3476
|
_: 3
|
|
3477
3477
|
}, 8, ["title", "confirm-button-text", "cancel-button-text"]);
|
|
@@ -3494,166 +3494,177 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3494
3494
|
renderConfig: {}
|
|
3495
3495
|
},
|
|
3496
3496
|
setup(e) {
|
|
3497
|
-
const t = e, n = Le(), o =
|
|
3497
|
+
const t = e, n = Le(), o = V(() => t.section.fields.some((u) => Lt(u))), r = V(() => o.value), i = V(() => t.renderConfig?.sequenceLabel ?? "序号"), s = V(() => t.renderConfig?.sequenceWidth ?? 56), l = V(() => {
|
|
3498
3498
|
const u = t.renderConfig?.sequenceStart;
|
|
3499
3499
|
return typeof u == "number" && Number.isFinite(u) ? u : 1;
|
|
3500
|
-
}), a =
|
|
3500
|
+
}), a = V(() => {
|
|
3501
3501
|
const u = lt(
|
|
3502
3502
|
t.section.fields,
|
|
3503
3503
|
t.section,
|
|
3504
3504
|
t.renderConfig,
|
|
3505
3505
|
{ rows: t.section.rows, values: t.section.model }
|
|
3506
3506
|
);
|
|
3507
|
-
return r.value ? u.filter((
|
|
3507
|
+
return r.value ? u.filter((m) => !ne(m)) : u;
|
|
3508
3508
|
}), c = /* @__PURE__ */ new Map(), p = rn(
|
|
3509
|
-
async (u,
|
|
3510
|
-
(u,
|
|
3509
|
+
async (u, m, C) => t.actions.loadFieldOptions(t.section, u, m, C),
|
|
3510
|
+
(u, m) => `${t.section.key}:${D(m)}:${O(u)}`
|
|
3511
3511
|
);
|
|
3512
|
-
function
|
|
3512
|
+
function _(u) {
|
|
3513
3513
|
t.actions.deleteRow(t.section, u);
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3516
|
-
const
|
|
3515
|
+
function $(u, m) {
|
|
3516
|
+
const C = t.renderConfig?.rowDeleteVisibleRule;
|
|
3517
|
+
return t.showDelete && (typeof C == "function" ? C({
|
|
3518
|
+
section: t.section,
|
|
3519
|
+
row: u,
|
|
3520
|
+
rowIndex: m,
|
|
3521
|
+
node: t.node,
|
|
3522
|
+
state: t.state,
|
|
3523
|
+
actions: t.actions
|
|
3524
|
+
}) : u.allowDelete !== !1);
|
|
3525
|
+
}
|
|
3526
|
+
function S(u, m, C, E) {
|
|
3527
|
+
const L = t.section.rows.slice(), q = C.cascadeClearFields ?? [], H = {
|
|
3517
3528
|
...u,
|
|
3518
|
-
__rowKey:
|
|
3519
|
-
[
|
|
3529
|
+
__rowKey: D(u),
|
|
3530
|
+
[C.code]: E
|
|
3520
3531
|
};
|
|
3521
|
-
|
|
3522
|
-
K
|
|
3523
|
-
}), L[
|
|
3524
|
-
...
|
|
3525
|
-
}, t.actions.updateTableRows(t.section, L),
|
|
3532
|
+
q.forEach((K) => {
|
|
3533
|
+
H[K] = "";
|
|
3534
|
+
}), L[m] = {
|
|
3535
|
+
...H
|
|
3536
|
+
}, t.actions.updateTableRows(t.section, L), A(C, E, H, m, L), I(C, H);
|
|
3526
3537
|
}
|
|
3527
|
-
function
|
|
3528
|
-
const
|
|
3529
|
-
if (
|
|
3538
|
+
function A(u, m, C, E, L) {
|
|
3539
|
+
const q = t.renderConfig?.onFieldBusinessChange;
|
|
3540
|
+
if (q)
|
|
3530
3541
|
try {
|
|
3531
|
-
const
|
|
3542
|
+
const H = g(u, m), K = { ...t.section.model, ...C }, X = {
|
|
3532
3543
|
field: u,
|
|
3533
|
-
value:
|
|
3544
|
+
value: m,
|
|
3534
3545
|
section: t.section,
|
|
3535
|
-
model:
|
|
3536
|
-
values:
|
|
3537
|
-
row:
|
|
3538
|
-
rowIndex:
|
|
3546
|
+
model: K,
|
|
3547
|
+
values: K,
|
|
3548
|
+
row: C,
|
|
3549
|
+
rowIndex: E,
|
|
3539
3550
|
rows: L,
|
|
3540
3551
|
node: t.node,
|
|
3541
3552
|
activeNode: t.node,
|
|
3542
|
-
sections:
|
|
3543
|
-
sectionValues:
|
|
3553
|
+
sections: w(),
|
|
3554
|
+
sectionValues: b(t.section, L),
|
|
3544
3555
|
actions: t.actions,
|
|
3545
|
-
selectedOption:
|
|
3546
|
-
selectedOptions:
|
|
3556
|
+
selectedOption: H[0],
|
|
3557
|
+
selectedOptions: H
|
|
3547
3558
|
};
|
|
3548
|
-
Promise.resolve(
|
|
3549
|
-
console.error("[GlobalInfoTableRenderer] field business change failed",
|
|
3559
|
+
Promise.resolve(q(X)).catch((P) => {
|
|
3560
|
+
console.error("[GlobalInfoTableRenderer] field business change failed", P);
|
|
3550
3561
|
});
|
|
3551
|
-
} catch (
|
|
3552
|
-
console.error("[GlobalInfoTableRenderer] field business change failed",
|
|
3562
|
+
} catch (H) {
|
|
3563
|
+
console.error("[GlobalInfoTableRenderer] field business change failed", H);
|
|
3553
3564
|
}
|
|
3554
3565
|
}
|
|
3555
|
-
function
|
|
3556
|
-
const
|
|
3557
|
-
return (u.options ?? []).filter((
|
|
3566
|
+
function g(u, m) {
|
|
3567
|
+
const C = it(u, m);
|
|
3568
|
+
return (u.options ?? []).filter((E) => C.some((L) => E.value === L || String(E.value) === String(L)));
|
|
3558
3569
|
}
|
|
3559
|
-
function
|
|
3570
|
+
function w() {
|
|
3560
3571
|
return Object.values(t.state.sectionMap);
|
|
3561
3572
|
}
|
|
3562
|
-
function
|
|
3563
|
-
const
|
|
3564
|
-
const
|
|
3565
|
-
return [L.key, L.id, L.setId, L.infSetId, L.code].filter(Boolean).map((
|
|
3573
|
+
function b(u, m) {
|
|
3574
|
+
const E = w().flatMap((L) => {
|
|
3575
|
+
const q = L.key === u.key ? m : L.renderType === "table" ? L.rows : L.model;
|
|
3576
|
+
return [L.key, L.id, L.setId, L.infSetId, L.code].filter(Boolean).map((H) => [String(H), q]);
|
|
3566
3577
|
});
|
|
3567
|
-
return Object.fromEntries(
|
|
3578
|
+
return Object.fromEntries(E);
|
|
3568
3579
|
}
|
|
3569
|
-
async function
|
|
3570
|
-
const L =
|
|
3571
|
-
if (!Ln(
|
|
3572
|
-
c.set(
|
|
3580
|
+
async function j(u, m, C = {}, E = m) {
|
|
3581
|
+
const L = D(E), q = `${L}:${O(u)}`, H = ot(t.section.key, u, E, L), K = c.get(q);
|
|
3582
|
+
if (!Ln(C) && rt(u, K, H)) {
|
|
3583
|
+
c.set(q, H);
|
|
3573
3584
|
return;
|
|
3574
3585
|
}
|
|
3575
3586
|
try {
|
|
3576
|
-
if (
|
|
3577
|
-
await p(u,
|
|
3587
|
+
if (C.searchText !== void 0) {
|
|
3588
|
+
await p(u, E, C);
|
|
3578
3589
|
return;
|
|
3579
3590
|
}
|
|
3580
|
-
await t.actions.loadFieldOptions(t.section, u,
|
|
3581
|
-
} catch (
|
|
3582
|
-
console.error("[GlobalInfoTableRenderer] load field options failed",
|
|
3591
|
+
await t.actions.loadFieldOptions(t.section, u, E, C), c.set(q, H);
|
|
3592
|
+
} catch (P) {
|
|
3593
|
+
console.error("[GlobalInfoTableRenderer] load field options failed", P);
|
|
3583
3594
|
}
|
|
3584
3595
|
}
|
|
3585
|
-
async function
|
|
3586
|
-
const
|
|
3587
|
-
for (const
|
|
3588
|
-
const L =
|
|
3589
|
-
for (const
|
|
3590
|
-
if (u && !En(
|
|
3591
|
-
const
|
|
3592
|
-
if (!
|
|
3593
|
-
const
|
|
3594
|
-
if (rt(
|
|
3595
|
-
c.set(
|
|
3596
|
+
async function I(u, m) {
|
|
3597
|
+
const C = m ? [m] : t.section.rows;
|
|
3598
|
+
for (const E of C) {
|
|
3599
|
+
const L = D(E);
|
|
3600
|
+
for (const q of a.value) {
|
|
3601
|
+
if (u && !En(q, u)) continue;
|
|
3602
|
+
const H = E[q.code];
|
|
3603
|
+
if (!N(q, H)) continue;
|
|
3604
|
+
const K = ot(t.section.key, q, E, L), X = `${L}:${O(q)}`, P = c.get(X);
|
|
3605
|
+
if (rt(q, P, K)) {
|
|
3606
|
+
c.set(X, K);
|
|
3596
3607
|
continue;
|
|
3597
3608
|
}
|
|
3598
|
-
|
|
3609
|
+
P !== K && await j(q, E, Pn(q, H));
|
|
3599
3610
|
}
|
|
3600
3611
|
}
|
|
3601
3612
|
}
|
|
3602
|
-
function
|
|
3603
|
-
const
|
|
3613
|
+
function v(u, m, C) {
|
|
3614
|
+
const E = m[u.code];
|
|
3604
3615
|
return {
|
|
3605
3616
|
field: u,
|
|
3606
3617
|
section: t.section,
|
|
3607
3618
|
sectionView: t.section,
|
|
3608
3619
|
node: t.node,
|
|
3609
|
-
row:
|
|
3610
|
-
rowIndex:
|
|
3620
|
+
row: m,
|
|
3621
|
+
rowIndex: C,
|
|
3611
3622
|
editing: t.editing,
|
|
3612
|
-
modelValue:
|
|
3613
|
-
value:
|
|
3623
|
+
modelValue: E,
|
|
3624
|
+
value: E,
|
|
3614
3625
|
state: t.state,
|
|
3615
3626
|
actions: t.actions,
|
|
3616
|
-
updateModelValue: (L) =>
|
|
3627
|
+
updateModelValue: (L) => S(m, C, u, L)
|
|
3617
3628
|
};
|
|
3618
3629
|
}
|
|
3619
|
-
function
|
|
3620
|
-
const
|
|
3621
|
-
if (
|
|
3622
|
-
const
|
|
3623
|
-
return
|
|
3630
|
+
function T(u) {
|
|
3631
|
+
const m = String(u.code || "").trim(), C = m ? `field-${m}` : "";
|
|
3632
|
+
if (C && n[C]) return C;
|
|
3633
|
+
const E = C.toLowerCase();
|
|
3634
|
+
return E !== C && n[E] ? E : "";
|
|
3624
3635
|
}
|
|
3625
|
-
function
|
|
3636
|
+
function h(u) {
|
|
3626
3637
|
return !u.readonly && !u.disabled;
|
|
3627
3638
|
}
|
|
3628
|
-
function
|
|
3629
|
-
return Vn(u,
|
|
3639
|
+
function N(u, m) {
|
|
3640
|
+
return Vn(u, m, t.editing);
|
|
3630
3641
|
}
|
|
3631
|
-
function
|
|
3642
|
+
function y(u) {
|
|
3632
3643
|
return u.width ?? (Bt(u) ? 56 : void 0);
|
|
3633
3644
|
}
|
|
3634
|
-
function
|
|
3645
|
+
function F(u) {
|
|
3635
3646
|
if (!u.width)
|
|
3636
3647
|
return u.minWidth ?? (Bt(u) ? 56 : void 0);
|
|
3637
3648
|
}
|
|
3638
|
-
function
|
|
3649
|
+
function O(u) {
|
|
3639
3650
|
return u.key || u.id || u.code;
|
|
3640
3651
|
}
|
|
3641
|
-
function
|
|
3652
|
+
function R(u) {
|
|
3642
3653
|
return l.value + u;
|
|
3643
3654
|
}
|
|
3644
|
-
function
|
|
3655
|
+
function ne(u) {
|
|
3645
3656
|
return Lt(u);
|
|
3646
3657
|
}
|
|
3647
|
-
let
|
|
3648
|
-
const
|
|
3649
|
-
function
|
|
3650
|
-
const
|
|
3651
|
-
if (
|
|
3652
|
-
const
|
|
3653
|
-
if (
|
|
3654
|
-
|
|
3655
|
-
const L = `local-${
|
|
3656
|
-
return
|
|
3658
|
+
let x = 0;
|
|
3659
|
+
const z = /* @__PURE__ */ new WeakMap();
|
|
3660
|
+
function D(u) {
|
|
3661
|
+
const m = u.__rowKey ?? u.key ?? u.id ?? u.setId ?? u.infSetId;
|
|
3662
|
+
if (m != null && m !== "") return String(m);
|
|
3663
|
+
const C = u, E = z.get(C);
|
|
3664
|
+
if (E) return E;
|
|
3665
|
+
x += 1;
|
|
3666
|
+
const L = `local-${x}`;
|
|
3667
|
+
return z.set(C, L), L;
|
|
3657
3668
|
}
|
|
3658
3669
|
function B(u) {
|
|
3659
3670
|
return u.required || u.isRequired;
|
|
@@ -3666,92 +3677,92 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3666
3677
|
), Be(
|
|
3667
3678
|
() => t.editing,
|
|
3668
3679
|
() => {
|
|
3669
|
-
|
|
3680
|
+
I();
|
|
3670
3681
|
},
|
|
3671
3682
|
{ immediate: !0 }
|
|
3672
|
-
), (u,
|
|
3673
|
-
const
|
|
3683
|
+
), (u, m) => {
|
|
3684
|
+
const C = en, E = Hn("Delete"), L = Yt, q = It, H = Xt;
|
|
3674
3685
|
return k(), Y("div", {
|
|
3675
3686
|
class: Ue(["global-info-table-renderer", { "global-info-table-renderer--editing": u.editing }])
|
|
3676
3687
|
}, [
|
|
3677
3688
|
te("div", ca, [
|
|
3678
|
-
we(
|
|
3689
|
+
we(H, {
|
|
3679
3690
|
class: "global-info-table-renderer__table",
|
|
3680
3691
|
data: u.section.rows,
|
|
3681
3692
|
fit: !0,
|
|
3682
3693
|
"table-layout": "auto",
|
|
3683
|
-
"row-key":
|
|
3694
|
+
"row-key": D
|
|
3684
3695
|
}, {
|
|
3685
|
-
default:
|
|
3686
|
-
r.value ? (k(),
|
|
3696
|
+
default: J(() => [
|
|
3697
|
+
r.value ? (k(), U(C, {
|
|
3687
3698
|
key: 0,
|
|
3688
3699
|
type: "index",
|
|
3689
3700
|
label: i.value,
|
|
3690
3701
|
width: s.value,
|
|
3691
|
-
index:
|
|
3702
|
+
index: R
|
|
3692
3703
|
}, null, 8, ["label", "width"])) : ue("", !0),
|
|
3693
|
-
(k(!0), Y(be, null, ve(a.value, (
|
|
3694
|
-
key:
|
|
3695
|
-
prop:
|
|
3696
|
-
label:
|
|
3697
|
-
width:
|
|
3698
|
-
"min-width":
|
|
3704
|
+
(k(!0), Y(be, null, ve(a.value, (K) => (k(), U(C, {
|
|
3705
|
+
key: O(K),
|
|
3706
|
+
prop: K.code,
|
|
3707
|
+
label: K.label,
|
|
3708
|
+
width: y(K),
|
|
3709
|
+
"min-width": F(K)
|
|
3699
3710
|
}, {
|
|
3700
|
-
header:
|
|
3711
|
+
header: J(() => [
|
|
3701
3712
|
te("span", ua, [
|
|
3702
|
-
B(
|
|
3703
|
-
te("span", null, fe(
|
|
3713
|
+
B(K) ? (k(), Y("span", da, "*")) : ue("", !0),
|
|
3714
|
+
te("span", null, fe(K.label), 1)
|
|
3704
3715
|
])
|
|
3705
3716
|
]),
|
|
3706
|
-
default:
|
|
3707
|
-
|
|
3717
|
+
default: J(({ row: X, $index: P }) => [
|
|
3718
|
+
T(K) ? ee(u.$slots, T(K), oe({
|
|
3708
3719
|
key: 0,
|
|
3709
3720
|
ref_for: !0
|
|
3710
|
-
},
|
|
3721
|
+
}, v(K, X, P)), void 0, !0) : u.editing && h(K) ? (k(), U(Fn, {
|
|
3711
3722
|
key: 1,
|
|
3712
|
-
field:
|
|
3713
|
-
"model-value":
|
|
3723
|
+
field: K,
|
|
3724
|
+
"model-value": X[K.code],
|
|
3714
3725
|
section: u.section,
|
|
3715
|
-
row:
|
|
3716
|
-
"row-index":
|
|
3717
|
-
onLoadOptions: (
|
|
3718
|
-
"onUpdate:modelValue": (
|
|
3719
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (k(),
|
|
3726
|
+
row: X,
|
|
3727
|
+
"row-index": P,
|
|
3728
|
+
onLoadOptions: (Z) => j(K, X, Z),
|
|
3729
|
+
"onUpdate:modelValue": (Z) => S(X, P, K, Z)
|
|
3730
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (k(), U(Bn, {
|
|
3720
3731
|
key: 2,
|
|
3721
|
-
field:
|
|
3722
|
-
value:
|
|
3732
|
+
field: K,
|
|
3733
|
+
value: X[K.code],
|
|
3723
3734
|
section: u.section,
|
|
3724
|
-
row:
|
|
3725
|
-
"row-index":
|
|
3735
|
+
row: X,
|
|
3736
|
+
"row-index": P
|
|
3726
3737
|
}, null, 8, ["field", "value", "section", "row", "row-index"]))
|
|
3727
3738
|
]),
|
|
3728
3739
|
_: 2
|
|
3729
3740
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
3730
|
-
u.editing ? (k(),
|
|
3741
|
+
u.editing ? (k(), U(C, {
|
|
3731
3742
|
key: 1,
|
|
3732
3743
|
label: "操作",
|
|
3733
3744
|
width: "104",
|
|
3734
3745
|
fixed: "right"
|
|
3735
3746
|
}, {
|
|
3736
|
-
default:
|
|
3737
|
-
|
|
3747
|
+
default: J(({ row: K, $index: X }) => [
|
|
3748
|
+
$(K, X) ? (k(), U(la, {
|
|
3738
3749
|
key: 0,
|
|
3739
|
-
onConfirm: (
|
|
3750
|
+
onConfirm: (P) => _(X)
|
|
3740
3751
|
}, {
|
|
3741
|
-
default:
|
|
3742
|
-
we(
|
|
3752
|
+
default: J(() => [
|
|
3753
|
+
we(q, {
|
|
3743
3754
|
class: "global-info-table-renderer__delete",
|
|
3744
3755
|
link: "",
|
|
3745
3756
|
type: "danger"
|
|
3746
3757
|
}, {
|
|
3747
|
-
default:
|
|
3758
|
+
default: J(() => [
|
|
3748
3759
|
we(L, { class: "global-info-table-renderer__delete-icon" }, {
|
|
3749
|
-
default:
|
|
3750
|
-
we(
|
|
3760
|
+
default: J(() => [
|
|
3761
|
+
we(E)
|
|
3751
3762
|
]),
|
|
3752
3763
|
_: 1
|
|
3753
3764
|
}),
|
|
3754
|
-
|
|
3765
|
+
m[0] || (m[0] = Ye(" 删除 "))
|
|
3755
3766
|
]),
|
|
3756
3767
|
_: 1
|
|
3757
3768
|
})
|
|
@@ -3768,7 +3779,7 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3768
3779
|
], 2);
|
|
3769
3780
|
};
|
|
3770
3781
|
}
|
|
3771
|
-
}), pa = /* @__PURE__ */ ge(fa, [["__scopeId", "data-v-
|
|
3782
|
+
}), pa = /* @__PURE__ */ ge(fa, [["__scopeId", "data-v-366b90b7"]]), ma = /* @__PURE__ */ ce({
|
|
3772
3783
|
name: "GlobalInfoAutoRenderer",
|
|
3773
3784
|
__name: "GlobalInfoAutoRenderer",
|
|
3774
3785
|
props: {
|
|
@@ -3780,7 +3791,7 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3780
3791
|
renderConfig: {}
|
|
3781
3792
|
},
|
|
3782
3793
|
setup(e) {
|
|
3783
|
-
return (t, n) => t.section.renderType === "table" ? (k(),
|
|
3794
|
+
return (t, n) => t.section.renderType === "table" ? (k(), U(pa, {
|
|
3784
3795
|
key: 0,
|
|
3785
3796
|
section: t.section,
|
|
3786
3797
|
node: t.node,
|
|
@@ -3788,7 +3799,7 @@ const ra = { class: "global-info-form-renderer__label" }, aa = {
|
|
|
3788
3799
|
state: t.state,
|
|
3789
3800
|
actions: t.actions,
|
|
3790
3801
|
"render-config": t.renderConfig
|
|
3791
|
-
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (k(),
|
|
3802
|
+
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (k(), U(ia, {
|
|
3792
3803
|
key: 1,
|
|
3793
3804
|
section: t.section,
|
|
3794
3805
|
node: t.node,
|
|
@@ -3827,7 +3838,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
3827
3838
|
renderConfig: {}
|
|
3828
3839
|
},
|
|
3829
3840
|
setup(e) {
|
|
3830
|
-
const t = e, n = Le(), o =
|
|
3841
|
+
const t = e, n = Le(), o = V(() => lt(
|
|
3831
3842
|
t.section.fields,
|
|
3832
3843
|
t.section,
|
|
3833
3844
|
t.renderConfig,
|
|
@@ -3835,7 +3846,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
3835
3846
|
values: t.section.model,
|
|
3836
3847
|
rows: t.section.renderType === "table" ? t.section.rows : void 0
|
|
3837
3848
|
}
|
|
3838
|
-
)), r =
|
|
3849
|
+
)), r = V(() => t.editing ?? t.actions.isEditing(t.section)), i = V(() => t.section.renderType === "table" && t.section.rows.length === 0 || o.value.length === 0), s = V(() => {
|
|
3839
3850
|
const a = Ct(
|
|
3840
3851
|
n,
|
|
3841
3852
|
"section",
|
|
@@ -3850,7 +3861,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
3850
3861
|
function l(a) {
|
|
3851
3862
|
return a === "form" || a === "table" ? a : "";
|
|
3852
3863
|
}
|
|
3853
|
-
return (a, c) => s.value ?
|
|
3864
|
+
return (a, c) => s.value ? ee(a.$slots, s.value, {
|
|
3854
3865
|
key: 0,
|
|
3855
3866
|
section: a.section,
|
|
3856
3867
|
sectionView: a.section,
|
|
@@ -3862,7 +3873,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
3862
3873
|
renderConfig: a.renderConfig,
|
|
3863
3874
|
state: a.state,
|
|
3864
3875
|
actions: a.actions
|
|
3865
|
-
}) : (k(),
|
|
3876
|
+
}) : (k(), U(ma, {
|
|
3866
3877
|
key: 1,
|
|
3867
3878
|
section: a.section,
|
|
3868
3879
|
node: a.node,
|
|
@@ -3928,26 +3939,26 @@ const va = /* @__PURE__ */ ce({
|
|
|
3928
3939
|
onSave: { type: Function }
|
|
3929
3940
|
},
|
|
3930
3941
|
setup(e) {
|
|
3931
|
-
const t = e, n = Le(), o = me(!1), r = me(null), i = me(null), s =
|
|
3942
|
+
const t = e, n = Le(), o = me(!1), r = me(null), i = me(null), s = V(() => !!t.hideHeader), l = V(() => t.actions.getSectionStatus(t.node)), a = V(() => t.actions.getSection(t.node) ?? i.value), c = V(() => {
|
|
3932
3943
|
const y = a.value;
|
|
3933
3944
|
return y ? lt(y.fields, y, t.renderConfig, {
|
|
3934
3945
|
values: y.model,
|
|
3935
3946
|
rows: y.renderType === "table" ? y.rows : void 0
|
|
3936
3947
|
}) : [];
|
|
3937
|
-
}), p =
|
|
3948
|
+
}), p = V(() => a.value?.title || t.node.tagName || t.node.label || "-"), _ = V(() => !!(a.value && t.actions.isEditing(a.value))), $ = V(() => a.value?.renderType === "table"), S = V(() => o.value || l.value.loading), A = V(() => b(r.value || l.value.error)), g = V(() => {
|
|
3938
3949
|
const y = a.value;
|
|
3939
3950
|
return y ? y.renderType === "table" && y.rows.length === 0 || c.value.length === 0 : !0;
|
|
3940
|
-
}),
|
|
3951
|
+
}), w = V(() => ({
|
|
3941
3952
|
node: t.node,
|
|
3942
3953
|
section: a.value,
|
|
3943
3954
|
sectionView: a.value,
|
|
3944
3955
|
fields: c.value,
|
|
3945
3956
|
renderConfig: t.renderConfig,
|
|
3946
3957
|
title: p.value,
|
|
3947
|
-
editing:
|
|
3948
|
-
loading:
|
|
3958
|
+
editing: _.value,
|
|
3959
|
+
loading: S.value,
|
|
3949
3960
|
error: r.value || l.value.error,
|
|
3950
|
-
errorMessage:
|
|
3961
|
+
errorMessage: A.value,
|
|
3951
3962
|
isEmpty: g.value,
|
|
3952
3963
|
empty: g.value,
|
|
3953
3964
|
sectionStatus: l.value,
|
|
@@ -3955,9 +3966,9 @@ const va = /* @__PURE__ */ ce({
|
|
|
3955
3966
|
actions: t.actions,
|
|
3956
3967
|
reload: N,
|
|
3957
3968
|
handleEdit: j,
|
|
3958
|
-
handleCancel:
|
|
3959
|
-
handleAddTableRow:
|
|
3960
|
-
handleSave:
|
|
3969
|
+
handleCancel: I,
|
|
3970
|
+
handleAddTableRow: v,
|
|
3971
|
+
handleSave: T
|
|
3961
3972
|
}));
|
|
3962
3973
|
function b(y) {
|
|
3963
3974
|
return y ? y instanceof Error ? y.message : String(y) : "";
|
|
@@ -3966,17 +3977,17 @@ const va = /* @__PURE__ */ ce({
|
|
|
3966
3977
|
const y = a.value;
|
|
3967
3978
|
y && (await t.onEdit?.(y, t.node), t.onEdit || t.actions.startEdit(y));
|
|
3968
3979
|
}
|
|
3969
|
-
async function
|
|
3980
|
+
async function I() {
|
|
3970
3981
|
const y = a.value;
|
|
3971
3982
|
y && (await t.onCancel?.(y, t.node), t.onCancel || t.actions.cancelEdit(y));
|
|
3972
3983
|
}
|
|
3973
|
-
function
|
|
3984
|
+
function v() {
|
|
3974
3985
|
const y = a.value;
|
|
3975
3986
|
if (!y) return;
|
|
3976
|
-
const
|
|
3977
|
-
t.actions.saveRow(y,
|
|
3987
|
+
const F = y.fields.reduce((O, R) => (O[R.code] = R.value ?? "", O), { __rowKey: `new-${Date.now()}` });
|
|
3988
|
+
t.actions.saveRow(y, F, -1);
|
|
3978
3989
|
}
|
|
3979
|
-
async function
|
|
3990
|
+
async function T() {
|
|
3980
3991
|
const y = a.value;
|
|
3981
3992
|
if (y)
|
|
3982
3993
|
try {
|
|
@@ -3985,11 +3996,11 @@ const va = /* @__PURE__ */ ce({
|
|
|
3985
3996
|
return;
|
|
3986
3997
|
}
|
|
3987
3998
|
await t.actions.saveSection(y);
|
|
3988
|
-
} catch (
|
|
3989
|
-
r.value =
|
|
3999
|
+
} catch (F) {
|
|
4000
|
+
r.value = F, console.error("[GlobalInfoSectionBlock] save section failed", F);
|
|
3990
4001
|
}
|
|
3991
4002
|
}
|
|
3992
|
-
function
|
|
4003
|
+
function h(y) {
|
|
3993
4004
|
r.value = y;
|
|
3994
4005
|
}
|
|
3995
4006
|
async function N() {
|
|
@@ -4009,56 +4020,56 @@ const va = /* @__PURE__ */ ce({
|
|
|
4009
4020
|
() => {
|
|
4010
4021
|
N();
|
|
4011
4022
|
}
|
|
4012
|
-
), (y,
|
|
4013
|
-
const
|
|
4023
|
+
), (y, F) => {
|
|
4024
|
+
const O = It;
|
|
4014
4025
|
return k(), Y("section", ga, [
|
|
4015
4026
|
s.value ? ue("", !0) : (k(), Y("header", ya, [
|
|
4016
|
-
|
|
4027
|
+
ee(y.$slots, "header", Me(Fe(w.value)), () => [
|
|
4017
4028
|
te("div", ba, [
|
|
4018
|
-
|
|
4029
|
+
F[0] || (F[0] = te("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4019
4030
|
te("h3", Sa, fe(p.value), 1)
|
|
4020
4031
|
]),
|
|
4021
|
-
|
|
4032
|
+
ee(y.$slots, "actions", Me(Fe(w.value)), () => [
|
|
4022
4033
|
a.value ? (k(), Y("div", wa, [
|
|
4023
|
-
|
|
4024
|
-
we(
|
|
4034
|
+
_.value ? (k(), Y(be, { key: 1 }, [
|
|
4035
|
+
we(O, {
|
|
4025
4036
|
class: "global-info-section-block__cancel",
|
|
4026
4037
|
disabled: l.value.saving,
|
|
4027
|
-
onClick:
|
|
4038
|
+
onClick: I
|
|
4028
4039
|
}, {
|
|
4029
|
-
default:
|
|
4040
|
+
default: J(() => F[2] || (F[2] = [
|
|
4030
4041
|
Ye(" 取消 ")
|
|
4031
4042
|
])),
|
|
4032
4043
|
_: 1
|
|
4033
4044
|
}, 8, ["disabled"]),
|
|
4034
|
-
|
|
4045
|
+
$.value ? (k(), U(O, {
|
|
4035
4046
|
key: 0,
|
|
4036
4047
|
class: "global-info-section-block__add",
|
|
4037
4048
|
disabled: l.value.saving,
|
|
4038
|
-
onClick:
|
|
4049
|
+
onClick: v
|
|
4039
4050
|
}, {
|
|
4040
|
-
default:
|
|
4051
|
+
default: J(() => F[3] || (F[3] = [
|
|
4041
4052
|
Ye(" 新增 ")
|
|
4042
4053
|
])),
|
|
4043
4054
|
_: 1
|
|
4044
4055
|
}, 8, ["disabled"])) : ue("", !0),
|
|
4045
|
-
we(
|
|
4056
|
+
we(O, {
|
|
4046
4057
|
class: "global-info-section-block__confirm",
|
|
4047
4058
|
loading: l.value.saving,
|
|
4048
|
-
onClick:
|
|
4059
|
+
onClick: T
|
|
4049
4060
|
}, {
|
|
4050
|
-
default:
|
|
4051
|
-
Ye(fe(
|
|
4061
|
+
default: J(() => [
|
|
4062
|
+
Ye(fe($.value ? "确认" : "保存"), 1)
|
|
4052
4063
|
]),
|
|
4053
4064
|
_: 1
|
|
4054
4065
|
}, 8, ["loading"])
|
|
4055
|
-
], 64)) : (k(),
|
|
4066
|
+
], 64)) : (k(), U(O, {
|
|
4056
4067
|
key: 0,
|
|
4057
4068
|
class: "global-info-section-block__edit",
|
|
4058
|
-
disabled: l.value.saving ||
|
|
4069
|
+
disabled: l.value.saving || S.value,
|
|
4059
4070
|
onClick: j
|
|
4060
4071
|
}, {
|
|
4061
|
-
default:
|
|
4072
|
+
default: J(() => F[1] || (F[1] = [
|
|
4062
4073
|
te("svg", {
|
|
4063
4074
|
class: "global-info-section-block__edit-icon",
|
|
4064
4075
|
viewBox: "0 0 12 12",
|
|
@@ -4079,34 +4090,34 @@ const va = /* @__PURE__ */ ce({
|
|
|
4079
4090
|
], !0)
|
|
4080
4091
|
])),
|
|
4081
4092
|
te("div", Ia, [
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
], !0) : !a.value || g.value ?
|
|
4085
|
-
|
|
4086
|
-
], !0) : (k(),
|
|
4093
|
+
S.value ? ee(y.$slots, "loading", Me(oe({ key: 0 }, w.value)), () => [
|
|
4094
|
+
F[4] || (F[4] = te("div", { class: "global-info-section-block__status" }, "加载中...", -1))
|
|
4095
|
+
], !0) : !a.value || g.value ? ee(y.$slots, "empty", Me(oe({ key: 1 }, w.value)), () => [
|
|
4096
|
+
F[5] || (F[5] = te("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
4097
|
+
], !0) : (k(), U(ha, {
|
|
4087
4098
|
key: 2,
|
|
4088
4099
|
"boundary-key": y.node.key,
|
|
4089
4100
|
label: p.value,
|
|
4090
|
-
onError:
|
|
4101
|
+
onError: h
|
|
4091
4102
|
}, {
|
|
4092
|
-
fallback:
|
|
4093
|
-
|
|
4094
|
-
|
|
4103
|
+
fallback: J(() => [
|
|
4104
|
+
ee(y.$slots, "empty", Me(Fe(w.value)), () => [
|
|
4105
|
+
F[6] || (F[6] = te("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
4095
4106
|
], !0)
|
|
4096
4107
|
]),
|
|
4097
|
-
default:
|
|
4108
|
+
default: J(() => [
|
|
4098
4109
|
we(va, {
|
|
4099
4110
|
section: a.value,
|
|
4100
4111
|
node: y.node,
|
|
4101
|
-
editing:
|
|
4112
|
+
editing: _.value,
|
|
4102
4113
|
state: y.state,
|
|
4103
4114
|
actions: y.actions,
|
|
4104
4115
|
"render-config": y.renderConfig
|
|
4105
4116
|
}, je({ _: 2 }, [
|
|
4106
|
-
ve(re(n), (
|
|
4117
|
+
ve(re(n), (R, ne) => ({
|
|
4107
4118
|
name: ne,
|
|
4108
|
-
fn:
|
|
4109
|
-
|
|
4119
|
+
fn: J((x) => [
|
|
4120
|
+
ee(y.$slots, ne, Me(Fe({ ...w.value, ...x })), void 0, !0)
|
|
4110
4121
|
])
|
|
4111
4122
|
}))
|
|
4112
4123
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4129,20 +4140,20 @@ const va = /* @__PURE__ */ ce({
|
|
|
4129
4140
|
renderConfig: {}
|
|
4130
4141
|
},
|
|
4131
4142
|
setup(e) {
|
|
4132
|
-
const t = e, n = Le(), o =
|
|
4143
|
+
const t = e, n = Le(), o = V(() => t.group.tagName || t.group.label || "-"), r = V(() => t.children.length <= 1);
|
|
4133
4144
|
function i(c, p) {
|
|
4134
|
-
const
|
|
4145
|
+
const _ = t.actions.getSection(c);
|
|
4135
4146
|
return {
|
|
4136
4147
|
node: c,
|
|
4137
4148
|
group: t.group,
|
|
4138
4149
|
sectionNode: c,
|
|
4139
|
-
section:
|
|
4140
|
-
sectionView:
|
|
4150
|
+
section: _,
|
|
4151
|
+
sectionView: _,
|
|
4141
4152
|
state: t.state,
|
|
4142
4153
|
actions: t.actions,
|
|
4143
4154
|
renderConfig: t.renderConfig,
|
|
4144
4155
|
index: p,
|
|
4145
|
-
editing: !!(
|
|
4156
|
+
editing: !!(_ && t.actions.isEditing(_)),
|
|
4146
4157
|
sectionStatus: t.actions.getSectionStatus(c),
|
|
4147
4158
|
isSelfSection: l(c, 0) === l(t.group, 0),
|
|
4148
4159
|
handleEdit: () => t.actions.startEdit(c),
|
|
@@ -4161,7 +4172,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
4161
4172
|
return `global-info-section-${l(c, 0)}`;
|
|
4162
4173
|
}
|
|
4163
4174
|
return (c, p) => (k(), Y("section", Ca, [
|
|
4164
|
-
|
|
4175
|
+
ee(c.$slots, "header", {
|
|
4165
4176
|
group: c.group,
|
|
4166
4177
|
children: c.children,
|
|
4167
4178
|
state: c.state,
|
|
@@ -4177,7 +4188,7 @@ const va = /* @__PURE__ */ ce({
|
|
|
4177
4188
|
])
|
|
4178
4189
|
], !0),
|
|
4179
4190
|
te("div", Ta, [
|
|
4180
|
-
re(n).default ?
|
|
4191
|
+
re(n).default ? ee(c.$slots, "default", {
|
|
4181
4192
|
key: 0,
|
|
4182
4193
|
group: c.group,
|
|
4183
4194
|
children: c.children,
|
|
@@ -4187,34 +4198,34 @@ const va = /* @__PURE__ */ ce({
|
|
|
4187
4198
|
index: c.index,
|
|
4188
4199
|
isEmpty: c.children.length === 0
|
|
4189
4200
|
}, void 0, !0) : (k(), Y(be, { key: 1 }, [
|
|
4190
|
-
(k(!0), Y(be, null, ve(c.children, (
|
|
4191
|
-
id: a(
|
|
4192
|
-
key: l(
|
|
4201
|
+
(k(!0), Y(be, null, ve(c.children, (_, $) => (k(), Y("div", {
|
|
4202
|
+
id: a(_),
|
|
4203
|
+
key: l(_, $),
|
|
4193
4204
|
class: "global-info-group__section"
|
|
4194
4205
|
}, [
|
|
4195
|
-
s(
|
|
4206
|
+
s(_) ? ee(c.$slots, s(_), oe({
|
|
4196
4207
|
key: 0,
|
|
4197
4208
|
ref_for: !0
|
|
4198
|
-
}, i(
|
|
4209
|
+
}, i(_, $)), void 0, !0) : re(n).section ? ee(c.$slots, "section", oe({
|
|
4199
4210
|
key: 1,
|
|
4200
4211
|
ref_for: !0
|
|
4201
|
-
}, i(
|
|
4212
|
+
}, i(_, $)), void 0, !0) : (k(), U($a, {
|
|
4202
4213
|
key: 2,
|
|
4203
|
-
node:
|
|
4214
|
+
node: _,
|
|
4204
4215
|
state: c.state,
|
|
4205
4216
|
actions: c.actions,
|
|
4206
4217
|
"hide-header": r.value,
|
|
4207
4218
|
"render-config": c.renderConfig
|
|
4208
4219
|
}, je({ _: 2 }, [
|
|
4209
|
-
ve(re(n), (
|
|
4210
|
-
name:
|
|
4211
|
-
fn:
|
|
4212
|
-
|
|
4220
|
+
ve(re(n), (S, A) => ({
|
|
4221
|
+
name: A,
|
|
4222
|
+
fn: J((g) => [
|
|
4223
|
+
ee(c.$slots, A, oe({ ref_for: !0 }, g), void 0, !0)
|
|
4213
4224
|
])
|
|
4214
4225
|
}))
|
|
4215
4226
|
]), 1032, ["node", "state", "actions", "hide-header", "render-config"]))
|
|
4216
4227
|
], 8, Oa))), 128)),
|
|
4217
|
-
c.children.length === 0 ?
|
|
4228
|
+
c.children.length === 0 ? ee(c.$slots, "empty", {
|
|
4218
4229
|
key: 0,
|
|
4219
4230
|
node: null,
|
|
4220
4231
|
group: c.group,
|
|
@@ -4240,12 +4251,12 @@ const va = /* @__PURE__ */ ce({
|
|
|
4240
4251
|
renderConfig: {}
|
|
4241
4252
|
},
|
|
4242
4253
|
setup(e) {
|
|
4243
|
-
const t = e, n = Le(), o =
|
|
4244
|
-
const p = t.nodes.filter((b) => r(b).length > 0),
|
|
4245
|
-
if (
|
|
4246
|
-
return
|
|
4247
|
-
const
|
|
4248
|
-
return [...
|
|
4254
|
+
const t = e, n = Le(), o = V(() => {
|
|
4255
|
+
const p = t.nodes.filter((b) => r(b).length > 0), _ = t.nodes.filter((b) => r(b).length === 0), $ = _.filter((b) => i(b)), S = _.filter((b) => !i(b)), A = p.map((b) => ({ group: b, children: r(b) })), g = $.map((b) => ({ group: b, children: [b] }));
|
|
4256
|
+
if (A.length === 0)
|
|
4257
|
+
return $.length > 0 ? g : c(S);
|
|
4258
|
+
const w = c(S);
|
|
4259
|
+
return [...A, ...g, ...w];
|
|
4249
4260
|
});
|
|
4250
4261
|
function r(p) {
|
|
4251
4262
|
return p.children ?? [];
|
|
@@ -4256,73 +4267,73 @@ const va = /* @__PURE__ */ ce({
|
|
|
4256
4267
|
function s(p) {
|
|
4257
4268
|
return Ct(n, "group", An(p));
|
|
4258
4269
|
}
|
|
4259
|
-
function l(p,
|
|
4260
|
-
return p.key || p.id || p.tagId || `${
|
|
4270
|
+
function l(p, _) {
|
|
4271
|
+
return p.key || p.id || p.tagId || `${_}`;
|
|
4261
4272
|
}
|
|
4262
4273
|
function a(p) {
|
|
4263
|
-
const
|
|
4274
|
+
const _ = p[0], $ = _?.raw ?? {}, S = String($.parentTagName || $.parentName || $.parentLabel || _?.parentId || "信息");
|
|
4264
4275
|
return {
|
|
4265
|
-
|
|
4266
|
-
key: `${
|
|
4267
|
-
id: String(
|
|
4268
|
-
tagId: String(
|
|
4269
|
-
tagName:
|
|
4270
|
-
label:
|
|
4276
|
+
..._,
|
|
4277
|
+
key: `${_?.parentId || _?.parentTagId || _?.key || "global-info"}-group`,
|
|
4278
|
+
id: String(_?.parentId || _?.parentTagId || _?.id || "global-info-group"),
|
|
4279
|
+
tagId: String(_?.parentTagId || _?.parentId || _?.tagId || "global-info-group"),
|
|
4280
|
+
tagName: S,
|
|
4281
|
+
label: S,
|
|
4271
4282
|
children: p
|
|
4272
4283
|
};
|
|
4273
4284
|
}
|
|
4274
4285
|
function c(p) {
|
|
4275
|
-
const
|
|
4276
|
-
return p.forEach((
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4279
|
-
}), Array.from(
|
|
4280
|
-
group: a(
|
|
4281
|
-
children:
|
|
4286
|
+
const _ = /* @__PURE__ */ new Map();
|
|
4287
|
+
return p.forEach(($) => {
|
|
4288
|
+
const S = String($.parentId || $.parentTagId || "global-info-flat"), A = _.get(S) ?? [];
|
|
4289
|
+
A.push($), _.set(S, A);
|
|
4290
|
+
}), Array.from(_.values()).map(($) => ({
|
|
4291
|
+
group: a($),
|
|
4292
|
+
children: $
|
|
4282
4293
|
}));
|
|
4283
4294
|
}
|
|
4284
|
-
return (p,
|
|
4285
|
-
(k(!0), Y(be, null, ve(o.value, (
|
|
4286
|
-
key: l(
|
|
4295
|
+
return (p, _) => (k(), Y("div", Ba, [
|
|
4296
|
+
(k(!0), Y(be, null, ve(o.value, ($, S) => (k(), Y(be, {
|
|
4297
|
+
key: l($.group, S)
|
|
4287
4298
|
}, [
|
|
4288
|
-
s(
|
|
4299
|
+
s($.group) ? ee(p.$slots, s($.group), {
|
|
4289
4300
|
key: 0,
|
|
4290
|
-
group:
|
|
4291
|
-
children:
|
|
4301
|
+
group: $.group,
|
|
4302
|
+
children: $.children,
|
|
4292
4303
|
state: p.state,
|
|
4293
4304
|
actions: p.actions,
|
|
4294
4305
|
renderConfig: p.renderConfig,
|
|
4295
|
-
index:
|
|
4296
|
-
isEmpty:
|
|
4297
|
-
}, void 0, !0) : re(n).group ?
|
|
4306
|
+
index: S,
|
|
4307
|
+
isEmpty: $.children.length === 0
|
|
4308
|
+
}, void 0, !0) : re(n).group ? ee(p.$slots, "group", {
|
|
4298
4309
|
key: 1,
|
|
4299
|
-
group:
|
|
4300
|
-
children:
|
|
4310
|
+
group: $.group,
|
|
4311
|
+
children: $.children,
|
|
4301
4312
|
state: p.state,
|
|
4302
4313
|
actions: p.actions,
|
|
4303
4314
|
renderConfig: p.renderConfig,
|
|
4304
|
-
index:
|
|
4305
|
-
isEmpty:
|
|
4306
|
-
}, void 0, !0) : (k(),
|
|
4315
|
+
index: S,
|
|
4316
|
+
isEmpty: $.children.length === 0
|
|
4317
|
+
}, void 0, !0) : (k(), U(Fa, {
|
|
4307
4318
|
key: 2,
|
|
4308
|
-
group:
|
|
4309
|
-
children:
|
|
4319
|
+
group: $.group,
|
|
4320
|
+
children: $.children,
|
|
4310
4321
|
state: p.state,
|
|
4311
4322
|
actions: p.actions,
|
|
4312
4323
|
"render-config": p.renderConfig,
|
|
4313
|
-
index:
|
|
4324
|
+
index: S
|
|
4314
4325
|
}, je({ _: 2 }, [
|
|
4315
|
-
ve(re(n), (
|
|
4326
|
+
ve(re(n), (A, g) => ({
|
|
4316
4327
|
name: g,
|
|
4317
|
-
fn:
|
|
4318
|
-
|
|
4328
|
+
fn: J((w) => [
|
|
4329
|
+
ee(p.$slots, g, oe({ ref_for: !0 }, w), void 0, !0)
|
|
4319
4330
|
])
|
|
4320
4331
|
}))
|
|
4321
4332
|
]), 1032, ["group", "children", "state", "actions", "render-config", "index"]))
|
|
4322
4333
|
], 64))), 128))
|
|
4323
4334
|
]));
|
|
4324
4335
|
}
|
|
4325
|
-
}),
|
|
4336
|
+
}), xa = /* @__PURE__ */ ge(La, [["__scopeId", "data-v-2be3bbc5"]]);
|
|
4326
4337
|
export {
|
|
4327
4338
|
ma as GlobalInfoAutoRenderer,
|
|
4328
4339
|
la as GlobalInfoDeleteConfirm,
|
|
@@ -4330,10 +4341,10 @@ export {
|
|
|
4330
4341
|
Bn as GlobalInfoFieldValue,
|
|
4331
4342
|
ia as GlobalInfoFormRenderer,
|
|
4332
4343
|
Fa as GlobalInfoGroup,
|
|
4333
|
-
|
|
4344
|
+
Ra as GlobalInfoProvider,
|
|
4334
4345
|
$a as GlobalInfoSectionBlock,
|
|
4335
4346
|
va as GlobalInfoSectionOutlet,
|
|
4336
|
-
|
|
4347
|
+
xa as GlobalInfoSections,
|
|
4337
4348
|
pa as GlobalInfoTableRenderer,
|
|
4338
4349
|
Tt as JtAttachmentPreview,
|
|
4339
4350
|
Ga as JtAttachmentPreviewByParams,
|
|
@@ -4356,5 +4367,5 @@ export {
|
|
|
4356
4367
|
jt as normalizeGlobalInfoTree,
|
|
4357
4368
|
mr as resolveGlobalInfoRenderType,
|
|
4358
4369
|
Ya as setupJtAttachmentPreview,
|
|
4359
|
-
|
|
4370
|
+
Rr as useGlobalInfoController
|
|
4360
4371
|
};
|