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