@jt-home/mfe-components 1.0.2 → 1.0.3
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 +1324 -1297
- package/dist/style.css +1 -1
- package/dist/types/components/form/JtFormItems.vue.d.ts +2 -2
- package/dist/types/components/table/JtCrudTable.vue.d.ts +5 -5
- package/dist/types/components/table/JtFilterBar.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { defineComponent as U, useAttrs as
|
|
3
|
-
import { ElButton as
|
|
2
|
+
import { defineComponent as U, useAttrs as gt, computed as _, openBlock as y, createBlock as M, mergeProps as D, toHandlers as ke, withCtx as F, renderSlot as j, resolveDynamicComponent as yt, createCommentVNode as Y, withKeys as nn, createElementBlock as P, Fragment as de, renderList as oe, normalizeStyle as ht, nextTick as on, ref as ne, useSlots as ve, watch as je, normalizeClass as Ke, createVNode as le, withModifiers as an, unref as q, createSlots as we, createElementVNode as J, toDisplayString as ee, normalizeProps as ce, guardReactiveProps as me, useModel as Ne, resolveDirective as ln, withDirectives as rn, mergeModels as qe, shallowRef as he, onMounted as bt, createTextVNode as Fe, resolveComponent as sn, onErrorCaptured as un } from "vue";
|
|
3
|
+
import { ElButton as et, ElIcon as St, ElCascader as cn, ElDatePicker as _t, ElInput as It, ElSelect as wt, ElOption as kt, ElFormItem as Ct, ElForm as $t, ElTable as Bt, ElTableColumn as Tt, ElPagination as Et, ElInputNumber as dn, ElSwitch as pn, ElRow as fn, ElCol as mn, ElPopconfirm as vn } from "element-plus/es";
|
|
4
4
|
import "element-plus/theme-chalk/base.css";
|
|
5
5
|
import "element-plus/theme-chalk/el-form.css";
|
|
6
6
|
import "element-plus/theme-chalk/el-row.css";
|
|
@@ -28,35 +28,35 @@ import "element-plus/theme-chalk/el-radio.css";
|
|
|
28
28
|
import "element-plus/theme-chalk/el-virtual-list.css";
|
|
29
29
|
import "element-plus/theme-chalk/el-cascader-panel.css";
|
|
30
30
|
import "element-plus/theme-chalk/el-cascader.css";
|
|
31
|
-
import { cascaderEmits as
|
|
31
|
+
import { cascaderEmits as at, inputEmits as lt, selectEmits as rt, paginationEmits as st } from "element-plus";
|
|
32
32
|
import "element-plus/theme-chalk/el-pagination.css";
|
|
33
|
-
const
|
|
34
|
-
function
|
|
33
|
+
const Ze = 2, gn = 3;
|
|
34
|
+
function yn(t) {
|
|
35
35
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
36
36
|
}
|
|
37
37
|
function Ft(t) {
|
|
38
|
-
if (!t.startsWith("on") || t.length <=
|
|
38
|
+
if (!t.startsWith("on") || t.length <= Ze)
|
|
39
39
|
return !1;
|
|
40
|
-
const e = t.charCodeAt(
|
|
40
|
+
const e = t.charCodeAt(Ze);
|
|
41
41
|
return e < 97 || e > 122;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function hn(t) {
|
|
44
44
|
if (t.startsWith("on-"))
|
|
45
|
-
return t.slice(
|
|
46
|
-
const [e, n] = t.slice(
|
|
45
|
+
return t.slice(gn);
|
|
46
|
+
const [e, n] = t.slice(Ze).split(":"), o = yn(e);
|
|
47
47
|
return n ? `${o}:${n}` : o;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Mt(t, e = /* @__PURE__ */ new Set()) {
|
|
50
50
|
return Object.fromEntries(
|
|
51
|
-
Object.entries(t).filter(([n, o]) => !e.has(n) && Ft(n) && typeof o == "function").map(([n, o]) => [
|
|
51
|
+
Object.entries(t).filter(([n, o]) => !e.has(n) && Ft(n) && typeof o == "function").map(([n, o]) => [hn(n), o])
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Vt(t, e = /* @__PURE__ */ new Set()) {
|
|
55
55
|
return Object.fromEntries(
|
|
56
56
|
Object.entries(t).filter(([n]) => !e.has(n) && !Ft(n))
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const bn = /* @__PURE__ */ U({
|
|
60
60
|
name: "JtButton",
|
|
61
61
|
__name: "index",
|
|
62
62
|
props: {
|
|
@@ -81,35 +81,35 @@ const hn = /* @__PURE__ */ U({
|
|
|
81
81
|
tag: {}
|
|
82
82
|
},
|
|
83
83
|
setup(t) {
|
|
84
|
-
const e = t, n =
|
|
85
|
-
const { icon:
|
|
84
|
+
const e = t, n = gt(), o = _(() => {
|
|
85
|
+
const { icon: l, ...v } = e;
|
|
86
86
|
return {
|
|
87
|
-
...
|
|
87
|
+
...Vt(n),
|
|
88
88
|
...v
|
|
89
89
|
};
|
|
90
|
-
}), a =
|
|
91
|
-
return (
|
|
92
|
-
const p =
|
|
93
|
-
return y(),
|
|
94
|
-
default:
|
|
95
|
-
|
|
90
|
+
}), a = _(() => Mt(n));
|
|
91
|
+
return (l, v) => {
|
|
92
|
+
const p = St, u = et;
|
|
93
|
+
return y(), M(u, D({ class: "jt-button" }, o.value, ke(a.value)), {
|
|
94
|
+
default: F(() => [
|
|
95
|
+
l.$slots.icon ? (y(), M(p, {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "jt-button__icon"
|
|
98
98
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
j(
|
|
99
|
+
default: F(() => [
|
|
100
|
+
j(l.$slots, "icon", {}, void 0, !0)
|
|
101
101
|
]),
|
|
102
102
|
_: 3
|
|
103
|
-
})) : e.icon ? (y(),
|
|
103
|
+
})) : e.icon ? (y(), M(p, {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "jt-button__icon"
|
|
106
106
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
(y(),
|
|
107
|
+
default: F(() => [
|
|
108
|
+
(y(), M(yt(e.icon)))
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
|
-
})) :
|
|
112
|
-
j(
|
|
111
|
+
})) : Y("", !0),
|
|
112
|
+
j(l.$slots, "default", {}, void 0, !0)
|
|
113
113
|
]),
|
|
114
114
|
_: 3
|
|
115
115
|
}, 16);
|
|
@@ -120,7 +120,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
120
120
|
for (const [o, a] of e)
|
|
121
121
|
n[o] = a;
|
|
122
122
|
return n;
|
|
123
|
-
},
|
|
123
|
+
}, De = /* @__PURE__ */ X(bn, [["__scopeId", "data-v-fbcdce34"]]), Sn = /* @__PURE__ */ U({
|
|
124
124
|
name: "JtCascader",
|
|
125
125
|
__name: "index",
|
|
126
126
|
props: {
|
|
@@ -162,20 +162,20 @@ const hn = /* @__PURE__ */ U({
|
|
|
162
162
|
valueOnClear: { type: [String, Number, Boolean, Function, null] },
|
|
163
163
|
options: { default: () => [] }
|
|
164
164
|
},
|
|
165
|
-
emits:
|
|
165
|
+
emits: at,
|
|
166
166
|
setup(t, { emit: e }) {
|
|
167
|
-
const n = t, o = e, a =
|
|
168
|
-
Object.keys(
|
|
169
|
-
|
|
170
|
-
(...v) => o(
|
|
167
|
+
const n = t, o = e, a = _(() => Object.fromEntries(
|
|
168
|
+
Object.keys(at).map((l) => [
|
|
169
|
+
l,
|
|
170
|
+
(...v) => o(l, ...v)
|
|
171
171
|
])
|
|
172
172
|
));
|
|
173
|
-
return (
|
|
174
|
-
const p =
|
|
175
|
-
return y(),
|
|
173
|
+
return (l, v) => {
|
|
174
|
+
const p = cn;
|
|
175
|
+
return y(), M(p, D({ class: "jt-cascader" }, n, ke(a.value)), null, 16);
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
178
|
+
}), _n = /* @__PURE__ */ X(Sn, [["__scopeId", "data-v-9164edeb"]]), In = /* @__PURE__ */ U({
|
|
179
179
|
name: "JtDatePicker",
|
|
180
180
|
__name: "index",
|
|
181
181
|
props: {
|
|
@@ -228,7 +228,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
228
228
|
isRange: { type: Boolean }
|
|
229
229
|
},
|
|
230
230
|
setup(t) {
|
|
231
|
-
const e = t, n =
|
|
231
|
+
const e = t, n = _(() => ({
|
|
232
232
|
...e,
|
|
233
233
|
startPlaceholder: e.startPlaceholder ?? (o(e.type) ? "开始日期" : void 0),
|
|
234
234
|
endPlaceholder: e.endPlaceholder ?? (o(e.type) ? "结束日期" : void 0)
|
|
@@ -236,14 +236,14 @@ const hn = /* @__PURE__ */ U({
|
|
|
236
236
|
function o(a) {
|
|
237
237
|
return a?.includes("range") ?? !1;
|
|
238
238
|
}
|
|
239
|
-
return (a,
|
|
240
|
-
const v =
|
|
241
|
-
return y(),
|
|
242
|
-
"onUpdate:modelValue":
|
|
239
|
+
return (a, l) => {
|
|
240
|
+
const v = _t;
|
|
241
|
+
return y(), M(v, D({ class: "jt-date-picker" }, n.value, {
|
|
242
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => a.$emit("update:modelValue", p))
|
|
243
243
|
}), null, 16);
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), wn = /* @__PURE__ */ X(In, [["__scopeId", "data-v-2aaf2264"]]), kn = /* @__PURE__ */ U({
|
|
247
247
|
name: "JtInput",
|
|
248
248
|
__name: "index",
|
|
249
249
|
props: {
|
|
@@ -282,24 +282,24 @@ const hn = /* @__PURE__ */ U({
|
|
|
282
282
|
countGraphemes: {}
|
|
283
283
|
},
|
|
284
284
|
emits: {
|
|
285
|
-
...
|
|
285
|
+
...lt,
|
|
286
286
|
enter: () => !0
|
|
287
287
|
},
|
|
288
288
|
setup(t, { emit: e }) {
|
|
289
|
-
const n = t, o = e, a =
|
|
290
|
-
Object.keys(
|
|
291
|
-
|
|
292
|
-
(...v) => o(
|
|
289
|
+
const n = t, o = e, a = _(() => Object.fromEntries(
|
|
290
|
+
Object.keys(lt).map((l) => [
|
|
291
|
+
l,
|
|
292
|
+
(...v) => o(l, ...v)
|
|
293
293
|
])
|
|
294
294
|
));
|
|
295
|
-
return (
|
|
296
|
-
const p =
|
|
297
|
-
return y(),
|
|
298
|
-
onKeyup: v[0] || (v[0] = nn((
|
|
295
|
+
return (l, v) => {
|
|
296
|
+
const p = It;
|
|
297
|
+
return y(), M(p, D({ class: "jt-input" }, n, ke(a.value), {
|
|
298
|
+
onKeyup: v[0] || (v[0] = nn((u) => o("enter"), ["enter"]))
|
|
299
299
|
}), null, 16);
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
}),
|
|
302
|
+
}), We = /* @__PURE__ */ X(kn, [["__scopeId", "data-v-c4e9cb3f"]]), Cn = /* @__PURE__ */ U({
|
|
303
303
|
name: "JtSelect",
|
|
304
304
|
__name: "index",
|
|
305
305
|
props: {
|
|
@@ -356,31 +356,31 @@ const hn = /* @__PURE__ */ U({
|
|
|
356
356
|
appendTo: {},
|
|
357
357
|
props: {}
|
|
358
358
|
},
|
|
359
|
-
emits:
|
|
359
|
+
emits: rt,
|
|
360
360
|
setup(t, { emit: e }) {
|
|
361
|
-
const n = t, o =
|
|
361
|
+
const n = t, o = _(() => {
|
|
362
362
|
const { options: v, ...p } = n;
|
|
363
363
|
return p;
|
|
364
|
-
}), a = e,
|
|
365
|
-
Object.keys(
|
|
364
|
+
}), a = e, l = _(() => Object.fromEntries(
|
|
365
|
+
Object.keys(rt).map((v) => [
|
|
366
366
|
v,
|
|
367
367
|
(...p) => a(v, ...p)
|
|
368
368
|
])
|
|
369
369
|
));
|
|
370
370
|
return (v, p) => {
|
|
371
|
-
const
|
|
372
|
-
return y(),
|
|
373
|
-
default:
|
|
374
|
-
(y(!0),
|
|
375
|
-
key:
|
|
371
|
+
const u = kt, b = wt;
|
|
372
|
+
return y(), M(b, D({ class: "jt-select" }, o.value, ke(l.value)), {
|
|
373
|
+
default: F(() => [
|
|
374
|
+
(y(!0), P(de, null, oe(v.options ?? [], (B) => (y(), M(u, D({
|
|
375
|
+
key: B.value,
|
|
376
376
|
ref_for: !0
|
|
377
|
-
},
|
|
377
|
+
}, B), null, 16))), 128))
|
|
378
378
|
]),
|
|
379
379
|
_: 1
|
|
380
380
|
}, 16);
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
}),
|
|
383
|
+
}), $n = /* @__PURE__ */ X(Cn, [["__scopeId", "data-v-abce8e44"]]), Bn = { class: "jt-form-items" }, Ye = 4, Tn = /* @__PURE__ */ U({
|
|
384
384
|
name: "JTFormItems",
|
|
385
385
|
__name: "JtFormItems",
|
|
386
386
|
props: {
|
|
@@ -390,91 +390,110 @@ const hn = /* @__PURE__ */ U({
|
|
|
390
390
|
},
|
|
391
391
|
setup(t) {
|
|
392
392
|
const e = t, n = {
|
|
393
|
-
input:
|
|
394
|
-
select:
|
|
395
|
-
cascader:
|
|
396
|
-
"date-picker":
|
|
393
|
+
input: We,
|
|
394
|
+
select: $n,
|
|
395
|
+
cascader: _n,
|
|
396
|
+
"date-picker": wn
|
|
397
397
|
}, o = {
|
|
398
398
|
"remote-select": "select",
|
|
399
399
|
date: "date-picker",
|
|
400
400
|
daterange: "date-picker",
|
|
401
401
|
"date-range": "date-picker",
|
|
402
402
|
dateRange: "date-picker"
|
|
403
|
-
}, a = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]),
|
|
404
|
-
const { itemType:
|
|
405
|
-
if (!
|
|
406
|
-
if (typeof
|
|
407
|
-
const
|
|
408
|
-
return
|
|
409
|
-
`[JtFormItems] 不支持的 itemType: "${
|
|
410
|
-
),
|
|
411
|
-
},
|
|
412
|
-
const
|
|
413
|
-
return
|
|
414
|
-
...
|
|
415
|
-
options:
|
|
416
|
-
} :
|
|
417
|
-
...
|
|
403
|
+
}, a = /* @__PURE__ */ new Set(["prop", "label", "itemType", "span", "options", "rules", "formItemProps", "showSlot", "show"]), l = Object.keys(n), v = /* @__PURE__ */ new Map(), p = _(() => e.configs.filter((g) => g.show !== !1)), u = (g) => {
|
|
404
|
+
const { itemType: w } = g;
|
|
405
|
+
if (!w) return We;
|
|
406
|
+
if (typeof w != "string") return w;
|
|
407
|
+
const N = o[w] ?? w;
|
|
408
|
+
return l.includes(N) ? n[N] : (console.error(
|
|
409
|
+
`[JtFormItems] 不支持的 itemType: "${w}",支持的类型: ${l.join(", ")}`
|
|
410
|
+
), We);
|
|
411
|
+
}, b = (g) => {
|
|
412
|
+
const w = Vt(g, a);
|
|
413
|
+
return g.itemType === "select" || g.itemType === "remote-select" || g.itemType === "cascader" ? {
|
|
414
|
+
...w,
|
|
415
|
+
options: g.options
|
|
416
|
+
} : d(g.itemType) ? {
|
|
417
|
+
...w,
|
|
418
418
|
type: "daterange"
|
|
419
|
-
} :
|
|
420
|
-
},
|
|
421
|
-
rules:
|
|
422
|
-
...
|
|
423
|
-
}),
|
|
424
|
-
e.formData[
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
|
|
419
|
+
} : w;
|
|
420
|
+
}, B = (g) => Mt(g, a), i = (g) => ({
|
|
421
|
+
rules: g.rules,
|
|
422
|
+
...g.formItemProps
|
|
423
|
+
}), c = (g, w) => {
|
|
424
|
+
e.formData[g] = w;
|
|
425
|
+
};
|
|
426
|
+
function m(g) {
|
|
427
|
+
return (w) => {
|
|
428
|
+
if (w) {
|
|
429
|
+
v.set(g, w);
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
v.delete(g);
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function h(g, w) {
|
|
436
|
+
on(() => {
|
|
437
|
+
v.get(g)?.validate(w).catch(() => {
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
const S = (g) => Math.min(Math.max(Math.trunc(g || 1), 1), 4), V = _(() => {
|
|
442
|
+
const w = p.value.reduce(
|
|
443
|
+
(N, k) => N + S(e.span || k.span),
|
|
428
444
|
0
|
|
429
|
-
) %
|
|
430
|
-
return
|
|
431
|
-
gridColumn: `1 / span ${
|
|
445
|
+
) % Ye;
|
|
446
|
+
return w === 0 ? {
|
|
447
|
+
gridColumn: `1 / span ${Ye}`
|
|
432
448
|
} : {
|
|
433
|
-
gridColumn: `${
|
|
449
|
+
gridColumn: `${w + 1} / span ${Ye - w}`
|
|
434
450
|
};
|
|
435
|
-
}),
|
|
436
|
-
gridColumn: `span ${
|
|
451
|
+
}), G = (g) => ({
|
|
452
|
+
gridColumn: `span ${S(e.span || g.span)}`
|
|
437
453
|
});
|
|
438
|
-
function
|
|
439
|
-
return
|
|
440
|
-
}
|
|
441
|
-
return (
|
|
442
|
-
const
|
|
443
|
-
return y(),
|
|
444
|
-
(y(!0),
|
|
445
|
-
key:
|
|
454
|
+
function d(g) {
|
|
455
|
+
return g === "daterange" || g === "date-range" || g === "dateRange";
|
|
456
|
+
}
|
|
457
|
+
return (g, w) => {
|
|
458
|
+
const N = Ct;
|
|
459
|
+
return y(), P("div", Bn, [
|
|
460
|
+
(y(!0), P(de, null, oe(p.value, (k) => (y(), M(N, D({
|
|
461
|
+
key: k.prop,
|
|
462
|
+
ref_for: !0,
|
|
463
|
+
ref: m(k.prop),
|
|
446
464
|
class: "jt-form-items__item",
|
|
447
|
-
style:
|
|
448
|
-
label:
|
|
449
|
-
prop:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
_.showSlot ? j(S.$slots, _.prop, { key: 0 }, void 0, !0) : (y(), F(ht(p(_)), D({
|
|
465
|
+
style: G(k),
|
|
466
|
+
label: k.label,
|
|
467
|
+
prop: k.prop
|
|
468
|
+
}, i(k)), {
|
|
469
|
+
default: F(() => [
|
|
470
|
+
k.showSlot ? j(g.$slots, k.prop, { key: 0 }, void 0, !0) : (y(), M(yt(u(k)), D({
|
|
454
471
|
key: 1,
|
|
455
|
-
"model-value":
|
|
472
|
+
"model-value": g.formData[k.prop],
|
|
456
473
|
ref_for: !0
|
|
457
|
-
},
|
|
458
|
-
"onUpdate:modelValue": (
|
|
459
|
-
|
|
474
|
+
}, b(k), ke(B(k)), {
|
|
475
|
+
"onUpdate:modelValue": (I) => c(k.prop, I),
|
|
476
|
+
onChange: () => h(k.prop, "change"),
|
|
477
|
+
onBlur: () => h(k.prop, "blur")
|
|
478
|
+
}), null, 16, ["model-value", "onUpdate:modelValue", "onChange", "onBlur"]))
|
|
460
479
|
]),
|
|
461
480
|
_: 2
|
|
462
481
|
}, 1040, ["style", "label", "prop"]))), 128)),
|
|
463
|
-
|
|
482
|
+
g.$slots.actions ? (y(), M(N, {
|
|
464
483
|
key: 0,
|
|
465
484
|
class: "jt-form-items__actions",
|
|
466
|
-
style:
|
|
485
|
+
style: ht(V.value)
|
|
467
486
|
}, {
|
|
468
|
-
default:
|
|
469
|
-
j(
|
|
487
|
+
default: F(() => [
|
|
488
|
+
j(g.$slots, "actions", {}, void 0, !0)
|
|
470
489
|
]),
|
|
471
490
|
_: 3
|
|
472
|
-
}, 8, ["style"])) :
|
|
491
|
+
}, 8, ["style"])) : Y("", !0)
|
|
473
492
|
]);
|
|
474
493
|
};
|
|
475
494
|
}
|
|
476
|
-
}),
|
|
477
|
-
function
|
|
495
|
+
}), En = /* @__PURE__ */ X(Tn, [["__scopeId", "data-v-83c47b99"]]);
|
|
496
|
+
function Fn() {
|
|
478
497
|
const t = ne(!1);
|
|
479
498
|
function e() {
|
|
480
499
|
t.value = !0;
|
|
@@ -488,7 +507,7 @@ function En() {
|
|
|
488
507
|
searchDone: n
|
|
489
508
|
};
|
|
490
509
|
}
|
|
491
|
-
const Mn = { class: "jt-filter-bar__btns" },
|
|
510
|
+
const Mn = "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", Vn = "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", Pn = "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", Ln = { class: "jt-filter-bar__btns" }, Nn = ["src"], Rn = ["src"], jn = ["src"], zn = /* @__PURE__ */ U({
|
|
492
511
|
name: "JtFilterBar",
|
|
493
512
|
__name: "JtFilterBar",
|
|
494
513
|
props: {
|
|
@@ -498,195 +517,203 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
498
517
|
},
|
|
499
518
|
emits: ["update:modelValue", "search", "reset"],
|
|
500
519
|
setup(t, { expose: e, emit: n }) {
|
|
501
|
-
const o =
|
|
502
|
-
searchDisabled:
|
|
503
|
-
searchLoading:
|
|
504
|
-
searchDone:
|
|
505
|
-
} =
|
|
506
|
-
() => Math.max(1,
|
|
507
|
-
),
|
|
508
|
-
() => Math.max(1,
|
|
509
|
-
),
|
|
510
|
-
if (!
|
|
520
|
+
const o = t, a = n, l = ne(), v = ve(), p = ne({}), {
|
|
521
|
+
searchDisabled: u,
|
|
522
|
+
searchLoading: b,
|
|
523
|
+
searchDone: B
|
|
524
|
+
} = Fn(), i = _(() => o.option), c = ne(i.value.searchCollapsed ?? !1), m = _(() => o.columns.filter(($) => $.search === !0)), h = _(
|
|
525
|
+
() => Math.max(1, i.value.searchSpan ?? 4)
|
|
526
|
+
), S = _(() => Math.max(1, i.value.searchCollapsedRows ?? 1)), V = _(() => Math.max(1, h.value - 1)), G = _(
|
|
527
|
+
() => Math.max(1, V.value * S.value)
|
|
528
|
+
), d = _(() => _e(i.value.searchLabelWidth ?? 84)), g = _(() => i.value.searchLabelPosition ?? "top"), w = _(() => Be(i.value.searchGutter, 14)), N = _(() => Be(i.value.searchRowGap, 14)), k = _(() => Ve(i.value.searchPadding ?? "18px 4px 0")), I = _(() => i.value.searchCollapse === !1 ? !1 : Ue(m.value) > G.value), L = _(() => {
|
|
529
|
+
if (!I.value || !c.value) return m.value;
|
|
511
530
|
let $ = 0;
|
|
512
|
-
return
|
|
513
|
-
const
|
|
514
|
-
return $ +
|
|
531
|
+
return m.value.filter((x) => {
|
|
532
|
+
const Z = Se(x);
|
|
533
|
+
return $ + Z > G.value ? !1 : ($ += Z, !0);
|
|
515
534
|
});
|
|
516
|
-
}),
|
|
517
|
-
() =>
|
|
518
|
-
),
|
|
519
|
-
() =>
|
|
535
|
+
}), C = _(
|
|
536
|
+
() => L.value.filter(($) => !!v[`${$.prop}-search`])
|
|
537
|
+
), O = _(
|
|
538
|
+
() => L.value.map(($) => pe($))
|
|
520
539
|
);
|
|
521
|
-
|
|
522
|
-
() =>
|
|
540
|
+
je(
|
|
541
|
+
() => i.value.searchCollapsed,
|
|
523
542
|
($) => {
|
|
524
|
-
typeof $ == "boolean" && (
|
|
543
|
+
typeof $ == "boolean" && (c.value = $);
|
|
525
544
|
}
|
|
526
|
-
),
|
|
527
|
-
() =>
|
|
545
|
+
), je(
|
|
546
|
+
() => o.modelValue,
|
|
528
547
|
($) => {
|
|
529
|
-
|
|
548
|
+
p.value = { ...$ };
|
|
530
549
|
},
|
|
531
550
|
{ deep: !0, immediate: !0 }
|
|
532
551
|
);
|
|
533
|
-
function
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
|
|
552
|
+
function ae($, x) {
|
|
553
|
+
if (u.value) return;
|
|
554
|
+
const Z = { ...p.value, [$]: x };
|
|
555
|
+
p.value = Z, a("update:modelValue", Z);
|
|
537
556
|
}
|
|
538
|
-
function
|
|
557
|
+
function pe($) {
|
|
539
558
|
const x = $.searchProps ?? {};
|
|
540
559
|
return {
|
|
541
560
|
...x,
|
|
542
561
|
prop: $.prop,
|
|
543
562
|
label: $.searchLabel ?? $.label,
|
|
544
|
-
span:
|
|
563
|
+
span: Se($),
|
|
545
564
|
itemType: $.searchType ?? "input",
|
|
546
565
|
// 外部提供 `${prop}-search` 时交给插槽渲染,保持旧版 JtFilterBar 的自定义能力。
|
|
547
|
-
showSlot: !!
|
|
566
|
+
showSlot: !!v[`${$.prop}-search`],
|
|
548
567
|
options: x.options ?? $.searchOptions ?? $.dicData,
|
|
549
568
|
placeholder: x.placeholder ?? $.searchPlaceholder,
|
|
550
569
|
valueFormat: x.valueFormat ?? $.searchValueFormat,
|
|
551
|
-
disabled:
|
|
570
|
+
disabled: u.value || x.disabled === !0,
|
|
552
571
|
formItemProps: {
|
|
553
572
|
required: $.searchRequired,
|
|
554
573
|
class: ["jt-filter-bar__item", { "is-required": $.searchRequired }]
|
|
555
574
|
},
|
|
556
575
|
// 保留原来输入框回车触发查询的行为,同时不吞掉使用方在 searchProps 中传入的 onEnter。
|
|
557
|
-
onEnter: (...
|
|
558
|
-
|
|
576
|
+
onEnter: (...Z) => {
|
|
577
|
+
Ce(x.onEnter, ...Z), $e();
|
|
559
578
|
},
|
|
560
579
|
// JtFormItems 内部会修改 filterModel,这里继续按旧接口向外 emit update:modelValue。
|
|
561
|
-
"onUpdate:modelValue": (
|
|
562
|
-
|
|
580
|
+
"onUpdate:modelValue": (Z) => {
|
|
581
|
+
Ce(x["onUpdate:modelValue"], Z), ae($.prop, Z);
|
|
563
582
|
}
|
|
564
583
|
};
|
|
565
584
|
}
|
|
566
|
-
function
|
|
585
|
+
function Ce($, ...x) {
|
|
567
586
|
if (Array.isArray($)) {
|
|
568
|
-
$.forEach((
|
|
587
|
+
$.forEach((Z) => Ce(Z, ...x));
|
|
569
588
|
return;
|
|
570
589
|
}
|
|
571
590
|
typeof $ == "function" && $(...x);
|
|
572
591
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
592
|
+
async function $e() {
|
|
593
|
+
if (!u.value) {
|
|
594
|
+
if (l.value)
|
|
595
|
+
try {
|
|
596
|
+
await l.value.validate();
|
|
597
|
+
} catch {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
a("search");
|
|
601
|
+
}
|
|
575
602
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
603
|
+
function Me() {
|
|
604
|
+
u.value || a("reset");
|
|
578
605
|
}
|
|
579
|
-
function
|
|
580
|
-
|
|
606
|
+
function re() {
|
|
607
|
+
c.value = !c.value;
|
|
581
608
|
}
|
|
582
|
-
function
|
|
583
|
-
return Math.min(
|
|
609
|
+
function Se($) {
|
|
610
|
+
return Math.min(h.value, Math.max(1, $.searchSpan ?? 1));
|
|
584
611
|
}
|
|
585
|
-
function
|
|
586
|
-
return $.reduce((x,
|
|
612
|
+
function Ue($) {
|
|
613
|
+
return $.reduce((x, Z) => x + Se(Z), 0);
|
|
587
614
|
}
|
|
588
|
-
function
|
|
615
|
+
function _e($) {
|
|
589
616
|
return typeof $ == "number" ? `${$}px` : $;
|
|
590
617
|
}
|
|
591
|
-
function
|
|
618
|
+
function Be($, x) {
|
|
592
619
|
return typeof $ == "number" ? $ : x;
|
|
593
620
|
}
|
|
594
|
-
function
|
|
621
|
+
function Ve($) {
|
|
595
622
|
return typeof $ == "number" ? `${$}px` : $;
|
|
596
623
|
}
|
|
597
624
|
return e({
|
|
598
625
|
/** 内部 Element Plus Form 实例,保留给业务侧做校验、重置等原生表单操作。 */
|
|
599
|
-
formRef:
|
|
626
|
+
formRef: l,
|
|
600
627
|
/** 当前筛选表单禁用态。 */
|
|
601
|
-
searchDisabled:
|
|
628
|
+
searchDisabled: u,
|
|
602
629
|
/** 开启筛选表单禁用。 */
|
|
603
|
-
searchLoading:
|
|
630
|
+
searchLoading: b,
|
|
604
631
|
/** 关闭筛选表单禁用。 */
|
|
605
|
-
searchDone:
|
|
632
|
+
searchDone: B
|
|
606
633
|
}), ($, x) => {
|
|
607
|
-
const
|
|
608
|
-
return y(),
|
|
609
|
-
class:
|
|
610
|
-
style:
|
|
611
|
-
"--jt-filter-columns":
|
|
612
|
-
"--jt-filter-label-width":
|
|
634
|
+
const Z = $t;
|
|
635
|
+
return y(), P("div", {
|
|
636
|
+
class: Ke(["jt-filter-bar", `is-label-${g.value}`]),
|
|
637
|
+
style: ht({
|
|
638
|
+
"--jt-filter-columns": h.value,
|
|
639
|
+
"--jt-filter-label-width": d.value,
|
|
613
640
|
"--jt-filter-column-gap": `${w.value}px`,
|
|
614
|
-
"--jt-filter-row-gap": `${
|
|
641
|
+
"--jt-filter-row-gap": `${N.value}px`,
|
|
615
642
|
"--jt-filter-padding": k.value
|
|
616
643
|
})
|
|
617
644
|
}, [
|
|
618
|
-
|
|
645
|
+
le(Z, {
|
|
619
646
|
ref_key: "formRef",
|
|
620
|
-
ref:
|
|
647
|
+
ref: l,
|
|
621
648
|
class: "jt-filter-bar__form",
|
|
622
|
-
model:
|
|
623
|
-
"label-position":
|
|
624
|
-
"label-width":
|
|
625
|
-
disabled: q(
|
|
626
|
-
onSubmit: x[0] || (x[0] =
|
|
649
|
+
model: p.value,
|
|
650
|
+
"label-position": g.value,
|
|
651
|
+
"label-width": d.value,
|
|
652
|
+
disabled: q(u),
|
|
653
|
+
onSubmit: x[0] || (x[0] = an(() => {
|
|
627
654
|
}, ["prevent"]))
|
|
628
655
|
}, {
|
|
629
|
-
default:
|
|
630
|
-
|
|
631
|
-
configs:
|
|
632
|
-
"form-data":
|
|
633
|
-
},
|
|
634
|
-
actions:
|
|
635
|
-
J("div",
|
|
656
|
+
default: F(() => [
|
|
657
|
+
le(q(En), {
|
|
658
|
+
configs: O.value,
|
|
659
|
+
"form-data": p.value
|
|
660
|
+
}, we({
|
|
661
|
+
actions: F(() => [
|
|
662
|
+
J("div", Ln, [
|
|
636
663
|
j($.$slots, "search-menu", {
|
|
637
|
-
search:
|
|
638
|
-
reset:
|
|
639
|
-
disabled: q(
|
|
640
|
-
collapsed:
|
|
641
|
-
toggleCollapse:
|
|
664
|
+
search: $e,
|
|
665
|
+
reset: Me,
|
|
666
|
+
disabled: q(u),
|
|
667
|
+
collapsed: c.value,
|
|
668
|
+
toggleCollapse: re
|
|
642
669
|
}, () => [
|
|
643
|
-
|
|
670
|
+
I.value ? (y(), M(q(De), {
|
|
644
671
|
key: 0,
|
|
645
672
|
class: "jt-filter-bar__btn-collapse",
|
|
646
|
-
onClick:
|
|
673
|
+
onClick: re
|
|
647
674
|
}, {
|
|
648
|
-
icon:
|
|
675
|
+
icon: F(() => [
|
|
649
676
|
J("img", {
|
|
650
|
-
class:
|
|
651
|
-
src: q(
|
|
677
|
+
class: Ke(["jt-filter-bar__icon-arrow", { "is-collapsed": c.value }]),
|
|
678
|
+
src: q(Mn),
|
|
652
679
|
alt: ""
|
|
653
|
-
}, null, 10,
|
|
680
|
+
}, null, 10, Nn)
|
|
654
681
|
]),
|
|
655
|
-
default:
|
|
656
|
-
J("span", null, ee(
|
|
682
|
+
default: F(() => [
|
|
683
|
+
J("span", null, ee(c.value ? "展 开" : "收 起"), 1)
|
|
657
684
|
]),
|
|
658
685
|
_: 1
|
|
659
|
-
})) :
|
|
660
|
-
|
|
686
|
+
})) : Y("", !0),
|
|
687
|
+
le(q(De), {
|
|
661
688
|
class: "jt-filter-bar__btn-reset",
|
|
662
|
-
disabled: q(
|
|
663
|
-
onClick:
|
|
689
|
+
disabled: q(u),
|
|
690
|
+
onClick: Me
|
|
664
691
|
}, {
|
|
665
|
-
icon:
|
|
692
|
+
icon: F(() => [
|
|
666
693
|
J("img", {
|
|
667
|
-
src: q(
|
|
694
|
+
src: q(Vn),
|
|
668
695
|
alt: ""
|
|
669
|
-
}, null, 8,
|
|
696
|
+
}, null, 8, Rn)
|
|
670
697
|
]),
|
|
671
|
-
default:
|
|
672
|
-
J("span", null, ee(
|
|
698
|
+
default: F(() => [
|
|
699
|
+
J("span", null, ee(i.value.resetBtnText ?? "重 置"), 1)
|
|
673
700
|
]),
|
|
674
701
|
_: 1
|
|
675
702
|
}, 8, ["disabled"]),
|
|
676
|
-
|
|
703
|
+
le(q(De), {
|
|
677
704
|
class: "jt-filter-bar__btn-query",
|
|
678
705
|
type: "primary",
|
|
679
|
-
disabled: q(
|
|
680
|
-
onClick:
|
|
706
|
+
disabled: q(u),
|
|
707
|
+
onClick: $e
|
|
681
708
|
}, {
|
|
682
|
-
icon:
|
|
709
|
+
icon: F(() => [
|
|
683
710
|
J("img", {
|
|
684
|
-
src: q(
|
|
711
|
+
src: q(Pn),
|
|
685
712
|
alt: ""
|
|
686
|
-
}, null, 8,
|
|
713
|
+
}, null, 8, jn)
|
|
687
714
|
]),
|
|
688
|
-
default:
|
|
689
|
-
J("span", null, ee(
|
|
715
|
+
default: F(() => [
|
|
716
|
+
J("span", null, ee(i.value.searchBtnText ?? "查 询"), 1)
|
|
690
717
|
]),
|
|
691
718
|
_: 1
|
|
692
719
|
}, 8, ["disabled"])
|
|
@@ -695,16 +722,16 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
695
722
|
]),
|
|
696
723
|
_: 2
|
|
697
724
|
}, [
|
|
698
|
-
oe(
|
|
699
|
-
name:
|
|
700
|
-
fn:
|
|
701
|
-
j($.$slots, `${
|
|
702
|
-
value:
|
|
703
|
-
column:
|
|
704
|
-
setValue: (
|
|
705
|
-
search:
|
|
706
|
-
reset:
|
|
707
|
-
disabled: q(
|
|
725
|
+
oe(C.value, (Ie) => ({
|
|
726
|
+
name: Ie.prop,
|
|
727
|
+
fn: F(() => [
|
|
728
|
+
j($.$slots, `${Ie.prop}-search`, {
|
|
729
|
+
value: p.value[Ie.prop],
|
|
730
|
+
column: Ie,
|
|
731
|
+
setValue: (xe) => ae(Ie.prop, xe),
|
|
732
|
+
search: $e,
|
|
733
|
+
reset: Me,
|
|
734
|
+
disabled: q(u)
|
|
708
735
|
}, void 0, !0)
|
|
709
736
|
])
|
|
710
737
|
}))
|
|
@@ -715,7 +742,7 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
715
742
|
], 6);
|
|
716
743
|
};
|
|
717
744
|
}
|
|
718
|
-
}),
|
|
745
|
+
}), On = /* @__PURE__ */ X(zn, [["__scopeId", "data-v-29fbbb75"]]), Gn = { key: 1 }, An = { key: 2 }, Dn = { key: 3 }, Kn = /* @__PURE__ */ U({
|
|
719
746
|
name: "JtTable",
|
|
720
747
|
__name: "JtTable",
|
|
721
748
|
props: {
|
|
@@ -725,11 +752,11 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
725
752
|
tableEvents: {}
|
|
726
753
|
},
|
|
727
754
|
setup(t, { expose: e }) {
|
|
728
|
-
const n = t, o = ve(), a = ne(),
|
|
755
|
+
const n = t, o = ve(), a = ne(), l = _(() => n.option ?? {}), v = _(() => n.columns.filter((i) => !i.hide));
|
|
729
756
|
function p(i) {
|
|
730
757
|
return !!o[`${i}-header`];
|
|
731
758
|
}
|
|
732
|
-
function
|
|
759
|
+
function u(i) {
|
|
733
760
|
return !!o[`${i}-data`];
|
|
734
761
|
}
|
|
735
762
|
function b(i) {
|
|
@@ -743,77 +770,77 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
743
770
|
...i.columnOptions
|
|
744
771
|
};
|
|
745
772
|
}
|
|
746
|
-
function
|
|
747
|
-
return i.find((m) => m.value ===
|
|
773
|
+
function B(i, c) {
|
|
774
|
+
return i.find((m) => m.value === c)?.label ?? String(c ?? "");
|
|
748
775
|
}
|
|
749
|
-
return e({ tableRef: a }), (i,
|
|
750
|
-
const m =
|
|
751
|
-
return y(),
|
|
776
|
+
return e({ tableRef: a }), (i, c) => {
|
|
777
|
+
const m = Tt, h = Bt;
|
|
778
|
+
return y(), M(h, D({
|
|
752
779
|
ref_key: "tableRef",
|
|
753
780
|
ref: a,
|
|
754
781
|
data: i.data,
|
|
755
|
-
"row-key":
|
|
756
|
-
height:
|
|
757
|
-
"max-height":
|
|
758
|
-
"empty-text":
|
|
782
|
+
"row-key": l.value.rowKey ?? "id",
|
|
783
|
+
height: l.value.height,
|
|
784
|
+
"max-height": l.value.maxHeight,
|
|
785
|
+
"empty-text": l.value.emptyText,
|
|
759
786
|
class: "jt-table"
|
|
760
|
-
},
|
|
761
|
-
default:
|
|
762
|
-
|
|
787
|
+
}, l.value.tableProps, ke(i.tableEvents)), {
|
|
788
|
+
default: F(() => [
|
|
789
|
+
l.value.selection ? (y(), M(m, {
|
|
763
790
|
key: 0,
|
|
764
791
|
type: "selection",
|
|
765
792
|
width: "55",
|
|
766
793
|
align: "center"
|
|
767
|
-
})) :
|
|
768
|
-
|
|
794
|
+
})) : Y("", !0),
|
|
795
|
+
l.value.index ? (y(), M(m, {
|
|
769
796
|
key: 1,
|
|
770
797
|
type: "index",
|
|
771
|
-
label:
|
|
798
|
+
label: l.value.indexLabel ?? "序号",
|
|
772
799
|
width: "60",
|
|
773
800
|
align: "center"
|
|
774
|
-
}, null, 8, ["label"])) :
|
|
775
|
-
(y(!0),
|
|
776
|
-
key:
|
|
777
|
-
prop:
|
|
778
|
-
label:
|
|
779
|
-
formatter: !
|
|
801
|
+
}, null, 8, ["label"])) : Y("", !0),
|
|
802
|
+
(y(!0), P(de, null, oe(v.value, (S) => (y(), M(m, D({
|
|
803
|
+
key: S.prop,
|
|
804
|
+
prop: S.prop,
|
|
805
|
+
label: S.label,
|
|
806
|
+
formatter: !u(S.prop) && !S.dicData ? S.formatter : void 0,
|
|
780
807
|
ref_for: !0
|
|
781
|
-
}, b(
|
|
782
|
-
default:
|
|
783
|
-
|
|
808
|
+
}, b(S)), we({
|
|
809
|
+
default: F((V) => [
|
|
810
|
+
u(S.prop) ? j(i.$slots, `${S.prop}-data`, D({
|
|
784
811
|
key: 0,
|
|
785
812
|
ref_for: !0
|
|
786
|
-
},
|
|
813
|
+
}, V), void 0, !0) : S.dicData ? (y(), P("span", Gn, ee(B(S.dicData, V.row[S.prop])), 1)) : S.formatter ? (y(), P("span", An, ee(S.formatter(V.row, V.column, V.row[S.prop], V.$index)), 1)) : (y(), P("span", Dn, ee(V.row[S.prop]), 1))
|
|
787
814
|
]),
|
|
788
815
|
_: 2
|
|
789
816
|
}, [
|
|
790
|
-
p(
|
|
817
|
+
p(S.prop) ? {
|
|
791
818
|
name: "header",
|
|
792
|
-
fn:
|
|
793
|
-
j(i.$slots, `${
|
|
819
|
+
fn: F((V) => [
|
|
820
|
+
j(i.$slots, `${S.prop}-header`, D({ ref_for: !0 }, V), void 0, !0)
|
|
794
821
|
]),
|
|
795
822
|
key: "0"
|
|
796
823
|
} : void 0
|
|
797
824
|
]), 1040, ["prop", "label", "formatter"]))), 128)),
|
|
798
|
-
|
|
825
|
+
l.value.menu ? (y(), M(m, {
|
|
799
826
|
key: 2,
|
|
800
|
-
label:
|
|
801
|
-
width:
|
|
802
|
-
"min-width":
|
|
803
|
-
align:
|
|
804
|
-
fixed:
|
|
827
|
+
label: l.value.menuLabel ?? "操作",
|
|
828
|
+
width: l.value.menuWidth,
|
|
829
|
+
"min-width": l.value.menuMinWidth,
|
|
830
|
+
align: l.value.menuAlign ?? "center",
|
|
831
|
+
fixed: l.value.menuFixed
|
|
805
832
|
}, {
|
|
806
|
-
default:
|
|
807
|
-
j(i.$slots, "menu", ce(me(
|
|
833
|
+
default: F((S) => [
|
|
834
|
+
j(i.$slots, "menu", ce(me(S)), void 0, !0)
|
|
808
835
|
]),
|
|
809
836
|
_: 3
|
|
810
|
-
}, 8, ["label", "width", "min-width", "align", "fixed"])) :
|
|
837
|
+
}, 8, ["label", "width", "min-width", "align", "fixed"])) : Y("", !0)
|
|
811
838
|
]),
|
|
812
839
|
_: 3
|
|
813
840
|
}, 16, ["data", "row-key", "height", "max-height", "empty-text"]);
|
|
814
841
|
};
|
|
815
842
|
}
|
|
816
|
-
}),
|
|
843
|
+
}), qn = /* @__PURE__ */ X(Kn, [["__scopeId", "data-v-4804a967"]]), Jn = { class: "jt-pagination" }, Un = { class: "jt-pagination__count" }, xn = /* @__PURE__ */ U({
|
|
817
844
|
name: "JtPagination",
|
|
818
845
|
__name: "JtPagination",
|
|
819
846
|
props: {
|
|
@@ -824,14 +851,14 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
824
851
|
},
|
|
825
852
|
emits: ["update:currentPage", "update:pageSize", "current-change", "page-change", "size-change"],
|
|
826
853
|
setup(t, { emit: e }) {
|
|
827
|
-
const n = t, o =
|
|
828
|
-
function
|
|
854
|
+
const n = t, o = _(() => n.option ?? {}), a = e;
|
|
855
|
+
function l(v) {
|
|
829
856
|
a("current-change", v), a("page-change", v);
|
|
830
857
|
}
|
|
831
858
|
return (v, p) => {
|
|
832
|
-
const
|
|
833
|
-
return y(),
|
|
834
|
-
|
|
859
|
+
const u = Et;
|
|
860
|
+
return y(), P("div", Jn, [
|
|
861
|
+
le(u, {
|
|
835
862
|
"current-page": v.currentPage,
|
|
836
863
|
"page-size": v.pageSize,
|
|
837
864
|
"page-sizes": o.value.pageSizes ?? [10, 20, 50, 100],
|
|
@@ -839,20 +866,20 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
839
866
|
layout: o.value.paginationLayout ?? "sizes, prev, pager, next, jumper",
|
|
840
867
|
"onUpdate:currentPage": p[0] || (p[0] = (b) => v.$emit("update:currentPage", b)),
|
|
841
868
|
"onUpdate:pageSize": p[1] || (p[1] = (b) => v.$emit("update:pageSize", b)),
|
|
842
|
-
onCurrentChange:
|
|
869
|
+
onCurrentChange: l,
|
|
843
870
|
onSizeChange: p[2] || (p[2] = (b) => v.$emit("size-change", b))
|
|
844
871
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"]),
|
|
845
|
-
J("span",
|
|
872
|
+
J("span", Un, "共" + ee(v.total) + "条记录", 1)
|
|
846
873
|
]);
|
|
847
874
|
};
|
|
848
875
|
}
|
|
849
|
-
}),
|
|
876
|
+
}), Hn = /* @__PURE__ */ X(xn, [["__scopeId", "data-v-19ef6db6"]]), Wn = { class: "jt-crud-table" }, Yn = {
|
|
850
877
|
key: 1,
|
|
851
878
|
class: "jt-crud-table__toolbar"
|
|
852
|
-
},
|
|
879
|
+
}, Zn = /* @__PURE__ */ U({
|
|
853
880
|
name: "JtCrudTable",
|
|
854
881
|
__name: "JtCrudTable",
|
|
855
|
-
props: /* @__PURE__ */
|
|
882
|
+
props: /* @__PURE__ */ qe({
|
|
856
883
|
columns: {},
|
|
857
884
|
option: { default: () => ({}) },
|
|
858
885
|
data: {},
|
|
@@ -866,119 +893,119 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
866
893
|
searchModel: { default: () => ({}) },
|
|
867
894
|
searchModelModifiers: {}
|
|
868
895
|
}),
|
|
869
|
-
emits: /* @__PURE__ */
|
|
896
|
+
emits: /* @__PURE__ */ qe(["search", "reset", "page-change", "size-change"], ["update:currentPage", "update:pageSize", "update:searchModel"]),
|
|
870
897
|
setup(t, { expose: e, emit: n }) {
|
|
871
|
-
const o = t, a = n,
|
|
872
|
-
() => o.columns.filter((
|
|
873
|
-
),
|
|
874
|
-
() => o.columns.filter((
|
|
875
|
-
),
|
|
876
|
-
() => o.columns.filter((
|
|
898
|
+
const o = t, a = n, l = Ne(t, "currentPage"), v = Ne(t, "pageSize"), p = Ne(t, "searchModel"), u = ve(), b = ne(), B = ne(), i = _(() => o.option), c = _(() => i.value.searchShow !== !1), m = _(() => i.value.paginationShow !== !1), h = _(
|
|
899
|
+
() => o.columns.filter((k) => k.search && !!u[`${k.prop}-search`])
|
|
900
|
+
), S = _(
|
|
901
|
+
() => o.columns.filter((k) => !k.hide && !!u[`${k.prop}-header`])
|
|
902
|
+
), V = _(
|
|
903
|
+
() => o.columns.filter((k) => !k.hide && !!u[`${k.prop}-data`])
|
|
877
904
|
);
|
|
878
|
-
function
|
|
879
|
-
const
|
|
880
|
-
return o.columns.forEach((
|
|
881
|
-
|
|
882
|
-
}),
|
|
905
|
+
function G() {
|
|
906
|
+
const k = {};
|
|
907
|
+
return o.columns.forEach((I) => {
|
|
908
|
+
I.search && (k[I.prop] = void 0);
|
|
909
|
+
}), k;
|
|
883
910
|
}
|
|
884
|
-
function
|
|
911
|
+
function d() {
|
|
885
912
|
a("search", { ...p.value });
|
|
886
913
|
}
|
|
887
|
-
function
|
|
888
|
-
p.value =
|
|
914
|
+
function g() {
|
|
915
|
+
p.value = G(), a("reset");
|
|
889
916
|
}
|
|
890
|
-
function
|
|
891
|
-
|
|
917
|
+
function w() {
|
|
918
|
+
B.value?.searchLoading();
|
|
892
919
|
}
|
|
893
|
-
function
|
|
894
|
-
|
|
920
|
+
function N() {
|
|
921
|
+
B.value?.searchDone();
|
|
895
922
|
}
|
|
896
923
|
return e({
|
|
897
924
|
/** 获取内部 el-table 实例 */
|
|
898
|
-
tableRef:
|
|
925
|
+
tableRef: _(() => b.value?.tableRef),
|
|
899
926
|
/** 获取内部筛选条实例 */
|
|
900
|
-
filterBarRef:
|
|
927
|
+
filterBarRef: B,
|
|
901
928
|
/** 开启筛选表单禁用。 */
|
|
902
|
-
searchLoading:
|
|
929
|
+
searchLoading: w,
|
|
903
930
|
/** 关闭筛选表单禁用。 */
|
|
904
|
-
searchDone:
|
|
905
|
-
}), (
|
|
906
|
-
const
|
|
907
|
-
return y(),
|
|
908
|
-
j(
|
|
909
|
-
|
|
931
|
+
searchDone: N
|
|
932
|
+
}), (k, I) => {
|
|
933
|
+
const L = ln("loading");
|
|
934
|
+
return y(), P("div", Wn, [
|
|
935
|
+
j(k.$slots, "header", {}, void 0, !0),
|
|
936
|
+
c.value ? (y(), M(On, {
|
|
910
937
|
key: 0,
|
|
911
938
|
ref_key: "filterBarRef",
|
|
912
|
-
ref:
|
|
939
|
+
ref: B,
|
|
913
940
|
modelValue: p.value,
|
|
914
|
-
"onUpdate:modelValue":
|
|
915
|
-
columns:
|
|
941
|
+
"onUpdate:modelValue": I[0] || (I[0] = (C) => p.value = C),
|
|
942
|
+
columns: k.columns,
|
|
916
943
|
option: i.value,
|
|
917
|
-
onSearch:
|
|
918
|
-
onReset:
|
|
919
|
-
},
|
|
920
|
-
oe(
|
|
921
|
-
name: `${
|
|
922
|
-
fn:
|
|
923
|
-
j(
|
|
944
|
+
onSearch: d,
|
|
945
|
+
onReset: g
|
|
946
|
+
}, we({ _: 2 }, [
|
|
947
|
+
oe(h.value, (C) => ({
|
|
948
|
+
name: `${C.prop}-search`,
|
|
949
|
+
fn: F((O) => [
|
|
950
|
+
j(k.$slots, `${C.prop}-search`, ce(me(O)), void 0, !0)
|
|
924
951
|
])
|
|
925
952
|
}))
|
|
926
|
-
]), 1032, ["modelValue", "columns", "option"])) :
|
|
927
|
-
q(
|
|
928
|
-
j(
|
|
929
|
-
])) :
|
|
930
|
-
|
|
953
|
+
]), 1032, ["modelValue", "columns", "option"])) : Y("", !0),
|
|
954
|
+
q(u).toolbar ? (y(), P("div", Yn, [
|
|
955
|
+
j(k.$slots, "toolbar", {}, void 0, !0)
|
|
956
|
+
])) : Y("", !0),
|
|
957
|
+
rn((y(), M(qn, {
|
|
931
958
|
ref_key: "jtTableRef",
|
|
932
959
|
ref: b,
|
|
933
|
-
data:
|
|
934
|
-
columns:
|
|
960
|
+
data: k.data,
|
|
961
|
+
columns: k.columns,
|
|
935
962
|
option: i.value,
|
|
936
|
-
"table-events":
|
|
937
|
-
},
|
|
938
|
-
oe(
|
|
939
|
-
name: `${
|
|
940
|
-
fn:
|
|
941
|
-
j(
|
|
963
|
+
"table-events": k.tableEvents
|
|
964
|
+
}, we({ _: 2 }, [
|
|
965
|
+
oe(S.value, (C) => ({
|
|
966
|
+
name: `${C.prop}-header`,
|
|
967
|
+
fn: F((O) => [
|
|
968
|
+
j(k.$slots, `${C.prop}-header`, ce(me(O)), void 0, !0)
|
|
942
969
|
])
|
|
943
970
|
})),
|
|
944
|
-
oe(
|
|
945
|
-
name: `${
|
|
946
|
-
fn:
|
|
947
|
-
j(
|
|
971
|
+
oe(V.value, (C) => ({
|
|
972
|
+
name: `${C.prop}-data`,
|
|
973
|
+
fn: F((O) => [
|
|
974
|
+
j(k.$slots, `${C.prop}-data`, ce(me(O)), void 0, !0)
|
|
948
975
|
])
|
|
949
976
|
})),
|
|
950
977
|
i.value.menu ? {
|
|
951
978
|
name: "menu",
|
|
952
|
-
fn:
|
|
953
|
-
j(
|
|
979
|
+
fn: F((C) => [
|
|
980
|
+
j(k.$slots, "menu", ce(me(C)), void 0, !0)
|
|
954
981
|
]),
|
|
955
982
|
key: "0"
|
|
956
983
|
} : void 0
|
|
957
984
|
]), 1032, ["data", "columns", "option", "table-events"])), [
|
|
958
|
-
[
|
|
985
|
+
[L, i.value.loading]
|
|
959
986
|
]),
|
|
960
|
-
m.value ? (y(),
|
|
987
|
+
m.value ? (y(), M(Hn, {
|
|
961
988
|
key: 2,
|
|
962
|
-
"current-page":
|
|
963
|
-
"onUpdate:currentPage":
|
|
989
|
+
"current-page": l.value,
|
|
990
|
+
"onUpdate:currentPage": I[1] || (I[1] = (C) => l.value = C),
|
|
964
991
|
"page-size": v.value,
|
|
965
|
-
"onUpdate:pageSize":
|
|
966
|
-
total:
|
|
992
|
+
"onUpdate:pageSize": I[2] || (I[2] = (C) => v.value = C),
|
|
993
|
+
total: k.total,
|
|
967
994
|
option: i.value,
|
|
968
|
-
onPageChange:
|
|
969
|
-
onSizeChange:
|
|
970
|
-
}, null, 8, ["current-page", "page-size", "total", "option"])) :
|
|
995
|
+
onPageChange: I[3] || (I[3] = (C) => k.$emit("page-change", C)),
|
|
996
|
+
onSizeChange: I[4] || (I[4] = (C) => k.$emit("size-change", C))
|
|
997
|
+
}, null, 8, ["current-page", "page-size", "total", "option"])) : Y("", !0)
|
|
971
998
|
]);
|
|
972
999
|
};
|
|
973
1000
|
}
|
|
974
|
-
}),
|
|
1001
|
+
}), xa = /* @__PURE__ */ X(Zn, [["__scopeId", "data-v-6df082c6"]]), Qn = { class: "jt-pagination" }, Xn = {
|
|
975
1002
|
key: 0,
|
|
976
1003
|
class: "jt-pagination__count"
|
|
977
|
-
},
|
|
1004
|
+
}, eo = /* @__PURE__ */ U({
|
|
978
1005
|
name: "JtPagination",
|
|
979
1006
|
inheritAttrs: !1,
|
|
980
1007
|
__name: "index",
|
|
981
|
-
props: /* @__PURE__ */
|
|
1008
|
+
props: /* @__PURE__ */ qe({
|
|
982
1009
|
defaultPageSize: {},
|
|
983
1010
|
total: { default: 0 },
|
|
984
1011
|
pageCount: {},
|
|
@@ -1005,34 +1032,34 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
1005
1032
|
pageSize: { default: 20 },
|
|
1006
1033
|
pageSizeModifiers: {}
|
|
1007
1034
|
}),
|
|
1008
|
-
emits: /* @__PURE__ */
|
|
1035
|
+
emits: /* @__PURE__ */ qe(st, ["update:currentPage", "update:pageSize"]),
|
|
1009
1036
|
setup(t, { emit: e }) {
|
|
1010
|
-
const n =
|
|
1011
|
-
...
|
|
1037
|
+
const n = Ne(t, "currentPage"), o = Ne(t, "pageSize"), a = t, l = gt(), v = e, p = _(() => ({
|
|
1038
|
+
...l,
|
|
1012
1039
|
...a
|
|
1013
|
-
})),
|
|
1014
|
-
Object.keys(
|
|
1015
|
-
|
|
1016
|
-
(...i) => v(
|
|
1040
|
+
})), u = _(() => Object.fromEntries(
|
|
1041
|
+
Object.keys(st).filter((B) => !B.startsWith("update:")).map((B) => [
|
|
1042
|
+
B,
|
|
1043
|
+
(...i) => v(B, ...i)
|
|
1017
1044
|
])
|
|
1018
|
-
)), b =
|
|
1019
|
-
return (
|
|
1020
|
-
const
|
|
1021
|
-
return y(),
|
|
1022
|
-
|
|
1045
|
+
)), b = _(() => !(a.hideOnSinglePage && a.total <= o.value));
|
|
1046
|
+
return (B, i) => {
|
|
1047
|
+
const c = Et;
|
|
1048
|
+
return y(), P("div", Qn, [
|
|
1049
|
+
le(c, D({
|
|
1023
1050
|
"current-page": n.value,
|
|
1024
1051
|
"onUpdate:currentPage": i[0] || (i[0] = (m) => n.value = m),
|
|
1025
1052
|
"page-size": o.value,
|
|
1026
1053
|
"onUpdate:pageSize": i[1] || (i[1] = (m) => o.value = m)
|
|
1027
|
-
}, p.value,
|
|
1028
|
-
b.value ? (y(),
|
|
1054
|
+
}, p.value, ke(u.value)), null, 16, ["current-page", "page-size"]),
|
|
1055
|
+
b.value ? (y(), P("span", Xn, "共" + ee(B.total) + "条记录", 1)) : Y("", !0)
|
|
1029
1056
|
]);
|
|
1030
1057
|
};
|
|
1031
1058
|
}
|
|
1032
|
-
}),
|
|
1059
|
+
}), Ha = /* @__PURE__ */ X(eo, [["__scopeId", "data-v-72da666d"]]), to = { class: "jt-page-header__title" }, no = { key: 0 }, oo = {
|
|
1033
1060
|
key: 0,
|
|
1034
1061
|
class: "jt-page-header__operates"
|
|
1035
|
-
},
|
|
1062
|
+
}, ao = /* @__PURE__ */ U({
|
|
1036
1063
|
name: "JtPageHeader",
|
|
1037
1064
|
__name: "index",
|
|
1038
1065
|
props: {
|
|
@@ -1042,21 +1069,21 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
1042
1069
|
},
|
|
1043
1070
|
emits: ["operate-click"],
|
|
1044
1071
|
setup(t, { emit: e }) {
|
|
1045
|
-
const n = t, o = e, a = ve(),
|
|
1046
|
-
function v(p,
|
|
1047
|
-
p.onClick?.(p,
|
|
1072
|
+
const n = t, o = e, a = ve(), l = _(() => n.operates.length > 0 || !!a.operates);
|
|
1073
|
+
function v(p, u) {
|
|
1074
|
+
p.onClick?.(p, u), o("operate-click", p, u);
|
|
1048
1075
|
}
|
|
1049
|
-
return (p,
|
|
1076
|
+
return (p, u) => (y(), P("div", D({
|
|
1050
1077
|
class: ["jt-page-header", `jt-page-header--${p.type}`]
|
|
1051
1078
|
}, p.$attrs), [
|
|
1052
|
-
J("div",
|
|
1079
|
+
J("div", to, [
|
|
1053
1080
|
j(p.$slots, "title", {}, () => [
|
|
1054
|
-
p.title ? (y(),
|
|
1081
|
+
p.title ? (y(), P("span", no, ee(p.title), 1)) : Y("", !0)
|
|
1055
1082
|
], !0)
|
|
1056
1083
|
]),
|
|
1057
|
-
|
|
1084
|
+
l.value ? (y(), P("div", oo, [
|
|
1058
1085
|
j(p.$slots, "operates", { operates: p.operates }, () => [
|
|
1059
|
-
(y(!0),
|
|
1086
|
+
(y(!0), P(de, null, oe(p.operates, (b) => (y(), M(q(De), D({
|
|
1060
1087
|
key: b.key ?? b.label,
|
|
1061
1088
|
ref_for: !0
|
|
1062
1089
|
}, b.buttonProps, {
|
|
@@ -1067,19 +1094,19 @@ const Mn = { class: "jt-filter-bar__btns" }, Fn = ["src"], Vn = ["src"], Pn = ["
|
|
|
1067
1094
|
text: b.text,
|
|
1068
1095
|
link: b.link,
|
|
1069
1096
|
icon: b.icon,
|
|
1070
|
-
onClick: (
|
|
1097
|
+
onClick: (B) => v(b, B)
|
|
1071
1098
|
}), {
|
|
1072
|
-
default:
|
|
1099
|
+
default: F(() => [
|
|
1073
1100
|
J("span", null, ee(b.label), 1)
|
|
1074
1101
|
]),
|
|
1075
1102
|
_: 2
|
|
1076
1103
|
}, 1040, ["type", "disabled", "loading", "plain", "text", "link", "icon", "onClick"]))), 128))
|
|
1077
1104
|
], !0)
|
|
1078
|
-
])) :
|
|
1105
|
+
])) : Y("", !0)
|
|
1079
1106
|
], 16));
|
|
1080
1107
|
}
|
|
1081
|
-
}),
|
|
1082
|
-
function
|
|
1108
|
+
}), Wa = /* @__PURE__ */ X(ao, [["__scopeId", "data-v-0a93ea2c"]]);
|
|
1109
|
+
function lo(t = null) {
|
|
1083
1110
|
return {
|
|
1084
1111
|
scheme: null,
|
|
1085
1112
|
node: null,
|
|
@@ -1092,39 +1119,39 @@ function to(t = null) {
|
|
|
1092
1119
|
raw: t
|
|
1093
1120
|
};
|
|
1094
1121
|
}
|
|
1095
|
-
function
|
|
1096
|
-
const e =
|
|
1122
|
+
function it(t) {
|
|
1123
|
+
const e = zt(t), n = jt(e), o = yo(e).flatMap((a) => Rt(a, n));
|
|
1097
1124
|
return {
|
|
1098
|
-
...
|
|
1125
|
+
...lo(t),
|
|
1099
1126
|
scheme: n,
|
|
1100
1127
|
topNodes: o,
|
|
1101
1128
|
treeNodes: o
|
|
1102
1129
|
};
|
|
1103
1130
|
}
|
|
1104
|
-
function
|
|
1131
|
+
function Pt(t, e, n) {
|
|
1105
1132
|
return t.map((o) => o.key === e || o.tagId === e || o.id === e ? { ...o, children: n, loaded: !0 } : {
|
|
1106
1133
|
...o,
|
|
1107
|
-
children:
|
|
1134
|
+
children: Pt(o.children, e, n)
|
|
1108
1135
|
});
|
|
1109
1136
|
}
|
|
1110
|
-
function
|
|
1111
|
-
const o =
|
|
1137
|
+
function ro(t, e = {}, n = null) {
|
|
1138
|
+
const o = zt(t), a = jt(o, e), l = uo(o, e, n), v = Object.fromEntries(l.map((p) => [p.key, p]));
|
|
1112
1139
|
return {
|
|
1113
1140
|
scheme: a,
|
|
1114
1141
|
node: n,
|
|
1115
1142
|
topNodes: [],
|
|
1116
1143
|
treeNodes: [],
|
|
1117
1144
|
activeNode: n,
|
|
1118
|
-
activeSection:
|
|
1119
|
-
sections:
|
|
1145
|
+
activeSection: l[0] ?? null,
|
|
1146
|
+
sections: l,
|
|
1120
1147
|
sectionMap: v,
|
|
1121
1148
|
raw: t
|
|
1122
1149
|
};
|
|
1123
1150
|
}
|
|
1124
|
-
function
|
|
1151
|
+
function so(t) {
|
|
1125
1152
|
return t.multRow || t.htmlDisplay === "T" ? "table" : "form";
|
|
1126
1153
|
}
|
|
1127
|
-
function
|
|
1154
|
+
function io(t, e = {}) {
|
|
1128
1155
|
return {
|
|
1129
1156
|
...e,
|
|
1130
1157
|
infSchmId: e.infSchmId ?? H(t.raw.infSchmId),
|
|
@@ -1132,82 +1159,82 @@ function ao(t, e = {}) {
|
|
|
1132
1159
|
tagId: e.tagId ?? t.requestTagId ?? t.tagId,
|
|
1133
1160
|
infSetId: e.infSetId ?? t.infSetId,
|
|
1134
1161
|
setId: e.setId ?? t.setId,
|
|
1135
|
-
infSetFields: t.renderType === "table" ? t.rows.map(
|
|
1162
|
+
infSetFields: t.renderType === "table" ? t.rows.map(Qe) : [Qe(t.model)],
|
|
1136
1163
|
section: t
|
|
1137
1164
|
};
|
|
1138
1165
|
}
|
|
1139
|
-
function
|
|
1166
|
+
function Ya(t) {
|
|
1140
1167
|
const e = t;
|
|
1141
1168
|
return !!(e && typeof e == "object" && typeof e.key == "string" && typeof e.tagId == "string");
|
|
1142
1169
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const e =
|
|
1145
|
-
return (Array.isArray(e) ? e :
|
|
1170
|
+
function Lt(t) {
|
|
1171
|
+
const e = Ot(t);
|
|
1172
|
+
return (Array.isArray(e) ? e : ze(Q(e), ["options", "list", "records", "data"])).map((o) => {
|
|
1146
1173
|
const a = Q(o);
|
|
1147
1174
|
return {
|
|
1148
1175
|
id: a.id,
|
|
1149
1176
|
code: a.code,
|
|
1150
|
-
label:
|
|
1177
|
+
label: R(a.label ?? a.name ?? a.descr ?? a.text ?? a.value ?? a.code),
|
|
1151
1178
|
name: H(a.name),
|
|
1152
1179
|
value: a.value ?? a.code ?? a.id ?? a.label ?? a.name,
|
|
1153
1180
|
raw: o
|
|
1154
1181
|
};
|
|
1155
1182
|
});
|
|
1156
1183
|
}
|
|
1157
|
-
function
|
|
1158
|
-
const o =
|
|
1159
|
-
return o.length > 0 ? o.map((a) =>
|
|
1184
|
+
function uo(t, e, n) {
|
|
1185
|
+
const o = ze(t, ["sections", "sets", "list"]);
|
|
1186
|
+
return o.length > 0 ? o.map((a) => ut(a, e, n, o.length === 1)) : t.infSetMark || t.infSetFields || t.fields ? [ut(t, e, n, !0)] : [];
|
|
1160
1187
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const a = Q(t),
|
|
1163
|
-
key:
|
|
1164
|
-
id:
|
|
1165
|
-
setId:
|
|
1166
|
-
code:
|
|
1167
|
-
tagId:
|
|
1188
|
+
function ut(t, e, n, o) {
|
|
1189
|
+
const a = Q(t), l = co(a.infSetMark ?? a), v = po(a.infSetFields ?? a.fields ?? []), p = mo(a.infSetValues ?? a.rows ?? a.data, v), u = p[0] ? Qe(p[0]) : Nt(v), b = Q(a.tag), B = R(a.tagId ?? a.infTagId ?? b.tagId), i = R(e.tagId ?? n?.tagId), c = R(n?.key), m = o ? e.infSetId ?? n?.infSetId : void 0, h = o ? e.setId : void 0, S = o ? n?.code : void 0, V = l.setId || R(a.setId), G = R(a.infSetId) || V || R(m), d = V || R(h ?? G), g = l.code || R(a.code ?? S ?? d), w = d || g || G || B, N = {
|
|
1190
|
+
key: w,
|
|
1191
|
+
id: w,
|
|
1192
|
+
setId: d,
|
|
1193
|
+
code: g,
|
|
1194
|
+
tagId: B,
|
|
1168
1195
|
requestTagId: i || void 0,
|
|
1169
|
-
ownerNodeKey:
|
|
1170
|
-
infSetId:
|
|
1171
|
-
title:
|
|
1172
|
-
renderType:
|
|
1173
|
-
mark:
|
|
1196
|
+
ownerNodeKey: c || void 0,
|
|
1197
|
+
infSetId: G,
|
|
1198
|
+
title: l.name || R(a.name ?? n?.tagName ?? w),
|
|
1199
|
+
renderType: so(l),
|
|
1200
|
+
mark: l,
|
|
1174
1201
|
fields: v,
|
|
1175
|
-
model:
|
|
1202
|
+
model: u,
|
|
1176
1203
|
rows: p,
|
|
1177
|
-
operationInfo:
|
|
1204
|
+
operationInfo: Je(e.operationInfo ?? a.operationInfo),
|
|
1178
1205
|
raw: a
|
|
1179
1206
|
};
|
|
1180
|
-
return
|
|
1207
|
+
return N.renderType === "form" && p.length === 0 && (N.rows = [{ ...u, __rowKey: `${w}-0` }]), N;
|
|
1181
1208
|
}
|
|
1182
|
-
function
|
|
1183
|
-
const e = Q(t), n =
|
|
1209
|
+
function co(t) {
|
|
1210
|
+
const e = Q(t), n = R(e.htmlDisplay || "F");
|
|
1184
1211
|
return {
|
|
1185
|
-
name:
|
|
1212
|
+
name: R(e.name ?? e.title),
|
|
1186
1213
|
parentName: H(e.parentName),
|
|
1187
1214
|
value: H(e.value),
|
|
1188
1215
|
type: H(e.type),
|
|
1189
|
-
code:
|
|
1190
|
-
setId:
|
|
1216
|
+
code: R(e.code),
|
|
1217
|
+
setId: R(e.setId ?? e.id ?? e.key),
|
|
1191
1218
|
htmlDisplay: n,
|
|
1192
1219
|
multRow: ue(e.multRow),
|
|
1193
1220
|
isRequired: ue(e.isRequired),
|
|
1194
1221
|
raw: e
|
|
1195
1222
|
};
|
|
1196
1223
|
}
|
|
1197
|
-
function
|
|
1198
|
-
return (Array.isArray(t) ? t : []).map((n, o) =>
|
|
1224
|
+
function po(t) {
|
|
1225
|
+
return (Array.isArray(t) ? t : []).map((n, o) => fo(n, o));
|
|
1199
1226
|
}
|
|
1200
|
-
function
|
|
1201
|
-
const n = Q(t), o =
|
|
1227
|
+
function fo(t, e) {
|
|
1228
|
+
const n = Q(t), o = R(n.code ?? n.fieldCode ?? n.prop ?? n.key ?? `field_${e}`), a = R(n.label ?? n.name ?? n.tagName ?? o);
|
|
1202
1229
|
return {
|
|
1203
|
-
id:
|
|
1204
|
-
key:
|
|
1230
|
+
id: R(n.id ?? n.key ?? n.prop ?? o),
|
|
1231
|
+
key: R(n.key ?? n.prop ?? o),
|
|
1205
1232
|
code: o,
|
|
1206
1233
|
label: a,
|
|
1207
1234
|
value: n.value ?? n.defaultValue ?? "",
|
|
1208
|
-
type:
|
|
1235
|
+
type: So(n),
|
|
1209
1236
|
fieldType: H(n.fieldType),
|
|
1210
|
-
renderType:
|
|
1237
|
+
renderType: bo(n),
|
|
1211
1238
|
required: ue(n.required ?? n.isRequired),
|
|
1212
1239
|
readonly: ue(n.readonly ?? n.disabled),
|
|
1213
1240
|
visible: n.visible === void 0 ? ue(n.visibled ?? !0) : ue(n.visible),
|
|
@@ -1215,124 +1242,124 @@ function io(t, e) {
|
|
|
1215
1242
|
multRow: ue(n.multRow),
|
|
1216
1243
|
isRequired: ue(n.isRequired),
|
|
1217
1244
|
disabled: n.disabled === void 0 ? void 0 : ue(n.disabled),
|
|
1218
|
-
span:
|
|
1219
|
-
width:
|
|
1220
|
-
minWidth:
|
|
1245
|
+
span: Dt(n.span ?? n.colSpan),
|
|
1246
|
+
width: dt(n.width),
|
|
1247
|
+
minWidth: dt(n.minWidth),
|
|
1221
1248
|
placeholder: H(n.placeholder),
|
|
1222
|
-
options:
|
|
1223
|
-
interface:
|
|
1224
|
-
cascadeClearFields:
|
|
1225
|
-
cascadeDependFields:
|
|
1226
|
-
props:
|
|
1227
|
-
formItemProps:
|
|
1249
|
+
options: Lt(n.options),
|
|
1250
|
+
interface: Gt(n.interface),
|
|
1251
|
+
cascadeClearFields: ct(n.cascadeClearFields),
|
|
1252
|
+
cascadeDependFields: ct(n.cascadeDependFields),
|
|
1253
|
+
props: Xe(n.props),
|
|
1254
|
+
formItemProps: Xe(n.formItemProps),
|
|
1228
1255
|
raw: n
|
|
1229
1256
|
};
|
|
1230
1257
|
}
|
|
1231
|
-
function
|
|
1258
|
+
function mo(t, e) {
|
|
1232
1259
|
if (Array.isArray(t) && t.some((a) => {
|
|
1233
|
-
const
|
|
1234
|
-
return e.some((v) =>
|
|
1260
|
+
const l = Q(a);
|
|
1261
|
+
return e.some((v) => l[v.code] !== void 0 || l[v.key] !== void 0);
|
|
1235
1262
|
}))
|
|
1236
|
-
return t.map((a,
|
|
1263
|
+
return t.map((a, l) => ({ ...Q(a), __rowKey: R(Q(a).__rowKey ?? Q(a).key ?? l) }));
|
|
1237
1264
|
const n = Nt(e);
|
|
1238
1265
|
return Object.keys(n).length ? [{ ...n, __rowKey: "0" }] : [];
|
|
1239
1266
|
}
|
|
1240
1267
|
function Nt(t) {
|
|
1241
1268
|
return t.reduce((e, n) => (e[n.code || n.key] = n.value, e), {});
|
|
1242
1269
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const o = Q(t), a =
|
|
1245
|
-
return a.length === 0 &&
|
|
1270
|
+
function Rt(t, e, n = "") {
|
|
1271
|
+
const o = Q(t), a = ze(o, ["children", "list", "tags"]).flatMap((v) => Rt(v, e, R(o.tagId ?? o.id ?? o.key))), l = ho(o.infSetList);
|
|
1272
|
+
return a.length === 0 && l.length > 0 ? l.map((v, p) => go(o, v, e, n, p)) : [vo(o, e, n, a)];
|
|
1246
1273
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const a =
|
|
1274
|
+
function vo(t, e, n, o) {
|
|
1275
|
+
const a = R(t.tagId ?? t.id ?? t.key), l = R(t.tagName ?? t.name ?? t.label ?? a);
|
|
1249
1276
|
return {
|
|
1250
|
-
key:
|
|
1277
|
+
key: R(t.key ?? a),
|
|
1251
1278
|
id: a,
|
|
1252
1279
|
tagId: a,
|
|
1253
|
-
tagName:
|
|
1254
|
-
label:
|
|
1280
|
+
tagName: l,
|
|
1281
|
+
label: l,
|
|
1255
1282
|
tagLevel: H(t.tagLevel ?? t.level) ?? null,
|
|
1256
|
-
level:
|
|
1283
|
+
level: At(t.tagLevel ?? t.level),
|
|
1257
1284
|
parentTagId: H(t.parentTagId ?? t.parentId ?? n),
|
|
1258
1285
|
parentId: H(t.parentTagId ?? t.parentId ?? n) ?? null,
|
|
1259
1286
|
infSchmId: H(t.infSchmId ?? e?.infSchmId),
|
|
1260
|
-
schemeId:
|
|
1287
|
+
schemeId: R(t.infSchmId ?? e?.infSchmId),
|
|
1261
1288
|
infSetId: H(t.infSetId ?? t.setId),
|
|
1262
1289
|
setId: H(t.setId),
|
|
1263
1290
|
code: H(t.code),
|
|
1264
1291
|
children: o,
|
|
1265
1292
|
infSetList: [],
|
|
1266
|
-
operationInfo:
|
|
1293
|
+
operationInfo: Je(t.operationInfo),
|
|
1267
1294
|
loaded: o.length > 0,
|
|
1268
1295
|
raw: t
|
|
1269
1296
|
};
|
|
1270
1297
|
}
|
|
1271
|
-
function
|
|
1272
|
-
const
|
|
1298
|
+
function go(t, e, n, o, a) {
|
|
1299
|
+
const l = R(t.tagId ?? t.id ?? t.key), v = R(t.tagName ?? t.name ?? t.label ?? l), p = e.infSetId || R(e.setId), u = e.setId || p, b = p || `${l}-${a}`;
|
|
1273
1300
|
return {
|
|
1274
1301
|
key: b,
|
|
1275
1302
|
id: b,
|
|
1276
|
-
tagId:
|
|
1303
|
+
tagId: l,
|
|
1277
1304
|
tagName: v,
|
|
1278
1305
|
label: v,
|
|
1279
1306
|
tagLevel: H(t.tagLevel ?? t.level) ?? null,
|
|
1280
|
-
level:
|
|
1307
|
+
level: At(t.tagLevel ?? t.level),
|
|
1281
1308
|
parentTagId: H(t.parentTagId ?? t.parentId ?? o),
|
|
1282
1309
|
parentId: H(t.parentTagId ?? t.parentId ?? o) ?? null,
|
|
1283
1310
|
infSchmId: H(t.infSchmId ?? n?.infSchmId),
|
|
1284
|
-
schemeId:
|
|
1311
|
+
schemeId: R(t.infSchmId ?? n?.infSchmId),
|
|
1285
1312
|
infSetId: p,
|
|
1286
|
-
setId:
|
|
1313
|
+
setId: u,
|
|
1287
1314
|
code: H(t.code ?? p),
|
|
1288
1315
|
children: [],
|
|
1289
1316
|
infSetList: [e],
|
|
1290
|
-
operationInfo:
|
|
1317
|
+
operationInfo: Je(t.operationInfo),
|
|
1291
1318
|
loaded: !0,
|
|
1292
1319
|
raw: {
|
|
1293
1320
|
...t,
|
|
1294
1321
|
infSetId: p,
|
|
1295
|
-
setId:
|
|
1322
|
+
setId: u,
|
|
1296
1323
|
infSetList: [e.raw]
|
|
1297
1324
|
}
|
|
1298
1325
|
};
|
|
1299
1326
|
}
|
|
1300
|
-
function
|
|
1301
|
-
const n = Q(t.globalInfoSchmMark ?? t.scheme ?? t), o =
|
|
1327
|
+
function jt(t, e = {}) {
|
|
1328
|
+
const n = Q(t.globalInfoSchmMark ?? t.scheme ?? t), o = R(n.infSchmId ?? e.infSchmId), a = R(n.emplid ?? e.emplid);
|
|
1302
1329
|
return !o && !a && Object.keys(n).length === 0 ? null : {
|
|
1303
1330
|
infSchmId: o,
|
|
1304
1331
|
emplid: a,
|
|
1305
1332
|
id: o,
|
|
1306
|
-
mark:
|
|
1307
|
-
config: Array.isArray(t.globalInfoSchmConfig) ? "" :
|
|
1333
|
+
mark: R(n.globalInfoSchmMark ?? t.globalInfoSchmMark),
|
|
1334
|
+
config: Array.isArray(t.globalInfoSchmConfig) ? "" : R(n.globalInfoSchmConfig ?? t.globalInfoSchmConfig),
|
|
1308
1335
|
raw: n
|
|
1309
1336
|
};
|
|
1310
1337
|
}
|
|
1311
|
-
function
|
|
1338
|
+
function yo(t) {
|
|
1312
1339
|
if (Array.isArray(t.globalInfoSchmConfig))
|
|
1313
1340
|
return t.globalInfoSchmConfig;
|
|
1314
|
-
const e = Q(t.globalInfoSchmConfig), n =
|
|
1315
|
-
return n.length ? n :
|
|
1341
|
+
const e = Q(t.globalInfoSchmConfig), n = ze(e, ["children", "tree", "list", "tags"]);
|
|
1342
|
+
return n.length ? n : ze(t, ["children", "tree", "list", "tags", "records"]);
|
|
1316
1343
|
}
|
|
1317
|
-
function
|
|
1344
|
+
function ho(t) {
|
|
1318
1345
|
return Array.isArray(t) ? t.map((e) => {
|
|
1319
1346
|
const n = Q(e);
|
|
1320
1347
|
return {
|
|
1321
|
-
infSetId:
|
|
1348
|
+
infSetId: R(n.infSetId ?? n.setId ?? n.id),
|
|
1322
1349
|
setId: H(n.setId),
|
|
1323
|
-
operationInfo:
|
|
1350
|
+
operationInfo: Je(n.operationInfo),
|
|
1324
1351
|
raw: n
|
|
1325
1352
|
};
|
|
1326
1353
|
}) : [];
|
|
1327
1354
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return Q(
|
|
1355
|
+
function zt(t) {
|
|
1356
|
+
return Q(Ot(t));
|
|
1330
1357
|
}
|
|
1331
|
-
function
|
|
1358
|
+
function Ot(t) {
|
|
1332
1359
|
const e = Q(t);
|
|
1333
1360
|
return e.data ?? e.result ?? t;
|
|
1334
1361
|
}
|
|
1335
|
-
function
|
|
1362
|
+
function ze(t, e) {
|
|
1336
1363
|
for (const n of e) {
|
|
1337
1364
|
const o = t[n];
|
|
1338
1365
|
if (Array.isArray(o))
|
|
@@ -1340,64 +1367,64 @@ function Ne(t, e) {
|
|
|
1340
1367
|
}
|
|
1341
1368
|
return [];
|
|
1342
1369
|
}
|
|
1343
|
-
function
|
|
1370
|
+
function Qe(t) {
|
|
1344
1371
|
const e = { ...t };
|
|
1345
1372
|
return delete e.__rowKey, delete e.fields, e;
|
|
1346
1373
|
}
|
|
1347
|
-
function
|
|
1374
|
+
function Gt(t) {
|
|
1348
1375
|
const e = Q(t);
|
|
1349
1376
|
if (!(!e.method && !e.url && !e.params))
|
|
1350
1377
|
return {
|
|
1351
1378
|
...e,
|
|
1352
1379
|
method: H(e.method),
|
|
1353
1380
|
url: H(e.url),
|
|
1354
|
-
params:
|
|
1381
|
+
params: Xe(e.params)
|
|
1355
1382
|
};
|
|
1356
1383
|
}
|
|
1357
|
-
function
|
|
1384
|
+
function Je(t) {
|
|
1358
1385
|
const e = Q(t);
|
|
1359
1386
|
if (Object.keys(e).length !== 0)
|
|
1360
1387
|
return Object.fromEntries(
|
|
1361
|
-
Object.entries(e).map(([n, o]) => [n,
|
|
1388
|
+
Object.entries(e).map(([n, o]) => [n, Gt(o) ?? o])
|
|
1362
1389
|
);
|
|
1363
1390
|
}
|
|
1364
|
-
function
|
|
1391
|
+
function ct(t) {
|
|
1365
1392
|
if (!Array.isArray(t))
|
|
1366
1393
|
return;
|
|
1367
|
-
const e = t.map((n) =>
|
|
1394
|
+
const e = t.map((n) => R(n)).filter(Boolean);
|
|
1368
1395
|
return e.length ? e : void 0;
|
|
1369
1396
|
}
|
|
1370
|
-
function
|
|
1397
|
+
function bo(t) {
|
|
1371
1398
|
if (ue(t.htmlDisplay)) return "html";
|
|
1372
1399
|
if (ue(t.multRow)) return "multi-row";
|
|
1373
|
-
const e =
|
|
1400
|
+
const e = R(t.renderType).toLowerCase();
|
|
1374
1401
|
return e === "code" || e === "empty" ? e : "text";
|
|
1375
1402
|
}
|
|
1376
|
-
function
|
|
1377
|
-
const e =
|
|
1403
|
+
function So(t) {
|
|
1404
|
+
const e = R(t.fieldType ?? t.type ?? t.renderType).toLowerCase();
|
|
1378
1405
|
return e.includes("date") ? "date" : e.includes("select") || e.includes("enum") ? "select" : e.includes("number") || e.includes("int") ? "number" : e.includes("bool") || e.includes("switch") ? "switch" : e.includes("file") || e.includes("upload") || e.includes("attachment") ? "file" : e.includes("textarea") || e.includes("text_area") ? "textarea" : "text";
|
|
1379
1406
|
}
|
|
1380
|
-
function
|
|
1407
|
+
function Xe(t) {
|
|
1381
1408
|
const e = Q(t);
|
|
1382
1409
|
return Object.keys(e).length ? e : void 0;
|
|
1383
1410
|
}
|
|
1384
|
-
function
|
|
1411
|
+
function dt(t) {
|
|
1385
1412
|
return typeof t == "string" || typeof t == "number" ? t : void 0;
|
|
1386
1413
|
}
|
|
1387
1414
|
function Q(t) {
|
|
1388
1415
|
return t && typeof t == "object" && !Array.isArray(t) ? t : {};
|
|
1389
1416
|
}
|
|
1390
|
-
function
|
|
1417
|
+
function R(t) {
|
|
1391
1418
|
return t == null ? "" : String(t).trim();
|
|
1392
1419
|
}
|
|
1393
1420
|
function H(t) {
|
|
1394
|
-
return
|
|
1421
|
+
return R(t) || void 0;
|
|
1395
1422
|
}
|
|
1396
|
-
function
|
|
1397
|
-
const e =
|
|
1423
|
+
function At(t) {
|
|
1424
|
+
const e = Dt(t);
|
|
1398
1425
|
return e === void 0 ? null : e;
|
|
1399
1426
|
}
|
|
1400
|
-
function
|
|
1427
|
+
function Dt(t) {
|
|
1401
1428
|
if (t == null || t === "") return;
|
|
1402
1429
|
const e = Number(t);
|
|
1403
1430
|
return Number.isFinite(e) ? e : void 0;
|
|
@@ -1405,10 +1432,10 @@ function Kt(t) {
|
|
|
1405
1432
|
function ue(t) {
|
|
1406
1433
|
return typeof t == "string" ? ["true", "1", "y", "yes", "t", "是"].includes(t.toLowerCase()) : !!t;
|
|
1407
1434
|
}
|
|
1408
|
-
const
|
|
1409
|
-
const e =
|
|
1435
|
+
const be = (t) => t.key || t.code, ie = (t) => t.key || t.setId, Te = (t) => new Error(`[GlobalInfo] ${t}`), Ee = (t) => t && typeof t == "object" && !Array.isArray(t) ? t : {}, Ae = (t) => {
|
|
1436
|
+
const e = Ee(t);
|
|
1410
1437
|
return !!(e.url || e.method || e.params);
|
|
1411
|
-
},
|
|
1438
|
+
}, _o = (t) => String(t ?? "").trim(), Oe = (t) => Array.from(new Set(t.map(_o).filter(Boolean))), Re = (t) => Oe([
|
|
1412
1439
|
t?.key,
|
|
1413
1440
|
t?.id,
|
|
1414
1441
|
t?.setId,
|
|
@@ -1417,14 +1444,14 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1417
1444
|
t?.code,
|
|
1418
1445
|
...(t?.infSetList ?? []).map((e) => e.infSetId),
|
|
1419
1446
|
...(t?.infSetList ?? []).map((e) => e.setId)
|
|
1420
|
-
]),
|
|
1447
|
+
]), Io = (t) => Oe([
|
|
1421
1448
|
t.key,
|
|
1422
1449
|
t.id,
|
|
1423
1450
|
t.setId,
|
|
1424
1451
|
t.infSetId,
|
|
1425
1452
|
t.tagId,
|
|
1426
1453
|
t.code
|
|
1427
|
-
]),
|
|
1454
|
+
]), Pe = (t = {}) => ({
|
|
1428
1455
|
// loading:当前 section 是否正在拉详情。
|
|
1429
1456
|
loading: !1,
|
|
1430
1457
|
// saving:当前 section 是否正在保存。
|
|
@@ -1437,16 +1464,16 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1437
1464
|
editing: !1,
|
|
1438
1465
|
// status 覆盖默认值,用于局部状态补丁。
|
|
1439
1466
|
...t
|
|
1440
|
-
}),
|
|
1441
|
-
const o =
|
|
1442
|
-
return a.length === 0 ? !1 : a.some((
|
|
1443
|
-
},
|
|
1444
|
-
const e = ne(!1), n = ne(!1), o = ne(!1), a =
|
|
1467
|
+
}), Le = (t) => !!(t && typeof t == "object" && "children" in t), Kt = (t, e, n) => {
|
|
1468
|
+
const o = Io(t), a = Oe([n, ...Re(e)]);
|
|
1469
|
+
return a.length === 0 ? !1 : a.some((l) => o.includes(l));
|
|
1470
|
+
}, wo = (t, e, n) => Oe([n, ...Re(e)]).length === 0 ? t : t.filter((a) => Kt(a, e, n)), ko = (t) => {
|
|
1471
|
+
const e = ne(!1), n = ne(!1), o = ne(!1), a = he(null), l = he([]), v = he(null), p = he(null), u = he(null), b = he({}), B = he({}), i = ne([]), c = he({}), m = ne([]), h = _(
|
|
1445
1472
|
() => {
|
|
1446
|
-
const
|
|
1447
|
-
return [...
|
|
1473
|
+
const s = i.value.map((f) => b.value[f]).filter((f) => !!f), r = Object.entries(b.value).filter(([f]) => !i.value.includes(f)).map(([, f]) => f);
|
|
1474
|
+
return [...s, ...r];
|
|
1448
1475
|
}
|
|
1449
|
-
),
|
|
1476
|
+
), S = _(() => ({
|
|
1450
1477
|
// 整棵树是否正在加载。
|
|
1451
1478
|
loading: e.value,
|
|
1452
1479
|
// 当前详情是否正在加载。
|
|
@@ -1459,154 +1486,154 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1459
1486
|
sectionMap: b.value,
|
|
1460
1487
|
// section 状态映射;这里把 alias 后的编辑态也同步进去。
|
|
1461
1488
|
sectionStatusMap: Object.fromEntries(
|
|
1462
|
-
Object.entries(
|
|
1463
|
-
|
|
1489
|
+
Object.entries(c.value).map(([s, r]) => [
|
|
1490
|
+
s,
|
|
1464
1491
|
{
|
|
1465
1492
|
// 保留原状态字段。
|
|
1466
|
-
...
|
|
1493
|
+
...r,
|
|
1467
1494
|
// 编辑态以 editingSectionKeys 为准,避免状态对象里 editing 值残留。
|
|
1468
1495
|
editing: m.value.includes(
|
|
1469
|
-
|
|
1496
|
+
B.value[s] ?? s
|
|
1470
1497
|
)
|
|
1471
1498
|
}
|
|
1472
1499
|
])
|
|
1473
1500
|
),
|
|
1474
1501
|
// 最近一次全局错误。
|
|
1475
1502
|
error: a.value
|
|
1476
|
-
})),
|
|
1503
|
+
})), V = () => ({
|
|
1477
1504
|
// adaptScene 透传给新接口形态。
|
|
1478
1505
|
adaptScene: t.adaptScene,
|
|
1479
1506
|
// emplid 是当前人员标识,树和详情接口都需要它。
|
|
1480
1507
|
emplid: t.emplid
|
|
1481
|
-
}),
|
|
1508
|
+
}), G = (s) => ({
|
|
1482
1509
|
// 复用基础参数,保证人员和场景一致。
|
|
1483
|
-
...
|
|
1510
|
+
...V(),
|
|
1484
1511
|
// infSchmId 指定当前模板方案。
|
|
1485
|
-
infSchmId:
|
|
1512
|
+
infSchmId: s.infSchmId,
|
|
1486
1513
|
// tagId 指定要展开的树节点。
|
|
1487
|
-
tagId:
|
|
1514
|
+
tagId: s.tagId,
|
|
1488
1515
|
// tagLevel 告诉后端当前节点层级。
|
|
1489
|
-
tagLevel:
|
|
1516
|
+
tagLevel: s.tagLevel,
|
|
1490
1517
|
// parentTagId 保留父子关系上下文。
|
|
1491
|
-
parentTagId:
|
|
1492
|
-
}),
|
|
1518
|
+
parentTagId: s.parentTagId
|
|
1519
|
+
}), d = (s = p.value, r = u.value) => ({
|
|
1493
1520
|
// 详情接口同样需要基础人员和场景参数。
|
|
1494
|
-
...
|
|
1521
|
+
...V(),
|
|
1495
1522
|
// 当前节点所属模板方案。
|
|
1496
|
-
infSchmId:
|
|
1523
|
+
infSchmId: s?.infSchmId,
|
|
1497
1524
|
// 当前点击或加载的树节点 id。
|
|
1498
|
-
tagId:
|
|
1525
|
+
tagId: s?.tagId,
|
|
1499
1526
|
// 保存或刷新指定 section 时优先使用 section 自己的信息集 id。
|
|
1500
|
-
infSetId:
|
|
1527
|
+
infSetId: r?.infSetId ?? s?.infSetId,
|
|
1501
1528
|
// setId 同样优先取 section,避免保存时拿错节点 setId。
|
|
1502
|
-
setId:
|
|
1503
|
-
}),
|
|
1529
|
+
setId: r?.setId ?? s?.setId
|
|
1530
|
+
}), g = async (s, r) => {
|
|
1504
1531
|
if (!t.service.requestOperation)
|
|
1505
|
-
throw
|
|
1506
|
-
return t.service.requestOperation(
|
|
1507
|
-
},
|
|
1508
|
-
const T =
|
|
1532
|
+
throw Te("service.requestOperation is required for operationInfo");
|
|
1533
|
+
return t.service.requestOperation(s, r);
|
|
1534
|
+
}, w = (s, r = {}, f) => {
|
|
1535
|
+
const T = Ee(s.params), E = f?.cascadeDependFields ?? [];
|
|
1509
1536
|
let A = 0;
|
|
1510
1537
|
return Object.fromEntries(
|
|
1511
|
-
Object.entries(T).map(([
|
|
1538
|
+
Object.entries(T).map(([z, K]) => {
|
|
1512
1539
|
if (K !== "")
|
|
1513
|
-
return [
|
|
1514
|
-
if (
|
|
1515
|
-
return [
|
|
1516
|
-
const
|
|
1517
|
-
return A += 1, [
|
|
1540
|
+
return [z, K];
|
|
1541
|
+
if (r[z] !== void 0)
|
|
1542
|
+
return [z, r[z]];
|
|
1543
|
+
const W = E[A];
|
|
1544
|
+
return A += 1, [z, W ? r[W] ?? "" : K];
|
|
1518
1545
|
})
|
|
1519
1546
|
);
|
|
1520
|
-
},
|
|
1521
|
-
const f =
|
|
1522
|
-
return
|
|
1523
|
-
},
|
|
1524
|
-
const T =
|
|
1525
|
-
if (
|
|
1547
|
+
}, N = (s) => {
|
|
1548
|
+
const f = Ee(s.operationInfo).openTag;
|
|
1549
|
+
return Ae(f) ? f : void 0;
|
|
1550
|
+
}, k = (s, r, f) => {
|
|
1551
|
+
const T = Ee(s?.operationInfo).queryInfoSet;
|
|
1552
|
+
if (Ae(T))
|
|
1526
1553
|
return T;
|
|
1527
|
-
const E =
|
|
1528
|
-
return
|
|
1529
|
-
},
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1532
|
-
},
|
|
1533
|
-
if (!
|
|
1534
|
-
return
|
|
1535
|
-
for (const f of
|
|
1536
|
-
if (
|
|
1554
|
+
const E = r?.infSetList.find((z) => z.infSetId === f), A = Ee(E?.operationInfo).queryInfoSet;
|
|
1555
|
+
return Ae(A) ? A : void 0;
|
|
1556
|
+
}, I = (s) => {
|
|
1557
|
+
const r = Ee(s.operationInfo).editInfoSet;
|
|
1558
|
+
return Ae(r) ? r : void 0;
|
|
1559
|
+
}, L = (s, r) => {
|
|
1560
|
+
if (!r)
|
|
1561
|
+
return s[0] ?? null;
|
|
1562
|
+
for (const f of s) {
|
|
1563
|
+
if (Re(f).includes(r))
|
|
1537
1564
|
return f;
|
|
1538
|
-
const T =
|
|
1565
|
+
const T = L(f.children, r);
|
|
1539
1566
|
if (T)
|
|
1540
1567
|
return T;
|
|
1541
1568
|
}
|
|
1542
1569
|
return null;
|
|
1543
|
-
},
|
|
1544
|
-
if (
|
|
1545
|
-
return typeof
|
|
1546
|
-
},
|
|
1547
|
-
const
|
|
1548
|
-
if (!
|
|
1570
|
+
}, C = (s = u.value) => {
|
|
1571
|
+
if (s)
|
|
1572
|
+
return typeof s == "string" ? s : Le(s) ? pe(s) : ie(s);
|
|
1573
|
+
}, O = (s = u.value) => {
|
|
1574
|
+
const r = C(s);
|
|
1575
|
+
if (!r)
|
|
1549
1576
|
return null;
|
|
1550
|
-
const f =
|
|
1577
|
+
const f = B.value[r] ?? r;
|
|
1551
1578
|
return b.value[f] ?? null;
|
|
1552
|
-
}, ae = (
|
|
1553
|
-
const
|
|
1554
|
-
if (l)
|
|
1555
|
-
return C.value[l] ?? l;
|
|
1556
|
-
}, pe = (r = c.value) => {
|
|
1579
|
+
}, ae = (s = u.value) => {
|
|
1580
|
+
const r = C(s);
|
|
1557
1581
|
if (r)
|
|
1558
|
-
return
|
|
1559
|
-
},
|
|
1560
|
-
if (
|
|
1561
|
-
return
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1582
|
+
return B.value[r] ?? r;
|
|
1583
|
+
}, pe = (s = u.value) => {
|
|
1584
|
+
if (s)
|
|
1585
|
+
return typeof s == "string" ? s : Le(s) ? s.setId ?? s.infSetId ?? s.key : ie(s);
|
|
1586
|
+
}, Ce = (s = u.value) => {
|
|
1587
|
+
if (Le(s))
|
|
1588
|
+
return s;
|
|
1589
|
+
if (typeof s == "string") {
|
|
1590
|
+
const r = L(l.value, s);
|
|
1591
|
+
if (r)
|
|
1592
|
+
return r;
|
|
1593
|
+
const f = O(s);
|
|
1594
|
+
return f?.ownerNodeKey ? L(l.value, f.ownerNodeKey) ?? p.value : f || p.value && Re(p.value).includes(s) ? p.value : null;
|
|
1595
|
+
}
|
|
1596
|
+
return s?.ownerNodeKey ? L(l.value, s.ownerNodeKey) ?? p.value : p.value;
|
|
1597
|
+
}, $e = (s = u.value) => !s || Le(s) ? null : O(s), Me = (s = u.value) => {
|
|
1598
|
+
const r = pe(s);
|
|
1599
|
+
if (!r)
|
|
1600
|
+
return Pe();
|
|
1601
|
+
const f = B.value[r] ?? r;
|
|
1602
|
+
return Pe({
|
|
1603
|
+
...c.value[r],
|
|
1604
|
+
...c.value[f],
|
|
1578
1605
|
// 编辑态始终从 editingSectionKeys 计算,避免状态对象过期。
|
|
1579
1606
|
editing: m.value.includes(
|
|
1580
1607
|
f
|
|
1581
1608
|
)
|
|
1582
1609
|
});
|
|
1583
|
-
},
|
|
1584
|
-
const f = pe(
|
|
1585
|
-
f && (
|
|
1586
|
-
...
|
|
1587
|
-
[f]:
|
|
1610
|
+
}, re = (s, r) => {
|
|
1611
|
+
const f = pe(s);
|
|
1612
|
+
f && (c.value = {
|
|
1613
|
+
...c.value,
|
|
1614
|
+
[f]: Pe({
|
|
1588
1615
|
// 保留已有状态。
|
|
1589
|
-
...
|
|
1616
|
+
...c.value[f],
|
|
1590
1617
|
// 合并本次状态补丁。
|
|
1591
|
-
...
|
|
1618
|
+
...r,
|
|
1592
1619
|
// 编辑态仍以 editingSectionKeys 为准。
|
|
1593
1620
|
editing: m.value.includes(f)
|
|
1594
1621
|
})
|
|
1595
1622
|
});
|
|
1596
|
-
},
|
|
1597
|
-
const f =
|
|
1598
|
-
(E) => ie(E) === ie(
|
|
1599
|
-
) ?
|
|
1623
|
+
}, Se = (s = v.value?.raw ?? null, r = p.value) => {
|
|
1624
|
+
const f = h.value, T = u.value && f.find(
|
|
1625
|
+
(E) => ie(E) === ie(u.value)
|
|
1626
|
+
) ? u.value : null;
|
|
1600
1627
|
v.value = {
|
|
1601
1628
|
// 保留原 scheme。
|
|
1602
1629
|
scheme: v.value?.scheme ?? null,
|
|
1603
1630
|
// 当前节点。
|
|
1604
|
-
node:
|
|
1631
|
+
node: r,
|
|
1605
1632
|
// 顶层节点和树节点都来自 nodes。
|
|
1606
|
-
topNodes:
|
|
1607
|
-
treeNodes:
|
|
1633
|
+
topNodes: l.value,
|
|
1634
|
+
treeNodes: l.value,
|
|
1608
1635
|
// 当前激活节点。
|
|
1609
|
-
activeNode:
|
|
1636
|
+
activeNode: r,
|
|
1610
1637
|
// 当前激活 section。
|
|
1611
1638
|
activeSection: T,
|
|
1612
1639
|
// 当前所有已加载 section。
|
|
@@ -1614,161 +1641,161 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1614
1641
|
// 当前 section 缓存。
|
|
1615
1642
|
sectionMap: b.value,
|
|
1616
1643
|
// 保留原始接口数据。
|
|
1617
|
-
raw:
|
|
1618
|
-
},
|
|
1619
|
-
},
|
|
1620
|
-
const T = { ...b.value }, E = { ...
|
|
1621
|
-
return K.forEach((
|
|
1622
|
-
const ge = ie(
|
|
1623
|
-
T[ge] =
|
|
1624
|
-
...
|
|
1644
|
+
raw: s
|
|
1645
|
+
}, u.value = T;
|
|
1646
|
+
}, Ue = (s, r = p.value, f) => {
|
|
1647
|
+
const T = { ...b.value }, E = { ...B.value }, A = [...i.value], z = { ...c.value }, K = wo(s.sections, r, f), W = Oe([f, ...Re(r)]).length > 0, te = K.find((ye) => Kt(ye, r, f)) ?? (W ? null : s.activeSection ?? K[0] ?? u.value ?? null);
|
|
1648
|
+
return K.forEach((ye) => {
|
|
1649
|
+
const ge = ie(ye);
|
|
1650
|
+
T[ge] = ye, A.includes(ge) || A.push(ge), z[ge] = Pe({
|
|
1651
|
+
...z[ge],
|
|
1625
1652
|
loaded: !0,
|
|
1626
1653
|
loading: !1,
|
|
1627
1654
|
error: null,
|
|
1628
1655
|
editing: m.value.includes(ge)
|
|
1629
1656
|
});
|
|
1630
|
-
}), f && te ? E[f] = ie(te) : f && (E[f] = ""), f && (
|
|
1631
|
-
...
|
|
1657
|
+
}), f && te ? E[f] = ie(te) : f && (E[f] = ""), f && (z[f] = Pe({
|
|
1658
|
+
...z[f],
|
|
1632
1659
|
loaded: !0,
|
|
1633
1660
|
loading: !1,
|
|
1634
1661
|
error: null,
|
|
1635
1662
|
editing: !!(te && m.value.includes(ie(te)))
|
|
1636
|
-
})), b.value = T,
|
|
1637
|
-
...
|
|
1638
|
-
scheme:
|
|
1639
|
-
topNodes:
|
|
1640
|
-
treeNodes:
|
|
1641
|
-
activeNode:
|
|
1663
|
+
})), b.value = T, B.value = E, i.value = A, c.value = z, v.value = {
|
|
1664
|
+
...s,
|
|
1665
|
+
scheme: s.scheme ?? v.value?.scheme ?? null,
|
|
1666
|
+
topNodes: l.value,
|
|
1667
|
+
treeNodes: l.value,
|
|
1668
|
+
activeNode: r,
|
|
1642
1669
|
activeSection: te,
|
|
1643
1670
|
sections: K,
|
|
1644
1671
|
sectionMap: b.value
|
|
1645
|
-
},
|
|
1646
|
-
},
|
|
1647
|
-
const f = ae(
|
|
1672
|
+
}, u.value = te, te;
|
|
1673
|
+
}, _e = (s, r) => {
|
|
1674
|
+
const f = ae(s), T = f ? b.value[f] : null;
|
|
1648
1675
|
if (!f || !T)
|
|
1649
1676
|
return;
|
|
1650
|
-
const E =
|
|
1677
|
+
const E = r(T);
|
|
1651
1678
|
b.value = {
|
|
1652
1679
|
...b.value,
|
|
1653
1680
|
[f]: E
|
|
1654
|
-
},
|
|
1655
|
-
},
|
|
1656
|
-
const
|
|
1681
|
+
}, u.value = ie(u.value ?? E) === f ? E : u.value, Se();
|
|
1682
|
+
}, Be = async (s = u.value ?? p.value) => {
|
|
1683
|
+
const r = $e(s), f = Ce(s) ?? p.value, T = pe(s);
|
|
1657
1684
|
if (!f)
|
|
1658
1685
|
return null;
|
|
1659
1686
|
if (!t.service.requestOperation)
|
|
1660
|
-
throw
|
|
1661
|
-
n.value = !0, a.value = null,
|
|
1687
|
+
throw Te("service.requestOperation is required");
|
|
1688
|
+
n.value = !0, a.value = null, re(T ?? f, { loading: !0, error: null });
|
|
1662
1689
|
try {
|
|
1663
|
-
const E =
|
|
1690
|
+
const E = r ? [{ infSetId: r.infSetId, setId: r.setId, operationInfo: r.operationInfo, raw: r.raw }] : f.infSetList;
|
|
1664
1691
|
if (E.length === 0)
|
|
1665
|
-
throw
|
|
1692
|
+
throw Te("node.infSetList is required");
|
|
1666
1693
|
const A = await Promise.all(E.map(async (K) => {
|
|
1667
|
-
const
|
|
1668
|
-
...
|
|
1694
|
+
const W = k(r, f, K.infSetId), te = {
|
|
1695
|
+
...d(f, r),
|
|
1669
1696
|
infSetId: K.infSetId,
|
|
1670
1697
|
setId: K.setId,
|
|
1671
1698
|
operationInfo: K.operationInfo
|
|
1672
1699
|
};
|
|
1673
|
-
if (
|
|
1674
|
-
const
|
|
1700
|
+
if (W) {
|
|
1701
|
+
const ye = await g(W, {
|
|
1675
1702
|
type: "queryInfoSet",
|
|
1676
1703
|
node: f,
|
|
1677
|
-
section:
|
|
1704
|
+
section: r,
|
|
1678
1705
|
params: te
|
|
1679
1706
|
});
|
|
1680
|
-
return
|
|
1707
|
+
return ro(ye, te, f);
|
|
1681
1708
|
}
|
|
1682
|
-
throw
|
|
1683
|
-
})),
|
|
1709
|
+
throw Te("infoSet.operationInfo.queryInfoSet is required");
|
|
1710
|
+
})), z = {
|
|
1684
1711
|
...A[0],
|
|
1685
1712
|
sections: A.flatMap((K) => K.sections),
|
|
1686
1713
|
sectionMap: Object.fromEntries(A.flatMap((K) => K.sections).map((K) => [K.key, K]))
|
|
1687
1714
|
};
|
|
1688
|
-
return
|
|
1715
|
+
return Ue(z, f, T);
|
|
1689
1716
|
} catch (E) {
|
|
1690
|
-
throw a.value = E,
|
|
1717
|
+
throw a.value = E, re(T ?? f, { loading: !1, error: E }), E;
|
|
1691
1718
|
} finally {
|
|
1692
|
-
n.value = !1,
|
|
1719
|
+
n.value = !1, re(T ?? f, { loading: !1 });
|
|
1693
1720
|
}
|
|
1694
|
-
},
|
|
1695
|
-
if (!
|
|
1721
|
+
}, Ve = (s = u.value) => Be(s), $ = (s = u.value) => {
|
|
1722
|
+
if (!s)
|
|
1696
1723
|
return null;
|
|
1697
|
-
if (!
|
|
1698
|
-
return
|
|
1699
|
-
const
|
|
1700
|
-
return
|
|
1701
|
-
},
|
|
1702
|
-
const
|
|
1703
|
-
if (!l)
|
|
1704
|
-
return r.children;
|
|
1705
|
-
const f = B(r), T = await _(l, { type: "openTag", node: r, params: f });
|
|
1706
|
-
return ut(T).treeNodes;
|
|
1707
|
-
}, $ = async (r) => {
|
|
1708
|
-
if (r.loaded)
|
|
1709
|
-
return r.children;
|
|
1710
|
-
const l = await Ae(r);
|
|
1711
|
-
return l.length > 0 && (s.value = Lt(s.value, r.key, l)), l;
|
|
1712
|
-
}, x = async (r) => {
|
|
1713
|
-
const l = typeof r == "string" ? R(s.value, r) : r;
|
|
1714
|
-
return l ? (p.value = l, c.value = null, m.value = [], await $(l), ye(v.value?.raw, l), l) : null;
|
|
1715
|
-
}, W = async () => {
|
|
1716
|
-
const r = t.service.templateTree;
|
|
1724
|
+
if (!Le(s) && typeof s != "string")
|
|
1725
|
+
return O(s);
|
|
1726
|
+
const r = pe(s);
|
|
1727
|
+
return r ? b.value[B.value[r] ?? r] ?? null : null;
|
|
1728
|
+
}, x = async (s = p.value) => s ? (await Be(s), v.value) : (v.value = null, u.value = null, b.value = {}, B.value = {}, i.value = [], c.value = {}, null), Z = async (s) => {
|
|
1729
|
+
const r = N(s);
|
|
1717
1730
|
if (!r)
|
|
1718
|
-
|
|
1731
|
+
return s.children;
|
|
1732
|
+
const f = G(s), T = await g(r, { type: "openTag", node: s, params: f });
|
|
1733
|
+
return it(T).treeNodes;
|
|
1734
|
+
}, Ie = async (s) => {
|
|
1735
|
+
if (s.loaded)
|
|
1736
|
+
return s.children;
|
|
1737
|
+
const r = await Z(s);
|
|
1738
|
+
return r.length > 0 && (l.value = Pt(l.value, s.key, r)), r;
|
|
1739
|
+
}, xe = async (s) => {
|
|
1740
|
+
const r = typeof s == "string" ? L(l.value, s) : s;
|
|
1741
|
+
return r ? (p.value = r, u.value = null, m.value = [], await Ie(r), Se(v.value?.raw, r), r) : null;
|
|
1742
|
+
}, He = async () => {
|
|
1743
|
+
const s = t.service.templateTree;
|
|
1744
|
+
if (!s)
|
|
1745
|
+
throw Te("service.templateTree is required");
|
|
1719
1746
|
e.value = !0, a.value = null;
|
|
1720
1747
|
try {
|
|
1721
|
-
const
|
|
1748
|
+
const r = await s(V()), f = it(r), T = await Promise.all(
|
|
1722
1749
|
f.treeNodes.map(async (A) => {
|
|
1723
|
-
const
|
|
1750
|
+
const z = await Z(A);
|
|
1724
1751
|
return {
|
|
1725
1752
|
...A,
|
|
1726
|
-
children:
|
|
1727
|
-
loaded:
|
|
1753
|
+
children: z,
|
|
1754
|
+
loaded: z.length > 0 || A.loaded
|
|
1728
1755
|
};
|
|
1729
1756
|
})
|
|
1730
1757
|
);
|
|
1731
|
-
|
|
1732
|
-
const E =
|
|
1758
|
+
l.value = T, u.value = null, b.value = {}, B.value = {}, i.value = [], c.value = {}, m.value = [];
|
|
1759
|
+
const E = L(T, t.initialActiveNodeKey) ?? L(T);
|
|
1733
1760
|
return p.value = E, v.value = {
|
|
1734
1761
|
...f,
|
|
1735
1762
|
treeNodes: T,
|
|
1736
1763
|
activeNode: E,
|
|
1737
1764
|
sectionMap: b.value,
|
|
1738
|
-
sections:
|
|
1739
|
-
},
|
|
1740
|
-
} catch (
|
|
1741
|
-
throw a.value =
|
|
1765
|
+
sections: h.value
|
|
1766
|
+
}, l.value;
|
|
1767
|
+
} catch (r) {
|
|
1768
|
+
throw a.value = r, r;
|
|
1742
1769
|
} finally {
|
|
1743
1770
|
e.value = !1;
|
|
1744
1771
|
}
|
|
1745
|
-
},
|
|
1746
|
-
const
|
|
1747
|
-
await
|
|
1748
|
-
const
|
|
1749
|
-
(f) => ie(f) ===
|
|
1772
|
+
}, Yt = async () => {
|
|
1773
|
+
const s = C();
|
|
1774
|
+
await Ve(u.value ?? p.value);
|
|
1775
|
+
const r = h.value.find(
|
|
1776
|
+
(f) => ie(f) === s
|
|
1750
1777
|
);
|
|
1751
|
-
return
|
|
1752
|
-
},
|
|
1753
|
-
const
|
|
1754
|
-
return !!(
|
|
1755
|
-
}, Zt = (
|
|
1756
|
-
const
|
|
1757
|
-
!
|
|
1758
|
-
},
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1761
|
-
(f) => f !==
|
|
1762
|
-
),
|
|
1763
|
-
}, Qt = (
|
|
1764
|
-
const T = typeof
|
|
1765
|
-
|
|
1766
|
-
const
|
|
1778
|
+
return r && (u.value = r), Se(), v.value;
|
|
1779
|
+
}, nt = (s = u.value) => {
|
|
1780
|
+
const r = ae(s);
|
|
1781
|
+
return !!(r && m.value.includes(r));
|
|
1782
|
+
}, Zt = (s = u.value) => {
|
|
1783
|
+
const r = ae(s);
|
|
1784
|
+
!r || nt(r) || (m.value = [...m.value, r], re(r, { editing: !0 }));
|
|
1785
|
+
}, ot = (s = u.value) => {
|
|
1786
|
+
const r = ae(s);
|
|
1787
|
+
r && (m.value = m.value.filter(
|
|
1788
|
+
(f) => f !== r
|
|
1789
|
+
), re(r, { editing: !1 }));
|
|
1790
|
+
}, Qt = (s, r, f) => {
|
|
1791
|
+
const T = typeof r == "string" ? r : be(r);
|
|
1792
|
+
_e(s, (E) => {
|
|
1793
|
+
const z = (typeof r == "string" ? E.fields.find((W) => be(W) === T || W.code === T) : r)?.cascadeClearFields ?? [], K = {
|
|
1767
1794
|
...E.model,
|
|
1768
1795
|
[T]: f
|
|
1769
1796
|
};
|
|
1770
|
-
return
|
|
1771
|
-
K[
|
|
1797
|
+
return z.forEach((W) => {
|
|
1798
|
+
K[W] = "";
|
|
1772
1799
|
}), {
|
|
1773
1800
|
// 保留 section 其它元数据。
|
|
1774
1801
|
...E,
|
|
@@ -1777,92 +1804,92 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1777
1804
|
// 表单类型同步更新第一行 rows,方便保存时统一从 rows 构造 payload。
|
|
1778
1805
|
rows: E.renderType === "form" ? [{ ...E.rows[0], ...K }] : E.rows,
|
|
1779
1806
|
// 同步 fields.value,保证只读 renderer 立即显示新值。
|
|
1780
|
-
fields: E.fields.map((
|
|
1781
|
-
const te =
|
|
1782
|
-
return te === T ||
|
|
1807
|
+
fields: E.fields.map((W) => {
|
|
1808
|
+
const te = be(W);
|
|
1809
|
+
return te === T || W.code === T ? { ...W, value: f } : z.includes(te) || z.includes(W.code) ? { ...W, value: "" } : W;
|
|
1783
1810
|
})
|
|
1784
1811
|
};
|
|
1785
1812
|
});
|
|
1786
|
-
}, Xt = async (
|
|
1787
|
-
const T =
|
|
1813
|
+
}, Xt = async (s, r, f = {}) => {
|
|
1814
|
+
const T = O(s);
|
|
1788
1815
|
if (!T)
|
|
1789
1816
|
return [];
|
|
1790
|
-
const E = Object.keys(f).length > 0 ? f : T.model, A = typeof
|
|
1791
|
-
if (!
|
|
1792
|
-
return
|
|
1793
|
-
if ((
|
|
1817
|
+
const E = Object.keys(f).length > 0 ? f : T.model, A = typeof r == "string" ? r : be(r), z = typeof r == "string" ? T.fields.find((fe) => be(fe) === A || fe.code === A) : r, K = z?.interface;
|
|
1818
|
+
if (!z || !K)
|
|
1819
|
+
return z?.options ?? [];
|
|
1820
|
+
if ((z.cascadeDependFields ?? []).some((fe) => {
|
|
1794
1821
|
const se = E[fe];
|
|
1795
1822
|
return se == null || se === "";
|
|
1796
1823
|
}))
|
|
1797
|
-
return
|
|
1824
|
+
return _e(T, (fe) => ({
|
|
1798
1825
|
...fe,
|
|
1799
1826
|
fields: fe.fields.map(
|
|
1800
|
-
(se) =>
|
|
1827
|
+
(se) => be(se) === A || se.code === A ? { ...se, options: [] } : se
|
|
1801
1828
|
)
|
|
1802
1829
|
})), [];
|
|
1803
|
-
const te =
|
|
1830
|
+
const te = w(K, E, z), ye = await g(
|
|
1804
1831
|
{
|
|
1805
1832
|
...K,
|
|
1806
1833
|
params: te
|
|
1807
1834
|
},
|
|
1808
1835
|
{
|
|
1809
1836
|
type: "fieldOptions",
|
|
1810
|
-
node:
|
|
1837
|
+
node: Ce(T),
|
|
1811
1838
|
section: T,
|
|
1812
|
-
field:
|
|
1839
|
+
field: z,
|
|
1813
1840
|
params: te
|
|
1814
1841
|
}
|
|
1815
|
-
), ge =
|
|
1816
|
-
return
|
|
1842
|
+
), ge = Lt(ye);
|
|
1843
|
+
return _e(T, (fe) => ({
|
|
1817
1844
|
...fe,
|
|
1818
1845
|
fields: fe.fields.map(
|
|
1819
|
-
(se) =>
|
|
1846
|
+
(se) => be(se) === A || se.code === A ? { ...se, options: ge } : se
|
|
1820
1847
|
)
|
|
1821
1848
|
})), ge;
|
|
1822
|
-
}, en = (
|
|
1823
|
-
if (Array.isArray(
|
|
1824
|
-
|
|
1849
|
+
}, en = (s, r) => {
|
|
1850
|
+
if (Array.isArray(r)) {
|
|
1851
|
+
Ge(s, r);
|
|
1825
1852
|
return;
|
|
1826
1853
|
}
|
|
1827
|
-
|
|
1854
|
+
_e(s, (f) => ({
|
|
1828
1855
|
...f,
|
|
1829
1856
|
// 替换当前 model。
|
|
1830
|
-
model:
|
|
1857
|
+
model: r,
|
|
1831
1858
|
// 表单类型同步合并到第一行 rows。
|
|
1832
|
-
rows: f.renderType === "form" ? [{ ...f.rows[0], ...
|
|
1859
|
+
rows: f.renderType === "form" ? [{ ...f.rows[0], ...r }] : f.rows,
|
|
1833
1860
|
// fields.value 也同步成 model 中的值。
|
|
1834
1861
|
fields: f.fields.map((T) => ({
|
|
1835
1862
|
...T,
|
|
1836
|
-
value:
|
|
1863
|
+
value: r[be(T)]
|
|
1837
1864
|
}))
|
|
1838
1865
|
}));
|
|
1839
|
-
},
|
|
1840
|
-
|
|
1866
|
+
}, Ge = (s, r) => {
|
|
1867
|
+
_e(s, (f) => ({
|
|
1841
1868
|
...f,
|
|
1842
|
-
rows:
|
|
1843
|
-
data:
|
|
1869
|
+
rows: r,
|
|
1870
|
+
data: r
|
|
1844
1871
|
}));
|
|
1845
1872
|
}, tn = {
|
|
1846
1873
|
// 加载模板树。
|
|
1847
|
-
loadTree:
|
|
1874
|
+
loadTree: He,
|
|
1848
1875
|
// 选中树节点。
|
|
1849
|
-
selectNode:
|
|
1876
|
+
selectNode: xe,
|
|
1850
1877
|
// 加载当前节点详情。
|
|
1851
|
-
loadDetail:
|
|
1878
|
+
loadDetail: x,
|
|
1852
1879
|
// 刷新当前详情。
|
|
1853
|
-
reloadActiveSection:
|
|
1880
|
+
reloadActiveSection: Yt,
|
|
1854
1881
|
// 加载指定节点或 section。
|
|
1855
|
-
loadSection:
|
|
1882
|
+
loadSection: Be,
|
|
1856
1883
|
// 重新加载指定节点或 section。
|
|
1857
|
-
reloadSection:
|
|
1884
|
+
reloadSection: Ve,
|
|
1858
1885
|
// 获取指定节点或 section 的缓存数据。
|
|
1859
|
-
getSection:
|
|
1886
|
+
getSection: $,
|
|
1860
1887
|
// 获取指定节点或 section 的状态。
|
|
1861
|
-
getSectionStatus:
|
|
1888
|
+
getSectionStatus: Me,
|
|
1862
1889
|
// 开启编辑。
|
|
1863
1890
|
startEdit: Zt,
|
|
1864
1891
|
// 取消编辑。
|
|
1865
|
-
cancelEdit:
|
|
1892
|
+
cancelEdit: ot,
|
|
1866
1893
|
// 更新单字段。
|
|
1867
1894
|
updateField: Qt,
|
|
1868
1895
|
// 加载字段动态选项。
|
|
@@ -1870,34 +1897,34 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1870
1897
|
// 批量更新 model。
|
|
1871
1898
|
updateModel: en,
|
|
1872
1899
|
// 更新表格行。
|
|
1873
|
-
updateTableRows:
|
|
1900
|
+
updateTableRows: Ge,
|
|
1874
1901
|
// 保存单行到本地缓存。
|
|
1875
|
-
saveRow: (
|
|
1876
|
-
const E = [...
|
|
1877
|
-
E.splice(f >= 0 ? f : E.length, f >= 0 ? 1 : 0,
|
|
1902
|
+
saveRow: (s, r = {}, f = -1) => {
|
|
1903
|
+
const E = [...O(s)?.rows ?? []];
|
|
1904
|
+
E.splice(f >= 0 ? f : E.length, f >= 0 ? 1 : 0, r), Ge(s, E);
|
|
1878
1905
|
},
|
|
1879
1906
|
// 删除单行本地缓存。
|
|
1880
|
-
deleteRow: (
|
|
1881
|
-
const f =
|
|
1882
|
-
(A,
|
|
1907
|
+
deleteRow: (s, r) => {
|
|
1908
|
+
const f = O(s), T = typeof r == "string" ? Number(r) : r, E = (f?.rows ?? []).filter(
|
|
1909
|
+
(A, z) => z !== T
|
|
1883
1910
|
);
|
|
1884
|
-
|
|
1911
|
+
Ge(s, E);
|
|
1885
1912
|
},
|
|
1886
1913
|
// 调用接口保存 section。
|
|
1887
|
-
saveSection: async (
|
|
1888
|
-
const
|
|
1914
|
+
saveSection: async (s = u.value) => {
|
|
1915
|
+
const r = C(s), f = O(s);
|
|
1889
1916
|
if (!f)
|
|
1890
1917
|
return null;
|
|
1891
|
-
const T =
|
|
1918
|
+
const T = I(f);
|
|
1892
1919
|
if (!T)
|
|
1893
|
-
throw
|
|
1894
|
-
o.value = !0, a.value = null,
|
|
1920
|
+
throw Te("section.operationInfo.editInfoSet is required");
|
|
1921
|
+
o.value = !0, a.value = null, r && r !== ie(f) && re(r, { saving: !0, error: null }), re(f, { saving: !0, error: null });
|
|
1895
1922
|
try {
|
|
1896
|
-
const E =
|
|
1923
|
+
const E = d(p.value, f), A = io(f, E), z = await g(
|
|
1897
1924
|
{
|
|
1898
1925
|
...T,
|
|
1899
1926
|
params: {
|
|
1900
|
-
...
|
|
1927
|
+
...w(T, f.model),
|
|
1901
1928
|
...A
|
|
1902
1929
|
}
|
|
1903
1930
|
},
|
|
@@ -1908,45 +1935,45 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1908
1935
|
params: A
|
|
1909
1936
|
}
|
|
1910
1937
|
);
|
|
1911
|
-
return
|
|
1938
|
+
return ot(f), await Ve(f), z;
|
|
1912
1939
|
} catch (E) {
|
|
1913
|
-
throw a.value = E,
|
|
1940
|
+
throw a.value = E, r && r !== ie(f) && re(r, { saving: !1, error: E }), re(f, { saving: !1, error: E }), E;
|
|
1914
1941
|
} finally {
|
|
1915
|
-
o.value = !1,
|
|
1942
|
+
o.value = !1, r && r !== ie(f) && re(r, { saving: !1 }), re(f, { saving: !1 });
|
|
1916
1943
|
}
|
|
1917
1944
|
},
|
|
1918
1945
|
// 判断编辑态。
|
|
1919
|
-
isEditing:
|
|
1946
|
+
isEditing: nt
|
|
1920
1947
|
};
|
|
1921
|
-
return
|
|
1948
|
+
return je(
|
|
1922
1949
|
// 监听当前人员 id。
|
|
1923
1950
|
() => t.emplid,
|
|
1924
1951
|
() => {
|
|
1925
|
-
(t.autoLoad ?? !0) &&
|
|
1952
|
+
(t.autoLoad ?? !0) && He();
|
|
1926
1953
|
}
|
|
1927
|
-
),
|
|
1928
|
-
(t.autoLoad ?? !0) &&
|
|
1954
|
+
), bt(() => {
|
|
1955
|
+
(t.autoLoad ?? !0) && He();
|
|
1929
1956
|
}), {
|
|
1930
1957
|
// 当前 viewModel。
|
|
1931
1958
|
viewModel: v,
|
|
1932
1959
|
// 当前模板树节点。
|
|
1933
|
-
nodes:
|
|
1960
|
+
nodes: l,
|
|
1934
1961
|
// 当前已加载 section 列表。
|
|
1935
|
-
sections:
|
|
1962
|
+
sections: h,
|
|
1936
1963
|
// 当前 section 缓存。
|
|
1937
1964
|
sectionMap: b,
|
|
1938
1965
|
// 当前 section 状态缓存。
|
|
1939
|
-
sectionStatusMap:
|
|
1966
|
+
sectionStatusMap: c,
|
|
1940
1967
|
// 当前激活节点。
|
|
1941
1968
|
activeNode: p,
|
|
1942
1969
|
// 当前激活 section。
|
|
1943
|
-
activeSection:
|
|
1970
|
+
activeSection: u,
|
|
1944
1971
|
// 给页面消费的状态快照。
|
|
1945
|
-
state:
|
|
1972
|
+
state: S,
|
|
1946
1973
|
// 给页面消费的操作集合。
|
|
1947
1974
|
actions: tn
|
|
1948
1975
|
};
|
|
1949
|
-
},
|
|
1976
|
+
}, Za = /* @__PURE__ */ U({
|
|
1950
1977
|
name: "GlobalInfoProvider",
|
|
1951
1978
|
__name: "GlobalInfoProvider",
|
|
1952
1979
|
props: {
|
|
@@ -1957,69 +1984,69 @@ const _e = (t) => t.key || t.code, ie = (t) => t.key || t.setId, $e = (t) => new
|
|
|
1957
1984
|
initialActiveNodeKey: {}
|
|
1958
1985
|
},
|
|
1959
1986
|
setup(t) {
|
|
1960
|
-
const n =
|
|
1961
|
-
return (
|
|
1987
|
+
const n = ko(t), { viewModel: o, nodes: a, sections: l, activeNode: v, activeSection: p, state: u, actions: b } = n;
|
|
1988
|
+
return (B, i) => j(B.$slots, "default", ce(me({
|
|
1962
1989
|
viewModel: q(o),
|
|
1963
1990
|
nodes: q(a),
|
|
1964
|
-
sections: q(
|
|
1991
|
+
sections: q(l),
|
|
1965
1992
|
activeNode: q(v),
|
|
1966
1993
|
activeSection: q(p),
|
|
1967
|
-
state: q(
|
|
1994
|
+
state: q(u),
|
|
1968
1995
|
actions: q(b)
|
|
1969
1996
|
})));
|
|
1970
1997
|
}
|
|
1971
1998
|
});
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
1999
|
+
function Co(t) {
|
|
2000
|
+
return pt(t.type || t.fieldType) || pt(t.renderType) || "text";
|
|
1974
2001
|
}
|
|
1975
|
-
function
|
|
1976
|
-
return
|
|
2002
|
+
function qt(t) {
|
|
2003
|
+
return ft(t.type || t.fieldType) || ft(t.renderType) || "text";
|
|
1977
2004
|
}
|
|
1978
|
-
function
|
|
2005
|
+
function tt(t) {
|
|
1979
2006
|
return t == null || t === "" || Array.isArray(t) && t.length === 0;
|
|
1980
2007
|
}
|
|
1981
|
-
function
|
|
2008
|
+
function Jt(t) {
|
|
1982
2009
|
if (t instanceof Error) return !0;
|
|
1983
2010
|
if (!t || typeof t != "object") return !1;
|
|
1984
2011
|
const e = t;
|
|
1985
2012
|
return typeof e.message == "string" && (typeof e.stack == "string" || e.name === "Error");
|
|
1986
2013
|
}
|
|
1987
|
-
function
|
|
1988
|
-
const o =
|
|
1989
|
-
return o === "empty" ||
|
|
2014
|
+
function Ut(t, e, n = "-") {
|
|
2015
|
+
const o = qt(t);
|
|
2016
|
+
return o === "empty" || tt(e) ? n : Jt(e) ? (console.error("[globalInfo] field value render failed", e), n) : o === "select" ? $o(t, e, n) : o === "switch" ? xt(e) ? "是" : "否" : o === "file" ? Bo(e, n) : o === "multi-row" ? To(e) : String(e);
|
|
1990
2017
|
}
|
|
1991
|
-
function
|
|
2018
|
+
function xt(t) {
|
|
1992
2019
|
if (typeof t == "boolean") return t;
|
|
1993
2020
|
if (typeof t == "number") return t !== 0;
|
|
1994
2021
|
const e = String(t ?? "").trim().toLowerCase();
|
|
1995
2022
|
return ["true", "1", "y", "yes", "t", "是"].includes(e);
|
|
1996
2023
|
}
|
|
1997
|
-
function
|
|
2024
|
+
function pt(t) {
|
|
1998
2025
|
const e = String(t ?? "").toLowerCase();
|
|
1999
2026
|
return e === "upload" || e === "attachment" ? "file" : e === "text" || e === "textarea" || e === "select" || e === "date" || e === "number" || e === "switch" || e === "file" || e === "html" || e === "code" || e === "multi-row" || e === "empty" ? e : "";
|
|
2000
2027
|
}
|
|
2001
|
-
function
|
|
2028
|
+
function ft(t) {
|
|
2002
2029
|
const e = String(t ?? "").toLowerCase();
|
|
2003
2030
|
return e === "upload" || e === "attachment" ? "file" : e === "select" || e === "switch" || e === "file" || e === "html" || e === "code" || e === "multi-row" || e === "empty" ? e : e === "textarea" || e === "date" || e === "number" || e === "text" ? "text" : "";
|
|
2004
2031
|
}
|
|
2005
|
-
function
|
|
2032
|
+
function $o(t, e, n) {
|
|
2006
2033
|
if (Array.isArray(e)) {
|
|
2007
|
-
const o = e.map((a) =>
|
|
2034
|
+
const o = e.map((a) => mt(t, a) || String(a ?? "").trim()).filter(Boolean);
|
|
2008
2035
|
return o.length > 0 ? o.join("、") : n;
|
|
2009
2036
|
}
|
|
2010
|
-
return
|
|
2037
|
+
return mt(t, e) || String(e);
|
|
2011
2038
|
}
|
|
2012
|
-
function
|
|
2039
|
+
function mt(t, e) {
|
|
2013
2040
|
return t.options?.find((o) => o.value === e || String(o.value) === String(e))?.label ?? "";
|
|
2014
2041
|
}
|
|
2015
|
-
function
|
|
2042
|
+
function Bo(t, e) {
|
|
2016
2043
|
if (Array.isArray(t)) {
|
|
2017
|
-
const n = t.map((o) =>
|
|
2044
|
+
const n = t.map((o) => vt(o)).filter(Boolean);
|
|
2018
2045
|
return n.length > 0 ? n.join("、") : e;
|
|
2019
2046
|
}
|
|
2020
|
-
return
|
|
2047
|
+
return vt(t) || e;
|
|
2021
2048
|
}
|
|
2022
|
-
function
|
|
2049
|
+
function vt(t) {
|
|
2023
2050
|
if (typeof File < "u" && t instanceof File) return t.name;
|
|
2024
2051
|
if (t && typeof t == "object") {
|
|
2025
2052
|
const e = t;
|
|
@@ -2027,17 +2054,17 @@ function gt(t) {
|
|
|
2027
2054
|
}
|
|
2028
2055
|
return String(t ?? "").trim();
|
|
2029
2056
|
}
|
|
2030
|
-
function
|
|
2031
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
2057
|
+
function To(t) {
|
|
2058
|
+
return Array.isArray(t) ? t.map((e) => Jt(e) ? (console.error("[globalInfo] multi-row field item render failed", e), "") : e && typeof e == "object" ? JSON.stringify(e) : String(e)).filter(Boolean).join(`
|
|
2032
2059
|
`) : String(t);
|
|
2033
2060
|
}
|
|
2034
|
-
const
|
|
2061
|
+
const Eo = ["disabled", "accept", "multiple"], Fo = {
|
|
2035
2062
|
key: 0,
|
|
2036
2063
|
class: "global-info-field-control__file-text"
|
|
2037
|
-
},
|
|
2064
|
+
}, Mo = {
|
|
2038
2065
|
key: 1,
|
|
2039
2066
|
class: "global-info-field-control__file-upload"
|
|
2040
|
-
},
|
|
2067
|
+
}, Vo = /* @__PURE__ */ U({
|
|
2041
2068
|
name: "GlobalInfoFieldControl",
|
|
2042
2069
|
__name: "GlobalInfoFieldControl",
|
|
2043
2070
|
props: {
|
|
@@ -2047,81 +2074,81 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2047
2074
|
},
|
|
2048
2075
|
emits: ["update:modelValue", "change", "loadOptions"],
|
|
2049
2076
|
setup(t, { emit: e }) {
|
|
2050
|
-
const n = t, o = e, a = ["textarea", "html", "code", "multi-row"],
|
|
2077
|
+
const n = t, o = e, a = ["textarea", "html", "code", "multi-row"], l = _(() => Co(n.field)), v = _(() => n.disabled || n.field.disabled || n.field.readonly), p = _(() => n.modelValue === void 0 || n.modelValue === null ? "" : String(n.modelValue)), u = _(() => {
|
|
2051
2078
|
if (n.modelValue === void 0 || n.modelValue === null || n.modelValue === "") return;
|
|
2052
|
-
const
|
|
2053
|
-
return Number.isFinite(
|
|
2054
|
-
}), b =
|
|
2055
|
-
const
|
|
2056
|
-
return
|
|
2057
|
-
}),
|
|
2058
|
-
function
|
|
2059
|
-
o("update:modelValue",
|
|
2060
|
-
}
|
|
2061
|
-
function
|
|
2062
|
-
o("change",
|
|
2063
|
-
}
|
|
2064
|
-
function
|
|
2065
|
-
|
|
2066
|
-
}
|
|
2067
|
-
function
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
}
|
|
2071
|
-
return (
|
|
2072
|
-
const
|
|
2073
|
-
return
|
|
2079
|
+
const d = typeof n.modelValue == "number" ? n.modelValue : Number(n.modelValue);
|
|
2080
|
+
return Number.isFinite(d) ? d : void 0;
|
|
2081
|
+
}), b = _(() => {
|
|
2082
|
+
const d = n.field.props?.activeValue ?? n.field.props?.["active-value"], g = n.field.props?.inactiveValue ?? n.field.props?.["inactive-value"];
|
|
2083
|
+
return d !== void 0 || g !== void 0 ? n.modelValue ?? g ?? !1 : xt(n.modelValue);
|
|
2084
|
+
}), B = _(() => l.value === "code" ? 5 : 3), i = _(() => l.value === "file" && !tt(n.modelValue)), c = _(() => Ut(n.field, n.modelValue, "请选择文件")), m = _(() => n.field.placeholder ? n.field.placeholder : l.value === "select" ? "请选择" : l.value === "date" ? "请选择日期" : l.value === "file" ? "请选择文件" : "请输入");
|
|
2085
|
+
function h(d) {
|
|
2086
|
+
o("update:modelValue", d);
|
|
2087
|
+
}
|
|
2088
|
+
function S(d) {
|
|
2089
|
+
o("change", d);
|
|
2090
|
+
}
|
|
2091
|
+
function V(d) {
|
|
2092
|
+
d && o("loadOptions");
|
|
2093
|
+
}
|
|
2094
|
+
function G(d) {
|
|
2095
|
+
const g = d.target, w = Array.from(g.files ?? []), N = n.field.props?.multiple ? w : w[0] ?? null;
|
|
2096
|
+
h(N), S(N);
|
|
2097
|
+
}
|
|
2098
|
+
return (d, g) => {
|
|
2099
|
+
const w = kt, N = wt, k = _t, I = dn, L = pn, C = It;
|
|
2100
|
+
return l.value === "select" ? (y(), M(N, D({
|
|
2074
2101
|
key: 0,
|
|
2075
2102
|
class: "global-info-field-control"
|
|
2076
|
-
},
|
|
2077
|
-
"model-value":
|
|
2103
|
+
}, d.field.props, {
|
|
2104
|
+
"model-value": d.modelValue,
|
|
2078
2105
|
placeholder: m.value,
|
|
2079
2106
|
disabled: v.value,
|
|
2080
2107
|
clearable: "",
|
|
2081
|
-
onVisibleChange:
|
|
2082
|
-
"onUpdate:modelValue":
|
|
2083
|
-
onChange:
|
|
2108
|
+
onVisibleChange: V,
|
|
2109
|
+
"onUpdate:modelValue": h,
|
|
2110
|
+
onChange: S
|
|
2084
2111
|
}), {
|
|
2085
|
-
default:
|
|
2086
|
-
(y(!0),
|
|
2087
|
-
key: String(
|
|
2088
|
-
label:
|
|
2089
|
-
value:
|
|
2112
|
+
default: F(() => [
|
|
2113
|
+
(y(!0), P(de, null, oe(d.field.options || [], (O) => (y(), M(w, {
|
|
2114
|
+
key: String(O.value),
|
|
2115
|
+
label: O.label,
|
|
2116
|
+
value: O.value
|
|
2090
2117
|
}, null, 8, ["label", "value"]))), 128))
|
|
2091
2118
|
]),
|
|
2092
2119
|
_: 1
|
|
2093
|
-
}, 16, ["model-value", "placeholder", "disabled"])) :
|
|
2120
|
+
}, 16, ["model-value", "placeholder", "disabled"])) : l.value === "date" ? (y(), M(k, D({
|
|
2094
2121
|
key: 1,
|
|
2095
2122
|
class: "global-info-field-control"
|
|
2096
|
-
},
|
|
2097
|
-
"model-value":
|
|
2123
|
+
}, d.field.props, {
|
|
2124
|
+
"model-value": d.modelValue,
|
|
2098
2125
|
placeholder: m.value,
|
|
2099
2126
|
disabled: v.value,
|
|
2100
2127
|
type: "date",
|
|
2101
2128
|
"value-format": "YYYY-MM-DD",
|
|
2102
|
-
"onUpdate:modelValue":
|
|
2103
|
-
onChange:
|
|
2104
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) :
|
|
2129
|
+
"onUpdate:modelValue": h,
|
|
2130
|
+
onChange: S
|
|
2131
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : l.value === "number" ? (y(), M(I, D({
|
|
2105
2132
|
key: 2,
|
|
2106
2133
|
class: "global-info-field-control"
|
|
2107
|
-
},
|
|
2108
|
-
"model-value":
|
|
2134
|
+
}, d.field.props, {
|
|
2135
|
+
"model-value": u.value,
|
|
2109
2136
|
placeholder: m.value,
|
|
2110
2137
|
disabled: v.value,
|
|
2111
2138
|
"controls-position": "right",
|
|
2112
|
-
"onUpdate:modelValue":
|
|
2113
|
-
onChange:
|
|
2114
|
-
}), null, 16, ["model-value", "placeholder", "disabled"])) :
|
|
2139
|
+
"onUpdate:modelValue": h,
|
|
2140
|
+
onChange: S
|
|
2141
|
+
}), null, 16, ["model-value", "placeholder", "disabled"])) : l.value === "switch" ? (y(), M(L, D({
|
|
2115
2142
|
key: 3,
|
|
2116
2143
|
class: "global-info-field-control global-info-field-control--switch"
|
|
2117
|
-
},
|
|
2144
|
+
}, d.field.props, {
|
|
2118
2145
|
"model-value": b.value,
|
|
2119
2146
|
disabled: v.value,
|
|
2120
|
-
"onUpdate:modelValue":
|
|
2121
|
-
onChange:
|
|
2122
|
-
}), null, 16, ["model-value", "disabled"])) :
|
|
2147
|
+
"onUpdate:modelValue": h,
|
|
2148
|
+
onChange: S
|
|
2149
|
+
}), null, 16, ["model-value", "disabled"])) : l.value === "file" ? (y(), P("label", {
|
|
2123
2150
|
key: 4,
|
|
2124
|
-
class:
|
|
2151
|
+
class: Ke(["global-info-field-control global-info-field-control--file", {
|
|
2125
2152
|
"is-disabled": v.value,
|
|
2126
2153
|
"is-empty": !i.value,
|
|
2127
2154
|
"is-filled": i.value
|
|
@@ -2131,35 +2158,35 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2131
2158
|
class: "global-info-field-control__file-input",
|
|
2132
2159
|
type: "file",
|
|
2133
2160
|
disabled: v.value,
|
|
2134
|
-
accept: String(
|
|
2135
|
-
multiple: !!
|
|
2136
|
-
onChange:
|
|
2137
|
-
}, null, 40,
|
|
2138
|
-
i.value ? (y(),
|
|
2139
|
-
], 2)) :
|
|
2161
|
+
accept: String(d.field.props?.accept ?? ""),
|
|
2162
|
+
multiple: !!d.field.props?.multiple,
|
|
2163
|
+
onChange: G
|
|
2164
|
+
}, null, 40, Eo),
|
|
2165
|
+
i.value ? (y(), P("span", Fo, ee(c.value), 1)) : (y(), P("span", Mo, "上 传"))
|
|
2166
|
+
], 2)) : l.value === "empty" ? (y(), M(C, {
|
|
2140
2167
|
key: 5,
|
|
2141
2168
|
class: "global-info-field-control",
|
|
2142
2169
|
"model-value": "",
|
|
2143
2170
|
disabled: "",
|
|
2144
2171
|
placeholder: "-"
|
|
2145
|
-
})) : (y(),
|
|
2172
|
+
})) : (y(), M(C, D({
|
|
2146
2173
|
key: 6,
|
|
2147
|
-
class: ["global-info-field-control", { "global-info-field-control--code":
|
|
2148
|
-
},
|
|
2174
|
+
class: ["global-info-field-control", { "global-info-field-control--code": l.value === "code" }]
|
|
2175
|
+
}, d.field.props, {
|
|
2149
2176
|
"model-value": p.value,
|
|
2150
2177
|
placeholder: m.value,
|
|
2151
2178
|
disabled: v.value,
|
|
2152
|
-
type: a.includes(
|
|
2153
|
-
rows: a.includes(
|
|
2154
|
-
"onUpdate:modelValue":
|
|
2155
|
-
onChange:
|
|
2179
|
+
type: a.includes(l.value) ? "textarea" : "text",
|
|
2180
|
+
rows: a.includes(l.value) ? B.value : void 0,
|
|
2181
|
+
"onUpdate:modelValue": h,
|
|
2182
|
+
onChange: S
|
|
2156
2183
|
}), null, 16, ["class", "model-value", "placeholder", "disabled", "type", "rows"]));
|
|
2157
2184
|
};
|
|
2158
2185
|
}
|
|
2159
|
-
}),
|
|
2186
|
+
}), Ht = /* @__PURE__ */ X(Vo, [["__scopeId", "data-v-ba86a0ae"]]), Po = ["innerHTML"], Lo = {
|
|
2160
2187
|
key: 1,
|
|
2161
2188
|
class: "global-info-field-value global-info-field-value--code"
|
|
2162
|
-
},
|
|
2189
|
+
}, No = /* @__PURE__ */ U({
|
|
2163
2190
|
name: "GlobalInfoFieldValue",
|
|
2164
2191
|
__name: "GlobalInfoFieldValue",
|
|
2165
2192
|
props: {
|
|
@@ -2168,23 +2195,23 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2168
2195
|
emptyText: { default: "-" }
|
|
2169
2196
|
},
|
|
2170
2197
|
setup(t) {
|
|
2171
|
-
const e = t, n =
|
|
2172
|
-
return (
|
|
2198
|
+
const e = t, n = _(() => qt(e.field)), o = _(() => n.value === "empty" || tt(e.value)), a = _(() => Ut(e.field, e.value, e.emptyText));
|
|
2199
|
+
return (l, v) => n.value === "html" && !o.value ? (y(), P("span", {
|
|
2173
2200
|
key: 0,
|
|
2174
2201
|
class: "global-info-field-value global-info-field-value--html",
|
|
2175
2202
|
innerHTML: a.value
|
|
2176
|
-
}, null, 8,
|
|
2203
|
+
}, null, 8, Po)) : n.value === "code" && !o.value ? (y(), P("pre", Lo, ee(a.value), 1)) : (y(), P("span", {
|
|
2177
2204
|
key: 2,
|
|
2178
|
-
class:
|
|
2205
|
+
class: Ke(["global-info-field-value", {
|
|
2179
2206
|
"global-info-field-value--multi-row": n.value === "multi-row",
|
|
2180
2207
|
"global-info-field-value--file": n.value === "file" && !o.value
|
|
2181
2208
|
}])
|
|
2182
2209
|
}, ee(a.value), 3));
|
|
2183
2210
|
}
|
|
2184
|
-
}),
|
|
2211
|
+
}), Wt = /* @__PURE__ */ X(No, [["__scopeId", "data-v-aa0d493d"]]), Ro = { class: "global-info-form-renderer__label" }, jo = {
|
|
2185
2212
|
key: 0,
|
|
2186
2213
|
class: "global-info-form-renderer__required"
|
|
2187
|
-
},
|
|
2214
|
+
}, zo = /* @__PURE__ */ U({
|
|
2188
2215
|
name: "GlobalInfoFormRenderer",
|
|
2189
2216
|
__name: "GlobalInfoFormRenderer",
|
|
2190
2217
|
props: {
|
|
@@ -2197,24 +2224,24 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2197
2224
|
onUpdateModel: { type: Function }
|
|
2198
2225
|
},
|
|
2199
2226
|
setup(t) {
|
|
2200
|
-
const e = t, n = ve(), o =
|
|
2201
|
-
function
|
|
2202
|
-
const
|
|
2203
|
-
(
|
|
2204
|
-
|
|
2205
|
-
}), e.onUpdateModel?.(
|
|
2206
|
-
}
|
|
2207
|
-
async function v(
|
|
2227
|
+
const e = t, n = ve(), o = _(() => e.section.fields.filter((c) => c.visible)), a = _(() => e.model ?? e.section.model);
|
|
2228
|
+
function l(c, m) {
|
|
2229
|
+
const h = { ...a.value, [c.code]: m };
|
|
2230
|
+
(c.cascadeClearFields ?? []).forEach((S) => {
|
|
2231
|
+
h[S] = "";
|
|
2232
|
+
}), e.onUpdateModel?.(h), e.onUpdateModel || e.actions.updateField(e.section, c, m);
|
|
2233
|
+
}
|
|
2234
|
+
async function v(c) {
|
|
2208
2235
|
try {
|
|
2209
|
-
await e.actions.loadFieldOptions(e.section,
|
|
2236
|
+
await e.actions.loadFieldOptions(e.section, c, a.value);
|
|
2210
2237
|
} catch (m) {
|
|
2211
2238
|
console.error("[GlobalInfoFormRenderer] load field options failed", m);
|
|
2212
2239
|
}
|
|
2213
2240
|
}
|
|
2214
|
-
function p(
|
|
2215
|
-
const m = a.value[
|
|
2241
|
+
function p(c) {
|
|
2242
|
+
const m = a.value[c.code];
|
|
2216
2243
|
return {
|
|
2217
|
-
field:
|
|
2244
|
+
field: c,
|
|
2218
2245
|
section: e.section,
|
|
2219
2246
|
sectionView: e.section,
|
|
2220
2247
|
node: e.node,
|
|
@@ -2223,65 +2250,65 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2223
2250
|
value: m,
|
|
2224
2251
|
state: e.state,
|
|
2225
2252
|
actions: e.actions,
|
|
2226
|
-
updateModelValue: (
|
|
2253
|
+
updateModelValue: (h) => l(c, h)
|
|
2227
2254
|
};
|
|
2228
2255
|
}
|
|
2229
|
-
function c
|
|
2230
|
-
const m = String(
|
|
2231
|
-
if (
|
|
2232
|
-
const
|
|
2233
|
-
return
|
|
2256
|
+
function u(c) {
|
|
2257
|
+
const m = String(c.id || c.key || c.code || "").trim(), h = m ? `field-${m}` : "";
|
|
2258
|
+
if (h && n[h]) return h;
|
|
2259
|
+
const S = h.toLowerCase();
|
|
2260
|
+
return S !== h && n[S] ? S : "";
|
|
2234
2261
|
}
|
|
2235
|
-
function b(
|
|
2236
|
-
return
|
|
2262
|
+
function b(c) {
|
|
2263
|
+
return c.span ? Math.min(Math.max(c.span, 1), 24) : 6;
|
|
2237
2264
|
}
|
|
2238
|
-
function
|
|
2239
|
-
return
|
|
2265
|
+
function B(c) {
|
|
2266
|
+
return c.key || c.id || c.code;
|
|
2240
2267
|
}
|
|
2241
|
-
function i(
|
|
2242
|
-
return
|
|
2268
|
+
function i(c) {
|
|
2269
|
+
return c.required || c.isRequired;
|
|
2243
2270
|
}
|
|
2244
|
-
return (
|
|
2245
|
-
const
|
|
2246
|
-
return y(),
|
|
2271
|
+
return (c, m) => {
|
|
2272
|
+
const h = Ct, S = mn, V = fn, G = $t;
|
|
2273
|
+
return y(), M(G, {
|
|
2247
2274
|
class: "global-info-form-renderer",
|
|
2248
2275
|
model: a.value,
|
|
2249
2276
|
"label-position": "top"
|
|
2250
2277
|
}, {
|
|
2251
|
-
default:
|
|
2252
|
-
|
|
2253
|
-
default:
|
|
2254
|
-
(y(!0),
|
|
2255
|
-
key:
|
|
2256
|
-
span: b(
|
|
2278
|
+
default: F(() => [
|
|
2279
|
+
le(V, { gutter: 24 }, {
|
|
2280
|
+
default: F(() => [
|
|
2281
|
+
(y(!0), P(de, null, oe(o.value, (d) => (y(), M(S, {
|
|
2282
|
+
key: B(d),
|
|
2283
|
+
span: b(d)
|
|
2257
2284
|
}, {
|
|
2258
|
-
default:
|
|
2259
|
-
|
|
2260
|
-
prop:
|
|
2285
|
+
default: F(() => [
|
|
2286
|
+
le(h, D({
|
|
2287
|
+
prop: d.code,
|
|
2261
2288
|
ref_for: !0
|
|
2262
|
-
},
|
|
2263
|
-
label:
|
|
2264
|
-
J("span",
|
|
2265
|
-
i(
|
|
2266
|
-
|
|
2289
|
+
}, d.formItemProps), {
|
|
2290
|
+
label: F(() => [
|
|
2291
|
+
J("span", Ro, [
|
|
2292
|
+
i(d) ? (y(), P("span", jo, "*")) : Y("", !0),
|
|
2293
|
+
Fe(" " + ee(d.label), 1)
|
|
2267
2294
|
])
|
|
2268
2295
|
]),
|
|
2269
|
-
default:
|
|
2270
|
-
|
|
2296
|
+
default: F(() => [
|
|
2297
|
+
u(d) ? j(c.$slots, u(d), D({
|
|
2271
2298
|
key: 0,
|
|
2272
2299
|
ref_for: !0
|
|
2273
|
-
}, p(
|
|
2300
|
+
}, p(d)), void 0, !0) : c.editing && !d.readonly ? (y(), M(Ht, {
|
|
2274
2301
|
key: 1,
|
|
2275
|
-
field:
|
|
2276
|
-
"model-value": a.value[
|
|
2277
|
-
section:
|
|
2278
|
-
onLoadOptions: () => v(
|
|
2279
|
-
"onUpdate:modelValue": (
|
|
2280
|
-
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (y(),
|
|
2302
|
+
field: d,
|
|
2303
|
+
"model-value": a.value[d.code],
|
|
2304
|
+
section: c.section,
|
|
2305
|
+
onLoadOptions: () => v(d),
|
|
2306
|
+
"onUpdate:modelValue": (g) => l(d, g)
|
|
2307
|
+
}, null, 8, ["field", "model-value", "section", "onLoadOptions", "onUpdate:modelValue"])) : (y(), M(Wt, {
|
|
2281
2308
|
key: 2,
|
|
2282
|
-
field:
|
|
2283
|
-
value: a.value[
|
|
2284
|
-
section:
|
|
2309
|
+
field: d,
|
|
2310
|
+
value: a.value[d.code],
|
|
2311
|
+
section: c.section
|
|
2285
2312
|
}, null, 8, ["field", "value", "section"]))
|
|
2286
2313
|
]),
|
|
2287
2314
|
_: 2
|
|
@@ -2297,7 +2324,7 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2297
2324
|
}, 8, ["model"]);
|
|
2298
2325
|
};
|
|
2299
2326
|
}
|
|
2300
|
-
}),
|
|
2327
|
+
}), Oo = /* @__PURE__ */ X(zo, [["__scopeId", "data-v-9dcd2ba9"]]), Go = /* @__PURE__ */ U({
|
|
2301
2328
|
name: "GlobalInfoDeleteConfirm",
|
|
2302
2329
|
__name: "GlobalInfoDeleteConfirm",
|
|
2303
2330
|
props: {
|
|
@@ -2308,8 +2335,8 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2308
2335
|
emits: ["confirm", "cancel"],
|
|
2309
2336
|
setup(t) {
|
|
2310
2337
|
return (e, n) => {
|
|
2311
|
-
const o =
|
|
2312
|
-
return y(),
|
|
2338
|
+
const o = vn;
|
|
2339
|
+
return y(), M(o, {
|
|
2313
2340
|
title: e.title,
|
|
2314
2341
|
"confirm-button-text": e.confirmText,
|
|
2315
2342
|
"cancel-button-text": e.cancelText,
|
|
@@ -2318,17 +2345,17 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2318
2345
|
onConfirm: n[0] || (n[0] = (a) => e.$emit("confirm")),
|
|
2319
2346
|
onCancel: n[1] || (n[1] = (a) => e.$emit("cancel"))
|
|
2320
2347
|
}, {
|
|
2321
|
-
reference:
|
|
2348
|
+
reference: F(() => [
|
|
2322
2349
|
j(e.$slots, "default")
|
|
2323
2350
|
]),
|
|
2324
2351
|
_: 3
|
|
2325
2352
|
}, 8, ["title", "confirm-button-text", "cancel-button-text"]);
|
|
2326
2353
|
};
|
|
2327
2354
|
}
|
|
2328
|
-
}),
|
|
2355
|
+
}), Ao = { class: "global-info-table-renderer" }, Do = { class: "global-info-table-renderer__table-scroll" }, Ko = { class: "global-info-table-renderer__header" }, qo = {
|
|
2329
2356
|
key: 0,
|
|
2330
2357
|
class: "global-info-table-renderer__required"
|
|
2331
|
-
},
|
|
2358
|
+
}, Jo = /* @__PURE__ */ U({
|
|
2332
2359
|
name: "GlobalInfoTableRenderer",
|
|
2333
2360
|
__name: "GlobalInfoTableRenderer",
|
|
2334
2361
|
props: {
|
|
@@ -2341,163 +2368,163 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2341
2368
|
showDelete: { type: Boolean, default: !0 }
|
|
2342
2369
|
},
|
|
2343
2370
|
setup(t) {
|
|
2344
|
-
const e = t, n = ve(), o =
|
|
2345
|
-
function a(
|
|
2346
|
-
e.actions.deleteRow(e.section,
|
|
2347
|
-
}
|
|
2348
|
-
function
|
|
2349
|
-
const
|
|
2350
|
-
...
|
|
2351
|
-
__rowKey:
|
|
2352
|
-
[
|
|
2371
|
+
const e = t, n = ve(), o = _(() => e.section.fields.filter((d) => d.visible));
|
|
2372
|
+
function a(d) {
|
|
2373
|
+
e.actions.deleteRow(e.section, d);
|
|
2374
|
+
}
|
|
2375
|
+
function l(d, g, w, N) {
|
|
2376
|
+
const k = e.section.rows.slice(), I = w.cascadeClearFields ?? [], L = {
|
|
2377
|
+
...d,
|
|
2378
|
+
__rowKey: V(d),
|
|
2379
|
+
[w.code]: N
|
|
2353
2380
|
};
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
}),
|
|
2357
|
-
...
|
|
2358
|
-
}, e.actions.updateTableRows(e.section,
|
|
2381
|
+
I.forEach((C) => {
|
|
2382
|
+
L[C] = "";
|
|
2383
|
+
}), k[g] = {
|
|
2384
|
+
...L
|
|
2385
|
+
}, e.actions.updateTableRows(e.section, k);
|
|
2359
2386
|
}
|
|
2360
|
-
async function v(
|
|
2387
|
+
async function v(d, g) {
|
|
2361
2388
|
try {
|
|
2362
|
-
await e.actions.loadFieldOptions(e.section,
|
|
2363
|
-
} catch (
|
|
2364
|
-
console.error("[GlobalInfoTableRenderer] load field options failed",
|
|
2389
|
+
await e.actions.loadFieldOptions(e.section, d, g);
|
|
2390
|
+
} catch (w) {
|
|
2391
|
+
console.error("[GlobalInfoTableRenderer] load field options failed", w);
|
|
2365
2392
|
}
|
|
2366
2393
|
}
|
|
2367
|
-
function p(
|
|
2368
|
-
const
|
|
2394
|
+
function p(d, g, w) {
|
|
2395
|
+
const N = g[d.code];
|
|
2369
2396
|
return {
|
|
2370
|
-
field:
|
|
2397
|
+
field: d,
|
|
2371
2398
|
section: e.section,
|
|
2372
2399
|
sectionView: e.section,
|
|
2373
2400
|
node: e.node,
|
|
2374
|
-
row:
|
|
2375
|
-
rowIndex:
|
|
2401
|
+
row: g,
|
|
2402
|
+
rowIndex: w,
|
|
2376
2403
|
editing: e.editing,
|
|
2377
|
-
modelValue:
|
|
2378
|
-
value:
|
|
2404
|
+
modelValue: N,
|
|
2405
|
+
value: N,
|
|
2379
2406
|
state: e.state,
|
|
2380
2407
|
actions: e.actions,
|
|
2381
|
-
updateModelValue: (
|
|
2408
|
+
updateModelValue: (k) => l(g, w, d, k)
|
|
2382
2409
|
};
|
|
2383
2410
|
}
|
|
2384
|
-
function
|
|
2385
|
-
const
|
|
2386
|
-
if (
|
|
2387
|
-
const
|
|
2388
|
-
return
|
|
2389
|
-
}
|
|
2390
|
-
function b(
|
|
2391
|
-
return !
|
|
2392
|
-
}
|
|
2393
|
-
function
|
|
2394
|
-
return
|
|
2395
|
-
}
|
|
2396
|
-
function i(
|
|
2397
|
-
if (!
|
|
2398
|
-
return
|
|
2399
|
-
}
|
|
2400
|
-
function d
|
|
2401
|
-
return
|
|
2402
|
-
}
|
|
2403
|
-
function m(
|
|
2404
|
-
return [
|
|
2405
|
-
}
|
|
2406
|
-
let
|
|
2407
|
-
const
|
|
2408
|
-
function
|
|
2409
|
-
const
|
|
2410
|
-
if (
|
|
2411
|
-
const
|
|
2412
|
-
if (
|
|
2413
|
-
|
|
2414
|
-
const
|
|
2415
|
-
return
|
|
2416
|
-
}
|
|
2417
|
-
function
|
|
2418
|
-
return
|
|
2419
|
-
}
|
|
2420
|
-
return (
|
|
2421
|
-
const
|
|
2422
|
-
return y(),
|
|
2423
|
-
J("div",
|
|
2424
|
-
|
|
2411
|
+
function u(d) {
|
|
2412
|
+
const g = String(d.id || d.key || d.code || "").trim(), w = g ? `field-${g}` : "";
|
|
2413
|
+
if (w && n[w]) return w;
|
|
2414
|
+
const N = w.toLowerCase();
|
|
2415
|
+
return N !== w && n[N] ? N : "";
|
|
2416
|
+
}
|
|
2417
|
+
function b(d) {
|
|
2418
|
+
return !d.readonly && !d.disabled;
|
|
2419
|
+
}
|
|
2420
|
+
function B(d) {
|
|
2421
|
+
return d.width ?? (m(d) ? 56 : void 0);
|
|
2422
|
+
}
|
|
2423
|
+
function i(d) {
|
|
2424
|
+
if (!d.width)
|
|
2425
|
+
return d.minWidth ?? (m(d) ? 56 : void 0);
|
|
2426
|
+
}
|
|
2427
|
+
function c(d) {
|
|
2428
|
+
return d.key || d.id || d.code;
|
|
2429
|
+
}
|
|
2430
|
+
function m(d) {
|
|
2431
|
+
return [d.label, d.name, d.code, d.key, d.id].map((w) => String(w ?? "").trim().toLowerCase()).some((w) => ["序号", "index", "idx", "seq", "serial", "order", "rownum", "row_no"].includes(w));
|
|
2432
|
+
}
|
|
2433
|
+
let h = 0;
|
|
2434
|
+
const S = /* @__PURE__ */ new WeakMap();
|
|
2435
|
+
function V(d) {
|
|
2436
|
+
const g = d.__rowKey ?? d.key ?? d.id ?? d.setId ?? d.infSetId;
|
|
2437
|
+
if (g != null && g !== "") return String(g);
|
|
2438
|
+
const w = d, N = S.get(w);
|
|
2439
|
+
if (N) return N;
|
|
2440
|
+
h += 1;
|
|
2441
|
+
const k = `local-${h}`;
|
|
2442
|
+
return S.set(w, k), k;
|
|
2443
|
+
}
|
|
2444
|
+
function G(d) {
|
|
2445
|
+
return d.required || d.isRequired;
|
|
2446
|
+
}
|
|
2447
|
+
return (d, g) => {
|
|
2448
|
+
const w = Tt, N = sn("Delete"), k = St, I = et, L = Bt;
|
|
2449
|
+
return y(), P("div", Ao, [
|
|
2450
|
+
J("div", Do, [
|
|
2451
|
+
le(L, {
|
|
2425
2452
|
class: "global-info-table-renderer__table",
|
|
2426
|
-
data:
|
|
2427
|
-
"row-key":
|
|
2453
|
+
data: d.section.rows,
|
|
2454
|
+
"row-key": V
|
|
2428
2455
|
}, {
|
|
2429
|
-
default:
|
|
2430
|
-
(y(!0),
|
|
2431
|
-
key:
|
|
2432
|
-
prop:
|
|
2433
|
-
label:
|
|
2434
|
-
width: C
|
|
2435
|
-
"min-width": i(
|
|
2456
|
+
default: F(() => [
|
|
2457
|
+
(y(!0), P(de, null, oe(o.value, (C) => (y(), M(w, {
|
|
2458
|
+
key: c(C),
|
|
2459
|
+
prop: C.code,
|
|
2460
|
+
label: C.label,
|
|
2461
|
+
width: B(C),
|
|
2462
|
+
"min-width": i(C)
|
|
2436
2463
|
}, {
|
|
2437
|
-
header:
|
|
2438
|
-
J("span",
|
|
2439
|
-
|
|
2440
|
-
J("span", null, ee(
|
|
2464
|
+
header: F(() => [
|
|
2465
|
+
J("span", Ko, [
|
|
2466
|
+
G(C) ? (y(), P("span", qo, "*")) : Y("", !0),
|
|
2467
|
+
J("span", null, ee(C.label), 1)
|
|
2441
2468
|
])
|
|
2442
2469
|
]),
|
|
2443
|
-
default:
|
|
2444
|
-
|
|
2470
|
+
default: F(({ row: O, $index: ae }) => [
|
|
2471
|
+
u(C) ? j(d.$slots, u(C), D({
|
|
2445
2472
|
key: 0,
|
|
2446
2473
|
ref_for: !0
|
|
2447
|
-
}, p(
|
|
2474
|
+
}, p(C, O, ae)), void 0, !0) : d.editing && b(C) ? (y(), M(Ht, {
|
|
2448
2475
|
key: 1,
|
|
2449
|
-
field:
|
|
2450
|
-
"model-value":
|
|
2451
|
-
section:
|
|
2452
|
-
row:
|
|
2476
|
+
field: C,
|
|
2477
|
+
"model-value": O[C.code],
|
|
2478
|
+
section: d.section,
|
|
2479
|
+
row: O,
|
|
2453
2480
|
"row-index": ae,
|
|
2454
|
-
onLoadOptions: () => v(
|
|
2455
|
-
"onUpdate:modelValue": (pe) =>
|
|
2456
|
-
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (y(),
|
|
2481
|
+
onLoadOptions: () => v(C, O),
|
|
2482
|
+
"onUpdate:modelValue": (pe) => l(O, ae, C, pe)
|
|
2483
|
+
}, null, 8, ["field", "model-value", "section", "row", "row-index", "onLoadOptions", "onUpdate:modelValue"])) : (y(), M(Wt, {
|
|
2457
2484
|
key: 2,
|
|
2458
|
-
field:
|
|
2459
|
-
value:
|
|
2460
|
-
section:
|
|
2461
|
-
row:
|
|
2485
|
+
field: C,
|
|
2486
|
+
value: O[C.code],
|
|
2487
|
+
section: d.section,
|
|
2488
|
+
row: O,
|
|
2462
2489
|
"row-index": ae
|
|
2463
2490
|
}, null, 8, ["field", "value", "section", "row", "row-index"]))
|
|
2464
2491
|
]),
|
|
2465
2492
|
_: 2
|
|
2466
2493
|
}, 1032, ["prop", "label", "width", "min-width"]))), 128)),
|
|
2467
|
-
|
|
2494
|
+
d.editing ? (y(), M(w, {
|
|
2468
2495
|
key: 0,
|
|
2469
2496
|
label: "操作",
|
|
2470
2497
|
width: "104",
|
|
2471
2498
|
fixed: "right"
|
|
2472
2499
|
}, {
|
|
2473
|
-
default:
|
|
2474
|
-
|
|
2500
|
+
default: F(({ $index: C }) => [
|
|
2501
|
+
d.showDelete ? (y(), M(Go, {
|
|
2475
2502
|
key: 0,
|
|
2476
|
-
onConfirm: (
|
|
2503
|
+
onConfirm: (O) => a(C)
|
|
2477
2504
|
}, {
|
|
2478
|
-
default:
|
|
2479
|
-
|
|
2505
|
+
default: F(() => [
|
|
2506
|
+
le(I, {
|
|
2480
2507
|
class: "global-info-table-renderer__delete",
|
|
2481
2508
|
link: "",
|
|
2482
2509
|
type: "danger"
|
|
2483
2510
|
}, {
|
|
2484
|
-
default:
|
|
2485
|
-
|
|
2486
|
-
default:
|
|
2487
|
-
|
|
2511
|
+
default: F(() => [
|
|
2512
|
+
le(k, { class: "global-info-table-renderer__delete-icon" }, {
|
|
2513
|
+
default: F(() => [
|
|
2514
|
+
le(N)
|
|
2488
2515
|
]),
|
|
2489
2516
|
_: 1
|
|
2490
2517
|
}),
|
|
2491
|
-
|
|
2518
|
+
g[0] || (g[0] = Fe(" 删除 "))
|
|
2492
2519
|
]),
|
|
2493
2520
|
_: 1
|
|
2494
2521
|
})
|
|
2495
2522
|
]),
|
|
2496
2523
|
_: 2
|
|
2497
|
-
}, 1032, ["onConfirm"])) :
|
|
2524
|
+
}, 1032, ["onConfirm"])) : Y("", !0)
|
|
2498
2525
|
]),
|
|
2499
2526
|
_: 1
|
|
2500
|
-
})) :
|
|
2527
|
+
})) : Y("", !0)
|
|
2501
2528
|
]),
|
|
2502
2529
|
_: 3
|
|
2503
2530
|
}, 8, ["data"])
|
|
@@ -2505,7 +2532,7 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2505
2532
|
]);
|
|
2506
2533
|
};
|
|
2507
2534
|
}
|
|
2508
|
-
}),
|
|
2535
|
+
}), Uo = /* @__PURE__ */ X(Jo, [["__scopeId", "data-v-2fa29438"]]), xo = /* @__PURE__ */ U({
|
|
2509
2536
|
name: "GlobalInfoAutoRenderer",
|
|
2510
2537
|
__name: "GlobalInfoAutoRenderer",
|
|
2511
2538
|
props: {
|
|
@@ -2516,14 +2543,14 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2516
2543
|
actions: {}
|
|
2517
2544
|
},
|
|
2518
2545
|
setup(t) {
|
|
2519
|
-
return (e, n) => e.section.renderType === "table" ? (y(),
|
|
2546
|
+
return (e, n) => e.section.renderType === "table" ? (y(), M(Uo, {
|
|
2520
2547
|
key: 0,
|
|
2521
2548
|
section: e.section,
|
|
2522
2549
|
node: e.node,
|
|
2523
2550
|
editing: e.editing,
|
|
2524
2551
|
state: e.state,
|
|
2525
2552
|
actions: e.actions
|
|
2526
|
-
}, null, 8, ["section", "node", "editing", "state", "actions"])) : (y(),
|
|
2553
|
+
}, null, 8, ["section", "node", "editing", "state", "actions"])) : (y(), M(Oo, {
|
|
2527
2554
|
key: 1,
|
|
2528
2555
|
section: e.section,
|
|
2529
2556
|
node: e.node,
|
|
@@ -2532,7 +2559,7 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2532
2559
|
actions: e.actions
|
|
2533
2560
|
}, null, 8, ["section", "node", "editing", "state", "actions"]));
|
|
2534
2561
|
}
|
|
2535
|
-
}),
|
|
2562
|
+
}), Ho = /* @__PURE__ */ U({
|
|
2536
2563
|
name: "GlobalInfoSectionOutlet",
|
|
2537
2564
|
__name: "GlobalInfoSectionOutlet",
|
|
2538
2565
|
props: {
|
|
@@ -2543,42 +2570,42 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2543
2570
|
actions: {}
|
|
2544
2571
|
},
|
|
2545
2572
|
setup(t) {
|
|
2546
|
-
const e = t, n = ve(), o =
|
|
2547
|
-
const
|
|
2573
|
+
const e = t, n = ve(), o = _(() => e.editing ?? e.actions.isEditing(e.section)), a = _(() => e.section.renderType === "table" ? e.section.rows.length === 0 : e.section.fields.length === 0), l = _(() => {
|
|
2574
|
+
const u = v(e.section.id || e.section.key), b = p(e.section.renderType);
|
|
2548
2575
|
return [
|
|
2549
|
-
|
|
2576
|
+
u,
|
|
2550
2577
|
b,
|
|
2551
2578
|
"default"
|
|
2552
|
-
].find((
|
|
2579
|
+
].find((B) => !!(B && n[B])) ?? "";
|
|
2553
2580
|
});
|
|
2554
|
-
function v(
|
|
2555
|
-
const b = String(
|
|
2581
|
+
function v(u) {
|
|
2582
|
+
const b = String(u ?? "").trim();
|
|
2556
2583
|
return b ? `section-${b}` : "";
|
|
2557
2584
|
}
|
|
2558
|
-
function p(
|
|
2559
|
-
return
|
|
2585
|
+
function p(u) {
|
|
2586
|
+
return u === "form" || u === "table" ? u : "";
|
|
2560
2587
|
}
|
|
2561
|
-
return (
|
|
2588
|
+
return (u, b) => l.value ? j(u.$slots, l.value, {
|
|
2562
2589
|
key: 0,
|
|
2563
|
-
section:
|
|
2564
|
-
sectionView:
|
|
2565
|
-
node:
|
|
2590
|
+
section: u.section,
|
|
2591
|
+
sectionView: u.section,
|
|
2592
|
+
node: u.node,
|
|
2566
2593
|
editing: o.value,
|
|
2567
2594
|
isEmpty: a.value,
|
|
2568
2595
|
empty: a.value,
|
|
2569
|
-
fields:
|
|
2570
|
-
state:
|
|
2571
|
-
actions:
|
|
2572
|
-
}) : (y(),
|
|
2596
|
+
fields: u.section.fields,
|
|
2597
|
+
state: u.state,
|
|
2598
|
+
actions: u.actions
|
|
2599
|
+
}) : (y(), M(xo, {
|
|
2573
2600
|
key: 1,
|
|
2574
|
-
section:
|
|
2575
|
-
node:
|
|
2601
|
+
section: u.section,
|
|
2602
|
+
node: u.node,
|
|
2576
2603
|
editing: o.value,
|
|
2577
|
-
state:
|
|
2578
|
-
actions:
|
|
2604
|
+
state: u.state,
|
|
2605
|
+
actions: u.actions
|
|
2579
2606
|
}, null, 8, ["section", "node", "editing", "state", "actions"]));
|
|
2580
2607
|
}
|
|
2581
|
-
}),
|
|
2608
|
+
}), Wo = U({
|
|
2582
2609
|
name: "GlobalInfoSlotErrorBoundary",
|
|
2583
2610
|
props: {
|
|
2584
2611
|
boundaryKey: {
|
|
@@ -2595,32 +2622,32 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2595
2622
|
},
|
|
2596
2623
|
setup(t, { emit: e, slots: n }) {
|
|
2597
2624
|
const o = ne(!1);
|
|
2598
|
-
|
|
2625
|
+
je(
|
|
2599
2626
|
() => t.boundaryKey,
|
|
2600
2627
|
() => {
|
|
2601
2628
|
o.value = !1;
|
|
2602
2629
|
}
|
|
2603
|
-
),
|
|
2604
|
-
function a(
|
|
2605
|
-
o.value = !0, console.error(`[GlobalInfoSlotErrorBoundary] ${t.label || "section"} slot render failed`,
|
|
2630
|
+
), un((l) => (a(l), !1));
|
|
2631
|
+
function a(l) {
|
|
2632
|
+
o.value = !0, console.error(`[GlobalInfoSlotErrorBoundary] ${t.label || "section"} slot render failed`, l), e("error", l);
|
|
2606
2633
|
}
|
|
2607
2634
|
return () => {
|
|
2608
2635
|
if (o.value)
|
|
2609
2636
|
return n.fallback?.() ?? null;
|
|
2610
2637
|
try {
|
|
2611
2638
|
return n.default?.() ?? null;
|
|
2612
|
-
} catch (
|
|
2613
|
-
return a(
|
|
2639
|
+
} catch (l) {
|
|
2640
|
+
return a(l), n.fallback?.() ?? null;
|
|
2614
2641
|
}
|
|
2615
2642
|
};
|
|
2616
2643
|
}
|
|
2617
|
-
}),
|
|
2644
|
+
}), Yo = { class: "global-info-section-block" }, Zo = {
|
|
2618
2645
|
key: 0,
|
|
2619
2646
|
class: "global-info-section-block__header"
|
|
2620
|
-
},
|
|
2647
|
+
}, Qo = { class: "global-info-section-block__title-wrap" }, Xo = { class: "global-info-section-block__title" }, ea = {
|
|
2621
2648
|
key: 0,
|
|
2622
2649
|
class: "global-info-section-block__actions"
|
|
2623
|
-
},
|
|
2650
|
+
}, ta = { class: "global-info-section-block__body" }, na = /* @__PURE__ */ U({
|
|
2624
2651
|
name: "GlobalInfoSectionBlock",
|
|
2625
2652
|
__name: "GlobalInfoSectionBlock",
|
|
2626
2653
|
props: {
|
|
@@ -2633,172 +2660,172 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2633
2660
|
onSave: { type: Function }
|
|
2634
2661
|
},
|
|
2635
2662
|
setup(t) {
|
|
2636
|
-
const e = t, n = ve(), o = ne(!1), a = ne(null),
|
|
2637
|
-
const
|
|
2638
|
-
return
|
|
2639
|
-
}),
|
|
2663
|
+
const e = t, n = ve(), o = ne(!1), a = ne(null), l = ne(null), v = _(() => !!e.hideHeader), p = _(() => e.actions.getSectionStatus(e.node)), u = _(() => e.actions.getSection(e.node) ?? l.value), b = _(() => u.value?.title || e.node.tagName || e.node.label || "-"), B = _(() => !!(u.value && e.actions.isEditing(u.value))), i = _(() => u.value?.renderType === "table"), c = _(() => o.value || p.value.loading), m = _(() => V(a.value || p.value.error)), h = _(() => {
|
|
2664
|
+
const I = u.value;
|
|
2665
|
+
return I ? I.renderType === "table" ? I.rows.length === 0 : I.fields.length === 0 : !0;
|
|
2666
|
+
}), S = _(() => ({
|
|
2640
2667
|
node: e.node,
|
|
2641
|
-
section:
|
|
2642
|
-
sectionView:
|
|
2643
|
-
fields:
|
|
2668
|
+
section: u.value,
|
|
2669
|
+
sectionView: u.value,
|
|
2670
|
+
fields: u.value?.fields ?? [],
|
|
2644
2671
|
title: b.value,
|
|
2645
|
-
editing:
|
|
2646
|
-
loading:
|
|
2672
|
+
editing: B.value,
|
|
2673
|
+
loading: c.value,
|
|
2647
2674
|
error: a.value || p.value.error,
|
|
2648
2675
|
errorMessage: m.value,
|
|
2649
|
-
isEmpty:
|
|
2650
|
-
empty:
|
|
2676
|
+
isEmpty: h.value,
|
|
2677
|
+
empty: h.value,
|
|
2651
2678
|
sectionStatus: p.value,
|
|
2652
2679
|
state: e.state,
|
|
2653
2680
|
actions: e.actions,
|
|
2654
|
-
reload:
|
|
2655
|
-
handleEdit:
|
|
2656
|
-
handleCancel:
|
|
2657
|
-
handleAddTableRow:
|
|
2658
|
-
handleSave:
|
|
2681
|
+
reload: k,
|
|
2682
|
+
handleEdit: G,
|
|
2683
|
+
handleCancel: d,
|
|
2684
|
+
handleAddTableRow: g,
|
|
2685
|
+
handleSave: w
|
|
2659
2686
|
}));
|
|
2660
|
-
function
|
|
2661
|
-
return
|
|
2662
|
-
}
|
|
2663
|
-
async function
|
|
2664
|
-
const
|
|
2665
|
-
|
|
2666
|
-
}
|
|
2667
|
-
async function
|
|
2668
|
-
const
|
|
2669
|
-
|
|
2670
|
-
}
|
|
2671
|
-
function
|
|
2672
|
-
const
|
|
2673
|
-
if (!
|
|
2674
|
-
const
|
|
2675
|
-
e.actions.saveRow(
|
|
2676
|
-
}
|
|
2677
|
-
async function
|
|
2678
|
-
const
|
|
2679
|
-
if (
|
|
2687
|
+
function V(I) {
|
|
2688
|
+
return I ? I instanceof Error ? I.message : String(I) : "";
|
|
2689
|
+
}
|
|
2690
|
+
async function G() {
|
|
2691
|
+
const I = u.value;
|
|
2692
|
+
I && (await e.onEdit?.(I, e.node), e.onEdit || e.actions.startEdit(I));
|
|
2693
|
+
}
|
|
2694
|
+
async function d() {
|
|
2695
|
+
const I = u.value;
|
|
2696
|
+
I && (await e.onCancel?.(I, e.node), e.onCancel || e.actions.cancelEdit(I));
|
|
2697
|
+
}
|
|
2698
|
+
function g() {
|
|
2699
|
+
const I = u.value;
|
|
2700
|
+
if (!I) return;
|
|
2701
|
+
const L = I.fields.reduce((C, O) => (C[O.code] = O.value ?? "", C), { __rowKey: `new-${Date.now()}` });
|
|
2702
|
+
e.actions.saveRow(I, L, -1);
|
|
2703
|
+
}
|
|
2704
|
+
async function w() {
|
|
2705
|
+
const I = u.value;
|
|
2706
|
+
if (I)
|
|
2680
2707
|
try {
|
|
2681
2708
|
if (e.onSave) {
|
|
2682
|
-
await e.onSave(
|
|
2709
|
+
await e.onSave(I, e.node);
|
|
2683
2710
|
return;
|
|
2684
2711
|
}
|
|
2685
|
-
await e.actions.saveSection(
|
|
2686
|
-
} catch (
|
|
2687
|
-
a.value =
|
|
2712
|
+
await e.actions.saveSection(I);
|
|
2713
|
+
} catch (L) {
|
|
2714
|
+
a.value = L, console.error("[GlobalInfoSectionBlock] save section failed", L);
|
|
2688
2715
|
}
|
|
2689
2716
|
}
|
|
2690
|
-
function
|
|
2691
|
-
a.value =
|
|
2717
|
+
function N(I) {
|
|
2718
|
+
a.value = I;
|
|
2692
2719
|
}
|
|
2693
|
-
async function
|
|
2694
|
-
o.value = !0, a.value = null,
|
|
2720
|
+
async function k() {
|
|
2721
|
+
o.value = !0, a.value = null, l.value = null;
|
|
2695
2722
|
try {
|
|
2696
|
-
|
|
2697
|
-
} catch (
|
|
2698
|
-
a.value =
|
|
2723
|
+
l.value = await e.actions.loadSection(e.node);
|
|
2724
|
+
} catch (I) {
|
|
2725
|
+
a.value = I, console.error("[GlobalInfoSectionBlock] load section failed", I);
|
|
2699
2726
|
} finally {
|
|
2700
2727
|
o.value = !1;
|
|
2701
2728
|
}
|
|
2702
2729
|
}
|
|
2703
|
-
return
|
|
2704
|
-
|
|
2705
|
-
}),
|
|
2730
|
+
return bt(() => {
|
|
2731
|
+
k();
|
|
2732
|
+
}), je(
|
|
2706
2733
|
() => e.node.key,
|
|
2707
2734
|
() => {
|
|
2708
|
-
|
|
2735
|
+
k();
|
|
2709
2736
|
}
|
|
2710
|
-
), (
|
|
2711
|
-
const
|
|
2712
|
-
return y(),
|
|
2713
|
-
v.value ?
|
|
2714
|
-
j(
|
|
2715
|
-
J("div",
|
|
2716
|
-
|
|
2717
|
-
J("h3",
|
|
2737
|
+
), (I, L) => {
|
|
2738
|
+
const C = et;
|
|
2739
|
+
return y(), P("section", Yo, [
|
|
2740
|
+
v.value ? Y("", !0) : (y(), P("header", Zo, [
|
|
2741
|
+
j(I.$slots, "header", ce(me(S.value)), () => [
|
|
2742
|
+
J("div", Qo, [
|
|
2743
|
+
L[0] || (L[0] = J("span", { class: "global-info-section-block__marker" }, null, -1)),
|
|
2744
|
+
J("h3", Xo, ee(b.value), 1)
|
|
2718
2745
|
]),
|
|
2719
|
-
j(
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2746
|
+
j(I.$slots, "actions", ce(me(S.value)), () => [
|
|
2747
|
+
u.value ? (y(), P("div", ea, [
|
|
2748
|
+
B.value ? (y(), P(de, { key: 1 }, [
|
|
2749
|
+
le(C, {
|
|
2723
2750
|
class: "global-info-section-block__cancel",
|
|
2724
2751
|
link: "",
|
|
2725
2752
|
disabled: p.value.saving,
|
|
2726
|
-
onClick:
|
|
2753
|
+
onClick: d
|
|
2727
2754
|
}, {
|
|
2728
|
-
default:
|
|
2729
|
-
|
|
2755
|
+
default: F(() => L[2] || (L[2] = [
|
|
2756
|
+
Fe(" 取消 ")
|
|
2730
2757
|
])),
|
|
2731
2758
|
_: 1
|
|
2732
2759
|
}, 8, ["disabled"]),
|
|
2733
|
-
i.value ? (y(),
|
|
2760
|
+
i.value ? (y(), M(C, {
|
|
2734
2761
|
key: 0,
|
|
2735
2762
|
class: "global-info-section-block__add",
|
|
2736
2763
|
link: "",
|
|
2737
2764
|
disabled: p.value.saving,
|
|
2738
|
-
onClick:
|
|
2765
|
+
onClick: g
|
|
2739
2766
|
}, {
|
|
2740
|
-
default:
|
|
2741
|
-
|
|
2767
|
+
default: F(() => L[3] || (L[3] = [
|
|
2768
|
+
Fe(" 新增 ")
|
|
2742
2769
|
])),
|
|
2743
2770
|
_: 1
|
|
2744
|
-
}, 8, ["disabled"])) :
|
|
2745
|
-
|
|
2771
|
+
}, 8, ["disabled"])) : Y("", !0),
|
|
2772
|
+
le(C, {
|
|
2746
2773
|
class: "global-info-section-block__confirm",
|
|
2747
2774
|
link: "",
|
|
2748
2775
|
type: "primary",
|
|
2749
2776
|
loading: p.value.saving,
|
|
2750
|
-
onClick:
|
|
2777
|
+
onClick: w
|
|
2751
2778
|
}, {
|
|
2752
|
-
default:
|
|
2753
|
-
|
|
2779
|
+
default: F(() => [
|
|
2780
|
+
Fe(ee(i.value ? "确认" : "保存"), 1)
|
|
2754
2781
|
]),
|
|
2755
2782
|
_: 1
|
|
2756
2783
|
}, 8, ["loading"])
|
|
2757
|
-
], 64)) : (y(),
|
|
2784
|
+
], 64)) : (y(), M(C, {
|
|
2758
2785
|
key: 0,
|
|
2759
2786
|
class: "global-info-section-block__edit",
|
|
2760
2787
|
link: "",
|
|
2761
2788
|
type: "primary",
|
|
2762
|
-
disabled: p.value.saving ||
|
|
2763
|
-
onClick:
|
|
2789
|
+
disabled: p.value.saving || c.value,
|
|
2790
|
+
onClick: G
|
|
2764
2791
|
}, {
|
|
2765
|
-
default:
|
|
2766
|
-
|
|
2792
|
+
default: F(() => L[1] || (L[1] = [
|
|
2793
|
+
Fe(" 编辑 ")
|
|
2767
2794
|
])),
|
|
2768
2795
|
_: 1
|
|
2769
2796
|
}, 8, ["disabled"]))
|
|
2770
|
-
])) :
|
|
2797
|
+
])) : Y("", !0)
|
|
2771
2798
|
], !0)
|
|
2772
2799
|
], !0)
|
|
2773
2800
|
])),
|
|
2774
|
-
J("div",
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
], !0) : !
|
|
2778
|
-
|
|
2779
|
-
], !0) : (y(),
|
|
2801
|
+
J("div", ta, [
|
|
2802
|
+
c.value ? j(I.$slots, "loading", ce(D({ key: 0 }, S.value)), () => [
|
|
2803
|
+
L[4] || (L[4] = J("div", { class: "global-info-section-block__status" }, "加载中...", -1))
|
|
2804
|
+
], !0) : !u.value || h.value || m.value ? j(I.$slots, "empty", ce(D({ key: 1 }, S.value)), () => [
|
|
2805
|
+
L[5] || (L[5] = J("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
2806
|
+
], !0) : (y(), M(Wo, {
|
|
2780
2807
|
key: 2,
|
|
2781
|
-
"boundary-key":
|
|
2808
|
+
"boundary-key": I.node.key,
|
|
2782
2809
|
label: b.value,
|
|
2783
|
-
onError:
|
|
2810
|
+
onError: N
|
|
2784
2811
|
}, {
|
|
2785
|
-
fallback:
|
|
2786
|
-
j(
|
|
2787
|
-
|
|
2812
|
+
fallback: F(() => [
|
|
2813
|
+
j(I.$slots, "empty", ce(me(S.value)), () => [
|
|
2814
|
+
L[6] || (L[6] = J("div", { class: "global-info-section-block__status" }, "暂无数据", -1))
|
|
2788
2815
|
], !0)
|
|
2789
2816
|
]),
|
|
2790
|
-
default:
|
|
2791
|
-
|
|
2792
|
-
section:
|
|
2793
|
-
node:
|
|
2794
|
-
editing:
|
|
2795
|
-
state:
|
|
2796
|
-
actions:
|
|
2797
|
-
},
|
|
2798
|
-
oe(q(n), (
|
|
2817
|
+
default: F(() => [
|
|
2818
|
+
le(Ho, {
|
|
2819
|
+
section: u.value,
|
|
2820
|
+
node: I.node,
|
|
2821
|
+
editing: B.value,
|
|
2822
|
+
state: I.state,
|
|
2823
|
+
actions: I.actions
|
|
2824
|
+
}, we({ _: 2 }, [
|
|
2825
|
+
oe(q(n), (O, ae) => ({
|
|
2799
2826
|
name: ae,
|
|
2800
|
-
fn:
|
|
2801
|
-
j(
|
|
2827
|
+
fn: F((pe) => [
|
|
2828
|
+
j(I.$slots, ae, ce(me({ ...S.value, ...pe })), void 0, !0)
|
|
2802
2829
|
])
|
|
2803
2830
|
}))
|
|
2804
2831
|
]), 1032, ["section", "node", "editing", "state", "actions"])
|
|
@@ -2809,7 +2836,7 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2809
2836
|
]);
|
|
2810
2837
|
};
|
|
2811
2838
|
}
|
|
2812
|
-
}),
|
|
2839
|
+
}), oa = /* @__PURE__ */ X(na, [["__scopeId", "data-v-0d8ae722"]]), aa = { class: "global-info-group" }, la = { class: "global-info-group__header" }, ra = { class: "global-info-group__title" }, sa = { class: "global-info-group__body" }, ia = ["id"], ua = /* @__PURE__ */ U({
|
|
2813
2840
|
name: "GlobalInfoGroup",
|
|
2814
2841
|
__name: "GlobalInfoGroup",
|
|
2815
2842
|
props: {
|
|
@@ -2820,8 +2847,8 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2820
2847
|
index: {}
|
|
2821
2848
|
},
|
|
2822
2849
|
setup(t) {
|
|
2823
|
-
const e = t, n = ve(), o =
|
|
2824
|
-
function
|
|
2850
|
+
const e = t, n = ve(), o = _(() => e.group.tagName || e.group.label || "-"), a = _(() => e.children.length <= 1);
|
|
2851
|
+
function l(i, c) {
|
|
2825
2852
|
const m = e.actions.getSection(i);
|
|
2826
2853
|
return {
|
|
2827
2854
|
node: i,
|
|
@@ -2831,7 +2858,7 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2831
2858
|
sectionView: m,
|
|
2832
2859
|
state: e.state,
|
|
2833
2860
|
actions: e.actions,
|
|
2834
|
-
index:
|
|
2861
|
+
index: c,
|
|
2835
2862
|
editing: !!(m && e.actions.isEditing(m)),
|
|
2836
2863
|
sectionStatus: e.actions.getSectionStatus(i),
|
|
2837
2864
|
isSelfSection: b(i, 0) === b(e.group, 0),
|
|
@@ -2841,25 +2868,25 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2841
2868
|
};
|
|
2842
2869
|
}
|
|
2843
2870
|
function v(i) {
|
|
2844
|
-
return p("section",
|
|
2871
|
+
return p("section", u(i));
|
|
2845
2872
|
}
|
|
2846
|
-
function p(i,
|
|
2847
|
-
if (!
|
|
2848
|
-
const m = `${i}-${
|
|
2873
|
+
function p(i, c) {
|
|
2874
|
+
if (!c) return "";
|
|
2875
|
+
const m = `${i}-${c}`;
|
|
2849
2876
|
if (n[m]) return m;
|
|
2850
|
-
const
|
|
2851
|
-
return
|
|
2877
|
+
const h = m.toLowerCase();
|
|
2878
|
+
return h !== m && n[h] ? h : "";
|
|
2852
2879
|
}
|
|
2853
|
-
function
|
|
2880
|
+
function u(i) {
|
|
2854
2881
|
return String(i.id || i.infSetId || i.tagId || i.key || i.code || "").trim();
|
|
2855
2882
|
}
|
|
2856
|
-
function b(i,
|
|
2857
|
-
return i.key || i.id || i.infSetId || i.tagId || `${
|
|
2883
|
+
function b(i, c) {
|
|
2884
|
+
return i.key || i.id || i.infSetId || i.tagId || `${c}`;
|
|
2858
2885
|
}
|
|
2859
|
-
function
|
|
2886
|
+
function B(i) {
|
|
2860
2887
|
return `global-info-section-${b(i, 0)}`;
|
|
2861
2888
|
}
|
|
2862
|
-
return (i,
|
|
2889
|
+
return (i, c) => (y(), P("section", aa, [
|
|
2863
2890
|
j(i.$slots, "header", {
|
|
2864
2891
|
group: i.group,
|
|
2865
2892
|
children: i.children,
|
|
@@ -2869,12 +2896,12 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2869
2896
|
index: i.index,
|
|
2870
2897
|
isEmpty: i.children.length === 0
|
|
2871
2898
|
}, () => [
|
|
2872
|
-
J("header",
|
|
2873
|
-
|
|
2874
|
-
J("h2",
|
|
2899
|
+
J("header", la, [
|
|
2900
|
+
c[0] || (c[0] = J("span", { class: "global-info-group__marker" }, null, -1)),
|
|
2901
|
+
J("h2", ra, ee(o.value), 1)
|
|
2875
2902
|
])
|
|
2876
2903
|
], !0),
|
|
2877
|
-
J("div",
|
|
2904
|
+
J("div", sa, [
|
|
2878
2905
|
q(n).default ? j(i.$slots, "default", {
|
|
2879
2906
|
key: 0,
|
|
2880
2907
|
group: i.group,
|
|
@@ -2883,33 +2910,33 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2883
2910
|
actions: i.actions,
|
|
2884
2911
|
index: i.index,
|
|
2885
2912
|
isEmpty: i.children.length === 0
|
|
2886
|
-
}, void 0, !0) : (y(),
|
|
2887
|
-
(y(!0),
|
|
2888
|
-
id:
|
|
2889
|
-
key: b(m,
|
|
2913
|
+
}, void 0, !0) : (y(), P(de, { key: 1 }, [
|
|
2914
|
+
(y(!0), P(de, null, oe(i.children, (m, h) => (y(), P("div", {
|
|
2915
|
+
id: B(m),
|
|
2916
|
+
key: b(m, h),
|
|
2890
2917
|
class: "global-info-group__section"
|
|
2891
2918
|
}, [
|
|
2892
2919
|
v(m) ? j(i.$slots, v(m), D({
|
|
2893
2920
|
key: 0,
|
|
2894
2921
|
ref_for: !0
|
|
2895
|
-
},
|
|
2922
|
+
}, l(m, h)), void 0, !0) : q(n).section ? j(i.$slots, "section", D({
|
|
2896
2923
|
key: 1,
|
|
2897
2924
|
ref_for: !0
|
|
2898
|
-
},
|
|
2925
|
+
}, l(m, h)), void 0, !0) : (y(), M(oa, {
|
|
2899
2926
|
key: 2,
|
|
2900
2927
|
node: m,
|
|
2901
2928
|
state: i.state,
|
|
2902
2929
|
actions: i.actions,
|
|
2903
2930
|
"hide-header": a.value
|
|
2904
|
-
},
|
|
2905
|
-
oe(q(n), (
|
|
2906
|
-
name:
|
|
2907
|
-
fn:
|
|
2908
|
-
j(i.$slots,
|
|
2931
|
+
}, we({ _: 2 }, [
|
|
2932
|
+
oe(q(n), (S, V) => ({
|
|
2933
|
+
name: V,
|
|
2934
|
+
fn: F((G) => [
|
|
2935
|
+
j(i.$slots, V, D({ ref_for: !0 }, G), void 0, !0)
|
|
2909
2936
|
])
|
|
2910
2937
|
}))
|
|
2911
2938
|
]), 1032, ["node", "state", "actions", "hide-header"]))
|
|
2912
|
-
], 8,
|
|
2939
|
+
], 8, ia))), 128)),
|
|
2913
2940
|
i.children.length === 0 ? j(i.$slots, "empty", {
|
|
2914
2941
|
key: 0,
|
|
2915
2942
|
node: null,
|
|
@@ -2919,13 +2946,13 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2919
2946
|
actions: i.actions,
|
|
2920
2947
|
index: -1
|
|
2921
2948
|
}, () => [
|
|
2922
|
-
|
|
2923
|
-
], !0) :
|
|
2949
|
+
c[1] || (c[1] = J("div", { class: "global-info-group__empty" }, "暂无数据", -1))
|
|
2950
|
+
], !0) : Y("", !0)
|
|
2924
2951
|
], 64))
|
|
2925
2952
|
])
|
|
2926
2953
|
]));
|
|
2927
2954
|
}
|
|
2928
|
-
}),
|
|
2955
|
+
}), ca = /* @__PURE__ */ X(ua, [["__scopeId", "data-v-778e227f"]]), da = { class: "global-info-sections" }, pa = /* @__PURE__ */ U({
|
|
2929
2956
|
name: "GlobalInfoSections",
|
|
2930
2957
|
__name: "GlobalInfoSections",
|
|
2931
2958
|
props: {
|
|
@@ -2934,125 +2961,125 @@ const Co = ["disabled", "accept", "multiple"], $o = {
|
|
|
2934
2961
|
actions: {}
|
|
2935
2962
|
},
|
|
2936
2963
|
setup(t) {
|
|
2937
|
-
const e = t, n = ve(), o =
|
|
2938
|
-
const
|
|
2939
|
-
if (
|
|
2940
|
-
return
|
|
2941
|
-
const
|
|
2942
|
-
return [...
|
|
2964
|
+
const e = t, n = ve(), o = _(() => {
|
|
2965
|
+
const c = e.nodes.filter((g) => a(g).length > 0), m = e.nodes.filter((g) => a(g).length === 0), h = m.filter((g) => l(g)), S = m.filter((g) => !l(g)), V = c.map((g) => ({ group: g, children: a(g) })), G = h.map((g) => ({ group: g, children: [g] }));
|
|
2966
|
+
if (V.length === 0)
|
|
2967
|
+
return h.length > 0 ? G : i(S);
|
|
2968
|
+
const d = i(S);
|
|
2969
|
+
return [...V, ...G, ...d];
|
|
2943
2970
|
});
|
|
2944
|
-
function a(
|
|
2945
|
-
return
|
|
2971
|
+
function a(c) {
|
|
2972
|
+
return c.children ?? [];
|
|
2946
2973
|
}
|
|
2947
|
-
function
|
|
2948
|
-
return !String(
|
|
2974
|
+
function l(c) {
|
|
2975
|
+
return !String(c.parentId || c.parentTagId || "").trim();
|
|
2949
2976
|
}
|
|
2950
|
-
function v(
|
|
2951
|
-
return p("group", c
|
|
2977
|
+
function v(c) {
|
|
2978
|
+
return p("group", u(c));
|
|
2952
2979
|
}
|
|
2953
|
-
function p(
|
|
2980
|
+
function p(c, m) {
|
|
2954
2981
|
if (!m) return "";
|
|
2955
|
-
const
|
|
2956
|
-
if (n[
|
|
2957
|
-
const
|
|
2958
|
-
return
|
|
2982
|
+
const h = `${c}-${m}`;
|
|
2983
|
+
if (n[h]) return h;
|
|
2984
|
+
const S = h.toLowerCase();
|
|
2985
|
+
return S !== h && n[S] ? S : "";
|
|
2959
2986
|
}
|
|
2960
|
-
function c
|
|
2961
|
-
return String(
|
|
2987
|
+
function u(c) {
|
|
2988
|
+
return String(c.id || c.tagId || c.key || c.code || "").trim();
|
|
2962
2989
|
}
|
|
2963
|
-
function b(
|
|
2964
|
-
return
|
|
2990
|
+
function b(c, m) {
|
|
2991
|
+
return c.key || c.id || c.tagId || `${m}`;
|
|
2965
2992
|
}
|
|
2966
|
-
function
|
|
2967
|
-
const m =
|
|
2993
|
+
function B(c) {
|
|
2994
|
+
const m = c[0], h = m?.raw ?? {}, S = String(h.parentTagName || h.parentName || h.parentLabel || m?.parentId || "信息");
|
|
2968
2995
|
return {
|
|
2969
2996
|
...m,
|
|
2970
2997
|
key: `${m?.parentId || m?.parentTagId || m?.key || "global-info"}-group`,
|
|
2971
2998
|
id: String(m?.parentId || m?.parentTagId || m?.id || "global-info-group"),
|
|
2972
2999
|
tagId: String(m?.parentTagId || m?.parentId || m?.tagId || "global-info-group"),
|
|
2973
|
-
tagName:
|
|
2974
|
-
label:
|
|
2975
|
-
children:
|
|
3000
|
+
tagName: S,
|
|
3001
|
+
label: S,
|
|
3002
|
+
children: c
|
|
2976
3003
|
};
|
|
2977
3004
|
}
|
|
2978
|
-
function i(
|
|
3005
|
+
function i(c) {
|
|
2979
3006
|
const m = /* @__PURE__ */ new Map();
|
|
2980
|
-
return
|
|
2981
|
-
const
|
|
2982
|
-
|
|
2983
|
-
}), Array.from(m.values()).map((
|
|
2984
|
-
group:
|
|
2985
|
-
children:
|
|
3007
|
+
return c.forEach((h) => {
|
|
3008
|
+
const S = String(h.parentId || h.parentTagId || "global-info-flat"), V = m.get(S) ?? [];
|
|
3009
|
+
V.push(h), m.set(S, V);
|
|
3010
|
+
}), Array.from(m.values()).map((h) => ({
|
|
3011
|
+
group: B(h),
|
|
3012
|
+
children: h
|
|
2986
3013
|
}));
|
|
2987
3014
|
}
|
|
2988
|
-
return (
|
|
2989
|
-
(y(!0),
|
|
2990
|
-
key: b(
|
|
3015
|
+
return (c, m) => (y(), P("div", da, [
|
|
3016
|
+
(y(!0), P(de, null, oe(o.value, (h, S) => (y(), P(de, {
|
|
3017
|
+
key: b(h.group, S)
|
|
2991
3018
|
}, [
|
|
2992
|
-
v(
|
|
3019
|
+
v(h.group) ? j(c.$slots, v(h.group), {
|
|
2993
3020
|
key: 0,
|
|
2994
|
-
group:
|
|
2995
|
-
children:
|
|
2996
|
-
state:
|
|
2997
|
-
actions:
|
|
2998
|
-
index:
|
|
2999
|
-
isEmpty:
|
|
3000
|
-
}, void 0, !0) : q(n).group ? j(
|
|
3021
|
+
group: h.group,
|
|
3022
|
+
children: h.children,
|
|
3023
|
+
state: c.state,
|
|
3024
|
+
actions: c.actions,
|
|
3025
|
+
index: S,
|
|
3026
|
+
isEmpty: h.children.length === 0
|
|
3027
|
+
}, void 0, !0) : q(n).group ? j(c.$slots, "group", {
|
|
3001
3028
|
key: 1,
|
|
3002
|
-
group:
|
|
3003
|
-
children:
|
|
3004
|
-
state:
|
|
3005
|
-
actions:
|
|
3006
|
-
index:
|
|
3007
|
-
isEmpty:
|
|
3008
|
-
}, void 0, !0) : (y(),
|
|
3029
|
+
group: h.group,
|
|
3030
|
+
children: h.children,
|
|
3031
|
+
state: c.state,
|
|
3032
|
+
actions: c.actions,
|
|
3033
|
+
index: S,
|
|
3034
|
+
isEmpty: h.children.length === 0
|
|
3035
|
+
}, void 0, !0) : (y(), M(ca, {
|
|
3009
3036
|
key: 2,
|
|
3010
|
-
group:
|
|
3011
|
-
children:
|
|
3012
|
-
state:
|
|
3013
|
-
actions:
|
|
3014
|
-
index:
|
|
3015
|
-
},
|
|
3016
|
-
oe(q(n), (
|
|
3017
|
-
name:
|
|
3018
|
-
fn:
|
|
3019
|
-
j(
|
|
3037
|
+
group: h.group,
|
|
3038
|
+
children: h.children,
|
|
3039
|
+
state: c.state,
|
|
3040
|
+
actions: c.actions,
|
|
3041
|
+
index: S
|
|
3042
|
+
}, we({ _: 2 }, [
|
|
3043
|
+
oe(q(n), (V, G) => ({
|
|
3044
|
+
name: G,
|
|
3045
|
+
fn: F((d) => [
|
|
3046
|
+
j(c.$slots, G, D({ ref_for: !0 }, d), void 0, !0)
|
|
3020
3047
|
])
|
|
3021
3048
|
}))
|
|
3022
3049
|
]), 1032, ["group", "children", "state", "actions", "index"]))
|
|
3023
3050
|
], 64))), 128))
|
|
3024
3051
|
]));
|
|
3025
3052
|
}
|
|
3026
|
-
}),
|
|
3053
|
+
}), Qa = /* @__PURE__ */ X(pa, [["__scopeId", "data-v-f15cf0fb"]]);
|
|
3027
3054
|
export {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3055
|
+
xo as GlobalInfoAutoRenderer,
|
|
3056
|
+
Go as GlobalInfoDeleteConfirm,
|
|
3057
|
+
Ht as GlobalInfoFieldControl,
|
|
3058
|
+
Wt as GlobalInfoFieldValue,
|
|
3059
|
+
Oo as GlobalInfoFormRenderer,
|
|
3060
|
+
ca as GlobalInfoGroup,
|
|
3061
|
+
Za as GlobalInfoProvider,
|
|
3062
|
+
oa as GlobalInfoSectionBlock,
|
|
3063
|
+
Ho as GlobalInfoSectionOutlet,
|
|
3064
|
+
Qa as GlobalInfoSections,
|
|
3065
|
+
Uo as GlobalInfoTableRenderer,
|
|
3066
|
+
De as JtButton,
|
|
3067
|
+
_n as JtCascader,
|
|
3068
|
+
xa as JtCrudTable,
|
|
3069
|
+
wn as JtDatePicker,
|
|
3070
|
+
On as JtFilterBar,
|
|
3071
|
+
En as JtFormItems,
|
|
3072
|
+
We as JtInput,
|
|
3073
|
+
Wa as JtPageHeader,
|
|
3074
|
+
Ha as JtPagination,
|
|
3075
|
+
$n as JtSelect,
|
|
3076
|
+
qn as JtTable,
|
|
3077
|
+
io as buildGlobalInfoUpdatePayload,
|
|
3078
|
+
lo as createEmptyGlobalInfoViewModel,
|
|
3079
|
+
Ya as isGlobalInfoNode,
|
|
3080
|
+
Pt as mergeGlobalInfoChildren,
|
|
3081
|
+
ro as normalizeGlobalInfoDetail,
|
|
3082
|
+
it as normalizeGlobalInfoTree,
|
|
3083
|
+
so as resolveGlobalInfoRenderType,
|
|
3084
|
+
ko as useGlobalInfoController
|
|
3058
3085
|
};
|