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