@jt-home/mfe-components 1.0.4 → 1.0.6

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