@jt-home/mfe-components 1.0.1 → 1.0.3

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