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