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