@jt-home/mfe-components 1.0.20 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1423 -1414
- package/dist/style.css +1 -1
- package/dist/types/components/form/item/JtCascader/cascaderProps.d.ts +1 -0
- package/dist/types/components/form/item/JtSelect/types.d.ts +2 -0
- package/dist/types/components/form/types.d.ts +2 -0
- package/dist/types/components/table/types.d.ts +2 -2
- package/package.json +1 -1
- package/readme.md +679 -660
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 zn, computed as L, openBlock as $, createBlock as H, mergeProps as oe, toHandlers as Ze, withCtx as J, renderSlot as ee, resolveDynamicComponent as zt, createCommentVNode as ue, ref as ve, watch as Be, mergeDefaults as qn, withKeys as Gn, createElementBlock as Y, Fragment as be, renderList as ge, normalizeStyle as qt, nextTick as Kn, useSlots as Ee, normalizeClass as He, createVNode as we, withModifiers as Gt, unref as re, createSlots as je, createElementVNode as te, toDisplayString as fe, normalizeProps as Me, guardReactiveProps as Fe, useModel as pt, withDirectives as Yn, mergeModels as Mt, shallowRef as Pe, onMounted as Kt, onBeforeUnmount as Un, createTextVNode as Ye, resolveComponent as Hn, onErrorCaptured as Jn } from "vue";
|
|
3
3
|
import { ElButton as It, ElIcon as Yt, ElCascader as Wn, ElDatePicker as Ut, ElInput as Ht, ElSelect as Jt, ElOption as Wt, ElFormItem as Zt, ElForm as Qt, ElTable as Xt, ElTableColumn as en, ElPagination as Zn, ElLoadingDirective as Qn, ElInputNumber as Xn, ElSwitch as eo, ElRow as to, ElCol as no, ElPopconfirm as oo } from "element-plus/es";
|
|
4
4
|
import { JtAttachmentPreview as Tt } from "./JtAttachmentPreview/index.mjs";
|
|
5
5
|
import { JtAttachmentPreviewByParams as Ha, setupJtAttachmentPreview as Ja } from "./JtAttachmentPreview/index.mjs";
|
|
@@ -55,18 +55,18 @@ const lo = /* @__PURE__ */ ce({
|
|
|
55
55
|
tag: {}
|
|
56
56
|
},
|
|
57
57
|
setup(e) {
|
|
58
|
-
const t = e, n =
|
|
58
|
+
const t = e, n = zn(), o = L(() => {
|
|
59
59
|
const { icon: i, ...s } = t;
|
|
60
60
|
return {
|
|
61
61
|
...on(n),
|
|
62
62
|
...s
|
|
63
63
|
};
|
|
64
|
-
}), r =
|
|
64
|
+
}), r = L(() => nn(n));
|
|
65
65
|
return (i, s) => {
|
|
66
66
|
const l = Yt, a = It;
|
|
67
|
-
return
|
|
67
|
+
return $(), H(a, oe({ class: "jt-button" }, o.value, Ze(r.value)), {
|
|
68
68
|
default: J(() => [
|
|
69
|
-
i.$slots.icon ? (
|
|
69
|
+
i.$slots.icon ? ($(), H(l, {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "jt-button__icon"
|
|
72
72
|
}, {
|
|
@@ -74,12 +74,12 @@ const lo = /* @__PURE__ */ ce({
|
|
|
74
74
|
ee(i.$slots, "icon", {}, void 0, !0)
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
77
|
-
})) : t.icon ? (
|
|
77
|
+
})) : t.icon ? ($(), H(l, {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "jt-button__icon"
|
|
80
80
|
}, {
|
|
81
81
|
default: J(() => [
|
|
82
|
-
(
|
|
82
|
+
($(), H(zt(t.icon)))
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
85
|
})) : ue("", !0),
|
|
@@ -94,7 +94,7 @@ const lo = /* @__PURE__ */ ce({
|
|
|
94
94
|
for (const [o, r] of t)
|
|
95
95
|
n[o] = r;
|
|
96
96
|
return n;
|
|
97
|
-
}, tt = /* @__PURE__ */ ye(lo, [["__scopeId", "data-v-
|
|
97
|
+
}, tt = /* @__PURE__ */ ye(lo, [["__scopeId", "data-v-29aa58e0"]]), co = {
|
|
98
98
|
// 默认值只补组件缺省体验,显式传入的 false、null 和空字符串仍由归一化逻辑保留。
|
|
99
99
|
options: () => [],
|
|
100
100
|
placeholder: "请选择",
|
|
@@ -107,10 +107,10 @@ function Ft(e) {
|
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
function uo(e) {
|
|
110
|
-
const t = Ft(
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
)),
|
|
110
|
+
const { hideDropdownIcon: t, ...n } = e, o = Ft(n);
|
|
111
|
+
return o.props && (o.props = Ft(
|
|
112
|
+
o.props
|
|
113
|
+
)), o;
|
|
114
114
|
}
|
|
115
115
|
const fo = /* @__PURE__ */ ce({
|
|
116
116
|
name: "JtCascader",
|
|
@@ -152,59 +152,62 @@ const fo = /* @__PURE__ */ ce({
|
|
|
152
152
|
height: {},
|
|
153
153
|
emptyValues: {},
|
|
154
154
|
valueOnClear: { type: [String, Number, Boolean, Function, null] },
|
|
155
|
-
options: {}
|
|
155
|
+
options: {},
|
|
156
|
+
hideDropdownIcon: { type: Boolean }
|
|
156
157
|
}, co),
|
|
157
158
|
emits: ro,
|
|
158
159
|
setup(e, { emit: t }) {
|
|
159
|
-
const n = e, o =
|
|
160
|
+
const n = e, o = L(() => uo(n)), r = ve(n.modelValue);
|
|
160
161
|
Be(
|
|
161
162
|
() => n.modelValue,
|
|
162
|
-
(
|
|
163
|
-
r.value =
|
|
163
|
+
(d) => {
|
|
164
|
+
r.value = d;
|
|
164
165
|
},
|
|
165
166
|
{ deep: !0 }
|
|
166
167
|
);
|
|
167
168
|
const i = t;
|
|
168
|
-
function s(
|
|
169
|
-
i(
|
|
169
|
+
function s(d, ...S) {
|
|
170
|
+
i(d, ...S);
|
|
170
171
|
}
|
|
171
|
-
function l(
|
|
172
|
-
r.value =
|
|
172
|
+
function l(d) {
|
|
173
|
+
r.value = d, s("update:modelValue", d);
|
|
173
174
|
}
|
|
174
|
-
function a(
|
|
175
|
-
s("change",
|
|
175
|
+
function a(d) {
|
|
176
|
+
s("change", d);
|
|
176
177
|
}
|
|
177
|
-
function c(
|
|
178
|
-
s("focus",
|
|
178
|
+
function c(d) {
|
|
179
|
+
s("focus", d);
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
-
s("blur",
|
|
181
|
+
function g(d) {
|
|
182
|
+
s("blur", d);
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function w() {
|
|
184
185
|
s("clear");
|
|
185
186
|
}
|
|
186
|
-
function
|
|
187
|
-
s("visibleChange",
|
|
187
|
+
function I(d) {
|
|
188
|
+
s("visibleChange", d);
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
-
s("expandChange",
|
|
190
|
+
function V(d) {
|
|
191
|
+
s("expandChange", d);
|
|
191
192
|
}
|
|
192
|
-
function A(
|
|
193
|
-
s("removeTag",
|
|
193
|
+
function A(d) {
|
|
194
|
+
s("removeTag", d);
|
|
194
195
|
}
|
|
195
|
-
return (
|
|
196
|
-
const
|
|
197
|
-
return
|
|
196
|
+
return (d, S) => {
|
|
197
|
+
const k = Wn;
|
|
198
|
+
return $(), H(k, oe({
|
|
199
|
+
class: ["jt-cascader", { "jt-cascader--hide-dropdown-icon": n.hideDropdownIcon }]
|
|
200
|
+
}, o.value, {
|
|
198
201
|
"model-value": r.value,
|
|
199
202
|
"onUpdate:modelValue": l,
|
|
200
203
|
onChange: a,
|
|
201
204
|
onFocus: c,
|
|
202
|
-
onBlur:
|
|
203
|
-
onClear:
|
|
204
|
-
onVisibleChange:
|
|
205
|
-
onExpandChange:
|
|
205
|
+
onBlur: g,
|
|
206
|
+
onClear: w,
|
|
207
|
+
onVisibleChange: I,
|
|
208
|
+
onExpandChange: V,
|
|
206
209
|
onRemoveTag: A
|
|
207
|
-
}), null, 16, ["model-value"]);
|
|
210
|
+
}), null, 16, ["class", "model-value"]);
|
|
208
211
|
};
|
|
209
212
|
}
|
|
210
213
|
}), po = /* @__PURE__ */ ce({
|
|
@@ -260,7 +263,7 @@ const fo = /* @__PURE__ */ ce({
|
|
|
260
263
|
isRange: { type: Boolean }
|
|
261
264
|
},
|
|
262
265
|
setup(e) {
|
|
263
|
-
const t = e, n =
|
|
266
|
+
const t = e, n = L(() => ({
|
|
264
267
|
...t,
|
|
265
268
|
startPlaceholder: t.startPlaceholder ?? (o(t.type) ? "开始日期" : void 0),
|
|
266
269
|
endPlaceholder: t.endPlaceholder ?? (o(t.type) ? "结束日期" : void 0)
|
|
@@ -270,12 +273,12 @@ const fo = /* @__PURE__ */ ce({
|
|
|
270
273
|
}
|
|
271
274
|
return (r, i) => {
|
|
272
275
|
const s = Ut;
|
|
273
|
-
return
|
|
276
|
+
return $(), H(s, oe({ class: "jt-date-picker" }, n.value, {
|
|
274
277
|
"onUpdate:modelValue": i[0] || (i[0] = (l) => r.$emit("update:modelValue", l))
|
|
275
278
|
}), null, 16);
|
|
276
279
|
};
|
|
277
280
|
}
|
|
278
|
-
}), mo = /* @__PURE__ */ ye(po, [["__scopeId", "data-v-
|
|
281
|
+
}), mo = /* @__PURE__ */ ye(po, [["__scopeId", "data-v-0e86d387"]]), ho = /* @__PURE__ */ ce({
|
|
279
282
|
name: "JtInput",
|
|
280
283
|
__name: "index",
|
|
281
284
|
props: {
|
|
@@ -318,7 +321,7 @@ const fo = /* @__PURE__ */ ce({
|
|
|
318
321
|
enter: () => !0
|
|
319
322
|
},
|
|
320
323
|
setup(e, { emit: t }) {
|
|
321
|
-
const n = e, o = t, r =
|
|
324
|
+
const n = e, o = t, r = L(() => Object.fromEntries(
|
|
322
325
|
Object.keys(Ot).map((i) => [
|
|
323
326
|
i,
|
|
324
327
|
(...s) => o(i, ...s)
|
|
@@ -326,16 +329,17 @@ const fo = /* @__PURE__ */ ce({
|
|
|
326
329
|
));
|
|
327
330
|
return (i, s) => {
|
|
328
331
|
const l = Ht;
|
|
329
|
-
return
|
|
332
|
+
return $(), H(l, oe({ class: "jt-input" }, n, Ze(r.value), {
|
|
330
333
|
onKeyup: s[0] || (s[0] = Gn((a) => o("enter"), ["enter"]))
|
|
331
334
|
}), null, 16);
|
|
332
335
|
};
|
|
333
336
|
}
|
|
334
|
-
}), mt = /* @__PURE__ */ ye(
|
|
337
|
+
}), mt = /* @__PURE__ */ ye(ho, [["__scopeId", "data-v-d0a67995"]]), vo = /* @__PURE__ */ ce({
|
|
335
338
|
name: "JtSelect",
|
|
336
339
|
__name: "index",
|
|
337
340
|
props: {
|
|
338
341
|
options: {},
|
|
342
|
+
hideDropdownIcon: { type: Boolean },
|
|
339
343
|
ariaLabel: {},
|
|
340
344
|
emptyValues: {},
|
|
341
345
|
valueOnClear: {},
|
|
@@ -390,10 +394,10 @@ const fo = /* @__PURE__ */ ce({
|
|
|
390
394
|
},
|
|
391
395
|
emits: Dt,
|
|
392
396
|
setup(e, { emit: t }) {
|
|
393
|
-
const n = e, o =
|
|
394
|
-
const { options: s,
|
|
395
|
-
return
|
|
396
|
-
}), r = t, i =
|
|
397
|
+
const n = e, o = L(() => {
|
|
398
|
+
const { options: s, hideDropdownIcon: l, ...a } = n;
|
|
399
|
+
return a;
|
|
400
|
+
}), r = t, i = L(() => Object.fromEntries(
|
|
397
401
|
Object.keys(Dt).map((s) => [
|
|
398
402
|
s,
|
|
399
403
|
(...l) => r(s, ...l)
|
|
@@ -401,18 +405,20 @@ const fo = /* @__PURE__ */ ce({
|
|
|
401
405
|
));
|
|
402
406
|
return (s, l) => {
|
|
403
407
|
const a = Wt, c = Jt;
|
|
404
|
-
return
|
|
408
|
+
return $(), H(c, oe({
|
|
409
|
+
class: ["jt-select", { "jt-select--hide-dropdown-icon": n.hideDropdownIcon }]
|
|
410
|
+
}, o.value, Ze(i.value)), {
|
|
405
411
|
default: J(() => [
|
|
406
|
-
(
|
|
407
|
-
key:
|
|
412
|
+
($(!0), Y(be, null, ge(s.options ?? [], (g) => ($(), H(a, oe({
|
|
413
|
+
key: g.value,
|
|
408
414
|
ref_for: !0
|
|
409
|
-
},
|
|
415
|
+
}, g), null, 16))), 128))
|
|
410
416
|
]),
|
|
411
417
|
_: 1
|
|
412
|
-
}, 16);
|
|
418
|
+
}, 16, ["class"]);
|
|
413
419
|
};
|
|
414
420
|
}
|
|
415
|
-
}), go = /* @__PURE__ */ ye(
|
|
421
|
+
}), go = /* @__PURE__ */ ye(vo, [["__scopeId", "data-v-09c2c7a3"]]), yo = { class: "jt-form-items" }, ht = 4, bo = /* @__PURE__ */ ce({
|
|
416
422
|
name: "JTFormItems",
|
|
417
423
|
__name: "JtFormItems",
|
|
418
424
|
props: {
|
|
@@ -432,101 +438,101 @@ const fo = /* @__PURE__ */ ce({
|
|
|
432
438
|
daterange: "date-picker",
|
|
433
439
|
"date-range": "date-picker",
|
|
434
440
|
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: "${
|
|
441
|
+
}, r = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), i = Object.keys(n), s = /* @__PURE__ */ new Map(), l = L(() => t.configs.filter((h) => h.show !== !1)), a = (h) => {
|
|
442
|
+
const { itemType: m } = h;
|
|
443
|
+
if (!m) return mt;
|
|
444
|
+
if (typeof m != "string") return m;
|
|
445
|
+
const M = o[m] ?? m;
|
|
446
|
+
return i.includes(M) ? n[M] : (console.error(
|
|
447
|
+
`[JtFormItems] 不支持的 itemType: "${m}",支持的类型: ${i.join(", ")}`
|
|
442
448
|
), mt);
|
|
443
|
-
}, c = (
|
|
444
|
-
const
|
|
445
|
-
return
|
|
446
|
-
...
|
|
447
|
-
options:
|
|
448
|
-
} :
|
|
449
|
-
...
|
|
449
|
+
}, c = (h) => {
|
|
450
|
+
const m = on(h, r);
|
|
451
|
+
return h.itemType === "select" || h.itemType === "remote-select" || h.itemType === "cascader" ? {
|
|
452
|
+
...m,
|
|
453
|
+
options: h.options
|
|
454
|
+
} : R(h.itemType) ? {
|
|
455
|
+
...m,
|
|
450
456
|
type: "daterange"
|
|
451
|
-
} :
|
|
452
|
-
},
|
|
453
|
-
rules:
|
|
454
|
-
...
|
|
455
|
-
}),
|
|
456
|
-
t.formData[
|
|
457
|
+
} : m;
|
|
458
|
+
}, g = (h) => nn(h, r), w = (h) => ({
|
|
459
|
+
rules: h.rules,
|
|
460
|
+
...h.formItemProps
|
|
461
|
+
}), I = (h, m) => {
|
|
462
|
+
t.formData[h] = m;
|
|
457
463
|
};
|
|
458
|
-
function
|
|
459
|
-
return (
|
|
460
|
-
if (
|
|
461
|
-
s.set(
|
|
464
|
+
function V(h) {
|
|
465
|
+
return (m) => {
|
|
466
|
+
if (m) {
|
|
467
|
+
s.set(h, m);
|
|
462
468
|
return;
|
|
463
469
|
}
|
|
464
|
-
s.delete(
|
|
470
|
+
s.delete(h);
|
|
465
471
|
};
|
|
466
472
|
}
|
|
467
|
-
function A(
|
|
473
|
+
function A(h, m) {
|
|
468
474
|
Kn(() => {
|
|
469
|
-
s.get(
|
|
475
|
+
s.get(h)?.validate(m).catch(() => {
|
|
470
476
|
});
|
|
471
477
|
});
|
|
472
478
|
}
|
|
473
|
-
const
|
|
474
|
-
const
|
|
475
|
-
(
|
|
479
|
+
const d = (h) => Math.min(Math.max(Math.trunc(h || 1), 1), 4), S = L(() => {
|
|
480
|
+
const m = l.value.reduce(
|
|
481
|
+
(M, v) => M + d(t.span || v.span),
|
|
476
482
|
0
|
|
477
|
-
) %
|
|
478
|
-
return
|
|
479
|
-
gridColumn: `1 / span ${
|
|
483
|
+
) % ht;
|
|
484
|
+
return m === 0 ? {
|
|
485
|
+
gridColumn: `1 / span ${ht}`
|
|
480
486
|
} : {
|
|
481
|
-
gridColumn: `${
|
|
487
|
+
gridColumn: `${m + 1} / span ${ht - m}`
|
|
482
488
|
};
|
|
483
|
-
}),
|
|
484
|
-
gridColumn: `span ${
|
|
489
|
+
}), k = (h) => ({
|
|
490
|
+
gridColumn: `span ${d(t.span || h.span)}`
|
|
485
491
|
});
|
|
486
|
-
function
|
|
487
|
-
return
|
|
492
|
+
function R(h) {
|
|
493
|
+
return h === "daterange" || h === "date-range" || h === "dateRange";
|
|
488
494
|
}
|
|
489
|
-
return (
|
|
490
|
-
const
|
|
491
|
-
return
|
|
492
|
-
(
|
|
493
|
-
key:
|
|
495
|
+
return (h, m) => {
|
|
496
|
+
const M = Zt;
|
|
497
|
+
return $(), Y("div", yo, [
|
|
498
|
+
($(!0), Y(be, null, ge(l.value, (v) => ($(), H(M, oe({
|
|
499
|
+
key: v.prop,
|
|
494
500
|
ref_for: !0,
|
|
495
|
-
ref:
|
|
501
|
+
ref: V(v.prop),
|
|
496
502
|
class: "jt-form-items__item",
|
|
497
|
-
style:
|
|
498
|
-
label:
|
|
499
|
-
prop:
|
|
500
|
-
},
|
|
503
|
+
style: k(v),
|
|
504
|
+
label: v.label,
|
|
505
|
+
prop: v.prop
|
|
506
|
+
}, w(v)), {
|
|
501
507
|
default: J(() => [
|
|
502
|
-
|
|
508
|
+
v.showSlot ? ee(h.$slots, v.prop, { key: 0 }, void 0, !0) : ($(), H(zt(a(v)), oe({
|
|
503
509
|
key: 1,
|
|
504
|
-
"model-value":
|
|
510
|
+
"model-value": h.formData[v.prop],
|
|
505
511
|
ref_for: !0
|
|
506
|
-
}, c(
|
|
507
|
-
"onUpdate:modelValue": (
|
|
508
|
-
onChange: () => A(
|
|
509
|
-
onBlur: () => A(
|
|
512
|
+
}, c(v), Ze(g(v)), {
|
|
513
|
+
"onUpdate:modelValue": (j) => I(v.prop, j),
|
|
514
|
+
onChange: () => A(v.prop, "change"),
|
|
515
|
+
onBlur: () => A(v.prop, "blur")
|
|
510
516
|
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
511
517
|
]),
|
|
512
518
|
_: 2
|
|
513
519
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
514
|
-
|
|
520
|
+
h.$slots.actions ? ($(), H(M, {
|
|
515
521
|
key: 0,
|
|
516
522
|
class: "jt-form-items__actions",
|
|
517
|
-
style: qt(
|
|
523
|
+
style: qt(S.value)
|
|
518
524
|
}, {
|
|
519
525
|
default: J(() => [
|
|
520
|
-
ee(
|
|
526
|
+
ee(h.$slots, "actions", {}, void 0, !0)
|
|
521
527
|
]),
|
|
522
528
|
_: 3
|
|
523
529
|
}, 8, ["style"])) : ue("", !0)
|
|
524
530
|
]);
|
|
525
531
|
};
|
|
526
532
|
}
|
|
527
|
-
}), So = /* @__PURE__ */ ye(bo, [["__scopeId", "data-v-
|
|
533
|
+
}), So = /* @__PURE__ */ ye(bo, [["__scopeId", "data-v-2ce5538f"]]);
|
|
528
534
|
function wo() {
|
|
529
|
-
const e =
|
|
535
|
+
const e = ve(!1);
|
|
530
536
|
function t() {
|
|
531
537
|
e.value = !0;
|
|
532
538
|
}
|
|
@@ -549,36 +555,36 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
549
555
|
},
|
|
550
556
|
emits: ["update:modelValue", "search", "reset"],
|
|
551
557
|
setup(e, { expose: t, emit: n }) {
|
|
552
|
-
const o = e, r = n, i =
|
|
558
|
+
const o = e, r = n, i = ve(), s = Ee(), l = ve({}), {
|
|
553
559
|
searchDisabled: a,
|
|
554
560
|
searchLoading: c,
|
|
555
|
-
searchDone:
|
|
556
|
-
} = wo(),
|
|
557
|
-
() => Math.max(1,
|
|
558
|
-
),
|
|
559
|
-
() => Math.max(1,
|
|
560
|
-
),
|
|
561
|
-
if (!
|
|
561
|
+
searchDone: g
|
|
562
|
+
} = wo(), w = L(() => o.option), I = ve(w.value.searchCollapsed ?? !0), V = L(() => o.columns.filter((P) => P.search === !0)), A = L(
|
|
563
|
+
() => Math.max(1, w.value.searchSpan ?? 4)
|
|
564
|
+
), d = L(() => Math.max(1, w.value.searchCollapsedRows ?? 1)), S = L(() => A.value), k = L(
|
|
565
|
+
() => Math.max(1, S.value * d.value)
|
|
566
|
+
), R = L(() => A.value), h = L(() => D.value ? "264px" : "174px"), m = L(() => U(w.value.searchLabelWidth ?? 84)), M = L(() => w.value.searchLabelPosition ?? "top"), v = L(() => G(w.value.searchGutter, 14)), j = L(() => G(w.value.searchRowGap, 14)), b = L(() => X(w.value.searchPadding ?? "18px 4px 0")), D = L(() => w.value.searchCollapse === !1 ? !1 : q(V.value) > k.value), T = L(() => {
|
|
567
|
+
if (!D.value || !I.value) return V.value;
|
|
562
568
|
let P = 0;
|
|
563
|
-
return
|
|
564
|
-
const ae =
|
|
565
|
-
return P + ae >
|
|
569
|
+
return V.value.filter((Z) => {
|
|
570
|
+
const ae = B(Z);
|
|
571
|
+
return P + ae > k.value ? !1 : (P += ae, !0);
|
|
566
572
|
});
|
|
567
|
-
}),
|
|
568
|
-
() =>
|
|
569
|
-
), ne =
|
|
570
|
-
const [P] =
|
|
571
|
-
return !!P &&
|
|
572
|
-
}),
|
|
573
|
-
const [P] =
|
|
574
|
-
return `${Math.min(A.value, P ?
|
|
575
|
-
}),
|
|
576
|
-
() =>
|
|
573
|
+
}), x = L(
|
|
574
|
+
() => T.value.filter((P) => !!s[`${P.prop}-search`])
|
|
575
|
+
), ne = L(() => {
|
|
576
|
+
const [P] = T.value;
|
|
577
|
+
return !!P && T.value.length === 1 && B(P) < A.value;
|
|
578
|
+
}), z = L(() => {
|
|
579
|
+
const [P] = T.value;
|
|
580
|
+
return `${Math.min(A.value, P ? B(P) + 1 : 1)}`;
|
|
581
|
+
}), N = L(
|
|
582
|
+
() => T.value.map((P) => F(P))
|
|
577
583
|
);
|
|
578
584
|
Be(
|
|
579
|
-
() =>
|
|
585
|
+
() => w.value.searchCollapsed,
|
|
580
586
|
(P) => {
|
|
581
|
-
typeof P == "boolean" && (
|
|
587
|
+
typeof P == "boolean" && (I.value = P);
|
|
582
588
|
}
|
|
583
589
|
), Be(
|
|
584
590
|
() => o.modelValue,
|
|
@@ -587,18 +593,18 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
587
593
|
},
|
|
588
594
|
{ deep: !0, immediate: !0 }
|
|
589
595
|
);
|
|
590
|
-
function
|
|
596
|
+
function O(P, Z) {
|
|
591
597
|
if (a.value) return;
|
|
592
598
|
const ae = { ...l.value, [P]: Z };
|
|
593
599
|
l.value = ae, r("update:modelValue", ae);
|
|
594
600
|
}
|
|
595
|
-
function
|
|
601
|
+
function F(P) {
|
|
596
602
|
const Z = P.searchProps ?? {};
|
|
597
603
|
return {
|
|
598
604
|
...Z,
|
|
599
605
|
prop: P.prop,
|
|
600
606
|
label: P.searchLabel ?? P.label,
|
|
601
|
-
span:
|
|
607
|
+
span: B(P),
|
|
602
608
|
itemType: P.searchType ?? "input",
|
|
603
609
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
604
610
|
showSlot: !!s[`${P.prop}-search`],
|
|
@@ -612,11 +618,11 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
612
618
|
},
|
|
613
619
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
614
620
|
onEnter: (...ae) => {
|
|
615
|
-
u(Z.onEnter, ...ae),
|
|
621
|
+
u(Z.onEnter, ...ae), y();
|
|
616
622
|
},
|
|
617
623
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
618
624
|
"onUpdate:modelValue": (ae) => {
|
|
619
|
-
u(Z["onUpdate:modelValue"], ae),
|
|
625
|
+
u(Z["onUpdate:modelValue"], ae), O(P.prop, ae);
|
|
620
626
|
}
|
|
621
627
|
};
|
|
622
628
|
}
|
|
@@ -627,7 +633,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
627
633
|
}
|
|
628
634
|
typeof P == "function" && P(...Z);
|
|
629
635
|
}
|
|
630
|
-
async function
|
|
636
|
+
async function y() {
|
|
631
637
|
if (!a.value) {
|
|
632
638
|
if (i.value)
|
|
633
639
|
try {
|
|
@@ -638,17 +644,17 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
638
644
|
r("search");
|
|
639
645
|
}
|
|
640
646
|
}
|
|
641
|
-
function
|
|
647
|
+
function _() {
|
|
642
648
|
a.value || r("reset");
|
|
643
649
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
650
|
+
function E() {
|
|
651
|
+
I.value = !I.value;
|
|
646
652
|
}
|
|
647
|
-
function
|
|
653
|
+
function B(P) {
|
|
648
654
|
return Math.min(A.value, Math.max(1, P.searchSpan ?? 1));
|
|
649
655
|
}
|
|
650
656
|
function q(P) {
|
|
651
|
-
return P.reduce((Z, ae) => Z +
|
|
657
|
+
return P.reduce((Z, ae) => Z + B(ae), 0);
|
|
652
658
|
}
|
|
653
659
|
function U(P) {
|
|
654
660
|
return typeof P == "number" ? `${P}px` : P;
|
|
@@ -667,20 +673,20 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
667
673
|
/** 开启筛选表单禁用。 */
|
|
668
674
|
searchLoading: c,
|
|
669
675
|
/** 关闭筛选表单禁用。 */
|
|
670
|
-
searchDone:
|
|
676
|
+
searchDone: g
|
|
671
677
|
}), (P, Z) => {
|
|
672
678
|
const ae = Qt;
|
|
673
|
-
return
|
|
674
|
-
class: He(["jt-filter-bar", [`is-label-${
|
|
679
|
+
return $(), Y("div", {
|
|
680
|
+
class: He(["jt-filter-bar", [`is-label-${M.value}`, { "is-single-filter": ne.value }]]),
|
|
675
681
|
style: qt({
|
|
676
682
|
"--jt-filter-columns": A.value,
|
|
677
|
-
"--jt-filter-field-columns":
|
|
678
|
-
"--jt-filter-btns-width":
|
|
679
|
-
"--jt-filter-actions-start":
|
|
680
|
-
"--jt-filter-label-width":
|
|
681
|
-
"--jt-filter-column-gap": `${
|
|
682
|
-
"--jt-filter-row-gap": `${
|
|
683
|
-
"--jt-filter-padding":
|
|
683
|
+
"--jt-filter-field-columns": R.value,
|
|
684
|
+
"--jt-filter-btns-width": h.value,
|
|
685
|
+
"--jt-filter-actions-start": z.value,
|
|
686
|
+
"--jt-filter-label-width": m.value,
|
|
687
|
+
"--jt-filter-column-gap": `${v.value}px`,
|
|
688
|
+
"--jt-filter-row-gap": `${j.value}px`,
|
|
689
|
+
"--jt-filter-padding": b.value
|
|
684
690
|
})
|
|
685
691
|
}, [
|
|
686
692
|
we(ae, {
|
|
@@ -688,47 +694,47 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
688
694
|
ref: i,
|
|
689
695
|
class: "jt-filter-bar__form",
|
|
690
696
|
model: l.value,
|
|
691
|
-
"label-position":
|
|
692
|
-
"label-width":
|
|
697
|
+
"label-position": M.value,
|
|
698
|
+
"label-width": m.value,
|
|
693
699
|
disabled: re(a),
|
|
694
700
|
onSubmit: Z[0] || (Z[0] = Gt(() => {
|
|
695
701
|
}, ["prevent"]))
|
|
696
702
|
}, {
|
|
697
703
|
default: J(() => [
|
|
698
704
|
we(re(So), {
|
|
699
|
-
configs:
|
|
705
|
+
configs: N.value,
|
|
700
706
|
"form-data": l.value
|
|
701
707
|
}, je({
|
|
702
708
|
actions: J(() => [
|
|
703
709
|
te("div", Co, [
|
|
704
710
|
ee(P.$slots, "search-menu", {
|
|
705
|
-
search:
|
|
706
|
-
reset:
|
|
711
|
+
search: y,
|
|
712
|
+
reset: _,
|
|
707
713
|
disabled: re(a),
|
|
708
|
-
collapsed:
|
|
709
|
-
toggleCollapse:
|
|
714
|
+
collapsed: I.value,
|
|
715
|
+
toggleCollapse: E
|
|
710
716
|
}, () => [
|
|
711
|
-
|
|
717
|
+
D.value ? ($(), H(re(tt), {
|
|
712
718
|
key: 0,
|
|
713
719
|
class: "jt-filter-bar__btn-collapse",
|
|
714
|
-
onClick:
|
|
720
|
+
onClick: E
|
|
715
721
|
}, {
|
|
716
722
|
icon: J(() => [
|
|
717
723
|
te("img", {
|
|
718
|
-
class: He(["jt-filter-bar__icon-arrow", { "is-collapsed":
|
|
724
|
+
class: He(["jt-filter-bar__icon-arrow", { "is-collapsed": I.value }]),
|
|
719
725
|
src: re(Io),
|
|
720
726
|
alt: ""
|
|
721
727
|
}, null, 10, ko)
|
|
722
728
|
]),
|
|
723
729
|
default: J(() => [
|
|
724
|
-
te("span", null, fe(
|
|
730
|
+
te("span", null, fe(I.value ? "展 开" : "收 起"), 1)
|
|
725
731
|
]),
|
|
726
732
|
_: 1
|
|
727
733
|
})) : ue("", !0),
|
|
728
734
|
we(re(tt), {
|
|
729
735
|
class: "jt-filter-bar__btn-reset",
|
|
730
736
|
disabled: re(a),
|
|
731
|
-
onClick:
|
|
737
|
+
onClick: _
|
|
732
738
|
}, {
|
|
733
739
|
icon: J(() => [
|
|
734
740
|
te("img", {
|
|
@@ -737,7 +743,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
737
743
|
}, null, 8, Mo)
|
|
738
744
|
]),
|
|
739
745
|
default: J(() => [
|
|
740
|
-
te("span", null, fe(
|
|
746
|
+
te("span", null, fe(w.value.resetBtnText ?? "重 置"), 1)
|
|
741
747
|
]),
|
|
742
748
|
_: 1
|
|
743
749
|
}, 8, ["disabled"]),
|
|
@@ -745,7 +751,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
745
751
|
class: "jt-filter-bar__btn-query",
|
|
746
752
|
type: "primary",
|
|
747
753
|
disabled: re(a),
|
|
748
|
-
onClick:
|
|
754
|
+
onClick: y
|
|
749
755
|
}, {
|
|
750
756
|
icon: J(() => [
|
|
751
757
|
te("img", {
|
|
@@ -754,7 +760,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
754
760
|
}, null, 8, To)
|
|
755
761
|
]),
|
|
756
762
|
default: J(() => [
|
|
757
|
-
te("span", null, fe(
|
|
763
|
+
te("span", null, fe(w.value.searchBtnText ?? "查 询"), 1)
|
|
758
764
|
]),
|
|
759
765
|
_: 1
|
|
760
766
|
}, 8, ["disabled"])
|
|
@@ -763,15 +769,15 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
763
769
|
]),
|
|
764
770
|
_: 2
|
|
765
771
|
}, [
|
|
766
|
-
ge(
|
|
772
|
+
ge(x.value, (pe) => ({
|
|
767
773
|
name: pe.prop,
|
|
768
774
|
fn: J(() => [
|
|
769
775
|
ee(P.$slots, `${pe.prop}-search`, {
|
|
770
776
|
value: l.value[pe.prop],
|
|
771
777
|
column: pe,
|
|
772
|
-
setValue: (de) =>
|
|
773
|
-
search:
|
|
774
|
-
reset:
|
|
778
|
+
setValue: (de) => O(pe.prop, de),
|
|
779
|
+
search: y,
|
|
780
|
+
reset: _,
|
|
775
781
|
disabled: re(a)
|
|
776
782
|
}, void 0, !0)
|
|
777
783
|
])
|
|
@@ -783,7 +789,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
783
789
|
], 6);
|
|
784
790
|
};
|
|
785
791
|
}
|
|
786
|
-
}), Do = /* @__PURE__ */ ye(Oo, [["__scopeId", "data-v-
|
|
792
|
+
}), Do = /* @__PURE__ */ ye(Oo, [["__scopeId", "data-v-860e6c98"]]), Fo = { key: 1 }, Bo = { key: 2 }, Eo = { key: 3 }, Lo = /* @__PURE__ */ ce({
|
|
787
793
|
name: "JtTable",
|
|
788
794
|
__name: "JtTable",
|
|
789
795
|
props: {
|
|
@@ -793,94 +799,97 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
793
799
|
tableEvents: {}
|
|
794
800
|
},
|
|
795
801
|
setup(e, { expose: t }) {
|
|
796
|
-
const n = e, o = Ee(), r =
|
|
797
|
-
function
|
|
798
|
-
return !!o[`${
|
|
802
|
+
const n = e, o = Ee(), r = ve(), i = L(() => n.option ?? {}), s = L(() => n.columns.filter((d) => !d.hide)), l = L(() => i.value.menuFixed ?? "right");
|
|
803
|
+
function a(d) {
|
|
804
|
+
return !!o[`${d}-header`];
|
|
799
805
|
}
|
|
800
|
-
function
|
|
801
|
-
return !!o[`${
|
|
806
|
+
function c(d) {
|
|
807
|
+
return !!o[`${d}-data`];
|
|
802
808
|
}
|
|
803
|
-
function
|
|
809
|
+
function g(d) {
|
|
804
810
|
return {
|
|
805
|
-
width:
|
|
806
|
-
minWidth:
|
|
807
|
-
align:
|
|
808
|
-
fixed:
|
|
809
|
-
sortable:
|
|
810
|
-
showOverflowTooltip:
|
|
811
|
-
...
|
|
811
|
+
width: d.width,
|
|
812
|
+
minWidth: d.minWidth,
|
|
813
|
+
align: d.align,
|
|
814
|
+
fixed: d.fixed,
|
|
815
|
+
sortable: d.sortable,
|
|
816
|
+
showOverflowTooltip: d.showOverflowTooltip ?? w(d),
|
|
817
|
+
...d.columnOptions
|
|
812
818
|
};
|
|
813
819
|
}
|
|
814
|
-
function
|
|
815
|
-
return !
|
|
820
|
+
function w(d) {
|
|
821
|
+
return !c(d.prop) && !V(d.columnOptions?.type);
|
|
822
|
+
}
|
|
823
|
+
function I(d) {
|
|
824
|
+
return !V(d.columnOptions?.type);
|
|
816
825
|
}
|
|
817
|
-
function
|
|
818
|
-
return
|
|
826
|
+
function V(d) {
|
|
827
|
+
return d === "selection" || d === "index" || d === "expand";
|
|
819
828
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
829
|
+
function A(d, S) {
|
|
830
|
+
return d.find((k) => k.value === S)?.label ?? String(S ?? "");
|
|
822
831
|
}
|
|
823
|
-
return t({ tableRef: r }), (
|
|
824
|
-
const
|
|
825
|
-
return
|
|
832
|
+
return t({ tableRef: r }), (d, S) => {
|
|
833
|
+
const k = en, R = Xt;
|
|
834
|
+
return $(), H(R, oe({
|
|
826
835
|
ref_key: "tableRef",
|
|
827
836
|
ref: r,
|
|
828
|
-
data:
|
|
837
|
+
data: d.data,
|
|
829
838
|
"row-key": i.value.rowKey ?? "id",
|
|
830
839
|
height: i.value.height,
|
|
831
840
|
"max-height": i.value.maxHeight,
|
|
832
841
|
"empty-text": i.value.emptyText,
|
|
833
842
|
class: "jt-table"
|
|
834
|
-
}, i.value.tableProps, Ze(
|
|
843
|
+
}, i.value.tableProps, Ze(d.tableEvents)), {
|
|
835
844
|
default: J(() => [
|
|
836
|
-
i.value.selection ? (
|
|
845
|
+
i.value.selection ? ($(), H(k, {
|
|
837
846
|
key: 0,
|
|
838
847
|
type: "selection",
|
|
839
848
|
width: "55",
|
|
840
849
|
align: "center"
|
|
841
850
|
})) : ue("", !0),
|
|
842
|
-
i.value.index ? (
|
|
851
|
+
i.value.index ? ($(), H(k, {
|
|
843
852
|
key: 1,
|
|
844
853
|
type: "index",
|
|
845
854
|
label: i.value.indexLabel ?? "序号",
|
|
846
855
|
width: "60",
|
|
847
856
|
align: "center"
|
|
848
857
|
}, null, 8, ["label"])) : ue("", !0),
|
|
849
|
-
(
|
|
850
|
-
key:
|
|
851
|
-
prop:
|
|
852
|
-
label:
|
|
853
|
-
formatter: !
|
|
858
|
+
($(!0), Y(be, null, ge(s.value, (h) => ($(), H(k, oe({
|
|
859
|
+
key: h.prop,
|
|
860
|
+
prop: h.prop,
|
|
861
|
+
label: h.label,
|
|
862
|
+
formatter: !c(h.prop) && !h.dicData ? h.formatter : void 0,
|
|
854
863
|
ref_for: !0
|
|
855
|
-
},
|
|
856
|
-
|
|
864
|
+
}, g(h)), je({ _: 2 }, [
|
|
865
|
+
a(h.prop) ? {
|
|
857
866
|
name: "header",
|
|
858
|
-
fn: J((
|
|
859
|
-
ee(
|
|
867
|
+
fn: J((m) => [
|
|
868
|
+
ee(d.$slots, `${h.prop}-header`, oe({ ref_for: !0 }, m), void 0, !0)
|
|
860
869
|
]),
|
|
861
870
|
key: "0"
|
|
862
871
|
} : void 0,
|
|
863
|
-
|
|
872
|
+
I(h) ? {
|
|
864
873
|
name: "default",
|
|
865
|
-
fn: J((
|
|
866
|
-
|
|
874
|
+
fn: J((m) => [
|
|
875
|
+
c(h.prop) ? ee(d.$slots, `${h.prop}-data`, oe({
|
|
867
876
|
key: 0,
|
|
868
877
|
ref_for: !0
|
|
869
|
-
},
|
|
878
|
+
}, m), void 0, !0) : h.dicData ? ($(), Y("span", Fo, fe(A(h.dicData, m.row[h.prop])), 1)) : h.formatter ? ($(), Y("span", Bo, fe(h.formatter(m.row, m.column, m.row[h.prop], m.$index)), 1)) : ($(), Y("span", Eo, fe(m.row[h.prop]), 1))
|
|
870
879
|
]),
|
|
871
880
|
key: "1"
|
|
872
881
|
} : void 0
|
|
873
882
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
874
|
-
i.value.menu ? (
|
|
883
|
+
i.value.menu ? ($(), H(k, {
|
|
875
884
|
key: 2,
|
|
876
885
|
label: i.value.menuLabel ?? "操作",
|
|
877
886
|
width: i.value.menuWidth,
|
|
878
887
|
"min-width": i.value.menuMinWidth,
|
|
879
888
|
align: i.value.menuAlign ?? "center",
|
|
880
|
-
fixed:
|
|
889
|
+
fixed: l.value
|
|
881
890
|
}, {
|
|
882
|
-
default: J((
|
|
883
|
-
ee(
|
|
891
|
+
default: J((h) => [
|
|
892
|
+
ee(d.$slots, "menu", Me(Fe(h)), void 0, !0)
|
|
884
893
|
]),
|
|
885
894
|
_: 3
|
|
886
895
|
}, 8, ["label", "width", "min-width", "align", "fixed"])) : ue("", !0)
|
|
@@ -889,7 +898,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
889
898
|
}, 16, ["data", "row-key", "height", "max-height", "empty-text"]);
|
|
890
899
|
};
|
|
891
900
|
}
|
|
892
|
-
}), Vo = /* @__PURE__ */ ye(Lo, [["__scopeId", "data-v-
|
|
901
|
+
}), Vo = /* @__PURE__ */ ye(Lo, [["__scopeId", "data-v-34d2ced7"]]), Po = { class: "jt-pagination" }, Ao = { class: "jt-pagination__count" }, jo = /* @__PURE__ */ ce({
|
|
893
902
|
name: "JtPagination",
|
|
894
903
|
__name: "JtPagination",
|
|
895
904
|
props: {
|
|
@@ -900,13 +909,13 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
900
909
|
},
|
|
901
910
|
emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
|
|
902
911
|
setup(e, { emit: t }) {
|
|
903
|
-
const n = e, o =
|
|
912
|
+
const n = e, o = L(() => n.option ?? {}), r = t;
|
|
904
913
|
function i(s) {
|
|
905
914
|
r("current-change", s), r("page-change", s);
|
|
906
915
|
}
|
|
907
916
|
return (s, l) => {
|
|
908
917
|
const a = Zn;
|
|
909
|
-
return
|
|
918
|
+
return $(), Y("div", Po, [
|
|
910
919
|
we(a, {
|
|
911
920
|
"current-page": s.currentPage,
|
|
912
921
|
"page-size": s.pageSize,
|
|
@@ -922,10 +931,10 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
922
931
|
]);
|
|
923
932
|
};
|
|
924
933
|
}
|
|
925
|
-
}), No = /* @__PURE__ */ ye(jo, [["__scopeId", "data-v-
|
|
934
|
+
}), No = /* @__PURE__ */ ye(jo, [["__scopeId", "data-v-43d86bec"]]), Ro = { class: "jt-crud-table" }, xo = {
|
|
926
935
|
key: 1,
|
|
927
936
|
class: "jt-crud-table__toolbar"
|
|
928
|
-
},
|
|
937
|
+
}, zo = /* @__PURE__ */ ce({
|
|
929
938
|
name: "JtCrudTable",
|
|
930
939
|
__name: "JtCrudTable",
|
|
931
940
|
props: /* @__PURE__ */ Mt({
|
|
@@ -944,110 +953,110 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
944
953
|
}),
|
|
945
954
|
emits: /* @__PURE__ */ Mt(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
946
955
|
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 = Ee(), c =
|
|
948
|
-
() => o.columns.filter((
|
|
949
|
-
),
|
|
950
|
-
() => o.columns.filter((
|
|
951
|
-
),
|
|
952
|
-
() => o.columns.filter((
|
|
956
|
+
const o = e, r = n, i = pt(e, "currentPage"), s = pt(e, "pageSize"), l = pt(e, "searchModel"), a = Ee(), c = ve(), g = ve(), w = L(() => o.option), I = L(() => w.value.searchShow !== !1), V = L(() => w.value.paginationShow !== !1), A = L(
|
|
957
|
+
() => o.columns.filter((v) => v.search && !!a[`${v.prop}-search`])
|
|
958
|
+
), d = L(
|
|
959
|
+
() => o.columns.filter((v) => !v.hide && !!a[`${v.prop}-header`])
|
|
960
|
+
), S = L(
|
|
961
|
+
() => o.columns.filter((v) => !v.hide && !!a[`${v.prop}-data`])
|
|
953
962
|
);
|
|
954
|
-
function
|
|
955
|
-
const
|
|
956
|
-
return o.columns.forEach((
|
|
957
|
-
|
|
958
|
-
}),
|
|
963
|
+
function k() {
|
|
964
|
+
const v = {};
|
|
965
|
+
return o.columns.forEach((j) => {
|
|
966
|
+
j.search && (v[j.prop] = void 0);
|
|
967
|
+
}), v;
|
|
959
968
|
}
|
|
960
|
-
function
|
|
969
|
+
function R() {
|
|
961
970
|
r("search", { ...l.value });
|
|
962
971
|
}
|
|
963
|
-
function
|
|
964
|
-
l.value =
|
|
972
|
+
function h() {
|
|
973
|
+
l.value = k(), r("reset");
|
|
965
974
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
975
|
+
function m() {
|
|
976
|
+
g.value?.searchLoading();
|
|
968
977
|
}
|
|
969
|
-
function
|
|
970
|
-
|
|
978
|
+
function M() {
|
|
979
|
+
g.value?.searchDone();
|
|
971
980
|
}
|
|
972
981
|
return t({
|
|
973
982
|
/** 获取内部 el-table 实例 */
|
|
974
|
-
tableRef:
|
|
983
|
+
tableRef: L(() => c.value?.tableRef),
|
|
975
984
|
/** 获取内部筛选条实例 */
|
|
976
|
-
filterBarRef:
|
|
985
|
+
filterBarRef: g,
|
|
977
986
|
/** 开启筛选表单禁用。 */
|
|
978
|
-
searchLoading:
|
|
987
|
+
searchLoading: m,
|
|
979
988
|
/** 关闭筛选表单禁用。 */
|
|
980
|
-
searchDone:
|
|
981
|
-
}), (
|
|
982
|
-
const
|
|
983
|
-
return
|
|
984
|
-
ee(
|
|
985
|
-
|
|
989
|
+
searchDone: M
|
|
990
|
+
}), (v, j) => {
|
|
991
|
+
const b = Qn;
|
|
992
|
+
return $(), Y("div", Ro, [
|
|
993
|
+
ee(v.$slots, "header", {}, void 0, !0),
|
|
994
|
+
I.value ? ($(), H(Do, {
|
|
986
995
|
key: 0,
|
|
987
996
|
ref_key: "filterBarRef",
|
|
988
|
-
ref:
|
|
997
|
+
ref: g,
|
|
989
998
|
modelValue: l.value,
|
|
990
|
-
"onUpdate:modelValue":
|
|
991
|
-
columns:
|
|
992
|
-
option:
|
|
993
|
-
onSearch:
|
|
994
|
-
onReset:
|
|
999
|
+
"onUpdate:modelValue": j[0] || (j[0] = (D) => l.value = D),
|
|
1000
|
+
columns: v.columns,
|
|
1001
|
+
option: w.value,
|
|
1002
|
+
onSearch: R,
|
|
1003
|
+
onReset: h
|
|
995
1004
|
}, je({ _: 2 }, [
|
|
996
|
-
ge(A.value, (
|
|
997
|
-
name: `${
|
|
998
|
-
fn: J((
|
|
999
|
-
ee(
|
|
1005
|
+
ge(A.value, (D) => ({
|
|
1006
|
+
name: `${D.prop}-search`,
|
|
1007
|
+
fn: J((T) => [
|
|
1008
|
+
ee(v.$slots, `${D.prop}-search`, Me(Fe(T)), void 0, !0)
|
|
1000
1009
|
])
|
|
1001
1010
|
}))
|
|
1002
1011
|
]), 1032, ["modelValue", "columns", "option"])) : ue("", !0),
|
|
1003
|
-
re(a).toolbar ? (
|
|
1004
|
-
ee(
|
|
1012
|
+
re(a).toolbar ? ($(), Y("div", xo, [
|
|
1013
|
+
ee(v.$slots, "toolbar", {}, void 0, !0)
|
|
1005
1014
|
])) : ue("", !0),
|
|
1006
|
-
Yn((
|
|
1015
|
+
Yn(($(), H(Vo, {
|
|
1007
1016
|
ref_key: "jtTableRef",
|
|
1008
1017
|
ref: c,
|
|
1009
|
-
data:
|
|
1010
|
-
columns:
|
|
1011
|
-
option:
|
|
1012
|
-
"table-events":
|
|
1018
|
+
data: v.data,
|
|
1019
|
+
columns: v.columns,
|
|
1020
|
+
option: w.value,
|
|
1021
|
+
"table-events": v.tableEvents
|
|
1013
1022
|
}, je({ _: 2 }, [
|
|
1014
|
-
ge(
|
|
1015
|
-
name: `${
|
|
1016
|
-
fn: J((
|
|
1017
|
-
ee(
|
|
1023
|
+
ge(d.value, (D) => ({
|
|
1024
|
+
name: `${D.prop}-header`,
|
|
1025
|
+
fn: J((T) => [
|
|
1026
|
+
ee(v.$slots, `${D.prop}-header`, Me(Fe(T)), void 0, !0)
|
|
1018
1027
|
])
|
|
1019
1028
|
})),
|
|
1020
|
-
ge(
|
|
1021
|
-
name: `${
|
|
1022
|
-
fn: J((
|
|
1023
|
-
ee(
|
|
1029
|
+
ge(S.value, (D) => ({
|
|
1030
|
+
name: `${D.prop}-data`,
|
|
1031
|
+
fn: J((T) => [
|
|
1032
|
+
ee(v.$slots, `${D.prop}-data`, Me(Fe(T)), void 0, !0)
|
|
1024
1033
|
])
|
|
1025
1034
|
})),
|
|
1026
|
-
|
|
1035
|
+
w.value.menu ? {
|
|
1027
1036
|
name: "menu",
|
|
1028
|
-
fn: J((
|
|
1029
|
-
ee(
|
|
1037
|
+
fn: J((D) => [
|
|
1038
|
+
ee(v.$slots, "menu", Me(Fe(D)), void 0, !0)
|
|
1030
1039
|
]),
|
|
1031
1040
|
key: "0"
|
|
1032
1041
|
} : void 0
|
|
1033
1042
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
1034
|
-
[
|
|
1043
|
+
[b, w.value.loading]
|
|
1035
1044
|
]),
|
|
1036
|
-
|
|
1045
|
+
V.value ? ($(), H(No, {
|
|
1037
1046
|
key: 2,
|
|
1038
1047
|
"current-page": i.value,
|
|
1039
|
-
"onUpdate:currentPage":
|
|
1048
|
+
"onUpdate:currentPage": j[1] || (j[1] = (D) => i.value = D),
|
|
1040
1049
|
"page-size": s.value,
|
|
1041
|
-
"onUpdate:pageSize":
|
|
1042
|
-
total:
|
|
1043
|
-
option:
|
|
1044
|
-
onPageChange:
|
|
1045
|
-
onSizeChange:
|
|
1050
|
+
"onUpdate:pageSize": j[2] || (j[2] = (D) => s.value = D),
|
|
1051
|
+
total: v.total,
|
|
1052
|
+
option: w.value,
|
|
1053
|
+
onPageChange: j[3] || (j[3] = (D) => v.$emit("page-change", D)),
|
|
1054
|
+
onSizeChange: j[4] || (j[4] = (D) => v.$emit("size-change", D))
|
|
1046
1055
|
}, null, 8, ["current-page", "page-size", "total", "option"])) : ue("", !0)
|
|
1047
1056
|
]);
|
|
1048
1057
|
};
|
|
1049
1058
|
}
|
|
1050
|
-
}),
|
|
1059
|
+
}), xa = /* @__PURE__ */ ye(zo, [["__scopeId", "data-v-dac2c00e"]]), qo = { class: "jt-page-header__title" }, Go = { key: 0 }, Ko = {
|
|
1051
1060
|
key: 0,
|
|
1052
1061
|
class: "jt-page-header__operates"
|
|
1053
1062
|
}, Yo = /* @__PURE__ */ ce({
|
|
@@ -1060,21 +1069,21 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1060
1069
|
},
|
|
1061
1070
|
emits: ["operate-click"],
|
|
1062
1071
|
setup(e, { emit: t }) {
|
|
1063
|
-
const n = e, o = t, r = Ee(), i =
|
|
1072
|
+
const n = e, o = t, r = Ee(), i = L(() => n.operates.length > 0 || !!r.operates);
|
|
1064
1073
|
function s(l, a) {
|
|
1065
1074
|
l.onClick?.(l, a), o("operate-click", l, a);
|
|
1066
1075
|
}
|
|
1067
|
-
return (l, a) => (
|
|
1076
|
+
return (l, a) => ($(), Y("div", oe({
|
|
1068
1077
|
class: ["jt-page-header", `jt-page-header--${l.type}`]
|
|
1069
1078
|
}, l.$attrs), [
|
|
1070
1079
|
te("div", qo, [
|
|
1071
1080
|
ee(l.$slots, "title", {}, () => [
|
|
1072
|
-
l.title ? (
|
|
1081
|
+
l.title ? ($(), Y("span", Go, fe(l.title), 1)) : ue("", !0)
|
|
1073
1082
|
], !0)
|
|
1074
1083
|
]),
|
|
1075
|
-
i.value ? (
|
|
1084
|
+
i.value ? ($(), Y("div", Ko, [
|
|
1076
1085
|
ee(l.$slots, "operates", { operates: l.operates }, () => [
|
|
1077
|
-
(
|
|
1086
|
+
($(!0), Y(be, null, ge(l.operates, (c) => ($(), H(re(tt), oe({
|
|
1078
1087
|
key: c.key ?? c.label,
|
|
1079
1088
|
ref_for: !0
|
|
1080
1089
|
}, c.buttonProps, {
|
|
@@ -1085,7 +1094,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1085
1094
|
text: c.text,
|
|
1086
1095
|
link: c.link,
|
|
1087
1096
|
icon: c.icon,
|
|
1088
|
-
onClick: (
|
|
1097
|
+
onClick: (g) => s(c, g)
|
|
1089
1098
|
}), {
|
|
1090
1099
|
default: J(() => [
|
|
1091
1100
|
te("span", null, fe(c.label), 1)
|
|
@@ -1096,7 +1105,7 @@ const Io = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1096
1105
|
])) : ue("", !0)
|
|
1097
1106
|
], 16));
|
|
1098
1107
|
}
|
|
1099
|
-
}),
|
|
1108
|
+
}), za = /* @__PURE__ */ ye(Yo, [["__scopeId", "data-v-d924e29d"]]);
|
|
1100
1109
|
function Uo(e, t) {
|
|
1101
1110
|
t = t || (() => "default-use-once-sync");
|
|
1102
1111
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -1139,105 +1148,105 @@ var an = { exports: {} };
|
|
|
1139
1148
|
(function(n, o) {
|
|
1140
1149
|
e.exports = o();
|
|
1141
1150
|
})(at, function() {
|
|
1142
|
-
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", l = "minute", a = "hour", c = "day",
|
|
1143
|
-
var
|
|
1144
|
-
return "[" +
|
|
1145
|
-
} },
|
|
1146
|
-
var u = String(
|
|
1147
|
-
return !u || u.length >=
|
|
1148
|
-
},
|
|
1149
|
-
var
|
|
1150
|
-
return (
|
|
1151
|
-
}, m: function
|
|
1152
|
-
if (
|
|
1153
|
-
var u = 12 * (
|
|
1154
|
-
return +(-(u + (
|
|
1155
|
-
}, a: function(
|
|
1156
|
-
return
|
|
1157
|
-
}, p: function(
|
|
1158
|
-
return { M:
|
|
1159
|
-
}, u: function(
|
|
1160
|
-
return
|
|
1161
|
-
} },
|
|
1162
|
-
|
|
1163
|
-
var
|
|
1164
|
-
return
|
|
1165
|
-
},
|
|
1166
|
-
var
|
|
1167
|
-
if (!
|
|
1168
|
-
if (typeof
|
|
1169
|
-
var
|
|
1170
|
-
|
|
1171
|
-
var
|
|
1172
|
-
if (!
|
|
1151
|
+
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", s = "second", l = "minute", a = "hour", c = "day", g = "week", w = "month", I = "quarter", V = "year", A = "date", d = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, k = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, R = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(N) {
|
|
1152
|
+
var O = ["th", "st", "nd", "rd"], F = N % 100;
|
|
1153
|
+
return "[" + N + (O[(F - 20) % 10] || O[F] || O[0]) + "]";
|
|
1154
|
+
} }, h = function(N, O, F) {
|
|
1155
|
+
var u = String(N);
|
|
1156
|
+
return !u || u.length >= O ? N : "" + Array(O + 1 - u.length).join(F) + N;
|
|
1157
|
+
}, m = { s: h, z: function(N) {
|
|
1158
|
+
var O = -N.utcOffset(), F = Math.abs(O), u = Math.floor(F / 60), y = F % 60;
|
|
1159
|
+
return (O <= 0 ? "+" : "-") + h(u, 2, "0") + ":" + h(y, 2, "0");
|
|
1160
|
+
}, m: function N(O, F) {
|
|
1161
|
+
if (O.date() < F.date()) return -N(F, O);
|
|
1162
|
+
var u = 12 * (F.year() - O.year()) + (F.month() - O.month()), y = O.clone().add(u, w), _ = F - y < 0, E = O.clone().add(u + (_ ? -1 : 1), w);
|
|
1163
|
+
return +(-(u + (F - y) / (_ ? y - E : E - y)) || 0);
|
|
1164
|
+
}, a: function(N) {
|
|
1165
|
+
return N < 0 ? Math.ceil(N) || 0 : Math.floor(N);
|
|
1166
|
+
}, p: function(N) {
|
|
1167
|
+
return { M: w, y: V, w: g, d: c, D: A, h: a, m: l, s, ms: i, Q: I }[N] || String(N || "").toLowerCase().replace(/s$/, "");
|
|
1168
|
+
}, u: function(N) {
|
|
1169
|
+
return N === void 0;
|
|
1170
|
+
} }, M = "en", v = {};
|
|
1171
|
+
v[M] = R;
|
|
1172
|
+
var j = "$isDayjsObject", b = function(N) {
|
|
1173
|
+
return N instanceof ne || !(!N || !N[j]);
|
|
1174
|
+
}, D = function N(O, F, u) {
|
|
1175
|
+
var y;
|
|
1176
|
+
if (!O) return M;
|
|
1177
|
+
if (typeof O == "string") {
|
|
1178
|
+
var _ = O.toLowerCase();
|
|
1179
|
+
v[_] && (y = _), F && (v[_] = F, y = _);
|
|
1180
|
+
var E = O.split("-");
|
|
1181
|
+
if (!y && E.length > 1) return N(E[0]);
|
|
1173
1182
|
} else {
|
|
1174
|
-
var
|
|
1175
|
-
|
|
1183
|
+
var B = O.name;
|
|
1184
|
+
v[B] = O, y = B;
|
|
1176
1185
|
}
|
|
1177
|
-
return !u &&
|
|
1178
|
-
},
|
|
1179
|
-
if (
|
|
1180
|
-
var
|
|
1181
|
-
return
|
|
1182
|
-
},
|
|
1183
|
-
|
|
1184
|
-
return
|
|
1186
|
+
return !u && y && (M = y), y || !u && M;
|
|
1187
|
+
}, T = function(N, O) {
|
|
1188
|
+
if (b(N)) return N.clone();
|
|
1189
|
+
var F = typeof O == "object" ? O : {};
|
|
1190
|
+
return F.date = N, F.args = arguments, new ne(F);
|
|
1191
|
+
}, x = m;
|
|
1192
|
+
x.l = D, x.i = b, x.w = function(N, O) {
|
|
1193
|
+
return T(N, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
|
|
1185
1194
|
};
|
|
1186
1195
|
var ne = function() {
|
|
1187
|
-
function
|
|
1188
|
-
this.$L = F
|
|
1196
|
+
function N(F) {
|
|
1197
|
+
this.$L = D(F.locale, null, !0), this.parse(F), this.$x = this.$x || F.x || {}, this[j] = !0;
|
|
1189
1198
|
}
|
|
1190
|
-
var
|
|
1191
|
-
return
|
|
1199
|
+
var O = N.prototype;
|
|
1200
|
+
return O.parse = function(F) {
|
|
1192
1201
|
this.$d = function(u) {
|
|
1193
|
-
var
|
|
1194
|
-
if (
|
|
1195
|
-
if (
|
|
1196
|
-
if (
|
|
1197
|
-
if (typeof
|
|
1198
|
-
var
|
|
1199
|
-
if (
|
|
1200
|
-
var
|
|
1201
|
-
return
|
|
1202
|
+
var y = u.date, _ = u.utc;
|
|
1203
|
+
if (y === null) return /* @__PURE__ */ new Date(NaN);
|
|
1204
|
+
if (x.u(y)) return /* @__PURE__ */ new Date();
|
|
1205
|
+
if (y instanceof Date) return new Date(y);
|
|
1206
|
+
if (typeof y == "string" && !/Z$/i.test(y)) {
|
|
1207
|
+
var E = y.match(S);
|
|
1208
|
+
if (E) {
|
|
1209
|
+
var B = E[2] - 1 || 0, q = (E[7] || "0").substring(0, 3);
|
|
1210
|
+
return _ ? new Date(Date.UTC(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, q)) : new Date(E[1], B, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, q);
|
|
1202
1211
|
}
|
|
1203
1212
|
}
|
|
1204
|
-
return new Date(
|
|
1205
|
-
}(
|
|
1206
|
-
},
|
|
1207
|
-
var
|
|
1208
|
-
this.$y =
|
|
1209
|
-
},
|
|
1210
|
-
return
|
|
1211
|
-
},
|
|
1212
|
-
return this.$d.toString() !==
|
|
1213
|
-
},
|
|
1214
|
-
var
|
|
1215
|
-
return this.startOf(u) <=
|
|
1216
|
-
},
|
|
1217
|
-
return
|
|
1218
|
-
},
|
|
1219
|
-
return this.endOf(u) <
|
|
1220
|
-
},
|
|
1221
|
-
return
|
|
1222
|
-
},
|
|
1213
|
+
return new Date(y);
|
|
1214
|
+
}(F), this.init();
|
|
1215
|
+
}, O.init = function() {
|
|
1216
|
+
var F = this.$d;
|
|
1217
|
+
this.$y = F.getFullYear(), this.$M = F.getMonth(), this.$D = F.getDate(), this.$W = F.getDay(), this.$H = F.getHours(), this.$m = F.getMinutes(), this.$s = F.getSeconds(), this.$ms = F.getMilliseconds();
|
|
1218
|
+
}, O.$utils = function() {
|
|
1219
|
+
return x;
|
|
1220
|
+
}, O.isValid = function() {
|
|
1221
|
+
return this.$d.toString() !== d;
|
|
1222
|
+
}, O.isSame = function(F, u) {
|
|
1223
|
+
var y = T(F);
|
|
1224
|
+
return this.startOf(u) <= y && y <= this.endOf(u);
|
|
1225
|
+
}, O.isAfter = function(F, u) {
|
|
1226
|
+
return T(F) < this.startOf(u);
|
|
1227
|
+
}, O.isBefore = function(F, u) {
|
|
1228
|
+
return this.endOf(u) < T(F);
|
|
1229
|
+
}, O.$g = function(F, u, y) {
|
|
1230
|
+
return x.u(F) ? this[u] : this.set(y, F);
|
|
1231
|
+
}, O.unix = function() {
|
|
1223
1232
|
return Math.floor(this.valueOf() / 1e3);
|
|
1224
|
-
},
|
|
1233
|
+
}, O.valueOf = function() {
|
|
1225
1234
|
return this.$d.getTime();
|
|
1226
|
-
},
|
|
1227
|
-
var
|
|
1228
|
-
var Se =
|
|
1229
|
-
return
|
|
1235
|
+
}, O.startOf = function(F, u) {
|
|
1236
|
+
var y = this, _ = !!x.u(u) || u, E = x.p(F), B = function(pe, de) {
|
|
1237
|
+
var Se = x.w(y.$u ? Date.UTC(y.$y, de, pe) : new Date(y.$y, de, pe), y);
|
|
1238
|
+
return _ ? Se : Se.endOf(c);
|
|
1230
1239
|
}, q = function(pe, de) {
|
|
1231
|
-
return
|
|
1240
|
+
return x.w(y.toDate()[pe].apply(y.toDate("s"), (_ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(de)), y);
|
|
1232
1241
|
}, U = this.$W, G = this.$M, X = this.$D, P = "set" + (this.$u ? "UTC" : "");
|
|
1233
|
-
switch (
|
|
1234
|
-
case
|
|
1235
|
-
return
|
|
1236
|
-
case
|
|
1237
|
-
return
|
|
1238
|
-
case
|
|
1242
|
+
switch (E) {
|
|
1243
|
+
case V:
|
|
1244
|
+
return _ ? B(1, 0) : B(31, 11);
|
|
1245
|
+
case w:
|
|
1246
|
+
return _ ? B(1, G) : B(0, G + 1);
|
|
1247
|
+
case g:
|
|
1239
1248
|
var Z = this.$locale().weekStart || 0, ae = (U < Z ? U + 7 : U) - Z;
|
|
1240
|
-
return
|
|
1249
|
+
return B(_ ? X - ae : X + (6 - ae), G);
|
|
1241
1250
|
case c:
|
|
1242
1251
|
case A:
|
|
1243
1252
|
return q(P + "Hours", 0);
|
|
@@ -1250,164 +1259,164 @@ var an = { exports: {} };
|
|
|
1250
1259
|
default:
|
|
1251
1260
|
return this.clone();
|
|
1252
1261
|
}
|
|
1253
|
-
},
|
|
1254
|
-
return this.startOf(
|
|
1255
|
-
},
|
|
1256
|
-
var
|
|
1257
|
-
if (
|
|
1262
|
+
}, O.endOf = function(F) {
|
|
1263
|
+
return this.startOf(F, !1);
|
|
1264
|
+
}, O.$set = function(F, u) {
|
|
1265
|
+
var y, _ = x.p(F), E = "set" + (this.$u ? "UTC" : ""), B = (y = {}, y[c] = E + "Date", y[A] = E + "Date", y[w] = E + "Month", y[V] = E + "FullYear", y[a] = E + "Hours", y[l] = E + "Minutes", y[s] = E + "Seconds", y[i] = E + "Milliseconds", y)[_], q = _ === c ? this.$D + (u - this.$W) : u;
|
|
1266
|
+
if (_ === w || _ === V) {
|
|
1258
1267
|
var U = this.clone().set(A, 1);
|
|
1259
|
-
U.$d[
|
|
1260
|
-
} else
|
|
1268
|
+
U.$d[B](q), U.init(), this.$d = U.set(A, Math.min(this.$D, U.daysInMonth())).$d;
|
|
1269
|
+
} else B && this.$d[B](q);
|
|
1261
1270
|
return this.init(), this;
|
|
1262
|
-
},
|
|
1263
|
-
return this.clone().$set(
|
|
1264
|
-
},
|
|
1265
|
-
return this[
|
|
1266
|
-
},
|
|
1267
|
-
var
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1270
|
-
var X =
|
|
1271
|
-
return
|
|
1271
|
+
}, O.set = function(F, u) {
|
|
1272
|
+
return this.clone().$set(F, u);
|
|
1273
|
+
}, O.get = function(F) {
|
|
1274
|
+
return this[x.p(F)]();
|
|
1275
|
+
}, O.add = function(F, u) {
|
|
1276
|
+
var y, _ = this;
|
|
1277
|
+
F = Number(F);
|
|
1278
|
+
var E = x.p(u), B = function(G) {
|
|
1279
|
+
var X = T(_);
|
|
1280
|
+
return x.w(X.date(X.date() + Math.round(G * F)), _);
|
|
1272
1281
|
};
|
|
1273
|
-
if (
|
|
1274
|
-
if (
|
|
1275
|
-
if (
|
|
1276
|
-
if (
|
|
1277
|
-
var q = (
|
|
1278
|
-
return
|
|
1279
|
-
},
|
|
1280
|
-
return this.add(-1 *
|
|
1281
|
-
},
|
|
1282
|
-
var u = this,
|
|
1283
|
-
if (!this.isValid()) return
|
|
1284
|
-
var
|
|
1285
|
-
return de && (de[Se] || de(u,
|
|
1282
|
+
if (E === w) return this.set(w, this.$M + F);
|
|
1283
|
+
if (E === V) return this.set(V, this.$y + F);
|
|
1284
|
+
if (E === c) return B(1);
|
|
1285
|
+
if (E === g) return B(7);
|
|
1286
|
+
var q = (y = {}, y[l] = o, y[a] = r, y[s] = n, y)[E] || 1, U = this.$d.getTime() + F * q;
|
|
1287
|
+
return x.w(U, this);
|
|
1288
|
+
}, O.subtract = function(F, u) {
|
|
1289
|
+
return this.add(-1 * F, u);
|
|
1290
|
+
}, O.format = function(F) {
|
|
1291
|
+
var u = this, y = this.$locale();
|
|
1292
|
+
if (!this.isValid()) return y.invalidDate || d;
|
|
1293
|
+
var _ = F || "YYYY-MM-DDTHH:mm:ssZ", E = x.z(this), B = this.$H, q = this.$m, U = this.$M, G = y.weekdays, X = y.months, P = y.meridiem, Z = function(de, Se, Oe, Ie) {
|
|
1294
|
+
return de && (de[Se] || de(u, _)) || Oe[Se].slice(0, Ie);
|
|
1286
1295
|
}, ae = function(de) {
|
|
1287
|
-
return
|
|
1296
|
+
return x.s(B % 12 || 12, de, "0");
|
|
1288
1297
|
}, pe = P || function(de, Se, Oe) {
|
|
1289
1298
|
var Ie = de < 12 ? "AM" : "PM";
|
|
1290
1299
|
return Oe ? Ie.toLowerCase() : Ie;
|
|
1291
1300
|
};
|
|
1292
|
-
return
|
|
1301
|
+
return _.replace(k, function(de, Se) {
|
|
1293
1302
|
return Se || function(Oe) {
|
|
1294
1303
|
switch (Oe) {
|
|
1295
1304
|
case "YY":
|
|
1296
1305
|
return String(u.$y).slice(-2);
|
|
1297
1306
|
case "YYYY":
|
|
1298
|
-
return
|
|
1307
|
+
return x.s(u.$y, 4, "0");
|
|
1299
1308
|
case "M":
|
|
1300
1309
|
return U + 1;
|
|
1301
1310
|
case "MM":
|
|
1302
|
-
return
|
|
1311
|
+
return x.s(U + 1, 2, "0");
|
|
1303
1312
|
case "MMM":
|
|
1304
|
-
return Z(
|
|
1313
|
+
return Z(y.monthsShort, U, X, 3);
|
|
1305
1314
|
case "MMMM":
|
|
1306
1315
|
return Z(X, U);
|
|
1307
1316
|
case "D":
|
|
1308
1317
|
return u.$D;
|
|
1309
1318
|
case "DD":
|
|
1310
|
-
return
|
|
1319
|
+
return x.s(u.$D, 2, "0");
|
|
1311
1320
|
case "d":
|
|
1312
1321
|
return String(u.$W);
|
|
1313
1322
|
case "dd":
|
|
1314
|
-
return Z(
|
|
1323
|
+
return Z(y.weekdaysMin, u.$W, G, 2);
|
|
1315
1324
|
case "ddd":
|
|
1316
|
-
return Z(
|
|
1325
|
+
return Z(y.weekdaysShort, u.$W, G, 3);
|
|
1317
1326
|
case "dddd":
|
|
1318
1327
|
return G[u.$W];
|
|
1319
1328
|
case "H":
|
|
1320
|
-
return String(
|
|
1329
|
+
return String(B);
|
|
1321
1330
|
case "HH":
|
|
1322
|
-
return
|
|
1331
|
+
return x.s(B, 2, "0");
|
|
1323
1332
|
case "h":
|
|
1324
1333
|
return ae(1);
|
|
1325
1334
|
case "hh":
|
|
1326
1335
|
return ae(2);
|
|
1327
1336
|
case "a":
|
|
1328
|
-
return pe(
|
|
1337
|
+
return pe(B, q, !0);
|
|
1329
1338
|
case "A":
|
|
1330
|
-
return pe(
|
|
1339
|
+
return pe(B, q, !1);
|
|
1331
1340
|
case "m":
|
|
1332
1341
|
return String(q);
|
|
1333
1342
|
case "mm":
|
|
1334
|
-
return
|
|
1343
|
+
return x.s(q, 2, "0");
|
|
1335
1344
|
case "s":
|
|
1336
1345
|
return String(u.$s);
|
|
1337
1346
|
case "ss":
|
|
1338
|
-
return
|
|
1347
|
+
return x.s(u.$s, 2, "0");
|
|
1339
1348
|
case "SSS":
|
|
1340
|
-
return
|
|
1349
|
+
return x.s(u.$ms, 3, "0");
|
|
1341
1350
|
case "Z":
|
|
1342
|
-
return
|
|
1351
|
+
return E;
|
|
1343
1352
|
}
|
|
1344
1353
|
return null;
|
|
1345
|
-
}(de) ||
|
|
1354
|
+
}(de) || E.replace(":", "");
|
|
1346
1355
|
});
|
|
1347
|
-
},
|
|
1356
|
+
}, O.utcOffset = function() {
|
|
1348
1357
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1349
|
-
},
|
|
1350
|
-
var
|
|
1351
|
-
return
|
|
1358
|
+
}, O.diff = function(F, u, y) {
|
|
1359
|
+
var _, E = this, B = x.p(u), q = T(F), U = (q.utcOffset() - this.utcOffset()) * o, G = this - q, X = function() {
|
|
1360
|
+
return x.m(E, q);
|
|
1352
1361
|
};
|
|
1353
|
-
switch (
|
|
1354
|
-
case
|
|
1355
|
-
|
|
1362
|
+
switch (B) {
|
|
1363
|
+
case V:
|
|
1364
|
+
_ = X() / 12;
|
|
1356
1365
|
break;
|
|
1357
|
-
case
|
|
1358
|
-
|
|
1366
|
+
case w:
|
|
1367
|
+
_ = X();
|
|
1359
1368
|
break;
|
|
1360
|
-
case
|
|
1361
|
-
|
|
1369
|
+
case I:
|
|
1370
|
+
_ = X() / 3;
|
|
1362
1371
|
break;
|
|
1363
|
-
case
|
|
1364
|
-
|
|
1372
|
+
case g:
|
|
1373
|
+
_ = (G - U) / 6048e5;
|
|
1365
1374
|
break;
|
|
1366
1375
|
case c:
|
|
1367
|
-
|
|
1376
|
+
_ = (G - U) / 864e5;
|
|
1368
1377
|
break;
|
|
1369
1378
|
case a:
|
|
1370
|
-
|
|
1379
|
+
_ = G / r;
|
|
1371
1380
|
break;
|
|
1372
1381
|
case l:
|
|
1373
|
-
|
|
1382
|
+
_ = G / o;
|
|
1374
1383
|
break;
|
|
1375
1384
|
case s:
|
|
1376
|
-
|
|
1385
|
+
_ = G / n;
|
|
1377
1386
|
break;
|
|
1378
1387
|
default:
|
|
1379
|
-
|
|
1388
|
+
_ = G;
|
|
1380
1389
|
}
|
|
1381
|
-
return
|
|
1382
|
-
},
|
|
1383
|
-
return this.endOf(
|
|
1384
|
-
},
|
|
1385
|
-
return
|
|
1386
|
-
},
|
|
1387
|
-
if (!
|
|
1388
|
-
var
|
|
1389
|
-
return
|
|
1390
|
-
},
|
|
1391
|
-
return
|
|
1392
|
-
},
|
|
1390
|
+
return y ? _ : x.a(_);
|
|
1391
|
+
}, O.daysInMonth = function() {
|
|
1392
|
+
return this.endOf(w).$D;
|
|
1393
|
+
}, O.$locale = function() {
|
|
1394
|
+
return v[this.$L];
|
|
1395
|
+
}, O.locale = function(F, u) {
|
|
1396
|
+
if (!F) return this.$L;
|
|
1397
|
+
var y = this.clone(), _ = D(F, u, !0);
|
|
1398
|
+
return _ && (y.$L = _), y;
|
|
1399
|
+
}, O.clone = function() {
|
|
1400
|
+
return x.w(this.$d, this);
|
|
1401
|
+
}, O.toDate = function() {
|
|
1393
1402
|
return new Date(this.valueOf());
|
|
1394
|
-
},
|
|
1403
|
+
}, O.toJSON = function() {
|
|
1395
1404
|
return this.isValid() ? this.toISOString() : null;
|
|
1396
|
-
},
|
|
1405
|
+
}, O.toISOString = function() {
|
|
1397
1406
|
return this.$d.toISOString();
|
|
1398
|
-
},
|
|
1407
|
+
}, O.toString = function() {
|
|
1399
1408
|
return this.$d.toUTCString();
|
|
1400
|
-
},
|
|
1401
|
-
}(),
|
|
1402
|
-
return
|
|
1403
|
-
|
|
1404
|
-
return this.$g(
|
|
1409
|
+
}, N;
|
|
1410
|
+
}(), z = ne.prototype;
|
|
1411
|
+
return T.prototype = z, [["$ms", i], ["$s", s], ["$m", l], ["$H", a], ["$W", c], ["$M", w], ["$y", V], ["$D", A]].forEach(function(N) {
|
|
1412
|
+
z[N[1]] = function(O) {
|
|
1413
|
+
return this.$g(O, N[0], N[1]);
|
|
1405
1414
|
};
|
|
1406
|
-
}),
|
|
1407
|
-
return
|
|
1408
|
-
},
|
|
1409
|
-
return
|
|
1410
|
-
},
|
|
1415
|
+
}), T.extend = function(N, O) {
|
|
1416
|
+
return N.$i || (N(O, ne, T), N.$i = !0), T;
|
|
1417
|
+
}, T.locale = D, T.isDayjs = b, T.unix = function(N) {
|
|
1418
|
+
return T(1e3 * N);
|
|
1419
|
+
}, T.en = v[M], T.Ls = v, T.p = {}, T;
|
|
1411
1420
|
});
|
|
1412
1421
|
})(an);
|
|
1413
1422
|
var Ho = an.exports;
|
|
@@ -1417,118 +1426,118 @@ var sn = { exports: {} };
|
|
|
1417
1426
|
(function(n, o) {
|
|
1418
1427
|
e.exports = o();
|
|
1419
1428
|
})(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
|
-
},
|
|
1423
|
-
return function(
|
|
1424
|
-
this[
|
|
1429
|
+
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(S) {
|
|
1430
|
+
return (S = +S) + (S > 68 ? 1900 : 2e3);
|
|
1431
|
+
}, g = function(S) {
|
|
1432
|
+
return function(k) {
|
|
1433
|
+
this[S] = +k;
|
|
1425
1434
|
};
|
|
1426
|
-
},
|
|
1427
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
1428
|
-
if (!
|
|
1429
|
-
var
|
|
1430
|
-
return
|
|
1431
|
-
}(
|
|
1432
|
-
}],
|
|
1433
|
-
var
|
|
1434
|
-
return
|
|
1435
|
-
},
|
|
1436
|
-
var
|
|
1437
|
-
if (
|
|
1438
|
-
for (var
|
|
1439
|
-
|
|
1435
|
+
}, w = [/[+-]\d\d:?(\d\d)?|Z/, function(S) {
|
|
1436
|
+
(this.zone || (this.zone = {})).offset = function(k) {
|
|
1437
|
+
if (!k || k === "Z") return 0;
|
|
1438
|
+
var R = k.match(/([+-]|\d\d)/g), h = 60 * R[1] + (+R[2] || 0);
|
|
1439
|
+
return h === 0 ? 0 : R[0] === "+" ? -h : h;
|
|
1440
|
+
}(S);
|
|
1441
|
+
}], I = function(S) {
|
|
1442
|
+
var k = a[S];
|
|
1443
|
+
return k && (k.indexOf ? k : k.s.concat(k.f));
|
|
1444
|
+
}, V = function(S, k) {
|
|
1445
|
+
var R, h = a.meridiem;
|
|
1446
|
+
if (h) {
|
|
1447
|
+
for (var m = 1; m <= 24; m += 1) if (S.indexOf(h(m, 0, k)) > -1) {
|
|
1448
|
+
R = m > 12;
|
|
1440
1449
|
break;
|
|
1441
1450
|
}
|
|
1442
|
-
} else
|
|
1443
|
-
return
|
|
1444
|
-
}, A = { A: [l, function(
|
|
1445
|
-
this.afternoon = S
|
|
1446
|
-
}], a: [l, function(
|
|
1447
|
-
this.afternoon = S
|
|
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,
|
|
1457
|
-
var
|
|
1458
|
-
if (this.day =
|
|
1459
|
-
}], w: [s,
|
|
1460
|
-
var
|
|
1461
|
-
return
|
|
1462
|
-
})).indexOf(
|
|
1463
|
-
if (
|
|
1464
|
-
this.month =
|
|
1465
|
-
}], MMMM: [l, function(
|
|
1466
|
-
var
|
|
1467
|
-
if (
|
|
1468
|
-
this.month =
|
|
1469
|
-
}], Y: [/[+-]?\d+/,
|
|
1470
|
-
this.year = c(
|
|
1471
|
-
}], YYYY: [/\d{4}/,
|
|
1472
|
-
function
|
|
1473
|
-
var
|
|
1474
|
-
|
|
1475
|
-
for (var
|
|
1476
|
-
var
|
|
1477
|
-
return
|
|
1478
|
-
return
|
|
1451
|
+
} else R = S === (k ? "pm" : "PM");
|
|
1452
|
+
return R;
|
|
1453
|
+
}, A = { A: [l, function(S) {
|
|
1454
|
+
this.afternoon = V(S, !1);
|
|
1455
|
+
}], a: [l, function(S) {
|
|
1456
|
+
this.afternoon = V(S, !0);
|
|
1457
|
+
}], Q: [r, function(S) {
|
|
1458
|
+
this.month = 3 * (S - 1) + 1;
|
|
1459
|
+
}], S: [r, function(S) {
|
|
1460
|
+
this.milliseconds = 100 * +S;
|
|
1461
|
+
}], SS: [i, function(S) {
|
|
1462
|
+
this.milliseconds = 10 * +S;
|
|
1463
|
+
}], SSS: [/\d{3}/, function(S) {
|
|
1464
|
+
this.milliseconds = +S;
|
|
1465
|
+
}], s: [s, g("seconds")], ss: [s, g("seconds")], m: [s, g("minutes")], mm: [s, g("minutes")], H: [s, g("hours")], h: [s, g("hours")], HH: [s, g("hours")], hh: [s, g("hours")], D: [s, g("day")], DD: [i, g("day")], Do: [l, function(S) {
|
|
1466
|
+
var k = a.ordinal, R = S.match(/\d+/);
|
|
1467
|
+
if (this.day = R[0], k) for (var h = 1; h <= 31; h += 1) k(h).replace(/\[|\]/g, "") === S && (this.day = h);
|
|
1468
|
+
}], w: [s, g("week")], ww: [i, g("week")], M: [s, g("month")], MM: [i, g("month")], MMM: [l, function(S) {
|
|
1469
|
+
var k = I("months"), R = (I("monthsShort") || k.map(function(h) {
|
|
1470
|
+
return h.slice(0, 3);
|
|
1471
|
+
})).indexOf(S) + 1;
|
|
1472
|
+
if (R < 1) throw new Error();
|
|
1473
|
+
this.month = R % 12 || R;
|
|
1474
|
+
}], MMMM: [l, function(S) {
|
|
1475
|
+
var k = I("months").indexOf(S) + 1;
|
|
1476
|
+
if (k < 1) throw new Error();
|
|
1477
|
+
this.month = k % 12 || k;
|
|
1478
|
+
}], Y: [/[+-]?\d+/, g("year")], YY: [i, function(S) {
|
|
1479
|
+
this.year = c(S);
|
|
1480
|
+
}], YYYY: [/\d{4}/, g("year")], Z: w, ZZ: w };
|
|
1481
|
+
function d(S) {
|
|
1482
|
+
var k, R;
|
|
1483
|
+
k = S, R = a && a.formats;
|
|
1484
|
+
for (var h = (S = k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(T, x, ne) {
|
|
1485
|
+
var z = ne && ne.toUpperCase();
|
|
1486
|
+
return x || R[ne] || n[ne] || R[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(N, O, F) {
|
|
1487
|
+
return O || F.slice(1);
|
|
1479
1488
|
});
|
|
1480
|
-
})).match(o),
|
|
1481
|
-
var
|
|
1482
|
-
|
|
1489
|
+
})).match(o), m = h.length, M = 0; M < m; M += 1) {
|
|
1490
|
+
var v = h[M], j = A[v], b = j && j[0], D = j && j[1];
|
|
1491
|
+
h[M] = D ? { regex: b, parser: D } : v.replace(/^\[|\]$/g, "");
|
|
1483
1492
|
}
|
|
1484
|
-
return function(
|
|
1485
|
-
for (var
|
|
1486
|
-
var
|
|
1487
|
-
if (typeof
|
|
1493
|
+
return function(T) {
|
|
1494
|
+
for (var x = {}, ne = 0, z = 0; ne < m; ne += 1) {
|
|
1495
|
+
var N = h[ne];
|
|
1496
|
+
if (typeof N == "string") z += N.length;
|
|
1488
1497
|
else {
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1498
|
+
var O = N.regex, F = N.parser, u = T.slice(z), y = O.exec(u)[0];
|
|
1499
|
+
F.call(x, y), T = T.replace(y, "");
|
|
1491
1500
|
}
|
|
1492
1501
|
}
|
|
1493
|
-
return function(
|
|
1494
|
-
var
|
|
1495
|
-
if (
|
|
1496
|
-
var
|
|
1497
|
-
|
|
1502
|
+
return function(_) {
|
|
1503
|
+
var E = _.afternoon;
|
|
1504
|
+
if (E !== void 0) {
|
|
1505
|
+
var B = _.hours;
|
|
1506
|
+
E ? B < 12 && (_.hours += 12) : B === 12 && (_.hours = 0), delete _.afternoon;
|
|
1498
1507
|
}
|
|
1499
|
-
}(
|
|
1508
|
+
}(x), x;
|
|
1500
1509
|
};
|
|
1501
1510
|
}
|
|
1502
|
-
return function(
|
|
1503
|
-
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1506
|
-
var
|
|
1507
|
-
this.$u =
|
|
1508
|
-
var
|
|
1509
|
-
if (typeof
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1511
|
+
return function(S, k, R) {
|
|
1512
|
+
R.p.customParseFormat = !0, S && S.parseTwoDigitYear && (c = S.parseTwoDigitYear);
|
|
1513
|
+
var h = k.prototype, m = h.parse;
|
|
1514
|
+
h.parse = function(M) {
|
|
1515
|
+
var v = M.date, j = M.utc, b = M.args;
|
|
1516
|
+
this.$u = j;
|
|
1517
|
+
var D = b[1];
|
|
1518
|
+
if (typeof D == "string") {
|
|
1519
|
+
var T = b[2] === !0, x = b[3] === !0, ne = T || x, z = b[2];
|
|
1520
|
+
x && (z = b[2]), a = this.$locale(), !T && z && (a = R.Ls[z]), this.$d = function(u, y, _, E) {
|
|
1512
1521
|
try {
|
|
1513
|
-
if (["x", "X"].indexOf(
|
|
1514
|
-
var
|
|
1515
|
-
q && !U || (
|
|
1516
|
-
var
|
|
1517
|
-
return pe ? new Date(Date.UTC(Ie,
|
|
1522
|
+
if (["x", "X"].indexOf(y) > -1) return new Date((y === "X" ? 1e3 : 1) * u);
|
|
1523
|
+
var B = d(y)(u), q = B.year, U = B.month, G = B.day, X = B.hours, P = B.minutes, Z = B.seconds, ae = B.milliseconds, pe = B.zone, de = B.week, Se = /* @__PURE__ */ new Date(), Oe = G || (q || U ? 1 : Se.getDate()), Ie = q || Se.getFullYear(), xe = 0;
|
|
1524
|
+
q && !U || (xe = U > 0 ? U - 1 : Se.getMonth());
|
|
1525
|
+
var ze, et = X || 0, qe = P || 0, p = Z || 0, f = ae || 0;
|
|
1526
|
+
return pe ? new Date(Date.UTC(Ie, xe, Oe, et, qe, p, f + 60 * pe.offset * 1e3)) : _ ? new Date(Date.UTC(Ie, xe, Oe, et, qe, p, f)) : (ze = new Date(Ie, xe, Oe, et, qe, p, f), de && (ze = E(ze).week(de).toDate()), ze);
|
|
1518
1527
|
} catch {
|
|
1519
1528
|
return /* @__PURE__ */ new Date("");
|
|
1520
1529
|
}
|
|
1521
|
-
}(
|
|
1522
|
-
} else if (
|
|
1523
|
-
|
|
1524
|
-
var
|
|
1525
|
-
if (
|
|
1526
|
-
this.$d =
|
|
1530
|
+
}(v, D, j, R), this.init(), z && z !== !0 && (this.$L = this.locale(z).$L), ne && v != this.format(D) && (this.$d = /* @__PURE__ */ new Date("")), a = {};
|
|
1531
|
+
} else if (D instanceof Array) for (var N = D.length, O = 1; O <= N; O += 1) {
|
|
1532
|
+
b[1] = D[O - 1];
|
|
1533
|
+
var F = R.apply(this, b);
|
|
1534
|
+
if (F.isValid()) {
|
|
1535
|
+
this.$d = F.$d, this.$L = F.$L, this.init();
|
|
1527
1536
|
break;
|
|
1528
1537
|
}
|
|
1529
|
-
|
|
1538
|
+
O === N && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1530
1539
|
}
|
|
1531
|
-
else
|
|
1540
|
+
else m.call(this, M);
|
|
1532
1541
|
};
|
|
1533
1542
|
};
|
|
1534
1543
|
});
|
|
@@ -1542,56 +1551,56 @@ var ln = { exports: {} };
|
|
|
1542
1551
|
})(at, function() {
|
|
1543
1552
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
1544
1553
|
return function(r, i, s) {
|
|
1545
|
-
var l, a = function(
|
|
1554
|
+
var l, a = function(I, V, A) {
|
|
1546
1555
|
A === void 0 && (A = {});
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1549
|
-
var
|
|
1550
|
-
return
|
|
1551
|
-
}(
|
|
1552
|
-
return
|
|
1553
|
-
}, c = function(
|
|
1554
|
-
for (var A = a(
|
|
1555
|
-
var
|
|
1556
|
-
|
|
1556
|
+
var d = new Date(I), S = function(k, R) {
|
|
1557
|
+
R === void 0 && (R = {});
|
|
1558
|
+
var h = R.timeZoneName || "short", m = k + "|" + h, M = o[m];
|
|
1559
|
+
return M || (M = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: k, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: h }), o[m] = M), M;
|
|
1560
|
+
}(V, A);
|
|
1561
|
+
return S.formatToParts(d);
|
|
1562
|
+
}, c = function(I, V) {
|
|
1563
|
+
for (var A = a(I, V), d = [], S = 0; S < A.length; S += 1) {
|
|
1564
|
+
var k = A[S], R = k.type, h = k.value, m = n[R];
|
|
1565
|
+
m >= 0 && (d[m] = parseInt(h, 10));
|
|
1557
1566
|
}
|
|
1558
|
-
var
|
|
1559
|
-
return (s.utc(
|
|
1560
|
-
},
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
var A,
|
|
1564
|
-
if (!Number(
|
|
1565
|
-
else if (A = s(
|
|
1566
|
-
var
|
|
1567
|
-
A = A.add(
|
|
1567
|
+
var M = d[3], v = M === 24 ? 0 : M, j = d[0] + "-" + d[1] + "-" + d[2] + " " + v + ":" + d[4] + ":" + d[5] + ":000", b = +I;
|
|
1568
|
+
return (s.utc(j).valueOf() - (b -= b % 1e3)) / 6e4;
|
|
1569
|
+
}, g = i.prototype;
|
|
1570
|
+
g.tz = function(I, V) {
|
|
1571
|
+
I === void 0 && (I = l);
|
|
1572
|
+
var A, d = this.utcOffset(), S = this.toDate(), k = S.toLocaleString("en-US", { timeZone: I }), R = Math.round((S - new Date(k)) / 1e3 / 60), h = 15 * -Math.round(S.getTimezoneOffset() / 15) - R;
|
|
1573
|
+
if (!Number(h)) A = this.utcOffset(0, V);
|
|
1574
|
+
else if (A = s(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(h, !0), V) {
|
|
1575
|
+
var m = A.utcOffset();
|
|
1576
|
+
A = A.add(d - m, "minute");
|
|
1568
1577
|
}
|
|
1569
|
-
return A.$x.$timezone =
|
|
1570
|
-
},
|
|
1571
|
-
var
|
|
1572
|
-
return
|
|
1578
|
+
return A.$x.$timezone = I, A;
|
|
1579
|
+
}, g.offsetName = function(I) {
|
|
1580
|
+
var V = this.$x.$timezone || s.tz.guess(), A = a(this.valueOf(), V, { timeZoneName: I }).find(function(d) {
|
|
1581
|
+
return d.type.toLowerCase() === "timezonename";
|
|
1573
1582
|
});
|
|
1574
1583
|
return A && A.value;
|
|
1575
1584
|
};
|
|
1576
|
-
var
|
|
1577
|
-
|
|
1578
|
-
if (!this.$x || !this.$x.$timezone) return
|
|
1585
|
+
var w = g.startOf;
|
|
1586
|
+
g.startOf = function(I, V) {
|
|
1587
|
+
if (!this.$x || !this.$x.$timezone) return w.call(this, I, V);
|
|
1579
1588
|
var A = s(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1580
|
-
return
|
|
1581
|
-
}, s.tz = function(
|
|
1582
|
-
var
|
|
1583
|
-
if (typeof
|
|
1584
|
-
var
|
|
1585
|
-
var
|
|
1586
|
-
if (
|
|
1587
|
-
var
|
|
1588
|
-
return
|
|
1589
|
-
}(s.utc(
|
|
1590
|
-
return
|
|
1589
|
+
return w.call(A, I, V).tz(this.$x.$timezone, !0);
|
|
1590
|
+
}, s.tz = function(I, V, A) {
|
|
1591
|
+
var d = A && V, S = A || V || l, k = c(+s(), S);
|
|
1592
|
+
if (typeof I != "string") return s(I).tz(S);
|
|
1593
|
+
var R = function(v, j, b) {
|
|
1594
|
+
var D = v - 60 * j * 1e3, T = c(D, b);
|
|
1595
|
+
if (j === T) return [D, j];
|
|
1596
|
+
var x = c(D -= 60 * (T - j) * 1e3, b);
|
|
1597
|
+
return T === x ? [D, T] : [v - 60 * Math.min(T, x) * 1e3, Math.max(T, x)];
|
|
1598
|
+
}(s.utc(I, d).valueOf(), k, S), h = R[0], m = R[1], M = s(h).utcOffset(m);
|
|
1599
|
+
return M.$x.$timezone = S, M;
|
|
1591
1600
|
}, s.tz.guess = function() {
|
|
1592
1601
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1593
|
-
}, s.tz.setDefault = function(
|
|
1594
|
-
l =
|
|
1602
|
+
}, s.tz.setDefault = function(I) {
|
|
1603
|
+
l = I;
|
|
1595
1604
|
};
|
|
1596
1605
|
};
|
|
1597
1606
|
});
|
|
@@ -1606,51 +1615,51 @@ var cn = { exports: {} };
|
|
|
1606
1615
|
var n = "minute", o = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
1607
1616
|
return function(i, s, l) {
|
|
1608
1617
|
var a = s.prototype;
|
|
1609
|
-
l.utc = function(
|
|
1610
|
-
var
|
|
1611
|
-
return new s(
|
|
1612
|
-
}, a.utc = function(
|
|
1613
|
-
var
|
|
1614
|
-
return
|
|
1618
|
+
l.utc = function(d) {
|
|
1619
|
+
var S = { date: d, utc: !0, args: arguments };
|
|
1620
|
+
return new s(S);
|
|
1621
|
+
}, a.utc = function(d) {
|
|
1622
|
+
var S = l(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1623
|
+
return d ? S.add(this.utcOffset(), n) : S;
|
|
1615
1624
|
}, a.local = function() {
|
|
1616
1625
|
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1617
1626
|
};
|
|
1618
1627
|
var c = a.parse;
|
|
1619
|
-
a.parse = function(
|
|
1620
|
-
|
|
1628
|
+
a.parse = function(d) {
|
|
1629
|
+
d.utc && (this.$u = !0), this.$utils().u(d.$offset) || (this.$offset = d.$offset), c.call(this, d);
|
|
1621
1630
|
};
|
|
1622
|
-
var
|
|
1631
|
+
var g = a.init;
|
|
1623
1632
|
a.init = function() {
|
|
1624
1633
|
if (this.$u) {
|
|
1625
|
-
var
|
|
1626
|
-
this.$y =
|
|
1627
|
-
} else
|
|
1634
|
+
var d = this.$d;
|
|
1635
|
+
this.$y = d.getUTCFullYear(), this.$M = d.getUTCMonth(), this.$D = d.getUTCDate(), this.$W = d.getUTCDay(), this.$H = d.getUTCHours(), this.$m = d.getUTCMinutes(), this.$s = d.getUTCSeconds(), this.$ms = d.getUTCMilliseconds();
|
|
1636
|
+
} else g.call(this);
|
|
1628
1637
|
};
|
|
1629
|
-
var
|
|
1630
|
-
a.utcOffset = function(
|
|
1631
|
-
var
|
|
1632
|
-
if (
|
|
1633
|
-
if (typeof
|
|
1634
|
-
|
|
1635
|
-
var
|
|
1636
|
-
if (!
|
|
1637
|
-
var
|
|
1638
|
-
return
|
|
1639
|
-
}(
|
|
1640
|
-
var
|
|
1641
|
-
if (
|
|
1642
|
-
var
|
|
1643
|
-
if (
|
|
1644
|
-
var
|
|
1645
|
-
return (
|
|
1638
|
+
var w = a.utcOffset;
|
|
1639
|
+
a.utcOffset = function(d, S) {
|
|
1640
|
+
var k = this.$utils().u;
|
|
1641
|
+
if (k(d)) return this.$u ? 0 : k(this.$offset) ? w.call(this) : this.$offset;
|
|
1642
|
+
if (typeof d == "string" && (d = function(M) {
|
|
1643
|
+
M === void 0 && (M = "");
|
|
1644
|
+
var v = M.match(o);
|
|
1645
|
+
if (!v) return null;
|
|
1646
|
+
var j = ("" + v[0]).match(r) || ["-", 0, 0], b = j[0], D = 60 * +j[1] + +j[2];
|
|
1647
|
+
return D === 0 ? 0 : b === "+" ? D : -D;
|
|
1648
|
+
}(d), d === null)) return this;
|
|
1649
|
+
var R = Math.abs(d) <= 16 ? 60 * d : d;
|
|
1650
|
+
if (R === 0) return this.utc(S);
|
|
1651
|
+
var h = this.clone();
|
|
1652
|
+
if (S) return h.$offset = R, h.$u = !1, h;
|
|
1653
|
+
var m = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1654
|
+
return (h = this.local().add(R + m, n)).$offset = R, h.$x.$localOffset = m, h;
|
|
1646
1655
|
};
|
|
1647
|
-
var
|
|
1648
|
-
a.format = function(
|
|
1649
|
-
var
|
|
1650
|
-
return
|
|
1656
|
+
var I = a.format;
|
|
1657
|
+
a.format = function(d) {
|
|
1658
|
+
var S = d || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1659
|
+
return I.call(this, S);
|
|
1651
1660
|
}, a.valueOf = function() {
|
|
1652
|
-
var
|
|
1653
|
-
return this.$d.valueOf() - 6e4 *
|
|
1661
|
+
var d = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1662
|
+
return this.$d.valueOf() - 6e4 * d;
|
|
1654
1663
|
}, a.isUTC = function() {
|
|
1655
1664
|
return !!this.$u;
|
|
1656
1665
|
}, a.toISOString = function() {
|
|
@@ -1658,15 +1667,15 @@ var cn = { exports: {} };
|
|
|
1658
1667
|
}, a.toString = function() {
|
|
1659
1668
|
return this.toDate().toUTCString();
|
|
1660
1669
|
};
|
|
1661
|
-
var
|
|
1662
|
-
a.toDate = function(
|
|
1663
|
-
return
|
|
1670
|
+
var V = a.toDate;
|
|
1671
|
+
a.toDate = function(d) {
|
|
1672
|
+
return d === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : V.call(this);
|
|
1664
1673
|
};
|
|
1665
1674
|
var A = a.diff;
|
|
1666
|
-
a.diff = function(
|
|
1667
|
-
if (
|
|
1668
|
-
var
|
|
1669
|
-
return A.call(
|
|
1675
|
+
a.diff = function(d, S, k) {
|
|
1676
|
+
if (d && this.$u === d.$u) return A.call(this, d, S, k);
|
|
1677
|
+
var R = this.local(), h = l(d).local();
|
|
1678
|
+
return A.call(R, h, S, k);
|
|
1670
1679
|
};
|
|
1671
1680
|
};
|
|
1672
1681
|
});
|
|
@@ -1676,7 +1685,7 @@ const er = /* @__PURE__ */ st(Xo);
|
|
|
1676
1685
|
_t.extend(er);
|
|
1677
1686
|
_t.extend(Qo);
|
|
1678
1687
|
_t.extend(Wo);
|
|
1679
|
-
const
|
|
1688
|
+
const vt = /\$\{([^}]+)\}/g;
|
|
1680
1689
|
function Re(e) {
|
|
1681
1690
|
if (!e)
|
|
1682
1691
|
return [];
|
|
@@ -1697,11 +1706,11 @@ function tr(e) {
|
|
|
1697
1706
|
}
|
|
1698
1707
|
function yt(e, t) {
|
|
1699
1708
|
if (typeof e == "string") {
|
|
1700
|
-
|
|
1701
|
-
let n =
|
|
1709
|
+
vt.lastIndex = 0;
|
|
1710
|
+
let n = vt.exec(e);
|
|
1702
1711
|
for (; n !== null; ) {
|
|
1703
1712
|
const o = String(n[1] ?? "").trim();
|
|
1704
|
-
o && t.add(o), n =
|
|
1713
|
+
o && t.add(o), n = vt.exec(e);
|
|
1705
1714
|
}
|
|
1706
1715
|
return;
|
|
1707
1716
|
}
|
|
@@ -1772,7 +1781,7 @@ function rr(e) {
|
|
|
1772
1781
|
e.raw?.type,
|
|
1773
1782
|
e.raw?.fieldType,
|
|
1774
1783
|
e.raw?.frontInputType
|
|
1775
|
-
].some((t) =>
|
|
1784
|
+
].some((t) => hn(t) === "attach");
|
|
1776
1785
|
}
|
|
1777
1786
|
function pn(e, t, n = "-") {
|
|
1778
1787
|
return !rr(e) || Ce(t) ? [] : (Array.isArray(t) ? t : [t]).map((r, i) => ar(r, i, n)).filter((r) => !!r);
|
|
@@ -1798,8 +1807,8 @@ function ar(e, t, n) {
|
|
|
1798
1807
|
if (e && typeof e == "object") {
|
|
1799
1808
|
const o = e, r = sr(o, n), i = De(o.url);
|
|
1800
1809
|
if (i) {
|
|
1801
|
-
const l = { url: i }, a = De(o.name), c = De(o.mimeType),
|
|
1802
|
-
return a && (l.name = a), c && (l.mimeType = c),
|
|
1810
|
+
const l = { url: i }, a = De(o.name), c = De(o.mimeType), g = De(o.extension);
|
|
1811
|
+
return a && (l.name = a), c && (l.mimeType = c), g && (l.extension = g), {
|
|
1803
1812
|
key: String(t),
|
|
1804
1813
|
text: r,
|
|
1805
1814
|
action: {
|
|
@@ -1875,9 +1884,9 @@ function mn(e) {
|
|
|
1875
1884
|
]);
|
|
1876
1885
|
}
|
|
1877
1886
|
function cr(e) {
|
|
1878
|
-
return Array.from(new Set(e.map((t) =>
|
|
1887
|
+
return Array.from(new Set(e.map((t) => hn(t)).filter(Boolean)));
|
|
1879
1888
|
}
|
|
1880
|
-
function
|
|
1889
|
+
function hn(e) {
|
|
1881
1890
|
return String(e ?? "").trim().toLowerCase();
|
|
1882
1891
|
}
|
|
1883
1892
|
function ur(e, t, n) {
|
|
@@ -1935,10 +1944,10 @@ function jt(e) {
|
|
|
1935
1944
|
treeNodes: o
|
|
1936
1945
|
};
|
|
1937
1946
|
}
|
|
1938
|
-
function
|
|
1947
|
+
function vn(e, t, n) {
|
|
1939
1948
|
return e.map((o) => o.key === t || o.tagId === t || o.id === t ? { ...o, children: n, loaded: !0 } : {
|
|
1940
1949
|
...o,
|
|
1941
|
-
children:
|
|
1950
|
+
children: vn(o.children, t, n)
|
|
1942
1951
|
});
|
|
1943
1952
|
}
|
|
1944
1953
|
function mr(e, t = {}, n = null) {
|
|
@@ -1955,10 +1964,10 @@ function mr(e, t = {}, n = null) {
|
|
|
1955
1964
|
raw: e
|
|
1956
1965
|
};
|
|
1957
1966
|
}
|
|
1958
|
-
function
|
|
1967
|
+
function hr(e) {
|
|
1959
1968
|
return e.multRow || e.htmlDisplay === "T" ? "table" : "form";
|
|
1960
1969
|
}
|
|
1961
|
-
function
|
|
1970
|
+
function vr(e, t = {}) {
|
|
1962
1971
|
const n = e.renderType === "table" ? e.rows.map((a) => bt(St(a))) : [bt(St(e.model))], o = le(e.operationInfo), r = le(o.editInfoSet), i = le(r.params), s = le(o.queryInfoSet), l = le(s.params);
|
|
1963
1972
|
return {
|
|
1964
1973
|
...t,
|
|
@@ -2006,27 +2015,27 @@ function gr(e, t, n) {
|
|
|
2006
2015
|
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
2016
|
}
|
|
2008
2017
|
function Nt(e, t, n, o) {
|
|
2009
|
-
const r = le(e), i = yr(r.infSetMark ?? r), s = br(r.infSetFields ?? r.fields ?? []), l = wr(r.infSetValues ?? r.rows ?? r.data, s),
|
|
2010
|
-
r.tagId ?? r.infTagId ??
|
|
2011
|
-
),
|
|
2012
|
-
key:
|
|
2013
|
-
id:
|
|
2014
|
-
setId:
|
|
2015
|
-
code:
|
|
2016
|
-
tagId:
|
|
2017
|
-
requestTagId:
|
|
2018
|
-
ownerNodeKey:
|
|
2019
|
-
infSetId:
|
|
2020
|
-
title: i.name || Q(r.name ?? n?.tagName ??
|
|
2021
|
-
renderType:
|
|
2018
|
+
const r = le(e), i = yr(r.infSetMark ?? r), s = br(r.infSetFields ?? r.fields ?? []), l = hr(i), a = wr(r.infSetValues ?? r.rows ?? r.data, s, l), c = a[0] ? St(a[0]) : bn(s), g = le(r.tag), w = Q(
|
|
2019
|
+
r.tagId ?? r.infTagId ?? g.tagId ?? g.infTagId ?? i.raw.tagId ?? i.raw.infTagId
|
|
2020
|
+
), I = Q(t.tagId ?? n?.tagId), V = Q(n?.key), A = o ? t.infSetId ?? n?.infSetId : void 0, d = o ? t.setId : void 0, S = o ? n?.code : void 0, k = i.setId || Q(r.setId), R = Q(r.infSetId) || k || Q(A), h = k || Q(d ?? R), m = i.code || Q(r.code ?? S ?? h), M = h || m || R || w, v = {
|
|
2021
|
+
key: M,
|
|
2022
|
+
id: M,
|
|
2023
|
+
setId: h,
|
|
2024
|
+
code: m,
|
|
2025
|
+
tagId: w,
|
|
2026
|
+
requestTagId: I || void 0,
|
|
2027
|
+
ownerNodeKey: V || void 0,
|
|
2028
|
+
infSetId: R,
|
|
2029
|
+
title: i.name || Q(r.name ?? n?.tagName ?? M),
|
|
2030
|
+
renderType: l,
|
|
2022
2031
|
mark: i,
|
|
2023
2032
|
fields: s,
|
|
2024
|
-
model:
|
|
2025
|
-
rows:
|
|
2033
|
+
model: c,
|
|
2034
|
+
rows: a,
|
|
2026
2035
|
operationInfo: ut(t.operationInfo ?? r.operationInfo),
|
|
2027
2036
|
raw: r
|
|
2028
2037
|
};
|
|
2029
|
-
return
|
|
2038
|
+
return v.renderType === "form" && a.length === 0 && (v.rows = [{ ...c, __rowKey: `${M}-0` }]), v;
|
|
2030
2039
|
}
|
|
2031
2040
|
function yr(e) {
|
|
2032
2041
|
const t = le(e), n = Q(t.htmlDisplay || "F");
|
|
@@ -2066,8 +2075,8 @@ function Sr(e, t) {
|
|
|
2066
2075
|
isRequired: $e(n.isRequired),
|
|
2067
2076
|
disabled: n.disabled === void 0 ? void 0 : $e(n.disabled),
|
|
2068
2077
|
span: Mn(n.span ?? n.colSpan),
|
|
2069
|
-
width:
|
|
2070
|
-
minWidth:
|
|
2078
|
+
width: xt(n.width),
|
|
2079
|
+
minWidth: xt(n.minWidth),
|
|
2071
2080
|
placeholder: ie(n.placeholder),
|
|
2072
2081
|
options: yn(n.options),
|
|
2073
2082
|
interface: i,
|
|
@@ -2081,14 +2090,14 @@ function Sr(e, t) {
|
|
|
2081
2090
|
raw: n
|
|
2082
2091
|
};
|
|
2083
2092
|
}
|
|
2084
|
-
function wr(e, t) {
|
|
2085
|
-
if (Array.isArray(e) && e.some((
|
|
2086
|
-
const
|
|
2087
|
-
return t.some((
|
|
2093
|
+
function wr(e, t, n) {
|
|
2094
|
+
if (Array.isArray(e) && e.some((i) => {
|
|
2095
|
+
const s = le(i);
|
|
2096
|
+
return t.some((l) => s[l.code] !== void 0 || s[l.key] !== void 0);
|
|
2088
2097
|
}))
|
|
2089
|
-
return e.map((
|
|
2090
|
-
const
|
|
2091
|
-
return Object.keys(
|
|
2098
|
+
return e.map((i, s) => ({ ...le(i), __rowKey: Q(le(i).__rowKey ?? le(i).key ?? s) }));
|
|
2099
|
+
const o = bn(t);
|
|
2100
|
+
return n === "form" && Object.keys(o).length ? [{ ...o, __rowKey: "0" }] : [];
|
|
2092
2101
|
}
|
|
2093
2102
|
function bn(e) {
|
|
2094
2103
|
return e.reduce((t, n) => (t[n.code || n.key] = n.value, t), {});
|
|
@@ -2122,7 +2131,7 @@ function Ir(e, t, n, o) {
|
|
|
2122
2131
|
};
|
|
2123
2132
|
}
|
|
2124
2133
|
function _r(e, t, n, o, r) {
|
|
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}`,
|
|
2134
|
+
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}`, g = t.code || ie(e.code ?? l);
|
|
2126
2135
|
return {
|
|
2127
2136
|
key: c,
|
|
2128
2137
|
id: c,
|
|
@@ -2137,7 +2146,7 @@ function _r(e, t, n, o, r) {
|
|
|
2137
2146
|
schemeId: Q(e.infSchmId ?? n?.infSchmId),
|
|
2138
2147
|
infSetId: l,
|
|
2139
2148
|
setId: a,
|
|
2140
|
-
code:
|
|
2149
|
+
code: g,
|
|
2141
2150
|
children: [],
|
|
2142
2151
|
infSetList: [t],
|
|
2143
2152
|
operationInfo: ut(e.operationInfo),
|
|
@@ -2242,7 +2251,7 @@ function Tr(e) {
|
|
|
2242
2251
|
};
|
|
2243
2252
|
return e.multiple !== void 0 && (t.multiple = $e(e.multiple)), Object.keys(t).length ? t : void 0;
|
|
2244
2253
|
}
|
|
2245
|
-
function
|
|
2254
|
+
function xt(e) {
|
|
2246
2255
|
return typeof e == "string" || typeof e == "number" ? e : void 0;
|
|
2247
2256
|
}
|
|
2248
2257
|
function le(e) {
|
|
@@ -2426,13 +2435,13 @@ function Rr(e) {
|
|
|
2426
2435
|
};
|
|
2427
2436
|
}
|
|
2428
2437
|
const Dn = "信息集不能为空,最后一条数据不可删除";
|
|
2429
|
-
function
|
|
2430
|
-
return !e.mark.isRequired || t.length > 0 ? null :
|
|
2438
|
+
function xr(e, t = [], n = {}) {
|
|
2439
|
+
return !e.mark.isRequired || t.length > 0 ? null : zr(
|
|
2431
2440
|
n.emptyMessage,
|
|
2432
2441
|
{ section: e, infSetValues: t }
|
|
2433
2442
|
) || Dn;
|
|
2434
2443
|
}
|
|
2435
|
-
function
|
|
2444
|
+
function zr(e, t) {
|
|
2436
2445
|
return typeof e == "function" ? e(t) : typeof e == "string" ? e : Dn;
|
|
2437
2446
|
}
|
|
2438
2447
|
const Ne = (e) => new Error(`[GlobalInfo] ${e}`), qr = (e) => [
|
|
@@ -2444,12 +2453,12 @@ function wt(e) {
|
|
|
2444
2453
|
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);
|
|
2445
2454
|
}
|
|
2446
2455
|
const Gr = (e) => {
|
|
2447
|
-
const t =
|
|
2456
|
+
const t = ve(!1), n = ve(!1), o = ve(!1), r = Pe(null), i = Pe([]), s = Pe(null), l = Pe(null), a = Pe(null), c = Pe({}), g = Pe({}), w = ve([]), I = Pe({}), V = ve([]), A = L(
|
|
2448
2457
|
() => {
|
|
2449
|
-
const
|
|
2450
|
-
return [...
|
|
2458
|
+
const p = w.value.map((C) => c.value[C]).filter((C) => !!C), f = Object.entries(c.value).filter(([C]) => !w.value.includes(C)).map(([, C]) => C);
|
|
2459
|
+
return [...p, ...f];
|
|
2451
2460
|
}
|
|
2452
|
-
),
|
|
2461
|
+
), d = L(() => ({
|
|
2453
2462
|
// 整棵树是否正在加载。
|
|
2454
2463
|
loading: t.value,
|
|
2455
2464
|
// 当前详情是否正在加载。
|
|
@@ -2457,234 +2466,234 @@ const Gr = (e) => {
|
|
|
2457
2466
|
// 当前是否正在保存。
|
|
2458
2467
|
saving: o.value,
|
|
2459
2468
|
// 当前所有编辑中的 section key。
|
|
2460
|
-
editingSectionKeys:
|
|
2469
|
+
editingSectionKeys: V.value,
|
|
2461
2470
|
// 已加载 section 映射。
|
|
2462
2471
|
sectionMap: c.value,
|
|
2463
2472
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
2464
2473
|
sectionStatusMap: Object.fromEntries(
|
|
2465
|
-
Object.entries(
|
|
2466
|
-
|
|
2474
|
+
Object.entries(I.value).map(([p, f]) => [
|
|
2475
|
+
p,
|
|
2467
2476
|
{
|
|
2468
2477
|
// 保留原状态字段。
|
|
2469
|
-
...
|
|
2478
|
+
...f,
|
|
2470
2479
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
2471
|
-
editing:
|
|
2472
|
-
|
|
2480
|
+
editing: V.value.includes(
|
|
2481
|
+
g.value[p] ?? p
|
|
2473
2482
|
)
|
|
2474
2483
|
}
|
|
2475
2484
|
])
|
|
2476
2485
|
),
|
|
2477
2486
|
// 最近一次全局错误。
|
|
2478
2487
|
error: r.value
|
|
2479
|
-
})),
|
|
2488
|
+
})), S = () => ({
|
|
2480
2489
|
// adaptScene 透传给新接口形态。
|
|
2481
2490
|
adaptScene: e.adaptScene,
|
|
2482
2491
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
2483
2492
|
emplid: e.emplid
|
|
2484
|
-
}),
|
|
2493
|
+
}), k = (p) => ({
|
|
2485
2494
|
// 复用基础参数,保证人员和场景一致。
|
|
2486
|
-
...
|
|
2495
|
+
...S(),
|
|
2487
2496
|
// infSchmId 指定当前模板方案。
|
|
2488
|
-
infSchmId:
|
|
2497
|
+
infSchmId: p.infSchmId,
|
|
2489
2498
|
// tagId 指定要展开的树节点。
|
|
2490
|
-
tagId:
|
|
2499
|
+
tagId: p.tagId,
|
|
2491
2500
|
// tagLevel 告诉后端当前节点层级。
|
|
2492
|
-
tagLevel:
|
|
2501
|
+
tagLevel: p.tagLevel,
|
|
2493
2502
|
// parentTagId 保留父子关系上下文。
|
|
2494
|
-
parentTagId:
|
|
2495
|
-
}),
|
|
2503
|
+
parentTagId: p.parentTagId
|
|
2504
|
+
}), R = (p = l.value, f = a.value) => ({
|
|
2496
2505
|
// 详情接口同样需要基础人员和场景参数。
|
|
2497
|
-
...
|
|
2506
|
+
...S(),
|
|
2498
2507
|
// 当前节点所属模板方案。
|
|
2499
|
-
infSchmId:
|
|
2508
|
+
infSchmId: p?.infSchmId,
|
|
2500
2509
|
// 当前点击或加载的树节点 id。
|
|
2501
|
-
tagId:
|
|
2510
|
+
tagId: p?.tagId,
|
|
2502
2511
|
// 保存或刷新指定 section 时优先使用 section 自己的信息集 id。
|
|
2503
|
-
infSetId:
|
|
2512
|
+
infSetId: f?.infSetId ?? p?.infSetId,
|
|
2504
2513
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
2505
|
-
setId:
|
|
2506
|
-
}),
|
|
2514
|
+
setId: f?.setId ?? p?.setId
|
|
2515
|
+
}), h = async (p, f) => Nr({
|
|
2507
2516
|
service: e.service,
|
|
2508
2517
|
formatter: e.formatOperationParams,
|
|
2509
|
-
operation:
|
|
2510
|
-
context:
|
|
2518
|
+
operation: p,
|
|
2519
|
+
context: f,
|
|
2511
2520
|
viewModel: s.value,
|
|
2512
2521
|
sections: A.value,
|
|
2513
2522
|
activeNode: l.value,
|
|
2514
2523
|
activeSection: a.value
|
|
2515
|
-
}),
|
|
2516
|
-
async (
|
|
2524
|
+
}), m = Uo(
|
|
2525
|
+
async (p, f) => {
|
|
2517
2526
|
if (!e.service.requestOperation)
|
|
2518
2527
|
throw Ne("service.requestOperation is required");
|
|
2519
|
-
return e.service.requestOperation(
|
|
2528
|
+
return e.service.requestOperation(p, f);
|
|
2520
2529
|
},
|
|
2521
|
-
(
|
|
2522
|
-
),
|
|
2523
|
-
const
|
|
2530
|
+
(p) => qr(p)
|
|
2531
|
+
), M = async (p, f) => {
|
|
2532
|
+
const C = await On({
|
|
2524
2533
|
formatter: e.formatOperationParams,
|
|
2525
|
-
params:
|
|
2526
|
-
operation:
|
|
2527
|
-
type:
|
|
2528
|
-
requestSource:
|
|
2529
|
-
tagId:
|
|
2530
|
-
section:
|
|
2531
|
-
field:
|
|
2532
|
-
model:
|
|
2533
|
-
row:
|
|
2534
|
-
node:
|
|
2534
|
+
params: f?.params,
|
|
2535
|
+
operation: p,
|
|
2536
|
+
type: f?.type,
|
|
2537
|
+
requestSource: f?.requestSource,
|
|
2538
|
+
tagId: f?.tagId,
|
|
2539
|
+
section: f?.section,
|
|
2540
|
+
field: f?.field,
|
|
2541
|
+
model: f?.model,
|
|
2542
|
+
row: f?.row,
|
|
2543
|
+
node: f?.node,
|
|
2535
2544
|
viewModel: s.value,
|
|
2536
2545
|
sections: A.value,
|
|
2537
2546
|
activeNode: l.value,
|
|
2538
2547
|
activeSection: a.value,
|
|
2539
|
-
searchText:
|
|
2540
|
-
}), K = { ...
|
|
2541
|
-
return
|
|
2542
|
-
},
|
|
2543
|
-
if (!
|
|
2544
|
-
return
|
|
2545
|
-
for (const
|
|
2546
|
-
if (We(
|
|
2547
|
-
return
|
|
2548
|
-
const K =
|
|
2548
|
+
searchText: f?.searchText
|
|
2549
|
+
}), K = { ...p, params: C }, W = f && { ...f, params: C };
|
|
2550
|
+
return m(K, W);
|
|
2551
|
+
}, v = (p, f) => {
|
|
2552
|
+
if (!f)
|
|
2553
|
+
return p[0] ?? null;
|
|
2554
|
+
for (const C of p) {
|
|
2555
|
+
if (We(C).includes(f))
|
|
2556
|
+
return C;
|
|
2557
|
+
const K = v(C.children, f);
|
|
2549
2558
|
if (K)
|
|
2550
2559
|
return K;
|
|
2551
2560
|
}
|
|
2552
2561
|
return null;
|
|
2553
|
-
},
|
|
2554
|
-
if (
|
|
2555
|
-
return typeof
|
|
2556
|
-
},
|
|
2557
|
-
const
|
|
2558
|
-
if (!
|
|
2562
|
+
}, j = (p = a.value) => {
|
|
2563
|
+
if (p)
|
|
2564
|
+
return typeof p == "string" ? p : Ke(p) ? T(p) : ke(p);
|
|
2565
|
+
}, b = (p = a.value) => {
|
|
2566
|
+
const f = j(p);
|
|
2567
|
+
if (!f)
|
|
2559
2568
|
return null;
|
|
2560
|
-
const
|
|
2561
|
-
return c.value[
|
|
2562
|
-
},
|
|
2563
|
-
const
|
|
2564
|
-
if (d)
|
|
2565
|
-
return p.value[d] ?? d;
|
|
2566
|
-
}, O = (f = a.value) => {
|
|
2569
|
+
const C = g.value[f] ?? f;
|
|
2570
|
+
return c.value[C] ?? null;
|
|
2571
|
+
}, D = (p = a.value) => {
|
|
2572
|
+
const f = j(p);
|
|
2567
2573
|
if (f)
|
|
2568
|
-
return
|
|
2569
|
-
},
|
|
2570
|
-
if (
|
|
2571
|
-
return
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
const
|
|
2577
|
-
|
|
2574
|
+
return g.value[f] ?? f;
|
|
2575
|
+
}, T = (p = a.value) => {
|
|
2576
|
+
if (p)
|
|
2577
|
+
return typeof p == "string" ? p : Ke(p) ? p.setId ?? p.infSetId ?? p.key : ke(p);
|
|
2578
|
+
}, x = (p = a.value) => {
|
|
2579
|
+
if (Ke(p))
|
|
2580
|
+
return p;
|
|
2581
|
+
if (typeof p == "string") {
|
|
2582
|
+
const f = v(i.value, p);
|
|
2583
|
+
if (f)
|
|
2584
|
+
return f;
|
|
2585
|
+
const C = b(p);
|
|
2586
|
+
return C?.ownerNodeKey ? v(i.value, C.ownerNodeKey) ?? l.value : C || l.value && We(l.value).includes(p) ? l.value : null;
|
|
2578
2587
|
}
|
|
2579
|
-
return
|
|
2580
|
-
}, ne = (
|
|
2581
|
-
const
|
|
2582
|
-
if (!
|
|
2588
|
+
return p?.ownerNodeKey ? v(i.value, p.ownerNodeKey) ?? l.value : l.value;
|
|
2589
|
+
}, ne = (p = a.value) => !p || Ke(p) ? null : b(p), z = (p = a.value) => {
|
|
2590
|
+
const f = T(p);
|
|
2591
|
+
if (!f)
|
|
2583
2592
|
return Ue();
|
|
2584
|
-
const
|
|
2593
|
+
const C = g.value[f] ?? f;
|
|
2585
2594
|
return Ue({
|
|
2586
|
-
|
|
2587
|
-
|
|
2595
|
+
...I.value[f],
|
|
2596
|
+
...I.value[C],
|
|
2588
2597
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
2589
|
-
editing:
|
|
2590
|
-
|
|
2598
|
+
editing: V.value.includes(
|
|
2599
|
+
C
|
|
2591
2600
|
)
|
|
2592
2601
|
});
|
|
2593
|
-
},
|
|
2594
|
-
const
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
[
|
|
2602
|
+
}, N = (p, f) => {
|
|
2603
|
+
const C = T(p);
|
|
2604
|
+
C && (I.value = {
|
|
2605
|
+
...I.value,
|
|
2606
|
+
[C]: Ue({
|
|
2598
2607
|
// 保留已有状态。
|
|
2599
|
-
|
|
2608
|
+
...I.value[C],
|
|
2600
2609
|
// 合并本次状态补丁。
|
|
2601
|
-
...
|
|
2610
|
+
...f,
|
|
2602
2611
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
2603
|
-
editing:
|
|
2612
|
+
editing: V.value.includes(C)
|
|
2604
2613
|
})
|
|
2605
2614
|
});
|
|
2606
|
-
},
|
|
2607
|
-
const
|
|
2615
|
+
}, O = (p = s.value?.raw ?? null, f = l.value) => {
|
|
2616
|
+
const C = A.value, K = a.value && C.find(
|
|
2608
2617
|
(W) => ke(W) === ke(a.value)
|
|
2609
2618
|
) ? a.value : null;
|
|
2610
2619
|
s.value = {
|
|
2611
2620
|
// 保留原 scheme。
|
|
2612
2621
|
scheme: s.value?.scheme ?? null,
|
|
2613
2622
|
// 当前节点。
|
|
2614
|
-
node:
|
|
2623
|
+
node: f,
|
|
2615
2624
|
// 顶层节点和树节点都来自 nodes。
|
|
2616
2625
|
topNodes: i.value,
|
|
2617
2626
|
treeNodes: i.value,
|
|
2618
2627
|
// 当前激活节点。
|
|
2619
|
-
activeNode:
|
|
2628
|
+
activeNode: f,
|
|
2620
2629
|
// 当前激活 section。
|
|
2621
2630
|
activeSection: K,
|
|
2622
2631
|
// 当前所有已加载 section。
|
|
2623
|
-
sections:
|
|
2632
|
+
sections: C,
|
|
2624
2633
|
// 当前 section 缓存。
|
|
2625
2634
|
sectionMap: c.value,
|
|
2626
2635
|
// 保留原始接口数据。
|
|
2627
|
-
raw:
|
|
2636
|
+
raw: p
|
|
2628
2637
|
}, a.value = K;
|
|
2629
|
-
},
|
|
2638
|
+
}, F = (p, f = l.value, C) => {
|
|
2630
2639
|
const K = Rr({
|
|
2631
2640
|
currentMap: c.value,
|
|
2632
|
-
currentAliasMap:
|
|
2633
|
-
currentOrder:
|
|
2634
|
-
currentStatusMap:
|
|
2635
|
-
editingSectionKeys:
|
|
2636
|
-
nextViewModel:
|
|
2637
|
-
node:
|
|
2638
|
-
targetKey:
|
|
2641
|
+
currentAliasMap: g.value,
|
|
2642
|
+
currentOrder: w.value,
|
|
2643
|
+
currentStatusMap: I.value,
|
|
2644
|
+
editingSectionKeys: V.value,
|
|
2645
|
+
nextViewModel: p,
|
|
2646
|
+
node: f,
|
|
2647
|
+
targetKey: C,
|
|
2639
2648
|
activeSection: a.value
|
|
2640
2649
|
});
|
|
2641
|
-
return c.value = K.sectionMap,
|
|
2642
|
-
...
|
|
2643
|
-
scheme:
|
|
2650
|
+
return c.value = K.sectionMap, g.value = K.sectionAliasMap, w.value = K.sectionOrder, I.value = K.sectionStatusMap, s.value = {
|
|
2651
|
+
...p,
|
|
2652
|
+
scheme: p.scheme ?? s.value?.scheme ?? null,
|
|
2644
2653
|
topNodes: i.value,
|
|
2645
2654
|
treeNodes: i.value,
|
|
2646
|
-
activeNode:
|
|
2655
|
+
activeNode: f,
|
|
2647
2656
|
activeSection: K.matchedSection,
|
|
2648
2657
|
sections: K.targetSections,
|
|
2649
2658
|
sectionMap: c.value
|
|
2650
2659
|
}, a.value = K.matchedSection, K.matchedSection;
|
|
2651
|
-
}, u = (
|
|
2652
|
-
const
|
|
2653
|
-
if (!
|
|
2660
|
+
}, u = (p, f) => {
|
|
2661
|
+
const C = D(p), K = C ? c.value[C] : null;
|
|
2662
|
+
if (!C || !K)
|
|
2654
2663
|
return;
|
|
2655
|
-
const W =
|
|
2664
|
+
const W = f(K);
|
|
2656
2665
|
c.value = {
|
|
2657
2666
|
...c.value,
|
|
2658
|
-
[
|
|
2659
|
-
}, a.value = ke(a.value ?? W) ===
|
|
2660
|
-
},
|
|
2661
|
-
const
|
|
2662
|
-
if (!
|
|
2667
|
+
[C]: W
|
|
2668
|
+
}, a.value = ke(a.value ?? W) === C ? W : a.value, O();
|
|
2669
|
+
}, y = async (p = a.value ?? l.value) => {
|
|
2670
|
+
const f = ne(p), C = x(p) ?? l.value, K = T(p);
|
|
2671
|
+
if (!C)
|
|
2663
2672
|
return null;
|
|
2664
2673
|
if (!e.service.requestOperation)
|
|
2665
2674
|
throw Ne("service.requestOperation is required");
|
|
2666
|
-
n.value = !0, r.value = null,
|
|
2675
|
+
n.value = !0, r.value = null, N(K ?? C, { loading: !0, error: null });
|
|
2667
2676
|
try {
|
|
2668
|
-
const W =
|
|
2677
|
+
const W = f ? [{ infSetId: f.infSetId, setId: f.setId, operationInfo: f.operationInfo, raw: f.raw }] : C.infSetList;
|
|
2669
2678
|
if (W.length === 0)
|
|
2670
2679
|
throw Ne("node.infSetList is required");
|
|
2671
2680
|
const _e = await Promise.all(W.map(async (se) => {
|
|
2672
|
-
const
|
|
2673
|
-
...
|
|
2681
|
+
const he = Ar(f, C, se.infSetId), Ae = {
|
|
2682
|
+
...R(C, f),
|
|
2674
2683
|
infSetId: se.infSetId,
|
|
2675
2684
|
setId: se.setId,
|
|
2676
2685
|
operationInfo: se.operationInfo
|
|
2677
2686
|
};
|
|
2678
|
-
if (
|
|
2679
|
-
const dt = await
|
|
2687
|
+
if (he) {
|
|
2688
|
+
const dt = await h(he, {
|
|
2680
2689
|
type: "queryInfoSet",
|
|
2681
2690
|
requestSource: "inner",
|
|
2682
|
-
tagId:
|
|
2683
|
-
node:
|
|
2684
|
-
section:
|
|
2691
|
+
tagId: f?.requestTagId ?? f?.tagId ?? C.tagId,
|
|
2692
|
+
node: C,
|
|
2693
|
+
section: f,
|
|
2685
2694
|
params: Ae
|
|
2686
2695
|
});
|
|
2687
|
-
return mr(dt, Ae,
|
|
2696
|
+
return mr(dt, Ae, C);
|
|
2688
2697
|
}
|
|
2689
2698
|
throw Ne("infoSet.operationInfo.queryInfoSet is required");
|
|
2690
2699
|
})), me = {
|
|
@@ -2692,47 +2701,47 @@ const Gr = (e) => {
|
|
|
2692
2701
|
sections: _e.flatMap((se) => se.sections),
|
|
2693
2702
|
sectionMap: Object.fromEntries(_e.flatMap((se) => se.sections).map((se) => [se.key, se]))
|
|
2694
2703
|
};
|
|
2695
|
-
return
|
|
2704
|
+
return F(me, C, K);
|
|
2696
2705
|
} catch (W) {
|
|
2697
|
-
throw r.value = W,
|
|
2706
|
+
throw r.value = W, N(K ?? C, { loading: !1, error: W }), W;
|
|
2698
2707
|
} finally {
|
|
2699
|
-
n.value = !1,
|
|
2708
|
+
n.value = !1, N(K ?? C, { loading: !1 });
|
|
2700
2709
|
}
|
|
2701
|
-
},
|
|
2702
|
-
if (!
|
|
2710
|
+
}, _ = (p = a.value) => y(p), E = (p = a.value) => {
|
|
2711
|
+
if (!p)
|
|
2703
2712
|
return null;
|
|
2704
|
-
if (!Ke(
|
|
2705
|
-
return
|
|
2706
|
-
const
|
|
2707
|
-
return
|
|
2708
|
-
},
|
|
2709
|
-
const
|
|
2710
|
-
if (!
|
|
2711
|
-
return
|
|
2712
|
-
const
|
|
2713
|
+
if (!Ke(p) && typeof p != "string")
|
|
2714
|
+
return b(p);
|
|
2715
|
+
const f = T(p);
|
|
2716
|
+
return f ? c.value[g.value[f] ?? f] ?? null : null;
|
|
2717
|
+
}, B = async (p = l.value) => p ? (await y(p), s.value) : (s.value = null, a.value = null, c.value = {}, g.value = {}, w.value = [], I.value = {}, null), q = async (p) => {
|
|
2718
|
+
const f = Pr(p);
|
|
2719
|
+
if (!f)
|
|
2720
|
+
return p.children;
|
|
2721
|
+
const C = k(p), K = await h(f, {
|
|
2713
2722
|
type: "openTag",
|
|
2714
2723
|
requestSource: "sidebar",
|
|
2715
|
-
tagId:
|
|
2716
|
-
node:
|
|
2717
|
-
params:
|
|
2724
|
+
tagId: p.tagId,
|
|
2725
|
+
node: p,
|
|
2726
|
+
params: C
|
|
2718
2727
|
});
|
|
2719
2728
|
return jt(K).treeNodes;
|
|
2720
|
-
}, U = async (
|
|
2721
|
-
if (
|
|
2722
|
-
return
|
|
2723
|
-
const
|
|
2724
|
-
return
|
|
2725
|
-
}, G = async (
|
|
2726
|
-
const
|
|
2727
|
-
return
|
|
2729
|
+
}, U = async (p) => {
|
|
2730
|
+
if (p.loaded)
|
|
2731
|
+
return p.children;
|
|
2732
|
+
const f = await q(p);
|
|
2733
|
+
return f.length > 0 && (i.value = vn(i.value, p.key, f)), f;
|
|
2734
|
+
}, G = async (p) => {
|
|
2735
|
+
const f = typeof p == "string" ? v(i.value, p) : p;
|
|
2736
|
+
return f ? (l.value = f, a.value = null, V.value = [], await U(f), O(s.value?.raw, f), f) : null;
|
|
2728
2737
|
}, X = async () => {
|
|
2729
|
-
const
|
|
2730
|
-
if (!
|
|
2738
|
+
const p = e.service.templateTree;
|
|
2739
|
+
if (!p)
|
|
2731
2740
|
throw Ne("service.templateTree is required");
|
|
2732
2741
|
t.value = !0, r.value = null;
|
|
2733
2742
|
try {
|
|
2734
|
-
const
|
|
2735
|
-
|
|
2743
|
+
const f = await p(S()), C = jt(f), K = await Promise.all(
|
|
2744
|
+
C.treeNodes.map(async (_e) => {
|
|
2736
2745
|
const me = await q(_e);
|
|
2737
2746
|
return {
|
|
2738
2747
|
..._e,
|
|
@@ -2741,47 +2750,47 @@ const Gr = (e) => {
|
|
|
2741
2750
|
};
|
|
2742
2751
|
})
|
|
2743
2752
|
);
|
|
2744
|
-
i.value = K, a.value = null, c.value = {},
|
|
2745
|
-
const W =
|
|
2753
|
+
i.value = K, a.value = null, c.value = {}, g.value = {}, w.value = [], I.value = {}, V.value = [];
|
|
2754
|
+
const W = v(K, e.initialActiveNodeKey) ?? v(K);
|
|
2746
2755
|
return l.value = W, s.value = {
|
|
2747
|
-
...
|
|
2756
|
+
...C,
|
|
2748
2757
|
treeNodes: K,
|
|
2749
2758
|
activeNode: W,
|
|
2750
2759
|
sectionMap: c.value,
|
|
2751
2760
|
sections: A.value
|
|
2752
2761
|
}, i.value;
|
|
2753
|
-
} catch (
|
|
2754
|
-
throw r.value =
|
|
2762
|
+
} catch (f) {
|
|
2763
|
+
throw r.value = f, f;
|
|
2755
2764
|
} finally {
|
|
2756
2765
|
t.value = !1;
|
|
2757
2766
|
}
|
|
2758
2767
|
}, P = async () => {
|
|
2759
|
-
const
|
|
2760
|
-
await
|
|
2761
|
-
const
|
|
2762
|
-
(
|
|
2768
|
+
const p = j();
|
|
2769
|
+
await _(a.value ?? l.value);
|
|
2770
|
+
const f = A.value.find(
|
|
2771
|
+
(C) => ke(C) === p
|
|
2763
2772
|
);
|
|
2764
|
-
return
|
|
2765
|
-
}, Z = (
|
|
2766
|
-
const
|
|
2767
|
-
return !!(
|
|
2768
|
-
}, ae = (
|
|
2769
|
-
const
|
|
2770
|
-
!
|
|
2771
|
-
}, pe = (
|
|
2772
|
-
const
|
|
2773
|
-
|
|
2774
|
-
(
|
|
2775
|
-
),
|
|
2776
|
-
}, de = (
|
|
2777
|
-
const K = typeof
|
|
2778
|
-
u(
|
|
2779
|
-
const me = (typeof
|
|
2773
|
+
return f && (a.value = f), O(), s.value;
|
|
2774
|
+
}, Z = (p = a.value) => {
|
|
2775
|
+
const f = D(p);
|
|
2776
|
+
return !!(f && V.value.includes(f));
|
|
2777
|
+
}, ae = (p = a.value) => {
|
|
2778
|
+
const f = D(p);
|
|
2779
|
+
!f || Z(f) || (V.value = [...V.value, f], N(f, { editing: !0 }));
|
|
2780
|
+
}, pe = (p = a.value) => {
|
|
2781
|
+
const f = D(p);
|
|
2782
|
+
f && (V.value = V.value.filter(
|
|
2783
|
+
(C) => C !== f
|
|
2784
|
+
), N(f, { editing: !1 }));
|
|
2785
|
+
}, de = (p, f, C) => {
|
|
2786
|
+
const K = typeof f == "string" ? f : Ve(f);
|
|
2787
|
+
u(p, (W) => {
|
|
2788
|
+
const me = (typeof f == "string" ? W.fields.find((he) => Ve(he) === K || he.code === K) : f)?.cascadeClearFields ?? [], se = {
|
|
2780
2789
|
...W.model,
|
|
2781
|
-
[K]:
|
|
2790
|
+
[K]: C
|
|
2782
2791
|
};
|
|
2783
|
-
return me.forEach((
|
|
2784
|
-
se[
|
|
2792
|
+
return me.forEach((he) => {
|
|
2793
|
+
se[he] = "";
|
|
2785
2794
|
}), {
|
|
2786
2795
|
// 保留 section 其它元数据。
|
|
2787
2796
|
...W,
|
|
@@ -2790,26 +2799,26 @@ const Gr = (e) => {
|
|
|
2790
2799
|
// 表单类型同步更新第一行 rows,方便保存时统一从 rows 构造 payload。
|
|
2791
2800
|
rows: W.renderType === "form" ? [{ ...W.rows[0], ...se }] : W.rows,
|
|
2792
2801
|
// 同步 fields.value,保证只读 renderer 立即显示新值。
|
|
2793
|
-
fields: W.fields.map((
|
|
2794
|
-
const Ae = Ve(
|
|
2795
|
-
return Ae === K ||
|
|
2802
|
+
fields: W.fields.map((he) => {
|
|
2803
|
+
const Ae = Ve(he);
|
|
2804
|
+
return Ae === K || he.code === K ? { ...he, value: C } : me.includes(Ae) || me.includes(he.code) ? { ...he, value: "" } : he;
|
|
2796
2805
|
})
|
|
2797
2806
|
};
|
|
2798
2807
|
});
|
|
2799
|
-
}, Se = async (
|
|
2800
|
-
const W =
|
|
2808
|
+
}, Se = async (p, f, C = {}, K = {}) => {
|
|
2809
|
+
const W = b(p);
|
|
2801
2810
|
if (!W)
|
|
2802
2811
|
return [];
|
|
2803
2812
|
const _e = {
|
|
2804
|
-
...
|
|
2813
|
+
...C,
|
|
2805
2814
|
...K.searchText !== void 0 ? { searchText: K.searchText } : {}
|
|
2806
2815
|
}, {
|
|
2807
2816
|
fieldKey: me,
|
|
2808
2817
|
currentField: se,
|
|
2809
|
-
sourceModel:
|
|
2818
|
+
sourceModel: he,
|
|
2810
2819
|
sourceRow: Ae,
|
|
2811
2820
|
missingDependField: dt
|
|
2812
|
-
} = Br(W,
|
|
2821
|
+
} = Br(W, f, _e), ft = se?.interface;
|
|
2813
2822
|
if (!se || !ft)
|
|
2814
2823
|
return se?.options ?? [];
|
|
2815
2824
|
if (Er(se))
|
|
@@ -2821,7 +2830,7 @@ const Gr = (e) => {
|
|
|
2821
2830
|
(Le) => Ve(Le) === me || Le.code === me ? { ...Le, options: [] } : Le
|
|
2822
2831
|
)
|
|
2823
2832
|
})), [];
|
|
2824
|
-
const
|
|
2833
|
+
const xn = await M(
|
|
2825
2834
|
{
|
|
2826
2835
|
...ft
|
|
2827
2836
|
},
|
|
@@ -2829,44 +2838,44 @@ const Gr = (e) => {
|
|
|
2829
2838
|
type: "fieldOptions",
|
|
2830
2839
|
requestSource: "inner",
|
|
2831
2840
|
tagId: W.requestTagId ?? W.tagId,
|
|
2832
|
-
node:
|
|
2841
|
+
node: x(W),
|
|
2833
2842
|
section: W,
|
|
2834
2843
|
field: se,
|
|
2835
2844
|
params: Te(ft.params),
|
|
2836
2845
|
// searchText 参与本次查询时,需要一并透传到 model 上,避免被依赖检查视为缺失并提前截断请求。
|
|
2837
|
-
model:
|
|
2846
|
+
model: he,
|
|
2838
2847
|
row: Ae,
|
|
2839
2848
|
searchText: K.searchText
|
|
2840
2849
|
}
|
|
2841
|
-
), kt = Vr(
|
|
2850
|
+
), kt = Vr(xn);
|
|
2842
2851
|
return u(W, (Ge) => ({
|
|
2843
2852
|
...Ge,
|
|
2844
2853
|
fields: Ge.fields.map(
|
|
2845
2854
|
(Le) => Ve(Le) === me || Le.code === me ? { ...Le, options: kt } : Le
|
|
2846
2855
|
)
|
|
2847
2856
|
})), kt;
|
|
2848
|
-
}, Oe = (
|
|
2849
|
-
if (Array.isArray(
|
|
2850
|
-
Ie(
|
|
2857
|
+
}, Oe = (p, f) => {
|
|
2858
|
+
if (Array.isArray(f)) {
|
|
2859
|
+
Ie(p, f);
|
|
2851
2860
|
return;
|
|
2852
2861
|
}
|
|
2853
|
-
u(
|
|
2854
|
-
...
|
|
2862
|
+
u(p, (C) => ({
|
|
2863
|
+
...C,
|
|
2855
2864
|
// 替换当前 model。
|
|
2856
|
-
model:
|
|
2865
|
+
model: f,
|
|
2857
2866
|
// 表单类型同步合并到第一行 rows。
|
|
2858
|
-
rows:
|
|
2867
|
+
rows: C.renderType === "form" ? [{ ...C.rows[0], ...f }] : C.rows,
|
|
2859
2868
|
// fields.value 也同步成 model 中的值。
|
|
2860
|
-
fields:
|
|
2869
|
+
fields: C.fields.map((K) => ({
|
|
2861
2870
|
...K,
|
|
2862
|
-
value:
|
|
2871
|
+
value: f[Ve(K)]
|
|
2863
2872
|
}))
|
|
2864
2873
|
}));
|
|
2865
|
-
}, Ie = (
|
|
2866
|
-
u(
|
|
2867
|
-
...
|
|
2868
|
-
rows:
|
|
2869
|
-
data:
|
|
2874
|
+
}, Ie = (p, f) => {
|
|
2875
|
+
u(p, (C) => ({
|
|
2876
|
+
...C,
|
|
2877
|
+
rows: f,
|
|
2878
|
+
data: f
|
|
2870
2879
|
}));
|
|
2871
2880
|
}, qe = {
|
|
2872
2881
|
// 加载模板树。
|
|
@@ -2874,17 +2883,17 @@ const Gr = (e) => {
|
|
|
2874
2883
|
// 选中树节点。
|
|
2875
2884
|
selectNode: G,
|
|
2876
2885
|
// 加载当前节点详情。
|
|
2877
|
-
loadDetail:
|
|
2886
|
+
loadDetail: B,
|
|
2878
2887
|
// 刷新当前详情。
|
|
2879
2888
|
reloadActiveSection: P,
|
|
2880
2889
|
// 加载指定节点或 section。
|
|
2881
|
-
loadSection:
|
|
2890
|
+
loadSection: y,
|
|
2882
2891
|
// 重新加载指定节点或 section。
|
|
2883
|
-
reloadSection:
|
|
2892
|
+
reloadSection: _,
|
|
2884
2893
|
// 获取指定节点或 section 的缓存数据。
|
|
2885
|
-
getSection:
|
|
2894
|
+
getSection: E,
|
|
2886
2895
|
// 获取指定节点或 section 的状态。
|
|
2887
|
-
getSectionStatus:
|
|
2896
|
+
getSectionStatus: z,
|
|
2888
2897
|
// 开启编辑。
|
|
2889
2898
|
startEdit: ae,
|
|
2890
2899
|
// 取消编辑。
|
|
@@ -2898,32 +2907,32 @@ const Gr = (e) => {
|
|
|
2898
2907
|
// 更新表格行。
|
|
2899
2908
|
updateTableRows: Ie,
|
|
2900
2909
|
// 保存单行到本地缓存。
|
|
2901
|
-
saveRow: (
|
|
2902
|
-
const W = [...
|
|
2903
|
-
W.splice(
|
|
2910
|
+
saveRow: (p, f = {}, C = -1) => {
|
|
2911
|
+
const W = [...b(p)?.rows ?? []];
|
|
2912
|
+
W.splice(C >= 0 ? C : W.length, C >= 0 ? 1 : 0, f), Ie(p, W);
|
|
2904
2913
|
},
|
|
2905
2914
|
// 删除单行本地缓存。
|
|
2906
|
-
deleteRow: (
|
|
2907
|
-
const
|
|
2915
|
+
deleteRow: (p, f) => {
|
|
2916
|
+
const C = b(p), K = typeof f == "string" ? Number(f) : f, W = (C?.rows ?? []).filter(
|
|
2908
2917
|
(_e, me) => me !== K
|
|
2909
2918
|
);
|
|
2910
|
-
Ie(
|
|
2919
|
+
Ie(p, W);
|
|
2911
2920
|
},
|
|
2912
2921
|
// 调用接口保存 section。
|
|
2913
|
-
saveSection: async (
|
|
2914
|
-
const
|
|
2915
|
-
if (!
|
|
2922
|
+
saveSection: async (p = a.value) => {
|
|
2923
|
+
const f = j(p), C = b(p);
|
|
2924
|
+
if (!C)
|
|
2916
2925
|
return null;
|
|
2917
|
-
const K = jr(
|
|
2926
|
+
const K = jr(C);
|
|
2918
2927
|
if (!K)
|
|
2919
2928
|
throw Ne("section.operationInfo.editInfoSet is required");
|
|
2920
|
-
o.value = !0, r.value = null,
|
|
2929
|
+
o.value = !0, r.value = null, f && f !== ke(C) && N(f, { saving: !0, error: null }), N(C, { saving: !0, error: null });
|
|
2921
2930
|
try {
|
|
2922
2931
|
const {
|
|
2923
2932
|
tagId: W,
|
|
2924
2933
|
..._e
|
|
2925
|
-
} =
|
|
2926
|
-
|
|
2934
|
+
} = R(l.value, C), me = vr(C, _e), se = xr(
|
|
2935
|
+
C,
|
|
2927
2936
|
me.infSetValues ?? [],
|
|
2928
2937
|
{
|
|
2929
2938
|
emptyMessage: e.renderConfig?.requiredInfoSetEmptyMessage
|
|
@@ -2931,24 +2940,24 @@ const Gr = (e) => {
|
|
|
2931
2940
|
);
|
|
2932
2941
|
if (se)
|
|
2933
2942
|
throw new Error(se);
|
|
2934
|
-
const
|
|
2943
|
+
const he = await h(
|
|
2935
2944
|
// 保存时保留后端给的 method/url,但不再把 editOperation.params 混入实际提交数据。
|
|
2936
2945
|
K,
|
|
2937
2946
|
{
|
|
2938
2947
|
type: "editInfoSet",
|
|
2939
2948
|
requestSource: "inner",
|
|
2940
|
-
tagId:
|
|
2949
|
+
tagId: C.requestTagId ?? C.tagId,
|
|
2941
2950
|
node: l.value,
|
|
2942
|
-
section:
|
|
2951
|
+
section: C,
|
|
2943
2952
|
params: me,
|
|
2944
|
-
model:
|
|
2953
|
+
model: C.model
|
|
2945
2954
|
}
|
|
2946
2955
|
);
|
|
2947
|
-
return pe(
|
|
2956
|
+
return pe(C), await _(C), he;
|
|
2948
2957
|
} catch (W) {
|
|
2949
|
-
throw r.value = W,
|
|
2958
|
+
throw r.value = W, f && f !== ke(C) && N(f, { saving: !1, error: W }), N(C, { saving: !1, error: W }), W;
|
|
2950
2959
|
} finally {
|
|
2951
|
-
o.value = !1,
|
|
2960
|
+
o.value = !1, f && f !== ke(C) && N(f, { saving: !1 }), N(C, { saving: !1 });
|
|
2952
2961
|
}
|
|
2953
2962
|
},
|
|
2954
2963
|
// 判断编辑态。
|
|
@@ -2972,13 +2981,13 @@ const Gr = (e) => {
|
|
|
2972
2981
|
// 当前 section 缓存。
|
|
2973
2982
|
sectionMap: c,
|
|
2974
2983
|
// 当前 section 状态缓存。
|
|
2975
|
-
sectionStatusMap:
|
|
2984
|
+
sectionStatusMap: I,
|
|
2976
2985
|
// 当前激活节点。
|
|
2977
2986
|
activeNode: l,
|
|
2978
2987
|
// 当前激活 section。
|
|
2979
2988
|
activeSection: a,
|
|
2980
2989
|
// 给页面消费的状态快照。
|
|
2981
|
-
state:
|
|
2990
|
+
state: d,
|
|
2982
2991
|
// 给页面消费的操作集合。
|
|
2983
2992
|
actions: qe
|
|
2984
2993
|
};
|
|
@@ -2996,7 +3005,7 @@ const Gr = (e) => {
|
|
|
2996
3005
|
},
|
|
2997
3006
|
setup(e) {
|
|
2998
3007
|
const t = e, n = Gr(t), { viewModel: o, nodes: r, sections: i, activeNode: s, activeSection: l, state: a, actions: c } = n;
|
|
2999
|
-
return (
|
|
3008
|
+
return (g, w) => ee(g.$slots, "default", Me(Fe({
|
|
3000
3009
|
viewModel: re(o),
|
|
3001
3010
|
nodes: re(r),
|
|
3002
3011
|
sections: re(i),
|
|
@@ -3042,110 +3051,110 @@ const Kr = ["disabled", "accept", "multiple"], Yr = {
|
|
|
3042
3051
|
},
|
|
3043
3052
|
emits: ["update:modelValue", "change", "loadOptions"],
|
|
3044
3053
|
setup(e, { emit: t }) {
|
|
3045
|
-
const n = e, o = t, r = ["textarea", "html", "code", "multi-row"], i =
|
|
3054
|
+
const n = e, o = t, r = ["textarea", "html", "code", "multi-row"], i = ve(null), s = L(() => Qe(n.field)), l = L(() => s.value === "select_remote"), a = L(() => n.disabled || n.field.disabled || n.field.readonly), c = L(() => !!n.field.props?.multiple), g = L(() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)), w = L(() => r.includes(s.value) ? n.field.props?.resize ?? "vertical" : void 0), I = L(() => {
|
|
3046
3055
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "") return;
|
|
3047
|
-
const
|
|
3048
|
-
return Number.isFinite(
|
|
3049
|
-
}),
|
|
3050
|
-
const
|
|
3051
|
-
return
|
|
3052
|
-
}),
|
|
3053
|
-
let
|
|
3054
|
-
function
|
|
3055
|
-
o("update:modelValue",
|
|
3056
|
+
const z = typeof n.modelValue == "number" ? n.modelValue : Number(n.modelValue);
|
|
3057
|
+
return Number.isFinite(z) ? z : void 0;
|
|
3058
|
+
}), V = L(() => nr(n.field, n.modelValue)), A = L(() => {
|
|
3059
|
+
const z = n.field.props?.activeValue ?? n.field.props?.["active-value"], N = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
3060
|
+
return z !== void 0 || N !== void 0 ? n.modelValue ?? N ?? !1 : fn(n.modelValue);
|
|
3061
|
+
}), d = L(() => s.value === "code" ? 5 : 1), S = L(() => s.value === "file" && !Ce(n.modelValue)), k = L(() => dn(n.field, n.modelValue, "请选择文件")), R = L(() => pn(n.field, n.modelValue, "请选择文件")), h = L(() => n.field.placeholder ? n.field.placeholder : s.value === "select_remote" ? "请输入关键词" : s.value === "select" ? "请选择" : s.value === "date" ? "请选择日期" : s.value === "file" ? "请选择文件" : "请输入");
|
|
3062
|
+
let m;
|
|
3063
|
+
function M(z) {
|
|
3064
|
+
o("update:modelValue", j(z));
|
|
3056
3065
|
}
|
|
3057
|
-
function
|
|
3058
|
-
o("change",
|
|
3066
|
+
function v(z) {
|
|
3067
|
+
o("change", j(z));
|
|
3059
3068
|
}
|
|
3060
|
-
function
|
|
3061
|
-
return s.value === "select" || s.value === "select_remote" ? or(n.field,
|
|
3069
|
+
function j(z) {
|
|
3070
|
+
return s.value === "select" || s.value === "select_remote" ? or(n.field, z) : z;
|
|
3062
3071
|
}
|
|
3063
|
-
function
|
|
3064
|
-
|
|
3072
|
+
function b(z) {
|
|
3073
|
+
z && o("loadOptions", l.value ? { searchText: "" } : void 0);
|
|
3065
3074
|
}
|
|
3066
|
-
function
|
|
3067
|
-
l.value && (
|
|
3068
|
-
o("loadOptions", { searchText:
|
|
3075
|
+
function D(z) {
|
|
3076
|
+
l.value && (m && clearTimeout(m), m = setTimeout(() => {
|
|
3077
|
+
o("loadOptions", { searchText: z });
|
|
3069
3078
|
}, 300));
|
|
3070
3079
|
}
|
|
3071
|
-
function
|
|
3080
|
+
function T() {
|
|
3072
3081
|
a.value || i.value?.click();
|
|
3073
3082
|
}
|
|
3074
|
-
function z
|
|
3075
|
-
Fn(
|
|
3083
|
+
function x(z) {
|
|
3084
|
+
Fn(z);
|
|
3076
3085
|
}
|
|
3077
3086
|
Un(() => {
|
|
3078
|
-
|
|
3087
|
+
m && clearTimeout(m);
|
|
3079
3088
|
});
|
|
3080
|
-
function ne(
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3089
|
+
function ne(z) {
|
|
3090
|
+
const N = z.target, O = Array.from(N.files ?? []), F = n.field.props?.multiple ? O : O[0] ?? null;
|
|
3091
|
+
M(F), v(F);
|
|
3083
3092
|
}
|
|
3084
|
-
return (
|
|
3085
|
-
const
|
|
3086
|
-
return s.value === "select" || s.value === "select_remote" ? (
|
|
3093
|
+
return (z, N) => {
|
|
3094
|
+
const O = Wt, F = Jt, u = Ut, y = Xn, _ = eo, E = Ht;
|
|
3095
|
+
return s.value === "select" || s.value === "select_remote" ? ($(), H(F, oe({
|
|
3087
3096
|
key: 0,
|
|
3088
3097
|
class: "global-info-field-control"
|
|
3089
|
-
},
|
|
3090
|
-
"model-value":
|
|
3091
|
-
placeholder:
|
|
3098
|
+
}, z.field.props, {
|
|
3099
|
+
"model-value": V.value,
|
|
3100
|
+
placeholder: h.value,
|
|
3092
3101
|
disabled: a.value,
|
|
3093
3102
|
"collapse-tags": c.value,
|
|
3094
3103
|
"collapse-tags-tooltip": c.value,
|
|
3095
3104
|
"max-collapse-tags": 1,
|
|
3096
|
-
filterable: l.value || !!
|
|
3097
|
-
remote: l.value || !!
|
|
3098
|
-
"remote-method": l.value ?
|
|
3105
|
+
filterable: l.value || !!z.field.props?.filterable,
|
|
3106
|
+
remote: l.value || !!z.field.props?.remote,
|
|
3107
|
+
"remote-method": l.value ? D : z.field.props?.remoteMethod,
|
|
3099
3108
|
clearable: "",
|
|
3100
|
-
onVisibleChange:
|
|
3101
|
-
"onUpdate:modelValue":
|
|
3102
|
-
onChange:
|
|
3109
|
+
onVisibleChange: b,
|
|
3110
|
+
"onUpdate:modelValue": M,
|
|
3111
|
+
onChange: v
|
|
3103
3112
|
}), {
|
|
3104
3113
|
default: J(() => [
|
|
3105
|
-
(
|
|
3106
|
-
key: String(
|
|
3107
|
-
label:
|
|
3108
|
-
value:
|
|
3114
|
+
($(!0), Y(be, null, ge(z.field.options || [], (B) => ($(), H(O, {
|
|
3115
|
+
key: String(B.value),
|
|
3116
|
+
label: B.label,
|
|
3117
|
+
value: B.value
|
|
3109
3118
|
}, null, 8, ["label", "value"]))), 128))
|
|
3110
3119
|
]),
|
|
3111
3120
|
_: 1
|
|
3112
|
-
}, 16, ["model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? (
|
|
3121
|
+
}, 16, ["model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : s.value === "date" ? ($(), H(u, oe({
|
|
3113
3122
|
key: 1,
|
|
3114
3123
|
class: "global-info-field-control"
|
|
3115
|
-
},
|
|
3116
|
-
"model-value":
|
|
3117
|
-
placeholder:
|
|
3124
|
+
}, z.field.props, {
|
|
3125
|
+
"model-value": z.modelValue,
|
|
3126
|
+
placeholder: h.value,
|
|
3118
3127
|
disabled: a.value,
|
|
3119
3128
|
type: "date",
|
|
3120
3129
|
"value-format": "YYYY-MM-DD",
|
|
3121
|
-
"onUpdate:modelValue":
|
|
3122
|
-
onChange:
|
|
3123
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? (
|
|
3130
|
+
"onUpdate:modelValue": M,
|
|
3131
|
+
onChange: v
|
|
3132
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "number" ? ($(), H(y, oe({
|
|
3124
3133
|
key: 2,
|
|
3125
3134
|
class: "global-info-field-control"
|
|
3126
|
-
},
|
|
3127
|
-
"model-value":
|
|
3128
|
-
placeholder:
|
|
3135
|
+
}, z.field.props, {
|
|
3136
|
+
"model-value": I.value,
|
|
3137
|
+
placeholder: h.value,
|
|
3129
3138
|
disabled: a.value,
|
|
3130
3139
|
"controls-position": "right",
|
|
3131
|
-
"onUpdate:modelValue":
|
|
3132
|
-
onChange:
|
|
3133
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? (
|
|
3140
|
+
"onUpdate:modelValue": M,
|
|
3141
|
+
onChange: v
|
|
3142
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : s.value === "switch" ? ($(), H(_, oe({
|
|
3134
3143
|
key: 3,
|
|
3135
3144
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3136
|
-
},
|
|
3145
|
+
}, z.field.props, {
|
|
3137
3146
|
"model-value": A.value,
|
|
3138
3147
|
disabled: a.value,
|
|
3139
|
-
"onUpdate:modelValue":
|
|
3140
|
-
onChange:
|
|
3141
|
-
}), null, 16, ["model-value", "disabled"])) : s.value === "file" ? (
|
|
3148
|
+
"onUpdate:modelValue": M,
|
|
3149
|
+
onChange: v
|
|
3150
|
+
}), null, 16, ["model-value", "disabled"])) : s.value === "file" ? ($(), Y("div", {
|
|
3142
3151
|
key: 4,
|
|
3143
3152
|
class: He(["global-info-field-control global-info-field-control--file", {
|
|
3144
3153
|
"is-disabled": a.value,
|
|
3145
|
-
"is-empty": !
|
|
3146
|
-
"is-filled":
|
|
3154
|
+
"is-empty": !S.value,
|
|
3155
|
+
"is-filled": S.value
|
|
3147
3156
|
}]),
|
|
3148
|
-
onClick:
|
|
3157
|
+
onClick: T
|
|
3149
3158
|
}, [
|
|
3150
3159
|
te("input", {
|
|
3151
3160
|
ref_key: "fileInputRef",
|
|
@@ -3153,48 +3162,48 @@ const Kr = ["disabled", "accept", "multiple"], Yr = {
|
|
|
3153
3162
|
class: "global-info-field-control__file-input",
|
|
3154
3163
|
type: "file",
|
|
3155
3164
|
disabled: a.value,
|
|
3156
|
-
accept: String(
|
|
3157
|
-
multiple: !!
|
|
3165
|
+
accept: String(z.field.props?.accept ?? ""),
|
|
3166
|
+
multiple: !!z.field.props?.multiple,
|
|
3158
3167
|
onChange: ne
|
|
3159
3168
|
}, null, 40, Kr),
|
|
3160
|
-
|
|
3161
|
-
(
|
|
3162
|
-
key:
|
|
3169
|
+
R.value.length ? ($(), Y("span", Yr, [
|
|
3170
|
+
($(!0), Y(be, null, ge(R.value, (B, q) => ($(), Y(be, {
|
|
3171
|
+
key: B.key
|
|
3163
3172
|
}, [
|
|
3164
|
-
|
|
3173
|
+
B.action ? ($(), Y("button", {
|
|
3165
3174
|
key: 0,
|
|
3166
3175
|
class: "global-info-field-control__file-preview",
|
|
3167
3176
|
type: "button",
|
|
3168
|
-
onClick: Gt((U) =>
|
|
3169
|
-
}, fe(
|
|
3170
|
-
q <
|
|
3177
|
+
onClick: Gt((U) => x(B), ["stop", "prevent"])
|
|
3178
|
+
}, fe(B.text), 9, Ur)) : ($(), Y("span", Hr, fe(B.text), 1)),
|
|
3179
|
+
q < R.value.length - 1 ? ($(), Y("span", Jr, "、")) : ue("", !0)
|
|
3171
3180
|
], 64))), 128))
|
|
3172
|
-
])) :
|
|
3173
|
-
], 2)) : s.value === "empty" ? (
|
|
3181
|
+
])) : S.value ? ($(), Y("span", Wr, fe(k.value), 1)) : ($(), Y("span", Zr, "上 传"))
|
|
3182
|
+
], 2)) : s.value === "empty" ? ($(), H(E, {
|
|
3174
3183
|
key: 5,
|
|
3175
3184
|
class: "global-info-field-control",
|
|
3176
3185
|
"model-value": "",
|
|
3177
3186
|
disabled: "",
|
|
3178
3187
|
placeholder: "-"
|
|
3179
|
-
})) : (
|
|
3188
|
+
})) : ($(), H(E, oe({
|
|
3180
3189
|
key: 6,
|
|
3181
3190
|
class: ["global-info-field-control", {
|
|
3182
3191
|
"global-info-field-control--textarea": r.includes(s.value),
|
|
3183
3192
|
"global-info-field-control--code": s.value === "code"
|
|
3184
3193
|
}]
|
|
3185
|
-
},
|
|
3186
|
-
"model-value":
|
|
3187
|
-
placeholder:
|
|
3194
|
+
}, z.field.props, {
|
|
3195
|
+
"model-value": g.value,
|
|
3196
|
+
placeholder: h.value,
|
|
3188
3197
|
disabled: a.value,
|
|
3189
3198
|
type: r.includes(s.value) ? "textarea" : "text",
|
|
3190
|
-
rows: r.includes(s.value) ?
|
|
3191
|
-
resize:
|
|
3192
|
-
"onUpdate:modelValue":
|
|
3193
|
-
onChange:
|
|
3199
|
+
rows: r.includes(s.value) ? d.value : void 0,
|
|
3200
|
+
resize: w.value,
|
|
3201
|
+
"onUpdate:modelValue": M,
|
|
3202
|
+
onChange: v
|
|
3194
3203
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
3195
3204
|
};
|
|
3196
3205
|
}
|
|
3197
|
-
}), Bn = /* @__PURE__ */ ye(Qr, [["__scopeId", "data-v-
|
|
3206
|
+
}), Bn = /* @__PURE__ */ ye(Qr, [["__scopeId", "data-v-ba6b38f5"]]), Xr = ["innerHTML"], ea = {
|
|
3198
3207
|
key: 1,
|
|
3199
3208
|
class: "global-info-field-value global-info-field-value--code"
|
|
3200
3209
|
}, ta = {
|
|
@@ -3209,27 +3218,27 @@ const Kr = ["disabled", "accept", "multiple"], Yr = {
|
|
|
3209
3218
|
emptyText: { default: "-" }
|
|
3210
3219
|
},
|
|
3211
3220
|
setup(e) {
|
|
3212
|
-
const t = e, n =
|
|
3221
|
+
const t = e, n = L(() => $t(t.field)), o = L(() => n.value === "empty" || Ce(t.value)), r = L(() => dn(t.field, t.value, t.emptyText)), i = L(() => pn(t.field, t.value, t.emptyText));
|
|
3213
3222
|
function s(l) {
|
|
3214
3223
|
Fn(l);
|
|
3215
3224
|
}
|
|
3216
|
-
return (l, a) => n.value === "html" && !o.value ? (
|
|
3225
|
+
return (l, a) => n.value === "html" && !o.value ? ($(), Y("span", {
|
|
3217
3226
|
key: 0,
|
|
3218
3227
|
class: "global-info-field-value global-info-field-value--html",
|
|
3219
3228
|
innerHTML: r.value
|
|
3220
|
-
}, null, 8, Xr)) : n.value === "code" && !o.value ? (
|
|
3221
|
-
(
|
|
3229
|
+
}, null, 8, Xr)) : n.value === "code" && !o.value ? ($(), Y("pre", ea, fe(r.value), 1)) : i.value.length ? ($(), Y("span", ta, [
|
|
3230
|
+
($(!0), Y(be, null, ge(i.value, (c, g) => ($(), Y(be, {
|
|
3222
3231
|
key: c.key
|
|
3223
3232
|
}, [
|
|
3224
|
-
c.action ? (
|
|
3233
|
+
c.action ? ($(), Y("button", {
|
|
3225
3234
|
key: 0,
|
|
3226
3235
|
class: "global-info-field-value__attachment-preview",
|
|
3227
3236
|
type: "button",
|
|
3228
|
-
onClick: (
|
|
3229
|
-
}, fe(c.text), 9, na)) : (
|
|
3230
|
-
|
|
3237
|
+
onClick: (w) => s(c)
|
|
3238
|
+
}, fe(c.text), 9, na)) : ($(), Y("span", oa, fe(c.text), 1)),
|
|
3239
|
+
g < i.value.length - 1 ? ($(), Y("span", ra, "、")) : ue("", !0)
|
|
3231
3240
|
], 64))), 128))
|
|
3232
|
-
])) : (
|
|
3241
|
+
])) : ($(), Y("span", {
|
|
3233
3242
|
key: 3,
|
|
3234
3243
|
class: He(["global-info-field-value", {
|
|
3235
3244
|
"global-info-field-value--multi-row": n.value === "multi-row",
|
|
@@ -3237,7 +3246,7 @@ const Kr = ["disabled", "accept", "multiple"], Yr = {
|
|
|
3237
3246
|
}])
|
|
3238
3247
|
}, fe(r.value), 3));
|
|
3239
3248
|
}
|
|
3240
|
-
}), En = /* @__PURE__ */ ye(aa, [["__scopeId", "data-v-
|
|
3249
|
+
}), En = /* @__PURE__ */ ye(aa, [["__scopeId", "data-v-efe9888d"]]);
|
|
3241
3250
|
function sa(e) {
|
|
3242
3251
|
const t = Qe(e);
|
|
3243
3252
|
return (t === "select" || t === "select_remote") && !!e.interface;
|
|
@@ -3284,87 +3293,87 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3284
3293
|
renderConfig: {}
|
|
3285
3294
|
},
|
|
3286
3295
|
setup(e) {
|
|
3287
|
-
const t = e, n = Ee(), o =
|
|
3296
|
+
const t = e, n = Ee(), o = L(() => t.model ?? t.section.model), r = /* @__PURE__ */ new Map(), i = L(() => lt(
|
|
3288
3297
|
t.section.fields,
|
|
3289
3298
|
t.section,
|
|
3290
3299
|
t.renderConfig,
|
|
3291
3300
|
{ values: o.value }
|
|
3292
3301
|
)), s = rn(
|
|
3293
|
-
async (
|
|
3294
|
-
(
|
|
3302
|
+
async (m, M, v) => t.actions.loadFieldOptions(t.section, m, M, v),
|
|
3303
|
+
(m) => `${t.section.key}:${k(m)}`
|
|
3295
3304
|
);
|
|
3296
|
-
function l(
|
|
3297
|
-
const
|
|
3298
|
-
(
|
|
3299
|
-
|
|
3300
|
-
}), t.onUpdateModel?.(
|
|
3305
|
+
function l(m, M) {
|
|
3306
|
+
const v = { ...o.value, [m.code]: M };
|
|
3307
|
+
(m.cascadeClearFields ?? []).forEach((j) => {
|
|
3308
|
+
v[j] = "";
|
|
3309
|
+
}), t.onUpdateModel?.(v), t.onUpdateModel || t.actions.updateField(t.section, m, M), a(m, M, v), V(v, m);
|
|
3301
3310
|
}
|
|
3302
|
-
function a(
|
|
3303
|
-
const
|
|
3304
|
-
if (
|
|
3311
|
+
function a(m, M, v) {
|
|
3312
|
+
const j = t.renderConfig?.onFieldBusinessChange;
|
|
3313
|
+
if (j)
|
|
3305
3314
|
try {
|
|
3306
|
-
const
|
|
3307
|
-
field:
|
|
3308
|
-
value:
|
|
3315
|
+
const b = c(m, M), D = {
|
|
3316
|
+
field: m,
|
|
3317
|
+
value: M,
|
|
3309
3318
|
section: t.section,
|
|
3310
|
-
model:
|
|
3311
|
-
values:
|
|
3319
|
+
model: v,
|
|
3320
|
+
values: v,
|
|
3312
3321
|
node: t.node,
|
|
3313
3322
|
activeNode: t.node,
|
|
3314
|
-
sections:
|
|
3315
|
-
sectionValues:
|
|
3323
|
+
sections: g(),
|
|
3324
|
+
sectionValues: w(t.section, v),
|
|
3316
3325
|
actions: t.actions,
|
|
3317
|
-
selectedOption:
|
|
3318
|
-
selectedOptions:
|
|
3326
|
+
selectedOption: b[0],
|
|
3327
|
+
selectedOptions: b
|
|
3319
3328
|
};
|
|
3320
|
-
Promise.resolve(
|
|
3321
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3329
|
+
Promise.resolve(j(D)).catch((T) => {
|
|
3330
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", T);
|
|
3322
3331
|
});
|
|
3323
|
-
} catch (
|
|
3324
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3332
|
+
} catch (b) {
|
|
3333
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", b);
|
|
3325
3334
|
}
|
|
3326
3335
|
}
|
|
3327
|
-
function c(
|
|
3328
|
-
const
|
|
3329
|
-
return (
|
|
3336
|
+
function c(m, M) {
|
|
3337
|
+
const v = it(m, M);
|
|
3338
|
+
return (m.options ?? []).filter((j) => v.some((b) => j.value === b || String(j.value) === String(b)));
|
|
3330
3339
|
}
|
|
3331
|
-
function
|
|
3340
|
+
function g() {
|
|
3332
3341
|
return Object.values(t.state.sectionMap);
|
|
3333
3342
|
}
|
|
3334
|
-
function
|
|
3335
|
-
const
|
|
3336
|
-
const
|
|
3337
|
-
return [
|
|
3343
|
+
function w(m, M) {
|
|
3344
|
+
const j = g().flatMap((b) => {
|
|
3345
|
+
const D = b.key === m.key ? M : b.renderType === "table" ? b.rows : b.model;
|
|
3346
|
+
return [b.key, b.id, b.setId, b.infSetId, b.code].filter(Boolean).map((T) => [String(T), D]);
|
|
3338
3347
|
});
|
|
3339
|
-
return Object.fromEntries(
|
|
3348
|
+
return Object.fromEntries(j);
|
|
3340
3349
|
}
|
|
3341
|
-
async function
|
|
3342
|
-
const
|
|
3343
|
-
if (!Ln(
|
|
3344
|
-
r.set(
|
|
3350
|
+
async function I(m, M = {}, v = o.value) {
|
|
3351
|
+
const j = v, b = k(m), D = ot(t.section.key, m, j), T = r.get(b);
|
|
3352
|
+
if (!Ln(M) && rt(m, T, D)) {
|
|
3353
|
+
r.set(b, D);
|
|
3345
3354
|
return;
|
|
3346
3355
|
}
|
|
3347
3356
|
try {
|
|
3348
|
-
if (
|
|
3349
|
-
await s(
|
|
3357
|
+
if (M.searchText !== void 0) {
|
|
3358
|
+
await s(m, j, M);
|
|
3350
3359
|
return;
|
|
3351
3360
|
}
|
|
3352
|
-
await t.actions.loadFieldOptions(t.section,
|
|
3361
|
+
await t.actions.loadFieldOptions(t.section, m, j, M), r.set(b, D);
|
|
3353
3362
|
} catch (ne) {
|
|
3354
3363
|
console.error("[GlobalInfoFormRenderer] load field options failed", ne);
|
|
3355
3364
|
}
|
|
3356
3365
|
}
|
|
3357
|
-
async function
|
|
3358
|
-
for (const
|
|
3359
|
-
if (
|
|
3360
|
-
const
|
|
3361
|
-
if (!
|
|
3362
|
-
const
|
|
3363
|
-
if (rt(
|
|
3364
|
-
r.set(
|
|
3366
|
+
async function V(m = o.value, M) {
|
|
3367
|
+
for (const v of i.value) {
|
|
3368
|
+
if (M && !Vn(v, M)) continue;
|
|
3369
|
+
const j = m[v.code];
|
|
3370
|
+
if (!R(v, j)) continue;
|
|
3371
|
+
const b = ot(t.section.key, v, m), D = k(v), T = r.get(D);
|
|
3372
|
+
if (rt(v, T, b)) {
|
|
3373
|
+
r.set(D, b);
|
|
3365
3374
|
continue;
|
|
3366
3375
|
}
|
|
3367
|
-
|
|
3376
|
+
T !== b && await I(v, An(v, j), m);
|
|
3368
3377
|
}
|
|
3369
3378
|
}
|
|
3370
3379
|
Be(
|
|
@@ -3375,84 +3384,84 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3375
3384
|
), Be(
|
|
3376
3385
|
() => t.editing,
|
|
3377
3386
|
() => {
|
|
3378
|
-
|
|
3387
|
+
V();
|
|
3379
3388
|
},
|
|
3380
3389
|
{ immediate: !0 }
|
|
3381
3390
|
);
|
|
3382
|
-
function A(
|
|
3383
|
-
const
|
|
3391
|
+
function A(m) {
|
|
3392
|
+
const M = o.value[m.code];
|
|
3384
3393
|
return {
|
|
3385
|
-
field:
|
|
3394
|
+
field: m,
|
|
3386
3395
|
section: t.section,
|
|
3387
3396
|
sectionView: t.section,
|
|
3388
3397
|
node: t.node,
|
|
3389
3398
|
editing: t.editing,
|
|
3390
|
-
modelValue:
|
|
3391
|
-
value:
|
|
3399
|
+
modelValue: M,
|
|
3400
|
+
value: M,
|
|
3392
3401
|
state: t.state,
|
|
3393
3402
|
actions: t.actions,
|
|
3394
|
-
updateModelValue: (
|
|
3403
|
+
updateModelValue: (v) => l(m, v)
|
|
3395
3404
|
};
|
|
3396
3405
|
}
|
|
3397
|
-
function
|
|
3398
|
-
const
|
|
3399
|
-
if (
|
|
3400
|
-
const
|
|
3401
|
-
return
|
|
3406
|
+
function d(m) {
|
|
3407
|
+
const M = String(m.code || "").trim(), v = M ? `field-${M}` : "";
|
|
3408
|
+
if (v && n[v]) return v;
|
|
3409
|
+
const j = v.toLowerCase();
|
|
3410
|
+
return j !== v && n[j] ? j : "";
|
|
3402
3411
|
}
|
|
3403
|
-
function
|
|
3404
|
-
return
|
|
3412
|
+
function S(m) {
|
|
3413
|
+
return m.span ? Math.min(Math.max(m.span, 1), 24) : 6;
|
|
3405
3414
|
}
|
|
3406
|
-
function
|
|
3407
|
-
return
|
|
3415
|
+
function k(m) {
|
|
3416
|
+
return m.key || m.id || m.code;
|
|
3408
3417
|
}
|
|
3409
|
-
function
|
|
3410
|
-
return Pn(
|
|
3418
|
+
function R(m, M) {
|
|
3419
|
+
return Pn(m, M, t.editing);
|
|
3411
3420
|
}
|
|
3412
|
-
function
|
|
3413
|
-
return
|
|
3421
|
+
function h(m) {
|
|
3422
|
+
return m.required || m.isRequired;
|
|
3414
3423
|
}
|
|
3415
|
-
return (
|
|
3416
|
-
const
|
|
3417
|
-
return
|
|
3424
|
+
return (m, M) => {
|
|
3425
|
+
const v = Zt, j = no, b = to, D = Qt;
|
|
3426
|
+
return $(), H(D, {
|
|
3418
3427
|
class: "global-info-form-renderer",
|
|
3419
3428
|
model: o.value,
|
|
3420
3429
|
"label-position": "top"
|
|
3421
3430
|
}, {
|
|
3422
3431
|
default: J(() => [
|
|
3423
|
-
we(
|
|
3432
|
+
we(b, { gutter: 24 }, {
|
|
3424
3433
|
default: J(() => [
|
|
3425
|
-
(
|
|
3426
|
-
key:
|
|
3427
|
-
span:
|
|
3434
|
+
($(!0), Y(be, null, ge(i.value, (T) => ($(), H(j, {
|
|
3435
|
+
key: k(T),
|
|
3436
|
+
span: S(T)
|
|
3428
3437
|
}, {
|
|
3429
3438
|
default: J(() => [
|
|
3430
|
-
we(
|
|
3431
|
-
prop:
|
|
3439
|
+
we(v, oe({
|
|
3440
|
+
prop: T.code,
|
|
3432
3441
|
ref_for: !0
|
|
3433
|
-
},
|
|
3442
|
+
}, T.formItemProps), {
|
|
3434
3443
|
label: J(() => [
|
|
3435
3444
|
te("span", ia, [
|
|
3436
|
-
|
|
3437
|
-
Ye(" " + fe(
|
|
3445
|
+
h(T) ? ($(), Y("span", la, "*")) : ue("", !0),
|
|
3446
|
+
Ye(" " + fe(T.label), 1)
|
|
3438
3447
|
])
|
|
3439
3448
|
]),
|
|
3440
3449
|
default: J(() => [
|
|
3441
|
-
|
|
3450
|
+
d(T) ? ee(m.$slots, d(T), oe({
|
|
3442
3451
|
key: 0,
|
|
3443
3452
|
ref_for: !0
|
|
3444
|
-
}, A(
|
|
3453
|
+
}, A(T)), void 0, !0) : m.editing && !T.readonly ? ($(), H(Bn, {
|
|
3445
3454
|
key: 1,
|
|
3446
|
-
field:
|
|
3447
|
-
"model-value": o.value[
|
|
3448
|
-
section:
|
|
3449
|
-
onLoadOptions: (
|
|
3450
|
-
"onUpdate:modelValue": (
|
|
3451
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
3455
|
+
field: T,
|
|
3456
|
+
"model-value": o.value[T.code],
|
|
3457
|
+
section: m.section,
|
|
3458
|
+
onLoadOptions: (x) => I(T, x),
|
|
3459
|
+
"onUpdate:modelValue": (x) => l(T, x)
|
|
3460
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : ($(), H(En, {
|
|
3452
3461
|
key: 2,
|
|
3453
|
-
field:
|
|
3454
|
-
value: o.value[
|
|
3455
|
-
section:
|
|
3462
|
+
field: T,
|
|
3463
|
+
value: o.value[T.code],
|
|
3464
|
+
section: m.section
|
|
3456
3465
|
}, null, 8, ["field", "value", "section"]))
|
|
3457
3466
|
]),
|
|
3458
3467
|
_: 2
|
|
@@ -3468,7 +3477,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3468
3477
|
}, 8, ["model"]);
|
|
3469
3478
|
};
|
|
3470
3479
|
}
|
|
3471
|
-
}), ua = /* @__PURE__ */ ye(ca, [["__scopeId", "data-v-
|
|
3480
|
+
}), ua = /* @__PURE__ */ ye(ca, [["__scopeId", "data-v-c4e2b568"]]), da = /* @__PURE__ */ ce({
|
|
3472
3481
|
name: "GlobalInfoDeleteConfirm",
|
|
3473
3482
|
__name: "GlobalInfoDeleteConfirm",
|
|
3474
3483
|
props: {
|
|
@@ -3480,7 +3489,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3480
3489
|
setup(e) {
|
|
3481
3490
|
return (t, n) => {
|
|
3482
3491
|
const o = oo;
|
|
3483
|
-
return
|
|
3492
|
+
return $(), H(o, {
|
|
3484
3493
|
title: t.title,
|
|
3485
3494
|
"confirm-button-text": t.confirmText,
|
|
3486
3495
|
"cancel-button-text": t.cancelText,
|
|
@@ -3499,7 +3508,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3499
3508
|
}), fa = { class: "global-info-table-renderer__table-scroll" }, pa = { class: "global-info-table-renderer__header" }, ma = {
|
|
3500
3509
|
key: 0,
|
|
3501
3510
|
class: "global-info-table-renderer__required"
|
|
3502
|
-
},
|
|
3511
|
+
}, ha = /* @__PURE__ */ ce({
|
|
3503
3512
|
name: "GlobalInfoTableRenderer",
|
|
3504
3513
|
__name: "GlobalInfoTableRenderer",
|
|
3505
3514
|
props: {
|
|
@@ -3513,64 +3522,64 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3513
3522
|
renderConfig: {}
|
|
3514
3523
|
},
|
|
3515
3524
|
setup(e) {
|
|
3516
|
-
const t = e, n = Ee(), o =
|
|
3525
|
+
const t = e, n = Ee(), o = L(() => t.section.fields.some((u) => Et(u))), r = L(() => o.value), i = L(() => t.renderConfig?.sequenceLabel ?? "序号"), s = L(() => t.renderConfig?.sequenceWidth ?? 56), l = L(() => {
|
|
3517
3526
|
const u = t.renderConfig?.sequenceStart;
|
|
3518
3527
|
return typeof u == "number" && Number.isFinite(u) ? u : 1;
|
|
3519
|
-
}), a =
|
|
3528
|
+
}), a = L(() => {
|
|
3520
3529
|
const u = lt(
|
|
3521
3530
|
t.section.fields,
|
|
3522
3531
|
t.section,
|
|
3523
3532
|
t.renderConfig,
|
|
3524
3533
|
{ rows: t.section.rows, values: t.section.model }
|
|
3525
3534
|
);
|
|
3526
|
-
return r.value ? u.filter((
|
|
3527
|
-
}), c = /* @__PURE__ */ new Map(),
|
|
3528
|
-
async (u,
|
|
3529
|
-
(u,
|
|
3535
|
+
return r.value ? u.filter((y) => !ne(y)) : u;
|
|
3536
|
+
}), c = /* @__PURE__ */ new Map(), g = rn(
|
|
3537
|
+
async (u, y, _) => t.actions.loadFieldOptions(t.section, u, y, _),
|
|
3538
|
+
(u, y) => `${t.section.key}:${O(y)}:${T(u)}`
|
|
3530
3539
|
);
|
|
3531
|
-
function
|
|
3540
|
+
function w(u) {
|
|
3532
3541
|
t.actions.deleteRow(t.section, u);
|
|
3533
3542
|
}
|
|
3534
|
-
function
|
|
3535
|
-
const
|
|
3536
|
-
return t.showDelete && (typeof
|
|
3543
|
+
function I(u, y) {
|
|
3544
|
+
const _ = t.renderConfig?.rowDeleteVisibleRule;
|
|
3545
|
+
return t.showDelete && (typeof _ == "function" ? _({
|
|
3537
3546
|
section: t.section,
|
|
3538
3547
|
row: u,
|
|
3539
|
-
rowIndex:
|
|
3548
|
+
rowIndex: y,
|
|
3540
3549
|
node: t.node,
|
|
3541
3550
|
state: t.state,
|
|
3542
3551
|
actions: t.actions
|
|
3543
3552
|
}) : u.allowDelete !== !1);
|
|
3544
3553
|
}
|
|
3545
|
-
function
|
|
3546
|
-
const
|
|
3554
|
+
function V(u, y, _, E) {
|
|
3555
|
+
const B = t.section.rows.slice(), q = _.cascadeClearFields ?? [], U = {
|
|
3547
3556
|
...u,
|
|
3548
|
-
__rowKey:
|
|
3549
|
-
[
|
|
3557
|
+
__rowKey: O(u),
|
|
3558
|
+
[_.code]: E
|
|
3550
3559
|
};
|
|
3551
3560
|
q.forEach((G) => {
|
|
3552
3561
|
U[G] = "";
|
|
3553
|
-
}),
|
|
3562
|
+
}), B[y] = {
|
|
3554
3563
|
...U
|
|
3555
|
-
}, t.actions.updateTableRows(t.section,
|
|
3564
|
+
}, t.actions.updateTableRows(t.section, B), A(_, E, U, y, B), h(_, U);
|
|
3556
3565
|
}
|
|
3557
|
-
function A(u,
|
|
3566
|
+
function A(u, y, _, E, B) {
|
|
3558
3567
|
const q = t.renderConfig?.onFieldBusinessChange;
|
|
3559
3568
|
if (q)
|
|
3560
3569
|
try {
|
|
3561
|
-
const U =
|
|
3570
|
+
const U = d(u, y), G = { ...t.section.model, ..._ }, X = {
|
|
3562
3571
|
field: u,
|
|
3563
|
-
value:
|
|
3572
|
+
value: y,
|
|
3564
3573
|
section: t.section,
|
|
3565
3574
|
model: G,
|
|
3566
3575
|
values: G,
|
|
3567
|
-
row:
|
|
3568
|
-
rowIndex:
|
|
3569
|
-
rows:
|
|
3576
|
+
row: _,
|
|
3577
|
+
rowIndex: E,
|
|
3578
|
+
rows: B,
|
|
3570
3579
|
node: t.node,
|
|
3571
3580
|
activeNode: t.node,
|
|
3572
|
-
sections:
|
|
3573
|
-
sectionValues:
|
|
3581
|
+
sections: S(),
|
|
3582
|
+
sectionValues: k(t.section, B),
|
|
3574
3583
|
actions: t.actions,
|
|
3575
3584
|
selectedOption: U[0],
|
|
3576
3585
|
selectedOptions: U
|
|
@@ -3582,110 +3591,110 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3582
3591
|
console.error("[GlobalInfoTableRenderer] field business change failed", U);
|
|
3583
3592
|
}
|
|
3584
3593
|
}
|
|
3585
|
-
function
|
|
3586
|
-
const
|
|
3587
|
-
return (u.options ?? []).filter((
|
|
3594
|
+
function d(u, y) {
|
|
3595
|
+
const _ = it(u, y);
|
|
3596
|
+
return (u.options ?? []).filter((E) => _.some((B) => E.value === B || String(E.value) === String(B)));
|
|
3588
3597
|
}
|
|
3589
|
-
function
|
|
3598
|
+
function S() {
|
|
3590
3599
|
return Object.values(t.state.sectionMap);
|
|
3591
3600
|
}
|
|
3592
|
-
function
|
|
3593
|
-
const
|
|
3594
|
-
const q =
|
|
3595
|
-
return [
|
|
3601
|
+
function k(u, y) {
|
|
3602
|
+
const E = S().flatMap((B) => {
|
|
3603
|
+
const q = B.key === u.key ? y : B.renderType === "table" ? B.rows : B.model;
|
|
3604
|
+
return [B.key, B.id, B.setId, B.infSetId, B.code].filter(Boolean).map((U) => [String(U), q]);
|
|
3596
3605
|
});
|
|
3597
|
-
return Object.fromEntries(
|
|
3606
|
+
return Object.fromEntries(E);
|
|
3598
3607
|
}
|
|
3599
|
-
async function
|
|
3600
|
-
const
|
|
3601
|
-
if (!Ln(
|
|
3608
|
+
async function R(u, y, _ = {}, E = y) {
|
|
3609
|
+
const B = O(E), q = `${B}:${T(u)}`, U = ot(t.section.key, u, E, B), G = c.get(q);
|
|
3610
|
+
if (!Ln(_) && rt(u, G, U)) {
|
|
3602
3611
|
c.set(q, U);
|
|
3603
3612
|
return;
|
|
3604
3613
|
}
|
|
3605
3614
|
try {
|
|
3606
|
-
if (
|
|
3607
|
-
await
|
|
3615
|
+
if (_.searchText !== void 0) {
|
|
3616
|
+
await g(u, E, _);
|
|
3608
3617
|
return;
|
|
3609
3618
|
}
|
|
3610
|
-
await t.actions.loadFieldOptions(t.section, u,
|
|
3619
|
+
await t.actions.loadFieldOptions(t.section, u, E, _), c.set(q, U);
|
|
3611
3620
|
} catch (P) {
|
|
3612
3621
|
console.error("[GlobalInfoTableRenderer] load field options failed", P);
|
|
3613
3622
|
}
|
|
3614
3623
|
}
|
|
3615
|
-
async function
|
|
3616
|
-
const
|
|
3617
|
-
for (const
|
|
3618
|
-
const
|
|
3624
|
+
async function h(u, y) {
|
|
3625
|
+
const _ = y ? [y] : t.section.rows;
|
|
3626
|
+
for (const E of _) {
|
|
3627
|
+
const B = O(E);
|
|
3619
3628
|
for (const q of a.value) {
|
|
3620
3629
|
if (u && !Vn(q, u)) continue;
|
|
3621
|
-
const U =
|
|
3622
|
-
if (!
|
|
3623
|
-
const G = ot(t.section.key, q,
|
|
3630
|
+
const U = E[q.code];
|
|
3631
|
+
if (!j(q, U)) continue;
|
|
3632
|
+
const G = ot(t.section.key, q, E, B), X = `${B}:${T(q)}`, P = c.get(X);
|
|
3624
3633
|
if (rt(q, P, G)) {
|
|
3625
3634
|
c.set(X, G);
|
|
3626
3635
|
continue;
|
|
3627
3636
|
}
|
|
3628
|
-
P !== G && await
|
|
3637
|
+
P !== G && await R(q, E, An(q, U));
|
|
3629
3638
|
}
|
|
3630
3639
|
}
|
|
3631
3640
|
}
|
|
3632
|
-
function
|
|
3633
|
-
const
|
|
3641
|
+
function m(u, y, _) {
|
|
3642
|
+
const E = y[u.code];
|
|
3634
3643
|
return {
|
|
3635
3644
|
field: u,
|
|
3636
3645
|
section: t.section,
|
|
3637
3646
|
sectionView: t.section,
|
|
3638
3647
|
node: t.node,
|
|
3639
|
-
row:
|
|
3640
|
-
rowIndex:
|
|
3648
|
+
row: y,
|
|
3649
|
+
rowIndex: _,
|
|
3641
3650
|
editing: t.editing,
|
|
3642
|
-
modelValue:
|
|
3643
|
-
value:
|
|
3651
|
+
modelValue: E,
|
|
3652
|
+
value: E,
|
|
3644
3653
|
state: t.state,
|
|
3645
3654
|
actions: t.actions,
|
|
3646
|
-
updateModelValue: (
|
|
3655
|
+
updateModelValue: (B) => V(y, _, u, B)
|
|
3647
3656
|
};
|
|
3648
3657
|
}
|
|
3649
|
-
function
|
|
3650
|
-
const
|
|
3651
|
-
if (
|
|
3652
|
-
const
|
|
3653
|
-
return
|
|
3658
|
+
function M(u) {
|
|
3659
|
+
const y = String(u.code || "").trim(), _ = y ? `field-${y}` : "";
|
|
3660
|
+
if (_ && n[_]) return _;
|
|
3661
|
+
const E = _.toLowerCase();
|
|
3662
|
+
return E !== _ && n[E] ? E : "";
|
|
3654
3663
|
}
|
|
3655
|
-
function
|
|
3664
|
+
function v(u) {
|
|
3656
3665
|
return !u.readonly && !u.disabled;
|
|
3657
3666
|
}
|
|
3658
|
-
function
|
|
3659
|
-
return Pn(u,
|
|
3667
|
+
function j(u, y) {
|
|
3668
|
+
return Pn(u, y, t.editing);
|
|
3660
3669
|
}
|
|
3661
|
-
function
|
|
3670
|
+
function b(u) {
|
|
3662
3671
|
return u.width ?? (Bt(u) ? 56 : void 0);
|
|
3663
3672
|
}
|
|
3664
|
-
function
|
|
3673
|
+
function D(u) {
|
|
3665
3674
|
if (!u.width)
|
|
3666
3675
|
return u.minWidth ?? (Bt(u) ? 56 : void 0);
|
|
3667
3676
|
}
|
|
3668
|
-
function
|
|
3677
|
+
function T(u) {
|
|
3669
3678
|
return u.key || u.id || u.code;
|
|
3670
3679
|
}
|
|
3671
|
-
function
|
|
3680
|
+
function x(u) {
|
|
3672
3681
|
return l.value + u;
|
|
3673
3682
|
}
|
|
3674
3683
|
function ne(u) {
|
|
3675
3684
|
return Et(u);
|
|
3676
3685
|
}
|
|
3677
|
-
let
|
|
3678
|
-
const
|
|
3679
|
-
function
|
|
3680
|
-
const
|
|
3681
|
-
if (
|
|
3682
|
-
const
|
|
3683
|
-
if (
|
|
3684
|
-
|
|
3685
|
-
const
|
|
3686
|
-
return
|
|
3686
|
+
let z = 0;
|
|
3687
|
+
const N = /* @__PURE__ */ new WeakMap();
|
|
3688
|
+
function O(u) {
|
|
3689
|
+
const y = u.__rowKey ?? u.key ?? u.id ?? u.setId ?? u.infSetId;
|
|
3690
|
+
if (y != null && y !== "") return String(y);
|
|
3691
|
+
const _ = u, E = N.get(_);
|
|
3692
|
+
if (E) return E;
|
|
3693
|
+
z += 1;
|
|
3694
|
+
const B = `local-${z}`;
|
|
3695
|
+
return N.set(_, B), B;
|
|
3687
3696
|
}
|
|
3688
|
-
function
|
|
3697
|
+
function F(u) {
|
|
3689
3698
|
return u.required || u.isRequired;
|
|
3690
3699
|
}
|
|
3691
3700
|
return Be(
|
|
@@ -3696,12 +3705,12 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3696
3705
|
), Be(
|
|
3697
3706
|
() => t.editing,
|
|
3698
3707
|
() => {
|
|
3699
|
-
|
|
3708
|
+
h();
|
|
3700
3709
|
},
|
|
3701
3710
|
{ immediate: !0 }
|
|
3702
|
-
), (u,
|
|
3703
|
-
const
|
|
3704
|
-
return
|
|
3711
|
+
), (u, y) => {
|
|
3712
|
+
const _ = en, E = Hn("Delete"), B = Yt, q = It, U = Xt;
|
|
3713
|
+
return $(), Y("div", {
|
|
3705
3714
|
class: He(["global-info-table-renderer", { "global-info-table-renderer--editing": u.editing }])
|
|
3706
3715
|
}, [
|
|
3707
3716
|
te("div", fa, [
|
|
@@ -3710,43 +3719,43 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3710
3719
|
data: u.section.rows,
|
|
3711
3720
|
fit: !0,
|
|
3712
3721
|
"table-layout": "auto",
|
|
3713
|
-
"row-key":
|
|
3722
|
+
"row-key": O
|
|
3714
3723
|
}, {
|
|
3715
3724
|
default: J(() => [
|
|
3716
|
-
r.value ? (
|
|
3725
|
+
r.value ? ($(), H(_, {
|
|
3717
3726
|
key: 0,
|
|
3718
3727
|
type: "index",
|
|
3719
3728
|
label: i.value,
|
|
3720
3729
|
width: s.value,
|
|
3721
|
-
index:
|
|
3730
|
+
index: x
|
|
3722
3731
|
}, null, 8, ["label", "width"])) : ue("", !0),
|
|
3723
|
-
(
|
|
3724
|
-
key:
|
|
3732
|
+
($(!0), Y(be, null, ge(a.value, (G) => ($(), H(_, {
|
|
3733
|
+
key: T(G),
|
|
3725
3734
|
prop: G.code,
|
|
3726
3735
|
label: G.label,
|
|
3727
|
-
width:
|
|
3728
|
-
"min-width":
|
|
3736
|
+
width: b(G),
|
|
3737
|
+
"min-width": D(G)
|
|
3729
3738
|
}, {
|
|
3730
3739
|
header: J(() => [
|
|
3731
3740
|
te("span", pa, [
|
|
3732
|
-
|
|
3741
|
+
F(G) ? ($(), Y("span", ma, "*")) : ue("", !0),
|
|
3733
3742
|
te("span", null, fe(G.label), 1)
|
|
3734
3743
|
])
|
|
3735
3744
|
]),
|
|
3736
3745
|
default: J(({ row: X, $index: P }) => [
|
|
3737
|
-
|
|
3746
|
+
M(G) ? ee(u.$slots, M(G), oe({
|
|
3738
3747
|
key: 0,
|
|
3739
3748
|
ref_for: !0
|
|
3740
|
-
},
|
|
3749
|
+
}, m(G, X, P)), void 0, !0) : u.editing && v(G) ? ($(), H(Bn, {
|
|
3741
3750
|
key: 1,
|
|
3742
3751
|
field: G,
|
|
3743
3752
|
"model-value": X[G.code],
|
|
3744
3753
|
section: u.section,
|
|
3745
3754
|
row: X,
|
|
3746
3755
|
"row-index": P,
|
|
3747
|
-
onLoadOptions: (Z) =>
|
|
3748
|
-
"onUpdate:modelValue": (Z) =>
|
|
3749
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
3756
|
+
onLoadOptions: (Z) => R(G, X, Z),
|
|
3757
|
+
"onUpdate:modelValue": (Z) => V(X, P, G, Z)
|
|
3758
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : ($(), H(En, {
|
|
3750
3759
|
key: 2,
|
|
3751
3760
|
field: G,
|
|
3752
3761
|
value: X[G.code],
|
|
@@ -3757,16 +3766,16 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3757
3766
|
]),
|
|
3758
3767
|
_: 2
|
|
3759
3768
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
3760
|
-
u.editing ? (
|
|
3769
|
+
u.editing ? ($(), H(_, {
|
|
3761
3770
|
key: 1,
|
|
3762
3771
|
label: "操作",
|
|
3763
3772
|
width: "104",
|
|
3764
3773
|
fixed: "right"
|
|
3765
3774
|
}, {
|
|
3766
3775
|
default: J(({ row: G, $index: X }) => [
|
|
3767
|
-
|
|
3776
|
+
I(G, X) ? ($(), H(da, {
|
|
3768
3777
|
key: 0,
|
|
3769
|
-
onConfirm: (P) =>
|
|
3778
|
+
onConfirm: (P) => w(X)
|
|
3770
3779
|
}, {
|
|
3771
3780
|
default: J(() => [
|
|
3772
3781
|
we(q, {
|
|
@@ -3775,13 +3784,13 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3775
3784
|
type: "danger"
|
|
3776
3785
|
}, {
|
|
3777
3786
|
default: J(() => [
|
|
3778
|
-
we(
|
|
3787
|
+
we(B, { class: "global-info-table-renderer__delete-icon" }, {
|
|
3779
3788
|
default: J(() => [
|
|
3780
|
-
we(
|
|
3789
|
+
we(E)
|
|
3781
3790
|
]),
|
|
3782
3791
|
_: 1
|
|
3783
3792
|
}),
|
|
3784
|
-
|
|
3793
|
+
y[0] || (y[0] = Ye(" 删除 "))
|
|
3785
3794
|
]),
|
|
3786
3795
|
_: 1
|
|
3787
3796
|
})
|
|
@@ -3798,7 +3807,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3798
3807
|
], 2);
|
|
3799
3808
|
};
|
|
3800
3809
|
}
|
|
3801
|
-
}),
|
|
3810
|
+
}), va = /* @__PURE__ */ ye(ha, [["__scopeId", "data-v-bfc7b8fe"]]), ga = /* @__PURE__ */ ce({
|
|
3802
3811
|
name: "GlobalInfoAutoRenderer",
|
|
3803
3812
|
__name: "GlobalInfoAutoRenderer",
|
|
3804
3813
|
props: {
|
|
@@ -3810,7 +3819,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3810
3819
|
renderConfig: {}
|
|
3811
3820
|
},
|
|
3812
3821
|
setup(e) {
|
|
3813
|
-
return (t, n) => t.section.renderType === "table" ? (
|
|
3822
|
+
return (t, n) => t.section.renderType === "table" ? ($(), H(va, {
|
|
3814
3823
|
key: 0,
|
|
3815
3824
|
section: t.section,
|
|
3816
3825
|
node: t.node,
|
|
@@ -3818,7 +3827,7 @@ const ia = { class: "global-info-form-renderer__label" }, la = {
|
|
|
3818
3827
|
state: t.state,
|
|
3819
3828
|
actions: t.actions,
|
|
3820
3829
|
"render-config": t.renderConfig
|
|
3821
|
-
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (
|
|
3830
|
+
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : ($(), H(ua, {
|
|
3822
3831
|
key: 1,
|
|
3823
3832
|
section: t.section,
|
|
3824
3833
|
node: t.node,
|
|
@@ -3857,7 +3866,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3857
3866
|
renderConfig: {}
|
|
3858
3867
|
},
|
|
3859
3868
|
setup(e) {
|
|
3860
|
-
const t = e, n = Ee(), o =
|
|
3869
|
+
const t = e, n = Ee(), o = L(() => lt(
|
|
3861
3870
|
t.section.fields,
|
|
3862
3871
|
t.section,
|
|
3863
3872
|
t.renderConfig,
|
|
@@ -3865,7 +3874,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3865
3874
|
values: t.section.model,
|
|
3866
3875
|
rows: t.section.renderType === "table" ? t.section.rows : void 0
|
|
3867
3876
|
}
|
|
3868
|
-
)), r =
|
|
3877
|
+
)), r = L(() => t.editing ?? t.actions.isEditing(t.section)), i = L(() => t.section.renderType === "table" && t.section.rows.length === 0 || o.value.length === 0), s = L(() => {
|
|
3869
3878
|
const a = Ct(
|
|
3870
3879
|
n,
|
|
3871
3880
|
"section",
|
|
@@ -3875,7 +3884,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3875
3884
|
a,
|
|
3876
3885
|
c,
|
|
3877
3886
|
"default"
|
|
3878
|
-
].find((
|
|
3887
|
+
].find((g) => !!(g && n[g])) ?? "";
|
|
3879
3888
|
});
|
|
3880
3889
|
function l(a) {
|
|
3881
3890
|
return a === "form" || a === "table" ? a : "";
|
|
@@ -3892,7 +3901,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3892
3901
|
renderConfig: a.renderConfig,
|
|
3893
3902
|
state: a.state,
|
|
3894
3903
|
actions: a.actions
|
|
3895
|
-
}) : (
|
|
3904
|
+
}) : ($(), H(ga, {
|
|
3896
3905
|
key: 1,
|
|
3897
3906
|
section: a.section,
|
|
3898
3907
|
node: a.node,
|
|
@@ -3918,7 +3927,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3918
3927
|
error: (e) => !0
|
|
3919
3928
|
},
|
|
3920
3929
|
setup(e, { emit: t, slots: n }) {
|
|
3921
|
-
const o =
|
|
3930
|
+
const o = ve(!1);
|
|
3922
3931
|
Be(
|
|
3923
3932
|
() => e.boundaryKey,
|
|
3924
3933
|
() => {
|
|
@@ -3958,137 +3967,137 @@ const ya = /* @__PURE__ */ ce({
|
|
|
3958
3967
|
onSave: { type: Function }
|
|
3959
3968
|
},
|
|
3960
3969
|
setup(e) {
|
|
3961
|
-
const t = e, n = Ee(), o =
|
|
3962
|
-
const
|
|
3963
|
-
return
|
|
3964
|
-
values:
|
|
3965
|
-
rows:
|
|
3970
|
+
const t = e, n = Ee(), o = ve(!1), r = ve(null), i = ve(null), s = L(() => !!t.hideHeader), l = L(() => t.actions.getSectionStatus(t.node)), a = L(() => t.actions.getSection(t.node) ?? i.value), c = L(() => {
|
|
3971
|
+
const b = a.value;
|
|
3972
|
+
return b ? lt(b.fields, b, t.renderConfig, {
|
|
3973
|
+
values: b.model,
|
|
3974
|
+
rows: b.renderType === "table" ? b.rows : void 0
|
|
3966
3975
|
}) : [];
|
|
3967
|
-
}),
|
|
3968
|
-
const
|
|
3969
|
-
return
|
|
3970
|
-
}),
|
|
3976
|
+
}), g = L(() => a.value?.title || t.node.tagName || t.node.label || "-"), w = L(() => !!(a.value && t.actions.isEditing(a.value))), I = L(() => a.value?.renderType === "table"), V = L(() => o.value || l.value.loading), A = L(() => k(r.value || l.value.error)), d = L(() => {
|
|
3977
|
+
const b = a.value;
|
|
3978
|
+
return b ? b.renderType === "table" && b.rows.length === 0 || c.value.length === 0 : !0;
|
|
3979
|
+
}), S = L(() => ({
|
|
3971
3980
|
node: t.node,
|
|
3972
3981
|
section: a.value,
|
|
3973
3982
|
sectionView: a.value,
|
|
3974
3983
|
fields: c.value,
|
|
3975
3984
|
renderConfig: t.renderConfig,
|
|
3976
|
-
title:
|
|
3977
|
-
editing:
|
|
3978
|
-
loading:
|
|
3985
|
+
title: g.value,
|
|
3986
|
+
editing: w.value,
|
|
3987
|
+
loading: V.value,
|
|
3979
3988
|
error: r.value || l.value.error,
|
|
3980
3989
|
errorMessage: A.value,
|
|
3981
|
-
isEmpty:
|
|
3982
|
-
empty:
|
|
3990
|
+
isEmpty: d.value,
|
|
3991
|
+
empty: d.value,
|
|
3983
3992
|
sectionStatus: l.value,
|
|
3984
3993
|
state: t.state,
|
|
3985
3994
|
actions: t.actions,
|
|
3986
|
-
reload:
|
|
3987
|
-
handleEdit:
|
|
3988
|
-
handleCancel:
|
|
3989
|
-
handleAddTableRow:
|
|
3990
|
-
handleSave:
|
|
3995
|
+
reload: j,
|
|
3996
|
+
handleEdit: R,
|
|
3997
|
+
handleCancel: h,
|
|
3998
|
+
handleAddTableRow: m,
|
|
3999
|
+
handleSave: M
|
|
3991
4000
|
}));
|
|
3992
|
-
function b
|
|
3993
|
-
return
|
|
4001
|
+
function k(b) {
|
|
4002
|
+
return b ? b instanceof Error ? b.message : String(b) : "";
|
|
3994
4003
|
}
|
|
3995
|
-
async function
|
|
3996
|
-
const
|
|
3997
|
-
|
|
4004
|
+
async function R() {
|
|
4005
|
+
const b = a.value;
|
|
4006
|
+
b && (await t.onEdit?.(b, t.node), t.onEdit || t.actions.startEdit(b));
|
|
3998
4007
|
}
|
|
3999
|
-
async function
|
|
4000
|
-
const
|
|
4001
|
-
|
|
4008
|
+
async function h() {
|
|
4009
|
+
const b = a.value;
|
|
4010
|
+
b && (await t.onCancel?.(b, t.node), t.onCancel || t.actions.cancelEdit(b));
|
|
4002
4011
|
}
|
|
4003
|
-
function
|
|
4004
|
-
const
|
|
4005
|
-
if (!
|
|
4006
|
-
const
|
|
4007
|
-
t.actions.saveRow(
|
|
4012
|
+
function m() {
|
|
4013
|
+
const b = a.value;
|
|
4014
|
+
if (!b) return;
|
|
4015
|
+
const D = b.fields.reduce((T, x) => (T[x.code] = x.value ?? "", T), { __rowKey: `new-${Date.now()}` });
|
|
4016
|
+
t.actions.saveRow(b, D, -1);
|
|
4008
4017
|
}
|
|
4009
|
-
async function
|
|
4010
|
-
const
|
|
4011
|
-
if (
|
|
4018
|
+
async function M() {
|
|
4019
|
+
const b = a.value;
|
|
4020
|
+
if (b)
|
|
4012
4021
|
try {
|
|
4013
4022
|
if (t.onSave) {
|
|
4014
|
-
await t.onSave(
|
|
4023
|
+
await t.onSave(b, t.node);
|
|
4015
4024
|
return;
|
|
4016
4025
|
}
|
|
4017
|
-
await t.actions.saveSection(
|
|
4018
|
-
} catch (
|
|
4019
|
-
r.value =
|
|
4026
|
+
await t.actions.saveSection(b);
|
|
4027
|
+
} catch (D) {
|
|
4028
|
+
r.value = D, console.error("[GlobalInfoSectionBlock] save section failed", D);
|
|
4020
4029
|
}
|
|
4021
4030
|
}
|
|
4022
|
-
function
|
|
4023
|
-
r.value =
|
|
4031
|
+
function v(b) {
|
|
4032
|
+
r.value = b;
|
|
4024
4033
|
}
|
|
4025
|
-
async function
|
|
4034
|
+
async function j() {
|
|
4026
4035
|
o.value = !0, r.value = null, i.value = null;
|
|
4027
4036
|
try {
|
|
4028
4037
|
i.value = await t.actions.loadSection(t.node);
|
|
4029
|
-
} catch (
|
|
4030
|
-
r.value =
|
|
4038
|
+
} catch (b) {
|
|
4039
|
+
r.value = b, console.error("[GlobalInfoSectionBlock] load section failed", b);
|
|
4031
4040
|
} finally {
|
|
4032
4041
|
o.value = !1;
|
|
4033
4042
|
}
|
|
4034
4043
|
}
|
|
4035
4044
|
return Kt(() => {
|
|
4036
|
-
|
|
4045
|
+
j();
|
|
4037
4046
|
}), Be(
|
|
4038
4047
|
() => t.node.key,
|
|
4039
4048
|
() => {
|
|
4040
|
-
|
|
4049
|
+
j();
|
|
4041
4050
|
}
|
|
4042
|
-
), (
|
|
4043
|
-
const
|
|
4044
|
-
return
|
|
4045
|
-
s.value ? ue("", !0) : (
|
|
4046
|
-
ee(
|
|
4051
|
+
), (b, D) => {
|
|
4052
|
+
const T = It;
|
|
4053
|
+
return $(), Y("section", Sa, [
|
|
4054
|
+
s.value ? ue("", !0) : ($(), Y("header", wa, [
|
|
4055
|
+
ee(b.$slots, "header", Me(Fe(S.value)), () => [
|
|
4047
4056
|
te("div", Ia, [
|
|
4048
|
-
|
|
4049
|
-
te("h3", _a, fe(
|
|
4057
|
+
D[0] || (D[0] = te("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4058
|
+
te("h3", _a, fe(g.value), 1)
|
|
4050
4059
|
]),
|
|
4051
|
-
ee(
|
|
4052
|
-
a.value ? (
|
|
4053
|
-
|
|
4054
|
-
we(
|
|
4060
|
+
ee(b.$slots, "actions", Me(Fe(S.value)), () => [
|
|
4061
|
+
a.value ? ($(), Y("div", $a, [
|
|
4062
|
+
w.value ? ($(), Y(be, { key: 1 }, [
|
|
4063
|
+
we(T, {
|
|
4055
4064
|
class: "global-info-section-block__cancel",
|
|
4056
4065
|
disabled: l.value.saving,
|
|
4057
|
-
onClick:
|
|
4066
|
+
onClick: h
|
|
4058
4067
|
}, {
|
|
4059
|
-
default: J(() =>
|
|
4068
|
+
default: J(() => D[2] || (D[2] = [
|
|
4060
4069
|
Ye(" 取消 ")
|
|
4061
4070
|
])),
|
|
4062
4071
|
_: 1
|
|
4063
4072
|
}, 8, ["disabled"]),
|
|
4064
|
-
|
|
4073
|
+
I.value ? ($(), H(T, {
|
|
4065
4074
|
key: 0,
|
|
4066
4075
|
class: "global-info-section-block__add",
|
|
4067
4076
|
disabled: l.value.saving,
|
|
4068
|
-
onClick:
|
|
4077
|
+
onClick: m
|
|
4069
4078
|
}, {
|
|
4070
|
-
default: J(() =>
|
|
4079
|
+
default: J(() => D[3] || (D[3] = [
|
|
4071
4080
|
Ye(" 新增 ")
|
|
4072
4081
|
])),
|
|
4073
4082
|
_: 1
|
|
4074
4083
|
}, 8, ["disabled"])) : ue("", !0),
|
|
4075
|
-
we(
|
|
4084
|
+
we(T, {
|
|
4076
4085
|
class: "global-info-section-block__confirm",
|
|
4077
4086
|
loading: l.value.saving,
|
|
4078
|
-
onClick:
|
|
4087
|
+
onClick: M
|
|
4079
4088
|
}, {
|
|
4080
4089
|
default: J(() => [
|
|
4081
|
-
Ye(fe(
|
|
4090
|
+
Ye(fe(I.value ? "确认" : "保存"), 1)
|
|
4082
4091
|
]),
|
|
4083
4092
|
_: 1
|
|
4084
4093
|
}, 8, ["loading"])
|
|
4085
|
-
], 64)) : (
|
|
4094
|
+
], 64)) : ($(), H(T, {
|
|
4086
4095
|
key: 0,
|
|
4087
4096
|
class: "global-info-section-block__edit",
|
|
4088
|
-
disabled: l.value.saving ||
|
|
4089
|
-
onClick:
|
|
4097
|
+
disabled: l.value.saving || V.value,
|
|
4098
|
+
onClick: R
|
|
4090
4099
|
}, {
|
|
4091
|
-
default: J(() =>
|
|
4100
|
+
default: J(() => D[1] || (D[1] = [
|
|
4092
4101
|
te("svg", {
|
|
4093
4102
|
class: "global-info-section-block__edit-icon",
|
|
4094
4103
|
viewBox: "0 0 12 12",
|
|
@@ -4109,34 +4118,34 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4109
4118
|
], !0)
|
|
4110
4119
|
])),
|
|
4111
4120
|
te("div", Ca, [
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
], !0) : !a.value ||
|
|
4115
|
-
|
|
4116
|
-
], !0) : (
|
|
4121
|
+
V.value ? ee(b.$slots, "loading", Me(oe({ key: 0 }, S.value)), () => [
|
|
4122
|
+
D[4] || (D[4] = te("div", { class: "global-info-section-block__status" }, "加载中...", -1))
|
|
4123
|
+
], !0) : !a.value || d.value ? ee(b.$slots, "empty", Me(oe({ key: 1 }, S.value)), () => [
|
|
4124
|
+
D[5] || (D[5] = te("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
4125
|
+
], !0) : ($(), H(ba, {
|
|
4117
4126
|
key: 2,
|
|
4118
|
-
"boundary-key":
|
|
4119
|
-
label:
|
|
4120
|
-
onError:
|
|
4127
|
+
"boundary-key": b.node.key,
|
|
4128
|
+
label: g.value,
|
|
4129
|
+
onError: v
|
|
4121
4130
|
}, {
|
|
4122
4131
|
fallback: J(() => [
|
|
4123
|
-
ee(
|
|
4124
|
-
|
|
4132
|
+
ee(b.$slots, "empty", Me(Fe(S.value)), () => [
|
|
4133
|
+
D[6] || (D[6] = te("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
4125
4134
|
], !0)
|
|
4126
4135
|
]),
|
|
4127
4136
|
default: J(() => [
|
|
4128
4137
|
we(ya, {
|
|
4129
4138
|
section: a.value,
|
|
4130
|
-
node:
|
|
4131
|
-
editing:
|
|
4132
|
-
state:
|
|
4133
|
-
actions:
|
|
4134
|
-
"render-config":
|
|
4139
|
+
node: b.node,
|
|
4140
|
+
editing: w.value,
|
|
4141
|
+
state: b.state,
|
|
4142
|
+
actions: b.actions,
|
|
4143
|
+
"render-config": b.renderConfig
|
|
4135
4144
|
}, je({ _: 2 }, [
|
|
4136
|
-
ge(re(n), (
|
|
4145
|
+
ge(re(n), (x, ne) => ({
|
|
4137
4146
|
name: ne,
|
|
4138
|
-
fn: J((
|
|
4139
|
-
ee(
|
|
4147
|
+
fn: J((z) => [
|
|
4148
|
+
ee(b.$slots, ne, Me(Fe({ ...S.value, ...z })), void 0, !0)
|
|
4140
4149
|
])
|
|
4141
4150
|
}))
|
|
4142
4151
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4147,7 +4156,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4147
4156
|
]);
|
|
4148
4157
|
};
|
|
4149
4158
|
}
|
|
4150
|
-
}), Ma = /* @__PURE__ */ ye(ka, [["__scopeId", "data-v-
|
|
4159
|
+
}), Ma = /* @__PURE__ */ ye(ka, [["__scopeId", "data-v-8a4b5280"]]), Ta = { class: "global-info-group" }, Oa = { class: "global-info-group__header" }, Da = { class: "global-info-group__title" }, Fa = { class: "global-info-group__body" }, Ba = ["id"], Ea = /* @__PURE__ */ ce({
|
|
4151
4160
|
name: "GlobalInfoGroup",
|
|
4152
4161
|
__name: "GlobalInfoGroup",
|
|
4153
4162
|
props: {
|
|
@@ -4159,20 +4168,20 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4159
4168
|
renderConfig: {}
|
|
4160
4169
|
},
|
|
4161
4170
|
setup(e) {
|
|
4162
|
-
const t = e, n = Ee(), o =
|
|
4163
|
-
function i(c,
|
|
4164
|
-
const
|
|
4171
|
+
const t = e, n = Ee(), o = L(() => t.group.tagName || t.group.label || "-"), r = L(() => t.children.length <= 1);
|
|
4172
|
+
function i(c, g) {
|
|
4173
|
+
const w = t.actions.getSection(c);
|
|
4165
4174
|
return {
|
|
4166
4175
|
node: c,
|
|
4167
4176
|
group: t.group,
|
|
4168
4177
|
sectionNode: c,
|
|
4169
|
-
section:
|
|
4170
|
-
sectionView:
|
|
4178
|
+
section: w,
|
|
4179
|
+
sectionView: w,
|
|
4171
4180
|
state: t.state,
|
|
4172
4181
|
actions: t.actions,
|
|
4173
4182
|
renderConfig: t.renderConfig,
|
|
4174
|
-
index:
|
|
4175
|
-
editing: !!(
|
|
4183
|
+
index: g,
|
|
4184
|
+
editing: !!(w && t.actions.isEditing(w)),
|
|
4176
4185
|
sectionStatus: t.actions.getSectionStatus(c),
|
|
4177
4186
|
isSelfSection: l(c, 0) === l(t.group, 0),
|
|
4178
4187
|
handleEdit: () => t.actions.startEdit(c),
|
|
@@ -4181,16 +4190,16 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4181
4190
|
};
|
|
4182
4191
|
}
|
|
4183
4192
|
function s(c) {
|
|
4184
|
-
const
|
|
4185
|
-
return Ct(n, "section", Nn(c,
|
|
4193
|
+
const g = t.actions.getSection(c);
|
|
4194
|
+
return Ct(n, "section", Nn(c, g));
|
|
4186
4195
|
}
|
|
4187
|
-
function l(c,
|
|
4188
|
-
return c.key || c.id || c.infSetId || c.tagId || `${
|
|
4196
|
+
function l(c, g) {
|
|
4197
|
+
return c.key || c.id || c.infSetId || c.tagId || `${g}`;
|
|
4189
4198
|
}
|
|
4190
4199
|
function a(c) {
|
|
4191
4200
|
return `global-info-section-${l(c, 0)}`;
|
|
4192
4201
|
}
|
|
4193
|
-
return (c,
|
|
4202
|
+
return (c, g) => ($(), Y("section", Ta, [
|
|
4194
4203
|
ee(c.$slots, "header", {
|
|
4195
4204
|
group: c.group,
|
|
4196
4205
|
children: c.children,
|
|
@@ -4202,7 +4211,7 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4202
4211
|
isEmpty: c.children.length === 0
|
|
4203
4212
|
}, () => [
|
|
4204
4213
|
te("header", Oa, [
|
|
4205
|
-
|
|
4214
|
+
g[0] || (g[0] = te("span", { class: "global-info-group__marker" }, null, -1)),
|
|
4206
4215
|
te("h2", Da, fe(o.value), 1)
|
|
4207
4216
|
])
|
|
4208
4217
|
], !0),
|
|
@@ -4216,30 +4225,30 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4216
4225
|
renderConfig: c.renderConfig,
|
|
4217
4226
|
index: c.index,
|
|
4218
4227
|
isEmpty: c.children.length === 0
|
|
4219
|
-
}, void 0, !0) : (
|
|
4220
|
-
(
|
|
4221
|
-
id: a(
|
|
4222
|
-
key: l(
|
|
4228
|
+
}, void 0, !0) : ($(), Y(be, { key: 1 }, [
|
|
4229
|
+
($(!0), Y(be, null, ge(c.children, (w, I) => ($(), Y("div", {
|
|
4230
|
+
id: a(w),
|
|
4231
|
+
key: l(w, I),
|
|
4223
4232
|
class: "global-info-group__section"
|
|
4224
4233
|
}, [
|
|
4225
|
-
s(
|
|
4234
|
+
s(w) ? ee(c.$slots, s(w), oe({
|
|
4226
4235
|
key: 0,
|
|
4227
4236
|
ref_for: !0
|
|
4228
|
-
}, i(
|
|
4237
|
+
}, i(w, I)), void 0, !0) : re(n).section ? ee(c.$slots, "section", oe({
|
|
4229
4238
|
key: 1,
|
|
4230
4239
|
ref_for: !0
|
|
4231
|
-
}, i(
|
|
4240
|
+
}, i(w, I)), void 0, !0) : ($(), H(Ma, {
|
|
4232
4241
|
key: 2,
|
|
4233
|
-
node:
|
|
4242
|
+
node: w,
|
|
4234
4243
|
state: c.state,
|
|
4235
4244
|
actions: c.actions,
|
|
4236
4245
|
"hide-header": r.value,
|
|
4237
4246
|
"render-config": c.renderConfig
|
|
4238
4247
|
}, je({ _: 2 }, [
|
|
4239
|
-
ge(re(n), (
|
|
4248
|
+
ge(re(n), (V, A) => ({
|
|
4240
4249
|
name: A,
|
|
4241
|
-
fn: J((
|
|
4242
|
-
ee(c.$slots, A, oe({ ref_for: !0 },
|
|
4250
|
+
fn: J((d) => [
|
|
4251
|
+
ee(c.$slots, A, oe({ ref_for: !0 }, d), void 0, !0)
|
|
4243
4252
|
])
|
|
4244
4253
|
}))
|
|
4245
4254
|
]), 1032, ["node", "state", "actions", "hide-header", "render-config"]))
|
|
@@ -4254,13 +4263,13 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4254
4263
|
index: -1,
|
|
4255
4264
|
renderConfig: c.renderConfig
|
|
4256
4265
|
}, () => [
|
|
4257
|
-
|
|
4266
|
+
g[1] || (g[1] = te("div", { class: "global-info-group__empty" }, "暂无数据", -1))
|
|
4258
4267
|
], !0) : ue("", !0)
|
|
4259
4268
|
], 64))
|
|
4260
4269
|
])
|
|
4261
4270
|
]));
|
|
4262
4271
|
}
|
|
4263
|
-
}), La = /* @__PURE__ */ ye(Ea, [["__scopeId", "data-v-
|
|
4272
|
+
}), La = /* @__PURE__ */ ye(Ea, [["__scopeId", "data-v-e86fcaf6"]]), Va = { class: "global-info-sections" }, Pa = /* @__PURE__ */ ce({
|
|
4264
4273
|
name: "GlobalInfoSections",
|
|
4265
4274
|
__name: "GlobalInfoSections",
|
|
4266
4275
|
props: {
|
|
@@ -4270,89 +4279,89 @@ const ya = /* @__PURE__ */ ce({
|
|
|
4270
4279
|
renderConfig: {}
|
|
4271
4280
|
},
|
|
4272
4281
|
setup(e) {
|
|
4273
|
-
const t = e, n = Ee(), o =
|
|
4274
|
-
const
|
|
4282
|
+
const t = e, n = Ee(), o = L(() => {
|
|
4283
|
+
const g = t.nodes.filter((k) => r(k).length > 0), w = t.nodes.filter((k) => r(k).length === 0), I = w.filter((k) => i(k)), V = w.filter((k) => !i(k)), A = g.map((k) => ({ group: k, children: r(k) })), d = I.map((k) => ({ group: k, children: [k] }));
|
|
4275
4284
|
if (A.length === 0)
|
|
4276
|
-
return
|
|
4277
|
-
const
|
|
4278
|
-
return [...A, ...
|
|
4285
|
+
return I.length > 0 ? d : c(V);
|
|
4286
|
+
const S = c(V);
|
|
4287
|
+
return [...A, ...d, ...S];
|
|
4279
4288
|
});
|
|
4280
|
-
function r(
|
|
4281
|
-
return
|
|
4289
|
+
function r(g) {
|
|
4290
|
+
return g.children ?? [];
|
|
4282
4291
|
}
|
|
4283
|
-
function i(
|
|
4284
|
-
return !String(
|
|
4292
|
+
function i(g) {
|
|
4293
|
+
return !String(g.parentId || g.parentTagId || "").trim();
|
|
4285
4294
|
}
|
|
4286
|
-
function s(
|
|
4287
|
-
return Ct(n, "group", jn(
|
|
4295
|
+
function s(g) {
|
|
4296
|
+
return Ct(n, "group", jn(g));
|
|
4288
4297
|
}
|
|
4289
|
-
function l(
|
|
4290
|
-
return
|
|
4298
|
+
function l(g, w) {
|
|
4299
|
+
return g.key || g.id || g.tagId || `${w}`;
|
|
4291
4300
|
}
|
|
4292
|
-
function a(
|
|
4293
|
-
const
|
|
4301
|
+
function a(g) {
|
|
4302
|
+
const w = g[0], I = w?.raw ?? {}, V = String(I.parentTagName || I.parentName || I.parentLabel || w?.parentId || "信息");
|
|
4294
4303
|
return {
|
|
4295
|
-
...
|
|
4296
|
-
key: `${
|
|
4297
|
-
id: String(
|
|
4298
|
-
tagId: String(
|
|
4299
|
-
tagName:
|
|
4300
|
-
label:
|
|
4301
|
-
children:
|
|
4304
|
+
...w,
|
|
4305
|
+
key: `${w?.parentId || w?.parentTagId || w?.key || "global-info"}-group`,
|
|
4306
|
+
id: String(w?.parentId || w?.parentTagId || w?.id || "global-info-group"),
|
|
4307
|
+
tagId: String(w?.parentTagId || w?.parentId || w?.tagId || "global-info-group"),
|
|
4308
|
+
tagName: V,
|
|
4309
|
+
label: V,
|
|
4310
|
+
children: g
|
|
4302
4311
|
};
|
|
4303
4312
|
}
|
|
4304
|
-
function c(
|
|
4305
|
-
const
|
|
4306
|
-
return
|
|
4307
|
-
const
|
|
4308
|
-
A.push(
|
|
4309
|
-
}), Array.from(
|
|
4310
|
-
group: a(
|
|
4311
|
-
children:
|
|
4313
|
+
function c(g) {
|
|
4314
|
+
const w = /* @__PURE__ */ new Map();
|
|
4315
|
+
return g.forEach((I) => {
|
|
4316
|
+
const V = String(I.parentId || I.parentTagId || "global-info-flat"), A = w.get(V) ?? [];
|
|
4317
|
+
A.push(I), w.set(V, A);
|
|
4318
|
+
}), Array.from(w.values()).map((I) => ({
|
|
4319
|
+
group: a(I),
|
|
4320
|
+
children: I
|
|
4312
4321
|
}));
|
|
4313
4322
|
}
|
|
4314
|
-
return (
|
|
4315
|
-
(
|
|
4316
|
-
key: l(
|
|
4323
|
+
return (g, w) => ($(), Y("div", Va, [
|
|
4324
|
+
($(!0), Y(be, null, ge(o.value, (I, V) => ($(), Y(be, {
|
|
4325
|
+
key: l(I.group, V)
|
|
4317
4326
|
}, [
|
|
4318
|
-
s(
|
|
4327
|
+
s(I.group) ? ee(g.$slots, s(I.group), {
|
|
4319
4328
|
key: 0,
|
|
4320
|
-
group:
|
|
4321
|
-
children:
|
|
4322
|
-
state:
|
|
4323
|
-
actions:
|
|
4324
|
-
renderConfig:
|
|
4325
|
-
index:
|
|
4326
|
-
isEmpty:
|
|
4327
|
-
}, void 0, !0) : re(n).group ? ee(
|
|
4329
|
+
group: I.group,
|
|
4330
|
+
children: I.children,
|
|
4331
|
+
state: g.state,
|
|
4332
|
+
actions: g.actions,
|
|
4333
|
+
renderConfig: g.renderConfig,
|
|
4334
|
+
index: V,
|
|
4335
|
+
isEmpty: I.children.length === 0
|
|
4336
|
+
}, void 0, !0) : re(n).group ? ee(g.$slots, "group", {
|
|
4328
4337
|
key: 1,
|
|
4329
|
-
group:
|
|
4330
|
-
children:
|
|
4331
|
-
state:
|
|
4332
|
-
actions:
|
|
4333
|
-
renderConfig:
|
|
4334
|
-
index:
|
|
4335
|
-
isEmpty:
|
|
4336
|
-
}, void 0, !0) : (
|
|
4338
|
+
group: I.group,
|
|
4339
|
+
children: I.children,
|
|
4340
|
+
state: g.state,
|
|
4341
|
+
actions: g.actions,
|
|
4342
|
+
renderConfig: g.renderConfig,
|
|
4343
|
+
index: V,
|
|
4344
|
+
isEmpty: I.children.length === 0
|
|
4345
|
+
}, void 0, !0) : ($(), H(La, {
|
|
4337
4346
|
key: 2,
|
|
4338
|
-
group:
|
|
4339
|
-
children:
|
|
4340
|
-
state:
|
|
4341
|
-
actions:
|
|
4342
|
-
"render-config":
|
|
4343
|
-
index:
|
|
4347
|
+
group: I.group,
|
|
4348
|
+
children: I.children,
|
|
4349
|
+
state: g.state,
|
|
4350
|
+
actions: g.actions,
|
|
4351
|
+
"render-config": g.renderConfig,
|
|
4352
|
+
index: V
|
|
4344
4353
|
}, je({ _: 2 }, [
|
|
4345
|
-
ge(re(n), (A,
|
|
4346
|
-
name:
|
|
4347
|
-
fn: J((
|
|
4348
|
-
ee(
|
|
4354
|
+
ge(re(n), (A, d) => ({
|
|
4355
|
+
name: d,
|
|
4356
|
+
fn: J((S) => [
|
|
4357
|
+
ee(g.$slots, d, oe({ ref_for: !0 }, S), void 0, !0)
|
|
4349
4358
|
])
|
|
4350
4359
|
}))
|
|
4351
4360
|
]), 1032, ["group", "children", "state", "actions", "render-config", "index"]))
|
|
4352
4361
|
], 64))), 128))
|
|
4353
4362
|
]));
|
|
4354
4363
|
}
|
|
4355
|
-
}), Ka = /* @__PURE__ */ ye(Pa, [["__scopeId", "data-v-
|
|
4364
|
+
}), Ka = /* @__PURE__ */ ye(Pa, [["__scopeId", "data-v-6f22a098"]]);
|
|
4356
4365
|
export {
|
|
4357
4366
|
Dn as DEFAULT_GLOBAL_INFO_REQUIRED_INFO_SET_EMPTY_MESSAGE,
|
|
4358
4367
|
ga as GlobalInfoAutoRenderer,
|
|
@@ -4365,28 +4374,28 @@ export {
|
|
|
4365
4374
|
Ma as GlobalInfoSectionBlock,
|
|
4366
4375
|
ya as GlobalInfoSectionOutlet,
|
|
4367
4376
|
Ka as GlobalInfoSections,
|
|
4368
|
-
|
|
4377
|
+
va as GlobalInfoTableRenderer,
|
|
4369
4378
|
Tt as JtAttachmentPreview,
|
|
4370
4379
|
Ha as JtAttachmentPreviewByParams,
|
|
4371
4380
|
tt as JtButton,
|
|
4372
4381
|
fo as JtCascader,
|
|
4373
|
-
|
|
4382
|
+
xa as JtCrudTable,
|
|
4374
4383
|
mo as JtDatePicker,
|
|
4375
4384
|
Do as JtFilterBar,
|
|
4376
4385
|
So as JtFormItems,
|
|
4377
4386
|
mt as JtInput,
|
|
4378
|
-
|
|
4387
|
+
za as JtPageHeader,
|
|
4379
4388
|
No as JtPagination,
|
|
4380
4389
|
go as JtSelect,
|
|
4381
4390
|
Vo as JtTable,
|
|
4382
|
-
|
|
4391
|
+
vr as buildGlobalInfoUpdatePayload,
|
|
4383
4392
|
pr as createEmptyGlobalInfoViewModel,
|
|
4384
4393
|
qa as isGlobalInfoNode,
|
|
4385
|
-
|
|
4394
|
+
vn as mergeGlobalInfoChildren,
|
|
4386
4395
|
mr as normalizeGlobalInfoDetail,
|
|
4387
4396
|
jt as normalizeGlobalInfoTree,
|
|
4388
|
-
|
|
4397
|
+
hr as resolveGlobalInfoRenderType,
|
|
4389
4398
|
Ja as setupJtAttachmentPreview,
|
|
4390
4399
|
Gr as useGlobalInfoController,
|
|
4391
|
-
|
|
4400
|
+
xr as validateGlobalInfoRequiredInfoSet
|
|
4392
4401
|
};
|