@jt-home/mfe-components 1.0.36 → 1.0.37
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 +1459 -1448
- package/dist/style.css +1 -1
- package/package.json +99 -99
- package/readme.md +694 -694
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
import { t as Z, J as Dt, i as Un } from "./index-C66W1IXZ.js";
|
|
3
3
|
import { a as ms, g as vs, n as hs, r as gs, s as ys, b as bs } from "./index-C66W1IXZ.js";
|
|
4
|
-
import { defineComponent as pe, useAttrs as Hn, computed as
|
|
4
|
+
import { defineComponent as pe, useAttrs as Hn, computed as O, openBlock as I, createBlock as H, mergeProps as ae, toHandlers as et, withCtx as U, renderSlot as te, resolveDynamicComponent as Kt, createCommentVNode as fe, ref as ge, watch as Ee, mergeDefaults as Jn, withKeys as Wn, createElementBlock as G, Fragment as Se, renderList as ye, normalizeStyle as Yt, nextTick as Zn, useSlots as Le, normalizeClass as We, createVNode as Ie, withModifiers as Ut, unref as J, createSlots as Re, createElementVNode as ne, toDisplayString as oe, normalizeProps as Oe, guardReactiveProps as Be, useModel as vt, withDirectives as Qn, mergeModels as Ft, shallowRef as je, onMounted as Ht, onBeforeUnmount as Xn, createTextVNode as He, resolveComponent as eo, onErrorCaptured as to } from "vue";
|
|
5
5
|
import { ElButton as $t, ElIcon as Jt, ElCascader as no, ElDatePicker as Wt, ElInput as Zt, ElSelect as Qt, ElOption as Xt, ElFormItem as en, ElForm as tn, ElTable as nn, ElTableColumn as on, ElPagination as oo, ElLoadingDirective as ro, ElInputNumber as ao, ElSwitch as so, ElRow as lo, ElCol as io, ElPopconfirm as co } from "element-plus/es";
|
|
6
6
|
import { cascaderEmits as uo, inputEmits as Bt, selectEmits as Et } from "element-plus";
|
|
7
7
|
const bt = 2, fo = 3;
|
|
@@ -55,18 +55,18 @@ const vo = /* @__PURE__ */ pe({
|
|
|
55
55
|
tag: {}
|
|
56
56
|
},
|
|
57
57
|
setup(e) {
|
|
58
|
-
const t = e, n = Hn(), o =
|
|
58
|
+
const t = e, n = Hn(), o = O(() => {
|
|
59
59
|
const { icon: i, ...a } = t;
|
|
60
60
|
return {
|
|
61
61
|
...sn(n),
|
|
62
62
|
...a
|
|
63
63
|
};
|
|
64
|
-
}), r =
|
|
64
|
+
}), r = O(() => an(n));
|
|
65
65
|
return (i, a) => {
|
|
66
66
|
const c = Jt, s = $t;
|
|
67
|
-
return
|
|
67
|
+
return I(), H(s, ae({ class: "jt-button" }, o.value, et(r.value)), {
|
|
68
68
|
default: U(() => [
|
|
69
|
-
i.$slots.icon ? (
|
|
69
|
+
i.$slots.icon ? (I(), H(c, {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "jt-button__icon"
|
|
72
72
|
}, {
|
|
@@ -74,15 +74,15 @@ const vo = /* @__PURE__ */ pe({
|
|
|
74
74
|
te(i.$slots, "icon", {}, void 0, !0)
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
77
|
-
})) : t.icon ? (
|
|
77
|
+
})) : t.icon ? (I(), H(c, {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "jt-button__icon"
|
|
80
80
|
}, {
|
|
81
81
|
default: U(() => [
|
|
82
|
-
(
|
|
82
|
+
(I(), H(Kt(t.icon)))
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
|
-
})) :
|
|
85
|
+
})) : fe("", !0),
|
|
86
86
|
te(i.$slots, "default", {}, void 0, !0)
|
|
87
87
|
]),
|
|
88
88
|
_: 3
|
|
@@ -94,7 +94,7 @@ const vo = /* @__PURE__ */ pe({
|
|
|
94
94
|
for (const [o, r] of t)
|
|
95
95
|
n[o] = r;
|
|
96
96
|
return n;
|
|
97
|
-
}, rt = /* @__PURE__ */ be(vo, [["__scopeId", "data-v-
|
|
97
|
+
}, rt = /* @__PURE__ */ be(vo, [["__scopeId", "data-v-fde6491e"]]), ho = {
|
|
98
98
|
// 默认值只补组件缺省体验,显式传入的 false、null 和空字符串仍由归一化逻辑保留。
|
|
99
99
|
options: () => [],
|
|
100
100
|
placeholder: Z("common.请选择"),
|
|
@@ -156,52 +156,52 @@ const yo = /* @__PURE__ */ pe({
|
|
|
156
156
|
}, ho),
|
|
157
157
|
emits: uo,
|
|
158
158
|
setup(e, { emit: t }) {
|
|
159
|
-
const n = e, o =
|
|
159
|
+
const n = e, o = O(() => go(n)), r = ge(n.modelValue);
|
|
160
160
|
Ee(
|
|
161
161
|
() => n.modelValue,
|
|
162
|
-
(
|
|
163
|
-
r.value =
|
|
162
|
+
(f) => {
|
|
163
|
+
r.value = f;
|
|
164
164
|
},
|
|
165
165
|
{ deep: !0 }
|
|
166
166
|
);
|
|
167
167
|
const i = t;
|
|
168
|
-
function a(
|
|
169
|
-
i(
|
|
168
|
+
function a(f, ...S) {
|
|
169
|
+
i(f, ...S);
|
|
170
170
|
}
|
|
171
|
-
function c(
|
|
172
|
-
r.value =
|
|
171
|
+
function c(f) {
|
|
172
|
+
r.value = f, a("update:modelValue", f);
|
|
173
173
|
}
|
|
174
|
-
function s(
|
|
175
|
-
a("change",
|
|
174
|
+
function s(f) {
|
|
175
|
+
a("change", f);
|
|
176
176
|
}
|
|
177
|
-
function l(
|
|
178
|
-
a("focus",
|
|
177
|
+
function l(f) {
|
|
178
|
+
a("focus", f);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
a("blur",
|
|
180
|
+
function g(f) {
|
|
181
|
+
a("blur", f);
|
|
182
182
|
}
|
|
183
183
|
function w() {
|
|
184
184
|
a("clear");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
a("visibleChange",
|
|
186
|
+
function $(f) {
|
|
187
|
+
a("visibleChange", f);
|
|
188
188
|
}
|
|
189
|
-
function L(
|
|
190
|
-
a("expandChange",
|
|
189
|
+
function L(f) {
|
|
190
|
+
a("expandChange", f);
|
|
191
191
|
}
|
|
192
|
-
function P(
|
|
193
|
-
a("removeTag",
|
|
192
|
+
function P(f) {
|
|
193
|
+
a("removeTag", f);
|
|
194
194
|
}
|
|
195
|
-
return (
|
|
196
|
-
const
|
|
197
|
-
return
|
|
195
|
+
return (f, S) => {
|
|
196
|
+
const M = no;
|
|
197
|
+
return I(), H(M, ae({ class: "jt-cascader" }, o.value, {
|
|
198
198
|
"model-value": r.value,
|
|
199
199
|
"onUpdate:modelValue": c,
|
|
200
200
|
onChange: s,
|
|
201
201
|
onFocus: l,
|
|
202
|
-
onBlur:
|
|
202
|
+
onBlur: g,
|
|
203
203
|
onClear: w,
|
|
204
|
-
onVisibleChange:
|
|
204
|
+
onVisibleChange: $,
|
|
205
205
|
onExpandChange: L,
|
|
206
206
|
onRemoveTag: P
|
|
207
207
|
}), null, 16, ["model-value"]);
|
|
@@ -260,7 +260,7 @@ const yo = /* @__PURE__ */ pe({
|
|
|
260
260
|
isRange: { type: Boolean }
|
|
261
261
|
},
|
|
262
262
|
setup(e) {
|
|
263
|
-
const t = e, n =
|
|
263
|
+
const t = e, n = O(
|
|
264
264
|
() => ({
|
|
265
265
|
...t,
|
|
266
266
|
startPlaceholder: t.startPlaceholder ?? (o(t.type) ? Z("common.开始日期") : void 0),
|
|
@@ -272,12 +272,12 @@ const yo = /* @__PURE__ */ pe({
|
|
|
272
272
|
}
|
|
273
273
|
return (r, i) => {
|
|
274
274
|
const a = Wt;
|
|
275
|
-
return
|
|
275
|
+
return I(), H(a, ae({ class: "jt-date-picker" }, n.value, {
|
|
276
276
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => r.$emit("update:modelValue", c))
|
|
277
277
|
}), null, 16);
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
}), So = /* @__PURE__ */ be(bo, [["__scopeId", "data-v-
|
|
280
|
+
}), So = /* @__PURE__ */ be(bo, [["__scopeId", "data-v-8a40d2aa"]]), _o = /* @__PURE__ */ pe({
|
|
281
281
|
name: "JtInput",
|
|
282
282
|
__name: "index",
|
|
283
283
|
props: {
|
|
@@ -320,7 +320,7 @@ const yo = /* @__PURE__ */ pe({
|
|
|
320
320
|
enter: () => !0
|
|
321
321
|
},
|
|
322
322
|
setup(e, { emit: t }) {
|
|
323
|
-
const n = e, o = t, r =
|
|
323
|
+
const n = e, o = t, r = O(() => Object.fromEntries(
|
|
324
324
|
Object.keys(Bt).map((i) => [
|
|
325
325
|
i,
|
|
326
326
|
(...a) => o(i, ...a)
|
|
@@ -328,12 +328,12 @@ const yo = /* @__PURE__ */ pe({
|
|
|
328
328
|
));
|
|
329
329
|
return (i, a) => {
|
|
330
330
|
const c = Zt;
|
|
331
|
-
return
|
|
331
|
+
return I(), H(c, ae({ class: "jt-input" }, n, et(r.value), {
|
|
332
332
|
onKeyup: a[0] || (a[0] = Wn((s) => o("enter"), ["enter"]))
|
|
333
333
|
}), null, 16);
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
}), ht = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-
|
|
336
|
+
}), ht = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-2cc0b532"]]), wo = /* @__PURE__ */ pe({
|
|
337
337
|
name: "JtSelect",
|
|
338
338
|
__name: "index",
|
|
339
339
|
props: {
|
|
@@ -392,10 +392,10 @@ const yo = /* @__PURE__ */ pe({
|
|
|
392
392
|
},
|
|
393
393
|
emits: Et,
|
|
394
394
|
setup(e, { emit: t }) {
|
|
395
|
-
const n = e, o =
|
|
395
|
+
const n = e, o = O(() => {
|
|
396
396
|
const { options: a, ...c } = n;
|
|
397
397
|
return c;
|
|
398
|
-
}), r = t, i =
|
|
398
|
+
}), r = t, i = O(() => Object.fromEntries(
|
|
399
399
|
Object.keys(Et).map((a) => [
|
|
400
400
|
a,
|
|
401
401
|
(...c) => r(a, ...c)
|
|
@@ -403,18 +403,18 @@ const yo = /* @__PURE__ */ pe({
|
|
|
403
403
|
));
|
|
404
404
|
return (a, c) => {
|
|
405
405
|
const s = Xt, l = Qt;
|
|
406
|
-
return
|
|
406
|
+
return I(), H(l, ae({ class: "jt-select" }, o.value, et(i.value)), {
|
|
407
407
|
default: U(() => [
|
|
408
|
-
(
|
|
409
|
-
key:
|
|
408
|
+
(I(!0), G(Se, null, ye(a.options ?? [], (g) => (I(), H(s, ae({
|
|
409
|
+
key: g.value,
|
|
410
410
|
ref_for: !0
|
|
411
|
-
},
|
|
411
|
+
}, g), null, 16))), 128))
|
|
412
412
|
]),
|
|
413
413
|
_: 1
|
|
414
414
|
}, 16);
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
}), Io = /* @__PURE__ */ be(wo, [["__scopeId", "data-v-
|
|
417
|
+
}), Io = /* @__PURE__ */ be(wo, [["__scopeId", "data-v-32dcf973"]]), $o = { class: "jt-form-items" }, gt = 4, Co = /* @__PURE__ */ pe({
|
|
418
418
|
name: "JTFormItems",
|
|
419
419
|
__name: "JtFormItems",
|
|
420
420
|
props: {
|
|
@@ -434,100 +434,100 @@ const yo = /* @__PURE__ */ pe({
|
|
|
434
434
|
daterange: "date-picker",
|
|
435
435
|
"date-range": "date-picker",
|
|
436
436
|
dateRange: "date-picker"
|
|
437
|
-
}, r = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), i = Object.keys(n), a = /* @__PURE__ */ new Map(), c =
|
|
438
|
-
const { itemType:
|
|
439
|
-
if (!
|
|
440
|
-
if (typeof
|
|
441
|
-
const
|
|
442
|
-
return i.includes(
|
|
443
|
-
`[JtFormItems] 不支持的 itemType: "${
|
|
437
|
+
}, r = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), i = Object.keys(n), a = /* @__PURE__ */ new Map(), c = O(() => t.configs.filter((h) => h.show !== !1)), s = (h) => {
|
|
438
|
+
const { itemType: v } = h;
|
|
439
|
+
if (!v) return ht;
|
|
440
|
+
if (typeof v != "string") return v;
|
|
441
|
+
const F = o[v] ?? v;
|
|
442
|
+
return i.includes(F) ? n[F] : (console.error(
|
|
443
|
+
`[JtFormItems] 不支持的 itemType: "${v}",支持的类型: ${i.join(", ")}`
|
|
444
444
|
), ht);
|
|
445
445
|
}, l = (h) => {
|
|
446
|
-
const
|
|
446
|
+
const v = sn(h, r);
|
|
447
447
|
return h.itemType === "select" || h.itemType === "remote-select" || h.itemType === "cascader" ? {
|
|
448
|
-
...
|
|
448
|
+
...v,
|
|
449
449
|
options: h.options
|
|
450
450
|
} : N(h.itemType) ? {
|
|
451
|
-
...
|
|
451
|
+
...v,
|
|
452
452
|
type: "daterange"
|
|
453
|
-
} :
|
|
454
|
-
},
|
|
453
|
+
} : v;
|
|
454
|
+
}, g = (h) => an(h, r), w = (h) => ({
|
|
455
455
|
rules: h.rules,
|
|
456
456
|
...h.formItemProps
|
|
457
|
-
}),
|
|
458
|
-
t.formData[h] =
|
|
457
|
+
}), $ = (h, v) => {
|
|
458
|
+
t.formData[h] = v;
|
|
459
459
|
};
|
|
460
460
|
function L(h) {
|
|
461
|
-
return (
|
|
462
|
-
if (
|
|
463
|
-
a.set(h,
|
|
461
|
+
return (v) => {
|
|
462
|
+
if (v) {
|
|
463
|
+
a.set(h, v);
|
|
464
464
|
return;
|
|
465
465
|
}
|
|
466
466
|
a.delete(h);
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function P(h,
|
|
469
|
+
function P(h, v) {
|
|
470
470
|
Zn(() => {
|
|
471
|
-
a.get(h)?.validate(
|
|
471
|
+
a.get(h)?.validate(v).catch(() => {
|
|
472
472
|
});
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
(
|
|
475
|
+
const f = (h) => Math.min(Math.max(Math.trunc(h || 1), 1), 4), S = O(() => {
|
|
476
|
+
const v = c.value.reduce(
|
|
477
|
+
(F, y) => F + f(t.span || y.span),
|
|
478
478
|
0
|
|
479
479
|
) % gt;
|
|
480
|
-
return
|
|
480
|
+
return v === 0 ? {
|
|
481
481
|
gridColumn: `1 / span ${gt}`
|
|
482
482
|
} : {
|
|
483
|
-
gridColumn: `${
|
|
483
|
+
gridColumn: `${v + 1} / span ${gt - v}`
|
|
484
484
|
};
|
|
485
|
-
}),
|
|
486
|
-
gridColumn: `span ${
|
|
485
|
+
}), M = (h) => ({
|
|
486
|
+
gridColumn: `span ${f(t.span || h.span)}`
|
|
487
487
|
});
|
|
488
488
|
function N(h) {
|
|
489
489
|
return h === "daterange" || h === "date-range" || h === "dateRange";
|
|
490
490
|
}
|
|
491
|
-
return (h,
|
|
492
|
-
const
|
|
493
|
-
return
|
|
494
|
-
(
|
|
495
|
-
key:
|
|
491
|
+
return (h, v) => {
|
|
492
|
+
const F = en;
|
|
493
|
+
return I(), G("div", $o, [
|
|
494
|
+
(I(!0), G(Se, null, ye(c.value, (y) => (I(), H(F, ae({
|
|
495
|
+
key: y.prop,
|
|
496
496
|
ref_for: !0,
|
|
497
|
-
ref: L(
|
|
497
|
+
ref: L(y.prop),
|
|
498
498
|
class: "jt-form-items__item",
|
|
499
|
-
style:
|
|
500
|
-
label:
|
|
501
|
-
prop:
|
|
502
|
-
}, w(
|
|
499
|
+
style: M(y),
|
|
500
|
+
label: y.label,
|
|
501
|
+
prop: y.prop
|
|
502
|
+
}, w(y)), {
|
|
503
503
|
default: U(() => [
|
|
504
|
-
|
|
504
|
+
y.showSlot ? te(h.$slots, y.prop, { key: 0 }, void 0, !0) : (I(), H(Kt(s(y)), ae({
|
|
505
505
|
key: 1,
|
|
506
|
-
"model-value": h.formData[
|
|
506
|
+
"model-value": h.formData[y.prop],
|
|
507
507
|
ref_for: !0
|
|
508
|
-
}, l(
|
|
509
|
-
"onUpdate:modelValue": (A) =>
|
|
510
|
-
onChange: () => P(
|
|
511
|
-
onBlur: () => P(
|
|
508
|
+
}, l(y), et(g(y)), {
|
|
509
|
+
"onUpdate:modelValue": (A) => $(y.prop, A),
|
|
510
|
+
onChange: () => P(y.prop, "change"),
|
|
511
|
+
onBlur: () => P(y.prop, "blur")
|
|
512
512
|
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
513
513
|
]),
|
|
514
514
|
_: 2
|
|
515
515
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
516
|
-
h.$slots.actions ? (
|
|
516
|
+
h.$slots.actions ? (I(), H(F, {
|
|
517
517
|
key: 0,
|
|
518
518
|
class: "jt-form-items__actions",
|
|
519
|
-
style: Yt(
|
|
519
|
+
style: Yt(S.value)
|
|
520
520
|
}, {
|
|
521
521
|
default: U(() => [
|
|
522
522
|
te(h.$slots, "actions", {}, void 0, !0)
|
|
523
523
|
]),
|
|
524
524
|
_: 3
|
|
525
|
-
}, 8, ["style"])) :
|
|
525
|
+
}, 8, ["style"])) : fe("", !0)
|
|
526
526
|
]);
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
}), ko = /* @__PURE__ */ be(Co, [["__scopeId", "data-v-
|
|
530
|
-
function
|
|
529
|
+
}), ko = /* @__PURE__ */ be(Co, [["__scopeId", "data-v-f91fea34"]]);
|
|
530
|
+
function To() {
|
|
531
531
|
const e = ge(!1);
|
|
532
532
|
function t() {
|
|
533
533
|
e.value = !0;
|
|
@@ -541,7 +541,7 @@ function Mo() {
|
|
|
541
541
|
searchDone: n
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
const
|
|
544
|
+
const Mo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='-0.5'%20width='11'%20height='11'%20rx='5.5'%20transform='matrix(1%200%200%20-1%201%2012)'%20stroke='%23999999'/%3e%3cpath%20d='M10%208.16064L7%205.16064L4%208.16064'%20stroke='%23999999'/%3e%3c/svg%3e", Oo = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.375%207.00017C2.375%207.27631%202.59886%207.50017%202.875%207.50017C3.15114%207.50017%203.375%207.27631%203.375%207.00017H2.875H2.375ZM2.875%207.00017H3.375C3.375%204.46334%205.41801%202.41406%207.93713%202.41406V1.91406V1.41406C4.86127%201.41406%202.375%203.91551%202.375%207.00017H2.875ZM7.93713%201.91406V2.41406C10.4563%202.41406%2012.4993%204.46334%2012.4993%207.00017H12.9993H13.4993C13.4993%203.91551%2011.013%201.41406%207.93713%201.41406V1.91406ZM12.9993%207.00017H12.4993C12.4993%209.537%2010.4563%2011.5863%207.93713%2011.5863V12.0863V12.5863C11.013%2012.5863%2013.4993%2010.0848%2013.4993%207.00017H12.9993ZM7.93713%2012.0863V11.5863C6.68975%2011.5863%205.55663%2011.0806%204.72892%2010.2635L4.37765%2010.6193L4.02638%2010.9752C5.0317%2011.9676%206.41366%2012.5863%207.93713%2012.5863V12.0863Z'%20fill='%23999999'/%3e%3cpath%20d='M4.75131%206.0102L2.88631%207.88403L1%205.99414'%20stroke='%23999999'%20stroke-miterlimit='10'/%3e%3c/svg%3e", Do = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.60938%2012.1099C9.64694%2012.1099%2012.1094%209.64743%2012.1094%206.60986C12.1094%203.5723%209.64694%201.10986%206.60938%201.10986C3.57181%201.10986%201.10938%203.5723%201.10938%206.60986C1.10938%209.64743%203.57181%2012.1099%206.60938%2012.1099Z'%20stroke='white'%20stroke-miterlimit='10'/%3e%3cpath%20d='M12.4993%2012.5002L10.2832%2010.3301'%20stroke='white'%20stroke-miterlimit='10'/%3e%3c/svg%3e", Fo = { class: "jt-filter-bar__btns" }, Bo = ["src"], Eo = ["src"], Lo = ["src"], Vo = /* @__PURE__ */ pe({
|
|
545
545
|
name: "JtFilterBar",
|
|
546
546
|
__name: "JtFilterBar",
|
|
547
547
|
props: {
|
|
@@ -551,97 +551,97 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
551
551
|
},
|
|
552
552
|
emits: ["update:modelValue", "search", "reset"],
|
|
553
553
|
setup(e, { expose: t, emit: n }) {
|
|
554
|
-
const o = e, r = n, i = ge(), a = Le(), c = ge({}), { searchDisabled: s, searchLoading: l, searchDone:
|
|
555
|
-
() => o.columns.filter((
|
|
556
|
-
), P =
|
|
554
|
+
const o = e, r = n, i = ge(), a = Le(), c = ge({}), { searchDisabled: s, searchLoading: l, searchDone: g } = To(), w = O(() => o.option), $ = ge(w.value.searchCollapsed ?? !0), L = O(
|
|
555
|
+
() => o.columns.filter((T) => T.search === !0)
|
|
556
|
+
), P = O(
|
|
557
557
|
() => Math.max(1, w.value.searchSpan ?? 4)
|
|
558
|
-
),
|
|
558
|
+
), f = O(
|
|
559
559
|
() => Math.max(1, w.value.searchCollapsedRows ?? 1)
|
|
560
|
-
),
|
|
561
|
-
() => Math.max(1,
|
|
562
|
-
), N =
|
|
563
|
-
() =>
|
|
564
|
-
),
|
|
560
|
+
), S = O(() => P.value), M = O(
|
|
561
|
+
() => Math.max(1, S.value * f.value)
|
|
562
|
+
), N = O(() => P.value), h = O(
|
|
563
|
+
() => j.value ? "264px" : "174px"
|
|
564
|
+
), v = O(
|
|
565
565
|
() => K(w.value.searchLabelWidth ?? 84)
|
|
566
|
-
),
|
|
566
|
+
), F = O(
|
|
567
567
|
() => w.value.searchLabelPosition ?? "top"
|
|
568
|
-
),
|
|
569
|
-
() =>
|
|
570
|
-
), A =
|
|
571
|
-
() =>
|
|
572
|
-
),
|
|
568
|
+
), y = O(
|
|
569
|
+
() => q(w.value.searchGutter, 16)
|
|
570
|
+
), A = O(
|
|
571
|
+
() => q(w.value.searchRowGap, 10)
|
|
572
|
+
), b = O(
|
|
573
573
|
() => Q(w.value.searchPadding ?? "18px 4px 0")
|
|
574
|
-
),
|
|
575
|
-
if (!
|
|
576
|
-
let
|
|
574
|
+
), j = O(() => w.value.searchCollapse === !1 ? !1 : x(L.value) > M.value), C = O(() => {
|
|
575
|
+
if (!j.value || !$.value) return L.value;
|
|
576
|
+
let T = 0;
|
|
577
577
|
return L.value.filter((X) => {
|
|
578
|
-
const
|
|
579
|
-
return
|
|
578
|
+
const ue = V(X);
|
|
579
|
+
return T + ue > M.value ? !1 : (T += ue, !0);
|
|
580
580
|
});
|
|
581
|
-
}),
|
|
582
|
-
() =>
|
|
583
|
-
), re =
|
|
584
|
-
const
|
|
585
|
-
return
|
|
586
|
-
}), le =
|
|
587
|
-
const
|
|
588
|
-
return `${Math.min(P.value,
|
|
589
|
-
}), R =
|
|
590
|
-
() =>
|
|
581
|
+
}), z = O(
|
|
582
|
+
() => C.value.filter((T) => !!a[`${T.prop}-search`])
|
|
583
|
+
), re = O(() => {
|
|
584
|
+
const T = x(C.value);
|
|
585
|
+
return C.value.length > 0 && C.value.length <= 2 && T < P.value;
|
|
586
|
+
}), le = O(() => {
|
|
587
|
+
const T = x(C.value);
|
|
588
|
+
return `${Math.min(P.value, T + 1)}`;
|
|
589
|
+
}), R = O(
|
|
590
|
+
() => C.value.map((T) => E(T))
|
|
591
591
|
);
|
|
592
592
|
Ee(
|
|
593
593
|
() => w.value.searchCollapsed,
|
|
594
|
-
(
|
|
595
|
-
typeof
|
|
594
|
+
(T) => {
|
|
595
|
+
typeof T == "boolean" && ($.value = T);
|
|
596
596
|
}
|
|
597
597
|
), Ee(
|
|
598
598
|
() => o.modelValue,
|
|
599
|
-
(
|
|
600
|
-
c.value = { ...
|
|
599
|
+
(T) => {
|
|
600
|
+
c.value = { ...T };
|
|
601
601
|
},
|
|
602
602
|
{ deep: !0, immediate: !0 }
|
|
603
603
|
);
|
|
604
|
-
function
|
|
604
|
+
function B(T, X) {
|
|
605
605
|
if (s.value) return;
|
|
606
|
-
const
|
|
607
|
-
c.value =
|
|
606
|
+
const ue = { ...c.value, [T]: X };
|
|
607
|
+
c.value = ue, r("update:modelValue", ue);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
const X =
|
|
609
|
+
function E(T) {
|
|
610
|
+
const X = T.searchProps ?? {}, ue = T.searchType ?? "input";
|
|
611
611
|
return {
|
|
612
612
|
...X,
|
|
613
|
-
prop:
|
|
614
|
-
label:
|
|
615
|
-
span:
|
|
616
|
-
itemType:
|
|
613
|
+
prop: T.prop,
|
|
614
|
+
label: T.searchLabel ?? T.label,
|
|
615
|
+
span: V(T),
|
|
616
|
+
itemType: ue,
|
|
617
617
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
618
|
-
showSlot: !!a[`${
|
|
619
|
-
options: X.options ??
|
|
620
|
-
placeholder: X.placeholder ??
|
|
621
|
-
valueFormat: X.valueFormat ??
|
|
618
|
+
showSlot: !!a[`${T.prop}-search`],
|
|
619
|
+
options: X.options ?? T.searchOptions ?? T.dicData,
|
|
620
|
+
placeholder: X.placeholder ?? T.searchPlaceholder,
|
|
621
|
+
valueFormat: X.valueFormat ?? T.searchValueFormat,
|
|
622
622
|
disabled: s.value || X.disabled === !0,
|
|
623
623
|
formItemProps: {
|
|
624
|
-
required:
|
|
625
|
-
class: ["jt-filter-bar__item", { "is-required":
|
|
624
|
+
required: T.searchRequired,
|
|
625
|
+
class: ["jt-filter-bar__item", { "is-required": T.searchRequired }]
|
|
626
626
|
},
|
|
627
627
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
628
|
-
onEnter: (...
|
|
629
|
-
|
|
628
|
+
onEnter: (...de) => {
|
|
629
|
+
d(X.onEnter, ...de), u();
|
|
630
630
|
},
|
|
631
631
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
632
|
-
"onUpdate:modelValue": (
|
|
633
|
-
|
|
632
|
+
"onUpdate:modelValue": (de) => {
|
|
633
|
+
d(X["onUpdate:modelValue"], de), B(T.prop, de);
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
if (Array.isArray(
|
|
639
|
-
|
|
637
|
+
function d(T, ...X) {
|
|
638
|
+
if (Array.isArray(T)) {
|
|
639
|
+
T.forEach((ue) => d(ue, ...X));
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
typeof
|
|
642
|
+
typeof T == "function" && T(...X);
|
|
643
643
|
}
|
|
644
|
-
async function
|
|
644
|
+
async function u() {
|
|
645
645
|
if (!s.value) {
|
|
646
646
|
if (i.value)
|
|
647
647
|
try {
|
|
@@ -652,26 +652,26 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
652
652
|
r("search");
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function _() {
|
|
656
656
|
s.value || r("reset");
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
|
|
658
|
+
function D() {
|
|
659
|
+
$.value = !$.value;
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
return Math.min(P.value, Math.max(1,
|
|
661
|
+
function V(T) {
|
|
662
|
+
return Math.min(P.value, Math.max(1, T.searchSpan ?? 1));
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
664
|
+
function x(T) {
|
|
665
|
+
return T.reduce((X, ue) => X + V(ue), 0);
|
|
666
666
|
}
|
|
667
|
-
function K(
|
|
668
|
-
return typeof
|
|
667
|
+
function K(T) {
|
|
668
|
+
return typeof T == "number" ? `${T}px` : T;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
return typeof
|
|
670
|
+
function q(T, X) {
|
|
671
|
+
return typeof T == "number" ? T : X;
|
|
672
672
|
}
|
|
673
|
-
function Q(
|
|
674
|
-
return typeof
|
|
673
|
+
function Q(T) {
|
|
674
|
+
return typeof T == "number" ? `${T}px` : T;
|
|
675
675
|
}
|
|
676
676
|
return t({
|
|
677
677
|
/** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
|
|
@@ -681,12 +681,12 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
681
681
|
/** 开启筛选表单禁用。 */
|
|
682
682
|
searchLoading: l,
|
|
683
683
|
/** 关闭筛选表单禁用。 */
|
|
684
|
-
searchDone:
|
|
685
|
-
}), (
|
|
686
|
-
const
|
|
687
|
-
return
|
|
684
|
+
searchDone: g
|
|
685
|
+
}), (T, X) => {
|
|
686
|
+
const ue = tn;
|
|
687
|
+
return I(), G("div", {
|
|
688
688
|
class: We(["jt-filter-bar", [
|
|
689
|
-
`is-label-${
|
|
689
|
+
`is-label-${F.value}`,
|
|
690
690
|
{ "is-single-filter": re.value }
|
|
691
691
|
]]),
|
|
692
692
|
style: Yt({
|
|
@@ -694,19 +694,19 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
694
694
|
"--jt-filter-field-columns": N.value,
|
|
695
695
|
"--jt-filter-btns-width": h.value,
|
|
696
696
|
"--jt-filter-actions-start": le.value,
|
|
697
|
-
"--jt-filter-label-width":
|
|
698
|
-
"--jt-filter-column-gap": `${
|
|
697
|
+
"--jt-filter-label-width": v.value,
|
|
698
|
+
"--jt-filter-column-gap": `${y.value}px`,
|
|
699
699
|
"--jt-filter-row-gap": `${A.value}px`,
|
|
700
|
-
"--jt-filter-padding":
|
|
700
|
+
"--jt-filter-padding": b.value
|
|
701
701
|
})
|
|
702
702
|
}, [
|
|
703
|
-
Ie(
|
|
703
|
+
Ie(ue, {
|
|
704
704
|
ref_key: "formRef",
|
|
705
705
|
ref: i,
|
|
706
706
|
class: "jt-filter-bar__form",
|
|
707
707
|
model: c.value,
|
|
708
|
-
"label-position":
|
|
709
|
-
"label-width":
|
|
708
|
+
"label-position": F.value,
|
|
709
|
+
"label-width": v.value,
|
|
710
710
|
disabled: J(s),
|
|
711
711
|
onSubmit: X[0] || (X[0] = Ut(() => {
|
|
712
712
|
}, ["prevent"]))
|
|
@@ -719,36 +719,36 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
719
719
|
}, Re({
|
|
720
720
|
actions: U(() => [
|
|
721
721
|
ne("div", Fo, [
|
|
722
|
-
te(
|
|
723
|
-
search:
|
|
724
|
-
reset:
|
|
722
|
+
te(T.$slots, "search-menu", {
|
|
723
|
+
search: u,
|
|
724
|
+
reset: _,
|
|
725
725
|
disabled: J(s),
|
|
726
|
-
collapsed:
|
|
727
|
-
toggleCollapse:
|
|
726
|
+
collapsed: $.value,
|
|
727
|
+
toggleCollapse: D
|
|
728
728
|
}, () => [
|
|
729
|
-
|
|
729
|
+
j.value ? (I(), H(J(rt), {
|
|
730
730
|
key: 0,
|
|
731
731
|
class: "jt-filter-bar__btn-collapse",
|
|
732
732
|
size: "small",
|
|
733
|
-
onClick:
|
|
733
|
+
onClick: D
|
|
734
734
|
}, {
|
|
735
735
|
icon: U(() => [
|
|
736
736
|
ne("img", {
|
|
737
|
-
class: We(["jt-filter-bar__icon-arrow", { "is-collapsed":
|
|
738
|
-
src: J(
|
|
737
|
+
class: We(["jt-filter-bar__icon-arrow", { "is-collapsed": $.value }]),
|
|
738
|
+
src: J(Mo),
|
|
739
739
|
alt: ""
|
|
740
740
|
}, null, 10, Bo)
|
|
741
741
|
]),
|
|
742
742
|
default: U(() => [
|
|
743
|
-
ne("span", null, oe(
|
|
743
|
+
ne("span", null, oe($.value ? J(Z)("common.展开") : J(Z)("common.收起")), 1)
|
|
744
744
|
]),
|
|
745
745
|
_: 1
|
|
746
|
-
})) :
|
|
746
|
+
})) : fe("", !0),
|
|
747
747
|
Ie(J(rt), {
|
|
748
748
|
class: "jt-filter-bar__btn-reset",
|
|
749
749
|
size: "small",
|
|
750
750
|
disabled: J(s),
|
|
751
|
-
onClick:
|
|
751
|
+
onClick: _
|
|
752
752
|
}, {
|
|
753
753
|
icon: U(() => [
|
|
754
754
|
ne("img", {
|
|
@@ -766,7 +766,7 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
766
766
|
type: "primary",
|
|
767
767
|
size: "small",
|
|
768
768
|
disabled: J(s),
|
|
769
|
-
onClick:
|
|
769
|
+
onClick: u
|
|
770
770
|
}, {
|
|
771
771
|
icon: U(() => [
|
|
772
772
|
ne("img", {
|
|
@@ -784,15 +784,15 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
784
784
|
]),
|
|
785
785
|
_: 2
|
|
786
786
|
}, [
|
|
787
|
-
ye(
|
|
788
|
-
name:
|
|
787
|
+
ye(z.value, (de) => ({
|
|
788
|
+
name: de.prop,
|
|
789
789
|
fn: U(() => [
|
|
790
|
-
te(
|
|
791
|
-
value: c.value[
|
|
792
|
-
column:
|
|
793
|
-
setValue: (me) =>
|
|
794
|
-
search:
|
|
795
|
-
reset:
|
|
790
|
+
te(T.$slots, `${de.prop}-search`, {
|
|
791
|
+
value: c.value[de.prop],
|
|
792
|
+
column: de,
|
|
793
|
+
setValue: (me) => B(de.prop, me),
|
|
794
|
+
search: u,
|
|
795
|
+
reset: _,
|
|
796
796
|
disabled: J(s)
|
|
797
797
|
}, void 0, !0)
|
|
798
798
|
])
|
|
@@ -804,7 +804,7 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
804
804
|
], 6);
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
}), Po = /* @__PURE__ */ be(Vo, [["__scopeId", "data-v-
|
|
807
|
+
}), Po = /* @__PURE__ */ be(Vo, [["__scopeId", "data-v-e492ba95"]]), jo = { key: 1 }, Ao = { key: 2 }, Ro = { key: 3 }, No = /* @__PURE__ */ pe({
|
|
808
808
|
name: "JtTable",
|
|
809
809
|
__name: "JtTable",
|
|
810
810
|
props: {
|
|
@@ -814,91 +814,91 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
814
814
|
tableEvents: {}
|
|
815
815
|
},
|
|
816
816
|
setup(e, { expose: t }) {
|
|
817
|
-
const n = e, o = Le(), r = ge(), i =
|
|
818
|
-
function s(
|
|
819
|
-
return !!o[`${
|
|
817
|
+
const n = e, o = Le(), r = ge(), i = O(() => n.option ?? {}), a = O(() => n.columns.filter((f) => !f.hide)), c = O(() => i.value.menuFixed ?? "right");
|
|
818
|
+
function s(f) {
|
|
819
|
+
return !!o[`${f}-header`];
|
|
820
820
|
}
|
|
821
|
-
function l(
|
|
822
|
-
return !!o[`${
|
|
821
|
+
function l(f) {
|
|
822
|
+
return !!o[`${f}-data`];
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function g(f) {
|
|
825
825
|
return {
|
|
826
|
-
width:
|
|
827
|
-
minWidth:
|
|
828
|
-
align:
|
|
829
|
-
fixed:
|
|
830
|
-
sortable:
|
|
831
|
-
showOverflowTooltip:
|
|
832
|
-
...
|
|
826
|
+
width: f.width,
|
|
827
|
+
minWidth: f.minWidth,
|
|
828
|
+
align: f.align || "center",
|
|
829
|
+
fixed: f.fixed,
|
|
830
|
+
sortable: f.sortable,
|
|
831
|
+
showOverflowTooltip: f.showOverflowTooltip ?? w(f),
|
|
832
|
+
...f.columnOptions
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
|
-
function w(
|
|
836
|
-
return !l(
|
|
835
|
+
function w(f) {
|
|
836
|
+
return !l(f.prop) && !L(f.columnOptions?.type);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
return !L(
|
|
838
|
+
function $(f) {
|
|
839
|
+
return !L(f.columnOptions?.type);
|
|
840
840
|
}
|
|
841
|
-
function L(
|
|
842
|
-
return
|
|
841
|
+
function L(f) {
|
|
842
|
+
return f === "selection" || f === "index" || f === "expand";
|
|
843
843
|
}
|
|
844
|
-
function P(
|
|
845
|
-
return
|
|
844
|
+
function P(f, S) {
|
|
845
|
+
return f.find((M) => M.value === S)?.label ?? String(S ?? "");
|
|
846
846
|
}
|
|
847
|
-
return t({ tableRef: r }), (
|
|
848
|
-
const
|
|
849
|
-
return
|
|
847
|
+
return t({ tableRef: r }), (f, S) => {
|
|
848
|
+
const M = on, N = nn;
|
|
849
|
+
return I(), H(N, ae({
|
|
850
850
|
ref_key: "tableRef",
|
|
851
851
|
ref: r,
|
|
852
|
-
data:
|
|
852
|
+
data: f.data,
|
|
853
853
|
"row-key": i.value.rowKey ?? "id",
|
|
854
854
|
"empty-text": i.value.emptyText,
|
|
855
855
|
class: "jt-table"
|
|
856
|
-
}, i.value.tableProps, et(
|
|
856
|
+
}, i.value.tableProps, et(f.tableEvents)), {
|
|
857
857
|
default: U(() => [
|
|
858
|
-
i.value.selection ? (
|
|
858
|
+
i.value.selection ? (I(), H(M, {
|
|
859
859
|
key: 0,
|
|
860
860
|
type: "selection",
|
|
861
861
|
width: "55",
|
|
862
862
|
align: "center"
|
|
863
|
-
})) :
|
|
864
|
-
i.value.index ? (
|
|
863
|
+
})) : fe("", !0),
|
|
864
|
+
i.value.index ? (I(), H(M, {
|
|
865
865
|
key: 1,
|
|
866
866
|
type: "index",
|
|
867
867
|
label: i.value.indexLabel ?? J(Z)("common.序号"),
|
|
868
868
|
width: "60",
|
|
869
869
|
align: "center"
|
|
870
|
-
}, null, 8, ["label"])) :
|
|
871
|
-
(
|
|
870
|
+
}, null, 8, ["label"])) : fe("", !0),
|
|
871
|
+
(I(!0), G(Se, null, ye(a.value, (h) => (I(), H(M, ae({
|
|
872
872
|
key: h.prop,
|
|
873
873
|
prop: h.prop,
|
|
874
874
|
label: h.label,
|
|
875
875
|
formatter: !l(h.prop) && !h.dicData ? h.formatter : void 0,
|
|
876
876
|
ref_for: !0
|
|
877
|
-
},
|
|
877
|
+
}, g(h)), Re({ _: 2 }, [
|
|
878
878
|
s(h.prop) ? {
|
|
879
879
|
name: "header",
|
|
880
|
-
fn: U((
|
|
881
|
-
te(
|
|
880
|
+
fn: U((v) => [
|
|
881
|
+
te(f.$slots, `${h.prop}-header`, ae({ ref_for: !0 }, v), void 0, !0)
|
|
882
882
|
]),
|
|
883
883
|
key: "0"
|
|
884
884
|
} : void 0,
|
|
885
|
-
|
|
885
|
+
$(h) ? {
|
|
886
886
|
name: "default",
|
|
887
|
-
fn: U((
|
|
888
|
-
l(h.prop) ? te(
|
|
887
|
+
fn: U((v) => [
|
|
888
|
+
l(h.prop) ? te(f.$slots, `${h.prop}-data`, ae({
|
|
889
889
|
key: 0,
|
|
890
890
|
ref_for: !0
|
|
891
|
-
},
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
)), 1)) : (
|
|
891
|
+
}, v), void 0, !0) : h.dicData ? (I(), G("span", jo, oe(P(h.dicData, v.row[h.prop])), 1)) : h.formatter ? (I(), G("span", Ao, oe(h.formatter(
|
|
892
|
+
v.row,
|
|
893
|
+
v.column,
|
|
894
|
+
v.row[h.prop],
|
|
895
|
+
v.$index
|
|
896
|
+
)), 1)) : (I(), G("span", Ro, oe(v.row[h.prop]), 1))
|
|
897
897
|
]),
|
|
898
898
|
key: "1"
|
|
899
899
|
} : void 0
|
|
900
900
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
901
|
-
i.value.menu ? (
|
|
901
|
+
i.value.menu ? (I(), H(M, {
|
|
902
902
|
key: 2,
|
|
903
903
|
label: i.value.menuLabel ?? J(Z)("common.操作"),
|
|
904
904
|
width: i.value.menuWidth,
|
|
@@ -907,16 +907,16 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
907
907
|
fixed: c.value
|
|
908
908
|
}, {
|
|
909
909
|
default: U((h) => [
|
|
910
|
-
te(
|
|
910
|
+
te(f.$slots, "menu", Oe(Be(h)), void 0, !0)
|
|
911
911
|
]),
|
|
912
912
|
_: 3
|
|
913
|
-
}, 8, ["label", "width", "min-width", "align", "fixed"])) :
|
|
913
|
+
}, 8, ["label", "width", "min-width", "align", "fixed"])) : fe("", !0)
|
|
914
914
|
]),
|
|
915
915
|
_: 3
|
|
916
916
|
}, 16, ["data", "row-key", "empty-text"]);
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
|
-
}), zo = /* @__PURE__ */ be(No, [["__scopeId", "data-v-
|
|
919
|
+
}), zo = /* @__PURE__ */ be(No, [["__scopeId", "data-v-6a3d1d32"]]), xo = { class: "jt-pagination" }, qo = { class: "jt-pagination__count" }, Go = /* @__PURE__ */ pe({
|
|
920
920
|
name: "JtPagination",
|
|
921
921
|
__name: "JtPagination",
|
|
922
922
|
props: {
|
|
@@ -927,13 +927,13 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
927
927
|
},
|
|
928
928
|
emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
|
|
929
929
|
setup(e, { emit: t }) {
|
|
930
|
-
const n = e, o =
|
|
930
|
+
const n = e, o = O(() => n.option ?? {}), r = t;
|
|
931
931
|
function i(a) {
|
|
932
932
|
r("current-change", a), r("page-change", a);
|
|
933
933
|
}
|
|
934
934
|
return (a, c) => {
|
|
935
935
|
const s = oo;
|
|
936
|
-
return
|
|
936
|
+
return I(), G("div", xo, [
|
|
937
937
|
Ie(s, {
|
|
938
938
|
"current-page": a.currentPage,
|
|
939
939
|
"page-size": a.pageSize,
|
|
@@ -949,7 +949,7 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
949
949
|
]);
|
|
950
950
|
};
|
|
951
951
|
}
|
|
952
|
-
}), Ko = /* @__PURE__ */ be(Go, [["__scopeId", "data-v-
|
|
952
|
+
}), Ko = /* @__PURE__ */ be(Go, [["__scopeId", "data-v-37c16fce"]]), Yo = { class: "jt-crud-table" }, Uo = { class: "filter-bar-box" }, Ho = { class: "jt-crud-table__result" }, Jo = { class: "jt-crud-table__table-group" }, Wo = {
|
|
953
953
|
key: 0,
|
|
954
954
|
class: "jt-crud-table__toolbar"
|
|
955
955
|
}, Zo = /* @__PURE__ */ pe({
|
|
@@ -973,118 +973,118 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
973
973
|
}),
|
|
974
974
|
emits: /* @__PURE__ */ Ft(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
975
975
|
setup(e, { expose: t, emit: n }) {
|
|
976
|
-
const o = e, r = n, i = vt(e, "currentPage"), a = vt(e, "pageSize"), c = vt(e, "searchModel"), s = Le(), l = ge(),
|
|
976
|
+
const o = e, r = n, i = vt(e, "currentPage"), a = vt(e, "pageSize"), c = vt(e, "searchModel"), s = Le(), l = ge(), g = ge(), w = O(() => o.option), $ = O(() => w.value.searchShow !== !1), L = O(
|
|
977
977
|
() => w.value.paginationShow !== !1
|
|
978
|
-
), P =
|
|
979
|
-
() => o.columns.filter((
|
|
980
|
-
),
|
|
981
|
-
() => o.columns.filter((
|
|
982
|
-
),
|
|
983
|
-
() => o.columns.filter((
|
|
978
|
+
), P = O(
|
|
979
|
+
() => o.columns.filter((y) => y.search && !!s[`${y.prop}-search`])
|
|
980
|
+
), f = O(
|
|
981
|
+
() => o.columns.filter((y) => !y.hide && !!s[`${y.prop}-header`])
|
|
982
|
+
), S = O(
|
|
983
|
+
() => o.columns.filter((y) => !y.hide && !!s[`${y.prop}-data`])
|
|
984
984
|
);
|
|
985
|
-
function
|
|
986
|
-
const
|
|
985
|
+
function M() {
|
|
986
|
+
const y = {};
|
|
987
987
|
return o.columns.forEach((A) => {
|
|
988
|
-
A.search && (
|
|
989
|
-
}),
|
|
988
|
+
A.search && (y[A.prop] = void 0);
|
|
989
|
+
}), y;
|
|
990
990
|
}
|
|
991
991
|
function N() {
|
|
992
992
|
r("search", { ...c.value });
|
|
993
993
|
}
|
|
994
994
|
function h() {
|
|
995
|
-
c.value =
|
|
995
|
+
c.value = M(), r("reset");
|
|
996
996
|
}
|
|
997
|
-
function
|
|
998
|
-
|
|
997
|
+
function v() {
|
|
998
|
+
g.value?.searchLoading();
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1001
|
-
|
|
1000
|
+
function F() {
|
|
1001
|
+
g.value?.searchDone();
|
|
1002
1002
|
}
|
|
1003
1003
|
return t({
|
|
1004
1004
|
/** 获取内部 el-table 实例 */
|
|
1005
|
-
tableRef:
|
|
1005
|
+
tableRef: O(() => l.value?.tableRef),
|
|
1006
1006
|
/** 获取内部筛选条实例 */
|
|
1007
|
-
filterBarRef:
|
|
1007
|
+
filterBarRef: g,
|
|
1008
1008
|
/** 开启筛选表单禁用。 */
|
|
1009
|
-
searchLoading:
|
|
1009
|
+
searchLoading: v,
|
|
1010
1010
|
/** 关闭筛选表单禁用。 */
|
|
1011
|
-
searchDone:
|
|
1012
|
-
}), (
|
|
1013
|
-
const
|
|
1014
|
-
return
|
|
1015
|
-
te(
|
|
1011
|
+
searchDone: F
|
|
1012
|
+
}), (y, A) => {
|
|
1013
|
+
const b = ro;
|
|
1014
|
+
return I(), G("div", Yo, [
|
|
1015
|
+
te(y.$slots, "header", {}, void 0, !0),
|
|
1016
1016
|
ne("div", Uo, [
|
|
1017
|
-
|
|
1017
|
+
$.value ? (I(), H(Po, {
|
|
1018
1018
|
key: 0,
|
|
1019
1019
|
ref_key: "filterBarRef",
|
|
1020
|
-
ref:
|
|
1020
|
+
ref: g,
|
|
1021
1021
|
modelValue: c.value,
|
|
1022
|
-
"onUpdate:modelValue": A[0] || (A[0] = (
|
|
1023
|
-
columns:
|
|
1022
|
+
"onUpdate:modelValue": A[0] || (A[0] = (j) => c.value = j),
|
|
1023
|
+
columns: y.columns,
|
|
1024
1024
|
option: w.value,
|
|
1025
1025
|
onSearch: N,
|
|
1026
1026
|
onReset: h
|
|
1027
1027
|
}, Re({ _: 2 }, [
|
|
1028
|
-
ye(P.value, (
|
|
1029
|
-
name: `${
|
|
1030
|
-
fn: U((
|
|
1031
|
-
te(
|
|
1028
|
+
ye(P.value, (j) => ({
|
|
1029
|
+
name: `${j.prop}-search`,
|
|
1030
|
+
fn: U((C) => [
|
|
1031
|
+
te(y.$slots, `${j.prop}-search`, Oe(Be(C)), void 0, !0)
|
|
1032
1032
|
])
|
|
1033
1033
|
}))
|
|
1034
|
-
]), 1032, ["modelValue", "columns", "option"])) :
|
|
1034
|
+
]), 1032, ["modelValue", "columns", "option"])) : fe("", !0)
|
|
1035
1035
|
]),
|
|
1036
1036
|
ne("div", Ho, [
|
|
1037
1037
|
ne("div", Jo, [
|
|
1038
|
-
J(s).toolbar ? (
|
|
1039
|
-
te(
|
|
1040
|
-
])) :
|
|
1041
|
-
Qn((
|
|
1038
|
+
J(s).toolbar ? (I(), G("div", Wo, [
|
|
1039
|
+
te(y.$slots, "toolbar", {}, void 0, !0)
|
|
1040
|
+
])) : fe("", !0),
|
|
1041
|
+
Qn((I(), H(zo, {
|
|
1042
1042
|
ref_key: "jtTableRef",
|
|
1043
1043
|
ref: l,
|
|
1044
|
-
data:
|
|
1045
|
-
columns:
|
|
1044
|
+
data: y.data,
|
|
1045
|
+
columns: y.columns,
|
|
1046
1046
|
option: w.value,
|
|
1047
|
-
"table-events":
|
|
1047
|
+
"table-events": y.tableEvents
|
|
1048
1048
|
}, Re({ _: 2 }, [
|
|
1049
|
-
ye(
|
|
1050
|
-
name: `${
|
|
1051
|
-
fn: U((
|
|
1052
|
-
te(
|
|
1049
|
+
ye(f.value, (j) => ({
|
|
1050
|
+
name: `${j.prop}-header`,
|
|
1051
|
+
fn: U((C) => [
|
|
1052
|
+
te(y.$slots, `${j.prop}-header`, Oe(Be(C)), void 0, !0)
|
|
1053
1053
|
])
|
|
1054
1054
|
})),
|
|
1055
|
-
ye(
|
|
1056
|
-
name: `${
|
|
1057
|
-
fn: U((
|
|
1058
|
-
te(
|
|
1055
|
+
ye(S.value, (j) => ({
|
|
1056
|
+
name: `${j.prop}-data`,
|
|
1057
|
+
fn: U((C) => [
|
|
1058
|
+
te(y.$slots, `${j.prop}-data`, Oe(Be(C)), void 0, !0)
|
|
1059
1059
|
])
|
|
1060
1060
|
})),
|
|
1061
1061
|
w.value.menu ? {
|
|
1062
1062
|
name: "menu",
|
|
1063
|
-
fn: U((
|
|
1064
|
-
te(
|
|
1063
|
+
fn: U((j) => [
|
|
1064
|
+
te(y.$slots, "menu", Oe(Be(j)), void 0, !0)
|
|
1065
1065
|
]),
|
|
1066
1066
|
key: "0"
|
|
1067
1067
|
} : void 0
|
|
1068
1068
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
1069
|
-
[
|
|
1069
|
+
[b, w.value.loading]
|
|
1070
1070
|
])
|
|
1071
1071
|
]),
|
|
1072
|
-
L.value ? (
|
|
1072
|
+
L.value ? (I(), H(Ko, {
|
|
1073
1073
|
key: 0,
|
|
1074
1074
|
"current-page": i.value,
|
|
1075
|
-
"onUpdate:currentPage": A[1] || (A[1] = (
|
|
1075
|
+
"onUpdate:currentPage": A[1] || (A[1] = (j) => i.value = j),
|
|
1076
1076
|
"page-size": a.value,
|
|
1077
|
-
"onUpdate:pageSize": A[2] || (A[2] = (
|
|
1078
|
-
total:
|
|
1077
|
+
"onUpdate:pageSize": A[2] || (A[2] = (j) => a.value = j),
|
|
1078
|
+
total: y.total,
|
|
1079
1079
|
option: w.value,
|
|
1080
|
-
onPageChange: A[3] || (A[3] = (
|
|
1081
|
-
onSizeChange: A[4] || (A[4] = (
|
|
1082
|
-
}, null, 8, ["current-page", "page-size", "total", "option"])) :
|
|
1080
|
+
onPageChange: A[3] || (A[3] = (j) => y.$emit("page-change", j)),
|
|
1081
|
+
onSizeChange: A[4] || (A[4] = (j) => y.$emit("size-change", j))
|
|
1082
|
+
}, null, 8, ["current-page", "page-size", "total", "option"])) : fe("", !0)
|
|
1083
1083
|
])
|
|
1084
1084
|
]);
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
|
-
}), ss = /* @__PURE__ */ be(Zo, [["__scopeId", "data-v-
|
|
1087
|
+
}), ss = /* @__PURE__ */ be(Zo, [["__scopeId", "data-v-335c2682"]]), Qo = { class: "jt-page-header__title" }, Xo = { key: 0 }, er = {
|
|
1088
1088
|
key: 0,
|
|
1089
1089
|
class: "jt-page-header__operates"
|
|
1090
1090
|
}, tr = /* @__PURE__ */ pe({
|
|
@@ -1097,21 +1097,21 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1097
1097
|
},
|
|
1098
1098
|
emits: ["operate-click"],
|
|
1099
1099
|
setup(e, { emit: t }) {
|
|
1100
|
-
const n = e, o = t, r = Le(), i =
|
|
1100
|
+
const n = e, o = t, r = Le(), i = O(() => n.operates.length > 0 || !!r.operates);
|
|
1101
1101
|
function a(c, s) {
|
|
1102
1102
|
c.onClick?.(c, s), o("operate-click", c, s);
|
|
1103
1103
|
}
|
|
1104
|
-
return (c, s) => (
|
|
1104
|
+
return (c, s) => (I(), G("div", ae({
|
|
1105
1105
|
class: ["jt-page-header", `jt-page-header--${c.type}`]
|
|
1106
1106
|
}, c.$attrs), [
|
|
1107
1107
|
ne("div", Qo, [
|
|
1108
1108
|
te(c.$slots, "title", {}, () => [
|
|
1109
|
-
c.title ? (
|
|
1109
|
+
c.title ? (I(), G("span", Xo, oe(c.title), 1)) : fe("", !0)
|
|
1110
1110
|
], !0)
|
|
1111
1111
|
]),
|
|
1112
|
-
i.value ? (
|
|
1112
|
+
i.value ? (I(), G("div", er, [
|
|
1113
1113
|
te(c.$slots, "operates", { operates: c.operates }, () => [
|
|
1114
|
-
(
|
|
1114
|
+
(I(!0), G(Se, null, ye(c.operates, (l) => (I(), H(J(rt), ae({
|
|
1115
1115
|
key: l.key ?? l.label,
|
|
1116
1116
|
ref_for: !0
|
|
1117
1117
|
}, l.buttonProps, {
|
|
@@ -1122,7 +1122,7 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1122
1122
|
text: l.text,
|
|
1123
1123
|
link: l.link,
|
|
1124
1124
|
icon: l.icon,
|
|
1125
|
-
onClick: (
|
|
1125
|
+
onClick: (g) => a(l, g)
|
|
1126
1126
|
}), {
|
|
1127
1127
|
default: U(() => [
|
|
1128
1128
|
ne("span", null, oe(l.label), 1)
|
|
@@ -1130,10 +1130,10 @@ const To = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%20
|
|
|
1130
1130
|
_: 2
|
|
1131
1131
|
}, 1040, ["type", "disabled", "loading", "plain", "text", "link", "icon", "onClick"]))), 128))
|
|
1132
1132
|
], !0)
|
|
1133
|
-
])) :
|
|
1133
|
+
])) : fe("", !0)
|
|
1134
1134
|
], 16));
|
|
1135
1135
|
}
|
|
1136
|
-
}), ls = /* @__PURE__ */ be(tr, [["__scopeId", "data-v-
|
|
1136
|
+
}), ls = /* @__PURE__ */ be(tr, [["__scopeId", "data-v-0926ebf1"]]);
|
|
1137
1137
|
function nr(e, t) {
|
|
1138
1138
|
t = t || (() => "default-use-once-sync");
|
|
1139
1139
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -1176,275 +1176,275 @@ var cn = { exports: {} };
|
|
|
1176
1176
|
(function(n, o) {
|
|
1177
1177
|
e.exports = o();
|
|
1178
1178
|
})(it, function() {
|
|
1179
|
-
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", a = "second", c = "minute", s = "hour", l = "day",
|
|
1180
|
-
var
|
|
1181
|
-
return "[" + R + (
|
|
1182
|
-
} }, h = function(R,
|
|
1183
|
-
var
|
|
1184
|
-
return !
|
|
1185
|
-
},
|
|
1186
|
-
var
|
|
1187
|
-
return (
|
|
1188
|
-
}, m: function R(
|
|
1189
|
-
if (
|
|
1190
|
-
var
|
|
1191
|
-
return +(-(
|
|
1179
|
+
var n = 1e3, o = 6e4, r = 36e5, i = "millisecond", a = "second", c = "minute", s = "hour", l = "day", g = "week", w = "month", $ = "quarter", L = "year", P = "date", f = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, M = /\[([^\]]+)]|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, N = { 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(R) {
|
|
1180
|
+
var B = ["th", "st", "nd", "rd"], E = R % 100;
|
|
1181
|
+
return "[" + R + (B[(E - 20) % 10] || B[E] || B[0]) + "]";
|
|
1182
|
+
} }, h = function(R, B, E) {
|
|
1183
|
+
var d = String(R);
|
|
1184
|
+
return !d || d.length >= B ? R : "" + Array(B + 1 - d.length).join(E) + R;
|
|
1185
|
+
}, v = { s: h, z: function(R) {
|
|
1186
|
+
var B = -R.utcOffset(), E = Math.abs(B), d = Math.floor(E / 60), u = E % 60;
|
|
1187
|
+
return (B <= 0 ? "+" : "-") + h(d, 2, "0") + ":" + h(u, 2, "0");
|
|
1188
|
+
}, m: function R(B, E) {
|
|
1189
|
+
if (B.date() < E.date()) return -R(E, B);
|
|
1190
|
+
var d = 12 * (E.year() - B.year()) + (E.month() - B.month()), u = B.clone().add(d, w), _ = E - u < 0, D = B.clone().add(d + (_ ? -1 : 1), w);
|
|
1191
|
+
return +(-(d + (E - u) / (_ ? u - D : D - u)) || 0);
|
|
1192
1192
|
}, a: function(R) {
|
|
1193
1193
|
return R < 0 ? Math.ceil(R) || 0 : Math.floor(R);
|
|
1194
1194
|
}, p: function(R) {
|
|
1195
|
-
return { M: w, y: L, w:
|
|
1195
|
+
return { M: w, y: L, w: g, d: l, D: P, h: s, m: c, s: a, ms: i, Q: $ }[R] || String(R || "").toLowerCase().replace(/s$/, "");
|
|
1196
1196
|
}, u: function(R) {
|
|
1197
1197
|
return R === void 0;
|
|
1198
|
-
} },
|
|
1199
|
-
|
|
1200
|
-
var A = "$isDayjsObject",
|
|
1198
|
+
} }, F = "en", y = {};
|
|
1199
|
+
y[F] = N;
|
|
1200
|
+
var A = "$isDayjsObject", b = function(R) {
|
|
1201
1201
|
return R instanceof re || !(!R || !R[A]);
|
|
1202
|
-
},
|
|
1203
|
-
var
|
|
1204
|
-
if (!
|
|
1205
|
-
if (typeof
|
|
1206
|
-
var
|
|
1207
|
-
|
|
1208
|
-
var
|
|
1209
|
-
if (!
|
|
1202
|
+
}, j = function R(B, E, d) {
|
|
1203
|
+
var u;
|
|
1204
|
+
if (!B) return F;
|
|
1205
|
+
if (typeof B == "string") {
|
|
1206
|
+
var _ = B.toLowerCase();
|
|
1207
|
+
y[_] && (u = _), E && (y[_] = E, u = _);
|
|
1208
|
+
var D = B.split("-");
|
|
1209
|
+
if (!u && D.length > 1) return R(D[0]);
|
|
1210
1210
|
} else {
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1211
|
+
var V = B.name;
|
|
1212
|
+
y[V] = B, u = V;
|
|
1213
1213
|
}
|
|
1214
|
-
return !
|
|
1215
|
-
},
|
|
1216
|
-
if (
|
|
1217
|
-
var
|
|
1218
|
-
return
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1221
|
-
return
|
|
1214
|
+
return !d && u && (F = u), u || !d && F;
|
|
1215
|
+
}, C = function(R, B) {
|
|
1216
|
+
if (b(R)) return R.clone();
|
|
1217
|
+
var E = typeof B == "object" ? B : {};
|
|
1218
|
+
return E.date = R, E.args = arguments, new re(E);
|
|
1219
|
+
}, z = v;
|
|
1220
|
+
z.l = j, z.i = b, z.w = function(R, B) {
|
|
1221
|
+
return C(R, { locale: B.$L, utc: B.$u, x: B.$x, $offset: B.$offset });
|
|
1222
1222
|
};
|
|
1223
1223
|
var re = function() {
|
|
1224
|
-
function R(
|
|
1225
|
-
this.$L =
|
|
1224
|
+
function R(E) {
|
|
1225
|
+
this.$L = j(E.locale, null, !0), this.parse(E), this.$x = this.$x || E.x || {}, this[A] = !0;
|
|
1226
1226
|
}
|
|
1227
|
-
var
|
|
1228
|
-
return
|
|
1229
|
-
this.$d = function(
|
|
1230
|
-
var
|
|
1231
|
-
if (
|
|
1232
|
-
if (
|
|
1233
|
-
if (
|
|
1234
|
-
if (typeof
|
|
1235
|
-
var
|
|
1236
|
-
if (
|
|
1237
|
-
var
|
|
1238
|
-
return
|
|
1227
|
+
var B = R.prototype;
|
|
1228
|
+
return B.parse = function(E) {
|
|
1229
|
+
this.$d = function(d) {
|
|
1230
|
+
var u = d.date, _ = d.utc;
|
|
1231
|
+
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
1232
|
+
if (z.u(u)) return /* @__PURE__ */ new Date();
|
|
1233
|
+
if (u instanceof Date) return new Date(u);
|
|
1234
|
+
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
1235
|
+
var D = u.match(S);
|
|
1236
|
+
if (D) {
|
|
1237
|
+
var V = D[2] - 1 || 0, x = (D[7] || "0").substring(0, 3);
|
|
1238
|
+
return _ ? new Date(Date.UTC(D[1], V, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, x)) : new Date(D[1], V, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, x);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
return new Date(
|
|
1242
|
-
}(
|
|
1243
|
-
},
|
|
1244
|
-
var
|
|
1245
|
-
this.$y =
|
|
1246
|
-
},
|
|
1247
|
-
return
|
|
1248
|
-
},
|
|
1249
|
-
return this.$d.toString() !==
|
|
1250
|
-
},
|
|
1251
|
-
var
|
|
1252
|
-
return this.startOf(
|
|
1253
|
-
},
|
|
1254
|
-
return
|
|
1255
|
-
},
|
|
1256
|
-
return this.endOf(
|
|
1257
|
-
},
|
|
1258
|
-
return
|
|
1259
|
-
},
|
|
1241
|
+
return new Date(u);
|
|
1242
|
+
}(E), this.init();
|
|
1243
|
+
}, B.init = function() {
|
|
1244
|
+
var E = this.$d;
|
|
1245
|
+
this.$y = E.getFullYear(), this.$M = E.getMonth(), this.$D = E.getDate(), this.$W = E.getDay(), this.$H = E.getHours(), this.$m = E.getMinutes(), this.$s = E.getSeconds(), this.$ms = E.getMilliseconds();
|
|
1246
|
+
}, B.$utils = function() {
|
|
1247
|
+
return z;
|
|
1248
|
+
}, B.isValid = function() {
|
|
1249
|
+
return this.$d.toString() !== f;
|
|
1250
|
+
}, B.isSame = function(E, d) {
|
|
1251
|
+
var u = C(E);
|
|
1252
|
+
return this.startOf(d) <= u && u <= this.endOf(d);
|
|
1253
|
+
}, B.isAfter = function(E, d) {
|
|
1254
|
+
return C(E) < this.startOf(d);
|
|
1255
|
+
}, B.isBefore = function(E, d) {
|
|
1256
|
+
return this.endOf(d) < C(E);
|
|
1257
|
+
}, B.$g = function(E, d, u) {
|
|
1258
|
+
return z.u(E) ? this[d] : this.set(u, E);
|
|
1259
|
+
}, B.unix = function() {
|
|
1260
1260
|
return Math.floor(this.valueOf() / 1e3);
|
|
1261
|
-
},
|
|
1261
|
+
}, B.valueOf = function() {
|
|
1262
1262
|
return this.$d.getTime();
|
|
1263
|
-
},
|
|
1264
|
-
var
|
|
1265
|
-
var we =
|
|
1266
|
-
return
|
|
1267
|
-
},
|
|
1268
|
-
return
|
|
1269
|
-
}, K = this.$W,
|
|
1270
|
-
switch (
|
|
1263
|
+
}, B.startOf = function(E, d) {
|
|
1264
|
+
var u = this, _ = !!z.u(d) || d, D = z.p(E), V = function(de, me) {
|
|
1265
|
+
var we = z.w(u.$u ? Date.UTC(u.$y, me, de) : new Date(u.$y, me, de), u);
|
|
1266
|
+
return _ ? we : we.endOf(l);
|
|
1267
|
+
}, x = function(de, me) {
|
|
1268
|
+
return z.w(u.toDate()[de].apply(u.toDate("s"), (_ ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), u);
|
|
1269
|
+
}, K = this.$W, q = this.$M, Q = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
1270
|
+
switch (D) {
|
|
1271
1271
|
case L:
|
|
1272
|
-
return
|
|
1272
|
+
return _ ? V(1, 0) : V(31, 11);
|
|
1273
1273
|
case w:
|
|
1274
|
-
return
|
|
1275
|
-
case
|
|
1276
|
-
var X = this.$locale().weekStart || 0,
|
|
1277
|
-
return
|
|
1274
|
+
return _ ? V(1, q) : V(0, q + 1);
|
|
1275
|
+
case g:
|
|
1276
|
+
var X = this.$locale().weekStart || 0, ue = (K < X ? K + 7 : K) - X;
|
|
1277
|
+
return V(_ ? Q - ue : Q + (6 - ue), q);
|
|
1278
1278
|
case l:
|
|
1279
1279
|
case P:
|
|
1280
|
-
return
|
|
1280
|
+
return x(T + "Hours", 0);
|
|
1281
1281
|
case s:
|
|
1282
|
-
return
|
|
1282
|
+
return x(T + "Minutes", 1);
|
|
1283
1283
|
case c:
|
|
1284
|
-
return
|
|
1284
|
+
return x(T + "Seconds", 2);
|
|
1285
1285
|
case a:
|
|
1286
|
-
return
|
|
1286
|
+
return x(T + "Milliseconds", 3);
|
|
1287
1287
|
default:
|
|
1288
1288
|
return this.clone();
|
|
1289
1289
|
}
|
|
1290
|
-
},
|
|
1291
|
-
return this.startOf(
|
|
1292
|
-
},
|
|
1293
|
-
var
|
|
1294
|
-
if (
|
|
1290
|
+
}, B.endOf = function(E) {
|
|
1291
|
+
return this.startOf(E, !1);
|
|
1292
|
+
}, B.$set = function(E, d) {
|
|
1293
|
+
var u, _ = z.p(E), D = "set" + (this.$u ? "UTC" : ""), V = (u = {}, u[l] = D + "Date", u[P] = D + "Date", u[w] = D + "Month", u[L] = D + "FullYear", u[s] = D + "Hours", u[c] = D + "Minutes", u[a] = D + "Seconds", u[i] = D + "Milliseconds", u)[_], x = _ === l ? this.$D + (d - this.$W) : d;
|
|
1294
|
+
if (_ === w || _ === L) {
|
|
1295
1295
|
var K = this.clone().set(P, 1);
|
|
1296
|
-
K.$d[
|
|
1297
|
-
} else
|
|
1296
|
+
K.$d[V](x), K.init(), this.$d = K.set(P, Math.min(this.$D, K.daysInMonth())).$d;
|
|
1297
|
+
} else V && this.$d[V](x);
|
|
1298
1298
|
return this.init(), this;
|
|
1299
|
-
},
|
|
1300
|
-
return this.clone().$set(
|
|
1301
|
-
},
|
|
1302
|
-
return this[
|
|
1303
|
-
},
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1306
|
-
var
|
|
1307
|
-
var Q =
|
|
1308
|
-
return
|
|
1299
|
+
}, B.set = function(E, d) {
|
|
1300
|
+
return this.clone().$set(E, d);
|
|
1301
|
+
}, B.get = function(E) {
|
|
1302
|
+
return this[z.p(E)]();
|
|
1303
|
+
}, B.add = function(E, d) {
|
|
1304
|
+
var u, _ = this;
|
|
1305
|
+
E = Number(E);
|
|
1306
|
+
var D = z.p(d), V = function(q) {
|
|
1307
|
+
var Q = C(_);
|
|
1308
|
+
return z.w(Q.date(Q.date() + Math.round(q * E)), _);
|
|
1309
1309
|
};
|
|
1310
|
-
if (
|
|
1311
|
-
if (
|
|
1312
|
-
if (
|
|
1313
|
-
if (
|
|
1314
|
-
var
|
|
1315
|
-
return
|
|
1316
|
-
},
|
|
1317
|
-
return this.add(-1 *
|
|
1318
|
-
},
|
|
1319
|
-
var
|
|
1320
|
-
if (!this.isValid()) return
|
|
1321
|
-
var
|
|
1322
|
-
return me && (me[we] || me(
|
|
1323
|
-
},
|
|
1324
|
-
return
|
|
1325
|
-
},
|
|
1310
|
+
if (D === w) return this.set(w, this.$M + E);
|
|
1311
|
+
if (D === L) return this.set(L, this.$y + E);
|
|
1312
|
+
if (D === l) return V(1);
|
|
1313
|
+
if (D === g) return V(7);
|
|
1314
|
+
var x = (u = {}, u[c] = o, u[s] = r, u[a] = n, u)[D] || 1, K = this.$d.getTime() + E * x;
|
|
1315
|
+
return z.w(K, this);
|
|
1316
|
+
}, B.subtract = function(E, d) {
|
|
1317
|
+
return this.add(-1 * E, d);
|
|
1318
|
+
}, B.format = function(E) {
|
|
1319
|
+
var d = this, u = this.$locale();
|
|
1320
|
+
if (!this.isValid()) return u.invalidDate || f;
|
|
1321
|
+
var _ = E || "YYYY-MM-DDTHH:mm:ssZ", D = z.z(this), V = this.$H, x = this.$m, K = this.$M, q = u.weekdays, Q = u.months, T = u.meridiem, X = function(me, we, De, $e) {
|
|
1322
|
+
return me && (me[we] || me(d, _)) || De[we].slice(0, $e);
|
|
1323
|
+
}, ue = function(me) {
|
|
1324
|
+
return z.s(V % 12 || 12, me, "0");
|
|
1325
|
+
}, de = T || function(me, we, De) {
|
|
1326
1326
|
var $e = me < 12 ? "AM" : "PM";
|
|
1327
1327
|
return De ? $e.toLowerCase() : $e;
|
|
1328
1328
|
};
|
|
1329
|
-
return
|
|
1329
|
+
return _.replace(M, function(me, we) {
|
|
1330
1330
|
return we || function(De) {
|
|
1331
1331
|
switch (De) {
|
|
1332
1332
|
case "YY":
|
|
1333
|
-
return String(
|
|
1333
|
+
return String(d.$y).slice(-2);
|
|
1334
1334
|
case "YYYY":
|
|
1335
|
-
return
|
|
1335
|
+
return z.s(d.$y, 4, "0");
|
|
1336
1336
|
case "M":
|
|
1337
1337
|
return K + 1;
|
|
1338
1338
|
case "MM":
|
|
1339
|
-
return
|
|
1339
|
+
return z.s(K + 1, 2, "0");
|
|
1340
1340
|
case "MMM":
|
|
1341
|
-
return X(
|
|
1341
|
+
return X(u.monthsShort, K, Q, 3);
|
|
1342
1342
|
case "MMMM":
|
|
1343
1343
|
return X(Q, K);
|
|
1344
1344
|
case "D":
|
|
1345
|
-
return
|
|
1345
|
+
return d.$D;
|
|
1346
1346
|
case "DD":
|
|
1347
|
-
return
|
|
1347
|
+
return z.s(d.$D, 2, "0");
|
|
1348
1348
|
case "d":
|
|
1349
|
-
return String(
|
|
1349
|
+
return String(d.$W);
|
|
1350
1350
|
case "dd":
|
|
1351
|
-
return X(
|
|
1351
|
+
return X(u.weekdaysMin, d.$W, q, 2);
|
|
1352
1352
|
case "ddd":
|
|
1353
|
-
return X(
|
|
1353
|
+
return X(u.weekdaysShort, d.$W, q, 3);
|
|
1354
1354
|
case "dddd":
|
|
1355
|
-
return
|
|
1355
|
+
return q[d.$W];
|
|
1356
1356
|
case "H":
|
|
1357
|
-
return String(
|
|
1357
|
+
return String(V);
|
|
1358
1358
|
case "HH":
|
|
1359
|
-
return
|
|
1359
|
+
return z.s(V, 2, "0");
|
|
1360
1360
|
case "h":
|
|
1361
|
-
return
|
|
1361
|
+
return ue(1);
|
|
1362
1362
|
case "hh":
|
|
1363
|
-
return
|
|
1363
|
+
return ue(2);
|
|
1364
1364
|
case "a":
|
|
1365
|
-
return
|
|
1365
|
+
return de(V, x, !0);
|
|
1366
1366
|
case "A":
|
|
1367
|
-
return
|
|
1367
|
+
return de(V, x, !1);
|
|
1368
1368
|
case "m":
|
|
1369
|
-
return String(
|
|
1369
|
+
return String(x);
|
|
1370
1370
|
case "mm":
|
|
1371
|
-
return
|
|
1371
|
+
return z.s(x, 2, "0");
|
|
1372
1372
|
case "s":
|
|
1373
|
-
return String(
|
|
1373
|
+
return String(d.$s);
|
|
1374
1374
|
case "ss":
|
|
1375
|
-
return
|
|
1375
|
+
return z.s(d.$s, 2, "0");
|
|
1376
1376
|
case "SSS":
|
|
1377
|
-
return
|
|
1377
|
+
return z.s(d.$ms, 3, "0");
|
|
1378
1378
|
case "Z":
|
|
1379
|
-
return
|
|
1379
|
+
return D;
|
|
1380
1380
|
}
|
|
1381
1381
|
return null;
|
|
1382
|
-
}(me) ||
|
|
1382
|
+
}(me) || D.replace(":", "");
|
|
1383
1383
|
});
|
|
1384
|
-
},
|
|
1384
|
+
}, B.utcOffset = function() {
|
|
1385
1385
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1386
|
-
},
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
1386
|
+
}, B.diff = function(E, d, u) {
|
|
1387
|
+
var _, D = this, V = z.p(d), x = C(E), K = (x.utcOffset() - this.utcOffset()) * o, q = this - x, Q = function() {
|
|
1388
|
+
return z.m(D, x);
|
|
1389
1389
|
};
|
|
1390
|
-
switch (
|
|
1390
|
+
switch (V) {
|
|
1391
1391
|
case L:
|
|
1392
|
-
|
|
1392
|
+
_ = Q() / 12;
|
|
1393
1393
|
break;
|
|
1394
1394
|
case w:
|
|
1395
|
-
|
|
1395
|
+
_ = Q();
|
|
1396
1396
|
break;
|
|
1397
|
-
case
|
|
1398
|
-
|
|
1397
|
+
case $:
|
|
1398
|
+
_ = Q() / 3;
|
|
1399
1399
|
break;
|
|
1400
|
-
case
|
|
1401
|
-
|
|
1400
|
+
case g:
|
|
1401
|
+
_ = (q - K) / 6048e5;
|
|
1402
1402
|
break;
|
|
1403
1403
|
case l:
|
|
1404
|
-
|
|
1404
|
+
_ = (q - K) / 864e5;
|
|
1405
1405
|
break;
|
|
1406
1406
|
case s:
|
|
1407
|
-
|
|
1407
|
+
_ = q / r;
|
|
1408
1408
|
break;
|
|
1409
1409
|
case c:
|
|
1410
|
-
|
|
1410
|
+
_ = q / o;
|
|
1411
1411
|
break;
|
|
1412
1412
|
case a:
|
|
1413
|
-
|
|
1413
|
+
_ = q / n;
|
|
1414
1414
|
break;
|
|
1415
1415
|
default:
|
|
1416
|
-
|
|
1416
|
+
_ = q;
|
|
1417
1417
|
}
|
|
1418
|
-
return
|
|
1419
|
-
},
|
|
1418
|
+
return u ? _ : z.a(_);
|
|
1419
|
+
}, B.daysInMonth = function() {
|
|
1420
1420
|
return this.endOf(w).$D;
|
|
1421
|
-
},
|
|
1422
|
-
return
|
|
1423
|
-
},
|
|
1424
|
-
if (!
|
|
1425
|
-
var
|
|
1426
|
-
return
|
|
1427
|
-
},
|
|
1428
|
-
return
|
|
1429
|
-
},
|
|
1421
|
+
}, B.$locale = function() {
|
|
1422
|
+
return y[this.$L];
|
|
1423
|
+
}, B.locale = function(E, d) {
|
|
1424
|
+
if (!E) return this.$L;
|
|
1425
|
+
var u = this.clone(), _ = j(E, d, !0);
|
|
1426
|
+
return _ && (u.$L = _), u;
|
|
1427
|
+
}, B.clone = function() {
|
|
1428
|
+
return z.w(this.$d, this);
|
|
1429
|
+
}, B.toDate = function() {
|
|
1430
1430
|
return new Date(this.valueOf());
|
|
1431
|
-
},
|
|
1431
|
+
}, B.toJSON = function() {
|
|
1432
1432
|
return this.isValid() ? this.toISOString() : null;
|
|
1433
|
-
},
|
|
1433
|
+
}, B.toISOString = function() {
|
|
1434
1434
|
return this.$d.toISOString();
|
|
1435
|
-
},
|
|
1435
|
+
}, B.toString = function() {
|
|
1436
1436
|
return this.$d.toUTCString();
|
|
1437
1437
|
}, R;
|
|
1438
1438
|
}(), le = re.prototype;
|
|
1439
|
-
return
|
|
1440
|
-
le[R[1]] = function(
|
|
1441
|
-
return this.$g(
|
|
1439
|
+
return C.prototype = le, [["$ms", i], ["$s", a], ["$m", c], ["$H", s], ["$W", l], ["$M", w], ["$y", L], ["$D", P]].forEach(function(R) {
|
|
1440
|
+
le[R[1]] = function(B) {
|
|
1441
|
+
return this.$g(B, R[0], R[1]);
|
|
1442
1442
|
};
|
|
1443
|
-
}),
|
|
1444
|
-
return R.$i || (R(
|
|
1445
|
-
},
|
|
1446
|
-
return
|
|
1447
|
-
},
|
|
1443
|
+
}), C.extend = function(R, B) {
|
|
1444
|
+
return R.$i || (R(B, re, C), R.$i = !0), C;
|
|
1445
|
+
}, C.locale = j, C.isDayjs = b, C.unix = function(R) {
|
|
1446
|
+
return C(1e3 * R);
|
|
1447
|
+
}, C.en = y[F], C.Ls = y, C.p = {}, C;
|
|
1448
1448
|
});
|
|
1449
1449
|
})(cn);
|
|
1450
1450
|
var or = cn.exports;
|
|
@@ -1454,118 +1454,118 @@ var un = { exports: {} };
|
|
|
1454
1454
|
(function(n, o) {
|
|
1455
1455
|
e.exports = o();
|
|
1456
1456
|
})(it, function() {
|
|
1457
|
-
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/, a = /\d\d?/, c = /\d*[^-_:/,()\s\d]+/, s = {}, l = function(
|
|
1458
|
-
return (
|
|
1459
|
-
},
|
|
1460
|
-
return function(
|
|
1461
|
-
this[
|
|
1457
|
+
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/, a = /\d\d?/, c = /\d*[^-_:/,()\s\d]+/, s = {}, l = function(S) {
|
|
1458
|
+
return (S = +S) + (S > 68 ? 1900 : 2e3);
|
|
1459
|
+
}, g = function(S) {
|
|
1460
|
+
return function(M) {
|
|
1461
|
+
this[S] = +M;
|
|
1462
1462
|
};
|
|
1463
|
-
}, w = [/[+-]\d\d:?(\d\d)?|Z/, function(
|
|
1464
|
-
(this.zone || (this.zone = {})).offset = function(
|
|
1465
|
-
if (!
|
|
1466
|
-
var N =
|
|
1463
|
+
}, w = [/[+-]\d\d:?(\d\d)?|Z/, function(S) {
|
|
1464
|
+
(this.zone || (this.zone = {})).offset = function(M) {
|
|
1465
|
+
if (!M || M === "Z") return 0;
|
|
1466
|
+
var N = M.match(/([+-]|\d\d)/g), h = 60 * N[1] + (+N[2] || 0);
|
|
1467
1467
|
return h === 0 ? 0 : N[0] === "+" ? -h : h;
|
|
1468
|
-
}(
|
|
1469
|
-
}],
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1472
|
-
}, L = function(
|
|
1468
|
+
}(S);
|
|
1469
|
+
}], $ = function(S) {
|
|
1470
|
+
var M = s[S];
|
|
1471
|
+
return M && (M.indexOf ? M : M.s.concat(M.f));
|
|
1472
|
+
}, L = function(S, M) {
|
|
1473
1473
|
var N, h = s.meridiem;
|
|
1474
1474
|
if (h) {
|
|
1475
|
-
for (var
|
|
1476
|
-
N =
|
|
1475
|
+
for (var v = 1; v <= 24; v += 1) if (S.indexOf(h(v, 0, M)) > -1) {
|
|
1476
|
+
N = v > 12;
|
|
1477
1477
|
break;
|
|
1478
1478
|
}
|
|
1479
|
-
} else N =
|
|
1479
|
+
} else N = S === (M ? "pm" : "PM");
|
|
1480
1480
|
return N;
|
|
1481
|
-
}, P = { A: [c, function(
|
|
1482
|
-
this.afternoon = L(
|
|
1483
|
-
}], a: [c, function(
|
|
1484
|
-
this.afternoon = L(
|
|
1485
|
-
}], Q: [r, function(
|
|
1486
|
-
this.month = 3 * (
|
|
1487
|
-
}], S: [r, function(
|
|
1488
|
-
this.milliseconds = 100 * +
|
|
1489
|
-
}], SS: [i, function(
|
|
1490
|
-
this.milliseconds = 10 * +
|
|
1491
|
-
}], SSS: [/\d{3}/, function(
|
|
1492
|
-
this.milliseconds = +
|
|
1493
|
-
}], s: [a,
|
|
1494
|
-
var
|
|
1495
|
-
if (this.day = N[0],
|
|
1496
|
-
}], w: [a,
|
|
1497
|
-
var
|
|
1481
|
+
}, P = { A: [c, function(S) {
|
|
1482
|
+
this.afternoon = L(S, !1);
|
|
1483
|
+
}], a: [c, function(S) {
|
|
1484
|
+
this.afternoon = L(S, !0);
|
|
1485
|
+
}], Q: [r, function(S) {
|
|
1486
|
+
this.month = 3 * (S - 1) + 1;
|
|
1487
|
+
}], S: [r, function(S) {
|
|
1488
|
+
this.milliseconds = 100 * +S;
|
|
1489
|
+
}], SS: [i, function(S) {
|
|
1490
|
+
this.milliseconds = 10 * +S;
|
|
1491
|
+
}], SSS: [/\d{3}/, function(S) {
|
|
1492
|
+
this.milliseconds = +S;
|
|
1493
|
+
}], s: [a, g("seconds")], ss: [a, g("seconds")], m: [a, g("minutes")], mm: [a, g("minutes")], H: [a, g("hours")], h: [a, g("hours")], HH: [a, g("hours")], hh: [a, g("hours")], D: [a, g("day")], DD: [i, g("day")], Do: [c, function(S) {
|
|
1494
|
+
var M = s.ordinal, N = S.match(/\d+/);
|
|
1495
|
+
if (this.day = N[0], M) for (var h = 1; h <= 31; h += 1) M(h).replace(/\[|\]/g, "") === S && (this.day = h);
|
|
1496
|
+
}], w: [a, g("week")], ww: [i, g("week")], M: [a, g("month")], MM: [i, g("month")], MMM: [c, function(S) {
|
|
1497
|
+
var M = $("months"), N = ($("monthsShort") || M.map(function(h) {
|
|
1498
1498
|
return h.slice(0, 3);
|
|
1499
|
-
})).indexOf(
|
|
1499
|
+
})).indexOf(S) + 1;
|
|
1500
1500
|
if (N < 1) throw new Error();
|
|
1501
1501
|
this.month = N % 12 || N;
|
|
1502
|
-
}], MMMM: [c, function(
|
|
1503
|
-
var
|
|
1504
|
-
if (
|
|
1505
|
-
this.month =
|
|
1506
|
-
}], Y: [/[+-]?\d+/,
|
|
1507
|
-
this.year = l(
|
|
1508
|
-
}], YYYY: [/\d{4}/,
|
|
1509
|
-
function
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1512
|
-
for (var h = (
|
|
1502
|
+
}], MMMM: [c, function(S) {
|
|
1503
|
+
var M = $("months").indexOf(S) + 1;
|
|
1504
|
+
if (M < 1) throw new Error();
|
|
1505
|
+
this.month = M % 12 || M;
|
|
1506
|
+
}], Y: [/[+-]?\d+/, g("year")], YY: [i, function(S) {
|
|
1507
|
+
this.year = l(S);
|
|
1508
|
+
}], YYYY: [/\d{4}/, g("year")], Z: w, ZZ: w };
|
|
1509
|
+
function f(S) {
|
|
1510
|
+
var M, N;
|
|
1511
|
+
M = S, N = s && s.formats;
|
|
1512
|
+
for (var h = (S = M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(C, z, re) {
|
|
1513
1513
|
var le = re && re.toUpperCase();
|
|
1514
|
-
return
|
|
1515
|
-
return
|
|
1514
|
+
return z || N[re] || n[re] || N[le].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(R, B, E) {
|
|
1515
|
+
return B || E.slice(1);
|
|
1516
1516
|
});
|
|
1517
|
-
})).match(o),
|
|
1518
|
-
var
|
|
1519
|
-
h[
|
|
1517
|
+
})).match(o), v = h.length, F = 0; F < v; F += 1) {
|
|
1518
|
+
var y = h[F], A = P[y], b = A && A[0], j = A && A[1];
|
|
1519
|
+
h[F] = j ? { regex: b, parser: j } : y.replace(/^\[|\]$/g, "");
|
|
1520
1520
|
}
|
|
1521
|
-
return function(
|
|
1522
|
-
for (var
|
|
1521
|
+
return function(C) {
|
|
1522
|
+
for (var z = {}, re = 0, le = 0; re < v; re += 1) {
|
|
1523
1523
|
var R = h[re];
|
|
1524
1524
|
if (typeof R == "string") le += R.length;
|
|
1525
1525
|
else {
|
|
1526
|
-
var
|
|
1527
|
-
|
|
1526
|
+
var B = R.regex, E = R.parser, d = C.slice(le), u = B.exec(d)[0];
|
|
1527
|
+
E.call(z, u), C = C.replace(u, "");
|
|
1528
1528
|
}
|
|
1529
1529
|
}
|
|
1530
|
-
return function(
|
|
1531
|
-
var
|
|
1532
|
-
if (
|
|
1533
|
-
var
|
|
1534
|
-
|
|
1530
|
+
return function(_) {
|
|
1531
|
+
var D = _.afternoon;
|
|
1532
|
+
if (D !== void 0) {
|
|
1533
|
+
var V = _.hours;
|
|
1534
|
+
D ? V < 12 && (_.hours += 12) : V === 12 && (_.hours = 0), delete _.afternoon;
|
|
1535
1535
|
}
|
|
1536
|
-
}(
|
|
1536
|
+
}(z), z;
|
|
1537
1537
|
};
|
|
1538
1538
|
}
|
|
1539
|
-
return function(
|
|
1540
|
-
N.p.customParseFormat = !0,
|
|
1541
|
-
var h =
|
|
1542
|
-
h.parse = function(
|
|
1543
|
-
var
|
|
1539
|
+
return function(S, M, N) {
|
|
1540
|
+
N.p.customParseFormat = !0, S && S.parseTwoDigitYear && (l = S.parseTwoDigitYear);
|
|
1541
|
+
var h = M.prototype, v = h.parse;
|
|
1542
|
+
h.parse = function(F) {
|
|
1543
|
+
var y = F.date, A = F.utc, b = F.args;
|
|
1544
1544
|
this.$u = A;
|
|
1545
|
-
var
|
|
1546
|
-
if (typeof
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1545
|
+
var j = b[1];
|
|
1546
|
+
if (typeof j == "string") {
|
|
1547
|
+
var C = b[2] === !0, z = b[3] === !0, re = C || z, le = b[2];
|
|
1548
|
+
z && (le = b[2]), s = this.$locale(), !C && le && (s = N.Ls[le]), this.$d = function(d, u, _, D) {
|
|
1549
1549
|
try {
|
|
1550
|
-
if (["x", "X"].indexOf(
|
|
1551
|
-
var
|
|
1552
|
-
|
|
1553
|
-
var qe, nt = Q || 0, Ge =
|
|
1554
|
-
return
|
|
1550
|
+
if (["x", "X"].indexOf(u) > -1) return new Date((u === "X" ? 1e3 : 1) * d);
|
|
1551
|
+
var V = f(u)(d), x = V.year, K = V.month, q = V.day, Q = V.hours, T = V.minutes, X = V.seconds, ue = V.milliseconds, de = V.zone, me = V.week, we = /* @__PURE__ */ new Date(), De = q || (x || K ? 1 : we.getDate()), $e = x || we.getFullYear(), xe = 0;
|
|
1552
|
+
x && !K || (xe = K > 0 ? K - 1 : we.getMonth());
|
|
1553
|
+
var qe, nt = Q || 0, Ge = T || 0, m = X || 0, p = ue || 0;
|
|
1554
|
+
return de ? new Date(Date.UTC($e, xe, De, nt, Ge, m, p + 60 * de.offset * 1e3)) : _ ? new Date(Date.UTC($e, xe, De, nt, Ge, m, p)) : (qe = new Date($e, xe, De, nt, Ge, m, p), me && (qe = D(qe).week(me).toDate()), qe);
|
|
1555
1555
|
} catch {
|
|
1556
1556
|
return /* @__PURE__ */ new Date("");
|
|
1557
1557
|
}
|
|
1558
|
-
}(
|
|
1559
|
-
} else if (
|
|
1560
|
-
|
|
1561
|
-
var
|
|
1562
|
-
if (
|
|
1563
|
-
this.$d =
|
|
1558
|
+
}(y, j, A, N), this.init(), le && le !== !0 && (this.$L = this.locale(le).$L), re && y != this.format(j) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
1559
|
+
} else if (j instanceof Array) for (var R = j.length, B = 1; B <= R; B += 1) {
|
|
1560
|
+
b[1] = j[B - 1];
|
|
1561
|
+
var E = N.apply(this, b);
|
|
1562
|
+
if (E.isValid()) {
|
|
1563
|
+
this.$d = E.$d, this.$L = E.$L, this.init();
|
|
1564
1564
|
break;
|
|
1565
1565
|
}
|
|
1566
|
-
|
|
1566
|
+
B === R && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1567
1567
|
}
|
|
1568
|
-
else
|
|
1568
|
+
else v.call(this, F);
|
|
1569
1569
|
};
|
|
1570
1570
|
};
|
|
1571
1571
|
});
|
|
@@ -1579,56 +1579,56 @@ var dn = { exports: {} };
|
|
|
1579
1579
|
})(it, function() {
|
|
1580
1580
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
1581
1581
|
return function(r, i, a) {
|
|
1582
|
-
var c, s = function(
|
|
1582
|
+
var c, s = function($, L, P) {
|
|
1583
1583
|
P === void 0 && (P = {});
|
|
1584
|
-
var
|
|
1584
|
+
var f = new Date($), S = function(M, N) {
|
|
1585
1585
|
N === void 0 && (N = {});
|
|
1586
|
-
var h = N.timeZoneName || "short",
|
|
1587
|
-
return
|
|
1586
|
+
var h = N.timeZoneName || "short", v = M + "|" + h, F = o[v];
|
|
1587
|
+
return F || (F = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: M, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: h }), o[v] = F), F;
|
|
1588
1588
|
}(L, P);
|
|
1589
|
-
return
|
|
1590
|
-
}, l = function(
|
|
1591
|
-
for (var P = s(
|
|
1592
|
-
var
|
|
1593
|
-
|
|
1589
|
+
return S.formatToParts(f);
|
|
1590
|
+
}, l = function($, L) {
|
|
1591
|
+
for (var P = s($, L), f = [], S = 0; S < P.length; S += 1) {
|
|
1592
|
+
var M = P[S], N = M.type, h = M.value, v = n[N];
|
|
1593
|
+
v >= 0 && (f[v] = parseInt(h, 10));
|
|
1594
1594
|
}
|
|
1595
|
-
var
|
|
1596
|
-
return (a.utc(A).valueOf() - (
|
|
1597
|
-
},
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
var P,
|
|
1595
|
+
var F = f[3], y = F === 24 ? 0 : F, A = f[0] + "-" + f[1] + "-" + f[2] + " " + y + ":" + f[4] + ":" + f[5] + ":000", b = +$;
|
|
1596
|
+
return (a.utc(A).valueOf() - (b -= b % 1e3)) / 6e4;
|
|
1597
|
+
}, g = i.prototype;
|
|
1598
|
+
g.tz = function($, L) {
|
|
1599
|
+
$ === void 0 && ($ = c);
|
|
1600
|
+
var P, f = this.utcOffset(), S = this.toDate(), M = S.toLocaleString("en-US", { timeZone: $ }), N = Math.round((S - new Date(M)) / 1e3 / 60), h = 15 * -Math.round(S.getTimezoneOffset() / 15) - N;
|
|
1601
1601
|
if (!Number(h)) P = this.utcOffset(0, L);
|
|
1602
|
-
else if (P = a(
|
|
1603
|
-
var
|
|
1604
|
-
P = P.add(
|
|
1602
|
+
else if (P = a(M, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(h, !0), L) {
|
|
1603
|
+
var v = P.utcOffset();
|
|
1604
|
+
P = P.add(f - v, "minute");
|
|
1605
1605
|
}
|
|
1606
|
-
return P.$x.$timezone =
|
|
1607
|
-
},
|
|
1608
|
-
var L = this.$x.$timezone || a.tz.guess(), P = s(this.valueOf(), L, { timeZoneName:
|
|
1609
|
-
return
|
|
1606
|
+
return P.$x.$timezone = $, P;
|
|
1607
|
+
}, g.offsetName = function($) {
|
|
1608
|
+
var L = this.$x.$timezone || a.tz.guess(), P = s(this.valueOf(), L, { timeZoneName: $ }).find(function(f) {
|
|
1609
|
+
return f.type.toLowerCase() === "timezonename";
|
|
1610
1610
|
});
|
|
1611
1611
|
return P && P.value;
|
|
1612
1612
|
};
|
|
1613
|
-
var w =
|
|
1614
|
-
|
|
1615
|
-
if (!this.$x || !this.$x.$timezone) return w.call(this,
|
|
1613
|
+
var w = g.startOf;
|
|
1614
|
+
g.startOf = function($, L) {
|
|
1615
|
+
if (!this.$x || !this.$x.$timezone) return w.call(this, $, L);
|
|
1616
1616
|
var P = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
1617
|
-
return w.call(P,
|
|
1618
|
-
}, a.tz = function(
|
|
1619
|
-
var
|
|
1620
|
-
if (typeof
|
|
1621
|
-
var N = function(
|
|
1622
|
-
var
|
|
1623
|
-
if (A ===
|
|
1624
|
-
var
|
|
1625
|
-
return
|
|
1626
|
-
}(a.utc(
|
|
1627
|
-
return
|
|
1617
|
+
return w.call(P, $, L).tz(this.$x.$timezone, !0);
|
|
1618
|
+
}, a.tz = function($, L, P) {
|
|
1619
|
+
var f = P && L, S = P || L || c, M = l(+a(), S);
|
|
1620
|
+
if (typeof $ != "string") return a($).tz(S);
|
|
1621
|
+
var N = function(y, A, b) {
|
|
1622
|
+
var j = y - 60 * A * 1e3, C = l(j, b);
|
|
1623
|
+
if (A === C) return [j, A];
|
|
1624
|
+
var z = l(j -= 60 * (C - A) * 1e3, b);
|
|
1625
|
+
return C === z ? [j, C] : [y - 60 * Math.min(C, z) * 1e3, Math.max(C, z)];
|
|
1626
|
+
}(a.utc($, f).valueOf(), M, S), h = N[0], v = N[1], F = a(h).utcOffset(v);
|
|
1627
|
+
return F.$x.$timezone = S, F;
|
|
1628
1628
|
}, a.tz.guess = function() {
|
|
1629
1629
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1630
|
-
}, a.tz.setDefault = function(
|
|
1631
|
-
c =
|
|
1630
|
+
}, a.tz.setDefault = function($) {
|
|
1631
|
+
c = $;
|
|
1632
1632
|
};
|
|
1633
1633
|
};
|
|
1634
1634
|
});
|
|
@@ -1643,51 +1643,51 @@ var fn = { exports: {} };
|
|
|
1643
1643
|
var n = "minute", o = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
1644
1644
|
return function(i, a, c) {
|
|
1645
1645
|
var s = a.prototype;
|
|
1646
|
-
c.utc = function(
|
|
1647
|
-
var
|
|
1648
|
-
return new a(
|
|
1649
|
-
}, s.utc = function(
|
|
1650
|
-
var
|
|
1651
|
-
return
|
|
1646
|
+
c.utc = function(f) {
|
|
1647
|
+
var S = { date: f, utc: !0, args: arguments };
|
|
1648
|
+
return new a(S);
|
|
1649
|
+
}, s.utc = function(f) {
|
|
1650
|
+
var S = c(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1651
|
+
return f ? S.add(this.utcOffset(), n) : S;
|
|
1652
1652
|
}, s.local = function() {
|
|
1653
1653
|
return c(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1654
1654
|
};
|
|
1655
1655
|
var l = s.parse;
|
|
1656
|
-
s.parse = function(
|
|
1657
|
-
|
|
1656
|
+
s.parse = function(f) {
|
|
1657
|
+
f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), l.call(this, f);
|
|
1658
1658
|
};
|
|
1659
|
-
var
|
|
1659
|
+
var g = s.init;
|
|
1660
1660
|
s.init = function() {
|
|
1661
1661
|
if (this.$u) {
|
|
1662
|
-
var
|
|
1663
|
-
this.$y =
|
|
1664
|
-
} else
|
|
1662
|
+
var f = this.$d;
|
|
1663
|
+
this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
|
|
1664
|
+
} else g.call(this);
|
|
1665
1665
|
};
|
|
1666
1666
|
var w = s.utcOffset;
|
|
1667
|
-
s.utcOffset = function(
|
|
1668
|
-
var
|
|
1669
|
-
if (
|
|
1670
|
-
if (typeof
|
|
1671
|
-
|
|
1672
|
-
var
|
|
1673
|
-
if (!
|
|
1674
|
-
var A = ("" +
|
|
1675
|
-
return
|
|
1676
|
-
}(
|
|
1677
|
-
var N = Math.abs(
|
|
1678
|
-
if (N === 0) return this.utc(
|
|
1667
|
+
s.utcOffset = function(f, S) {
|
|
1668
|
+
var M = this.$utils().u;
|
|
1669
|
+
if (M(f)) return this.$u ? 0 : M(this.$offset) ? w.call(this) : this.$offset;
|
|
1670
|
+
if (typeof f == "string" && (f = function(F) {
|
|
1671
|
+
F === void 0 && (F = "");
|
|
1672
|
+
var y = F.match(o);
|
|
1673
|
+
if (!y) return null;
|
|
1674
|
+
var A = ("" + y[0]).match(r) || ["-", 0, 0], b = A[0], j = 60 * +A[1] + +A[2];
|
|
1675
|
+
return j === 0 ? 0 : b === "+" ? j : -j;
|
|
1676
|
+
}(f), f === null)) return this;
|
|
1677
|
+
var N = Math.abs(f) <= 16 ? 60 * f : f;
|
|
1678
|
+
if (N === 0) return this.utc(S);
|
|
1679
1679
|
var h = this.clone();
|
|
1680
|
-
if (
|
|
1681
|
-
var
|
|
1682
|
-
return (h = this.local().add(N +
|
|
1680
|
+
if (S) return h.$offset = N, h.$u = !1, h;
|
|
1681
|
+
var v = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1682
|
+
return (h = this.local().add(N + v, n)).$offset = N, h.$x.$localOffset = v, h;
|
|
1683
1683
|
};
|
|
1684
|
-
var
|
|
1685
|
-
s.format = function(
|
|
1686
|
-
var
|
|
1687
|
-
return
|
|
1684
|
+
var $ = s.format;
|
|
1685
|
+
s.format = function(f) {
|
|
1686
|
+
var S = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1687
|
+
return $.call(this, S);
|
|
1688
1688
|
}, s.valueOf = function() {
|
|
1689
|
-
var
|
|
1690
|
-
return this.$d.valueOf() - 6e4 *
|
|
1689
|
+
var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1690
|
+
return this.$d.valueOf() - 6e4 * f;
|
|
1691
1691
|
}, s.isUTC = function() {
|
|
1692
1692
|
return !!this.$u;
|
|
1693
1693
|
}, s.toISOString = function() {
|
|
@@ -1696,14 +1696,14 @@ var fn = { exports: {} };
|
|
|
1696
1696
|
return this.toDate().toUTCString();
|
|
1697
1697
|
};
|
|
1698
1698
|
var L = s.toDate;
|
|
1699
|
-
s.toDate = function(
|
|
1700
|
-
return
|
|
1699
|
+
s.toDate = function(f) {
|
|
1700
|
+
return f === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : L.call(this);
|
|
1701
1701
|
};
|
|
1702
1702
|
var P = s.diff;
|
|
1703
|
-
s.diff = function(
|
|
1704
|
-
if (
|
|
1705
|
-
var N = this.local(), h = c(
|
|
1706
|
-
return P.call(N, h,
|
|
1703
|
+
s.diff = function(f, S, M) {
|
|
1704
|
+
if (f && this.$u === f.$u) return P.call(this, f, S, M);
|
|
1705
|
+
var N = this.local(), h = c(f).local();
|
|
1706
|
+
return P.call(N, h, S, M);
|
|
1707
1707
|
};
|
|
1708
1708
|
};
|
|
1709
1709
|
});
|
|
@@ -1757,7 +1757,7 @@ function kt(e) {
|
|
|
1757
1757
|
e.type || e.fieldType || e.frontInputType
|
|
1758
1758
|
) || jt(e.renderType) || "text";
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Tt(e) {
|
|
1761
1761
|
return At(
|
|
1762
1762
|
e.type || e.fieldType || e.frontInputType
|
|
1763
1763
|
) || At(e.renderType) || "text";
|
|
@@ -1795,7 +1795,7 @@ function pn(e) {
|
|
|
1795
1795
|
return typeof t.message == "string" && (typeof t.stack == "string" || t.name === "Error");
|
|
1796
1796
|
}
|
|
1797
1797
|
function mn(e, t, n = "-") {
|
|
1798
|
-
const o =
|
|
1798
|
+
const o = Tt(e);
|
|
1799
1799
|
return o === "empty" || _e(t) ? n : pn(t) ? (console.error("[globalInfo] field value render failed", t), n) : o === "select" ? Sr(e, t, n) : o === "switch" ? vn(t) ? Z("common.是") : Z("common.否") : o === "file" ? _r(t, n) : o === "multi-row" ? wr(t, n) : String(t);
|
|
1800
1800
|
}
|
|
1801
1801
|
function dt(e, t) {
|
|
@@ -1891,8 +1891,8 @@ function vr(e, t, n) {
|
|
|
1891
1891
|
if (e && typeof e == "object") {
|
|
1892
1892
|
const o = e, r = hr(o, n), i = Fe(o.url);
|
|
1893
1893
|
if (i) {
|
|
1894
|
-
const c = { url: i }, s = Fe(o.name), l = Fe(o.mimeType),
|
|
1895
|
-
return s && (c.name = s), l && (c.mimeType = l),
|
|
1894
|
+
const c = { url: i }, s = Fe(o.name), l = Fe(o.mimeType), g = Fe(o.extension);
|
|
1895
|
+
return s && (c.name = s), l && (c.mimeType = l), g && (c.extension = g), {
|
|
1896
1896
|
key: String(t),
|
|
1897
1897
|
text: r,
|
|
1898
1898
|
action: {
|
|
@@ -1984,7 +1984,7 @@ function Sr(e, t, n) {
|
|
|
1984
1984
|
return Rt(e, t) || String(t).trim() || n;
|
|
1985
1985
|
}
|
|
1986
1986
|
function pt(e) {
|
|
1987
|
-
return !!e.props?.multiple && (kt(e) === "select" ||
|
|
1987
|
+
return !!e.props?.multiple && (kt(e) === "select" || Tt(e) === "select");
|
|
1988
1988
|
}
|
|
1989
1989
|
function Rt(e, t) {
|
|
1990
1990
|
return e.options?.find(
|
|
@@ -2056,7 +2056,7 @@ function Sn(e, t, n) {
|
|
|
2056
2056
|
});
|
|
2057
2057
|
}
|
|
2058
2058
|
function $r(e, t = {}, n = null) {
|
|
2059
|
-
const o = kn(e), r = Cn(o, t), i =
|
|
2059
|
+
const o = kn(e), r = Cn(o, t), i = Tr(o, t, n), a = Object.fromEntries(
|
|
2060
2060
|
i.map((c) => [c.key, c])
|
|
2061
2061
|
);
|
|
2062
2062
|
return {
|
|
@@ -2109,14 +2109,15 @@ function is(e) {
|
|
|
2109
2109
|
return !!(t && typeof t == "object" && typeof t.key == "string" && typeof t.tagId == "string");
|
|
2110
2110
|
}
|
|
2111
2111
|
function wn(e) {
|
|
2112
|
-
const t =
|
|
2112
|
+
const t = Tn(e);
|
|
2113
2113
|
return (Array.isArray(t) ? t : Qe(ce(t), ["options", "list", "records", "data"])).map((o) => {
|
|
2114
2114
|
const r = ce(o), i = r.fieldvalue, a = i ?? r.value ?? r.code ?? r.emplid;
|
|
2115
2115
|
return {
|
|
2116
2116
|
id: r.id,
|
|
2117
2117
|
code: i ?? r.value ?? r.code ?? r.emplid,
|
|
2118
|
+
// fieldname 在 md-options 中是字段标识,不是用户可读文案;展示文案只接受明确的 label/descr/name。
|
|
2118
2119
|
label: ee(
|
|
2119
|
-
r.
|
|
2120
|
+
r.label ?? r.descr ?? r.name
|
|
2120
2121
|
),
|
|
2121
2122
|
labelDescr: se(r.labelDescr),
|
|
2122
2123
|
name: se(r.name),
|
|
@@ -2125,29 +2126,29 @@ function wn(e) {
|
|
|
2125
2126
|
};
|
|
2126
2127
|
});
|
|
2127
2128
|
}
|
|
2128
|
-
function
|
|
2129
|
+
function Tr(e, t, n) {
|
|
2129
2130
|
const o = Qe(e, ["sections", "sets", "list"]);
|
|
2130
2131
|
return o.length > 0 ? o.map(
|
|
2131
2132
|
(r) => xt(r, t, n, o.length === 1)
|
|
2132
2133
|
) : e.infSetMark || e.infSetFields || e.fields ? [xt(e, t, n, !0)] : [];
|
|
2133
2134
|
}
|
|
2134
2135
|
function xt(e, t, n, o) {
|
|
2135
|
-
const r = ce(e), i =
|
|
2136
|
+
const r = ce(e), i = Mr(r.infSetMark ?? r), a = Or(r.infSetFields ?? r.fields ?? []), c = Cr(i), s = Fr(
|
|
2136
2137
|
r.infSetValues ?? r.rows ?? r.data,
|
|
2137
2138
|
a,
|
|
2138
2139
|
c
|
|
2139
|
-
), l = s[0] ? wt(s[0]) : In(a),
|
|
2140
|
-
r.tagId ?? r.infTagId ??
|
|
2141
|
-
),
|
|
2142
|
-
key:
|
|
2143
|
-
id:
|
|
2140
|
+
), l = s[0] ? wt(s[0]) : In(a), g = ce(r.tag), w = ee(
|
|
2141
|
+
r.tagId ?? r.infTagId ?? g.tagId ?? g.infTagId ?? i.raw.tagId ?? i.raw.infTagId
|
|
2142
|
+
), $ = ee(t.tagId ?? n?.tagId), L = ee(n?.key), P = o ? t.infSetId ?? n?.infSetId : void 0, f = o ? t.setId : void 0, S = o ? n?.code : void 0, M = i.setId || ee(r.setId), N = ee(r.infSetId) || M || ee(P), h = M || ee(f ?? N), v = i.code || ee(r.code ?? S ?? h), F = h || v || N || w, y = {
|
|
2143
|
+
key: F,
|
|
2144
|
+
id: F,
|
|
2144
2145
|
setId: h,
|
|
2145
|
-
code:
|
|
2146
|
+
code: v,
|
|
2146
2147
|
tagId: w,
|
|
2147
|
-
requestTagId:
|
|
2148
|
+
requestTagId: $ || void 0,
|
|
2148
2149
|
ownerNodeKey: L || void 0,
|
|
2149
2150
|
infSetId: N,
|
|
2150
|
-
title: i.name || ee(r.name ?? n?.tagName ??
|
|
2151
|
+
title: i.name || ee(r.name ?? n?.tagName ?? F),
|
|
2151
2152
|
renderType: c,
|
|
2152
2153
|
mark: i,
|
|
2153
2154
|
fields: a,
|
|
@@ -2158,9 +2159,9 @@ function xt(e, t, n, o) {
|
|
|
2158
2159
|
),
|
|
2159
2160
|
raw: r
|
|
2160
2161
|
};
|
|
2161
|
-
return
|
|
2162
|
+
return y.renderType === "form" && s.length === 0 && (y.rows = [{ ...l, __rowKey: `${F}-0` }]), y;
|
|
2162
2163
|
}
|
|
2163
|
-
function
|
|
2164
|
+
function Mr(e) {
|
|
2164
2165
|
const t = ce(e), n = ee(t.htmlDisplay || "F");
|
|
2165
2166
|
return {
|
|
2166
2167
|
name: ee(t.name ?? t.title),
|
|
@@ -2181,7 +2182,7 @@ function Or(e) {
|
|
|
2181
2182
|
function Dr(e, t) {
|
|
2182
2183
|
const n = ce(e), o = ee(
|
|
2183
2184
|
n.code ?? n.fieldCode ?? n.prop ?? n.key ?? `field_${t}`
|
|
2184
|
-
), r = ee(n.label ?? n.name ?? n.tagName ?? o), i =
|
|
2185
|
+
), r = ee(n.label ?? n.name ?? n.tagName ?? o), i = Mn(
|
|
2185
2186
|
n.interface ?? n.interfaceField
|
|
2186
2187
|
), a = qt(n.cascadeDependFields);
|
|
2187
2188
|
return {
|
|
@@ -2275,7 +2276,7 @@ function Br(e, t, n, o) {
|
|
|
2275
2276
|
};
|
|
2276
2277
|
}
|
|
2277
2278
|
function Er(e, t, n, o, r) {
|
|
2278
|
-
const i = ee(e.tagId ?? e.id ?? e.key), a = ee(e.tagName ?? e.name ?? e.label ?? i), c = t.infSetId || ee(t.setId), s = t.setId || c, l = c || `${i}-${r}`,
|
|
2279
|
+
const i = ee(e.tagId ?? e.id ?? e.key), a = ee(e.tagName ?? e.name ?? e.label ?? i), c = t.infSetId || ee(t.setId), s = t.setId || c, l = c || `${i}-${r}`, g = t.code || se(e.code ?? c);
|
|
2279
2280
|
return {
|
|
2280
2281
|
key: l,
|
|
2281
2282
|
id: l,
|
|
@@ -2292,7 +2293,7 @@ function Er(e, t, n, o, r) {
|
|
|
2292
2293
|
schemeId: ee(e.infSchmId ?? n?.infSchmId),
|
|
2293
2294
|
infSetId: c,
|
|
2294
2295
|
setId: s,
|
|
2295
|
-
code:
|
|
2296
|
+
code: g,
|
|
2296
2297
|
children: [],
|
|
2297
2298
|
infSetList: [t],
|
|
2298
2299
|
operationInfo: mt(e.operationInfo),
|
|
@@ -2340,9 +2341,9 @@ function Vr(e) {
|
|
|
2340
2341
|
}) : [];
|
|
2341
2342
|
}
|
|
2342
2343
|
function kn(e) {
|
|
2343
|
-
return ce(
|
|
2344
|
+
return ce(Tn(e));
|
|
2344
2345
|
}
|
|
2345
|
-
function
|
|
2346
|
+
function Tn(e) {
|
|
2346
2347
|
const t = ce(e);
|
|
2347
2348
|
return t.data ?? t.result ?? e;
|
|
2348
2349
|
}
|
|
@@ -2358,7 +2359,7 @@ function wt(e) {
|
|
|
2358
2359
|
const t = { ...e };
|
|
2359
2360
|
return delete t.__rowKey, delete t.fields, t;
|
|
2360
2361
|
}
|
|
2361
|
-
function
|
|
2362
|
+
function Mn(e) {
|
|
2362
2363
|
const t = ce(e);
|
|
2363
2364
|
if (!(!t.method && !t.url && !t.params))
|
|
2364
2365
|
return {
|
|
@@ -2374,7 +2375,7 @@ function mt(e) {
|
|
|
2374
2375
|
return Object.fromEntries(
|
|
2375
2376
|
Object.entries(t).map(([n, o]) => [
|
|
2376
2377
|
n,
|
|
2377
|
-
|
|
2378
|
+
Mn(o) ?? o
|
|
2378
2379
|
])
|
|
2379
2380
|
);
|
|
2380
2381
|
}
|
|
@@ -2432,7 +2433,7 @@ function ke(e) {
|
|
|
2432
2433
|
e.toLowerCase()
|
|
2433
2434
|
) : !!e;
|
|
2434
2435
|
}
|
|
2435
|
-
const Pe = (e) => e.key || e.code,
|
|
2436
|
+
const Pe = (e) => e.key || e.code, Me = (e) => e.key || e.setId, Rr = (e) => String(e ?? "").trim(), tt = (e) => Array.from(new Set(e.map(Rr).filter(Boolean))), Ue = (e) => !!(e && typeof e == "object" && "children" in e), Xe = (e) => tt([
|
|
2436
2437
|
e?.key,
|
|
2437
2438
|
e?.id,
|
|
2438
2439
|
e?.setId,
|
|
@@ -2480,27 +2481,27 @@ function Gr(e, t) {
|
|
|
2480
2481
|
function Kr(e) {
|
|
2481
2482
|
return wn(e);
|
|
2482
2483
|
}
|
|
2483
|
-
const
|
|
2484
|
-
const t =
|
|
2484
|
+
const Te = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : {}, at = (e) => {
|
|
2485
|
+
const t = Te(e);
|
|
2485
2486
|
return !!(t.url || t.method || t.params);
|
|
2486
2487
|
};
|
|
2487
2488
|
function Yr(e) {
|
|
2488
|
-
const t =
|
|
2489
|
+
const t = Te(e.operationInfo).openTag;
|
|
2489
2490
|
return at(t) ? t : void 0;
|
|
2490
2491
|
}
|
|
2491
2492
|
function Ur(e, t, n) {
|
|
2492
|
-
const o =
|
|
2493
|
+
const o = Te(e?.operationInfo).queryInfoSet;
|
|
2493
2494
|
if (at(o))
|
|
2494
2495
|
return o;
|
|
2495
|
-
const r = t?.infSetList.find((a) => a.infSetId === n), i =
|
|
2496
|
+
const r = t?.infSetList.find((a) => a.infSetId === n), i = Te(r?.operationInfo).queryInfoSet;
|
|
2496
2497
|
return at(i) ? i : void 0;
|
|
2497
2498
|
}
|
|
2498
2499
|
function Hr(e) {
|
|
2499
|
-
const t =
|
|
2500
|
+
const t = Te(e.operationInfo).editInfoSet;
|
|
2500
2501
|
return at(t) ? t : void 0;
|
|
2501
2502
|
}
|
|
2502
2503
|
async function En(e) {
|
|
2503
|
-
const t = e.params === void 0 ? void 0 :
|
|
2504
|
+
const t = e.params === void 0 ? void 0 : Te(e.params);
|
|
2504
2505
|
return !e.formatter || !Jr(e) ? t : e.formatter({
|
|
2505
2506
|
operation: e.operation,
|
|
2506
2507
|
interfaceOperation: e.field?.interface,
|
|
@@ -2508,8 +2509,8 @@ async function En(e) {
|
|
|
2508
2509
|
requestSource: e.requestSource,
|
|
2509
2510
|
tagId: e.tagId,
|
|
2510
2511
|
model: {
|
|
2511
|
-
...
|
|
2512
|
-
...
|
|
2512
|
+
...Te(e.section?.model),
|
|
2513
|
+
...Te(e.model)
|
|
2513
2514
|
},
|
|
2514
2515
|
row: e.row,
|
|
2515
2516
|
section: e.section,
|
|
@@ -2529,7 +2530,7 @@ function Jr(e) {
|
|
|
2529
2530
|
async function Wr(e) {
|
|
2530
2531
|
if (!e.service.requestOperation)
|
|
2531
2532
|
throw new Error("[GlobalInfo] service.requestOperation is required for operationInfo");
|
|
2532
|
-
const t = e.operation.params === void 0 ? void 0 :
|
|
2533
|
+
const t = e.operation.params === void 0 ? void 0 : Te(e.operation.params), n = Zr(t, e.context), o = await En({
|
|
2533
2534
|
formatter: e.formatter,
|
|
2534
2535
|
params: n,
|
|
2535
2536
|
operation: e.operation,
|
|
@@ -2555,10 +2556,10 @@ async function Wr(e) {
|
|
|
2555
2556
|
function Zr(e, t) {
|
|
2556
2557
|
if (t?.params === void 0)
|
|
2557
2558
|
return e;
|
|
2558
|
-
const n =
|
|
2559
|
+
const n = Te(t.params);
|
|
2559
2560
|
return t.type === "openTag" && t.requestSource === "sidebar" ? {
|
|
2560
2561
|
...n,
|
|
2561
|
-
...
|
|
2562
|
+
...Te(e)
|
|
2562
2563
|
} : n;
|
|
2563
2564
|
}
|
|
2564
2565
|
function Je(e = {}) {
|
|
@@ -2580,7 +2581,7 @@ function Je(e = {}) {
|
|
|
2580
2581
|
function Qr(e) {
|
|
2581
2582
|
const t = { ...e.currentMap }, n = { ...e.currentAliasMap }, o = [...e.currentOrder], r = { ...e.currentStatusMap }, i = zr(e.nextViewModel.sections, e.node, e.targetKey), a = tt([e.targetKey, ...Xe(e.node)]).length > 0, c = i.find((s) => Bn(s, e.node, e.targetKey)) ?? (a ? null : e.nextViewModel.activeSection ?? i[0] ?? e.activeSection ?? null);
|
|
2582
2583
|
return i.forEach((s) => {
|
|
2583
|
-
const l =
|
|
2584
|
+
const l = Me(s);
|
|
2584
2585
|
t[l] = s, o.includes(l) || o.push(l), r[l] = Je({
|
|
2585
2586
|
...r[l],
|
|
2586
2587
|
loaded: !0,
|
|
@@ -2588,12 +2589,12 @@ function Qr(e) {
|
|
|
2588
2589
|
error: null,
|
|
2589
2590
|
editing: e.editingSectionKeys.includes(l)
|
|
2590
2591
|
});
|
|
2591
|
-
}), e.targetKey && c ? n[e.targetKey] =
|
|
2592
|
+
}), e.targetKey && c ? n[e.targetKey] = Me(c) : e.targetKey && (n[e.targetKey] = ""), e.targetKey && (r[e.targetKey] = Je({
|
|
2592
2593
|
...r[e.targetKey],
|
|
2593
2594
|
loaded: !0,
|
|
2594
2595
|
loading: !1,
|
|
2595
2596
|
error: null,
|
|
2596
|
-
editing: !!(c && e.editingSectionKeys.includes(
|
|
2597
|
+
editing: !!(c && e.editingSectionKeys.includes(Me(c)))
|
|
2597
2598
|
})), {
|
|
2598
2599
|
sectionMap: t,
|
|
2599
2600
|
sectionAliasMap: n,
|
|
@@ -2618,18 +2619,18 @@ function ea(e, t) {
|
|
|
2618
2619
|
const Ne = (e) => new Error(`[GlobalInfo] ${e}`), ta = (e) => [
|
|
2619
2620
|
String(e.method ?? "").toLowerCase(),
|
|
2620
2621
|
String(e.url ?? ""),
|
|
2621
|
-
It(
|
|
2622
|
+
It(Te(e.params))
|
|
2622
2623
|
].join("::");
|
|
2623
2624
|
function It(e) {
|
|
2624
2625
|
return Array.isArray(e) ? `[${e.map((t) => It(t)).join(",")}]` : e && typeof e == "object" ? `{${Object.entries(e).sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => `${JSON.stringify(n)}:${It(o)}`).join(",")}}` : JSON.stringify(e);
|
|
2625
2626
|
}
|
|
2626
2627
|
const na = (e) => {
|
|
2627
|
-
const t = ge(!1), n = ge(!1), o = ge(!1), r = je(null), i = je([]), a = je(null), c = je(null), s = je(null), l = je({}),
|
|
2628
|
+
const t = ge(!1), n = ge(!1), o = ge(!1), r = je(null), i = je([]), a = je(null), c = je(null), s = je(null), l = je({}), g = je({}), w = ge([]), $ = je({}), L = ge([]), P = O(
|
|
2628
2629
|
() => {
|
|
2629
|
-
const
|
|
2630
|
-
return [...
|
|
2630
|
+
const m = w.value.map((k) => l.value[k]).filter((k) => !!k), p = Object.entries(l.value).filter(([k]) => !w.value.includes(k)).map(([, k]) => k);
|
|
2631
|
+
return [...m, ...p];
|
|
2631
2632
|
}
|
|
2632
|
-
),
|
|
2633
|
+
), f = O(() => ({
|
|
2633
2634
|
// 整棵树是否正在加载。
|
|
2634
2635
|
loading: t.value,
|
|
2635
2636
|
// 当前详情是否正在加载。
|
|
@@ -2642,161 +2643,161 @@ const na = (e) => {
|
|
|
2642
2643
|
sectionMap: l.value,
|
|
2643
2644
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
2644
2645
|
sectionStatusMap: Object.fromEntries(
|
|
2645
|
-
Object.entries(
|
|
2646
|
-
|
|
2646
|
+
Object.entries($.value).map(([m, p]) => [
|
|
2647
|
+
m,
|
|
2647
2648
|
{
|
|
2648
2649
|
// 保留原状态字段。
|
|
2649
|
-
...
|
|
2650
|
+
...p,
|
|
2650
2651
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
2651
2652
|
editing: L.value.includes(
|
|
2652
|
-
|
|
2653
|
+
g.value[m] ?? m
|
|
2653
2654
|
)
|
|
2654
2655
|
}
|
|
2655
2656
|
])
|
|
2656
2657
|
),
|
|
2657
2658
|
// 最近一次全局错误。
|
|
2658
2659
|
error: r.value
|
|
2659
|
-
})),
|
|
2660
|
+
})), S = () => ({
|
|
2660
2661
|
// adaptScene 透传给新接口形态。
|
|
2661
2662
|
adaptScene: e.adaptScene,
|
|
2662
2663
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
2663
2664
|
emplid: e.emplid
|
|
2664
|
-
}),
|
|
2665
|
+
}), M = (m) => ({
|
|
2665
2666
|
// 复用基础参数,保证人员和场景一致。
|
|
2666
|
-
...
|
|
2667
|
+
...S(),
|
|
2667
2668
|
// infSchmId 指定当前模板方案。
|
|
2668
|
-
infSchmId:
|
|
2669
|
+
infSchmId: m.infSchmId,
|
|
2669
2670
|
// tagId 指定要展开的树节点。
|
|
2670
|
-
tagId:
|
|
2671
|
+
tagId: m.tagId,
|
|
2671
2672
|
// tagLevel 告诉后端当前节点层级。
|
|
2672
|
-
tagLevel:
|
|
2673
|
+
tagLevel: m.tagLevel,
|
|
2673
2674
|
// parentTagId 保留父子关系上下文。
|
|
2674
|
-
parentTagId:
|
|
2675
|
-
}), N = (
|
|
2675
|
+
parentTagId: m.parentTagId
|
|
2676
|
+
}), N = (m = c.value, p = s.value) => ({
|
|
2676
2677
|
// 详情接口同样需要基础人员和场景参数。
|
|
2677
|
-
...
|
|
2678
|
+
...S(),
|
|
2678
2679
|
// 当前节点所属模板方案。
|
|
2679
|
-
infSchmId:
|
|
2680
|
+
infSchmId: m?.infSchmId,
|
|
2680
2681
|
// 当前点击或加载的树节点 id。
|
|
2681
|
-
tagId:
|
|
2682
|
+
tagId: m?.tagId,
|
|
2682
2683
|
// 保存或刷新指定 section 时优先使用 section 自己的信息集 id。
|
|
2683
|
-
infSetId:
|
|
2684
|
+
infSetId: p?.infSetId ?? m?.infSetId,
|
|
2684
2685
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
2685
|
-
setId:
|
|
2686
|
-
}), h = async (
|
|
2686
|
+
setId: p?.setId ?? m?.setId
|
|
2687
|
+
}), h = async (m, p) => Wr({
|
|
2687
2688
|
service: e.service,
|
|
2688
2689
|
formatter: e.formatOperationParams,
|
|
2689
|
-
operation:
|
|
2690
|
-
context:
|
|
2690
|
+
operation: m,
|
|
2691
|
+
context: p,
|
|
2691
2692
|
viewModel: a.value,
|
|
2692
2693
|
sections: P.value,
|
|
2693
2694
|
activeNode: c.value,
|
|
2694
2695
|
activeSection: s.value
|
|
2695
|
-
}),
|
|
2696
|
-
async (
|
|
2696
|
+
}), v = nr(
|
|
2697
|
+
async (m, p) => {
|
|
2697
2698
|
if (!e.service.requestOperation)
|
|
2698
2699
|
throw Ne("service.requestOperation is required");
|
|
2699
|
-
return e.service.requestOperation(
|
|
2700
|
+
return e.service.requestOperation(m, p);
|
|
2700
2701
|
},
|
|
2701
|
-
(
|
|
2702
|
-
),
|
|
2702
|
+
(m) => ta(m)
|
|
2703
|
+
), F = async (m, p) => {
|
|
2703
2704
|
const k = await En({
|
|
2704
2705
|
formatter: e.formatOperationParams,
|
|
2705
|
-
params:
|
|
2706
|
-
operation:
|
|
2707
|
-
type:
|
|
2708
|
-
requestSource:
|
|
2709
|
-
tagId:
|
|
2710
|
-
section:
|
|
2711
|
-
field:
|
|
2712
|
-
model:
|
|
2713
|
-
row:
|
|
2714
|
-
node:
|
|
2706
|
+
params: p?.params,
|
|
2707
|
+
operation: m,
|
|
2708
|
+
type: p?.type,
|
|
2709
|
+
requestSource: p?.requestSource,
|
|
2710
|
+
tagId: p?.tagId,
|
|
2711
|
+
section: p?.section,
|
|
2712
|
+
field: p?.field,
|
|
2713
|
+
model: p?.model,
|
|
2714
|
+
row: p?.row,
|
|
2715
|
+
node: p?.node,
|
|
2715
2716
|
viewModel: a.value,
|
|
2716
2717
|
sections: P.value,
|
|
2717
2718
|
activeNode: c.value,
|
|
2718
2719
|
activeSection: s.value,
|
|
2719
|
-
searchText:
|
|
2720
|
-
}), Y = { ...
|
|
2721
|
-
return
|
|
2722
|
-
},
|
|
2723
|
-
if (!
|
|
2724
|
-
return
|
|
2725
|
-
for (const k of
|
|
2726
|
-
if (Xe(k).includes(
|
|
2720
|
+
searchText: p?.searchText
|
|
2721
|
+
}), Y = { ...m, params: k }, W = p && { ...p, params: k };
|
|
2722
|
+
return v(Y, W);
|
|
2723
|
+
}, y = (m, p) => {
|
|
2724
|
+
if (!p)
|
|
2725
|
+
return m[0] ?? null;
|
|
2726
|
+
for (const k of m) {
|
|
2727
|
+
if (Xe(k).includes(p))
|
|
2727
2728
|
return k;
|
|
2728
|
-
const Y =
|
|
2729
|
+
const Y = y(k.children, p);
|
|
2729
2730
|
if (Y)
|
|
2730
2731
|
return Y;
|
|
2731
2732
|
}
|
|
2732
2733
|
return null;
|
|
2733
|
-
}, A = (
|
|
2734
|
-
if (
|
|
2735
|
-
return typeof
|
|
2736
|
-
},
|
|
2737
|
-
const
|
|
2738
|
-
if (!
|
|
2734
|
+
}, A = (m = s.value) => {
|
|
2735
|
+
if (m)
|
|
2736
|
+
return typeof m == "string" ? m : Ue(m) ? C(m) : Me(m);
|
|
2737
|
+
}, b = (m = s.value) => {
|
|
2738
|
+
const p = A(m);
|
|
2739
|
+
if (!p)
|
|
2739
2740
|
return null;
|
|
2740
|
-
const k =
|
|
2741
|
+
const k = g.value[p] ?? p;
|
|
2741
2742
|
return l.value[k] ?? null;
|
|
2742
|
-
},
|
|
2743
|
-
const
|
|
2744
|
-
if (f)
|
|
2745
|
-
return b.value[f] ?? f;
|
|
2746
|
-
}, M = (p = s.value) => {
|
|
2743
|
+
}, j = (m = s.value) => {
|
|
2744
|
+
const p = A(m);
|
|
2747
2745
|
if (p)
|
|
2748
|
-
return
|
|
2749
|
-
},
|
|
2750
|
-
if (
|
|
2751
|
-
return
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2746
|
+
return g.value[p] ?? p;
|
|
2747
|
+
}, C = (m = s.value) => {
|
|
2748
|
+
if (m)
|
|
2749
|
+
return typeof m == "string" ? m : Ue(m) ? m.setId ?? m.infSetId ?? m.key : Me(m);
|
|
2750
|
+
}, z = (m = s.value) => {
|
|
2751
|
+
if (Ue(m))
|
|
2752
|
+
return m;
|
|
2753
|
+
if (typeof m == "string") {
|
|
2754
|
+
const p = y(i.value, m);
|
|
2755
|
+
if (p)
|
|
2756
|
+
return p;
|
|
2757
|
+
const k = b(m);
|
|
2758
|
+
return k?.ownerNodeKey ? y(i.value, k.ownerNodeKey) ?? c.value : k || c.value && Xe(c.value).includes(m) ? c.value : null;
|
|
2758
2759
|
}
|
|
2759
|
-
return
|
|
2760
|
-
}, re = (
|
|
2761
|
-
const
|
|
2762
|
-
if (!
|
|
2760
|
+
return m?.ownerNodeKey ? y(i.value, m.ownerNodeKey) ?? c.value : c.value;
|
|
2761
|
+
}, re = (m = s.value) => !m || Ue(m) ? null : b(m), le = (m = s.value) => {
|
|
2762
|
+
const p = C(m);
|
|
2763
|
+
if (!p)
|
|
2763
2764
|
return Je();
|
|
2764
|
-
const k =
|
|
2765
|
+
const k = g.value[p] ?? p;
|
|
2765
2766
|
return Je({
|
|
2766
|
-
|
|
2767
|
-
|
|
2767
|
+
...$.value[p],
|
|
2768
|
+
...$.value[k],
|
|
2768
2769
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
2769
2770
|
editing: L.value.includes(
|
|
2770
2771
|
k
|
|
2771
2772
|
)
|
|
2772
2773
|
});
|
|
2773
|
-
}, R = (
|
|
2774
|
-
const k =
|
|
2775
|
-
k && (
|
|
2776
|
-
|
|
2774
|
+
}, R = (m, p) => {
|
|
2775
|
+
const k = C(m);
|
|
2776
|
+
k && ($.value = {
|
|
2777
|
+
...$.value,
|
|
2777
2778
|
[k]: Je({
|
|
2778
2779
|
// 保留已有状态。
|
|
2779
|
-
|
|
2780
|
+
...$.value[k],
|
|
2780
2781
|
// 合并本次状态补丁。
|
|
2781
|
-
...
|
|
2782
|
+
...p,
|
|
2782
2783
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
2783
2784
|
editing: L.value.includes(k)
|
|
2784
2785
|
})
|
|
2785
2786
|
});
|
|
2786
|
-
},
|
|
2787
|
+
}, B = (m = a.value?.raw ?? null, p = c.value) => {
|
|
2787
2788
|
const k = P.value, Y = s.value && k.find(
|
|
2788
|
-
(W) =>
|
|
2789
|
+
(W) => Me(W) === Me(s.value)
|
|
2789
2790
|
) ? s.value : null;
|
|
2790
2791
|
a.value = {
|
|
2791
2792
|
// 保留原 scheme。
|
|
2792
2793
|
scheme: a.value?.scheme ?? null,
|
|
2793
2794
|
// 当前节点。
|
|
2794
|
-
node:
|
|
2795
|
+
node: p,
|
|
2795
2796
|
// 顶层节点和树节点都来自 nodes。
|
|
2796
2797
|
topNodes: i.value,
|
|
2797
2798
|
treeNodes: i.value,
|
|
2798
2799
|
// 当前激活节点。
|
|
2799
|
-
activeNode:
|
|
2800
|
+
activeNode: p,
|
|
2800
2801
|
// 当前激活 section。
|
|
2801
2802
|
activeSection: Y,
|
|
2802
2803
|
// 当前所有已加载 section。
|
|
@@ -2804,53 +2805,53 @@ const na = (e) => {
|
|
|
2804
2805
|
// 当前 section 缓存。
|
|
2805
2806
|
sectionMap: l.value,
|
|
2806
2807
|
// 保留原始接口数据。
|
|
2807
|
-
raw:
|
|
2808
|
+
raw: m
|
|
2808
2809
|
}, s.value = Y;
|
|
2809
|
-
},
|
|
2810
|
+
}, E = (m, p = c.value, k) => {
|
|
2810
2811
|
const Y = Qr({
|
|
2811
2812
|
currentMap: l.value,
|
|
2812
|
-
currentAliasMap:
|
|
2813
|
+
currentAliasMap: g.value,
|
|
2813
2814
|
currentOrder: w.value,
|
|
2814
|
-
currentStatusMap:
|
|
2815
|
+
currentStatusMap: $.value,
|
|
2815
2816
|
editingSectionKeys: L.value,
|
|
2816
|
-
nextViewModel:
|
|
2817
|
-
node:
|
|
2817
|
+
nextViewModel: m,
|
|
2818
|
+
node: p,
|
|
2818
2819
|
targetKey: k,
|
|
2819
2820
|
activeSection: s.value
|
|
2820
2821
|
});
|
|
2821
|
-
return l.value = Y.sectionMap,
|
|
2822
|
-
...
|
|
2823
|
-
scheme:
|
|
2822
|
+
return l.value = Y.sectionMap, g.value = Y.sectionAliasMap, w.value = Y.sectionOrder, $.value = Y.sectionStatusMap, a.value = {
|
|
2823
|
+
...m,
|
|
2824
|
+
scheme: m.scheme ?? a.value?.scheme ?? null,
|
|
2824
2825
|
topNodes: i.value,
|
|
2825
2826
|
treeNodes: i.value,
|
|
2826
|
-
activeNode:
|
|
2827
|
+
activeNode: p,
|
|
2827
2828
|
activeSection: Y.matchedSection,
|
|
2828
2829
|
sections: Y.targetSections,
|
|
2829
2830
|
sectionMap: l.value
|
|
2830
2831
|
}, s.value = Y.matchedSection, Y.matchedSection;
|
|
2831
|
-
},
|
|
2832
|
-
const k =
|
|
2832
|
+
}, d = (m, p) => {
|
|
2833
|
+
const k = j(m), Y = k ? l.value[k] : null;
|
|
2833
2834
|
if (!k || !Y)
|
|
2834
2835
|
return;
|
|
2835
|
-
const W =
|
|
2836
|
+
const W = p(Y);
|
|
2836
2837
|
l.value = {
|
|
2837
2838
|
...l.value,
|
|
2838
2839
|
[k]: W
|
|
2839
|
-
}, s.value =
|
|
2840
|
-
},
|
|
2841
|
-
const
|
|
2840
|
+
}, s.value = Me(s.value ?? W) === k ? W : s.value, B();
|
|
2841
|
+
}, u = async (m = s.value ?? c.value) => {
|
|
2842
|
+
const p = re(m), k = z(m) ?? c.value, Y = C(m);
|
|
2842
2843
|
if (!k)
|
|
2843
2844
|
return null;
|
|
2844
2845
|
if (!e.service.requestOperation)
|
|
2845
2846
|
throw Ne("service.requestOperation is required");
|
|
2846
2847
|
n.value = !0, r.value = null, R(Y ?? k, { loading: !0, error: null });
|
|
2847
2848
|
try {
|
|
2848
|
-
const W =
|
|
2849
|
+
const W = p ? [{ infSetId: p.infSetId, setId: p.setId, operationInfo: p.operationInfo, raw: p.raw }] : k.infSetList;
|
|
2849
2850
|
if (W.length === 0)
|
|
2850
2851
|
throw Ne("node.infSetList is required");
|
|
2851
2852
|
const Ce = await Promise.all(W.map(async (ie) => {
|
|
2852
|
-
const he = Ur(
|
|
2853
|
-
...N(k,
|
|
2853
|
+
const he = Ur(p, k, ie.infSetId), Ae = p?.requestTagId ?? p?.tagId ?? k.tagId, ot = {
|
|
2854
|
+
...N(k, p),
|
|
2854
2855
|
tagId: Ae,
|
|
2855
2856
|
infSetId: ie.infSetId,
|
|
2856
2857
|
setId: ie.setId,
|
|
@@ -2862,7 +2863,7 @@ const na = (e) => {
|
|
|
2862
2863
|
requestSource: "inner",
|
|
2863
2864
|
tagId: Ae,
|
|
2864
2865
|
node: k,
|
|
2865
|
-
section:
|
|
2866
|
+
section: p,
|
|
2866
2867
|
params: ot
|
|
2867
2868
|
});
|
|
2868
2869
|
return $r(Ke, ot, k);
|
|
@@ -2873,48 +2874,48 @@ const na = (e) => {
|
|
|
2873
2874
|
sections: Ce.flatMap((ie) => ie.sections),
|
|
2874
2875
|
sectionMap: Object.fromEntries(Ce.flatMap((ie) => ie.sections).map((ie) => [ie.key, ie]))
|
|
2875
2876
|
};
|
|
2876
|
-
return
|
|
2877
|
+
return E(ve, k, Y);
|
|
2877
2878
|
} catch (W) {
|
|
2878
2879
|
throw r.value = W, R(Y ?? k, { loading: !1, error: W }), W;
|
|
2879
2880
|
} finally {
|
|
2880
2881
|
n.value = !1, R(Y ?? k, { loading: !1 });
|
|
2881
2882
|
}
|
|
2882
|
-
},
|
|
2883
|
-
if (!
|
|
2883
|
+
}, _ = (m = s.value) => u(m), D = (m = s.value) => {
|
|
2884
|
+
if (!m)
|
|
2884
2885
|
return null;
|
|
2885
|
-
if (!Ue(
|
|
2886
|
-
return
|
|
2887
|
-
const
|
|
2888
|
-
return
|
|
2889
|
-
},
|
|
2890
|
-
const
|
|
2891
|
-
if (!
|
|
2892
|
-
return
|
|
2893
|
-
const k =
|
|
2886
|
+
if (!Ue(m) && typeof m != "string")
|
|
2887
|
+
return b(m);
|
|
2888
|
+
const p = C(m);
|
|
2889
|
+
return p ? l.value[g.value[p] ?? p] ?? null : null;
|
|
2890
|
+
}, V = async (m = c.value) => m ? (await u(m), a.value) : (a.value = null, s.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {}, null), x = async (m) => {
|
|
2891
|
+
const p = Yr(m);
|
|
2892
|
+
if (!p)
|
|
2893
|
+
return m.children;
|
|
2894
|
+
const k = M(m), Y = await h(p, {
|
|
2894
2895
|
type: "openTag",
|
|
2895
2896
|
requestSource: "sidebar",
|
|
2896
|
-
tagId:
|
|
2897
|
-
node:
|
|
2897
|
+
tagId: m.tagId,
|
|
2898
|
+
node: m,
|
|
2898
2899
|
params: k
|
|
2899
2900
|
});
|
|
2900
2901
|
return zt(Y).treeNodes;
|
|
2901
|
-
}, K = async (
|
|
2902
|
-
if (
|
|
2903
|
-
return
|
|
2904
|
-
const
|
|
2905
|
-
return
|
|
2906
|
-
},
|
|
2907
|
-
const
|
|
2908
|
-
return
|
|
2902
|
+
}, K = async (m) => {
|
|
2903
|
+
if (m.loaded)
|
|
2904
|
+
return m.children;
|
|
2905
|
+
const p = await x(m);
|
|
2906
|
+
return p.length > 0 && (i.value = Sn(i.value, m.key, p)), p;
|
|
2907
|
+
}, q = async (m) => {
|
|
2908
|
+
const p = typeof m == "string" ? y(i.value, m) : m;
|
|
2909
|
+
return p ? (c.value = p, s.value = null, L.value = [], await K(p), B(a.value?.raw, p), p) : null;
|
|
2909
2910
|
}, Q = async () => {
|
|
2910
|
-
const
|
|
2911
|
-
if (!
|
|
2911
|
+
const m = e.service.templateTree;
|
|
2912
|
+
if (!m)
|
|
2912
2913
|
throw Ne("service.templateTree is required");
|
|
2913
2914
|
t.value = !0, r.value = null;
|
|
2914
2915
|
try {
|
|
2915
|
-
const
|
|
2916
|
+
const p = await m(S()), k = zt(p), Y = await Promise.all(
|
|
2916
2917
|
k.treeNodes.map(async (Ce) => {
|
|
2917
|
-
const ve = await
|
|
2918
|
+
const ve = await x(Ce);
|
|
2918
2919
|
return {
|
|
2919
2920
|
...Ce,
|
|
2920
2921
|
children: ve,
|
|
@@ -2922,8 +2923,8 @@ const na = (e) => {
|
|
|
2922
2923
|
};
|
|
2923
2924
|
})
|
|
2924
2925
|
);
|
|
2925
|
-
i.value = Y, s.value = null, l.value = {},
|
|
2926
|
-
const W =
|
|
2926
|
+
i.value = Y, s.value = null, l.value = {}, g.value = {}, w.value = [], $.value = {}, L.value = [];
|
|
2927
|
+
const W = y(Y, e.initialActiveNodeKey) ?? y(Y);
|
|
2927
2928
|
return c.value = W, a.value = {
|
|
2928
2929
|
...k,
|
|
2929
2930
|
treeNodes: Y,
|
|
@@ -2931,33 +2932,33 @@ const na = (e) => {
|
|
|
2931
2932
|
sectionMap: l.value,
|
|
2932
2933
|
sections: P.value
|
|
2933
2934
|
}, i.value;
|
|
2934
|
-
} catch (
|
|
2935
|
-
throw r.value =
|
|
2935
|
+
} catch (p) {
|
|
2936
|
+
throw r.value = p, p;
|
|
2936
2937
|
} finally {
|
|
2937
2938
|
t.value = !1;
|
|
2938
2939
|
}
|
|
2939
|
-
},
|
|
2940
|
-
const
|
|
2941
|
-
await
|
|
2942
|
-
const
|
|
2943
|
-
(k) =>
|
|
2940
|
+
}, T = async () => {
|
|
2941
|
+
const m = A();
|
|
2942
|
+
await _(s.value ?? c.value);
|
|
2943
|
+
const p = P.value.find(
|
|
2944
|
+
(k) => Me(k) === m
|
|
2944
2945
|
);
|
|
2945
|
-
return
|
|
2946
|
-
}, X = (
|
|
2947
|
-
const
|
|
2948
|
-
return !!(
|
|
2949
|
-
},
|
|
2950
|
-
const
|
|
2951
|
-
!
|
|
2952
|
-
},
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2955
|
-
(k) => k !==
|
|
2956
|
-
), R(
|
|
2957
|
-
}, me = (
|
|
2958
|
-
const Y = typeof
|
|
2959
|
-
|
|
2960
|
-
const ve = (typeof
|
|
2946
|
+
return p && (s.value = p), B(), a.value;
|
|
2947
|
+
}, X = (m = s.value) => {
|
|
2948
|
+
const p = j(m);
|
|
2949
|
+
return !!(p && L.value.includes(p));
|
|
2950
|
+
}, ue = (m = s.value) => {
|
|
2951
|
+
const p = j(m);
|
|
2952
|
+
!p || X(p) || (L.value = [...L.value, p], R(p, { editing: !0 }));
|
|
2953
|
+
}, de = (m = s.value) => {
|
|
2954
|
+
const p = j(m);
|
|
2955
|
+
p && (L.value = L.value.filter(
|
|
2956
|
+
(k) => k !== p
|
|
2957
|
+
), R(p, { editing: !1 }));
|
|
2958
|
+
}, me = (m, p, k) => {
|
|
2959
|
+
const Y = typeof p == "string" ? p : Pe(p);
|
|
2960
|
+
d(m, (W) => {
|
|
2961
|
+
const ve = (typeof p == "string" ? W.fields.find((he) => Pe(he) === Y || he.code === Y) : p)?.cascadeClearFields ?? [], ie = {
|
|
2961
2962
|
...W.model,
|
|
2962
2963
|
[Y]: k
|
|
2963
2964
|
};
|
|
@@ -2977,8 +2978,8 @@ const na = (e) => {
|
|
|
2977
2978
|
})
|
|
2978
2979
|
};
|
|
2979
2980
|
});
|
|
2980
|
-
}, we = async (
|
|
2981
|
-
const W =
|
|
2981
|
+
}, we = async (m, p, k = {}, Y = {}) => {
|
|
2982
|
+
const W = b(m);
|
|
2982
2983
|
if (!W)
|
|
2983
2984
|
return [];
|
|
2984
2985
|
const Ce = {
|
|
@@ -2990,19 +2991,19 @@ const na = (e) => {
|
|
|
2990
2991
|
sourceModel: he,
|
|
2991
2992
|
sourceRow: Ae,
|
|
2992
2993
|
missingDependField: ot
|
|
2993
|
-
} = xr(W,
|
|
2994
|
+
} = xr(W, p, Ce), Ke = ie?.interface;
|
|
2994
2995
|
if (!ie || !Ke)
|
|
2995
2996
|
return ie?.options ?? [];
|
|
2996
2997
|
if (qr(ie))
|
|
2997
2998
|
return ie.options ?? [];
|
|
2998
2999
|
if (ot)
|
|
2999
|
-
return
|
|
3000
|
+
return d(W, (Ye) => ({
|
|
3000
3001
|
...Ye,
|
|
3001
3002
|
fields: Ye.fields.map(
|
|
3002
3003
|
(Ve) => Pe(Ve) === ve || Ve.code === ve ? { ...Ve, options: [] } : Ve
|
|
3003
3004
|
)
|
|
3004
3005
|
})), [];
|
|
3005
|
-
const Yn = await
|
|
3006
|
+
const Yn = await F(
|
|
3006
3007
|
{
|
|
3007
3008
|
...Ke
|
|
3008
3009
|
},
|
|
@@ -3010,66 +3011,66 @@ const na = (e) => {
|
|
|
3010
3011
|
type: "fieldOptions",
|
|
3011
3012
|
requestSource: "inner",
|
|
3012
3013
|
tagId: W.requestTagId ?? W.tagId,
|
|
3013
|
-
node:
|
|
3014
|
+
node: z(W),
|
|
3014
3015
|
section: W,
|
|
3015
3016
|
field: ie,
|
|
3016
|
-
params:
|
|
3017
|
+
params: Te(Ke.params),
|
|
3017
3018
|
// searchText 参与本次查询时,需要一并透传到 model 上,避免被依赖检查视为缺失并提前截断请求。
|
|
3018
3019
|
model: he,
|
|
3019
3020
|
row: Ae,
|
|
3020
3021
|
searchText: Y.searchText
|
|
3021
3022
|
}
|
|
3022
3023
|
), Ot = Kr(Yn);
|
|
3023
|
-
return
|
|
3024
|
+
return d(W, (Ye) => ({
|
|
3024
3025
|
...Ye,
|
|
3025
3026
|
fields: Ye.fields.map(
|
|
3026
3027
|
(Ve) => Pe(Ve) === ve || Ve.code === ve ? { ...Ve, options: Ot } : Ve
|
|
3027
3028
|
)
|
|
3028
3029
|
})), Ot;
|
|
3029
|
-
}, De = (
|
|
3030
|
-
if (Array.isArray(
|
|
3031
|
-
$e(
|
|
3030
|
+
}, De = (m, p) => {
|
|
3031
|
+
if (Array.isArray(p)) {
|
|
3032
|
+
$e(m, p);
|
|
3032
3033
|
return;
|
|
3033
3034
|
}
|
|
3034
|
-
|
|
3035
|
+
d(m, (k) => ({
|
|
3035
3036
|
...k,
|
|
3036
3037
|
// 替换当前 model。
|
|
3037
|
-
model:
|
|
3038
|
+
model: p,
|
|
3038
3039
|
// 表单类型同步合并到第一行 rows。
|
|
3039
|
-
rows: k.renderType === "form" ? [{ ...k.rows[0], ...
|
|
3040
|
+
rows: k.renderType === "form" ? [{ ...k.rows[0], ...p }] : k.rows,
|
|
3040
3041
|
// fields.value 也同步成 model 中的值。
|
|
3041
3042
|
fields: k.fields.map((Y) => ({
|
|
3042
3043
|
...Y,
|
|
3043
|
-
value:
|
|
3044
|
+
value: p[Pe(Y)]
|
|
3044
3045
|
}))
|
|
3045
3046
|
}));
|
|
3046
|
-
}, $e = (
|
|
3047
|
-
|
|
3047
|
+
}, $e = (m, p) => {
|
|
3048
|
+
d(m, (k) => ({
|
|
3048
3049
|
...k,
|
|
3049
|
-
rows:
|
|
3050
|
-
data:
|
|
3050
|
+
rows: p,
|
|
3051
|
+
data: p
|
|
3051
3052
|
}));
|
|
3052
3053
|
}, Ge = {
|
|
3053
3054
|
// 加载模板树。
|
|
3054
3055
|
loadTree: Q,
|
|
3055
3056
|
// 选中树节点。
|
|
3056
|
-
selectNode:
|
|
3057
|
+
selectNode: q,
|
|
3057
3058
|
// 加载当前节点详情。
|
|
3058
|
-
loadDetail:
|
|
3059
|
+
loadDetail: V,
|
|
3059
3060
|
// 刷新当前详情。
|
|
3060
|
-
reloadActiveSection:
|
|
3061
|
+
reloadActiveSection: T,
|
|
3061
3062
|
// 加载指定节点或 section。
|
|
3062
|
-
loadSection:
|
|
3063
|
+
loadSection: u,
|
|
3063
3064
|
// 重新加载指定节点或 section。
|
|
3064
|
-
reloadSection:
|
|
3065
|
+
reloadSection: _,
|
|
3065
3066
|
// 获取指定节点或 section 的缓存数据。
|
|
3066
|
-
getSection:
|
|
3067
|
+
getSection: D,
|
|
3067
3068
|
// 获取指定节点或 section 的状态。
|
|
3068
3069
|
getSectionStatus: le,
|
|
3069
3070
|
// 开启编辑。
|
|
3070
|
-
startEdit:
|
|
3071
|
+
startEdit: ue,
|
|
3071
3072
|
// 取消编辑。
|
|
3072
|
-
cancelEdit:
|
|
3073
|
+
cancelEdit: de,
|
|
3073
3074
|
// 更新单字段。
|
|
3074
3075
|
updateField: me,
|
|
3075
3076
|
// 加载字段动态选项。
|
|
@@ -3079,26 +3080,26 @@ const na = (e) => {
|
|
|
3079
3080
|
// 更新表格行。
|
|
3080
3081
|
updateTableRows: $e,
|
|
3081
3082
|
// 保存单行到本地缓存。
|
|
3082
|
-
saveRow: (
|
|
3083
|
-
const W = [...
|
|
3084
|
-
W.splice(k >= 0 ? k : W.length, k >= 0 ? 1 : 0,
|
|
3083
|
+
saveRow: (m, p = {}, k = -1) => {
|
|
3084
|
+
const W = [...b(m)?.rows ?? []];
|
|
3085
|
+
W.splice(k >= 0 ? k : W.length, k >= 0 ? 1 : 0, p), $e(m, W);
|
|
3085
3086
|
},
|
|
3086
3087
|
// 删除单行本地缓存。
|
|
3087
|
-
deleteRow: (
|
|
3088
|
-
const k =
|
|
3088
|
+
deleteRow: (m, p) => {
|
|
3089
|
+
const k = b(m), Y = typeof p == "string" ? Number(p) : p, W = (k?.rows ?? []).filter(
|
|
3089
3090
|
(Ce, ve) => ve !== Y
|
|
3090
3091
|
);
|
|
3091
|
-
$e(
|
|
3092
|
+
$e(m, W);
|
|
3092
3093
|
},
|
|
3093
3094
|
// 调用接口保存 section。
|
|
3094
|
-
saveSection: async (
|
|
3095
|
-
const
|
|
3095
|
+
saveSection: async (m = s.value) => {
|
|
3096
|
+
const p = A(m), k = b(m);
|
|
3096
3097
|
if (!k)
|
|
3097
3098
|
return null;
|
|
3098
3099
|
const Y = Hr(k);
|
|
3099
3100
|
if (!Y)
|
|
3100
3101
|
throw Ne("section.operationInfo.editInfoSet is required");
|
|
3101
|
-
o.value = !0, r.value = null,
|
|
3102
|
+
o.value = !0, r.value = null, p && p !== Me(k) && R(p, { saving: !0, error: null }), R(k, { saving: !0, error: null });
|
|
3102
3103
|
try {
|
|
3103
3104
|
const {
|
|
3104
3105
|
tagId: W,
|
|
@@ -3125,11 +3126,11 @@ const na = (e) => {
|
|
|
3125
3126
|
model: k.model
|
|
3126
3127
|
}
|
|
3127
3128
|
);
|
|
3128
|
-
return
|
|
3129
|
+
return de(k), await _(k), he;
|
|
3129
3130
|
} catch (W) {
|
|
3130
|
-
throw r.value = W,
|
|
3131
|
+
throw r.value = W, p && p !== Me(k) && R(p, { saving: !1, error: W }), R(k, { saving: !1, error: W }), W;
|
|
3131
3132
|
} finally {
|
|
3132
|
-
o.value = !1,
|
|
3133
|
+
o.value = !1, p && p !== Me(k) && R(p, { saving: !1 }), R(k, { saving: !1 });
|
|
3133
3134
|
}
|
|
3134
3135
|
},
|
|
3135
3136
|
// 判断编辑态。
|
|
@@ -3153,13 +3154,13 @@ const na = (e) => {
|
|
|
3153
3154
|
// 当前 section 缓存。
|
|
3154
3155
|
sectionMap: l,
|
|
3155
3156
|
// 当前 section 状态缓存。
|
|
3156
|
-
sectionStatusMap:
|
|
3157
|
+
sectionStatusMap: $,
|
|
3157
3158
|
// 当前激活节点。
|
|
3158
3159
|
activeNode: c,
|
|
3159
3160
|
// 当前激活 section。
|
|
3160
3161
|
activeSection: s,
|
|
3161
3162
|
// 给页面消费的状态快照。
|
|
3162
|
-
state:
|
|
3163
|
+
state: f,
|
|
3163
3164
|
// 给页面消费的操作集合。
|
|
3164
3165
|
actions: Ge
|
|
3165
3166
|
};
|
|
@@ -3177,7 +3178,7 @@ const na = (e) => {
|
|
|
3177
3178
|
},
|
|
3178
3179
|
setup(e) {
|
|
3179
3180
|
const t = e, n = na(t), { viewModel: o, nodes: r, sections: i, activeNode: a, activeSection: c, state: s, actions: l } = n;
|
|
3180
|
-
return (
|
|
3181
|
+
return (g, w) => te(g.$slots, "default", Oe(Be({
|
|
3181
3182
|
viewModel: J(o),
|
|
3182
3183
|
nodes: J(r),
|
|
3183
3184
|
sections: J(i),
|
|
@@ -3234,161 +3235,171 @@ const oa = {
|
|
|
3234
3235
|
"html",
|
|
3235
3236
|
"code",
|
|
3236
3237
|
"multi-row"
|
|
3237
|
-
], i = ge(null), a =
|
|
3238
|
+
], i = ge(null), a = O(
|
|
3238
3239
|
() => kt(n.field)
|
|
3239
|
-
), c =
|
|
3240
|
+
), c = O(
|
|
3240
3241
|
() => ut(n.field)
|
|
3241
|
-
), s =
|
|
3242
|
+
), s = O(
|
|
3242
3243
|
() => dr(n.field)
|
|
3243
|
-
), l =
|
|
3244
|
+
), l = O(
|
|
3244
3245
|
() => n.disabled || n.field.disabled || n.field.readonly
|
|
3245
|
-
),
|
|
3246
|
+
), g = O(() => !!n.field.props?.multiple), w = O(
|
|
3246
3247
|
() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)
|
|
3247
|
-
),
|
|
3248
|
+
), $ = O(
|
|
3248
3249
|
() => r.includes(a.value) ? n.field.props?.resize ?? "vertical" : void 0
|
|
3249
|
-
), L =
|
|
3250
|
+
), L = O(() => {
|
|
3250
3251
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "")
|
|
3251
3252
|
return;
|
|
3252
|
-
const
|
|
3253
|
-
return Number.isFinite(
|
|
3254
|
-
}), P =
|
|
3253
|
+
const u = typeof n.modelValue == "number" ? n.modelValue : Number(n.modelValue);
|
|
3254
|
+
return Number.isFinite(u) ? u : void 0;
|
|
3255
|
+
}), P = O(
|
|
3255
3256
|
() => fr(n.field, n.modelValue)
|
|
3256
|
-
),
|
|
3257
|
-
() => (n.field.options ?? []).map((
|
|
3258
|
-
...
|
|
3259
|
-
value:
|
|
3257
|
+
), f = O(
|
|
3258
|
+
() => (n.field.options ?? []).map((u) => ({
|
|
3259
|
+
...u,
|
|
3260
|
+
value: j(u)
|
|
3260
3261
|
}))
|
|
3261
|
-
),
|
|
3262
|
-
const
|
|
3263
|
-
return
|
|
3264
|
-
}),
|
|
3262
|
+
), S = O(() => {
|
|
3263
|
+
const u = n.field.props?.popperClass ?? n.field.props?.["popper-class"];
|
|
3264
|
+
return s.value ? [u, "global-info-field-control__descr-popper"].filter(Boolean).join(" ") : u;
|
|
3265
|
+
}), M = O(
|
|
3266
|
+
() => (
|
|
3267
|
+
// select_remote_descr 的浮层样式受业务沙箱前缀约束,默认留在当前应用容器内,避免 teleport 到 body 后样式失效。
|
|
3268
|
+
s.value ? !1 : n.field.props?.teleported
|
|
3269
|
+
)
|
|
3270
|
+
), N = O(() => {
|
|
3271
|
+
const u = n.field.props?.activeValue ?? n.field.props?.["active-value"], _ = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
3272
|
+
return u !== void 0 || _ !== void 0 ? n.modelValue ?? _ ?? !1 : vn(n.modelValue);
|
|
3273
|
+
}), h = O(() => a.value === "code" ? 5 : 1), v = O(
|
|
3265
3274
|
() => a.value === "file" && !_e(n.modelValue)
|
|
3266
|
-
),
|
|
3275
|
+
), F = O(
|
|
3267
3276
|
() => mn(
|
|
3268
3277
|
n.field,
|
|
3269
3278
|
n.modelValue,
|
|
3270
3279
|
Z("common.请选择文件")
|
|
3271
3280
|
)
|
|
3272
|
-
),
|
|
3281
|
+
), y = O(
|
|
3273
3282
|
() => hn(
|
|
3274
3283
|
n.field,
|
|
3275
3284
|
n.modelValue,
|
|
3276
3285
|
Z("common.请选择文件")
|
|
3277
3286
|
)
|
|
3278
|
-
),
|
|
3279
|
-
let
|
|
3280
|
-
function
|
|
3287
|
+
), A = O(() => n.field.placeholder ? n.field.placeholder : c.value ? Z("common.请输入关键词") : a.value === "select" ? Z("common.请选择") : a.value === "date" ? Z("common.请选择日期") : a.value === "file" ? Z("common.请选择文件") : Z("common.请输入"));
|
|
3288
|
+
let b;
|
|
3289
|
+
function j(u) {
|
|
3281
3290
|
if (Array.isArray(P.value)) {
|
|
3282
|
-
const
|
|
3283
|
-
(
|
|
3291
|
+
const _ = P.value.find(
|
|
3292
|
+
(D) => Ze(u, D)
|
|
3284
3293
|
);
|
|
3285
|
-
if (
|
|
3294
|
+
if (_ !== void 0) return _;
|
|
3286
3295
|
}
|
|
3287
|
-
return Ze(
|
|
3296
|
+
return Ze(u, P.value) ? P.value : u.value;
|
|
3288
3297
|
}
|
|
3289
|
-
function
|
|
3290
|
-
o("update:modelValue",
|
|
3298
|
+
function C(u) {
|
|
3299
|
+
o("update:modelValue", re(u));
|
|
3291
3300
|
}
|
|
3292
|
-
function
|
|
3293
|
-
o("change",
|
|
3301
|
+
function z(u) {
|
|
3302
|
+
o("change", re(u));
|
|
3294
3303
|
}
|
|
3295
|
-
function
|
|
3296
|
-
return a.value === "select" || a.value === "select_remote" ? pr(n.field,
|
|
3304
|
+
function re(u) {
|
|
3305
|
+
return a.value === "select" || a.value === "select_remote" ? pr(n.field, u) : u;
|
|
3297
3306
|
}
|
|
3298
|
-
function
|
|
3299
|
-
|
|
3307
|
+
function le(u) {
|
|
3308
|
+
u && o("loadOptions", c.value ? { searchText: "" } : void 0);
|
|
3300
3309
|
}
|
|
3301
|
-
function
|
|
3302
|
-
c.value && (
|
|
3303
|
-
o("loadOptions", { searchText:
|
|
3310
|
+
function R(u) {
|
|
3311
|
+
c.value && (b && clearTimeout(b), b = setTimeout(() => {
|
|
3312
|
+
o("loadOptions", { searchText: u });
|
|
3304
3313
|
}, 300));
|
|
3305
3314
|
}
|
|
3306
|
-
function
|
|
3315
|
+
function B() {
|
|
3307
3316
|
l.value || i.value?.click();
|
|
3308
3317
|
}
|
|
3309
|
-
function
|
|
3310
|
-
Vn(
|
|
3318
|
+
function E(u) {
|
|
3319
|
+
Vn(u);
|
|
3311
3320
|
}
|
|
3312
3321
|
Xn(() => {
|
|
3313
|
-
|
|
3322
|
+
b && clearTimeout(b);
|
|
3314
3323
|
});
|
|
3315
|
-
function
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3324
|
+
function d(u) {
|
|
3325
|
+
const _ = u.target, D = Array.from(_.files ?? []), V = n.field.props?.multiple ? D : D[0] ?? null;
|
|
3326
|
+
C(V), z(V);
|
|
3318
3327
|
}
|
|
3319
|
-
return (
|
|
3320
|
-
const
|
|
3321
|
-
return a.value === "select" || a.value === "select_remote" ? (
|
|
3328
|
+
return (u, _) => {
|
|
3329
|
+
const D = Xt, V = Qt, x = Wt, K = ao, q = so, Q = Zt;
|
|
3330
|
+
return a.value === "select" || a.value === "select_remote" ? (I(), H(V, ae({
|
|
3322
3331
|
key: 0,
|
|
3323
3332
|
class: "global-info-field-control"
|
|
3324
|
-
},
|
|
3333
|
+
}, u.field.props, {
|
|
3334
|
+
"popper-class": S.value,
|
|
3335
|
+
teleported: M.value,
|
|
3325
3336
|
"model-value": P.value,
|
|
3326
|
-
placeholder:
|
|
3337
|
+
placeholder: A.value,
|
|
3327
3338
|
disabled: l.value,
|
|
3328
|
-
"collapse-tags":
|
|
3329
|
-
"collapse-tags-tooltip":
|
|
3339
|
+
"collapse-tags": g.value,
|
|
3340
|
+
"collapse-tags-tooltip": g.value,
|
|
3330
3341
|
"max-collapse-tags": 1,
|
|
3331
|
-
filterable: c.value || !!
|
|
3332
|
-
remote: c.value || !!
|
|
3333
|
-
"remote-method": c.value ?
|
|
3342
|
+
filterable: c.value || !!u.field.props?.filterable,
|
|
3343
|
+
remote: c.value || !!u.field.props?.remote,
|
|
3344
|
+
"remote-method": c.value ? R : u.field.props?.remoteMethod,
|
|
3334
3345
|
clearable: "",
|
|
3335
|
-
onVisibleChange:
|
|
3336
|
-
"onUpdate:modelValue":
|
|
3337
|
-
onChange:
|
|
3346
|
+
onVisibleChange: le,
|
|
3347
|
+
"onUpdate:modelValue": C,
|
|
3348
|
+
onChange: z
|
|
3338
3349
|
}), {
|
|
3339
3350
|
default: U(() => [
|
|
3340
|
-
(
|
|
3341
|
-
key: String(
|
|
3342
|
-
label:
|
|
3343
|
-
value:
|
|
3351
|
+
(I(!0), G(Se, null, ye(f.value, (T) => (I(), H(D, {
|
|
3352
|
+
key: String(T.value),
|
|
3353
|
+
label: T.label,
|
|
3354
|
+
value: T.value
|
|
3344
3355
|
}, {
|
|
3345
3356
|
default: U(() => [
|
|
3346
|
-
s.value ? (
|
|
3347
|
-
ne("div", ra, oe(
|
|
3348
|
-
|
|
3349
|
-
])) :
|
|
3357
|
+
s.value ? (I(), G("div", oa, [
|
|
3358
|
+
ne("div", ra, oe(T.label), 1),
|
|
3359
|
+
T.labelDescr ? (I(), G("div", aa, oe(T.labelDescr), 1)) : fe("", !0)
|
|
3360
|
+
])) : fe("", !0)
|
|
3350
3361
|
]),
|
|
3351
3362
|
_: 2
|
|
3352
3363
|
}, 1032, ["label", "value"]))), 128))
|
|
3353
3364
|
]),
|
|
3354
3365
|
_: 1
|
|
3355
|
-
}, 16, ["model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : a.value === "date" ? (
|
|
3366
|
+
}, 16, ["popper-class", "teleported", "model-value", "placeholder", "disabled", "collapse-tags", "collapse-tags-tooltip", "filterable", "remote", "remote-method"])) : a.value === "date" ? (I(), H(x, ae({
|
|
3356
3367
|
key: 1,
|
|
3357
3368
|
class: "global-info-field-control"
|
|
3358
|
-
},
|
|
3359
|
-
"model-value":
|
|
3360
|
-
placeholder:
|
|
3369
|
+
}, u.field.props, {
|
|
3370
|
+
"model-value": u.modelValue,
|
|
3371
|
+
placeholder: A.value,
|
|
3361
3372
|
disabled: l.value,
|
|
3362
3373
|
type: "date",
|
|
3363
3374
|
"value-format": "YYYY-MM-DD",
|
|
3364
|
-
"onUpdate:modelValue":
|
|
3365
|
-
onChange:
|
|
3366
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : a.value === "number" ? (
|
|
3375
|
+
"onUpdate:modelValue": C,
|
|
3376
|
+
onChange: z
|
|
3377
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : a.value === "number" ? (I(), H(K, ae({
|
|
3367
3378
|
key: 2,
|
|
3368
3379
|
class: "global-info-field-control"
|
|
3369
|
-
},
|
|
3380
|
+
}, u.field.props, {
|
|
3370
3381
|
"model-value": L.value,
|
|
3371
|
-
placeholder:
|
|
3382
|
+
placeholder: A.value,
|
|
3372
3383
|
disabled: l.value,
|
|
3373
3384
|
"controls-position": "right",
|
|
3374
|
-
"onUpdate:modelValue":
|
|
3375
|
-
onChange:
|
|
3376
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) : a.value === "switch" ? (
|
|
3385
|
+
"onUpdate:modelValue": C,
|
|
3386
|
+
onChange: z
|
|
3387
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : a.value === "switch" ? (I(), H(q, ae({
|
|
3377
3388
|
key: 3,
|
|
3378
3389
|
class: "global-info-field-control global-info-field-control--switch"
|
|
3379
|
-
},
|
|
3380
|
-
"model-value":
|
|
3390
|
+
}, u.field.props, {
|
|
3391
|
+
"model-value": N.value,
|
|
3381
3392
|
disabled: l.value,
|
|
3382
|
-
"onUpdate:modelValue":
|
|
3383
|
-
onChange:
|
|
3384
|
-
}), null, 16, ["model-value", "disabled"])) : a.value === "file" ? (
|
|
3393
|
+
"onUpdate:modelValue": C,
|
|
3394
|
+
onChange: z
|
|
3395
|
+
}), null, 16, ["model-value", "disabled"])) : a.value === "file" ? (I(), G("div", {
|
|
3385
3396
|
key: 4,
|
|
3386
3397
|
class: We(["global-info-field-control global-info-field-control--file", {
|
|
3387
3398
|
"is-disabled": l.value,
|
|
3388
|
-
"is-empty": !
|
|
3389
|
-
"is-filled":
|
|
3399
|
+
"is-empty": !v.value,
|
|
3400
|
+
"is-filled": v.value
|
|
3390
3401
|
}]),
|
|
3391
|
-
onClick:
|
|
3402
|
+
onClick: B
|
|
3392
3403
|
}, [
|
|
3393
3404
|
ne("input", {
|
|
3394
3405
|
ref_key: "fileInputRef",
|
|
@@ -3396,48 +3407,48 @@ const oa = {
|
|
|
3396
3407
|
class: "global-info-field-control__file-input",
|
|
3397
3408
|
type: "file",
|
|
3398
3409
|
disabled: l.value,
|
|
3399
|
-
accept: String(
|
|
3400
|
-
multiple: !!
|
|
3401
|
-
onChange:
|
|
3410
|
+
accept: String(u.field.props?.accept ?? ""),
|
|
3411
|
+
multiple: !!u.field.props?.multiple,
|
|
3412
|
+
onChange: d
|
|
3402
3413
|
}, null, 40, sa),
|
|
3403
|
-
|
|
3404
|
-
(
|
|
3405
|
-
key:
|
|
3414
|
+
y.value.length ? (I(), G("span", la, [
|
|
3415
|
+
(I(!0), G(Se, null, ye(y.value, (T, X) => (I(), G(Se, {
|
|
3416
|
+
key: T.key
|
|
3406
3417
|
}, [
|
|
3407
|
-
|
|
3418
|
+
T.action ? (I(), G("button", {
|
|
3408
3419
|
key: 0,
|
|
3409
3420
|
class: "global-info-field-control__file-preview",
|
|
3410
3421
|
type: "button",
|
|
3411
|
-
onClick: Ut((
|
|
3412
|
-
}, oe(
|
|
3413
|
-
|
|
3422
|
+
onClick: Ut((ue) => E(T), ["stop", "prevent"])
|
|
3423
|
+
}, oe(T.text), 9, ia)) : (I(), G("span", ca, oe(T.text), 1)),
|
|
3424
|
+
X < y.value.length - 1 ? (I(), G("span", ua, "、")) : fe("", !0)
|
|
3414
3425
|
], 64))), 128))
|
|
3415
|
-
])) :
|
|
3416
|
-
], 2)) : a.value === "empty" ? (
|
|
3426
|
+
])) : v.value ? (I(), G("span", da, oe(F.value), 1)) : (I(), G("span", fa, oe(J(Z)("common.上传")), 1))
|
|
3427
|
+
], 2)) : a.value === "empty" ? (I(), H(Q, {
|
|
3417
3428
|
key: 5,
|
|
3418
3429
|
class: "global-info-field-control",
|
|
3419
3430
|
"model-value": "",
|
|
3420
3431
|
disabled: "",
|
|
3421
3432
|
placeholder: "-"
|
|
3422
|
-
})) : (
|
|
3433
|
+
})) : (I(), H(Q, ae({
|
|
3423
3434
|
key: 6,
|
|
3424
3435
|
class: ["global-info-field-control", {
|
|
3425
3436
|
"global-info-field-control--textarea": r.includes(a.value),
|
|
3426
3437
|
"global-info-field-control--code": a.value === "code"
|
|
3427
3438
|
}]
|
|
3428
|
-
},
|
|
3439
|
+
}, u.field.props, {
|
|
3429
3440
|
"model-value": w.value,
|
|
3430
|
-
placeholder:
|
|
3441
|
+
placeholder: A.value,
|
|
3431
3442
|
disabled: l.value,
|
|
3432
3443
|
type: r.includes(a.value) ? "textarea" : "text",
|
|
3433
|
-
rows: r.includes(a.value) ?
|
|
3434
|
-
resize:
|
|
3435
|
-
"onUpdate:modelValue":
|
|
3436
|
-
onChange:
|
|
3444
|
+
rows: r.includes(a.value) ? h.value : void 0,
|
|
3445
|
+
resize: $.value,
|
|
3446
|
+
"onUpdate:modelValue": C,
|
|
3447
|
+
onChange: z
|
|
3437
3448
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows", "resize"]));
|
|
3438
3449
|
};
|
|
3439
3450
|
}
|
|
3440
|
-
}), Pn = /* @__PURE__ */ be(pa, [["__scopeId", "data-v-
|
|
3451
|
+
}), Pn = /* @__PURE__ */ be(pa, [["__scopeId", "data-v-fb0f2f9b"]]), ma = ["innerHTML"], va = {
|
|
3441
3452
|
key: 1,
|
|
3442
3453
|
class: "global-info-field-value global-info-field-value--code"
|
|
3443
3454
|
}, ha = {
|
|
@@ -3452,27 +3463,27 @@ const oa = {
|
|
|
3452
3463
|
emptyText: { default: "-" }
|
|
3453
3464
|
},
|
|
3454
3465
|
setup(e) {
|
|
3455
|
-
const t = e, n =
|
|
3466
|
+
const t = e, n = O(() => Tt(t.field)), o = O(() => n.value === "empty" || _e(t.value)), r = O(() => mn(t.field, t.value, t.emptyText)), i = O(() => hn(t.field, t.value, t.emptyText));
|
|
3456
3467
|
function a(c) {
|
|
3457
3468
|
Vn(c);
|
|
3458
3469
|
}
|
|
3459
|
-
return (c, s) => n.value === "html" && !o.value ? (
|
|
3470
|
+
return (c, s) => n.value === "html" && !o.value ? (I(), G("span", {
|
|
3460
3471
|
key: 0,
|
|
3461
3472
|
class: "global-info-field-value global-info-field-value--html",
|
|
3462
3473
|
innerHTML: r.value
|
|
3463
|
-
}, null, 8, ma)) : n.value === "code" && !o.value ? (
|
|
3464
|
-
(
|
|
3474
|
+
}, null, 8, ma)) : n.value === "code" && !o.value ? (I(), G("pre", va, oe(r.value), 1)) : i.value.length ? (I(), G("span", ha, [
|
|
3475
|
+
(I(!0), G(Se, null, ye(i.value, (l, g) => (I(), G(Se, {
|
|
3465
3476
|
key: l.key
|
|
3466
3477
|
}, [
|
|
3467
|
-
l.action ? (
|
|
3478
|
+
l.action ? (I(), G("button", {
|
|
3468
3479
|
key: 0,
|
|
3469
3480
|
class: "global-info-field-value__attachment-preview",
|
|
3470
3481
|
type: "button",
|
|
3471
3482
|
onClick: (w) => a(l)
|
|
3472
|
-
}, oe(l.text), 9, ga)) : (
|
|
3473
|
-
|
|
3483
|
+
}, oe(l.text), 9, ga)) : (I(), G("span", ya, oe(l.text), 1)),
|
|
3484
|
+
g < i.value.length - 1 ? (I(), G("span", ba, "、")) : fe("", !0)
|
|
3474
3485
|
], 64))), 128))
|
|
3475
|
-
])) : (
|
|
3486
|
+
])) : (I(), G("span", {
|
|
3476
3487
|
key: 3,
|
|
3477
3488
|
class: We(["global-info-field-value", {
|
|
3478
3489
|
"global-info-field-value--multi-row": n.value === "multi-row",
|
|
@@ -3480,7 +3491,7 @@ const oa = {
|
|
|
3480
3491
|
}])
|
|
3481
3492
|
}, oe(r.value), 3));
|
|
3482
3493
|
}
|
|
3483
|
-
}), jn = /* @__PURE__ */ be(Sa, [["__scopeId", "data-v-
|
|
3494
|
+
}), jn = /* @__PURE__ */ be(Sa, [["__scopeId", "data-v-79688203"]]);
|
|
3484
3495
|
function _a(e) {
|
|
3485
3496
|
const t = kt(e);
|
|
3486
3497
|
return (t === "select" || t === "select_remote") && !!e.interface;
|
|
@@ -3529,87 +3540,87 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3529
3540
|
renderConfig: {}
|
|
3530
3541
|
},
|
|
3531
3542
|
setup(e) {
|
|
3532
|
-
const t = e, n = Le(), o =
|
|
3543
|
+
const t = e, n = Le(), o = O(() => t.model ?? t.section.model), r = /* @__PURE__ */ new Map(), i = O(() => ft(
|
|
3533
3544
|
t.section.fields,
|
|
3534
3545
|
t.section,
|
|
3535
3546
|
t.renderConfig,
|
|
3536
3547
|
{ values: o.value }
|
|
3537
3548
|
)), a = ln(
|
|
3538
|
-
async (
|
|
3539
|
-
(
|
|
3549
|
+
async (v, F, y) => t.actions.loadFieldOptions(t.section, v, F, y),
|
|
3550
|
+
(v) => `${t.section.key}:${M(v)}`
|
|
3540
3551
|
);
|
|
3541
|
-
function c(
|
|
3542
|
-
const
|
|
3543
|
-
(
|
|
3544
|
-
|
|
3545
|
-
}), t.onUpdateModel?.(
|
|
3552
|
+
function c(v, F) {
|
|
3553
|
+
const y = { ...o.value, [v.code]: F };
|
|
3554
|
+
(v.cascadeClearFields ?? []).forEach((A) => {
|
|
3555
|
+
y[A] = "";
|
|
3556
|
+
}), t.onUpdateModel?.(y), t.onUpdateModel || t.actions.updateField(t.section, v, F), s(v, F, y), L(y, v);
|
|
3546
3557
|
}
|
|
3547
|
-
function s(
|
|
3558
|
+
function s(v, F, y) {
|
|
3548
3559
|
const A = t.renderConfig?.onFieldBusinessChange;
|
|
3549
3560
|
if (A)
|
|
3550
3561
|
try {
|
|
3551
|
-
const
|
|
3552
|
-
field:
|
|
3553
|
-
value:
|
|
3562
|
+
const b = l(v, F), j = {
|
|
3563
|
+
field: v,
|
|
3564
|
+
value: F,
|
|
3554
3565
|
section: t.section,
|
|
3555
|
-
model:
|
|
3556
|
-
values:
|
|
3566
|
+
model: y,
|
|
3567
|
+
values: y,
|
|
3557
3568
|
node: t.node,
|
|
3558
3569
|
activeNode: t.node,
|
|
3559
|
-
sections:
|
|
3560
|
-
sectionValues: w(t.section,
|
|
3570
|
+
sections: g(),
|
|
3571
|
+
sectionValues: w(t.section, y),
|
|
3561
3572
|
actions: t.actions,
|
|
3562
|
-
selectedOption:
|
|
3563
|
-
selectedOptions:
|
|
3573
|
+
selectedOption: b[0],
|
|
3574
|
+
selectedOptions: b
|
|
3564
3575
|
};
|
|
3565
|
-
Promise.resolve(A(
|
|
3566
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3576
|
+
Promise.resolve(A(j)).catch((C) => {
|
|
3577
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", C);
|
|
3567
3578
|
});
|
|
3568
|
-
} catch (
|
|
3569
|
-
console.error("[GlobalInfoFormRenderer] field business change failed",
|
|
3579
|
+
} catch (b) {
|
|
3580
|
+
console.error("[GlobalInfoFormRenderer] field business change failed", b);
|
|
3570
3581
|
}
|
|
3571
3582
|
}
|
|
3572
|
-
function l(
|
|
3573
|
-
const
|
|
3574
|
-
return (
|
|
3583
|
+
function l(v, F) {
|
|
3584
|
+
const y = dt(v, F);
|
|
3585
|
+
return (v.options ?? []).filter((A) => y.some((b) => Ze(A, b)));
|
|
3575
3586
|
}
|
|
3576
|
-
function
|
|
3587
|
+
function g() {
|
|
3577
3588
|
return Object.values(t.state.sectionMap);
|
|
3578
3589
|
}
|
|
3579
|
-
function w(
|
|
3580
|
-
const A =
|
|
3581
|
-
const
|
|
3582
|
-
return [
|
|
3590
|
+
function w(v, F) {
|
|
3591
|
+
const A = g().flatMap((b) => {
|
|
3592
|
+
const j = b.key === v.key ? F : b.renderType === "table" ? b.rows : b.model;
|
|
3593
|
+
return [b.key, b.id, b.setId, b.infSetId, b.code].filter(Boolean).map((C) => [String(C), j]);
|
|
3583
3594
|
});
|
|
3584
3595
|
return Object.fromEntries(A);
|
|
3585
3596
|
}
|
|
3586
|
-
async function
|
|
3587
|
-
const A =
|
|
3588
|
-
if (!An(
|
|
3589
|
-
r.set(
|
|
3597
|
+
async function $(v, F = {}, y = o.value) {
|
|
3598
|
+
const A = y, b = M(v), j = st(t.section.key, v, A), C = r.get(b);
|
|
3599
|
+
if (!An(F) && lt(v, C, j)) {
|
|
3600
|
+
r.set(b, j);
|
|
3590
3601
|
return;
|
|
3591
3602
|
}
|
|
3592
3603
|
try {
|
|
3593
|
-
if (
|
|
3594
|
-
await a(
|
|
3604
|
+
if (F.searchText !== void 0) {
|
|
3605
|
+
await a(v, A, F);
|
|
3595
3606
|
return;
|
|
3596
3607
|
}
|
|
3597
|
-
await t.actions.loadFieldOptions(t.section,
|
|
3608
|
+
await t.actions.loadFieldOptions(t.section, v, A, F), r.set(b, j);
|
|
3598
3609
|
} catch (re) {
|
|
3599
3610
|
console.error("[GlobalInfoFormRenderer] load field options failed", re);
|
|
3600
3611
|
}
|
|
3601
3612
|
}
|
|
3602
|
-
async function L(
|
|
3603
|
-
for (const
|
|
3604
|
-
if (
|
|
3605
|
-
const A = zn(
|
|
3606
|
-
if (!N(
|
|
3607
|
-
const
|
|
3608
|
-
if (lt(
|
|
3609
|
-
r.set(
|
|
3613
|
+
async function L(v = o.value, F) {
|
|
3614
|
+
for (const y of i.value) {
|
|
3615
|
+
if (F && !Rn(y, F)) continue;
|
|
3616
|
+
const A = zn(y, v);
|
|
3617
|
+
if (!N(y, A)) continue;
|
|
3618
|
+
const b = st(t.section.key, y, v), j = M(y), C = r.get(j);
|
|
3619
|
+
if (lt(y, C, b)) {
|
|
3620
|
+
r.set(j, b);
|
|
3610
3621
|
continue;
|
|
3611
3622
|
}
|
|
3612
|
-
|
|
3623
|
+
C !== b && await $(y, xn(y, A), v);
|
|
3613
3624
|
}
|
|
3614
3625
|
}
|
|
3615
3626
|
Ee(
|
|
@@ -3624,80 +3635,80 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3624
3635
|
},
|
|
3625
3636
|
{ immediate: !0 }
|
|
3626
3637
|
);
|
|
3627
|
-
function P(
|
|
3628
|
-
const
|
|
3638
|
+
function P(v) {
|
|
3639
|
+
const F = o.value[v.code];
|
|
3629
3640
|
return {
|
|
3630
|
-
field:
|
|
3641
|
+
field: v,
|
|
3631
3642
|
section: t.section,
|
|
3632
3643
|
sectionView: t.section,
|
|
3633
3644
|
node: t.node,
|
|
3634
3645
|
editing: t.editing,
|
|
3635
|
-
modelValue:
|
|
3636
|
-
value:
|
|
3646
|
+
modelValue: F,
|
|
3647
|
+
value: F,
|
|
3637
3648
|
state: t.state,
|
|
3638
3649
|
actions: t.actions,
|
|
3639
|
-
updateModelValue: (
|
|
3650
|
+
updateModelValue: (y) => c(v, y)
|
|
3640
3651
|
};
|
|
3641
3652
|
}
|
|
3642
|
-
function
|
|
3643
|
-
const
|
|
3644
|
-
if (
|
|
3645
|
-
const A =
|
|
3646
|
-
return A !==
|
|
3653
|
+
function f(v) {
|
|
3654
|
+
const F = String(v.code || "").trim(), y = F ? `field-${F}` : "";
|
|
3655
|
+
if (y && n[y]) return y;
|
|
3656
|
+
const A = y.toLowerCase();
|
|
3657
|
+
return A !== y && n[A] ? A : "";
|
|
3647
3658
|
}
|
|
3648
|
-
function
|
|
3649
|
-
return
|
|
3659
|
+
function S(v) {
|
|
3660
|
+
return v.span ? Math.min(Math.max(v.span, 1), 24) : 6;
|
|
3650
3661
|
}
|
|
3651
|
-
function
|
|
3652
|
-
return
|
|
3662
|
+
function M(v) {
|
|
3663
|
+
return v.key || v.id || v.code;
|
|
3653
3664
|
}
|
|
3654
|
-
function N(
|
|
3655
|
-
return Nn(
|
|
3665
|
+
function N(v, F) {
|
|
3666
|
+
return Nn(v, F, t.editing);
|
|
3656
3667
|
}
|
|
3657
|
-
function h(
|
|
3658
|
-
return
|
|
3668
|
+
function h(v) {
|
|
3669
|
+
return v.required || v.isRequired;
|
|
3659
3670
|
}
|
|
3660
|
-
return (
|
|
3661
|
-
const
|
|
3662
|
-
return
|
|
3671
|
+
return (v, F) => {
|
|
3672
|
+
const y = en, A = io, b = lo, j = tn;
|
|
3673
|
+
return I(), H(j, {
|
|
3663
3674
|
class: "global-info-form-renderer",
|
|
3664
3675
|
model: o.value,
|
|
3665
3676
|
"label-position": "top"
|
|
3666
3677
|
}, {
|
|
3667
3678
|
default: U(() => [
|
|
3668
|
-
Ie(
|
|
3679
|
+
Ie(b, { gutter: 24 }, {
|
|
3669
3680
|
default: U(() => [
|
|
3670
|
-
(
|
|
3671
|
-
key:
|
|
3672
|
-
span:
|
|
3681
|
+
(I(!0), G(Se, null, ye(i.value, (C) => (I(), H(A, {
|
|
3682
|
+
key: M(C),
|
|
3683
|
+
span: S(C)
|
|
3673
3684
|
}, {
|
|
3674
3685
|
default: U(() => [
|
|
3675
|
-
Ie(
|
|
3676
|
-
prop:
|
|
3686
|
+
Ie(y, ae({
|
|
3687
|
+
prop: C.code,
|
|
3677
3688
|
ref_for: !0
|
|
3678
|
-
},
|
|
3689
|
+
}, C.formItemProps), {
|
|
3679
3690
|
label: U(() => [
|
|
3680
3691
|
ne("span", wa, [
|
|
3681
|
-
h(
|
|
3682
|
-
He(" " + oe(
|
|
3692
|
+
h(C) ? (I(), G("span", Ia, "*")) : fe("", !0),
|
|
3693
|
+
He(" " + oe(C.label), 1)
|
|
3683
3694
|
])
|
|
3684
3695
|
]),
|
|
3685
3696
|
default: U(() => [
|
|
3686
|
-
|
|
3697
|
+
f(C) ? te(v.$slots, f(C), ae({
|
|
3687
3698
|
key: 0,
|
|
3688
3699
|
ref_for: !0
|
|
3689
|
-
}, P(
|
|
3700
|
+
}, P(C)), void 0, !0) : v.editing && !C.readonly ? (I(), H(Pn, {
|
|
3690
3701
|
key: 1,
|
|
3691
|
-
field:
|
|
3692
|
-
"model-value": o.value[
|
|
3693
|
-
section:
|
|
3694
|
-
onLoadOptions: (
|
|
3695
|
-
"onUpdate:modelValue": (
|
|
3696
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
3702
|
+
field: C,
|
|
3703
|
+
"model-value": o.value[C.code],
|
|
3704
|
+
section: v.section,
|
|
3705
|
+
onLoadOptions: (z) => $(C, z),
|
|
3706
|
+
"onUpdate:modelValue": (z) => c(C, z)
|
|
3707
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
3697
3708
|
key: 2,
|
|
3698
|
-
field:
|
|
3699
|
-
value: o.value[
|
|
3700
|
-
section:
|
|
3709
|
+
field: C,
|
|
3710
|
+
value: o.value[C.code],
|
|
3711
|
+
section: v.section
|
|
3701
3712
|
}, null, 8, ["field", "value", "section"]))
|
|
3702
3713
|
]),
|
|
3703
3714
|
_: 2
|
|
@@ -3713,7 +3724,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3713
3724
|
}, 8, ["model"]);
|
|
3714
3725
|
};
|
|
3715
3726
|
}
|
|
3716
|
-
}), Ca = /* @__PURE__ */ be($a, [["__scopeId", "data-v-
|
|
3727
|
+
}), Ca = /* @__PURE__ */ be($a, [["__scopeId", "data-v-4a51dc3d"]]), ka = /* @__PURE__ */ pe({
|
|
3717
3728
|
name: "GlobalInfoDeleteConfirm",
|
|
3718
3729
|
__name: "GlobalInfoDeleteConfirm",
|
|
3719
3730
|
props: {
|
|
@@ -3725,7 +3736,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3725
3736
|
setup(e) {
|
|
3726
3737
|
return (t, n) => {
|
|
3727
3738
|
const o = co;
|
|
3728
|
-
return
|
|
3739
|
+
return I(), H(o, {
|
|
3729
3740
|
title: t.title,
|
|
3730
3741
|
"confirm-button-text": t.confirmText,
|
|
3731
3742
|
"cancel-button-text": t.cancelText,
|
|
@@ -3741,7 +3752,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3741
3752
|
}, 8, ["title", "confirm-button-text", "cancel-button-text"]);
|
|
3742
3753
|
};
|
|
3743
3754
|
}
|
|
3744
|
-
}),
|
|
3755
|
+
}), Ta = { class: "global-info-table-renderer__table-scroll" }, Ma = { class: "global-info-table-renderer__header" }, Oa = {
|
|
3745
3756
|
key: 0,
|
|
3746
3757
|
class: "global-info-table-renderer__required"
|
|
3747
3758
|
}, Da = /* @__PURE__ */ pe({
|
|
@@ -3758,78 +3769,78 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3758
3769
|
renderConfig: {}
|
|
3759
3770
|
},
|
|
3760
3771
|
setup(e) {
|
|
3761
|
-
const t = e, n = Le(), o =
|
|
3762
|
-
() => t.section.fields.some((
|
|
3763
|
-
), r =
|
|
3772
|
+
const t = e, n = Le(), o = O(
|
|
3773
|
+
() => t.section.fields.some((d) => Pt(d))
|
|
3774
|
+
), r = O(() => o.value), i = O(
|
|
3764
3775
|
() => t.renderConfig?.sequenceLabel ?? Z("common.序号")
|
|
3765
|
-
), a =
|
|
3776
|
+
), a = O(
|
|
3766
3777
|
() => t.renderConfig?.sequenceWidth ?? 56
|
|
3767
|
-
), c =
|
|
3768
|
-
const
|
|
3769
|
-
return typeof
|
|
3770
|
-
}), s =
|
|
3771
|
-
const
|
|
3778
|
+
), c = O(() => {
|
|
3779
|
+
const d = t.renderConfig?.sequenceStart;
|
|
3780
|
+
return typeof d == "number" && Number.isFinite(d) ? d : 1;
|
|
3781
|
+
}), s = O(() => {
|
|
3782
|
+
const d = ft(
|
|
3772
3783
|
t.section.fields,
|
|
3773
3784
|
t.section,
|
|
3774
3785
|
t.renderConfig,
|
|
3775
3786
|
{ rows: t.section.rows, values: t.section.model }
|
|
3776
3787
|
);
|
|
3777
|
-
return r.value ?
|
|
3778
|
-
}), l = /* @__PURE__ */ new Map(),
|
|
3779
|
-
async (
|
|
3780
|
-
(
|
|
3788
|
+
return r.value ? d.filter((u) => !re(u)) : d;
|
|
3789
|
+
}), l = /* @__PURE__ */ new Map(), g = ln(
|
|
3790
|
+
async (d, u, _) => t.actions.loadFieldOptions(t.section, d, u, _),
|
|
3791
|
+
(d, u) => `${t.section.key}:${B(u)}:${C(d)}`
|
|
3781
3792
|
);
|
|
3782
|
-
function w(
|
|
3783
|
-
t.actions.deleteRow(t.section,
|
|
3793
|
+
function w(d) {
|
|
3794
|
+
t.actions.deleteRow(t.section, d);
|
|
3784
3795
|
}
|
|
3785
|
-
function
|
|
3786
|
-
const
|
|
3787
|
-
return t.showDelete && (typeof
|
|
3796
|
+
function $(d, u) {
|
|
3797
|
+
const _ = t.renderConfig?.rowDeleteVisibleRule;
|
|
3798
|
+
return t.showDelete && (typeof _ == "function" ? _({
|
|
3788
3799
|
section: t.section,
|
|
3789
|
-
row:
|
|
3790
|
-
rowIndex:
|
|
3800
|
+
row: d,
|
|
3801
|
+
rowIndex: u,
|
|
3791
3802
|
node: t.node,
|
|
3792
3803
|
state: t.state,
|
|
3793
3804
|
actions: t.actions
|
|
3794
|
-
}) :
|
|
3805
|
+
}) : d.allowDelete !== !1);
|
|
3795
3806
|
}
|
|
3796
|
-
function L(
|
|
3797
|
-
const
|
|
3798
|
-
...
|
|
3799
|
-
__rowKey:
|
|
3800
|
-
[
|
|
3807
|
+
function L(d, u, _, D) {
|
|
3808
|
+
const V = t.section.rows.slice(), x = _.cascadeClearFields ?? [], K = {
|
|
3809
|
+
...d,
|
|
3810
|
+
__rowKey: B(d),
|
|
3811
|
+
[_.code]: D
|
|
3801
3812
|
};
|
|
3802
|
-
|
|
3803
|
-
K[
|
|
3804
|
-
}),
|
|
3813
|
+
x.forEach((q) => {
|
|
3814
|
+
K[q] = "";
|
|
3815
|
+
}), V[u] = {
|
|
3805
3816
|
...K
|
|
3806
|
-
}, t.actions.updateTableRows(t.section,
|
|
3817
|
+
}, t.actions.updateTableRows(t.section, V), P(_, D, K, u, V), h(_, K);
|
|
3807
3818
|
}
|
|
3808
|
-
function P(
|
|
3809
|
-
const
|
|
3810
|
-
if (
|
|
3819
|
+
function P(d, u, _, D, V) {
|
|
3820
|
+
const x = t.renderConfig?.onFieldBusinessChange;
|
|
3821
|
+
if (x)
|
|
3811
3822
|
try {
|
|
3812
|
-
const K = d
|
|
3813
|
-
field:
|
|
3814
|
-
value:
|
|
3823
|
+
const K = f(d, u), q = { ...t.section.model, ..._ }, Q = {
|
|
3824
|
+
field: d,
|
|
3825
|
+
value: u,
|
|
3815
3826
|
section: t.section,
|
|
3816
|
-
model:
|
|
3817
|
-
values:
|
|
3818
|
-
row:
|
|
3819
|
-
rowIndex:
|
|
3820
|
-
rows:
|
|
3827
|
+
model: q,
|
|
3828
|
+
values: q,
|
|
3829
|
+
row: _,
|
|
3830
|
+
rowIndex: D,
|
|
3831
|
+
rows: V,
|
|
3821
3832
|
node: t.node,
|
|
3822
3833
|
activeNode: t.node,
|
|
3823
|
-
sections:
|
|
3824
|
-
sectionValues:
|
|
3834
|
+
sections: S(),
|
|
3835
|
+
sectionValues: M(t.section, V),
|
|
3825
3836
|
actions: t.actions,
|
|
3826
3837
|
selectedOption: K[0],
|
|
3827
3838
|
selectedOptions: K
|
|
3828
3839
|
};
|
|
3829
|
-
Promise.resolve(
|
|
3840
|
+
Promise.resolve(x(Q)).catch((T) => {
|
|
3830
3841
|
console.error(
|
|
3831
3842
|
"[GlobalInfoTableRenderer] field business change failed",
|
|
3832
|
-
|
|
3843
|
+
T
|
|
3833
3844
|
);
|
|
3834
3845
|
});
|
|
3835
3846
|
} catch (K) {
|
|
@@ -3839,140 +3850,140 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3839
3850
|
);
|
|
3840
3851
|
}
|
|
3841
3852
|
}
|
|
3842
|
-
function d
|
|
3843
|
-
const
|
|
3844
|
-
return (
|
|
3845
|
-
(
|
|
3853
|
+
function f(d, u) {
|
|
3854
|
+
const _ = dt(d, u);
|
|
3855
|
+
return (d.options ?? []).filter(
|
|
3856
|
+
(D) => _.some((V) => Ze(D, V))
|
|
3846
3857
|
);
|
|
3847
3858
|
}
|
|
3848
|
-
function
|
|
3859
|
+
function S() {
|
|
3849
3860
|
return Object.values(t.state.sectionMap);
|
|
3850
3861
|
}
|
|
3851
|
-
function
|
|
3852
|
-
const
|
|
3853
|
-
const
|
|
3862
|
+
function M(d, u) {
|
|
3863
|
+
const D = S().flatMap((V) => {
|
|
3864
|
+
const x = V.key === d.key ? u : V.renderType === "table" ? V.rows : V.model;
|
|
3854
3865
|
return [
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
].filter(Boolean).map((K) => [String(K),
|
|
3866
|
+
V.key,
|
|
3867
|
+
V.id,
|
|
3868
|
+
V.setId,
|
|
3869
|
+
V.infSetId,
|
|
3870
|
+
V.code
|
|
3871
|
+
].filter(Boolean).map((K) => [String(K), x]);
|
|
3861
3872
|
});
|
|
3862
|
-
return Object.fromEntries(
|
|
3873
|
+
return Object.fromEntries(D);
|
|
3863
3874
|
}
|
|
3864
|
-
async function N(
|
|
3865
|
-
const
|
|
3875
|
+
async function N(d, u, _ = {}, D = u) {
|
|
3876
|
+
const V = B(D), x = `${V}:${C(d)}`, K = st(
|
|
3866
3877
|
t.section.key,
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
),
|
|
3871
|
-
if (!An(
|
|
3872
|
-
l.set(
|
|
3878
|
+
d,
|
|
3879
|
+
D,
|
|
3880
|
+
V
|
|
3881
|
+
), q = l.get(x);
|
|
3882
|
+
if (!An(_) && lt(d, q, K)) {
|
|
3883
|
+
l.set(x, K);
|
|
3873
3884
|
return;
|
|
3874
3885
|
}
|
|
3875
3886
|
try {
|
|
3876
|
-
if (
|
|
3877
|
-
await
|
|
3887
|
+
if (_.searchText !== void 0) {
|
|
3888
|
+
await g(d, D, _);
|
|
3878
3889
|
return;
|
|
3879
3890
|
}
|
|
3880
3891
|
await t.actions.loadFieldOptions(
|
|
3881
3892
|
t.section,
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
), l.set(
|
|
3886
|
-
} catch (
|
|
3887
|
-
console.error("[GlobalInfoTableRenderer] load field options failed",
|
|
3893
|
+
d,
|
|
3894
|
+
D,
|
|
3895
|
+
_
|
|
3896
|
+
), l.set(x, K);
|
|
3897
|
+
} catch (T) {
|
|
3898
|
+
console.error("[GlobalInfoTableRenderer] load field options failed", T);
|
|
3888
3899
|
}
|
|
3889
3900
|
}
|
|
3890
|
-
async function h(
|
|
3891
|
-
const
|
|
3892
|
-
for (const
|
|
3893
|
-
const
|
|
3894
|
-
for (const
|
|
3895
|
-
if (
|
|
3901
|
+
async function h(d, u) {
|
|
3902
|
+
const _ = u ? [u] : t.section.rows;
|
|
3903
|
+
for (const D of _) {
|
|
3904
|
+
const V = B(D);
|
|
3905
|
+
for (const x of s.value) {
|
|
3906
|
+
if (d && !Rn(x, d))
|
|
3896
3907
|
continue;
|
|
3897
|
-
const K = zn(
|
|
3898
|
-
if (!A(
|
|
3899
|
-
const
|
|
3908
|
+
const K = zn(x, D);
|
|
3909
|
+
if (!A(x, K)) continue;
|
|
3910
|
+
const q = st(
|
|
3900
3911
|
t.section.key,
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
), Q = `${
|
|
3905
|
-
if (lt(
|
|
3906
|
-
l.set(Q,
|
|
3912
|
+
x,
|
|
3913
|
+
D,
|
|
3914
|
+
V
|
|
3915
|
+
), Q = `${V}:${C(x)}`, T = l.get(Q);
|
|
3916
|
+
if (lt(x, T, q)) {
|
|
3917
|
+
l.set(Q, q);
|
|
3907
3918
|
continue;
|
|
3908
3919
|
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
xn(
|
|
3920
|
+
T !== q && await N(
|
|
3921
|
+
x,
|
|
3922
|
+
D,
|
|
3923
|
+
xn(x, K)
|
|
3913
3924
|
);
|
|
3914
3925
|
}
|
|
3915
3926
|
}
|
|
3916
3927
|
}
|
|
3917
|
-
function
|
|
3918
|
-
const
|
|
3928
|
+
function v(d, u, _) {
|
|
3929
|
+
const D = u[d.code];
|
|
3919
3930
|
return {
|
|
3920
|
-
field:
|
|
3931
|
+
field: d,
|
|
3921
3932
|
section: t.section,
|
|
3922
3933
|
sectionView: t.section,
|
|
3923
3934
|
node: t.node,
|
|
3924
|
-
row:
|
|
3925
|
-
rowIndex:
|
|
3935
|
+
row: u,
|
|
3936
|
+
rowIndex: _,
|
|
3926
3937
|
editing: t.editing,
|
|
3927
|
-
modelValue:
|
|
3928
|
-
value:
|
|
3938
|
+
modelValue: D,
|
|
3939
|
+
value: D,
|
|
3929
3940
|
state: t.state,
|
|
3930
3941
|
actions: t.actions,
|
|
3931
|
-
updateModelValue: (
|
|
3942
|
+
updateModelValue: (V) => L(u, _, d, V)
|
|
3932
3943
|
};
|
|
3933
3944
|
}
|
|
3934
|
-
function
|
|
3935
|
-
const
|
|
3936
|
-
if (
|
|
3937
|
-
const
|
|
3938
|
-
return
|
|
3945
|
+
function F(d) {
|
|
3946
|
+
const u = String(d.code || "").trim(), _ = u ? `field-${u}` : "";
|
|
3947
|
+
if (_ && n[_]) return _;
|
|
3948
|
+
const D = _.toLowerCase();
|
|
3949
|
+
return D !== _ && n[D] ? D : "";
|
|
3939
3950
|
}
|
|
3940
|
-
function
|
|
3941
|
-
return !
|
|
3951
|
+
function y(d) {
|
|
3952
|
+
return !d.readonly && !d.disabled;
|
|
3942
3953
|
}
|
|
3943
|
-
function A(
|
|
3944
|
-
return Nn(
|
|
3954
|
+
function A(d, u) {
|
|
3955
|
+
return Nn(d, u, t.editing);
|
|
3945
3956
|
}
|
|
3946
|
-
function
|
|
3947
|
-
return
|
|
3957
|
+
function b(d) {
|
|
3958
|
+
return d.width ?? (Vt(d) ? 56 : void 0);
|
|
3948
3959
|
}
|
|
3949
|
-
function
|
|
3950
|
-
if (!
|
|
3951
|
-
return
|
|
3960
|
+
function j(d) {
|
|
3961
|
+
if (!d.width)
|
|
3962
|
+
return d.minWidth ?? (Vt(d) ? 56 : void 0);
|
|
3952
3963
|
}
|
|
3953
|
-
function
|
|
3954
|
-
return
|
|
3964
|
+
function C(d) {
|
|
3965
|
+
return d.key || d.id || d.code;
|
|
3955
3966
|
}
|
|
3956
|
-
function
|
|
3957
|
-
return c.value +
|
|
3967
|
+
function z(d) {
|
|
3968
|
+
return c.value + d;
|
|
3958
3969
|
}
|
|
3959
|
-
function re(
|
|
3960
|
-
return Pt(
|
|
3970
|
+
function re(d) {
|
|
3971
|
+
return Pt(d);
|
|
3961
3972
|
}
|
|
3962
3973
|
let le = 0;
|
|
3963
3974
|
const R = /* @__PURE__ */ new WeakMap();
|
|
3964
|
-
function
|
|
3965
|
-
const
|
|
3966
|
-
if (
|
|
3967
|
-
return String(
|
|
3968
|
-
const
|
|
3969
|
-
if (
|
|
3975
|
+
function B(d) {
|
|
3976
|
+
const u = d.__rowKey ?? d.key ?? d.id ?? d.setId ?? d.infSetId;
|
|
3977
|
+
if (u != null && u !== "")
|
|
3978
|
+
return String(u);
|
|
3979
|
+
const _ = d, D = R.get(_);
|
|
3980
|
+
if (D) return D;
|
|
3970
3981
|
le += 1;
|
|
3971
|
-
const
|
|
3972
|
-
return R.set(
|
|
3982
|
+
const V = `local-${le}`;
|
|
3983
|
+
return R.set(_, V), V;
|
|
3973
3984
|
}
|
|
3974
|
-
function
|
|
3975
|
-
return
|
|
3985
|
+
function E(d) {
|
|
3986
|
+
return d.required || d.isRequired;
|
|
3976
3987
|
}
|
|
3977
3988
|
return Ee(
|
|
3978
3989
|
() => t.section.key,
|
|
@@ -3985,85 +3996,85 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
3985
3996
|
h();
|
|
3986
3997
|
},
|
|
3987
3998
|
{ immediate: !0 }
|
|
3988
|
-
), (
|
|
3989
|
-
const
|
|
3990
|
-
return
|
|
3991
|
-
class: We(["global-info-table-renderer", { "global-info-table-renderer--editing":
|
|
3999
|
+
), (d, u) => {
|
|
4000
|
+
const _ = on, D = eo("Delete"), V = Jt, x = $t, K = nn;
|
|
4001
|
+
return I(), G("div", {
|
|
4002
|
+
class: We(["global-info-table-renderer", { "global-info-table-renderer--editing": d.editing }])
|
|
3992
4003
|
}, [
|
|
3993
|
-
ne("div",
|
|
4004
|
+
ne("div", Ta, [
|
|
3994
4005
|
Ie(K, {
|
|
3995
4006
|
class: "global-info-table-renderer__table",
|
|
3996
|
-
data:
|
|
4007
|
+
data: d.section.rows,
|
|
3997
4008
|
fit: !0,
|
|
3998
4009
|
"table-layout": "auto",
|
|
3999
|
-
"row-key":
|
|
4010
|
+
"row-key": B
|
|
4000
4011
|
}, {
|
|
4001
4012
|
default: U(() => [
|
|
4002
|
-
r.value ? (
|
|
4013
|
+
r.value ? (I(), H(_, {
|
|
4003
4014
|
key: 0,
|
|
4004
4015
|
type: "index",
|
|
4005
4016
|
label: i.value,
|
|
4006
4017
|
width: a.value,
|
|
4007
|
-
index:
|
|
4008
|
-
}, null, 8, ["label", "width"])) :
|
|
4009
|
-
(
|
|
4010
|
-
key:
|
|
4011
|
-
prop:
|
|
4012
|
-
label:
|
|
4013
|
-
width:
|
|
4014
|
-
"min-width":
|
|
4018
|
+
index: z
|
|
4019
|
+
}, null, 8, ["label", "width"])) : fe("", !0),
|
|
4020
|
+
(I(!0), G(Se, null, ye(s.value, (q) => (I(), H(_, {
|
|
4021
|
+
key: C(q),
|
|
4022
|
+
prop: q.code,
|
|
4023
|
+
label: q.label,
|
|
4024
|
+
width: b(q),
|
|
4025
|
+
"min-width": j(q)
|
|
4015
4026
|
}, {
|
|
4016
4027
|
header: U(() => [
|
|
4017
|
-
ne("span",
|
|
4018
|
-
|
|
4019
|
-
ne("span", null, oe(
|
|
4028
|
+
ne("span", Ma, [
|
|
4029
|
+
E(q) ? (I(), G("span", Oa, "*")) : fe("", !0),
|
|
4030
|
+
ne("span", null, oe(q.label), 1)
|
|
4020
4031
|
])
|
|
4021
4032
|
]),
|
|
4022
|
-
default: U(({ row: Q, $index:
|
|
4023
|
-
|
|
4033
|
+
default: U(({ row: Q, $index: T }) => [
|
|
4034
|
+
F(q) ? te(d.$slots, F(q), ae({
|
|
4024
4035
|
key: 0,
|
|
4025
4036
|
ref_for: !0
|
|
4026
|
-
},
|
|
4037
|
+
}, v(q, Q, T)), void 0, !0) : d.editing && y(q) ? (I(), H(Pn, {
|
|
4027
4038
|
key: 1,
|
|
4028
|
-
field:
|
|
4029
|
-
"model-value": Q[
|
|
4030
|
-
section:
|
|
4039
|
+
field: q,
|
|
4040
|
+
"model-value": Q[q.code],
|
|
4041
|
+
section: d.section,
|
|
4031
4042
|
row: Q,
|
|
4032
|
-
"row-index":
|
|
4033
|
-
onLoadOptions: (X) => N(
|
|
4034
|
-
"onUpdate:modelValue": (X) => L(Q,
|
|
4035
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (
|
|
4043
|
+
"row-index": T,
|
|
4044
|
+
onLoadOptions: (X) => N(q, Q, X),
|
|
4045
|
+
"onUpdate:modelValue": (X) => L(Q, T, q, X)
|
|
4046
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (I(), H(jn, {
|
|
4036
4047
|
key: 2,
|
|
4037
|
-
field:
|
|
4038
|
-
value: Q[
|
|
4039
|
-
section:
|
|
4048
|
+
field: q,
|
|
4049
|
+
value: Q[q.code],
|
|
4050
|
+
section: d.section,
|
|
4040
4051
|
row: Q,
|
|
4041
|
-
"row-index":
|
|
4052
|
+
"row-index": T
|
|
4042
4053
|
}, null, 8, ["field", "value", "section", "row", "row-index"]))
|
|
4043
4054
|
]),
|
|
4044
4055
|
_: 2
|
|
4045
4056
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
4046
|
-
|
|
4057
|
+
d.editing ? (I(), H(_, {
|
|
4047
4058
|
key: 1,
|
|
4048
4059
|
label: J(Z)("common.操作"),
|
|
4049
4060
|
width: "104",
|
|
4050
4061
|
fixed: "right"
|
|
4051
4062
|
}, {
|
|
4052
|
-
default: U(({ row:
|
|
4053
|
-
|
|
4063
|
+
default: U(({ row: q, $index: Q }) => [
|
|
4064
|
+
$(q, Q) ? (I(), H(ka, {
|
|
4054
4065
|
key: 0,
|
|
4055
|
-
onConfirm: (
|
|
4066
|
+
onConfirm: (T) => w(Q)
|
|
4056
4067
|
}, {
|
|
4057
4068
|
default: U(() => [
|
|
4058
|
-
Ie(
|
|
4069
|
+
Ie(x, {
|
|
4059
4070
|
class: "global-info-table-renderer__delete",
|
|
4060
4071
|
link: "",
|
|
4061
4072
|
type: "danger"
|
|
4062
4073
|
}, {
|
|
4063
4074
|
default: U(() => [
|
|
4064
|
-
Ie(
|
|
4075
|
+
Ie(V, { class: "global-info-table-renderer__delete-icon" }, {
|
|
4065
4076
|
default: U(() => [
|
|
4066
|
-
Ie(
|
|
4077
|
+
Ie(D)
|
|
4067
4078
|
]),
|
|
4068
4079
|
_: 1
|
|
4069
4080
|
}),
|
|
@@ -4073,10 +4084,10 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4073
4084
|
})
|
|
4074
4085
|
]),
|
|
4075
4086
|
_: 2
|
|
4076
|
-
}, 1032, ["onConfirm"])) :
|
|
4087
|
+
}, 1032, ["onConfirm"])) : fe("", !0)
|
|
4077
4088
|
]),
|
|
4078
4089
|
_: 1
|
|
4079
|
-
}, 8, ["label"])) :
|
|
4090
|
+
}, 8, ["label"])) : fe("", !0)
|
|
4080
4091
|
]),
|
|
4081
4092
|
_: 3
|
|
4082
4093
|
}, 8, ["data"])
|
|
@@ -4084,7 +4095,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4084
4095
|
], 2);
|
|
4085
4096
|
};
|
|
4086
4097
|
}
|
|
4087
|
-
}), Fa = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-
|
|
4098
|
+
}), Fa = /* @__PURE__ */ be(Da, [["__scopeId", "data-v-c89c935f"]]), Ba = /* @__PURE__ */ pe({
|
|
4088
4099
|
name: "GlobalInfoAutoRenderer",
|
|
4089
4100
|
__name: "GlobalInfoAutoRenderer",
|
|
4090
4101
|
props: {
|
|
@@ -4096,7 +4107,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4096
4107
|
renderConfig: {}
|
|
4097
4108
|
},
|
|
4098
4109
|
setup(e) {
|
|
4099
|
-
return (t, n) => t.section.renderType === "table" ? (
|
|
4110
|
+
return (t, n) => t.section.renderType === "table" ? (I(), H(Fa, {
|
|
4100
4111
|
key: 0,
|
|
4101
4112
|
section: t.section,
|
|
4102
4113
|
node: t.node,
|
|
@@ -4104,7 +4115,7 @@ const wa = { class: "global-info-form-renderer__label" }, Ia = {
|
|
|
4104
4115
|
state: t.state,
|
|
4105
4116
|
actions: t.actions,
|
|
4106
4117
|
"render-config": t.renderConfig
|
|
4107
|
-
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (
|
|
4118
|
+
}, null, 8, ["section", "node", "editing", "state", "actions", "render-config"])) : (I(), H(Ca, {
|
|
4108
4119
|
key: 1,
|
|
4109
4120
|
section: t.section,
|
|
4110
4121
|
node: t.node,
|
|
@@ -4121,7 +4132,7 @@ function qn(e) {
|
|
|
4121
4132
|
function Gn(e, t) {
|
|
4122
4133
|
return qn(e) || Kn(t?.code);
|
|
4123
4134
|
}
|
|
4124
|
-
function
|
|
4135
|
+
function Mt(e, t, n) {
|
|
4125
4136
|
if (!n) return "";
|
|
4126
4137
|
const o = `${t}-${n}`;
|
|
4127
4138
|
if (e[o]) return o;
|
|
@@ -4143,7 +4154,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4143
4154
|
renderConfig: {}
|
|
4144
4155
|
},
|
|
4145
4156
|
setup(e) {
|
|
4146
|
-
const t = e, n = Le(), o =
|
|
4157
|
+
const t = e, n = Le(), o = O(() => ft(
|
|
4147
4158
|
t.section.fields,
|
|
4148
4159
|
t.section,
|
|
4149
4160
|
t.renderConfig,
|
|
@@ -4151,8 +4162,8 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4151
4162
|
values: t.section.model,
|
|
4152
4163
|
rows: t.section.renderType === "table" ? t.section.rows : void 0
|
|
4153
4164
|
}
|
|
4154
|
-
)), r =
|
|
4155
|
-
const s =
|
|
4165
|
+
)), r = O(() => t.editing ?? t.actions.isEditing(t.section)), i = O(() => t.section.renderType === "table" && t.section.rows.length === 0 || o.value.length === 0), a = O(() => {
|
|
4166
|
+
const s = Mt(
|
|
4156
4167
|
n,
|
|
4157
4168
|
"section",
|
|
4158
4169
|
Gn(t.node ?? {}, t.section)
|
|
@@ -4161,7 +4172,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4161
4172
|
s,
|
|
4162
4173
|
l,
|
|
4163
4174
|
"default"
|
|
4164
|
-
].find((
|
|
4175
|
+
].find((g) => !!(g && n[g])) ?? "";
|
|
4165
4176
|
});
|
|
4166
4177
|
function c(s) {
|
|
4167
4178
|
return s === "form" || s === "table" ? s : "";
|
|
@@ -4178,7 +4189,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4178
4189
|
renderConfig: s.renderConfig,
|
|
4179
4190
|
state: s.state,
|
|
4180
4191
|
actions: s.actions
|
|
4181
|
-
}) : (
|
|
4192
|
+
}) : (I(), H(Ba, {
|
|
4182
4193
|
key: 1,
|
|
4183
4194
|
section: s.section,
|
|
4184
4195
|
node: s.node,
|
|
@@ -4244,94 +4255,94 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4244
4255
|
onSave: { type: Function }
|
|
4245
4256
|
},
|
|
4246
4257
|
setup(e) {
|
|
4247
|
-
const t = e, n = Le(), o = ge(!1), r = ge(null), i = ge(null), a =
|
|
4258
|
+
const t = e, n = Le(), o = ge(!1), r = ge(null), i = ge(null), a = O(() => !!t.hideHeader), c = O(() => t.actions.getSectionStatus(t.node)), s = O(
|
|
4248
4259
|
() => t.actions.getSection(t.node) ?? i.value
|
|
4249
|
-
), l =
|
|
4250
|
-
const
|
|
4251
|
-
return
|
|
4252
|
-
|
|
4253
|
-
|
|
4260
|
+
), l = O(() => {
|
|
4261
|
+
const b = s.value;
|
|
4262
|
+
return b ? ft(
|
|
4263
|
+
b.fields,
|
|
4264
|
+
b,
|
|
4254
4265
|
t.renderConfig,
|
|
4255
4266
|
{
|
|
4256
|
-
values:
|
|
4257
|
-
rows:
|
|
4267
|
+
values: b.model,
|
|
4268
|
+
rows: b.renderType === "table" ? b.rows : void 0
|
|
4258
4269
|
}
|
|
4259
4270
|
) : [];
|
|
4260
|
-
}),
|
|
4271
|
+
}), g = O(
|
|
4261
4272
|
() => s.value?.title || t.node.tagName || t.node.label || "-"
|
|
4262
|
-
), w =
|
|
4273
|
+
), w = O(
|
|
4263
4274
|
() => !!(s.value && t.actions.isEditing(s.value))
|
|
4264
|
-
),
|
|
4275
|
+
), $ = O(
|
|
4265
4276
|
() => s.value?.renderType === "table"
|
|
4266
|
-
), L =
|
|
4267
|
-
() =>
|
|
4268
|
-
),
|
|
4269
|
-
const
|
|
4270
|
-
return
|
|
4271
|
-
}),
|
|
4277
|
+
), L = O(() => o.value || c.value.loading), P = O(
|
|
4278
|
+
() => M(r.value || c.value.error)
|
|
4279
|
+
), f = O(() => {
|
|
4280
|
+
const b = s.value;
|
|
4281
|
+
return b ? b.renderType === "table" && b.rows.length === 0 || l.value.length === 0 : !0;
|
|
4282
|
+
}), S = O(() => ({
|
|
4272
4283
|
node: t.node,
|
|
4273
4284
|
section: s.value,
|
|
4274
4285
|
sectionView: s.value,
|
|
4275
4286
|
fields: l.value,
|
|
4276
4287
|
renderConfig: t.renderConfig,
|
|
4277
|
-
title:
|
|
4288
|
+
title: g.value,
|
|
4278
4289
|
editing: w.value,
|
|
4279
4290
|
loading: L.value,
|
|
4280
4291
|
error: r.value || c.value.error,
|
|
4281
4292
|
errorMessage: P.value,
|
|
4282
|
-
isEmpty:
|
|
4283
|
-
empty:
|
|
4293
|
+
isEmpty: f.value,
|
|
4294
|
+
empty: f.value,
|
|
4284
4295
|
sectionStatus: c.value,
|
|
4285
4296
|
state: t.state,
|
|
4286
4297
|
actions: t.actions,
|
|
4287
4298
|
reload: A,
|
|
4288
4299
|
handleEdit: N,
|
|
4289
4300
|
handleCancel: h,
|
|
4290
|
-
handleAddTableRow:
|
|
4291
|
-
handleSave:
|
|
4301
|
+
handleAddTableRow: v,
|
|
4302
|
+
handleSave: F
|
|
4292
4303
|
}));
|
|
4293
|
-
function
|
|
4294
|
-
return
|
|
4304
|
+
function M(b) {
|
|
4305
|
+
return b ? b instanceof Error ? b.message : String(b) : "";
|
|
4295
4306
|
}
|
|
4296
4307
|
async function N() {
|
|
4297
|
-
const
|
|
4298
|
-
|
|
4308
|
+
const b = s.value;
|
|
4309
|
+
b && (await t.onEdit?.(b, t.node), t.onEdit || t.actions.startEdit(b));
|
|
4299
4310
|
}
|
|
4300
4311
|
async function h() {
|
|
4301
|
-
const
|
|
4302
|
-
|
|
4312
|
+
const b = s.value;
|
|
4313
|
+
b && (await t.onCancel?.(b, t.node), t.onCancel || t.actions.cancelEdit(b));
|
|
4303
4314
|
}
|
|
4304
|
-
function
|
|
4305
|
-
const
|
|
4306
|
-
if (!
|
|
4307
|
-
const
|
|
4308
|
-
(
|
|
4315
|
+
function v() {
|
|
4316
|
+
const b = s.value;
|
|
4317
|
+
if (!b) return;
|
|
4318
|
+
const j = b.fields.reduce(
|
|
4319
|
+
(C, z) => (C[z.code] = z.value ?? "", C),
|
|
4309
4320
|
{ __rowKey: `new-${Date.now()}` }
|
|
4310
4321
|
);
|
|
4311
|
-
t.actions.saveRow(
|
|
4322
|
+
t.actions.saveRow(b, j, -1);
|
|
4312
4323
|
}
|
|
4313
|
-
async function
|
|
4314
|
-
const
|
|
4315
|
-
if (
|
|
4324
|
+
async function F() {
|
|
4325
|
+
const b = s.value;
|
|
4326
|
+
if (b)
|
|
4316
4327
|
try {
|
|
4317
4328
|
if (t.onSave) {
|
|
4318
|
-
await t.onSave(
|
|
4329
|
+
await t.onSave(b, t.node);
|
|
4319
4330
|
return;
|
|
4320
4331
|
}
|
|
4321
|
-
await t.actions.saveSection(
|
|
4322
|
-
} catch (
|
|
4323
|
-
r.value =
|
|
4332
|
+
await t.actions.saveSection(b);
|
|
4333
|
+
} catch (j) {
|
|
4334
|
+
r.value = j, console.error("[GlobalInfoSectionBlock] save section failed", j);
|
|
4324
4335
|
}
|
|
4325
4336
|
}
|
|
4326
|
-
function
|
|
4327
|
-
r.value =
|
|
4337
|
+
function y(b) {
|
|
4338
|
+
r.value = b;
|
|
4328
4339
|
}
|
|
4329
4340
|
async function A() {
|
|
4330
4341
|
o.value = !0, r.value = null, i.value = null;
|
|
4331
4342
|
try {
|
|
4332
4343
|
i.value = await t.actions.loadSection(t.node);
|
|
4333
|
-
} catch (
|
|
4334
|
-
r.value =
|
|
4344
|
+
} catch (b) {
|
|
4345
|
+
r.value = b, console.error("[GlobalInfoSectionBlock] load section failed", b);
|
|
4335
4346
|
} finally {
|
|
4336
4347
|
o.value = !1;
|
|
4337
4348
|
}
|
|
@@ -4343,19 +4354,19 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4343
4354
|
() => {
|
|
4344
4355
|
A();
|
|
4345
4356
|
}
|
|
4346
|
-
), (
|
|
4347
|
-
const
|
|
4348
|
-
return
|
|
4349
|
-
a.value ?
|
|
4350
|
-
te(
|
|
4357
|
+
), (b, j) => {
|
|
4358
|
+
const C = $t;
|
|
4359
|
+
return I(), G("section", Va, [
|
|
4360
|
+
a.value ? fe("", !0) : (I(), G("header", Pa, [
|
|
4361
|
+
te(b.$slots, "header", Oe(Be(S.value)), () => [
|
|
4351
4362
|
ne("div", ja, [
|
|
4352
|
-
|
|
4353
|
-
ne("h3", Aa, oe(
|
|
4363
|
+
j[0] || (j[0] = ne("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
4364
|
+
ne("h3", Aa, oe(g.value), 1)
|
|
4354
4365
|
]),
|
|
4355
|
-
te(
|
|
4356
|
-
s.value ? (
|
|
4357
|
-
w.value ? (
|
|
4358
|
-
Ie(
|
|
4366
|
+
te(b.$slots, "actions", Oe(Be(S.value)), () => [
|
|
4367
|
+
s.value ? (I(), G("div", Ra, [
|
|
4368
|
+
w.value ? (I(), G(Se, { key: 1 }, [
|
|
4369
|
+
Ie(C, {
|
|
4359
4370
|
class: "global-info-section-block__cancel",
|
|
4360
4371
|
disabled: c.value.saving,
|
|
4361
4372
|
onClick: h
|
|
@@ -4365,35 +4376,35 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4365
4376
|
]),
|
|
4366
4377
|
_: 1
|
|
4367
4378
|
}, 8, ["disabled"]),
|
|
4368
|
-
|
|
4379
|
+
$.value ? (I(), H(C, {
|
|
4369
4380
|
key: 0,
|
|
4370
4381
|
class: "global-info-section-block__add",
|
|
4371
4382
|
disabled: c.value.saving,
|
|
4372
|
-
onClick:
|
|
4383
|
+
onClick: v
|
|
4373
4384
|
}, {
|
|
4374
4385
|
default: U(() => [
|
|
4375
4386
|
He(oe(J(Z)("common.新增")), 1)
|
|
4376
4387
|
]),
|
|
4377
4388
|
_: 1
|
|
4378
|
-
}, 8, ["disabled"])) :
|
|
4379
|
-
Ie(
|
|
4389
|
+
}, 8, ["disabled"])) : fe("", !0),
|
|
4390
|
+
Ie(C, {
|
|
4380
4391
|
class: "global-info-section-block__confirm",
|
|
4381
4392
|
loading: c.value.saving,
|
|
4382
|
-
onClick:
|
|
4393
|
+
onClick: F
|
|
4383
4394
|
}, {
|
|
4384
4395
|
default: U(() => [
|
|
4385
|
-
He(oe(
|
|
4396
|
+
He(oe($.value ? J(Z)("common.确认") : J(Z)("common.保存")), 1)
|
|
4386
4397
|
]),
|
|
4387
4398
|
_: 1
|
|
4388
4399
|
}, 8, ["loading"])
|
|
4389
|
-
], 64)) : (
|
|
4400
|
+
], 64)) : (I(), H(C, {
|
|
4390
4401
|
key: 0,
|
|
4391
4402
|
class: "global-info-section-block__edit",
|
|
4392
4403
|
disabled: c.value.saving || L.value,
|
|
4393
4404
|
onClick: N
|
|
4394
4405
|
}, {
|
|
4395
4406
|
default: U(() => [
|
|
4396
|
-
|
|
4407
|
+
j[1] || (j[1] = ne("svg", {
|
|
4397
4408
|
class: "global-info-section-block__edit-icon",
|
|
4398
4409
|
viewBox: "0 0 12 12",
|
|
4399
4410
|
"aria-hidden": "true",
|
|
@@ -4408,39 +4419,39 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4408
4419
|
]),
|
|
4409
4420
|
_: 1
|
|
4410
4421
|
}, 8, ["disabled"]))
|
|
4411
|
-
])) :
|
|
4422
|
+
])) : fe("", !0)
|
|
4412
4423
|
], !0)
|
|
4413
4424
|
], !0)
|
|
4414
4425
|
])),
|
|
4415
4426
|
ne("div", Na, [
|
|
4416
|
-
L.value ? te(
|
|
4427
|
+
L.value ? te(b.$slots, "loading", Oe(ae({ key: 0 }, S.value)), () => [
|
|
4417
4428
|
ne("div", za, oe(J(Z)("common.加载中___")), 1)
|
|
4418
|
-
], !0) : !s.value ||
|
|
4429
|
+
], !0) : !s.value || f.value ? te(b.$slots, "empty", Oe(ae({ key: 1 }, S.value)), () => [
|
|
4419
4430
|
ne("div", xa, oe(J(Z)("common.暂无数据")), 1)
|
|
4420
|
-
], !0) : (
|
|
4431
|
+
], !0) : (I(), H(La, {
|
|
4421
4432
|
key: 2,
|
|
4422
|
-
"boundary-key":
|
|
4423
|
-
label:
|
|
4424
|
-
onError:
|
|
4433
|
+
"boundary-key": b.node.key,
|
|
4434
|
+
label: g.value,
|
|
4435
|
+
onError: y
|
|
4425
4436
|
}, {
|
|
4426
4437
|
fallback: U(() => [
|
|
4427
|
-
te(
|
|
4438
|
+
te(b.$slots, "empty", Oe(Be(S.value)), () => [
|
|
4428
4439
|
ne("div", qa, oe(J(Z)("common.暂无数据")), 1)
|
|
4429
4440
|
], !0)
|
|
4430
4441
|
]),
|
|
4431
4442
|
default: U(() => [
|
|
4432
4443
|
Ie(Ea, {
|
|
4433
4444
|
section: s.value,
|
|
4434
|
-
node:
|
|
4445
|
+
node: b.node,
|
|
4435
4446
|
editing: w.value,
|
|
4436
|
-
state:
|
|
4437
|
-
actions:
|
|
4438
|
-
"render-config":
|
|
4447
|
+
state: b.state,
|
|
4448
|
+
actions: b.actions,
|
|
4449
|
+
"render-config": b.renderConfig
|
|
4439
4450
|
}, Re({ _: 2 }, [
|
|
4440
|
-
ye(J(n), (
|
|
4451
|
+
ye(J(n), (z, re) => ({
|
|
4441
4452
|
name: re,
|
|
4442
4453
|
fn: U((le) => [
|
|
4443
|
-
te(
|
|
4454
|
+
te(b.$slots, re, Oe(Be({ ...S.value, ...le })), void 0, !0)
|
|
4444
4455
|
])
|
|
4445
4456
|
}))
|
|
4446
4457
|
]), 1032, ["section", "node", "editing", "state", "actions", "render-config"])
|
|
@@ -4451,7 +4462,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4451
4462
|
]);
|
|
4452
4463
|
};
|
|
4453
4464
|
}
|
|
4454
|
-
}), Ka = /* @__PURE__ */ be(Ga, [["__scopeId", "data-v-
|
|
4465
|
+
}), Ka = /* @__PURE__ */ be(Ga, [["__scopeId", "data-v-ca5e73ee"]]), Ya = { class: "global-info-group" }, Ua = { class: "global-info-group__header" }, Ha = { class: "global-info-group__title" }, Ja = { class: "global-info-group__body" }, Wa = ["id"], Za = { class: "global-info-group__empty" }, Qa = /* @__PURE__ */ pe({
|
|
4455
4466
|
name: "GlobalInfoGroup",
|
|
4456
4467
|
__name: "GlobalInfoGroup",
|
|
4457
4468
|
props: {
|
|
@@ -4463,10 +4474,10 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4463
4474
|
renderConfig: {}
|
|
4464
4475
|
},
|
|
4465
4476
|
setup(e) {
|
|
4466
|
-
const t = e, n = Le(), o =
|
|
4477
|
+
const t = e, n = Le(), o = O(
|
|
4467
4478
|
() => t.group.tagName || t.group.label || "-"
|
|
4468
|
-
), r =
|
|
4469
|
-
function i(l,
|
|
4479
|
+
), r = O(() => t.children.length <= 1);
|
|
4480
|
+
function i(l, g) {
|
|
4470
4481
|
const w = t.actions.getSection(l);
|
|
4471
4482
|
return {
|
|
4472
4483
|
node: l,
|
|
@@ -4477,7 +4488,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4477
4488
|
state: t.state,
|
|
4478
4489
|
actions: t.actions,
|
|
4479
4490
|
renderConfig: t.renderConfig,
|
|
4480
|
-
index:
|
|
4491
|
+
index: g,
|
|
4481
4492
|
editing: !!(w && t.actions.isEditing(w)),
|
|
4482
4493
|
sectionStatus: t.actions.getSectionStatus(l),
|
|
4483
4494
|
isSelfSection: c(l, 0) === c(t.group, 0),
|
|
@@ -4487,20 +4498,20 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4487
4498
|
};
|
|
4488
4499
|
}
|
|
4489
4500
|
function a(l) {
|
|
4490
|
-
const
|
|
4491
|
-
return
|
|
4501
|
+
const g = t.actions.getSection(l);
|
|
4502
|
+
return Mt(
|
|
4492
4503
|
n,
|
|
4493
4504
|
"section",
|
|
4494
|
-
Gn(l,
|
|
4505
|
+
Gn(l, g)
|
|
4495
4506
|
);
|
|
4496
4507
|
}
|
|
4497
|
-
function c(l,
|
|
4498
|
-
return l.key || l.id || l.infSetId || l.tagId || `${
|
|
4508
|
+
function c(l, g) {
|
|
4509
|
+
return l.key || l.id || l.infSetId || l.tagId || `${g}`;
|
|
4499
4510
|
}
|
|
4500
4511
|
function s(l) {
|
|
4501
4512
|
return `global-info-section-${c(l, 0)}`;
|
|
4502
4513
|
}
|
|
4503
|
-
return (l,
|
|
4514
|
+
return (l, g) => (I(), G("section", Ya, [
|
|
4504
4515
|
te(l.$slots, "header", {
|
|
4505
4516
|
group: l.group,
|
|
4506
4517
|
children: l.children,
|
|
@@ -4512,7 +4523,7 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4512
4523
|
isEmpty: l.children.length === 0
|
|
4513
4524
|
}, () => [
|
|
4514
4525
|
ne("header", Ua, [
|
|
4515
|
-
|
|
4526
|
+
g[0] || (g[0] = ne("span", { class: "global-info-group__marker" }, null, -1)),
|
|
4516
4527
|
ne("h2", Ha, oe(o.value), 1)
|
|
4517
4528
|
])
|
|
4518
4529
|
], !0),
|
|
@@ -4526,19 +4537,19 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4526
4537
|
renderConfig: l.renderConfig,
|
|
4527
4538
|
index: l.index,
|
|
4528
4539
|
isEmpty: l.children.length === 0
|
|
4529
|
-
}, void 0, !0) : (
|
|
4530
|
-
(
|
|
4540
|
+
}, void 0, !0) : (I(), G(Se, { key: 1 }, [
|
|
4541
|
+
(I(!0), G(Se, null, ye(l.children, (w, $) => (I(), G("div", {
|
|
4531
4542
|
id: s(w),
|
|
4532
|
-
key: c(w,
|
|
4543
|
+
key: c(w, $),
|
|
4533
4544
|
class: "global-info-group__section"
|
|
4534
4545
|
}, [
|
|
4535
4546
|
a(w) ? te(l.$slots, a(w), ae({
|
|
4536
4547
|
key: 0,
|
|
4537
4548
|
ref_for: !0
|
|
4538
|
-
}, i(w,
|
|
4549
|
+
}, i(w, $)), void 0, !0) : J(n).section ? te(l.$slots, "section", ae({
|
|
4539
4550
|
key: 1,
|
|
4540
4551
|
ref_for: !0
|
|
4541
|
-
}, i(w,
|
|
4552
|
+
}, i(w, $)), void 0, !0) : (I(), H(Ka, {
|
|
4542
4553
|
key: 2,
|
|
4543
4554
|
node: w,
|
|
4544
4555
|
state: l.state,
|
|
@@ -4548,8 +4559,8 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4548
4559
|
}, Re({ _: 2 }, [
|
|
4549
4560
|
ye(J(n), (L, P) => ({
|
|
4550
4561
|
name: P,
|
|
4551
|
-
fn: U((
|
|
4552
|
-
te(l.$slots, P, ae({ ref_for: !0 },
|
|
4562
|
+
fn: U((f) => [
|
|
4563
|
+
te(l.$slots, P, ae({ ref_for: !0 }, f), void 0, !0)
|
|
4553
4564
|
])
|
|
4554
4565
|
}))
|
|
4555
4566
|
]), 1032, ["node", "state", "actions", "hide-header", "render-config"]))
|
|
@@ -4565,12 +4576,12 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4565
4576
|
renderConfig: l.renderConfig
|
|
4566
4577
|
}, () => [
|
|
4567
4578
|
ne("div", Za, oe(J(Z)("common.暂无数据")), 1)
|
|
4568
|
-
], !0) :
|
|
4579
|
+
], !0) : fe("", !0)
|
|
4569
4580
|
], 64))
|
|
4570
4581
|
])
|
|
4571
4582
|
]));
|
|
4572
4583
|
}
|
|
4573
|
-
}), Xa = /* @__PURE__ */ be(Qa, [["__scopeId", "data-v-
|
|
4584
|
+
}), Xa = /* @__PURE__ */ be(Qa, [["__scopeId", "data-v-ecdfaf65"]]), es = { class: "global-info-sections" }, ts = /* @__PURE__ */ pe({
|
|
4574
4585
|
name: "GlobalInfoSections",
|
|
4575
4586
|
__name: "GlobalInfoSections",
|
|
4576
4587
|
props: {
|
|
@@ -4580,36 +4591,36 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4580
4591
|
renderConfig: {}
|
|
4581
4592
|
},
|
|
4582
4593
|
setup(e) {
|
|
4583
|
-
const t = e, n = Le(), o =
|
|
4584
|
-
const
|
|
4585
|
-
(
|
|
4586
|
-
), w = t.nodes.filter((
|
|
4587
|
-
group:
|
|
4588
|
-
children: r(
|
|
4589
|
-
})),
|
|
4590
|
-
group:
|
|
4591
|
-
children: [
|
|
4594
|
+
const t = e, n = Le(), o = O(() => {
|
|
4595
|
+
const g = t.nodes.filter(
|
|
4596
|
+
(M) => r(M).length > 0
|
|
4597
|
+
), w = t.nodes.filter((M) => r(M).length === 0), $ = w.filter((M) => i(M)), L = w.filter((M) => !i(M)), P = g.map((M) => ({
|
|
4598
|
+
group: M,
|
|
4599
|
+
children: r(M)
|
|
4600
|
+
})), f = $.map((M) => ({
|
|
4601
|
+
group: M,
|
|
4602
|
+
children: [M]
|
|
4592
4603
|
}));
|
|
4593
4604
|
if (P.length === 0)
|
|
4594
|
-
return
|
|
4595
|
-
const
|
|
4596
|
-
return [...P, ...
|
|
4605
|
+
return $.length > 0 ? f : l(L);
|
|
4606
|
+
const S = l(L);
|
|
4607
|
+
return [...P, ...f, ...S];
|
|
4597
4608
|
});
|
|
4598
|
-
function r(
|
|
4599
|
-
return
|
|
4609
|
+
function r(g) {
|
|
4610
|
+
return g.children ?? [];
|
|
4600
4611
|
}
|
|
4601
|
-
function i(
|
|
4602
|
-
return !String(
|
|
4612
|
+
function i(g) {
|
|
4613
|
+
return !String(g.parentId || g.parentTagId || "").trim();
|
|
4603
4614
|
}
|
|
4604
|
-
function a(
|
|
4605
|
-
return
|
|
4615
|
+
function a(g) {
|
|
4616
|
+
return Mt(n, "group", qn(g));
|
|
4606
4617
|
}
|
|
4607
|
-
function c(
|
|
4608
|
-
return
|
|
4618
|
+
function c(g, w) {
|
|
4619
|
+
return g.key || g.id || g.tagId || `${w}`;
|
|
4609
4620
|
}
|
|
4610
|
-
function s(
|
|
4611
|
-
const w =
|
|
4612
|
-
|
|
4621
|
+
function s(g) {
|
|
4622
|
+
const w = g[0], $ = w?.raw ?? {}, L = String(
|
|
4623
|
+
$.parentTagName || $.parentName || $.parentLabel || w?.parentId || Z("common.信息")
|
|
4613
4624
|
);
|
|
4614
4625
|
return {
|
|
4615
4626
|
...w,
|
|
@@ -4622,63 +4633,63 @@ const Ea = /* @__PURE__ */ pe({
|
|
|
4622
4633
|
),
|
|
4623
4634
|
tagName: L,
|
|
4624
4635
|
label: L,
|
|
4625
|
-
children:
|
|
4636
|
+
children: g
|
|
4626
4637
|
};
|
|
4627
4638
|
}
|
|
4628
|
-
function l(
|
|
4639
|
+
function l(g) {
|
|
4629
4640
|
const w = /* @__PURE__ */ new Map();
|
|
4630
|
-
return
|
|
4641
|
+
return g.forEach(($) => {
|
|
4631
4642
|
const L = String(
|
|
4632
|
-
|
|
4643
|
+
$.parentId || $.parentTagId || "global-info-flat"
|
|
4633
4644
|
), P = w.get(L) ?? [];
|
|
4634
|
-
P.push(
|
|
4635
|
-
}), Array.from(w.values()).map((
|
|
4636
|
-
group: s(
|
|
4637
|
-
children:
|
|
4645
|
+
P.push($), w.set(L, P);
|
|
4646
|
+
}), Array.from(w.values()).map(($) => ({
|
|
4647
|
+
group: s($),
|
|
4648
|
+
children: $
|
|
4638
4649
|
}));
|
|
4639
4650
|
}
|
|
4640
|
-
return (
|
|
4641
|
-
(
|
|
4642
|
-
key: c(
|
|
4651
|
+
return (g, w) => (I(), G("div", es, [
|
|
4652
|
+
(I(!0), G(Se, null, ye(o.value, ($, L) => (I(), G(Se, {
|
|
4653
|
+
key: c($.group, L)
|
|
4643
4654
|
}, [
|
|
4644
|
-
a(
|
|
4655
|
+
a($.group) ? te(g.$slots, a($.group), {
|
|
4645
4656
|
key: 0,
|
|
4646
|
-
group:
|
|
4647
|
-
children:
|
|
4648
|
-
state:
|
|
4649
|
-
actions:
|
|
4650
|
-
renderConfig:
|
|
4657
|
+
group: $.group,
|
|
4658
|
+
children: $.children,
|
|
4659
|
+
state: g.state,
|
|
4660
|
+
actions: g.actions,
|
|
4661
|
+
renderConfig: g.renderConfig,
|
|
4651
4662
|
index: L,
|
|
4652
|
-
isEmpty:
|
|
4653
|
-
}, void 0, !0) : J(n).group ? te(
|
|
4663
|
+
isEmpty: $.children.length === 0
|
|
4664
|
+
}, void 0, !0) : J(n).group ? te(g.$slots, "group", {
|
|
4654
4665
|
key: 1,
|
|
4655
|
-
group:
|
|
4656
|
-
children:
|
|
4657
|
-
state:
|
|
4658
|
-
actions:
|
|
4659
|
-
renderConfig:
|
|
4666
|
+
group: $.group,
|
|
4667
|
+
children: $.children,
|
|
4668
|
+
state: g.state,
|
|
4669
|
+
actions: g.actions,
|
|
4670
|
+
renderConfig: g.renderConfig,
|
|
4660
4671
|
index: L,
|
|
4661
|
-
isEmpty:
|
|
4662
|
-
}, void 0, !0) : (
|
|
4672
|
+
isEmpty: $.children.length === 0
|
|
4673
|
+
}, void 0, !0) : (I(), H(Xa, {
|
|
4663
4674
|
key: 2,
|
|
4664
|
-
group:
|
|
4665
|
-
children:
|
|
4666
|
-
state:
|
|
4667
|
-
actions:
|
|
4668
|
-
"render-config":
|
|
4675
|
+
group: $.group,
|
|
4676
|
+
children: $.children,
|
|
4677
|
+
state: g.state,
|
|
4678
|
+
actions: g.actions,
|
|
4679
|
+
"render-config": g.renderConfig,
|
|
4669
4680
|
index: L
|
|
4670
4681
|
}, Re({ _: 2 }, [
|
|
4671
|
-
ye(J(n), (P,
|
|
4672
|
-
name:
|
|
4673
|
-
fn: U((
|
|
4674
|
-
te(
|
|
4682
|
+
ye(J(n), (P, f) => ({
|
|
4683
|
+
name: f,
|
|
4684
|
+
fn: U((S) => [
|
|
4685
|
+
te(g.$slots, f, ae({ ref_for: !0 }, S), void 0, !0)
|
|
4675
4686
|
])
|
|
4676
4687
|
}))
|
|
4677
4688
|
]), 1032, ["group", "children", "state", "actions", "render-config", "index"]))
|
|
4678
4689
|
], 64))), 128))
|
|
4679
4690
|
]));
|
|
4680
4691
|
}
|
|
4681
|
-
}), us = /* @__PURE__ */ be(ts, [["__scopeId", "data-v-
|
|
4692
|
+
}), us = /* @__PURE__ */ be(ts, [["__scopeId", "data-v-86c94f9f"]]);
|
|
4682
4693
|
function ds(e, t = {}) {
|
|
4683
4694
|
Un(e, t);
|
|
4684
4695
|
}
|