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