ss-component-new 1.1.251 → 1.1.252

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.
Files changed (87) hide show
  1. package/dist/array-BhjrAPhE.js +4734 -0
  2. package/dist/array-DsZXIcD2.cjs +7 -0
  3. package/dist/{cloneDeep-DCMyAr7F.cjs → cloneDeep-B135w891.cjs} +1 -1
  4. package/dist/{cloneDeep-DtdftT0f.js → cloneDeep-BllTpMX-.js} +1 -1
  5. package/dist/icons/img/insofworkslogo.ico +0 -0
  6. package/dist/{index-Bkxb5fHL.js → index-13kbVn0I.js} +9 -9
  7. package/dist/{index-BpHu02lA.cjs → index-B3IqlUYG.cjs} +1 -1
  8. package/dist/{index-DpaiQOL7.js → index-B56weiCa.js} +4 -4
  9. package/dist/{index-DaJlOaaY.js → index-B5d1OhV0.js} +14 -14
  10. package/dist/index-B7kLv-oH.js +3757 -0
  11. package/dist/{index-DDn9ThJp.cjs → index-B8vD15H0.cjs} +1 -1
  12. package/dist/{index-mG9i_KcW.js → index-B9rOZR1k.js} +4 -4
  13. package/dist/index-BK5w6uMd.js +461 -0
  14. package/dist/{index-D8oY3D0n.js → index-BM97Nh7v.js} +102 -97
  15. package/dist/{index-Cu1Ll7fu.js → index-BOXue8CC.js} +7 -7
  16. package/dist/index-BV-R8PQn.cjs +1 -0
  17. package/dist/index-BWTusWqR.js +224 -0
  18. package/dist/{index-CKyiuQao.cjs → index-BYqzfeul.cjs} +1 -1
  19. package/dist/{index-D2rRKRIz.cjs → index-Bg0BoMyK.cjs} +1 -1
  20. package/dist/{index-Ay3zWox0.cjs → index-Bhbral-D.cjs} +1 -1
  21. package/dist/{index-Dryv4si2.cjs → index-BlWV5dab.cjs} +1 -1
  22. package/dist/index-BsUoHS_0.cjs +9 -0
  23. package/dist/{index-CkJqNCcv.cjs → index-Bsm0oDd2.cjs} +1 -1
  24. package/dist/{index-C9j-6CeR.cjs → index-BtHcbXIL.cjs} +1 -1
  25. package/dist/{index-BKRsxH2X.js → index-BubJ_6uh.js} +1 -1
  26. package/dist/{index-Du2Yuykz.js → index-C6QcbKBS.js} +4 -4
  27. package/dist/{index-BozPGCih.js → index-CCTPQ2Og.js} +6 -6
  28. package/dist/{index-B51_btNj.js → index-CKdmCGWv.js} +1 -1
  29. package/dist/{index-D3nDdxsA.js → index-CM3SjbuE.js} +3 -3
  30. package/dist/{index-DpbJKFqm.cjs → index-COjok9zl.cjs} +1 -1
  31. package/dist/{index-BZn1s6Bk.js → index-CSuijRgr.js} +7 -7
  32. package/dist/{index-Smr1ALN3.cjs → index-CXQfynOD.cjs} +1 -1
  33. package/dist/{index-BgCZDbVt.cjs → index-CgKEpk2a.cjs} +1 -1
  34. package/dist/{index-DvJjD7RR.js → index-CgZhftQO.js} +4 -4
  35. package/dist/{index-B7gPLrkw.js → index-Cm5IxLo3.js} +2893 -2892
  36. package/dist/{index-BPaNMRn3.cjs → index-CmW94cTp.cjs} +1 -1
  37. package/dist/{index-BHTSR3FE.cjs → index-D-SMmlK-.cjs} +33 -33
  38. package/dist/{index-DYNeAuQw.js → index-D1-U0vrH.js} +75 -66
  39. package/dist/{index-BbIzB7YX.cjs → index-D6VayVA6.cjs} +1 -1
  40. package/dist/{index-BL7peXic.js → index-DMLGnO0b.js} +1 -1
  41. package/dist/{index-aRyZSa-G.js → index-DRxZt4Wv.js} +1 -1
  42. package/dist/{index-DcPPxNG8.js → index-DVjTXK6S.js} +5 -5
  43. package/dist/index-D_29gkCH.cjs +1 -0
  44. package/dist/{index-Cpx3RXJV.js → index-DowLTE1s.js} +1 -1
  45. package/dist/{index-DRXQ7Drm.js → index-LgF7m5cd.js} +5 -5
  46. package/dist/{index-D02e7ds8.cjs → index-MCv8h_HT.cjs} +1 -1
  47. package/dist/{index-Ck_2rIhj.cjs → index-PKHQ7Nyl.cjs} +1 -1
  48. package/dist/{index-B0HmXDcn.cjs → index-RVlvIJC4.cjs} +1 -1
  49. package/dist/{index-BqJOhKOc.cjs → index-RusK-dxZ.cjs} +1 -1
  50. package/dist/{index-C2pELaVv.cjs → index-Ub-DS2ga.cjs} +1 -1
  51. package/dist/{index-jczyrHls.js → index-VN54J5oj.js} +6 -6
  52. package/dist/{index-DE_uaxm8.js → index-X7YNR_bm.js} +3 -3
  53. package/dist/{index-CxlM7z0m.cjs → index-_vDsdUJi.cjs} +1 -1
  54. package/dist/{index-DoWWO-3y.cjs → index-g5lygwSm.cjs} +1 -1
  55. package/dist/{index-BeiGUVWl.js → index-nNNsd9if.js} +1 -1
  56. package/dist/index-vFYm7SIH.cjs +1 -0
  57. package/dist/{index-BR3hwVDI.cjs → index-xOEFDxna.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_script_setup_true_lang-B0Djzy96.js → index.vue_vue_type_script_setup_true_lang-T9gGbni6.js} +1 -1
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-DrbhnNKr.cjs → index.vue_vue_type_script_setup_true_lang-TGwej3z-.cjs} +1 -1
  60. package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-BrZ1zhys.js +612 -0
  61. package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-CREMevxh.cjs +1 -0
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-BHR0eJcV.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Bz3v6Nn0.js} +6 -6
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DhI6ANoB.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DHAxO4Cg.cjs} +1 -1
  64. package/dist/{login-Bkd6sncM.js → login-BSiDyISU.js} +2 -2
  65. package/dist/{login-BaeCkWT1.cjs → login-DSB9dWl3.cjs} +1 -1
  66. package/dist/{main-CNpsIQp6.cjs → main-B6B8EHeL.cjs} +1 -1
  67. package/dist/{main-DYIfLk_q.js → main-CNLqlWam.js} +6 -6
  68. package/dist/{menu-BkdM6zRG.js → menu-BsDSnWTk.js} +97 -78
  69. package/dist/{menu-D4qvDjG1.cjs → menu-CVJXAhG-.cjs} +4 -4
  70. package/dist/{modelComp-Crl-NAn3.cjs → modelComp-BE3B5jke.cjs} +1 -1
  71. package/dist/{modelComp-BMtv9CAa.js → modelComp-O0eO-YTR.js} +1 -1
  72. package/dist/ss-component.cjs +1 -1
  73. package/dist/ss-component.css +2 -2
  74. package/dist/ss-component.js +7 -7
  75. package/dist/ss-component3.cjs +1 -1
  76. package/dist/ss-component3.js +1 -1
  77. package/package.json +1 -1
  78. package/public/icons/img/insofworkslogo.ico +0 -0
  79. package/dist/array-Cfkocegc.cjs +0 -7
  80. package/dist/array-ajUPDjk-.js +0 -4513
  81. package/dist/index-BYQHqPN_.js +0 -3551
  82. package/dist/index-CcRLR8Gr.cjs +0 -1
  83. package/dist/index-D4k4Kt_c.cjs +0 -1
  84. package/dist/index-xGP7OXSz.cjs +0 -9
  85. package/dist/index-yhjaVvff.js +0 -461
  86. package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-DeXLg3dX.js +0 -612
  87. package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-W3uUv6w7.cjs +0 -1
@@ -0,0 +1,4734 @@
1
+ import { k as Dl, u as ea, g as la, m as aa, s as sa, I as Le } from "./index-Cm5IxLo3.js";
2
+ import { computed as pl, ref as j, watch as we, createElementBlock as Z, openBlock as W, createBlock as ge, resolveComponent as me, createVNode as G, Fragment as he, renderList as ke, createElementVNode as T, createCommentVNode as Me, toDisplayString as Q, withCtx as Y, defineComponent as Ve, reactive as dl, createTextVNode as Ee, resolveDynamicComponent as tl, renderSlot as Xe, createSlots as na, mergeProps as oa } from "vue";
3
+ import { g as ll, p as nl, a as ra } from "./index-CKdmCGWv.js";
4
+ import { s as Ae, a as Be, b as Ol, g as ia, c as ua } from "./index-B7kLv-oH.js";
5
+ import { c } from "./cloneDeep-BllTpMX-.js";
6
+ import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ import { d as ta, s as fl, E as Je } from "./menu-BsDSnWTk.js";
8
+ import { E as We } from "./index-X7YNR_bm.js";
9
+ import { u as ca } from "./modelComp-O0eO-YTR.js";
10
+ import { s as pa, a as da } from "./index-D1-U0vrH.js";
11
+ const fa = (a) => a.match(/\((.*)\)/)[1], ha = (a) => a == null ? void 0 : a.map((l) => (l = Bl(l), l)), ya = async () => {
12
+ var l, e, s, o, t, i, d, b, y, D, k, N;
13
+ let a;
14
+ const n = await ll({
15
+ key: {
16
+ type: "structure",
17
+ pageKey: "menu",
18
+ systemKey: sessionStorage.getItem("systemKey")
19
+ }
20
+ });
21
+ return (i = (t = (o = (s = (e = (l = n.data.result) == null ? void 0 : l[0]) == null ? void 0 : e.value) == null ? void 0 : s.pageData) == null ? void 0 : o.compData) == null ? void 0 : t[0]) != null && i.contents && (a = ha((N = (k = (D = (y = (b = (d = n.data.result) == null ? void 0 : d[0]) == null ? void 0 : b.value) == null ? void 0 : y.pageData) == null ? void 0 : D.compData) == null ? void 0 : k[0]) == null ? void 0 : N.contents)), a;
22
+ }, va = (a) => {
23
+ var l, e, s, o;
24
+ return {
25
+ label: a == null ? void 0 : a.name,
26
+ value: a == null ? void 0 : a.name,
27
+ children: (o = Dl((s = (e = (l = a == null ? void 0 : a.compData) == null ? void 0 : l.find((t) => (t == null ? void 0 : t.key) === "header")) == null ? void 0 : e.contents) == null ? void 0 : s[0])) == null ? void 0 : o.map((t) => ({
28
+ label: t == null ? void 0 : t.label,
29
+ value: t == null ? void 0 : t.label
30
+ }))
31
+ };
32
+ }, kl = async (a) => {
33
+ var s, o, t, i;
34
+ let n = "";
35
+ (s = c(a)) == null || s.forEach((d) => {
36
+ n = n === "" ? n + d : n + "/" + d;
37
+ });
38
+ const l = await ll({
39
+ key: {
40
+ type: "structure",
41
+ pageKey: n,
42
+ systemKey: sessionStorage.getItem("systemKey"),
43
+ parentTable: ""
44
+ }
45
+ });
46
+ let e = [];
47
+ return ((o = l == null ? void 0 : l.data) == null ? void 0 : o.type) === "success" && (e = (i = (t = l.data.result) == null ? void 0 : t.map((d) => d.value.pageData)) == null ? void 0 : i.filter((d) => (d == null ? void 0 : d.comp) === "Table"), e = e == null ? void 0 : e.map((d) => va(d))), e;
48
+ }, He = [
49
+ {
50
+ key: "单选",
51
+ value: "Select"
52
+ },
53
+ {
54
+ key: "日期",
55
+ value: "Date"
56
+ },
57
+ {
58
+ key: "长文本",
59
+ value: "TextArea"
60
+ },
61
+ {
62
+ key: "上传",
63
+ value: "Upload"
64
+ }
65
+ ], Ke = [
66
+ {
67
+ label: "输入框",
68
+ value: "Input"
69
+ },
70
+ {
71
+ label: "单选框",
72
+ value: "Select"
73
+ },
74
+ {
75
+ label: "日期选择器",
76
+ value: "Date"
77
+ },
78
+ {
79
+ label: "长文本",
80
+ value: "TextArea"
81
+ },
82
+ {
83
+ label: "附件选择器",
84
+ value: "Upload"
85
+ }
86
+ ], ma = [
87
+ {
88
+ key: "label",
89
+ label: "标签名",
90
+ type: "Input"
91
+ },
92
+ {
93
+ key: "type",
94
+ label: "类型",
95
+ type: "Select",
96
+ options: Ke
97
+ },
98
+ {
99
+ key: "originalContent",
100
+ label: "初始值",
101
+ type: "Input"
102
+ },
103
+ {
104
+ key: "value",
105
+ label: "固定值",
106
+ type: "Input"
107
+ }
108
+ ], ba = async () => {
109
+ const a = await ya();
110
+ return [
111
+ {
112
+ key: "label",
113
+ label: "标签名",
114
+ type: "Input"
115
+ },
116
+ {
117
+ key: "type",
118
+ label: "类型",
119
+ type: "Select",
120
+ options: Ke
121
+ },
122
+ {
123
+ key: "originalContent",
124
+ label: "初始值",
125
+ type: "Select"
126
+ },
127
+ {
128
+ key: "contents",
129
+ label: "选项值",
130
+ type: "Input"
131
+ },
132
+ {
133
+ key: "menuSelect",
134
+ label: "菜单选项",
135
+ type: "cascader",
136
+ options: a
137
+ },
138
+ {
139
+ key: "groupSelect",
140
+ label: "组信息选项",
141
+ type: "cascader",
142
+ options: []
143
+ }
144
+ ];
145
+ }, ga = pl(async () => await ba()), ka = [
146
+ {
147
+ key: "label",
148
+ label: "标签名",
149
+ type: "Input"
150
+ },
151
+ {
152
+ key: "type",
153
+ label: "类型",
154
+ type: "Select",
155
+ options: Ke
156
+ },
157
+ {
158
+ key: "originalContent",
159
+ label: "初始值",
160
+ type: "Date"
161
+ }
162
+ ], Ca = [
163
+ {
164
+ key: "label",
165
+ label: "标签名",
166
+ type: "Input"
167
+ },
168
+ {
169
+ key: "type",
170
+ label: "类型",
171
+ type: "Select",
172
+ options: Ke
173
+ },
174
+ {
175
+ key: "originalContent",
176
+ label: "初始值",
177
+ type: "Input"
178
+ }
179
+ ], _a = [
180
+ {
181
+ key: "label",
182
+ label: "标签名",
183
+ type: "Input"
184
+ },
185
+ {
186
+ key: "type",
187
+ label: "类型",
188
+ type: "Select",
189
+ options: Ke
190
+ }
191
+ ], q = [
192
+ {
193
+ key: "Input",
194
+ value: ma
195
+ },
196
+ {
197
+ key: "Select",
198
+ value: ga
199
+ },
200
+ {
201
+ key: "Date",
202
+ value: ka
203
+ },
204
+ {
205
+ key: "TextArea",
206
+ value: Ca
207
+ },
208
+ {
209
+ key: "Upload",
210
+ value: _a
211
+ }
212
+ ], xa = [
213
+ {
214
+ value: "normal",
215
+ label: "自定义"
216
+ },
217
+ {
218
+ value: "add",
219
+ label: "新增"
220
+ },
221
+ {
222
+ value: "fix",
223
+ label: "修改"
224
+ },
225
+ {
226
+ value: "view",
227
+ label: "查看"
228
+ },
229
+ {
230
+ value: "delete",
231
+ label: "删除"
232
+ }
233
+ ], Ue = [
234
+ {
235
+ key: "label",
236
+ label: "按钮名",
237
+ type: "Input"
238
+ },
239
+ {
240
+ key: "type",
241
+ label: "类型",
242
+ type: "Select",
243
+ options: xa
244
+ },
245
+ {
246
+ key: "background",
247
+ label: "颜色",
248
+ type: "Color"
249
+ }
250
+ ], Ze = (a) => {
251
+ var l, e, s, o, t;
252
+ let n = c(a);
253
+ if (((l = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.name) === "类型")) == null ? void 0 : l.type) === "Select") {
254
+ const i = (t = (o = (s = (e = c(n)) == null ? void 0 : e.find((d) => (d == null ? void 0 : d.name) === "选项值")) == null ? void 0 : s.value) == null ? void 0 : o.split(",")) == null ? void 0 : t.map((d) => ({
255
+ label: d,
256
+ value: d
257
+ }));
258
+ n = n == null ? void 0 : n.map((d) => ((d == null ? void 0 : d.name) === "初始值" && (d.contents = i, d.value = (d == null ? void 0 : d.value) ?? ""), d));
259
+ }
260
+ return n;
261
+ }, Bl = (a) => {
262
+ var s;
263
+ let n = {};
264
+ const l = (s = a == null ? void 0 : a.filter((o) => !Array.isArray(o))) == null ? void 0 : s[0];
265
+ n.label = l, n.value = l;
266
+ const e = a == null ? void 0 : a.filter((o) => Array.isArray(o));
267
+ return e && (e == null ? void 0 : e.length) > 0 && (n.children = e == null ? void 0 : e.map((o) => Bl(o))), n;
268
+ }, $a = { class: "form-content" }, Aa = {
269
+ __name: "index",
270
+ props: {
271
+ formRules: Object,
272
+ itemData: {
273
+ type: Array,
274
+ default: () => []
275
+ },
276
+ childItemData: {
277
+ type: Array,
278
+ default: () => []
279
+ },
280
+ index: Number
281
+ },
282
+ emits: ["change", "contentChange"],
283
+ setup(a, { emit: n }) {
284
+ const l = a, e = n, s = j([]), o = j(!1), t = j([]), i = ea(nl), d = j(!1), b = j(), y = (k) => {
285
+ var v, _, r, p;
286
+ const N = (_ = (v = c(l.itemData)) == null ? void 0 : v.find((u) => (u == null ? void 0 : u.key) === "formContent")) == null ? void 0 : _.contents, g = c(k.content);
287
+ let S = {};
288
+ g && ((r = Object.values(g)) == null ? void 0 : r.length) > 0 && ((p = Object.values(g)) == null || p.forEach((u, f) => {
289
+ S[N[f].key] = u;
290
+ }));
291
+ const h = {
292
+ content: S,
293
+ index: l == null ? void 0 : l.index,
294
+ buttonName: k == null ? void 0 : k.buttonName
295
+ };
296
+ e("change", h);
297
+ }, D = (k) => {
298
+ var S, h;
299
+ if (!k) return;
300
+ if (((S = Object.values(c(k))) == null ? void 0 : S.length) > 0) {
301
+ const v = (h = Object.values(c(k))) == null ? void 0 : h.map((r) => r);
302
+ let _ = "";
303
+ v == null || v.forEach((r) => {
304
+ r !== "" && r !== void 0 && (_ = _ === "" ? r : _ + "/" + r);
305
+ }), i.setSelectArray(v), i.setSelectString(_);
306
+ }
307
+ const N = c(l.itemData), g = N == null ? void 0 : N.map((v) => {
308
+ var _;
309
+ return (v == null ? void 0 : v.key) === "formContent" && ((_ = v.contents) == null || _.map((r, p) => {
310
+ var u, f, U, L, V, ee, C, O, $, E, I, R, K, x, H, M, ae, J, ce;
311
+ return r.type = r != null && r.type ? r.type : (L = (U = (f = (u = r == null ? void 0 : r.key) == null ? void 0 : u.split("$")) == null ? void 0 : f[1]) == null ? void 0 : U.split("(")) != null && L[0] ? (V = He == null ? void 0 : He.find((pe) => {
312
+ var ye, fe, _e, xe;
313
+ return (pe == null ? void 0 : pe.key) === ((xe = (_e = (fe = (ye = r == null ? void 0 : r.key) == null ? void 0 : ye.split("$")) == null ? void 0 : fe[1]) == null ? void 0 : _e.split("(")) == null ? void 0 : xe[0]);
314
+ })) == null ? void 0 : V.value : "Input", r.options = r != null && r.options ? r.options : ((O = (C = (ee = r == null ? void 0 : r.key) == null ? void 0 : ee.split("$")) == null ? void 0 : C[1]) == null ? void 0 : O.length) > 0 ? (R = (I = fa((E = ($ = r == null ? void 0 : r.key) == null ? void 0 : $.split("$")) == null ? void 0 : E[1])) == null ? void 0 : I.split(",")) == null ? void 0 : R.map((pe) => ({
315
+ label: pe,
316
+ value: pe
317
+ })) : [], (K = r == null ? void 0 : r.key) != null && K.includes("$") && (r.key = (H = (x = r == null ? void 0 : r.key) == null ? void 0 : x.split("$")) == null ? void 0 : H[0]), r.value = Array.isArray((M = Object.values(k)) == null ? void 0 : M[p]) ? (J = (ae = Object.values(k)) == null ? void 0 : ae[p]) == null ? void 0 : J[0] : (ce = Object.values(k)) == null ? void 0 : ce[p], r;
318
+ })), v;
319
+ });
320
+ e("contentChange", {
321
+ contents: g,
322
+ index: l.index
323
+ });
324
+ };
325
+ return we(
326
+ () => l.itemData,
327
+ () => {
328
+ var v, _, r, p, u, f, U, L, V, ee, C;
329
+ const k = (v = c(l.itemData)) == null ? void 0 : v.find((O) => (O == null ? void 0 : O.key) === "formContent"), N = (_ = c(l.itemData)) == null ? void 0 : _.find((O) => (O == null ? void 0 : O.key) === "formButton"), g = (r = c(l.itemData)) == null ? void 0 : r.find((O) => (O == null ? void 0 : O.key) === "formFlex"), S = (p = c(l.itemData)) == null ? void 0 : p.find((O) => (O == null ? void 0 : O.key) === "formWrap"), h = (u = c(l.itemData)) == null ? void 0 : u.find((O) => (O == null ? void 0 : O.key) === "enableWrap");
330
+ if ((S == null ? void 0 : S.contents) === "纵向" ? o.value = !1 : o.value = !0, d.value = (h == null ? void 0 : h.contents) === void 0 ? !1 : h == null ? void 0 : h.contents, b.value = typeof (g == null ? void 0 : g.contents) != "boolean" ? !(!(g != null && g.contents) === "" || ((f = g == null ? void 0 : g.contents) == null ? void 0 : f.toUpperCase()) === "VERTICAL") : g == null ? void 0 : g.contents, ((U = k == null ? void 0 : k.contents) == null ? void 0 : U.length) > 0 && Array.isArray(k == null ? void 0 : k.contents)) {
331
+ const O = [];
332
+ (L = k == null ? void 0 : k.contents) == null || L.forEach((I, R) => {
333
+ var K, x, H, M, ae, J, ce, pe, ye, fe, _e, xe;
334
+ if ((I == null ? void 0 : I.label) !== "") {
335
+ let $e = (I == null ? void 0 : I.label) ?? (I == null ? void 0 : I.key) ?? "", de = (I == null ? void 0 : I.type) ?? "", ve = (I == null ? void 0 : I.options) ?? [];
336
+ if ((K = I == null ? void 0 : I.key) != null && K.includes("$") && ($e = (x = c(I == null ? void 0 : I.key).split("$")) == null ? void 0 : x[0], ((M = (H = c(I == null ? void 0 : I.key).split("$")) == null ? void 0 : H[1]) == null ? void 0 : M.length) > 0)) {
337
+ const [je, Se] = (J = (ae = c(I == null ? void 0 : I.key).split("$")) == null ? void 0 : ae[1]) == null ? void 0 : J.split(/[()]/);
338
+ de = ((ce = He.find((Ne) => (Ne == null ? void 0 : Ne.key) === je)) == null ? void 0 : ce.value) ?? "", ((pe = Se == null ? void 0 : Se.split(",")) == null ? void 0 : pe.length) > 0 && (ve = (ye = Se == null ? void 0 : Se.split(",")) == null ? void 0 : ye.map((Ne) => ({
339
+ label: Ne,
340
+ value: Ne
341
+ })));
342
+ }
343
+ const re = (_e = (fe = I == null ? void 0 : I.contents) == null ? void 0 : fe.split(",")) == null ? void 0 : _e.map((je) => ({
344
+ label: je,
345
+ value: je
346
+ }));
347
+ O.push({
348
+ label: $e ?? "",
349
+ name: "t" + R,
350
+ type: de === "" ? "Input" : de,
351
+ value: I != null && I.originalContent && (I == null ? void 0 : I.originalContent) !== "" ? I.originalContent : I != null && I.value ? I.value : (ve == null ? void 0 : ve.length) > 0 ? (xe = ve == null ? void 0 : ve[0]) == null ? void 0 : xe.value : (I == null ? void 0 : I.value) ?? "",
352
+ id: (I == null ? void 0 : I.id) ?? R,
353
+ contents: (re == null ? void 0 : re.length) > 0 ? re : ve ?? [],
354
+ width: (I == null ? void 0 : I.width) ?? 1
355
+ });
356
+ }
357
+ });
358
+ const $ = (V = c(O)) == null ? void 0 : V.map((I) => I.value);
359
+ let E = "";
360
+ $ == null || $.forEach((I) => {
361
+ I !== "" && I !== void 0 && (E = E === "" ? I : E + "/" + I);
362
+ }), i.setSelectArray($), i.setSelectString(E), s.value = O;
363
+ } else
364
+ s.value = [];
365
+ if (((ee = N == null ? void 0 : N.contents) == null ? void 0 : ee.length) > 0) {
366
+ const O = [];
367
+ (C = N == null ? void 0 : N.contents) == null || C.forEach(($, E) => {
368
+ ($ == null ? void 0 : $.label) !== "" && O.push({
369
+ label: ($ == null ? void 0 : $.label) ?? "",
370
+ id: ($ == null ? void 0 : $.id) ?? E,
371
+ type: ($ == null ? void 0 : $.type) ?? "",
372
+ background: $ == null ? void 0 : $.background
373
+ });
374
+ }), t.value = O;
375
+ } else
376
+ t.value = [];
377
+ },
378
+ { deep: !0, immediate: !0 }
379
+ ), (k, N) => (W(), Z("div", $a, [
380
+ (W(), ge(Ae, {
381
+ rowContents: s.value,
382
+ formRules: a.formRules,
383
+ buttonValue: t.value,
384
+ isRowFlex: b.value,
385
+ isEnableWrap: d.value,
386
+ onOnButtonClick: y,
387
+ onChange: D,
388
+ isButtonRow: o.value,
389
+ key: l.itemData
390
+ }, null, 8, ["rowContents", "formRules", "buttonValue", "isRowFlex", "isEnableWrap", "isButtonRow"]))
391
+ ]));
392
+ }
393
+ }, Cl = /* @__PURE__ */ Ce(Aa, [["__scopeId", "data-v-05e786aa"]]), al = j(0), Nl = (a) => {
394
+ var n;
395
+ return !a || (a == null ? void 0 : a.length) === 0 ? [] : (n = c(a)) == null ? void 0 : n.map((e) => (al.value++, e = {
396
+ label: (e == null ? void 0 : e.label) ?? "",
397
+ prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
398
+ width: e != null && e.width ? parseInt(e.width) : "",
399
+ fixed: (e == null ? void 0 : e.fixed) ?? void 0,
400
+ sortable: (e == null ? void 0 : e.sortable) ?? !1,
401
+ align: (e == null ? void 0 : e.align) ?? "center",
402
+ showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
403
+ isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
404
+ isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
405
+ isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
406
+ id: (e == null ? void 0 : e.id) ?? al.value,
407
+ children: Nl(e == null ? void 0 : e.children)
408
+ }, e));
409
+ }, wa = (a) => {
410
+ var l;
411
+ return (l = c(a)) == null ? void 0 : l.map((e) => (al.value++, e = {
412
+ label: (e == null ? void 0 : e.label) ?? "",
413
+ prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
414
+ width: e != null && e.width ? parseInt(e.width) : "",
415
+ fixed: (e == null ? void 0 : e.fixed) ?? void 0,
416
+ sortable: (e == null ? void 0 : e.sortable) ?? !1,
417
+ align: (e == null ? void 0 : e.align) ?? "center",
418
+ showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
419
+ isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
420
+ isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
421
+ isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
422
+ id: (e == null ? void 0 : e.id) ?? al.value,
423
+ children: Nl(e == null ? void 0 : e.children)
424
+ }, e));
425
+ }, Sl = (a, n) => {
426
+ var l;
427
+ return a != null && a.find((e) => (e == null ? void 0 : e.id) === n) ? (l = c(a)) == null ? void 0 : l.filter((s) => (s == null ? void 0 : s.id) !== n) : (a = a == null ? void 0 : a.map((e) => (e.children = Sl(e == null ? void 0 : e.children, n), e)), a);
428
+ }, Fl = (a, n) => {
429
+ var l;
430
+ return a != null && a.find((e) => (e == null ? void 0 : e.id) === (n == null ? void 0 : n.id)) ? (l = c(a)) == null ? void 0 : l.map((s) => ((s == null ? void 0 : s.id) === (n == null ? void 0 : n.id) && (s = n), s)) : (a = a == null ? void 0 : a.map((e) => (e.children = Fl(e == null ? void 0 : e.children, n), e)), a);
431
+ }, Ll = (a, n) => {
432
+ var l;
433
+ return a != null && a.find((e) => {
434
+ var s;
435
+ return (e == null ? void 0 : e.id) === ((s = n == null ? void 0 : n.contents) == null ? void 0 : s.id);
436
+ }) ? (l = c(a)) == null ? void 0 : l.map((s) => {
437
+ var o;
438
+ return (s == null ? void 0 : s.id) === ((o = n == null ? void 0 : n.contents) == null ? void 0 : o.id) && (s = n == null ? void 0 : n.contents), s;
439
+ }) : (a = a == null ? void 0 : a.map((e) => (e.children = Ll(e == null ? void 0 : e.children, n), e)), a);
440
+ }, jl = (a, n) => {
441
+ var l;
442
+ return a != null && a.find((e) => (e == null ? void 0 : e.id) === (n == null ? void 0 : n.id)) ? (l = c(a)) == null ? void 0 : l.map((s) => ((s == null ? void 0 : s.id) === (n == null ? void 0 : n.id) && (s != null && s.children || (s.children = []), s.children.push(n.contents)), s)) : (a = a == null ? void 0 : a.map((e) => (e.children = jl(e == null ? void 0 : e.children, n), e)), a);
443
+ }, se = [
444
+ {
445
+ key: "label",
446
+ label: "标签名",
447
+ type: "Input"
448
+ },
449
+ {
450
+ key: "prop",
451
+ label: "属性名",
452
+ type: "Input"
453
+ },
454
+ {
455
+ key: "width",
456
+ label: "宽度",
457
+ type: "Input"
458
+ },
459
+ {
460
+ key: "sortable",
461
+ label: "是否支持排序",
462
+ type: "Switch"
463
+ },
464
+ {
465
+ key: "align",
466
+ label: "文本所在位置",
467
+ type: "Radio",
468
+ options: [
469
+ {
470
+ label: "left",
471
+ value: "左"
472
+ },
473
+ {
474
+ label: "center",
475
+ value: "中"
476
+ },
477
+ {
478
+ label: "right",
479
+ value: "右"
480
+ }
481
+ ]
482
+ },
483
+ {
484
+ key: "fixed",
485
+ label: "是否固定列",
486
+ type: "Switch"
487
+ }
488
+ ], Ta = [
489
+ {
490
+ label: "view",
491
+ value: "查看"
492
+ },
493
+ {
494
+ label: "fix",
495
+ value: "修改"
496
+ },
497
+ {
498
+ label: "delete",
499
+ value: "删除"
500
+ }
501
+ ], Ia = [
502
+ {
503
+ label: "add",
504
+ value: "新增"
505
+ }
506
+ ], Pe = [
507
+ {
508
+ key: "label",
509
+ label: "按钮名",
510
+ type: "Input"
511
+ },
512
+ {
513
+ key: "type",
514
+ label: "类型",
515
+ type: "Select",
516
+ options: Ia
517
+ },
518
+ {
519
+ key: "background",
520
+ label: "按钮背景色",
521
+ type: "Color"
522
+ }
523
+ ], Re = [
524
+ {
525
+ key: "label",
526
+ label: "按钮名",
527
+ type: "Input"
528
+ },
529
+ {
530
+ key: "type",
531
+ label: "类型",
532
+ type: "Select",
533
+ options: Ta
534
+ },
535
+ {
536
+ key: "textColor",
537
+ label: "按钮颜色",
538
+ type: "Color"
539
+ }
540
+ ], Ul = ta("modelTableComp", {
541
+ state: () => ({
542
+ tableIndex: 0
543
+ }),
544
+ actions: {
545
+ setTableIndex(a) {
546
+ this.tableIndex = a;
547
+ }
548
+ }
549
+ }), Ea = { class: "table-header-child" }, Da = { class: "table-header-child-main" }, Oa = { class: "table-header-child-content" }, Ba = { class: "table-header-child-content-item" }, Na = { class: "fix-button" }, Sa = { key: 0 }, Fa = { class: "form-content" }, La = {
550
+ __name: "tableNewChild",
551
+ props: {
552
+ tableChildContents: Array
553
+ },
554
+ emits: ["fixChange", "deleteChange"],
555
+ setup(a, { emit: n }) {
556
+ const l = a, e = n, s = j(!1), o = j(""), t = Ul(nl), { tableIndex: i } = fl(t);
557
+ j(0);
558
+ const d = j(""), b = j([]), y = j([]), D = (r) => {
559
+ var u;
560
+ s.value = !0;
561
+ let p = [];
562
+ se == null || se.forEach((f) => {
563
+ let U = c(i.value) + 1;
564
+ t.setTableIndex(U), p.push({
565
+ label: f == null ? void 0 : f.label,
566
+ name: f == null ? void 0 : f.label,
567
+ type: f.type,
568
+ value: r[f.key],
569
+ id: i.value,
570
+ contents: f == null ? void 0 : f.options
571
+ });
572
+ }), r != null && r.children && ((u = r == null ? void 0 : r.children) == null ? void 0 : u.length) > 0 && p.push({
573
+ children: r == null ? void 0 : r.children,
574
+ isFormColHidden: !0
575
+ }), d.value = r == null ? void 0 : r.id, b.value = p, y.value = p;
576
+ }, k = (r) => {
577
+ e("fixChange", c(r));
578
+ }, N = (r) => {
579
+ e("deleteChange", c(r));
580
+ }, g = (r) => {
581
+ s.value = !0;
582
+ let p = [];
583
+ se == null || se.forEach((u) => {
584
+ let f = c(i.value) + 1;
585
+ t.setTableIndex(f), p.push({
586
+ label: u == null ? void 0 : u.label,
587
+ name: u == null ? void 0 : u.label,
588
+ type: u.type,
589
+ value: "",
590
+ id: i.value,
591
+ contents: u == null ? void 0 : u.options
592
+ });
593
+ }), o.value = r == null ? void 0 : r.id, b.value = p, y.value = p;
594
+ }, S = (r) => {
595
+ let p = c(y.value);
596
+ p = p == null ? void 0 : p.map((u) => (u.children || (u.value = r == null ? void 0 : r[u.name]), u)), y.value = p;
597
+ }, h = () => {
598
+ var p, u;
599
+ b.value = y.value;
600
+ let r = {};
601
+ if (d.value !== "")
602
+ r.id = d.value, (p = b.value) == null || p.forEach((f) => {
603
+ const U = se == null ? void 0 : se.find((L) => (L == null ? void 0 : L.label) === (f == null ? void 0 : f.label));
604
+ U ? r[U.key] = f.value : f != null && f.children && f.children.length > 0 && (r.children = f.children);
605
+ }), s.value = !1, e("fixChange", {
606
+ contents: c(r),
607
+ id: o.value,
608
+ type: "fix"
609
+ });
610
+ else {
611
+ let f = c(i.value) + 1;
612
+ t.setTableIndex(f), r.id = "id" + i.value, (u = b.value) == null || u.forEach((U) => {
613
+ const L = se == null ? void 0 : se.find((V) => (V == null ? void 0 : V.label) === (U == null ? void 0 : U.label));
614
+ L ? r[L.key] = U.value : U != null && U.children && U.children.length > 0 && (r.children = U.children);
615
+ }), s.value = !1, e("fixChange", {
616
+ contents: c(r),
617
+ id: o.value,
618
+ type: "add"
619
+ });
620
+ }
621
+ d.value = "", b.value = [], y.value = [];
622
+ }, v = () => {
623
+ s.value = !1, d.value = "", o.value = "", b.value = [], y.value = [];
624
+ }, _ = (r) => {
625
+ We.confirm("是否确认要删除", "", {
626
+ confirmButtonText: "确认",
627
+ cancelButtonText: "取消",
628
+ type: "warning"
629
+ }).then(
630
+ () => {
631
+ e("deleteChange", r), Je({
632
+ type: "success",
633
+ message: "删除成功"
634
+ });
635
+ }
636
+ ).catch(() => {
637
+ });
638
+ };
639
+ return (r, p) => {
640
+ const u = me("svg-icon");
641
+ return W(), Z("div", Ea, [
642
+ (W(!0), Z(he, null, ke(l == null ? void 0 : l.tableChildContents, (f, U) => (W(), Z("div", Da, [
643
+ T("div", Oa, [
644
+ T("div", Ba, Q(f.label), 1),
645
+ T("div", Na, [
646
+ G(u, {
647
+ name: "ChildAdd",
648
+ class: "svg-icon-content",
649
+ style: { width: "24px", height: "24px" },
650
+ onClick: (L) => g(f)
651
+ }, null, 8, ["onClick"]),
652
+ G(u, {
653
+ name: "ChildFix",
654
+ class: "svg-icon-content",
655
+ style: { width: "24px", height: "24px" },
656
+ onClick: (L) => D(f)
657
+ }, null, 8, ["onClick"]),
658
+ G(u, {
659
+ name: "ChildDelete",
660
+ class: "svg-icon-content",
661
+ style: { width: "24px", height: "24px" },
662
+ onClick: (L) => _(f)
663
+ }, null, 8, ["onClick"])
664
+ ])
665
+ ]),
666
+ f != null && f.children && f.children.length > 0 ? (W(), Z("div", Sa, [
667
+ G(Pl, {
668
+ tableChildContents: f == null ? void 0 : f.children,
669
+ onDeleteChange: N,
670
+ onFixChange: k
671
+ }, null, 8, ["tableChildContents"])
672
+ ])) : Me("", !0)
673
+ ]))), 256)),
674
+ G(Be, {
675
+ visible: s.value,
676
+ onBeforeDestroy: v,
677
+ width: 840
678
+ }, {
679
+ default: Y(() => [
680
+ T("div", Fa, [
681
+ (W(), ge(Ae, {
682
+ rowContents: b.value,
683
+ key: b.value,
684
+ isEnableWrap: !0,
685
+ onChange: S
686
+ }, null, 8, ["rowContents"]))
687
+ ])
688
+ ]),
689
+ footer: Y(() => [
690
+ T("div", { class: "dialog-footer" }, [
691
+ T("div", {
692
+ onClick: v,
693
+ class: "cancel-button button"
694
+ }, Q("取消")),
695
+ T("div", {
696
+ class: "ok-button button",
697
+ onClick: h
698
+ }, Q("确认"))
699
+ ])
700
+ ]),
701
+ _: 1
702
+ }, 8, ["visible"])
703
+ ]);
704
+ };
705
+ }
706
+ }, ja = /* @__PURE__ */ Ce(La, [["__scopeId", "data-v-e0fef72d"]]), Ua = { class: "table-header-child" }, Pa = { class: "table-header-child-main" }, Ra = { class: "table-header-child-content" }, Ja = { class: "table-header-child-content-item" }, Wa = { class: "fix-button" }, Va = { key: 0 }, za = { class: "form-content" }, Ga = {
707
+ __name: "tableChildren",
708
+ props: {
709
+ tableChildContents: Array
710
+ },
711
+ emits: ["fixChange", "deleteChange"],
712
+ setup(a, { emit: n }) {
713
+ const l = a, e = n, s = j(!1), o = j(""), t = Ul(nl), { tableIndex: i } = fl(t), d = j(""), b = j([]), y = j([]), D = (r) => {
714
+ e("fixChange", c(r));
715
+ }, k = (r) => {
716
+ var u;
717
+ s.value = !0;
718
+ let p = [];
719
+ se == null || se.forEach((f) => {
720
+ let U = c(i.value) + 1;
721
+ t.setTableIndex(U), p.push({
722
+ label: f == null ? void 0 : f.label,
723
+ name: f == null ? void 0 : f.label,
724
+ type: f.type,
725
+ value: r[f.key],
726
+ id: i.value,
727
+ contents: f == null ? void 0 : f.options
728
+ });
729
+ }), r != null && r.children && ((u = r == null ? void 0 : r.children) == null ? void 0 : u.length) > 0 && p.push({
730
+ children: r == null ? void 0 : r.children,
731
+ isFormColHidden: !0
732
+ }), d.value = r == null ? void 0 : r.id, b.value = p, y.value = p;
733
+ }, N = (r) => {
734
+ s.value = !0;
735
+ let p = [];
736
+ se == null || se.forEach((u) => {
737
+ let f = c(i.value) + 1;
738
+ t.setTableIndex(f), p.push({
739
+ label: u == null ? void 0 : u.label,
740
+ name: u == null ? void 0 : u.label,
741
+ type: u.type,
742
+ value: "",
743
+ id: i.value,
744
+ contents: u == null ? void 0 : u.options
745
+ });
746
+ }), o.value = r == null ? void 0 : r.id, b.value = p, y.value = p;
747
+ }, g = (r) => {
748
+ let p = c(y.value);
749
+ p = p == null ? void 0 : p.map((u) => (u.children || (u.value = r == null ? void 0 : r[u.name]), u)), y.value = p;
750
+ }, S = () => {
751
+ var p, u;
752
+ b.value = y.value;
753
+ let r = {};
754
+ if (d.value !== "")
755
+ r.id = d.value, (p = b.value) == null || p.forEach((f) => {
756
+ const U = se == null ? void 0 : se.find((L) => (L == null ? void 0 : L.label) === (f == null ? void 0 : f.label));
757
+ U ? r[U.key] = f.value : f != null && f.children && f.children.length > 0 && (r.children = f.children);
758
+ }), s.value = !1, e("fixChange", {
759
+ contents: c(r),
760
+ id: o.value,
761
+ type: "fix"
762
+ });
763
+ else {
764
+ let f = c(i.value) + 1;
765
+ t.setTableIndex(f), r.id = "idChild" + i.value, (u = b.value) == null || u.forEach((U) => {
766
+ const L = se == null ? void 0 : se.find((V) => (V == null ? void 0 : V.label) === (U == null ? void 0 : U.label));
767
+ L ? r[L.key] = U.value : U != null && U.children && U.children.length > 0 && (r.children = U.children);
768
+ }), s.value = !1, e("fixChange", {
769
+ contents: c(r),
770
+ id: o.value,
771
+ type: "add"
772
+ });
773
+ }
774
+ d.value = "", b.value = [], y.value = [];
775
+ }, h = () => {
776
+ s.value = !1, d.value = "", o.value = "", b.value = [], y.value = [];
777
+ }, v = (r) => {
778
+ We.confirm("是否确认要删除", "", {
779
+ confirmButtonText: "确认",
780
+ cancelButtonText: "取消",
781
+ type: "warning"
782
+ }).then(
783
+ () => {
784
+ e("deleteChange", r), Je({
785
+ type: "success",
786
+ message: "删除成功"
787
+ });
788
+ }
789
+ ).catch(() => {
790
+ });
791
+ }, _ = (r) => {
792
+ e("deleteChange", r);
793
+ };
794
+ return (r, p) => {
795
+ const u = me("svg-icon");
796
+ return W(), Z("div", Ua, [
797
+ (W(!0), Z(he, null, ke(l == null ? void 0 : l.tableChildContents, (f, U) => (W(), Z("div", Pa, [
798
+ T("div", Ra, [
799
+ T("div", Ja, Q(f.label), 1),
800
+ T("div", Wa, [
801
+ G(u, {
802
+ name: "ChildAdd",
803
+ class: "svg-icon-content",
804
+ style: { width: "24px", height: "24px" },
805
+ onClick: (L) => N(f)
806
+ }, null, 8, ["onClick"]),
807
+ G(u, {
808
+ name: "ChildFix",
809
+ class: "svg-icon-content",
810
+ style: { width: "24px", height: "24px" },
811
+ onClick: (L) => k(f)
812
+ }, null, 8, ["onClick"]),
813
+ G(u, {
814
+ name: "ChildDelete",
815
+ class: "svg-icon-content",
816
+ style: { width: "24px", height: "24px" },
817
+ onClick: (L) => v(f)
818
+ }, null, 8, ["onClick"])
819
+ ])
820
+ ]),
821
+ f != null && f.children && f.children.length > 0 ? (W(), Z("div", Va, [
822
+ G(ja, {
823
+ tableChildContents: f == null ? void 0 : f.children,
824
+ onDeleteChange: _,
825
+ onFixChange: D
826
+ }, null, 8, ["tableChildContents"])
827
+ ])) : Me("", !0)
828
+ ]))), 256)),
829
+ G(Be, {
830
+ visible: s.value,
831
+ onBeforeDestroy: h,
832
+ width: 840
833
+ }, {
834
+ default: Y(() => [
835
+ T("div", za, [
836
+ (W(), ge(Ae, {
837
+ rowContents: b.value,
838
+ key: b.value,
839
+ isEnableWrap: !0,
840
+ onChange: g
841
+ }, null, 8, ["rowContents"]))
842
+ ])
843
+ ]),
844
+ footer: Y(() => [
845
+ T("div", { class: "dialog-footer" }, [
846
+ T("div", {
847
+ onClick: h,
848
+ class: "cancel-button button"
849
+ }, Q("取消")),
850
+ T("div", {
851
+ class: "ok-button button",
852
+ onClick: S
853
+ }, Q("确认"))
854
+ ])
855
+ ]),
856
+ _: 1
857
+ }, 8, ["visible"])
858
+ ]);
859
+ };
860
+ }
861
+ }, Pl = /* @__PURE__ */ Ce(Ga, [["__scopeId", "data-v-cc311a5f"]]), Ma = { class: "table-operate-content" }, Ka = { class: "table-operate-item" }, Ha = { class: "operate-title" }, Za = { class: "operate-content" }, qa = { class: "fix-content" }, Qa = { class: "fix-content-label" }, Xa = { class: "fix-button" }, Ya = { key: 0 }, es = { class: "operate-title" }, ls = { class: "operate-content" }, as = { class: "fix-content" }, ss = { class: "fix-content-label" }, ns = { class: "fix-button" }, os = { class: "operate-title" }, rs = { class: "operate-content" }, is = { class: "fix-content" }, us = { class: "fix-content-label" }, ts = { class: "fix-button" }, cs = { class: "operate-title" }, ps = { class: "operate-content" }, ds = { class: "fix-content" }, fs = { class: "fix-content-label" }, hs = { class: "fix-button" }, ys = { class: "operate-content" }, vs = { style: { display: "flex", "justify-content": "space-between" } }, ms = { class: "form-content" }, bs = { class: "form-content" }, gs = { class: "form-content" }, ks = { class: "form-content" }, Cs = {
862
+ __name: "operate",
863
+ props: {
864
+ itemContents: {
865
+ type: Array,
866
+ default: () => []
867
+ },
868
+ originalItemContents: {
869
+ type: Array,
870
+ default: () => []
871
+ }
872
+ },
873
+ emits: ["change"],
874
+ setup(a, { emit: n }) {
875
+ const l = a, e = n, s = j([]), o = j(!1), t = j(!1), i = j([]), d = j(!1), b = j([]), y = j(!1), D = j([]), k = j(""), N = j(""), g = j([]), S = j([]), h = j([]), v = j([]), _ = j(!1), r = j([]), p = j([]), u = j(0), f = j([]), U = j([]), L = j([]), V = () => {
876
+ _.value = !0;
877
+ let m = [];
878
+ Pe == null || Pe.forEach((A) => {
879
+ u.value++, m.push({
880
+ label: A == null ? void 0 : A.label,
881
+ name: A == null ? void 0 : A.label,
882
+ type: A.type,
883
+ value: (A == null ? void 0 : A.key) === "background" ? "var(--ssComponent-primary-color)" : "",
884
+ id: u.value,
885
+ contents: A == null ? void 0 : A.options
886
+ });
887
+ }), r.value = m, p.value = m;
888
+ }, ee = () => {
889
+ var A, B;
890
+ t.value = !0;
891
+ let m = [];
892
+ (B = (A = q == null ? void 0 : q.find((w) => (w == null ? void 0 : w.key) === "Input")) == null ? void 0 : A.value) == null || B.forEach((w) => {
893
+ u.value++, m.push({
894
+ label: w == null ? void 0 : w.label,
895
+ name: w == null ? void 0 : w.label,
896
+ type: w.type,
897
+ value: (w == null ? void 0 : w.label) === "类型" ? "Input" : "",
898
+ id: u.value,
899
+ contents: w == null ? void 0 : w.options
900
+ });
901
+ }), f.value = m, U.value = m;
902
+ }, C = async (m) => {
903
+ var A, B, w, le, X, be, z;
904
+ if ((m == null ? void 0 : m.类型) !== ((B = (A = U.value) == null ? void 0 : A.find((P) => (P == null ? void 0 : P.label) === "类型")) == null ? void 0 : B.value)) {
905
+ let P = [], ie = await ((le = (w = q == null ? void 0 : q.find((oe) => (oe == null ? void 0 : oe.key) === ((m == null ? void 0 : m.类型) === "" ? "Input" : m == null ? void 0 : m.类型))) == null ? void 0 : w.value) == null ? void 0 : le.value) ? await ((z = (be = q == null ? void 0 : q.find((oe) => (oe == null ? void 0 : oe.key) === ((m == null ? void 0 : m.类型) === "" ? "Input" : m == null ? void 0 : m.类型))) == null ? void 0 : be.value) == null ? void 0 : z.value) : (X = q == null ? void 0 : q.find((oe) => (oe == null ? void 0 : oe.key) === ((m == null ? void 0 : m.类型) === "" ? "Input" : m == null ? void 0 : m.类型))) == null ? void 0 : X.value;
906
+ ie == null || ie.forEach((oe) => {
907
+ u.value++, P.push({
908
+ label: oe == null ? void 0 : oe.label,
909
+ name: oe == null ? void 0 : oe.label,
910
+ type: oe.type,
911
+ value: (m == null ? void 0 : m[oe.label]) ?? "",
912
+ id: u.value,
913
+ contents: oe == null ? void 0 : oe.options
914
+ });
915
+ }), U.value = P, f.value = P;
916
+ } else {
917
+ let P = c(f.value);
918
+ P = P == null ? void 0 : P.map((ie) => (ie.value = m == null ? void 0 : m[ie.name], ie)), U.value = P;
919
+ }
920
+ }, O = async (m) => {
921
+ var w, le, X, be, z;
922
+ t.value = !0;
923
+ let A = [];
924
+ const B = await ((le = (w = q == null ? void 0 : q.find((P) => (P == null ? void 0 : P.key) === ((m == null ? void 0 : m.type) === "" ? "Input" : m == null ? void 0 : m.type))) == null ? void 0 : w.value) == null ? void 0 : le.value) ? await ((z = (be = q == null ? void 0 : q.find((P) => (P == null ? void 0 : P.key) === ((m == null ? void 0 : m.type) === "" ? "Input" : m == null ? void 0 : m.type))) == null ? void 0 : be.value) == null ? void 0 : z.value) : (X = q == null ? void 0 : q.find((P) => (P == null ? void 0 : P.key) === ((m == null ? void 0 : m.type) === "" ? "Input" : m == null ? void 0 : m.type))) == null ? void 0 : X.value;
925
+ B == null || B.forEach((P) => {
926
+ u.value++, A.push({
927
+ label: P == null ? void 0 : P.label,
928
+ name: P == null ? void 0 : P.label,
929
+ type: P.type,
930
+ value: (P == null ? void 0 : P.label) === "类型" && m[P.key] === "" ? "Input" : m[P.key],
931
+ id: u.value,
932
+ contents: P == null ? void 0 : P.options
933
+ });
934
+ }), k.value = m == null ? void 0 : m.id, f.value = A, U.value = A;
935
+ }, $ = (m) => {
936
+ We.confirm("是否确认要删除", "", {
937
+ confirmButtonText: "确认",
938
+ cancelButtonText: "取消",
939
+ type: "warning"
940
+ }).then(
941
+ () => {
942
+ var A, B;
943
+ L.value = (A = c(L.value)) == null ? void 0 : A.filter((w) => (w == null ? void 0 : w.id) !== (m == null ? void 0 : m.id)), e("change", (B = c(l.originalItemContents)) == null ? void 0 : B.map((w) => ((w == null ? void 0 : w.key) === "tableToForm" && (w.contents = L.value), w))), Je({
944
+ type: "success",
945
+ message: "删除成功"
946
+ });
947
+ }
948
+ ).catch(() => {
949
+ });
950
+ }, E = () => {
951
+ t.value = !1, f.value = [], k.value = "";
952
+ }, I = async () => {
953
+ var w, le, X, be, z, P, ie, oe;
954
+ f.value = U.value;
955
+ let m = {};
956
+ k.value !== "" ? m.id = k.value : (u.value++, m.id = "id" + u.value);
957
+ let A = await ((le = (w = q == null ? void 0 : q.find((ne) => {
958
+ var Te, De;
959
+ return (ne == null ? void 0 : ne.key) === (((De = (Te = f.value) == null ? void 0 : Te.find((Fe) => (Fe == null ? void 0 : Fe.label) === "类型")) == null ? void 0 : De.value) ?? "label");
960
+ })) == null ? void 0 : w.value) == null ? void 0 : le.value) ?? ((X = q == null ? void 0 : q.find((ne) => {
961
+ var Te, De;
962
+ return (ne == null ? void 0 : ne.key) === (((De = (Te = f.value) == null ? void 0 : Te.find((Fe) => (Fe == null ? void 0 : Fe.label) === "类型")) == null ? void 0 : De.value) ?? "label");
963
+ })) == null ? void 0 : X.value);
964
+ if ((be = f.value) == null || be.forEach((ne) => {
965
+ const Te = A == null ? void 0 : A.find((De) => (De == null ? void 0 : De.label) === (ne == null ? void 0 : ne.label));
966
+ Te && (m[Te.key] = ne.value);
967
+ }), m.name = m.label, (z = L.value) != null && z.find((ne) => ne.id === m.id))
968
+ L.value = (P = L.value) == null ? void 0 : P.map((ne) => (ne.id === m.id && (ne = m), ne));
969
+ else {
970
+ let ne = c(L.value);
971
+ L.value || (L.value = []), ne.push(m), L.value = ne;
972
+ }
973
+ L.value = L.value.map(({ id: ne, ...Te }) => Te), t.value = !1, k.value = "";
974
+ let B = c(l.originalItemContents);
975
+ (ie = c(l.originalItemContents)) != null && ie.find((ne) => (ne == null ? void 0 : ne.key) === "tableToForm") ? B = (oe = c(l.originalItemContents)) == null ? void 0 : oe.map((ne) => ((ne == null ? void 0 : ne.key) === "tableToForm" && (ne.contents = L.value), ne)) : B.push({
976
+ key: "tableToForm",
977
+ contents: L.value
978
+ }), e("change", B);
979
+ }, R = (m) => {
980
+ _.value = !0;
981
+ let A = [];
982
+ Pe == null || Pe.forEach((B) => {
983
+ u.value++, A.push({
984
+ label: B == null ? void 0 : B.label,
985
+ name: B == null ? void 0 : B.label,
986
+ type: B.type,
987
+ value: m[B.key],
988
+ id: u.value,
989
+ contents: B == null ? void 0 : B.options
990
+ });
991
+ }), k.value = m == null ? void 0 : m.id, r.value = A, p.value = A;
992
+ };
993
+ we(
994
+ () => y.value,
995
+ () => {
996
+ var A, B;
997
+ let m = c(l.originalItemContents);
998
+ (A = c(l.originalItemContents)) != null && A.find((w) => (w == null ? void 0 : w.key) === "page") ? m = (B = c(l.originalItemContents)) == null ? void 0 : B.map((w) => ((w == null ? void 0 : w.key) === "page" && (w.contents = y.value), w)) : m.push({
999
+ key: "page",
1000
+ contents: y.value
1001
+ }), e("change", m);
1002
+ },
1003
+ { deep: !0 }
1004
+ );
1005
+ const K = (m) => {
1006
+ We.confirm("是否确认要删除", "", {
1007
+ confirmButtonText: "确认",
1008
+ cancelButtonText: "取消",
1009
+ type: "warning"
1010
+ }).then(
1011
+ () => {
1012
+ var A, B;
1013
+ S.value = (A = c(S.value)) == null ? void 0 : A.filter((w) => (w == null ? void 0 : w.id) !== (m == null ? void 0 : m.id)), e("change", (B = c(l.originalItemContents)) == null ? void 0 : B.map((w) => ((w == null ? void 0 : w.key) === "extraButton" && (w.contents = S.value), w))), Je({
1014
+ type: "success",
1015
+ message: "删除成功"
1016
+ });
1017
+ }
1018
+ ).catch(() => {
1019
+ });
1020
+ }, x = () => {
1021
+ var B, w, le, X, be;
1022
+ r.value = p.value;
1023
+ let m = {};
1024
+ if (k.value !== "" ? m.id = k.value : (u.value++, m.id = "id" + u.value), (B = r.value) == null || B.forEach((z) => {
1025
+ const P = Pe == null ? void 0 : Pe.find((ie) => (ie == null ? void 0 : ie.label) === (z == null ? void 0 : z.label));
1026
+ P ? m[P.key] = z.value : z != null && z.children && z.children.length > 0 && (m.children = z.children);
1027
+ }), (w = S.value) != null && w.find((z) => z.id === m.id))
1028
+ S.value = (le = S.value) == null ? void 0 : le.map((z) => (z.id === m.id && (z = m), z));
1029
+ else {
1030
+ let z = c(S.value);
1031
+ z.push(m), S.value = z;
1032
+ }
1033
+ _.value = !1, k.value = "";
1034
+ let A = c(l.originalItemContents);
1035
+ (X = c(l.originalItemContents)) != null && X.find((z) => (z == null ? void 0 : z.key) === "extraButton") ? A = (be = c(l.originalItemContents)) == null ? void 0 : be.map((z) => ((z == null ? void 0 : z.key) === "extraButton" && (z.contents = S.value), z)) : A.push({
1036
+ key: "extraButton",
1037
+ contents: S.value
1038
+ }), e("change", A);
1039
+ }, H = (m) => {
1040
+ let A = c(p.value);
1041
+ A = A == null ? void 0 : A.map((B) => (B.children || (B.value = m == null ? void 0 : m[B.name]), B)), p.value = A;
1042
+ }, M = () => {
1043
+ _.value = !1, r.value = [], k.value = "";
1044
+ }, ae = (m) => {
1045
+ d.value = !0;
1046
+ let A = [];
1047
+ Re == null || Re.forEach((B) => {
1048
+ u.value++, A.push({
1049
+ label: B == null ? void 0 : B.label,
1050
+ name: B == null ? void 0 : B.label,
1051
+ type: B.type,
1052
+ value: m[B.key],
1053
+ id: u.value,
1054
+ contents: B == null ? void 0 : B.options
1055
+ });
1056
+ }), k.value = m == null ? void 0 : m.id, h.value = A, v.value = A;
1057
+ }, J = (m) => {
1058
+ We.confirm("是否确认要删除", "", {
1059
+ confirmButtonText: "确认",
1060
+ cancelButtonText: "取消",
1061
+ type: "warning"
1062
+ }).then(
1063
+ () => {
1064
+ var A, B;
1065
+ g.value = (A = c(g.value)) == null ? void 0 : A.filter((w) => (w == null ? void 0 : w.id) !== (m == null ? void 0 : m.id)), e("change", (B = c(l.originalItemContents)) == null ? void 0 : B.map((w) => ((w == null ? void 0 : w.key) === "rowButton" && (w.contents = g.value), w))), Je({
1066
+ type: "success",
1067
+ message: "删除成功"
1068
+ });
1069
+ }
1070
+ ).catch(() => {
1071
+ });
1072
+ }, ce = () => {
1073
+ o.value = !0;
1074
+ let m = [];
1075
+ se == null || se.forEach((A) => {
1076
+ u.value++, m.push({
1077
+ label: A == null ? void 0 : A.label,
1078
+ name: A == null ? void 0 : A.label,
1079
+ type: A.type,
1080
+ value: "",
1081
+ id: u.value,
1082
+ contents: A == null ? void 0 : A.options
1083
+ });
1084
+ }), b.value = m, D.value = m;
1085
+ }, pe = () => {
1086
+ d.value = !0;
1087
+ let m = [];
1088
+ Re == null || Re.forEach((A) => {
1089
+ u.value++, m.push({
1090
+ label: A == null ? void 0 : A.label,
1091
+ name: A == null ? void 0 : A.label,
1092
+ type: A.type,
1093
+ value: "",
1094
+ id: u.value,
1095
+ contents: A == null ? void 0 : A.options
1096
+ });
1097
+ }), h.value = m, v.value = m;
1098
+ }, ye = (m) => {
1099
+ let A = c(v.value);
1100
+ A = A == null ? void 0 : A.map((B) => (B.children || (B.value = m == null ? void 0 : m[B.name]), B)), v.value = A;
1101
+ }, fe = () => {
1102
+ var B, w, le, X, be;
1103
+ h.value = v.value;
1104
+ let m = {};
1105
+ if (k.value !== "" ? m.id = k.value : (u.value++, m.id = "id" + u.value), (B = h.value) == null || B.forEach((z) => {
1106
+ const P = Re == null ? void 0 : Re.find((ie) => (ie == null ? void 0 : ie.label) === (z == null ? void 0 : z.label));
1107
+ P ? m[P.key] = z.value : z != null && z.children && z.children.length > 0 && (m.children = z.children);
1108
+ }), (w = g.value) != null && w.find((z) => z.id === m.id))
1109
+ g.value = (le = g.value) == null ? void 0 : le.map((z) => (z.id === m.id && (z = m), z));
1110
+ else {
1111
+ let z = c(g.value);
1112
+ z.push(m), g.value = z;
1113
+ }
1114
+ d.value = !1, k.value = "";
1115
+ let A = c(l.originalItemContents);
1116
+ (X = c(l.originalItemContents)) != null && X.find((z) => (z == null ? void 0 : z.key) === "rowButton") ? A = (be = c(l.originalItemContents)) == null ? void 0 : be.map((z) => ((z == null ? void 0 : z.key) === "rowButton" && (z.contents = g.value), z)) : A.push({
1117
+ key: "rowButton",
1118
+ contents: g.value
1119
+ }), e("change", A);
1120
+ }, _e = () => {
1121
+ d.value = !1, k.value = "", v.value = [], h.value = [];
1122
+ }, xe = (m) => {
1123
+ o.value = !0;
1124
+ let A = [];
1125
+ se == null || se.forEach((B) => {
1126
+ u.value++, A.push({
1127
+ label: B == null ? void 0 : B.label,
1128
+ name: B == null ? void 0 : B.label,
1129
+ type: B.type,
1130
+ value: "",
1131
+ id: u.value,
1132
+ contents: B == null ? void 0 : B.options
1133
+ });
1134
+ }), b.value = A, N.value = m == null ? void 0 : m.id, D.value = A;
1135
+ }, $e = (m) => {
1136
+ var A;
1137
+ i.value = Sl(c(i.value), m == null ? void 0 : m.id), e("change", (A = c(l.originalItemContents)) == null ? void 0 : A.map((B) => {
1138
+ var w;
1139
+ return (B == null ? void 0 : B.key) === "header" && (B.contents = (w = i.value) != null && w.some((le) => le == null ? void 0 : le.children) ? [i.value] : i.value), B;
1140
+ }));
1141
+ }, de = (m) => {
1142
+ var B, w, le;
1143
+ m.type === "fix" ? m.id !== "" ? i.value = Ll(i.value, m) : i.value = Fl(i.value, m == null ? void 0 : m.contents) : i.value = jl(i.value, m), i.value = (B = i.value) != null && B.some((X) => X == null ? void 0 : X.children) ? [i.value] : i.value, k.value = "";
1144
+ let A = c(l.originalItemContents);
1145
+ (w = c(l.originalItemContents)) != null && w.find((X) => (X == null ? void 0 : X.key) === "header") ? A = (le = c(l.originalItemContents)) == null ? void 0 : le.map((X) => ((X == null ? void 0 : X.key) === "header" && (X.contents = i.value), X)) : A.push({
1146
+ key: "header",
1147
+ contents: i.value
1148
+ }), e("change", A);
1149
+ }, ve = (m) => {
1150
+ var B;
1151
+ o.value = !0;
1152
+ let A = [];
1153
+ se == null || se.forEach((w) => {
1154
+ u.value++, A.push({
1155
+ label: w == null ? void 0 : w.label,
1156
+ name: w == null ? void 0 : w.label,
1157
+ type: w.type,
1158
+ value: m[w.key],
1159
+ id: u.value,
1160
+ contents: w == null ? void 0 : w.options
1161
+ });
1162
+ }), m != null && m.children && ((B = m == null ? void 0 : m.children) == null ? void 0 : B.length) > 0 && A.push({
1163
+ children: m == null ? void 0 : m.children,
1164
+ isFormColHidden: !0
1165
+ }), k.value = m == null ? void 0 : m.id, N.value = "", b.value = A, D.value = A;
1166
+ }, re = (m) => {
1167
+ let A = c(D.value);
1168
+ A = A == null ? void 0 : A.map((B) => (B.children || (B.value = m == null ? void 0 : m[B.name]), B)), D.value = A;
1169
+ }, je = () => {
1170
+ o.value = !1, k.value = "", N.value = "", D.value = [];
1171
+ }, Se = () => {
1172
+ var B, w, le, X, be, z;
1173
+ b.value = D.value;
1174
+ let m = {};
1175
+ if (k.value !== "" ? m.id = k.value : (u.value++, m.id = "id" + u.value), (B = b.value) == null || B.forEach((P) => {
1176
+ const ie = se == null ? void 0 : se.find((oe) => (oe == null ? void 0 : oe.label) === (P == null ? void 0 : P.label));
1177
+ ie ? m[ie.key] = P.value : P != null && P.children && P.children.length > 0 && (m.children = P.children);
1178
+ }), (w = i.value) != null && w.find((P) => P.id === m.id))
1179
+ i.value = (le = i.value) == null ? void 0 : le.map((P) => (P.id === m.id && (P = m), P));
1180
+ else {
1181
+ let P = c(i.value) ?? [];
1182
+ N.value === "" ? P.push(m) : P = P == null ? void 0 : P.map((ie) => (ie.id === N.value && (ie.children || (ie.children = []), ie.children.push(m)), ie)), i.value = P;
1183
+ }
1184
+ i.value = (X = i.value) != null && X.some((P) => P == null ? void 0 : P.children) ? [i.value] : i.value, o.value = !1, k.value = "", N.value = "";
1185
+ let A = c(l.originalItemContents);
1186
+ (be = c(l.originalItemContents)) != null && be.find((P) => (P == null ? void 0 : P.key) === "header") ? A = (z = c(l.originalItemContents)) == null ? void 0 : z.map((P) => ((P == null ? void 0 : P.key) === "header" && (P.contents = i.value), P)) : A.push({
1187
+ key: "header",
1188
+ contents: i.value
1189
+ }), e("change", A);
1190
+ }, Ne = (m) => {
1191
+ We.confirm("是否确认要删除", "", {
1192
+ confirmButtonText: "确认",
1193
+ cancelButtonText: "取消",
1194
+ type: "warning"
1195
+ }).then(
1196
+ () => {
1197
+ var A, B;
1198
+ i.value = (A = c(i.value)) == null ? void 0 : A.filter((w) => (w == null ? void 0 : w.id) !== (m == null ? void 0 : m.id)), e("change", (B = c(l.originalItemContents)) == null ? void 0 : B.map((w) => {
1199
+ var le;
1200
+ return (w == null ? void 0 : w.key) === "header" && (w.contents = (le = i.value) != null && le.some((X) => X == null ? void 0 : X.children) ? [i.value] : i.value), w;
1201
+ })), Je({
1202
+ type: "success",
1203
+ message: "删除成功"
1204
+ });
1205
+ }
1206
+ ).catch(() => {
1207
+ });
1208
+ };
1209
+ return we(
1210
+ () => l.originalItemContents,
1211
+ () => {
1212
+ var m, A, B, w, le, X, be, z, P, ie, oe, ne, Te, De, Fe, vl, ml, bl, gl;
1213
+ if (!(!l.originalItemContents || l.originalItemContents.length === 0))
1214
+ if (s.value = c(l.originalItemContents), i.value = (A = (m = s.value) == null ? void 0 : m.find((F) => (F == null ? void 0 : F.key) === "header")) == null ? void 0 : A.contents, g.value = (w = (B = s.value) == null ? void 0 : B.find((F) => (F == null ? void 0 : F.key) === "rowButton")) == null ? void 0 : w.contents, S.value = (X = (le = s.value) == null ? void 0 : le.find((F) => (F == null ? void 0 : F.key) === "extraButton")) == null ? void 0 : X.contents, y.value = (z = (be = s.value) == null ? void 0 : be.find((F) => (F == null ? void 0 : F.key) === "page")) != null && z.contents ? !!((ie = (P = s.value) == null ? void 0 : P.find((F) => (F == null ? void 0 : F.key) === "page")) != null && ie.contents) : !1, L.value = (ne = (oe = s.value) == null ? void 0 : oe.find((F) => (F == null ? void 0 : F.key) === "tableToForm")) == null ? void 0 : ne.contents, i.value = (Te = i.value) == null ? void 0 : Te.map((F, Oe) => (Array.isArray(F) ? F = wa(F) : F = {
1215
+ label: (F == null ? void 0 : F.label) ?? "",
1216
+ prop: (F == null ? void 0 : F.label) === "操作" ? "operate" : F == null ? void 0 : F.prop,
1217
+ width: F != null && F.width ? parseInt(F.width) : "",
1218
+ fixed: (F == null ? void 0 : F.fixed) ?? void 0,
1219
+ sortable: (F == null ? void 0 : F.sortable) ?? !1,
1220
+ align: (F == null ? void 0 : F.align) ?? "center",
1221
+ showOverflowTooltip: (F == null ? void 0 : F.showOverflowTooltip) ?? !0,
1222
+ isNotDrag: (F == null ? void 0 : F.isNotDrag) ?? !1,
1223
+ isEditCol: (F == null ? void 0 : F.isEditCol) ?? !1,
1224
+ isOperate: (F == null ? void 0 : F.isOperate) ?? !1,
1225
+ id: (F == null ? void 0 : F.id) ?? Oe
1226
+ }, F)), i.value = (De = i.value) != null && De.every((F) => Array.isArray(F)) ? (Fe = i.value) == null ? void 0 : Fe[0] : i.value, g.value = (vl = g.value) == null ? void 0 : vl.map((F, Oe) => F = {
1227
+ label: (F == null ? void 0 : F.label) ?? "",
1228
+ type: (F == null ? void 0 : F.type) ?? "",
1229
+ textColor: (F == null ? void 0 : F.textColor) ?? "#000000",
1230
+ id: (F == null ? void 0 : F.id) ?? Oe
1231
+ }), S.value = (ml = S.value) == null ? void 0 : ml.map((F, Oe) => F = {
1232
+ label: (F == null ? void 0 : F.label) ?? "",
1233
+ type: (F == null ? void 0 : F.type) ?? "",
1234
+ background: (F == null ? void 0 : F.background) ?? "var(--ssComponent-primary-color)",
1235
+ id: (F == null ? void 0 : F.id) ?? Oe
1236
+ }), L.value)
1237
+ L.value = (gl = L.value) == null ? void 0 : gl.map((F) => {
1238
+ u.value++;
1239
+ let Oe = F;
1240
+ return Oe.id = u.value, Oe;
1241
+ });
1242
+ else {
1243
+ let F = [];
1244
+ const Oe = (bl = Dl(c(i.value))) == null ? void 0 : bl.filter((Ie) => (Ie == null ? void 0 : Ie.prop) !== "operate");
1245
+ Oe == null || Oe.forEach((Ie) => {
1246
+ u.value++, F.push({
1247
+ label: Ie == null ? void 0 : Ie.label,
1248
+ name: Ie == null ? void 0 : Ie.label,
1249
+ type: "Input",
1250
+ value: "",
1251
+ id: u.value,
1252
+ contents: Ie == null ? void 0 : Ie.options
1253
+ });
1254
+ }), L.value = F;
1255
+ }
1256
+ },
1257
+ { deep: !0, immediate: !0 }
1258
+ ), (m, A) => {
1259
+ const B = me("svg-icon");
1260
+ return W(), Z("div", Ma, [
1261
+ T("div", Ka, [
1262
+ T("div", Ha, [
1263
+ A[2] || (A[2] = T("div", null, Q("表头"), -1)),
1264
+ T("div", {
1265
+ class: "icon-content",
1266
+ onClick: ce
1267
+ }, [
1268
+ G(B, {
1269
+ name: "Plus",
1270
+ class: "icon-size"
1271
+ }),
1272
+ A[1] || (A[1] = T("div", null, Q("新增"), -1))
1273
+ ])
1274
+ ]),
1275
+ T("div", Za, [
1276
+ (W(!0), Z(he, null, ke(i.value, (w, le) => (W(), Z("div", { key: le }, [
1277
+ T("div", qa, [
1278
+ T("div", Qa, Q(w == null ? void 0 : w.label), 1),
1279
+ T("div", Xa, [
1280
+ G(B, {
1281
+ name: "ChildAdd",
1282
+ class: "svg-icon-content",
1283
+ style: { width: "24px", height: "24px" },
1284
+ onClick: (X) => xe(w)
1285
+ }, null, 8, ["onClick"]),
1286
+ G(B, {
1287
+ name: "ChildFix",
1288
+ class: "svg-icon-content",
1289
+ style: { width: "24px", height: "24px" },
1290
+ onClick: (X) => ve(w)
1291
+ }, null, 8, ["onClick"]),
1292
+ G(B, {
1293
+ name: "ChildDelete",
1294
+ class: "svg-icon-content",
1295
+ style: { width: "24px", height: "24px" },
1296
+ onClick: (X) => Ne(w)
1297
+ }, null, 8, ["onClick"])
1298
+ ])
1299
+ ]),
1300
+ w != null && w.children && w.children.length > 0 ? (W(), Z("div", Ya, [
1301
+ G(Pl, {
1302
+ tableChildContents: w == null ? void 0 : w.children,
1303
+ onDeleteChange: $e,
1304
+ onFixChange: de
1305
+ }, null, 8, ["tableChildContents"])
1306
+ ])) : Me("", !0)
1307
+ ]))), 128))
1308
+ ]),
1309
+ T("div", es, [
1310
+ A[4] || (A[4] = T("div", null, Q("行内按钮"), -1)),
1311
+ T("div", {
1312
+ class: "icon-content",
1313
+ onClick: pe
1314
+ }, [
1315
+ G(B, {
1316
+ name: "Plus",
1317
+ class: "icon-size"
1318
+ }),
1319
+ A[3] || (A[3] = T("div", null, Q("新增"), -1))
1320
+ ])
1321
+ ]),
1322
+ T("div", ls, [
1323
+ (W(!0), Z(he, null, ke(g.value, (w, le) => (W(), Z("div", { key: le }, [
1324
+ T("div", as, [
1325
+ T("div", ss, Q(w == null ? void 0 : w.label), 1),
1326
+ T("div", ns, [
1327
+ G(B, {
1328
+ name: "ChildFix",
1329
+ style: { width: "24px", height: "24px" },
1330
+ class: "svg-icon-content",
1331
+ onClick: (X) => ae(w)
1332
+ }, null, 8, ["onClick"]),
1333
+ G(B, {
1334
+ name: "ChildDelete",
1335
+ class: "svg-icon-content",
1336
+ style: { width: "24px", height: "24px" },
1337
+ onClick: (X) => J(w)
1338
+ }, null, 8, ["onClick"])
1339
+ ])
1340
+ ])
1341
+ ]))), 128))
1342
+ ]),
1343
+ T("div", os, [
1344
+ A[6] || (A[6] = T("div", null, Q("表外按钮"), -1)),
1345
+ T("div", {
1346
+ class: "icon-content",
1347
+ onClick: V
1348
+ }, [
1349
+ G(B, {
1350
+ name: "Plus",
1351
+ class: "icon-size"
1352
+ }),
1353
+ A[5] || (A[5] = T("div", null, Q("新增"), -1))
1354
+ ])
1355
+ ]),
1356
+ T("div", rs, [
1357
+ (W(!0), Z(he, null, ke(S.value, (w, le) => (W(), Z("div", { key: le }, [
1358
+ T("div", is, [
1359
+ T("div", us, Q(w == null ? void 0 : w.label), 1),
1360
+ T("div", ts, [
1361
+ G(B, {
1362
+ name: "ChildFix",
1363
+ style: { width: "24px", height: "24px" },
1364
+ class: "svg-icon-content",
1365
+ onClick: (X) => R(w)
1366
+ }, null, 8, ["onClick"]),
1367
+ G(B, {
1368
+ name: "ChildDelete",
1369
+ class: "svg-icon-content",
1370
+ style: { width: "24px", height: "24px" },
1371
+ onClick: (X) => K(w)
1372
+ }, null, 8, ["onClick"])
1373
+ ])
1374
+ ])
1375
+ ]))), 128))
1376
+ ]),
1377
+ T("div", cs, [
1378
+ A[8] || (A[8] = T("div", null, Q("表格弹框字段设置"), -1)),
1379
+ T("div", {
1380
+ class: "icon-content",
1381
+ onClick: ee
1382
+ }, [
1383
+ G(B, {
1384
+ name: "Plus",
1385
+ class: "icon-size"
1386
+ }),
1387
+ A[7] || (A[7] = T("div", null, Q("新增"), -1))
1388
+ ])
1389
+ ]),
1390
+ T("div", ps, [
1391
+ (W(!0), Z(he, null, ke(L.value, (w, le) => (W(), Z("div", { key: le }, [
1392
+ T("div", ds, [
1393
+ T("div", fs, Q(w == null ? void 0 : w.label), 1),
1394
+ T("div", hs, [
1395
+ G(B, {
1396
+ name: "ChildFix",
1397
+ style: { width: "24px", height: "24px" },
1398
+ class: "svg-icon-content",
1399
+ onClick: (X) => O(w)
1400
+ }, null, 8, ["onClick"]),
1401
+ G(B, {
1402
+ name: "ChildDelete",
1403
+ class: "svg-icon-content",
1404
+ style: { width: "24px", height: "24px" },
1405
+ onClick: (X) => $(w)
1406
+ }, null, 8, ["onClick"])
1407
+ ])
1408
+ ])
1409
+ ]))), 128))
1410
+ ]),
1411
+ A[10] || (A[10] = T("div", { class: "operate-title" }, [
1412
+ T("div", null, Q("分页"))
1413
+ ], -1)),
1414
+ T("div", ys, [
1415
+ T("div", vs, [
1416
+ A[9] || (A[9] = T("div", { class: "operate-center-content" }, Q("是否分页"), -1)),
1417
+ G(Ol, {
1418
+ modelValue: y.value,
1419
+ "onUpdate:modelValue": A[0] || (A[0] = (w) => y.value = w)
1420
+ }, null, 8, ["modelValue"])
1421
+ ])
1422
+ ])
1423
+ ]),
1424
+ G(Be, {
1425
+ visible: o.value,
1426
+ onBeforeDestroy: je,
1427
+ width: 840
1428
+ }, {
1429
+ default: Y(() => [
1430
+ T("div", ms, [
1431
+ (W(), ge(Ae, {
1432
+ rowContents: b.value,
1433
+ key: b.value,
1434
+ isEnableWrap: !0,
1435
+ onChange: re
1436
+ }, null, 8, ["rowContents"]))
1437
+ ])
1438
+ ]),
1439
+ footer: Y(() => [
1440
+ T("div", { class: "dialog-footer" }, [
1441
+ T("div", {
1442
+ onClick: je,
1443
+ class: "cancel-button button"
1444
+ }, Q("取消")),
1445
+ T("div", {
1446
+ class: "ok-button button",
1447
+ onClick: Se
1448
+ }, Q("确认"))
1449
+ ])
1450
+ ]),
1451
+ _: 1
1452
+ }, 8, ["visible"]),
1453
+ G(Be, {
1454
+ visible: d.value,
1455
+ onBeforeDestroy: _e,
1456
+ width: 840
1457
+ }, {
1458
+ default: Y(() => [
1459
+ T("div", bs, [
1460
+ (W(), ge(Ae, {
1461
+ rowContents: h.value,
1462
+ key: h.value,
1463
+ isEnableWrap: !0,
1464
+ onChange: ye
1465
+ }, null, 8, ["rowContents"]))
1466
+ ])
1467
+ ]),
1468
+ footer: Y(() => [
1469
+ T("div", { class: "dialog-footer" }, [
1470
+ T("div", {
1471
+ onClick: _e,
1472
+ class: "cancel-button button"
1473
+ }, Q("取消")),
1474
+ T("div", {
1475
+ class: "ok-button button",
1476
+ onClick: fe
1477
+ }, Q("确认"))
1478
+ ])
1479
+ ]),
1480
+ _: 1
1481
+ }, 8, ["visible"]),
1482
+ G(Be, {
1483
+ visible: _.value,
1484
+ onBeforeDestroy: M,
1485
+ width: 840
1486
+ }, {
1487
+ default: Y(() => [
1488
+ T("div", gs, [
1489
+ (W(), ge(Ae, {
1490
+ rowContents: r.value,
1491
+ key: r.value,
1492
+ isEnableWrap: !0,
1493
+ onChange: H
1494
+ }, null, 8, ["rowContents"]))
1495
+ ])
1496
+ ]),
1497
+ footer: Y(() => [
1498
+ T("div", { class: "dialog-footer" }, [
1499
+ T("div", {
1500
+ onClick: M,
1501
+ class: "cancel-button button"
1502
+ }, Q("取消")),
1503
+ T("div", {
1504
+ class: "ok-button button",
1505
+ onClick: x
1506
+ }, Q("确认"))
1507
+ ])
1508
+ ]),
1509
+ _: 1
1510
+ }, 8, ["visible"]),
1511
+ G(Be, {
1512
+ visible: t.value,
1513
+ onBeforeDestroy: E,
1514
+ width: 840
1515
+ }, {
1516
+ default: Y(() => [
1517
+ T("div", ks, [
1518
+ (W(), ge(Ae, {
1519
+ rowContents: f.value,
1520
+ key: f.value,
1521
+ isEnableWrap: !0,
1522
+ onChange: C
1523
+ }, null, 8, ["rowContents"]))
1524
+ ])
1525
+ ]),
1526
+ footer: Y(() => [
1527
+ T("div", { class: "dialog-footer" }, [
1528
+ T("div", {
1529
+ onClick: E,
1530
+ class: "cancel-button button"
1531
+ }, Q("取消")),
1532
+ T("div", {
1533
+ class: "ok-button button",
1534
+ onClick: I
1535
+ }, Q("确认"))
1536
+ ])
1537
+ ]),
1538
+ _: 1
1539
+ }, 8, ["visible"])
1540
+ ]);
1541
+ };
1542
+ }
1543
+ }, _s = /* @__PURE__ */ Ce(Cs, [["__scopeId", "data-v-14ead5ff"]]), xs = { class: "form-operate-content" }, $s = { class: "form-operate-item" }, As = { class: "operate-title" }, ws = { class: "operate-content" }, Ts = { class: "fix-content" }, Is = { class: "fix-button" }, Es = { class: "operate-title" }, Ds = { class: "operate-content" }, Os = { class: "fix-content" }, Bs = { class: "fix-button" }, Ns = { style: { display: "flex", "justify-content": "space-between" } }, Ss = { class: "form-content" }, Fs = { class: "form-content" }, Ls = {
1544
+ __name: "operate",
1545
+ props: {
1546
+ itemContents: {
1547
+ type: Array,
1548
+ default: () => []
1549
+ },
1550
+ originalItemContents: {
1551
+ type: Array,
1552
+ default: () => []
1553
+ }
1554
+ },
1555
+ emits: ["change"],
1556
+ setup(a, { emit: n }) {
1557
+ const l = a, e = n, s = j(!1), o = j([]), t = j([]), i = j(!1), d = j([]), b = j([]), y = j(""), D = j(!1), k = j(0), N = j([]), g = j([]), S = async (C) => {
1558
+ var E, I, R, K;
1559
+ s.value = !0;
1560
+ let O = [];
1561
+ const $ = await ((I = (E = q == null ? void 0 : q.find((x) => (x == null ? void 0 : x.key) === ((C == null ? void 0 : C.type) === "" ? "Input" : C == null ? void 0 : C.type))) == null ? void 0 : E.value) == null ? void 0 : I.value) ?? ((R = q == null ? void 0 : q.find((x) => (x == null ? void 0 : x.key) === ((C == null ? void 0 : C.type) === "" ? "Input" : C == null ? void 0 : C.type))) == null ? void 0 : R.value);
1562
+ if ($ == null || $.forEach((x) => {
1563
+ k.value++, O.push({
1564
+ label: x == null ? void 0 : x.label,
1565
+ name: x == null ? void 0 : x.label,
1566
+ type: x.type,
1567
+ value: (x == null ? void 0 : x.label) === "类型" && C[x.key] === "" ? "Input" : C[x.key],
1568
+ id: k.value,
1569
+ contents: x == null ? void 0 : x.options
1570
+ });
1571
+ }), C != null && C.menuSelect && ((K = C == null ? void 0 : C.menuSelect) == null ? void 0 : K.length) > 0) {
1572
+ const x = await kl(C == null ? void 0 : C.menuSelect);
1573
+ O = O == null ? void 0 : O.map((H) => ((H == null ? void 0 : H.name) === "组信息选项" && (H.contents = x), H));
1574
+ }
1575
+ y.value = C == null ? void 0 : C.id, o.value = Ze(O), t.value = Ze(O);
1576
+ }, h = (C) => {
1577
+ i.value = !0;
1578
+ let O = [];
1579
+ Ue == null || Ue.forEach(($) => {
1580
+ k.value++, O.push({
1581
+ label: $ == null ? void 0 : $.label,
1582
+ name: $ == null ? void 0 : $.label,
1583
+ type: $.type,
1584
+ value: ($ == null ? void 0 : $.label) === "类型" && C[$.key] === "" ? "normal" : C[$.key],
1585
+ id: k.value,
1586
+ contents: $ == null ? void 0 : $.options
1587
+ });
1588
+ }), N.value = O, g.value = O, y.value = C == null ? void 0 : C.id;
1589
+ };
1590
+ we(
1591
+ () => D.value,
1592
+ () => {
1593
+ var O, $;
1594
+ let C = c(l.originalItemContents);
1595
+ (O = c(l.originalItemContents)) != null && O.find((E) => (E == null ? void 0 : E.key) === "enableWrap") ? C = ($ = c(l.originalItemContents)) == null ? void 0 : $.map((E) => ((E == null ? void 0 : E.key) === "enableWrap" && (E.contents = !D.value), E)) : C.push({
1596
+ key: "enableWrap",
1597
+ contents: !D.value
1598
+ }), e("change", C);
1599
+ },
1600
+ { deep: !0 }
1601
+ );
1602
+ const v = () => {
1603
+ var $, E, I, R, K;
1604
+ N.value = g.value;
1605
+ let C = {};
1606
+ if (y.value !== "" ? C.id = y.value : (k.value++, C.id = "id" + k.value), ($ = N.value) == null || $.forEach((x) => {
1607
+ const H = Ue == null ? void 0 : Ue.find((M) => (M == null ? void 0 : M.label) === (x == null ? void 0 : x.label));
1608
+ H && (C[H.key] = x.value);
1609
+ }), (E = d.value) != null && E.find((x) => x.id === C.id))
1610
+ d.value = (I = d.value) == null ? void 0 : I.map((x) => (x.id === C.id && (x = C), x));
1611
+ else {
1612
+ let x = c(d.value);
1613
+ d.value || (d.value = []), x.push(C), d.value = x;
1614
+ }
1615
+ i.value = !1, y.value = "";
1616
+ let O = c(l.originalItemContents);
1617
+ (R = c(l.originalItemContents)) != null && R.find((x) => (x == null ? void 0 : x.key) === "formButton") ? O = (K = c(l.originalItemContents)) == null ? void 0 : K.map((x) => ((x == null ? void 0 : x.key) === "formButton" && (x.contents = d.value), x)) : O.push({
1618
+ key: "formButton",
1619
+ contents: d.value
1620
+ }), e("change", O);
1621
+ }, _ = (C) => {
1622
+ We.confirm("是否确认要删除", "", {
1623
+ confirmButtonText: "确认",
1624
+ cancelButtonText: "取消",
1625
+ type: "warning"
1626
+ }).then(
1627
+ () => {
1628
+ var O, $;
1629
+ b.value = (O = c(b.value)) == null ? void 0 : O.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", ($ = c(l.originalItemContents)) == null ? void 0 : $.map((E) => ((E == null ? void 0 : E.key) === "formContent" && (E.contents = b.value), E))), Je({
1630
+ type: "success",
1631
+ message: "删除成功"
1632
+ });
1633
+ }
1634
+ ).catch(() => {
1635
+ });
1636
+ }, r = (C) => {
1637
+ We.confirm("是否确认要删除", "", {
1638
+ confirmButtonText: "确认",
1639
+ cancelButtonText: "取消",
1640
+ type: "warning"
1641
+ }).then(
1642
+ () => {
1643
+ var O, $;
1644
+ d.value = (O = c(d.value)) == null ? void 0 : O.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", ($ = c(l.originalItemContents)) == null ? void 0 : $.map((E) => ((E == null ? void 0 : E.key) === "formButton" && (E.contents = d.value), E))), Je({
1645
+ type: "success",
1646
+ message: "删除成功"
1647
+ });
1648
+ }
1649
+ ).catch(() => {
1650
+ });
1651
+ }, p = () => {
1652
+ i.value = !0;
1653
+ let C = [];
1654
+ Ue == null || Ue.forEach((O) => {
1655
+ k.value++, C.push({
1656
+ label: O == null ? void 0 : O.label,
1657
+ name: O == null ? void 0 : O.label,
1658
+ type: O.type,
1659
+ value: (O == null ? void 0 : O.label) === "类型" ? "normal" : "",
1660
+ id: k.value,
1661
+ contents: O == null ? void 0 : O.options
1662
+ });
1663
+ }), N.value = C, g.value = C;
1664
+ }, u = () => {
1665
+ var O, $;
1666
+ s.value = !0;
1667
+ let C = [];
1668
+ ($ = (O = q == null ? void 0 : q.find((E) => (E == null ? void 0 : E.key) === "Input")) == null ? void 0 : O.value) == null || $.forEach((E) => {
1669
+ k.value++, C.push({
1670
+ label: E == null ? void 0 : E.label,
1671
+ name: E == null ? void 0 : E.label,
1672
+ type: E.type,
1673
+ value: (E == null ? void 0 : E.label) === "类型" ? "Input" : "",
1674
+ id: k.value,
1675
+ contents: E == null ? void 0 : E.options
1676
+ });
1677
+ }), o.value = C, t.value = C;
1678
+ }, f = (C) => {
1679
+ let O = c(g.value);
1680
+ O = O == null ? void 0 : O.map(($) => ($.value = C == null ? void 0 : C[$.name], $)), g.value = O;
1681
+ }, U = async (C) => {
1682
+ var O, $, E, I, R, K, x, H;
1683
+ if ((C == null ? void 0 : C.类型) !== (($ = (O = t.value) == null ? void 0 : O.find((M) => (M == null ? void 0 : M.label) === "类型")) == null ? void 0 : $.value)) {
1684
+ let M = [];
1685
+ const ae = await ((I = (E = q == null ? void 0 : q.find((J) => (J == null ? void 0 : J.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : E.value) == null ? void 0 : I.value) ? await ((x = (K = q == null ? void 0 : q.find((J) => (J == null ? void 0 : J.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : K.value) == null ? void 0 : x.value) : (R = q == null ? void 0 : q.find((J) => (J == null ? void 0 : J.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : R.value;
1686
+ ae == null || ae.forEach((J) => {
1687
+ k.value++, M.push({
1688
+ label: J == null ? void 0 : J.label,
1689
+ name: J == null ? void 0 : J.label,
1690
+ type: J.type,
1691
+ value: (C == null ? void 0 : C[J.label]) ?? "",
1692
+ id: k.value,
1693
+ contents: J == null ? void 0 : J.options
1694
+ });
1695
+ }), t.value = M, o.value = M;
1696
+ } else {
1697
+ let M = c(t.value);
1698
+ if (M = M == null ? void 0 : M.map((ae) => (ae.value = C == null ? void 0 : C[ae.name], ae)), C != null && C.菜单选项 && ((H = C == null ? void 0 : C.菜单选项) == null ? void 0 : H.length) > 0) {
1699
+ const ae = await kl(C == null ? void 0 : C.菜单选项);
1700
+ M = M == null ? void 0 : M.map((J) => ((J == null ? void 0 : J.name) === "组信息选项" && (J.contents = ae), J));
1701
+ }
1702
+ M = Ze(M), t.value = M;
1703
+ }
1704
+ }, L = () => {
1705
+ }, V = async () => {
1706
+ var E, I, R, K, x, H, M, ae;
1707
+ o.value = t.value;
1708
+ let C = {};
1709
+ y.value !== "" ? C.id = y.value : (k.value++, C.id = "id" + k.value);
1710
+ let O = await ((I = (E = q == null ? void 0 : q.find((J) => {
1711
+ var ce, pe;
1712
+ return (J == null ? void 0 : J.key) === (((pe = (ce = o.value) == null ? void 0 : ce.find((ye) => (ye == null ? void 0 : ye.label) === "类型")) == null ? void 0 : pe.value) ?? "label");
1713
+ })) == null ? void 0 : E.value) == null ? void 0 : I.value) ?? ((R = q == null ? void 0 : q.find((J) => {
1714
+ var ce, pe;
1715
+ return (J == null ? void 0 : J.key) === (((pe = (ce = o.value) == null ? void 0 : ce.find((ye) => (ye == null ? void 0 : ye.label) === "类型")) == null ? void 0 : pe.value) ?? "label");
1716
+ })) == null ? void 0 : R.value);
1717
+ if ((K = o.value) == null || K.forEach((J) => {
1718
+ const ce = O == null ? void 0 : O.find((pe) => (pe == null ? void 0 : pe.label) === (J == null ? void 0 : J.label));
1719
+ ce && (C[ce.key] = J.value);
1720
+ }), C.width = 1, C.key = C == null ? void 0 : C.label, (x = b.value) != null && x.find((J) => J.id === C.id))
1721
+ b.value = (H = b.value) == null ? void 0 : H.map((J) => (J.id === C.id && (J = C), J));
1722
+ else {
1723
+ let J = c(b.value);
1724
+ J.push(C), b.value = J;
1725
+ }
1726
+ b.value = b.value.map(({ id: J, ...ce }) => ce), s.value = !1, y.value = "";
1727
+ let $ = c(l.originalItemContents);
1728
+ (M = c(l.originalItemContents)) != null && M.find((J) => (J == null ? void 0 : J.key) === "formContent") ? $ = (ae = c(l.originalItemContents)) == null ? void 0 : ae.map((J) => ((J == null ? void 0 : J.key) === "formContent" && (J.contents = b.value), J)) : $.push({
1729
+ key: "formContent",
1730
+ contents: b.value
1731
+ }), e("change", $);
1732
+ }, ee = () => {
1733
+ s.value = !1, i.value = !1, y.value = "", t.value = [], g.value = [];
1734
+ };
1735
+ return we(
1736
+ () => l.originalItemContents,
1737
+ () => {
1738
+ var O, $, E, I, R, K;
1739
+ if (!l.originalItemContents || l.originalItemContents.length === 0) return;
1740
+ const C = c(l.originalItemContents);
1741
+ b.value = ((O = C == null ? void 0 : C.find((x) => (x == null ? void 0 : x.key) === "formContent")) == null ? void 0 : O.contents) ?? [], d.value = (($ = C == null ? void 0 : C.find((x) => (x == null ? void 0 : x.key) === "formButton")) == null ? void 0 : $.contents) ?? [], D.value = (E = C == null ? void 0 : C.find((x) => (x == null ? void 0 : x.key) === "enableWrap")) != null && E.contents ? !((I = C == null ? void 0 : C.find((x) => (x == null ? void 0 : x.key) === "enableWrap")) != null && I.contents) : !0, b.value = (R = c(b.value)) == null ? void 0 : R.map((x, H) => {
1742
+ let M = x;
1743
+ return M.id = (x == null ? void 0 : x.id) ?? H, x != null && x.label || (x.label = (x == null ? void 0 : x.key) ?? (x == null ? void 0 : x.label) ?? ""), x != null && x.type || (x.type = (x == null ? void 0 : x.type) ?? ""), x.contents = (x == null ? void 0 : x.options) ?? "", M;
1744
+ }), b.value = Ze(b.value), d.value = (K = d.value) == null ? void 0 : K.map((x, H) => x = {
1745
+ label: (x == null ? void 0 : x.label) ?? "",
1746
+ type: (x == null ? void 0 : x.type) ?? "",
1747
+ background: (x == null ? void 0 : x.background) ?? "var(--ssComponent-primary-color)",
1748
+ id: (x == null ? void 0 : x.id) ?? H
1749
+ });
1750
+ },
1751
+ { deep: !0, immediate: !0 }
1752
+ ), (C, O) => {
1753
+ const $ = me("svg-icon");
1754
+ return W(), Z("div", xs, [
1755
+ T("div", $s, [
1756
+ T("div", As, [
1757
+ O[2] || (O[2] = T("div", null, Q("表单内容"), -1)),
1758
+ T("div", {
1759
+ class: "icon-content",
1760
+ onClick: u
1761
+ }, [
1762
+ G($, {
1763
+ name: "Plus",
1764
+ class: "icon-size"
1765
+ }),
1766
+ O[1] || (O[1] = T("div", null, Q("新增"), -1))
1767
+ ])
1768
+ ]),
1769
+ T("div", ws, [
1770
+ (W(!0), Z(he, null, ke(b.value, (E, I) => (W(), Z("div", { key: I }, [
1771
+ T("div", Ts, [
1772
+ T("div", null, Q(E.label), 1),
1773
+ T("div", Is, [
1774
+ G($, {
1775
+ name: "ChildFix",
1776
+ class: "svg-icon-content",
1777
+ style: { width: "24px", height: "24px" },
1778
+ onClick: (R) => S(E)
1779
+ }, null, 8, ["onClick"]),
1780
+ G($, {
1781
+ name: "ChildDelete",
1782
+ class: "svg-icon-content",
1783
+ style: { width: "24px", height: "24px" },
1784
+ onClick: (R) => _(E)
1785
+ }, null, 8, ["onClick"])
1786
+ ])
1787
+ ])
1788
+ ]))), 128))
1789
+ ]),
1790
+ T("div", Es, [
1791
+ O[4] || (O[4] = T("div", null, Q("表单按钮"), -1)),
1792
+ T("div", {
1793
+ class: "icon-content",
1794
+ onClick: p
1795
+ }, [
1796
+ G($, {
1797
+ name: "Plus",
1798
+ class: "icon-size"
1799
+ }),
1800
+ O[3] || (O[3] = T("div", null, Q("新增"), -1))
1801
+ ])
1802
+ ]),
1803
+ T("div", Ds, [
1804
+ (W(!0), Z(he, null, ke(d.value, (E, I) => (W(), Z("div", { key: I }, [
1805
+ T("div", Os, [
1806
+ T("div", null, Q(E.label), 1),
1807
+ T("div", Bs, [
1808
+ G($, {
1809
+ name: "ChildFix",
1810
+ class: "svg-icon-content",
1811
+ style: { width: "24px", height: "24px" },
1812
+ onClick: (R) => h(E)
1813
+ }, null, 8, ["onClick"]),
1814
+ G($, {
1815
+ name: "ChildDelete",
1816
+ class: "svg-icon-content",
1817
+ style: { width: "24px", height: "24px" },
1818
+ onClick: (R) => r(E)
1819
+ }, null, 8, ["onClick"])
1820
+ ])
1821
+ ])
1822
+ ]))), 128))
1823
+ ]),
1824
+ O[6] || (O[6] = T("div", { class: "operate-title" }, [
1825
+ T("div", null, Q("表单布局"))
1826
+ ], -1)),
1827
+ T("div", Ns, [
1828
+ O[5] || (O[5] = T("div", { class: "operate-center-content" }, Q("是否自动撑宽"), -1)),
1829
+ G(Ol, {
1830
+ modelValue: D.value,
1831
+ "onUpdate:modelValue": O[0] || (O[0] = (E) => D.value = E)
1832
+ }, null, 8, ["modelValue"])
1833
+ ])
1834
+ ]),
1835
+ G(Be, {
1836
+ visible: s.value,
1837
+ onBeforeDestroy: ee,
1838
+ width: 840
1839
+ }, {
1840
+ default: Y(() => [
1841
+ T("div", Ss, [
1842
+ (W(), ge(Ae, {
1843
+ rowContents: o.value,
1844
+ key: o.value,
1845
+ isEnableWrap: !0,
1846
+ onChange: U,
1847
+ onBlur: L
1848
+ }, null, 8, ["rowContents"]))
1849
+ ])
1850
+ ]),
1851
+ footer: Y(() => [
1852
+ T("div", { class: "dialog-footer" }, [
1853
+ T("div", {
1854
+ onClick: ee,
1855
+ class: "cancel-button button"
1856
+ }, Q("取消")),
1857
+ T("div", {
1858
+ class: "ok-button button",
1859
+ onClick: V
1860
+ }, Q("确认"))
1861
+ ])
1862
+ ]),
1863
+ _: 1
1864
+ }, 8, ["visible"]),
1865
+ G(Be, {
1866
+ visible: i.value,
1867
+ onBeforeDestroy: ee,
1868
+ width: 840
1869
+ }, {
1870
+ default: Y(() => [
1871
+ T("div", Fs, [
1872
+ (W(), ge(Ae, {
1873
+ rowContents: N.value,
1874
+ key: N.value,
1875
+ isEnableWrap: !0,
1876
+ onChange: f
1877
+ }, null, 8, ["rowContents"]))
1878
+ ])
1879
+ ]),
1880
+ footer: Y(() => [
1881
+ T("div", { class: "dialog-footer" }, [
1882
+ T("div", {
1883
+ onClick: ee,
1884
+ class: "cancel-button button"
1885
+ }, Q("取消")),
1886
+ T("div", {
1887
+ class: "ok-button button",
1888
+ onClick: v
1889
+ }, Q("确认"))
1890
+ ])
1891
+ ]),
1892
+ _: 1
1893
+ }, 8, ["visible"])
1894
+ ]);
1895
+ };
1896
+ }
1897
+ }, _l = /* @__PURE__ */ Ce(Ls, [["__scopeId", "data-v-82a6cf04"]]), js = { class: "step-module content" }, Us = { class: "module-data" }, Ps = { class: "step-module layout" }, Rs = { class: "form-content" }, Js = /* @__PURE__ */ Ve({
1898
+ __name: "operate",
1899
+ props: {
1900
+ itemContents: {
1901
+ type: Array,
1902
+ default: () => []
1903
+ },
1904
+ originalItemContents: {
1905
+ type: Array,
1906
+ default: () => []
1907
+ }
1908
+ },
1909
+ emits: ["change"],
1910
+ setup(a, { emit: n }) {
1911
+ const l = a, e = n, s = j([
1912
+ {
1913
+ label: "方向:",
1914
+ prop: "direction",
1915
+ type: "RADIO",
1916
+ contents: [
1917
+ {
1918
+ label: "水平",
1919
+ value: "horizontal"
1920
+ },
1921
+ {
1922
+ label: "垂直",
1923
+ value: "vertical"
1924
+ }
1925
+ ],
1926
+ value: "horizontal"
1927
+ },
1928
+ {
1929
+ label: "是否居中:",
1930
+ prop: "alignCenter",
1931
+ type: "RADIO",
1932
+ contents: [
1933
+ {
1934
+ label: "是",
1935
+ value: !0
1936
+ },
1937
+ {
1938
+ label: "否",
1939
+ value: !1
1940
+ }
1941
+ ],
1942
+ value: !0
1943
+ },
1944
+ // {
1945
+ // label: '是否交互',
1946
+ // prop: 'allowTrigger',
1947
+ // type: 'RADIO',
1948
+ // contents: [
1949
+ // {
1950
+ // label: '是',
1951
+ // value: true,
1952
+ // }, {
1953
+ // label: '否',
1954
+ // value: false,
1955
+ // },
1956
+ // ],
1957
+ // value: 'horizontal'
1958
+ // },
1959
+ {
1960
+ label: "应用简洁风格",
1961
+ prop: "simple",
1962
+ type: "RADIO",
1963
+ contents: [
1964
+ {
1965
+ label: "是",
1966
+ value: !0
1967
+ },
1968
+ {
1969
+ label: "否",
1970
+ value: !1
1971
+ }
1972
+ ],
1973
+ value: !1
1974
+ }
1975
+ ]), o = j([
1976
+ {
1977
+ label: "",
1978
+ prop: "index",
1979
+ type: "input",
1980
+ value: "",
1981
+ isFormColHidden: !0
1982
+ },
1983
+ {
1984
+ label: "标题",
1985
+ prop: "title",
1986
+ type: "input",
1987
+ value: ""
1988
+ },
1989
+ {
1990
+ label: "描述",
1991
+ prop: "description",
1992
+ type: "input",
1993
+ value: ""
1994
+ }
1995
+ ]), t = j([
1996
+ {
1997
+ label: "取消",
1998
+ background: "#c0c4cc"
1999
+ },
2000
+ {
2001
+ label: "确认",
2002
+ background: "#436aaf"
2003
+ }
2004
+ ]), i = dl({
2005
+ visible: !1,
2006
+ width: "40%",
2007
+ title: "步骤条"
2008
+ }), d = j("create"), b = j({}), y = j([]), D = (h) => {
2009
+ var v;
2010
+ b.value = h, e("change", (v = g()) == null ? void 0 : v.compData);
2011
+ }, k = (h, v) => {
2012
+ var _, r;
2013
+ switch (h) {
2014
+ case "create":
2015
+ (_ = o.value) == null || _.forEach((p) => {
2016
+ p.value = "";
2017
+ }), d.value = "create", i.visible = !0;
2018
+ break;
2019
+ case "update":
2020
+ (r = o.value) == null || r.forEach((p) => {
2021
+ p.value = v[p == null ? void 0 : p.prop];
2022
+ }), d.value = "update", i.visible = !0;
2023
+ break;
2024
+ case "delete":
2025
+ y.value.splice(v, 1), d.value = "delete";
2026
+ break;
2027
+ }
2028
+ }, N = (h) => {
2029
+ var v, _, r;
2030
+ if ((h == null ? void 0 : h.buttonName) === "确认") {
2031
+ const p = c(h == null ? void 0 : h.content);
2032
+ switch (Object.keys(p).forEach((u) => {
2033
+ p[u] === "" && delete p[u];
2034
+ }), d.value) {
2035
+ case "create":
2036
+ y.value.push({
2037
+ ...p,
2038
+ index: ((v = y.value) == null ? void 0 : v.length) + 1
2039
+ });
2040
+ break;
2041
+ case "update":
2042
+ y.value = (_ = y.value) == null ? void 0 : _.map((u) => u.index === (p == null ? void 0 : p.index) ? {
2043
+ ...u,
2044
+ title: p == null ? void 0 : p.title,
2045
+ description: p == null ? void 0 : p.description
2046
+ } : u);
2047
+ break;
2048
+ }
2049
+ e("change", (r = g()) == null ? void 0 : r.compData), i.visible = !1;
2050
+ } else
2051
+ i.visible = !1;
2052
+ }, g = () => ({
2053
+ comp: "Step",
2054
+ compData: [
2055
+ {
2056
+ key: "stepList",
2057
+ contents: y.value
2058
+ },
2059
+ {
2060
+ key: "stepConfig",
2061
+ contents: b.value
2062
+ }
2063
+ ]
2064
+ }), S = () => {
2065
+ i.visible = !1;
2066
+ };
2067
+ return we(() => l == null ? void 0 : l.itemContents, (h) => {
2068
+ var v, _;
2069
+ h && (b.value = ((v = h == null ? void 0 : h.find((r) => r.key === "stepConfig")) == null ? void 0 : v.contents) ?? {}, y.value = ((_ = h == null ? void 0 : h.find((r) => r.key === "stepList")) == null ? void 0 : _.contents) ?? []);
2070
+ }, { immediate: !0 }), (h, v) => {
2071
+ const _ = me("svg-icon"), r = me("el-button");
2072
+ return W(), Z(he, null, [
2073
+ T("div", null, [
2074
+ T("div", js, [
2075
+ v[2] || (v[2] = T("h4", { class: "module-title" }, "内容", -1)),
2076
+ T("div", {
2077
+ class: "module-icon",
2078
+ onClick: v[0] || (v[0] = (p) => k("create"))
2079
+ }, [
2080
+ G(_, {
2081
+ name: "Plus",
2082
+ class: "icon-size"
2083
+ }),
2084
+ v[1] || (v[1] = T("div", null, "新增", -1))
2085
+ ])
2086
+ ]),
2087
+ T("div", Us, [
2088
+ (W(!0), Z(he, null, ke(y.value, (p, u) => (W(), Z("div", {
2089
+ class: "module-data-item",
2090
+ key: u
2091
+ }, [
2092
+ T("span", null, Q(p == null ? void 0 : p.title), 1),
2093
+ T("div", null, [
2094
+ G(r, {
2095
+ type: "primary",
2096
+ size: "small",
2097
+ onClick: (f) => k("update", { ...p, index: u + 1 })
2098
+ }, {
2099
+ default: Y(() => v[3] || (v[3] = [
2100
+ Ee("修改")
2101
+ ])),
2102
+ _: 2,
2103
+ __: [3]
2104
+ }, 1032, ["onClick"]),
2105
+ G(r, {
2106
+ type: "danger",
2107
+ size: "small",
2108
+ onClick: (f) => k("delete", u)
2109
+ }, {
2110
+ default: Y(() => v[4] || (v[4] = [
2111
+ Ee("删除")
2112
+ ])),
2113
+ _: 2,
2114
+ __: [4]
2115
+ }, 1032, ["onClick"])
2116
+ ])
2117
+ ]))), 128))
2118
+ ]),
2119
+ T("div", Ps, [
2120
+ v[5] || (v[5] = T("div", { class: "module-title" }, "布局", -1)),
2121
+ G(Ae, {
2122
+ rowContents: s.value,
2123
+ onChange: D
2124
+ }, null, 8, ["rowContents"])
2125
+ ])
2126
+ ]),
2127
+ G(Be, {
2128
+ visible: i.visible,
2129
+ title: i.title,
2130
+ onBeforeDestroy: S,
2131
+ width: i.width
2132
+ }, {
2133
+ default: Y(() => [
2134
+ T("div", Rs, [
2135
+ (W(), ge(Ae, {
2136
+ rowContents: o.value,
2137
+ key: o.value,
2138
+ isEnableWrap: !1,
2139
+ isButtonRow: !1,
2140
+ isStartJustify: !1,
2141
+ buttonValue: t.value,
2142
+ onOnButtonClick: N
2143
+ }, null, 8, ["rowContents", "buttonValue"]))
2144
+ ])
2145
+ ]),
2146
+ _: 1
2147
+ }, 8, ["visible", "title", "width"])
2148
+ ], 64);
2149
+ };
2150
+ }
2151
+ }), Ws = /* @__PURE__ */ Ce(Js, [["__scopeId", "data-v-47438605"]]), Vs = { class: "step-module content" }, zs = { class: "module-data" }, Gs = { class: "step-module layout" }, Ms = { class: "form-content" }, Ks = /* @__PURE__ */ Ve({
2152
+ __name: "operate",
2153
+ props: {
2154
+ itemContents: {
2155
+ type: Array,
2156
+ default: () => []
2157
+ },
2158
+ originalItemContents: {
2159
+ type: Array,
2160
+ default: () => []
2161
+ }
2162
+ },
2163
+ emits: ["change"],
2164
+ setup(a, { emit: n }) {
2165
+ const l = a, e = n, s = j("create"), o = j({}), t = j([]), i = j([
2166
+ {
2167
+ label: "方向:",
2168
+ prop: "placement",
2169
+ type: "radio",
2170
+ contents: [
2171
+ {
2172
+ label: "底部",
2173
+ value: "bottom"
2174
+ },
2175
+ {
2176
+ label: "顶部",
2177
+ value: "top"
2178
+ }
2179
+ ],
2180
+ value: "bottom"
2181
+ },
2182
+ {
2183
+ label: "节点类型:",
2184
+ prop: "type",
2185
+ type: "select",
2186
+ contents: [
2187
+ {
2188
+ label: "primary",
2189
+ value: "primary"
2190
+ },
2191
+ {
2192
+ label: "success",
2193
+ value: "success"
2194
+ },
2195
+ {
2196
+ label: "warning",
2197
+ value: "warning"
2198
+ },
2199
+ {
2200
+ label: "danger",
2201
+ value: "danger"
2202
+ },
2203
+ {
2204
+ label: "info",
2205
+ value: "info"
2206
+ }
2207
+ ],
2208
+ value: "primary"
2209
+ },
2210
+ {
2211
+ label: "颜色:",
2212
+ prop: "color",
2213
+ type: "color",
2214
+ value: ""
2215
+ },
2216
+ {
2217
+ label: "尺寸:",
2218
+ prop: "size",
2219
+ type: "radio",
2220
+ contents: [
2221
+ {
2222
+ label: "normal",
2223
+ value: "normal"
2224
+ },
2225
+ {
2226
+ label: "large",
2227
+ value: "large"
2228
+ }
2229
+ ],
2230
+ value: "normal"
2231
+ },
2232
+ {
2233
+ label: "是否空心",
2234
+ prop: "isHollow",
2235
+ type: "RADIO",
2236
+ contents: [
2237
+ {
2238
+ label: "是",
2239
+ value: !0
2240
+ },
2241
+ {
2242
+ label: "否",
2243
+ value: !1
2244
+ }
2245
+ ],
2246
+ value: !0
2247
+ },
2248
+ {
2249
+ label: "是否居中",
2250
+ prop: "isCenter",
2251
+ type: "RADIO",
2252
+ contents: [
2253
+ {
2254
+ label: "是",
2255
+ value: !0
2256
+ },
2257
+ {
2258
+ label: "否",
2259
+ value: !1
2260
+ }
2261
+ ],
2262
+ value: !0
2263
+ }
2264
+ ]), d = j([
2265
+ {
2266
+ label: "",
2267
+ prop: "index",
2268
+ type: "input",
2269
+ value: "",
2270
+ isFormColHidden: !0
2271
+ },
2272
+ {
2273
+ label: "内容",
2274
+ prop: "content",
2275
+ type: "input",
2276
+ value: ""
2277
+ },
2278
+ {
2279
+ label: "时间戳",
2280
+ prop: "timestamp",
2281
+ type: "datetime",
2282
+ value: ""
2283
+ }
2284
+ ]), b = j([
2285
+ {
2286
+ label: "取消",
2287
+ background: "#c0c4cc"
2288
+ },
2289
+ {
2290
+ label: "确认",
2291
+ background: "#436aaf"
2292
+ }
2293
+ ]), y = dl({
2294
+ visible: !1,
2295
+ width: "40%",
2296
+ title: "时间线"
2297
+ }), D = (h) => {
2298
+ var v;
2299
+ o.value = h, console.log(1212, h), e("change", (v = g()) == null ? void 0 : v.compData);
2300
+ }, k = (h, v) => {
2301
+ var _, r;
2302
+ switch (h) {
2303
+ case "create":
2304
+ (_ = d.value) == null || _.forEach((p) => {
2305
+ p.value = "";
2306
+ }), s.value = "create", y.visible = !0;
2307
+ break;
2308
+ case "update":
2309
+ (r = d.value) == null || r.forEach((p) => {
2310
+ p.value = v[p == null ? void 0 : p.prop];
2311
+ }), s.value = "update", y.visible = !0;
2312
+ break;
2313
+ case "delete":
2314
+ t.value.splice(v, 1), s.value = "delete";
2315
+ break;
2316
+ }
2317
+ }, N = (h) => {
2318
+ var v, _, r, p;
2319
+ if ((h == null ? void 0 : h.buttonName) === "确认") {
2320
+ const u = c(h == null ? void 0 : h.content);
2321
+ switch (Object.keys(u).forEach((f) => {
2322
+ u[f] === "" && delete u[f];
2323
+ }), s.value) {
2324
+ case "create":
2325
+ console.log(1335, t.value, u), (_ = t.value) == null || _.push({
2326
+ ...u,
2327
+ index: ((v = t.value) == null ? void 0 : v.length) + 1
2328
+ });
2329
+ break;
2330
+ case "update":
2331
+ t.value = (r = t.value) == null ? void 0 : r.map((f) => f.index === (u == null ? void 0 : u.index) ? {
2332
+ ...f,
2333
+ content: u == null ? void 0 : u.content,
2334
+ timestamp: u == null ? void 0 : u.timestamp
2335
+ } : f);
2336
+ break;
2337
+ }
2338
+ e("change", (p = g()) == null ? void 0 : p.compData), y.visible = !1;
2339
+ } else
2340
+ y.visible = !1;
2341
+ }, g = () => ({
2342
+ comp: "TimeLine",
2343
+ compData: [
2344
+ {
2345
+ key: "timeLineList",
2346
+ contents: t.value
2347
+ },
2348
+ {
2349
+ key: "timeLineConfig",
2350
+ contents: o.value
2351
+ }
2352
+ ]
2353
+ }), S = () => {
2354
+ y.visible = !1;
2355
+ };
2356
+ return we(() => l == null ? void 0 : l.itemContents, (h) => {
2357
+ var v, _;
2358
+ h && (o.value = ((v = h == null ? void 0 : h.find((r) => r.key === "timeLineConfig")) == null ? void 0 : v.contents) ?? {}, t.value = ((_ = h == null ? void 0 : h.find((r) => r.key === "timeLineList")) == null ? void 0 : _.contents) ?? []);
2359
+ }, { immediate: !0 }), (h, v) => {
2360
+ const _ = me("svg-icon"), r = me("el-button");
2361
+ return W(), Z(he, null, [
2362
+ T("div", null, [
2363
+ T("div", Vs, [
2364
+ v[2] || (v[2] = T("h4", { class: "module-title" }, "内容", -1)),
2365
+ T("div", {
2366
+ class: "module-icon",
2367
+ onClick: v[0] || (v[0] = (p) => k("create"))
2368
+ }, [
2369
+ G(_, {
2370
+ name: "Plus",
2371
+ class: "icon-size"
2372
+ }),
2373
+ v[1] || (v[1] = T("div", null, "新增", -1))
2374
+ ])
2375
+ ]),
2376
+ T("div", zs, [
2377
+ (W(!0), Z(he, null, ke(t.value, (p, u) => (W(), Z("div", {
2378
+ class: "module-data-item",
2379
+ key: u
2380
+ }, [
2381
+ T("span", null, Q(p == null ? void 0 : p.content), 1),
2382
+ T("div", null, [
2383
+ G(r, {
2384
+ type: "primary",
2385
+ size: "small",
2386
+ onClick: (f) => k("update", { ...p, index: u + 1 })
2387
+ }, {
2388
+ default: Y(() => v[3] || (v[3] = [
2389
+ Ee("修改")
2390
+ ])),
2391
+ _: 2,
2392
+ __: [3]
2393
+ }, 1032, ["onClick"]),
2394
+ G(r, {
2395
+ type: "danger",
2396
+ size: "small",
2397
+ onClick: (f) => k("delete", u)
2398
+ }, {
2399
+ default: Y(() => v[4] || (v[4] = [
2400
+ Ee("删除")
2401
+ ])),
2402
+ _: 2,
2403
+ __: [4]
2404
+ }, 1032, ["onClick"])
2405
+ ])
2406
+ ]))), 128))
2407
+ ]),
2408
+ T("div", Gs, [
2409
+ v[5] || (v[5] = T("div", { class: "module-title" }, "布局", -1)),
2410
+ G(Ae, {
2411
+ rowContents: i.value,
2412
+ onChange: D
2413
+ }, null, 8, ["rowContents"])
2414
+ ])
2415
+ ]),
2416
+ G(Be, {
2417
+ visible: y.visible,
2418
+ title: y.title,
2419
+ onBeforeDestroy: S,
2420
+ width: y.width
2421
+ }, {
2422
+ default: Y(() => [
2423
+ T("div", Ms, [
2424
+ (W(), ge(Ae, {
2425
+ rowContents: d.value,
2426
+ key: d.value,
2427
+ isEnableWrap: !1,
2428
+ isButtonRow: !1,
2429
+ isStartJustify: !1,
2430
+ buttonValue: b.value,
2431
+ onOnButtonClick: N
2432
+ }, null, 8, ["rowContents", "buttonValue"]))
2433
+ ])
2434
+ ]),
2435
+ _: 1
2436
+ }, 8, ["visible", "title", "width"])
2437
+ ], 64);
2438
+ };
2439
+ }
2440
+ }), Hs = /* @__PURE__ */ Ce(Ks, [["__scopeId", "data-v-40aea043"]]), Zs = {};
2441
+ function qs(a, n) {
2442
+ return W(), Z("div");
2443
+ }
2444
+ const Qs = /* @__PURE__ */ Ce(Zs, [["render", qs]]), Xs = { class: "extra-content" }, Ys = { key: 0 }, en = { key: 1 }, ln = {
2445
+ __name: "index",
2446
+ props: {
2447
+ itemData: {
2448
+ type: Array,
2449
+ default: () => []
2450
+ },
2451
+ childItemData: {
2452
+ type: Array,
2453
+ default: () => []
2454
+ },
2455
+ index: Number,
2456
+ changedContent: {
2457
+ type: Object,
2458
+ default: () => {
2459
+ }
2460
+ }
2461
+ },
2462
+ emits: ["change"],
2463
+ setup(a, { emit: n }) {
2464
+ const l = a, e = j(0), s = j(), o = j(), t = n, i = j(!1), d = j({}), b = j({}), y = j();
2465
+ we(
2466
+ () => [l.itemData],
2467
+ () => {
2468
+ var p;
2469
+ const r = c(l.itemData);
2470
+ s.value = (p = c(r)) == null ? void 0 : p.map((u) => {
2471
+ var f;
2472
+ if (u.key === "extra") {
2473
+ let U = [];
2474
+ (f = u.value) == null || f.forEach((L) => {
2475
+ var V;
2476
+ U.push((V = Object.values(L)) == null ? void 0 : V[0]);
2477
+ }), u.value = U;
2478
+ }
2479
+ return u;
2480
+ });
2481
+ },
2482
+ { deep: !0, immediate: !0 }
2483
+ );
2484
+ const D = (r, p, u, f) => {
2485
+ var L;
2486
+ let U = {};
2487
+ ((L = r == null ? void 0 : r[0]) == null ? void 0 : L.contents) === "详情" && (i.value = !0, U[p] = r, o.value = r == null ? void 0 : r.filter((V) => (V == null ? void 0 : V.key) !== "tableContentName"), d.value = U, b.value = u, y.value = f.id);
2488
+ }, k = (r) => {
2489
+ var V, ee, C, O;
2490
+ const p = (ee = (V = Object.values(c(d.value))) == null ? void 0 : V[0]) == null ? void 0 : ee.filter(($) => ($ == null ? void 0 : $.key) === "tableContentName"), u = (O = (C = Object.values(c(d.value))) == null ? void 0 : C[0]) == null ? void 0 : O.filter(($) => ($ == null ? void 0 : $.key) !== "tableContentName"), f = u == null ? void 0 : u.map(($, E) => {
2491
+ var I;
2492
+ return E === r.index && ($ == null ? void 0 : $.comp) === "Table" && ($.compData = (I = $.compData) == null ? void 0 : I.map((R) => {
2493
+ var K, x;
2494
+ return (R == null ? void 0 : R.key) === "tableContents" && (R.contents = (x = (K = r.content) == null ? void 0 : K.map((H) => {
2495
+ let M = {};
2496
+ for (let ae in H)
2497
+ ae !== "id" && (M[ae] = H[ae]);
2498
+ return M;
2499
+ })) == null ? void 0 : x.map((H) => Object.values(H))), R;
2500
+ })), $;
2501
+ });
2502
+ f.unshift(p == null ? void 0 : p[0]);
2503
+ let U = c(d.value), L = {};
2504
+ for (let $ in U)
2505
+ L[$] = f;
2506
+ d.value = L;
2507
+ }, N = () => {
2508
+ i.value = !1, d.value = {}, b.value = {}, y.value = void 0, e.value++;
2509
+ }, g = (r) => {
2510
+ var V, ee, C, O;
2511
+ const p = (ee = (V = Object.values(c(d.value))) == null ? void 0 : V[0]) == null ? void 0 : ee.filter(($) => ($ == null ? void 0 : $.key) === "tableContentName"), u = (O = (C = Object.values(c(d.value))) == null ? void 0 : C[0]) == null ? void 0 : O.filter(($) => ($ == null ? void 0 : $.key) !== "tableContentName"), f = u == null ? void 0 : u.map(($, E) => (E === r.index && ($.compData = r.contents), $));
2512
+ f.unshift(p == null ? void 0 : p[0]);
2513
+ let U = c(d.value), L = {};
2514
+ for (let $ in U)
2515
+ L[$] = f;
2516
+ d.value = L;
2517
+ }, S = () => {
2518
+ var p, u;
2519
+ let r = {};
2520
+ for (let f in b.value)
2521
+ f === ((p = Object.keys(d.value)) == null ? void 0 : p[0]) ? r[f] = (u = Object.values(d.value)) == null ? void 0 : u[0] : r[f] = b.value[f];
2522
+ t("change", {
2523
+ buttonName: "编辑",
2524
+ index: y.value,
2525
+ singleContent: r
2526
+ }, "methodData"), i.value = !1, d.value = {}, b.value = {}, y.value = void 0;
2527
+ }, h = () => {
2528
+ i.value = !1, d.value = {}, b.value = {}, y.value = void 0;
2529
+ }, v = (r) => {
2530
+ t("change", r, "methodData");
2531
+ }, _ = (r) => Ln(r);
2532
+ return (r, p) => (W(), Z("div", Xs, [
2533
+ (W(!0), Z(he, null, ke(s.value, (u, f) => (W(), Z("div", { key: e.value }, [
2534
+ (u == null ? void 0 : u.key) === "extra" ? (W(), Z("div", Ys)) : (W(), Z("div", en, [
2535
+ (W(), ge(tl(_(u.comp)), {
2536
+ itemData: u == null ? void 0 : u.compData,
2537
+ childItemData: u == null ? void 0 : u.itemChildData,
2538
+ key: f,
2539
+ index: (u == null ? void 0 : u.id) ?? f,
2540
+ onContentClick: D,
2541
+ onChange: v
2542
+ }, null, 40, ["itemData", "childItemData", "index"]))
2543
+ ]))
2544
+ ]))), 128)),
2545
+ G(Be, {
2546
+ visible: i.value,
2547
+ onBeforeDestroy: h
2548
+ }, {
2549
+ default: Y(() => [
2550
+ (W(!0), Z(he, null, ke(o.value, (u, f) => (W(), Z("div", {
2551
+ key: f,
2552
+ class: "extra-dialog"
2553
+ }, [
2554
+ (W(), ge(tl(_(u.comp)), {
2555
+ itemData: u == null ? void 0 : u.compData,
2556
+ onChange: k,
2557
+ childItemData: u == null ? void 0 : u.itemChildData,
2558
+ key: f,
2559
+ onContentChange: g,
2560
+ index: (u == null ? void 0 : u.id) ?? f,
2561
+ class: "extra-component"
2562
+ }, null, 40, ["itemData", "childItemData", "index"]))
2563
+ ]))), 128))
2564
+ ]),
2565
+ footer: Y(() => [
2566
+ T("div", { class: "dialog-footer" }, [
2567
+ T("div", {
2568
+ class: "cancel-button footer-button",
2569
+ onClick: N
2570
+ }, Q("取消")),
2571
+ T("div", {
2572
+ class: "confirm-button footer-button",
2573
+ onClick: S
2574
+ }, Q("确认"))
2575
+ ])
2576
+ ]),
2577
+ _: 1
2578
+ }, 8, ["visible"])
2579
+ ]));
2580
+ }
2581
+ }, an = /* @__PURE__ */ Ce(ln, [["__scopeId", "data-v-b0b2f71f"]]), sn = { class: "method-content" }, nn = ["onClick"], on = {
2582
+ __name: "index",
2583
+ props: {
2584
+ itemData: {
2585
+ type: Array,
2586
+ default: () => []
2587
+ },
2588
+ childItemData: {
2589
+ type: Array,
2590
+ default: () => []
2591
+ },
2592
+ index: Number,
2593
+ changedContent: {
2594
+ type: Object,
2595
+ default: () => {
2596
+ }
2597
+ }
2598
+ },
2599
+ setup(a) {
2600
+ const n = j([]), l = a, e = ca(nl), { itemData: s, isEdit: o } = fl(e), t = (b, y) => {
2601
+ var k;
2602
+ const D = (k = y == null ? void 0 : y[0]) == null ? void 0 : k.children;
2603
+ return b == null ? void 0 : b.map((N) => {
2604
+ var g;
2605
+ return N = (g = N == null ? void 0 : N.map((S, h) => {
2606
+ var v;
2607
+ return {
2608
+ key: (v = D[h]) == null ? void 0 : v.label,
2609
+ value: S
2610
+ };
2611
+ })) == null ? void 0 : g.filter((S) => S.key), N;
2612
+ });
2613
+ };
2614
+ we(
2615
+ () => s.value,
2616
+ async () => {
2617
+ o.value == "view" && await d(c(l.itemData));
2618
+ },
2619
+ { deep: !0 }
2620
+ );
2621
+ const i = async (b) => {
2622
+ var r, p, u, f, U, L;
2623
+ let y = {};
2624
+ if ((r = c(b.content)) == null || r.forEach((V, ee) => {
2625
+ var C, O, $, E, I, R, K, x, H, M, ae, J, ce, pe, ye, fe, _e;
2626
+ if ((V == null ? void 0 : V.comp) === "Table") {
2627
+ let xe = (E = ($ = (O = (C = V == null ? void 0 : V.compData) == null ? void 0 : C.find((re) => (re == null ? void 0 : re.key) === "header")) == null ? void 0 : O.contents) == null ? void 0 : $[0]) == null ? void 0 : E.some((re) => re == null ? void 0 : re.children), $e = (K = (R = (I = V == null ? void 0 : V.compData) == null ? void 0 : I.find((re) => (re == null ? void 0 : re.key) === "tableContents")) == null ? void 0 : R.contents) == null ? void 0 : K.map((re) => re.slice(1)), de = (J = (ae = (M = (H = (x = V == null ? void 0 : V.compData) == null ? void 0 : x.find((re) => (re == null ? void 0 : re.key) === "header")) == null ? void 0 : H.contents) == null ? void 0 : M[0]) == null ? void 0 : ae[0]) == null ? void 0 : J.label, ve = (ye = (pe = (ce = V == null ? void 0 : V.compData) == null ? void 0 : ce.find((re) => (re == null ? void 0 : re.key) === "header")) == null ? void 0 : pe.contents) == null ? void 0 : ye[0];
2628
+ if (xe)
2629
+ y[de] = t($e, ve);
2630
+ else {
2631
+ const re = [];
2632
+ ve = ve.slice(1, ve.length - 1), ve == null || ve.forEach((je, Se) => {
2633
+ $e == null || $e.forEach((Ne) => {
2634
+ re.push({
2635
+ key: je.label + Ne[0],
2636
+ value: Ne[Se + 1]
2637
+ });
2638
+ });
2639
+ }), y["form" + ee] = re;
2640
+ }
2641
+ } else {
2642
+ const xe = (_e = (fe = V.compData) == null ? void 0 : fe.find((de) => (de == null ? void 0 : de.key) === "formContent")) == null ? void 0 : _e.contents;
2643
+ y.form = {};
2644
+ const $e = [];
2645
+ xe == null || xe.forEach((de) => {
2646
+ de.key !== "" && (de = {
2647
+ key: (de == null ? void 0 : de.key) ?? (de == null ? void 0 : de.label),
2648
+ value: de == null ? void 0 : de.value
2649
+ }, $e.push(de));
2650
+ }), y.form = $e;
2651
+ }
2652
+ }), b.api) {
2653
+ const V = await ra.post(b.api, {
2654
+ data: y,
2655
+ templateFileName: (p = b == null ? void 0 : b.extraContent) == null ? void 0 : p[0]
2656
+ }, {
2657
+ responseType: "blob",
2658
+ // 必须设置
2659
+ headers: {
2660
+ "Content-Type": "application/json"
2661
+ }
2662
+ });
2663
+ var D = new Blob([V.data], {
2664
+ type: "application/octet-stream;charset=UTF-8"
2665
+ }), k = V.headers["content-disposition"], N = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), g = N.exec(k), S = ((U = (f = (u = b == null ? void 0 : b.extraContent) == null ? void 0 : u[0]) == null ? void 0 : f.split(".")) == null ? void 0 : U[0]) + "." + ((L = g[1].split(".")) == null ? void 0 : L[1]), h = document.createElement("a"), v = window.URL.createObjectURL(D), _ = /^["](.*)["]$/g;
2666
+ h.style.display = "none", h.href = v, h.download = decodeURI(S.replace(_, "$1")), document.body.appendChild(h), h.click(), document.body.removeChild(h), window.URL.revokeObjectURL(v);
2667
+ }
2668
+ }, d = async (b) => {
2669
+ var N;
2670
+ const y = c(b), D = y == null ? void 0 : y.map(async (g) => {
2671
+ var p, u, f, U, L, V, ee;
2672
+ const h = (p = (await ll({
2673
+ key: {
2674
+ systemKey: sessionStorage.getItem("systemKey"),
2675
+ parentTable: "",
2676
+ type: "method",
2677
+ methodName: g.method
2678
+ }
2679
+ })).data.result) == null ? void 0 : p[0], v = await ll({
2680
+ key: {
2681
+ systemKey: sessionStorage.getItem("systemKey"),
2682
+ type: "methodData",
2683
+ tableId: h == null ? void 0 : h.id
2684
+ }
2685
+ }), _ = await la((u = g == null ? void 0 : g.value) == null ? void 0 : u[0], sessionStorage.getItem("systemKey"), ""), r = (f = v.data.result) == null ? void 0 : f[0];
2686
+ return {
2687
+ buttonName: (U = h == null ? void 0 : h.key) == null ? void 0 : U.methodKey,
2688
+ api: (V = (L = r == null ? void 0 : r.value) == null ? void 0 : L.tableData) == null ? void 0 : V[0],
2689
+ content: _ == null ? void 0 : _.filter((C) => C.comp !== "methodButton"),
2690
+ extraContent: (ee = c(g.value)) == null ? void 0 : ee.slice(1)
2691
+ };
2692
+ }), k = await Promise.all(D);
2693
+ n.value = k == null ? void 0 : k.filter((g) => g == null ? void 0 : g.extraContent), (N = n.value) == null || N.forEach((g) => {
2694
+ var S;
2695
+ g.api === "" && ((S = g.content) == null || S.forEach((h) => {
2696
+ var v;
2697
+ h.comp == "Table" && e.setExtraContents(aa(h.compData, (v = g.extraContent) == null ? void 0 : v[0]));
2698
+ }));
2699
+ });
2700
+ };
2701
+ return we(
2702
+ () => l.itemData,
2703
+ async () => {
2704
+ o.value == "view" && await d(c(l.itemData));
2705
+ },
2706
+ { immediate: !0, deep: !0 }
2707
+ ), (b, y) => (W(), Z("div", sn, [
2708
+ (W(!0), Z(he, null, ke(n.value, (D) => (W(), Z("div", null, [
2709
+ D.api !== "" ? (W(), Z("div", {
2710
+ key: 0,
2711
+ onClick: (k) => i(D),
2712
+ class: "method-buttons"
2713
+ }, Q(D.buttonName), 9, nn)) : Me("", !0)
2714
+ ]))), 256))
2715
+ ]));
2716
+ }
2717
+ }, rn = /* @__PURE__ */ Ce(on, [["__scopeId", "data-v-0c52611a"]]), un = {};
2718
+ function tn(a, n) {
2719
+ return " 567 ";
2720
+ }
2721
+ const cn = /* @__PURE__ */ Ce(un, [["render", tn]]), pn = { class: "module content" }, dn = { class: "module data" }, fn = { class: "module layout" }, hn = { class: "form-content" }, yn = /* @__PURE__ */ Ve({
2722
+ __name: "operate",
2723
+ props: {
2724
+ itemContents: {
2725
+ type: Array,
2726
+ default: () => []
2727
+ },
2728
+ originalItemContents: {
2729
+ type: Array,
2730
+ default: () => []
2731
+ }
2732
+ },
2733
+ emits: ["change"],
2734
+ setup(a, { emit: n }) {
2735
+ const l = a, e = n, s = dl({
2736
+ visible: !1,
2737
+ width: "40%",
2738
+ title: "签名配置"
2739
+ }), o = j("create"), t = j([
2740
+ {
2741
+ label: "取消",
2742
+ background: "#c0c4cc"
2743
+ },
2744
+ {
2745
+ label: "确认",
2746
+ background: "#436aaf"
2747
+ }
2748
+ ]), i = j([
2749
+ {
2750
+ label: "宽度(%):",
2751
+ prop: "signPadWidth",
2752
+ type: "number",
2753
+ value: "30"
2754
+ },
2755
+ {
2756
+ label: "弹窗名称:",
2757
+ prop: "dialogTitle",
2758
+ type: "input",
2759
+ value: ""
2760
+ },
2761
+ {
2762
+ label: "弹窗宽度(%):",
2763
+ prop: "dialogWidth",
2764
+ type: "number",
2765
+ value: "30"
2766
+ },
2767
+ {
2768
+ label: "弹窗显示:",
2769
+ prop: "dialogShow",
2770
+ type: "radio",
2771
+ contents: [
2772
+ {
2773
+ label: "显示",
2774
+ value: !0
2775
+ },
2776
+ {
2777
+ label: "隐藏",
2778
+ value: !1
2779
+ }
2780
+ ],
2781
+ value: !1,
2782
+ isFormColHidden: !0
2783
+ },
2784
+ {
2785
+ label: "路径:",
2786
+ prop: "url",
2787
+ type: "input",
2788
+ value: "",
2789
+ isFormColHidden: !0
2790
+ }
2791
+ ]), d = pl(() => [
2792
+ {
2793
+ label: "",
2794
+ prop: "index",
2795
+ type: "input",
2796
+ value: "",
2797
+ isFormColHidden: !0
2798
+ },
2799
+ {
2800
+ label: "类型:",
2801
+ prop: "label",
2802
+ type: "select",
2803
+ contents: [
2804
+ {
2805
+ label: "电子签名",
2806
+ value: "电子签名"
2807
+ },
2808
+ {
2809
+ label: "签字版",
2810
+ value: "签字版"
2811
+ },
2812
+ {
2813
+ label: "上传签名",
2814
+ value: "上传签名"
2815
+ }
2816
+ ],
2817
+ value: ""
2818
+ },
2819
+ {
2820
+ label: "图标",
2821
+ prop: "icon",
2822
+ type: "inputPopover",
2823
+ value: ""
2824
+ }
2825
+ // {
2826
+ // label: '是否禁用',
2827
+ // prop: 'disabled',
2828
+ // type: 'radio',
2829
+ // contents: [
2830
+ // {
2831
+ // label: '是',
2832
+ // value: true,
2833
+ // },
2834
+ // {
2835
+ // label: '否',
2836
+ // value: false,
2837
+ // }
2838
+ // ],
2839
+ // value: false
2840
+ // },
2841
+ ]), b = j({}), y = j([]), D = () => ({
2842
+ comp: "Signature",
2843
+ compData: [
2844
+ {
2845
+ key: "signTypeList",
2846
+ contents: y.value
2847
+ },
2848
+ {
2849
+ key: "signConfig",
2850
+ contents: b.value
2851
+ }
2852
+ ]
2853
+ }), k = (h) => {
2854
+ var v;
2855
+ b.value = c(h), e("change", (v = D()) == null ? void 0 : v.compData);
2856
+ }, N = (h) => {
2857
+ var v, _;
2858
+ if ((h == null ? void 0 : h.buttonName) === "确认") {
2859
+ const r = c(h == null ? void 0 : h.content);
2860
+ switch (o.value) {
2861
+ case "create":
2862
+ y.value.push({
2863
+ ...r,
2864
+ index: ((v = y.value) == null ? void 0 : v.length) + 1
2865
+ });
2866
+ break;
2867
+ }
2868
+ e("change", (_ = D()) == null ? void 0 : _.compData), s.visible = !1;
2869
+ } else
2870
+ s.visible = !1;
2871
+ }, g = (h, v) => {
2872
+ var _, r;
2873
+ switch (h) {
2874
+ case "create":
2875
+ (_ = d.value) == null || _.forEach((p) => {
2876
+ p.value = "";
2877
+ }), o.value = "create", s.visible = !0;
2878
+ break;
2879
+ case "update":
2880
+ (r = d.value) == null || r.forEach((p) => {
2881
+ p.value = v[p == null ? void 0 : p.prop];
2882
+ }), console.log(345, v), o.value = "update", s.visible = !0;
2883
+ break;
2884
+ case "delete":
2885
+ y.value.splice(v, 1), o.value = "delete";
2886
+ break;
2887
+ }
2888
+ }, S = () => {
2889
+ s.visible = !1;
2890
+ };
2891
+ return we(() => l == null ? void 0 : l.itemContents, (h) => {
2892
+ var v, _;
2893
+ h && (console.log(5670, h), b.value = ((v = h == null ? void 0 : h.find((r) => r.key === "signConfig")) == null ? void 0 : v.contents) ?? {}, y.value = ((_ = h == null ? void 0 : h.find((r) => r.key === "signTypeList")) == null ? void 0 : _.contents) ?? []);
2894
+ }, { immediate: !0 }), (h, v) => {
2895
+ const _ = me("svg-icon"), r = me("el-button");
2896
+ return W(), Z(he, null, [
2897
+ T("div", null, [
2898
+ T("div", pn, [
2899
+ v[2] || (v[2] = T("h4", { class: "module-title" }, "签名类型", -1)),
2900
+ T("div", {
2901
+ class: "module-icon",
2902
+ onClick: v[0] || (v[0] = (p) => g("create"))
2903
+ }, [
2904
+ T("div", null, [
2905
+ G(_, {
2906
+ name: "Plus",
2907
+ class: "icon-size"
2908
+ }),
2909
+ v[1] || (v[1] = T("span", null, "新增", -1))
2910
+ ])
2911
+ ])
2912
+ ]),
2913
+ T("div", dn, [
2914
+ (W(!0), Z(he, null, ke(y.value, (p, u) => (W(), Z("div", {
2915
+ class: "module-data-item",
2916
+ key: u
2917
+ }, [
2918
+ T("span", null, Q(p == null ? void 0 : p.label), 1),
2919
+ T("div", null, [
2920
+ G(r, {
2921
+ type: "primary",
2922
+ size: "small",
2923
+ onClick: (f) => g("update", { ...p, index: u + 1 })
2924
+ }, {
2925
+ default: Y(() => v[3] || (v[3] = [
2926
+ Ee("修改")
2927
+ ])),
2928
+ _: 2,
2929
+ __: [3]
2930
+ }, 1032, ["onClick"]),
2931
+ G(r, {
2932
+ type: "danger",
2933
+ size: "small",
2934
+ onClick: (f) => g("delete", u)
2935
+ }, {
2936
+ default: Y(() => v[4] || (v[4] = [
2937
+ Ee("删除")
2938
+ ])),
2939
+ _: 2,
2940
+ __: [4]
2941
+ }, 1032, ["onClick"])
2942
+ ])
2943
+ ]))), 128))
2944
+ ]),
2945
+ T("div", fn, [
2946
+ G(Ae, {
2947
+ rowContents: i.value,
2948
+ onChange: k
2949
+ }, null, 8, ["rowContents"])
2950
+ ])
2951
+ ]),
2952
+ G(Be, {
2953
+ visible: s.visible,
2954
+ title: s.title,
2955
+ onBeforeDestroy: S,
2956
+ width: s.width
2957
+ }, {
2958
+ default: Y(() => [
2959
+ T("div", hn, [
2960
+ (W(), ge(Ae, {
2961
+ rowContents: d.value,
2962
+ key: d.value,
2963
+ isEnableWrap: !1,
2964
+ isButtonRow: !1,
2965
+ isStartJustify: !1,
2966
+ buttonValue: t.value,
2967
+ onOnButtonClick: N
2968
+ }, null, 8, ["rowContents", "buttonValue"]))
2969
+ ])
2970
+ ]),
2971
+ _: 1
2972
+ }, 8, ["visible", "title", "width"])
2973
+ ], 64);
2974
+ };
2975
+ }
2976
+ }), vn = /* @__PURE__ */ Ce(yn, [["__scopeId", "data-v-4b15bd3e"]]), mn = /* @__PURE__ */ Ve({
2977
+ __name: "index",
2978
+ props: {
2979
+ stepConfig: {
2980
+ type: Object,
2981
+ default: {}
2982
+ },
2983
+ stepList: {
2984
+ type: Array,
2985
+ default: () => []
2986
+ }
2987
+ },
2988
+ emits: ["clickStep", "clickTrigger", "changeTrigger"],
2989
+ setup(a, { emit: n }) {
2990
+ const l = a, e = n, s = j(1), o = pl(() => {
2991
+ var D, k;
2992
+ return (D = l == null ? void 0 : l.stepConfig) != null && D.allowTrigger ? s.value : (k = l == null ? void 0 : l.stepConfig) == null ? void 0 : k.active;
2993
+ }), t = (D, k) => {
2994
+ s.value = k, e("clickStep", D, k);
2995
+ }, i = (D) => ia(D), d = () => {
2996
+ var k;
2997
+ const D = (k = l == null ? void 0 : l.stepList) == null ? void 0 : k.find((N, g) => g + 1 === o.value);
2998
+ return console.log("findStep", D), D ? D == null ? void 0 : D.children : [];
2999
+ }, b = (D) => {
3000
+ e("clickTrigger", D);
3001
+ }, y = (D) => {
3002
+ e("changeTrigger", D);
3003
+ };
3004
+ return (D, k) => {
3005
+ var S, h, v, _, r;
3006
+ const N = me("el-step"), g = me("el-steps");
3007
+ return W(), Z(he, null, [
3008
+ G(g, {
3009
+ direction: (S = a.stepConfig) == null ? void 0 : S.direction,
3010
+ active: o.value,
3011
+ "finish-status": "success",
3012
+ simple: (h = a.stepConfig) == null ? void 0 : h.simple,
3013
+ "align-center": (v = a.stepConfig) == null ? void 0 : v.alignCenter
3014
+ }, {
3015
+ default: Y(() => [
3016
+ (W(!0), Z(he, null, ke(a.stepList, (p, u) => (W(), ge(N, {
3017
+ key: u,
3018
+ class: "step-item",
3019
+ onClick: (f) => t(p, u + 1)
3020
+ }, {
3021
+ title: Y(() => [
3022
+ Xe(D.$slots, "title", {
3023
+ title: p == null ? void 0 : p.title
3024
+ }, void 0, !0)
3025
+ ]),
3026
+ description: Y(() => [
3027
+ Xe(D.$slots, "description", {
3028
+ description: p == null ? void 0 : p.description
3029
+ }, void 0, !0)
3030
+ ]),
3031
+ _: 2
3032
+ }, 1032, ["onClick"]))), 128))
3033
+ ]),
3034
+ _: 3
3035
+ }, 8, ["direction", "active", "simple", "align-center"]),
3036
+ (_ = a.stepConfig) != null && _.allowTrigger && ((r = a.stepConfig) != null && r.active) ? (W(!0), Z(he, { key: 0 }, ke(d(), (p, u) => (W(), Z("div", {
3037
+ key: u,
3038
+ class: "step-cont-wrap"
3039
+ }, [
3040
+ (W(), ge(tl(i(p == null ? void 0 : p.type)), {
3041
+ modelValue: p.value,
3042
+ "onUpdate:modelValue": (f) => p.value = f,
3043
+ onClickTrigger: b,
3044
+ onChangeTrigger: y,
3045
+ content: p == null ? void 0 : p.content
3046
+ }, na({ _: 2 }, [
3047
+ ke(D.$slots, (f, U) => ({
3048
+ name: U,
3049
+ fn: Y((L) => [
3050
+ Xe(D.$slots, U, oa({ ref_for: !0 }, L || {}), void 0, !0)
3051
+ ])
3052
+ }))
3053
+ ]), 1064, ["modelValue", "onUpdate:modelValue", "content"]))
3054
+ ]))), 128)) : Me("", !0)
3055
+ ], 64);
3056
+ };
3057
+ }
3058
+ }), bn = /* @__PURE__ */ Ce(mn, [["__scopeId", "data-v-85b1cc5d"]]), gn = /* @__PURE__ */ Ve({
3059
+ __name: "index",
3060
+ props: {
3061
+ itemData: {
3062
+ type: Array,
3063
+ default: () => []
3064
+ },
3065
+ childItemData: {
3066
+ type: Array,
3067
+ default: () => []
3068
+ }
3069
+ },
3070
+ emits: ["clickStep"],
3071
+ setup(a, { emit: n }) {
3072
+ const l = a, e = n, s = j({}), o = j([]), t = (i, d) => {
3073
+ e("clickStep", i, d);
3074
+ };
3075
+ return we(() => l == null ? void 0 : l.itemData, (i) => {
3076
+ var d, b;
3077
+ o.value = (d = i == null ? void 0 : i.find((y) => (y == null ? void 0 : y.key) === "stepList")) == null ? void 0 : d.contents, s.value = (b = i == null ? void 0 : i.find((y) => (y == null ? void 0 : y.key) === "stepConfig")) == null ? void 0 : b.contents;
3078
+ }, {
3079
+ immediate: !0
3080
+ }), (i, d) => {
3081
+ const b = me("svg-icon");
3082
+ return W(), ge(bn, {
3083
+ stepConfig: s.value,
3084
+ stepList: o.value,
3085
+ onClickStep: t
3086
+ }, {
3087
+ icon: Y(() => [
3088
+ G(b, { name: "import" })
3089
+ ]),
3090
+ title: Y(({ title: y }) => [
3091
+ Ee(Q(y), 1)
3092
+ ]),
3093
+ description: Y(({ description: y }) => [
3094
+ Ee(Q(y), 1)
3095
+ ]),
3096
+ _: 1
3097
+ }, 8, ["stepConfig", "stepList"]);
3098
+ };
3099
+ }
3100
+ }), kn = /* @__PURE__ */ Ve({
3101
+ __name: "index",
3102
+ props: {
3103
+ activities: {
3104
+ type: Array,
3105
+ default: () => []
3106
+ },
3107
+ timeLineConfig: {
3108
+ type: Object,
3109
+ default: () => {
3110
+ }
3111
+ }
3112
+ },
3113
+ setup(a) {
3114
+ return (n, l) => {
3115
+ const e = me("el-timeline-item"), s = me("el-timeline");
3116
+ return W(), ge(s, null, {
3117
+ default: Y(() => [
3118
+ (W(!0), Z(he, null, ke(a.activities, (o, t) => (W(), ge(e, {
3119
+ key: t,
3120
+ timestamp: o.timestamp,
3121
+ placement: a.timeLineConfig.placement,
3122
+ center: a.timeLineConfig.isCenter,
3123
+ "hide-timestamp": !0,
3124
+ type: a.timeLineConfig.type,
3125
+ color: a.timeLineConfig.color,
3126
+ size: a.timeLineConfig.size,
3127
+ icon: a.timeLineConfig.icon,
3128
+ hollow: a.timeLineConfig.isHollow
3129
+ }, {
3130
+ default: Y(() => [
3131
+ Xe(n.$slots, "content", {
3132
+ content: o == null ? void 0 : o.content,
3133
+ timestamp: o == null ? void 0 : o.timestamp
3134
+ }, void 0, !0)
3135
+ ]),
3136
+ _: 2
3137
+ }, 1032, ["timestamp", "placement", "center", "type", "color", "size", "icon", "hollow"]))), 128))
3138
+ ]),
3139
+ _: 3
3140
+ });
3141
+ };
3142
+ }
3143
+ }), Cn = /* @__PURE__ */ Ce(kn, [["__scopeId", "data-v-4172a886"]]), _n = { class: "line-content" }, xn = { class: "line-time" }, $n = /* @__PURE__ */ Ve({
3144
+ __name: "index",
3145
+ props: {
3146
+ itemData: {
3147
+ type: Array,
3148
+ default: () => []
3149
+ }
3150
+ },
3151
+ setup(a) {
3152
+ const n = a, l = j({}), e = j([]);
3153
+ return we(() => n == null ? void 0 : n.itemData, (s) => {
3154
+ var o, t;
3155
+ e.value = (o = s == null ? void 0 : s.find((i) => (i == null ? void 0 : i.key) === "timeLineList")) == null ? void 0 : o.contents, l.value = (t = s == null ? void 0 : s.find((i) => (i == null ? void 0 : i.key) === "timeLineConfig")) == null ? void 0 : t.contents;
3156
+ }, {
3157
+ immediate: !0
3158
+ }), (s, o) => (W(), ge(Cn, {
3159
+ activities: e.value,
3160
+ timeLineConfig: l.value
3161
+ }, {
3162
+ content: Y(({ content: t, timestamp: i }) => [
3163
+ T("span", _n, Q(t), 1),
3164
+ T("span", xn, Q(i), 1)
3165
+ ]),
3166
+ _: 1
3167
+ }, 8, ["activities", "timeLineConfig"]));
3168
+ }
3169
+ }), An = /* @__PURE__ */ Ce($n, [["__scopeId", "data-v-b4d9deed"]]), wn = { class: "tabs-content" }, Tn = {
3170
+ __name: "index",
3171
+ props: {
3172
+ itemData: {
3173
+ type: Array,
3174
+ default: () => []
3175
+ },
3176
+ childItemData: {
3177
+ type: Array,
3178
+ default: () => []
3179
+ },
3180
+ index: Number
3181
+ },
3182
+ setup(a) {
3183
+ const n = a, l = j([]);
3184
+ return we(
3185
+ () => n == null ? void 0 : n.itemData,
3186
+ (e) => {
3187
+ const s = e.find((o) => (o == null ? void 0 : o.key) == "stepList");
3188
+ s && (l.value = s.contents.map((o) => ({
3189
+ value: o.value || o.title,
3190
+ label: o.label || o.title,
3191
+ children: o.children || []
3192
+ // 关键:传递子内容
3193
+ })));
3194
+ },
3195
+ { immediate: !0, deep: !0 }
3196
+ ), (e, s) => (W(), Z("div", wn, [
3197
+ G(ua, { tabsContents: l.value }, null, 8, ["tabsContents"])
3198
+ ]));
3199
+ }
3200
+ }, In = /* @__PURE__ */ Ce(Tn, [["__scopeId", "data-v-d3bb10b7"]]), En = { class: "tabs-header" }, Dn = { class: "tabs-list" }, On = { class: "tab-name" }, Bn = { class: "tab-actions" }, Nn = {
3201
+ __name: "operate",
3202
+ props: {
3203
+ itemContents: {
3204
+ type: Array,
3205
+ default: () => []
3206
+ }
3207
+ },
3208
+ emits: ["change"],
3209
+ setup(a, { emit: n }) {
3210
+ const l = a, e = n, s = j([]), o = j(!1), t = j(""), i = j({ title: "" }), d = j(-1), b = () => {
3211
+ t.value = "新增标签页", i.value.title = "", d.value = -1, o.value = !0;
3212
+ }, y = (g) => {
3213
+ t.value = "修改标签页", i.value.title = s.value[g].title, d.value = g, o.value = !0;
3214
+ }, D = (g) => {
3215
+ s.value.splice(g, 1), N();
3216
+ }, k = () => {
3217
+ i.value.title.trim() && (d.value === -1 ? s.value.push({
3218
+ title: i.value.title,
3219
+ value: i.value.title,
3220
+ label: i.value.title,
3221
+ children: []
3222
+ }) : (s.value[d.value].title = i.value.title, s.value[d.value].value = i.value.title, s.value[d.value].label = i.value.title), o.value = !1, N());
3223
+ }, N = () => {
3224
+ const g = [
3225
+ {
3226
+ key: "stepList",
3227
+ contents: s.value
3228
+ }
3229
+ ];
3230
+ e("change", g);
3231
+ };
3232
+ return we(
3233
+ () => l.itemContents,
3234
+ (g) => {
3235
+ if (g && g.length > 0) {
3236
+ const S = g.find((h) => h.key === "stepList");
3237
+ S && S.contents && (s.value = S.contents.map((h) => ({
3238
+ title: h.title || "",
3239
+ value: h.value || h.title || "",
3240
+ label: h.label || h.title || "",
3241
+ children: h.children || []
3242
+ })));
3243
+ }
3244
+ },
3245
+ { immediate: !0 }
3246
+ ), (g, S) => {
3247
+ const h = me("svg-icon"), v = me("el-button"), _ = me("el-input"), r = me("el-form-item"), p = me("el-form"), u = me("el-dialog");
3248
+ return W(), Z("div", null, [
3249
+ T("div", En, [
3250
+ S[4] || (S[4] = T("h4", null, "标签页管理", -1)),
3251
+ G(v, {
3252
+ type: "primary",
3253
+ size: "small",
3254
+ onClick: b
3255
+ }, {
3256
+ default: Y(() => [
3257
+ G(h, {
3258
+ name: "Plus",
3259
+ style: { width: "14px", height: "14px", "margin-right": "4px" }
3260
+ }),
3261
+ S[3] || (S[3] = Ee(" 新增标签页 "))
3262
+ ]),
3263
+ _: 1,
3264
+ __: [3]
3265
+ })
3266
+ ]),
3267
+ T("div", Dn, [
3268
+ (W(!0), Z(he, null, ke(s.value, (f, U) => (W(), Z("div", {
3269
+ class: "tab-item",
3270
+ key: U
3271
+ }, [
3272
+ T("span", On, Q(f.title), 1),
3273
+ T("div", Bn, [
3274
+ G(v, {
3275
+ type: "primary",
3276
+ size: "small",
3277
+ onClick: (L) => y(U)
3278
+ }, {
3279
+ default: Y(() => S[5] || (S[5] = [
3280
+ Ee("修改")
3281
+ ])),
3282
+ _: 2,
3283
+ __: [5]
3284
+ }, 1032, ["onClick"]),
3285
+ G(v, {
3286
+ type: "danger",
3287
+ size: "small",
3288
+ onClick: (L) => D(U)
3289
+ }, {
3290
+ default: Y(() => S[6] || (S[6] = [
3291
+ Ee("删除")
3292
+ ])),
3293
+ _: 2,
3294
+ __: [6]
3295
+ }, 1032, ["onClick"])
3296
+ ])
3297
+ ]))), 128))
3298
+ ]),
3299
+ G(u, {
3300
+ modelValue: o.value,
3301
+ "onUpdate:modelValue": S[2] || (S[2] = (f) => o.value = f),
3302
+ title: t.value
3303
+ }, {
3304
+ footer: Y(() => [
3305
+ G(v, {
3306
+ onClick: S[1] || (S[1] = (f) => o.value = !1)
3307
+ }, {
3308
+ default: Y(() => S[7] || (S[7] = [
3309
+ Ee("取消")
3310
+ ])),
3311
+ _: 1,
3312
+ __: [7]
3313
+ }),
3314
+ G(v, {
3315
+ type: "primary",
3316
+ onClick: k
3317
+ }, {
3318
+ default: Y(() => S[8] || (S[8] = [
3319
+ Ee("确定")
3320
+ ])),
3321
+ _: 1,
3322
+ __: [8]
3323
+ })
3324
+ ]),
3325
+ default: Y(() => [
3326
+ G(p, {
3327
+ model: i.value,
3328
+ "label-width": "80px"
3329
+ }, {
3330
+ default: Y(() => [
3331
+ G(r, {
3332
+ label: "标签名称",
3333
+ required: ""
3334
+ }, {
3335
+ default: Y(() => [
3336
+ G(_, {
3337
+ modelValue: i.value.title,
3338
+ "onUpdate:modelValue": S[0] || (S[0] = (f) => i.value.title = f),
3339
+ placeholder: "请输入标签页名称"
3340
+ }, null, 8, ["modelValue"])
3341
+ ]),
3342
+ _: 1
3343
+ })
3344
+ ]),
3345
+ _: 1
3346
+ }, 8, ["model"])
3347
+ ]),
3348
+ _: 1
3349
+ }, 8, ["modelValue", "title"])
3350
+ ]);
3351
+ };
3352
+ }
3353
+ }, Sn = /* @__PURE__ */ Ce(Nn, [["__scopeId", "data-v-a26b1c22"]]), Lo = j([
3354
+ {
3355
+ name: "表格",
3356
+ type: "table",
3357
+ comp: "Table",
3358
+ icon: "Table"
3359
+ },
3360
+ {
3361
+ name: "表单",
3362
+ type: "form",
3363
+ comp: "Form",
3364
+ icon: "Form"
3365
+ },
3366
+ {
3367
+ name: "折叠",
3368
+ type: "fold",
3369
+ comp: "Fold",
3370
+ icon: "Fold"
3371
+ },
3372
+ {
3373
+ name: "头像",
3374
+ type: "avatar",
3375
+ comp: "AvatarUpload",
3376
+ icon: "Avatar"
3377
+ },
3378
+ {
3379
+ name: "签名",
3380
+ type: "signature",
3381
+ comp: "Signature",
3382
+ icon: "Signature"
3383
+ },
3384
+ {
3385
+ name: "步骤条",
3386
+ type: "step",
3387
+ comp: "Step",
3388
+ icon: "Step"
3389
+ },
3390
+ {
3391
+ name: "时间线",
3392
+ type: "timeLine",
3393
+ comp: "TimeLine",
3394
+ icon: "TimeLine"
3395
+ },
3396
+ {
3397
+ name: "标签页",
3398
+ type: "tabs",
3399
+ comp: "Tabs",
3400
+ icon: "Tabs"
3401
+ }
3402
+ ]), Fn = {
3403
+ TABLE: sa,
3404
+ FORM: Cl,
3405
+ TABLEOPERATE: _s,
3406
+ FORMOPERATE: _l,
3407
+ FOLD: Qs,
3408
+ CALCULATOR: an,
3409
+ METHODBUTTON: rn,
3410
+ AVATARUPLOAD: da,
3411
+ SIGNATURE: pa,
3412
+ FORMTOP: Cl,
3413
+ STEP: gn,
3414
+ STEPOPERATE: Ws,
3415
+ TIMELINE: An,
3416
+ TIMELINEOPERATE: Hs,
3417
+ FORMTOPOPERATE: _l,
3418
+ SIGNATUREOPERATE: vn,
3419
+ AVATARUPLOADOPERATE: cn,
3420
+ TABS: In,
3421
+ TABSOPERATE: Sn
3422
+ // 添加其他组件...
3423
+ };
3424
+ function Ln(a) {
3425
+ return Fn[a == null ? void 0 : a.toUpperCase()] || null;
3426
+ }
3427
+ const te = [
3428
+ {
3429
+ key: "FormName",
3430
+ value: "Form"
3431
+ },
3432
+ {
3433
+ key: "TableName",
3434
+ value: "Table"
3435
+ },
3436
+ {
3437
+ key: "MenuName",
3438
+ value: "Menu"
3439
+ },
3440
+ {
3441
+ key: "GroupName",
3442
+ value: "Group"
3443
+ },
3444
+ {
3445
+ key: "SystemKey",
3446
+ value: "System"
3447
+ }
3448
+ ], ue = [
3449
+ {
3450
+ key: "FormDirect",
3451
+ value: "formFlex"
3452
+ },
3453
+ {
3454
+ key: "Form",
3455
+ value: "formContent"
3456
+ },
3457
+ {
3458
+ key: "FormButton",
3459
+ value: "formButton"
3460
+ },
3461
+ {
3462
+ key: "FormFlex",
3463
+ value: "formWrap"
3464
+ },
3465
+ {
3466
+ key: "TableColumns",
3467
+ value: "header"
3468
+ },
3469
+ {
3470
+ key: "TableButton",
3471
+ value: "extraButton"
3472
+ },
3473
+ {
3474
+ key: "TableLineButton",
3475
+ value: "rowButton"
3476
+ },
3477
+ {
3478
+ key: "Table",
3479
+ value: "tableContents"
3480
+ },
3481
+ {
3482
+ key: "TableIndex",
3483
+ value: "tableIndex"
3484
+ },
3485
+ {
3486
+ key: "Menus",
3487
+ value: "menuContents"
3488
+ },
3489
+ {
3490
+ key: "GroupContents",
3491
+ value: "groupContents"
3492
+ }
3493
+ ], ze = j(0), jn = (a) => {
3494
+ const [n, l] = a.split(/=(.+)/), e = n.replace(/['"]/g, "").trim(), s = l.replace(/^['"]|['"]$/g, "");
3495
+ return { key: e, value: s };
3496
+ }, Ye = (a) => {
3497
+ try {
3498
+ return JSON.parse(a), !0;
3499
+ } catch {
3500
+ return !1;
3501
+ }
3502
+ }, Un = (a) => a.includes("$") && a.trim().endsWith("(") ? a + ")" : a, Pn = (a) => {
3503
+ let n = a;
3504
+ const l = [];
3505
+ let e = "";
3506
+ for (const s of n)
3507
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (l.push(e), e = "")) : l.push(s.trim());
3508
+ return l == null ? void 0 : l.filter((s) => s.includes("{"));
3509
+ }, Rn = (a) => {
3510
+ var l;
3511
+ let n = [];
3512
+ return (l = Pn(a.slice(1, -1))) == null || l.forEach((e) => {
3513
+ var o, t, i, d;
3514
+ let s = ((t = (o = e.slice(1, -1)) == null ? void 0 : o.split(",")) == null ? void 0 : t.length) ?? 1;
3515
+ (d = (i = e.slice(1, -1)) == null ? void 0 : i.split(",")) == null || d.forEach((b) => {
3516
+ var N, g, S, h, v, _, r, p, u, f, U, L, V;
3517
+ let y = b == null ? void 0 : b.split(":"), D = y != null && y[0] ? (y == null ? void 0 : y[1].split("$").length) - 1 === 1 ? ((N = y == null ? void 0 : y[0]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1")) + ((g = y == null ? void 0 : y[1]) == null ? void 0 : g.replace(/^"(.*)"$/, "$1")) : Array.isArray((h = (S = y == null ? void 0 : y[1]) == null ? void 0 : S.replace(/^"(.*)"$/, "$1")) == null ? void 0 : h.split("(")) && ((r = (_ = (v = y == null ? void 0 : y[1]) == null ? void 0 : v.replace(/^"(.*)"$/, "$1")) == null ? void 0 : _.split("(")) == null ? void 0 : r.length) > 1 ? ((p = y == null ? void 0 : y[0]) == null ? void 0 : p.replace(/^"(.*)"$/, "$1")) + ((U = (f = (u = y == null ? void 0 : y[1]) == null ? void 0 : u.replace(/^"(.*)"$/, "$1")) == null ? void 0 : f.split("(")) == null ? void 0 : U[0]) + "()" : (L = y == null ? void 0 : y[0]) == null ? void 0 : L.replace(/^"(.*)"$/, "$1") : "", k = (y == null ? void 0 : y[1].split("$").length) - 1 === 0 ? (V = y == null ? void 0 : y[1]) == null ? void 0 : V.replace(/^"(.*)"$/, "$1") : "";
3518
+ ze.value++, n.push({
3519
+ id: ze.value,
3520
+ key: D,
3521
+ value: k,
3522
+ // 如果值为空,则key设为空字符串,否则保留原值
3523
+ width: s,
3524
+ extraContent: y == null ? void 0 : y[1]
3525
+ });
3526
+ });
3527
+ }), n;
3528
+ }, Rl = (a) => {
3529
+ var n, l;
3530
+ try {
3531
+ const e = a.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
3532
+ if (c(e).split("{").length - 1 > 1) {
3533
+ let s = c(e).replace(/^\{(.*)\}$/, "[$1]");
3534
+ if (Ye(s) && !s.includes("$") || (s = s.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Ye(s)) {
3535
+ const o = JSON.parse(s);
3536
+ let t = [];
3537
+ return o == null || o.forEach((i) => {
3538
+ var d;
3539
+ (d = Object.entries(c(i))) == null || d.forEach((b) => {
3540
+ ze.value++, t.push({
3541
+ id: ze.value,
3542
+ key: (b == null ? void 0 : b[0]) ?? "",
3543
+ value: (b == null ? void 0 : b[1]) === "" ? "" : b == null ? void 0 : b[1],
3544
+ // 如果值为空,则key设为空字符串,否则保留原值
3545
+ width: Object.keys(c(i)).length
3546
+ });
3547
+ });
3548
+ }), t;
3549
+ } else
3550
+ return e.trim().startsWith("{{") ? Rn(e.trim()) : rl(s);
3551
+ } else if (Ye(e)) {
3552
+ const s = JSON.parse(e);
3553
+ return Object.entries(s).map(([o, t]) => (ze.value++, {
3554
+ id: ze.value,
3555
+ key: o,
3556
+ value: t === "" ? "" : t,
3557
+ // 如果值为空,则key设为空字符串,否则保留原值
3558
+ width: 1
3559
+ }));
3560
+ } else
3561
+ return ((n = rl(e)) == null ? void 0 : n.length) === 0 ? e : (l = rl(e)) == null ? void 0 : l.map((s) => ({
3562
+ label: s.label,
3563
+ method: Un(s.method)
3564
+ }));
3565
+ } catch (e) {
3566
+ return console.error("转换失败:", e), [];
3567
+ }
3568
+ }, rl = (a) => {
3569
+ a = a.trim().replace(/^\{|\}$/g, "").trim();
3570
+ const n = [];
3571
+ let l = 0;
3572
+ for (; l < a.length; ) {
3573
+ const e = a.slice(l).match(/^\s*"([^"]+)"\s*:\s*/);
3574
+ if (!e) break;
3575
+ const s = e[1];
3576
+ l += e[0].length;
3577
+ let o = "", t = 0, i = !1, d = "";
3578
+ for (let b = l; b < a.length; b++) {
3579
+ const y = a[b];
3580
+ if ((y === '"' || y === "'") && !i ? (i = !0, d = y) : y === d && i && (i = !1, d = ""), !i && ((y === "{" || y === "(" || y === "[") && t++, (y === "}" || y === ")" || y === "]") && t--, y === "," && t === 0 || b === a.length - 1)) {
3581
+ o = a.slice(l, b + 1).trim(), l = b + 1;
3582
+ break;
3583
+ }
3584
+ }
3585
+ n.push({
3586
+ label: s,
3587
+ method: o
3588
+ });
3589
+ }
3590
+ return n;
3591
+ }, Jn = (a, n) => {
3592
+ try {
3593
+ if (te != null && te.find((l) => (l == null ? void 0 : l.key) === n))
3594
+ return a.replace(/['"]/g, "").trim();
3595
+ if (c(a).split("[").length - 1 > 1) {
3596
+ const l = c(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
3597
+ return JSON.parse(l);
3598
+ } else {
3599
+ const l = c(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
3600
+ if (Ye(l)) {
3601
+ const e = JSON.parse(l);
3602
+ return Array.isArray(e) ? e.map((s) => ({ label: s })) : e;
3603
+ } else
3604
+ return Rl(c(a));
3605
+ }
3606
+ } catch (l) {
3607
+ return console.error("解析失败:", l), a;
3608
+ }
3609
+ }, Wn = (a) => ({ [a == null ? void 0 : a.key]: Jn(a == null ? void 0 : a.value, a == null ? void 0 : a.key) }), Vn = (a) => {
3610
+ try {
3611
+ if (c(a).split("[").length - 1 > 1) {
3612
+ const n = c(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
3613
+ return JSON.parse(n);
3614
+ } else
3615
+ return JSON.parse(c(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
3616
+ } catch (n) {
3617
+ return console.error("解析失败:", n), a;
3618
+ }
3619
+ }, zn = (a) => {
3620
+ const n = a.match(/\(([^)]+)\)/);
3621
+ return n ? n[1] : "";
3622
+ }, Gn = (a) => {
3623
+ const n = a.match(/^([^(]+)\s*\(/);
3624
+ return n ? n[1].trim() : a;
3625
+ }, xl = (a) => a.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((n) => n.trim()).filter((n) => n).join("/"), Mn = (a) => {
3626
+ var t, i;
3627
+ let n = [], l = [];
3628
+ const e = (t = c(a)) == null ? void 0 : t.map((d) => d == null ? void 0 : d.key), s = [...new Set((i = c(e)) == null ? void 0 : i.map((d) => zn(d)))];
3629
+ s == null || s.forEach((d) => {
3630
+ let b = a == null ? void 0 : a.filter((k) => k.key.includes(d));
3631
+ b == null || b.forEach((k) => {
3632
+ k != null && k.key.includes("Menus") && (n.push({
3633
+ key: "GroupName",
3634
+ value: xl(k == null ? void 0 : k.value)
3635
+ }), l.push(xl(k == null ? void 0 : k.value)));
3636
+ });
3637
+ let y = a == null ? void 0 : a.filter((k) => k.key.includes(d) && !(k != null && k.key.includes("Menus")));
3638
+ y = y == null ? void 0 : y.map((k) => (k.key = Gn(k.key), k));
3639
+ const D = {
3640
+ key: "GroupContents",
3641
+ value: y
3642
+ };
3643
+ n.push(D);
3644
+ });
3645
+ const o = {
3646
+ key: "Menus",
3647
+ value: l
3648
+ };
3649
+ return n.unshift(o), n;
3650
+ }, Jl = (a) => {
3651
+ var n, l;
3652
+ if (Array.isArray(Object.keys(a)) && ((n = Object.keys(a)) == null ? void 0 : n.length) > 0) {
3653
+ let e = [];
3654
+ return (l = Object.entries(a)) == null || l.forEach(([s, o]) => {
3655
+ var i, d;
3656
+ let t = [];
3657
+ if (t.push(s), ((i = Object.keys(o)) == null ? void 0 : i.length) > 0) {
3658
+ let b = [];
3659
+ (d = Jl(o)) == null || d.forEach((y) => {
3660
+ b.push(y);
3661
+ }), b == null || b.forEach((y) => {
3662
+ t.push(y);
3663
+ });
3664
+ }
3665
+ e.push(t);
3666
+ }), e;
3667
+ }
3668
+ }, Kn = (a, n) => {
3669
+ var e;
3670
+ let l = n;
3671
+ return Array.isArray(Object.keys(a)) && ((e = Object.entries(a)) == null || e.forEach(([s, o]) => {
3672
+ let t = [s];
3673
+ if (typeof o == "object" && o !== null) {
3674
+ let i = Jl(o);
3675
+ i == null || i.forEach((d) => {
3676
+ t.push(d);
3677
+ });
3678
+ }
3679
+ l.push(t);
3680
+ })), l;
3681
+ }, Hn = (a) => {
3682
+ const n = {};
3683
+ return a.forEach((e) => {
3684
+ const s = e.split("/");
3685
+ let o = n;
3686
+ s.forEach((t) => {
3687
+ o[t] || (o[t] = {}), o = o[t];
3688
+ });
3689
+ }), Kn(n, []);
3690
+ }, Wl = (a) => Hn(a), jo = (a) => {
3691
+ var n, l, e, s, o, t, i, d;
3692
+ try {
3693
+ const b = yl((l = (n = c(a)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), y = (s = (e = c(b)) == null ? void 0 : e.filter((g) => !g.includes("/*"))) == null ? void 0 : s.map((g) => jn(g)), D = Mn(y), k = [];
3694
+ if (((o = D == null ? void 0 : D.find((g) => (g == null ? void 0 : g.key) === "Menus")) == null ? void 0 : o.value.length) === 0)
3695
+ return !1;
3696
+ (t = c(D)) == null || t.forEach((g) => {
3697
+ var S, h, v, _, r;
3698
+ te != null && te.find((p) => {
3699
+ var u, f;
3700
+ return ((u = p == null ? void 0 : p.key) == null ? void 0 : u.toUpperCase()) === ((f = g == null ? void 0 : g.key) == null ? void 0 : f.toUpperCase());
3701
+ }) ? k.push({
3702
+ comp: ((S = te == null ? void 0 : te.find((p) => {
3703
+ var u, f;
3704
+ return ((u = p == null ? void 0 : p.key) == null ? void 0 : u.toUpperCase()) === ((f = g == null ? void 0 : g.key) == null ? void 0 : f.toUpperCase());
3705
+ })) == null ? void 0 : S.value) ?? "",
3706
+ name: (h = g == null ? void 0 : g.value) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
3707
+ compData: []
3708
+ }) : ue != null && ue.find((p) => {
3709
+ var u, f;
3710
+ return ((u = p == null ? void 0 : p.key) == null ? void 0 : u.toUpperCase()) === ((f = g == null ? void 0 : g.key) == null ? void 0 : f.toUpperCase());
3711
+ }) && ((k == null ? void 0 : k.length) === 0 && (v = g.key) != null && v.includes("Menus") && k.push({
3712
+ comp: "Menu",
3713
+ name: "",
3714
+ compData: []
3715
+ }), (_ = k == null ? void 0 : k[(k == null ? void 0 : k.length) - 1]) != null && _.compData && k[(k == null ? void 0 : k.length) - 1].compData.push({
3716
+ key: (r = ue == null ? void 0 : ue.find((p) => {
3717
+ var u, f;
3718
+ return ((u = p == null ? void 0 : p.key) == null ? void 0 : u.toUpperCase()) === ((f = g == null ? void 0 : g.key) == null ? void 0 : f.toUpperCase());
3719
+ })) == null ? void 0 : r.value,
3720
+ contents: g == null ? void 0 : g.value
3721
+ }));
3722
+ });
3723
+ let N = (i = c(k)) == null ? void 0 : i.map((g) => {
3724
+ var S;
3725
+ return g != null && g.compData && (g.compData = (S = g == null ? void 0 : g.compData) == null ? void 0 : S.map((h) => {
3726
+ var v, _, r, p, u, f, U, L, V, ee, C;
3727
+ if ((h == null ? void 0 : h.key) === "formFlex")
3728
+ h.contents = ((_ = (v = h.contents) == null ? void 0 : v.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : _.toUpperCase()) !== "Vertical".toUpperCase();
3729
+ else if ((h == null ? void 0 : h.key) === "groupContents")
3730
+ h.contents = (r = c(h.contents)) == null ? void 0 : r.map((O) => Wn(c(O)));
3731
+ else if (Array.isArray(h == null ? void 0 : h.contents))
3732
+ h.contents = Wl(h.contents);
3733
+ else if (((u = (p = h == null ? void 0 : h.contents) == null ? void 0 : p.trim()) != null && u.startsWith("[") || (U = (f = h.contents) == null ? void 0 : f.trim()) != null && U.startsWith("【")) && ((V = (L = h.contents) == null ? void 0 : L.trim()) != null && V.endsWith("]") || (C = (ee = h.contents) == null ? void 0 : ee.trim()) != null && C.endsWith("】")))
3734
+ h.contents = Vn(c(h.contents));
3735
+ else {
3736
+ if (!h.contents) return;
3737
+ h.contents = Rl(c(h.contents));
3738
+ }
3739
+ return h;
3740
+ })), g;
3741
+ });
3742
+ return N = (d = c(N)) == null ? void 0 : d.map((g) => {
3743
+ var S;
3744
+ return (g == null ? void 0 : g.comp) === "Group" && (g.compData = (S = g.compData) == null ? void 0 : S.map((h) => {
3745
+ var _;
3746
+ let v = [];
3747
+ return (_ = h.contents) == null || _.forEach((r) => {
3748
+ var p, u, f, U, L, V, ee, C, O, $, E, I;
3749
+ if (te != null && te.find((R) => {
3750
+ var K, x, H;
3751
+ return ((K = R == null ? void 0 : R.key) == null ? void 0 : K.toUpperCase()) === ((H = (x = Object.keys(r)) == null ? void 0 : x[0]) == null ? void 0 : H.toUpperCase());
3752
+ }))
3753
+ v.push({
3754
+ comp: (p = te == null ? void 0 : te.find((R) => {
3755
+ var K, x, H;
3756
+ return ((K = R == null ? void 0 : R.key) == null ? void 0 : K.toUpperCase()) === ((H = (x = Object.keys(r)) == null ? void 0 : x[0]) == null ? void 0 : H.toUpperCase());
3757
+ })) == null ? void 0 : p.value,
3758
+ name: (f = (u = Object.values(r)) == null ? void 0 : u[0]) == null ? void 0 : f.replace(/[’]|[‘]|[']/g, ""),
3759
+ compData: []
3760
+ });
3761
+ else if (ue != null && ue.find((R) => {
3762
+ var K, x, H;
3763
+ return ((K = R == null ? void 0 : R.key) == null ? void 0 : K.toUpperCase()) === ((H = (x = Object.keys(r)) == null ? void 0 : x[0]) == null ? void 0 : H.toUpperCase());
3764
+ })) {
3765
+ if ((v == null ? void 0 : v.length) === 0) return;
3766
+ (U = v == null ? void 0 : v[(v == null ? void 0 : v.length) - 1]) != null && U.compData && v[(v == null ? void 0 : v.length) - 1].compData.push({
3767
+ key: (L = ue == null ? void 0 : ue.find((R) => {
3768
+ var K, x, H;
3769
+ return ((K = R == null ? void 0 : R.key) == null ? void 0 : K.toUpperCase()) === ((H = (x = Object.keys(r)) == null ? void 0 : x[0]) == null ? void 0 : H.toUpperCase());
3770
+ })) == null ? void 0 : L.value,
3771
+ contents: (V = Object.values(r)) == null ? void 0 : V[0]
3772
+ });
3773
+ } else if ((C = (ee = Object.keys(r)) == null ? void 0 : ee[0]) != null && C.includes("$")) {
3774
+ const R = ($ = (O = Object.keys(c(r))) == null ? void 0 : O[0]) == null ? void 0 : $.split("$");
3775
+ v[(v == null ? void 0 : v.length) - 1].compData.push({
3776
+ key: (E = ue == null ? void 0 : ue.find((K) => {
3777
+ var x, H;
3778
+ return ((x = K == null ? void 0 : K.key) == null ? void 0 : x.toUpperCase()) === ((H = R == null ? void 0 : R[0]) == null ? void 0 : H.toUpperCase());
3779
+ })) == null ? void 0 : E.value,
3780
+ contents: (I = Object.values(r)) == null ? void 0 : I[0],
3781
+ selectLabel: R == null ? void 0 : R[1]
3782
+ });
3783
+ }
3784
+ return r;
3785
+ }), h.contents = v, h;
3786
+ })), g;
3787
+ }), N;
3788
+ } catch {
3789
+ return !1;
3790
+ }
3791
+ }, $l = j(0), Vl = (a) => {
3792
+ const n = [];
3793
+ let l = null;
3794
+ for (let e = 0; e < a.length; e++) {
3795
+ const s = a[e];
3796
+ if (Array.isArray(s))
3797
+ l && (l.children = Vl(s));
3798
+ else {
3799
+ const o = { label: s };
3800
+ n.push(o), l = o;
3801
+ }
3802
+ }
3803
+ return n;
3804
+ }, zl = (a) => {
3805
+ let n = 0;
3806
+ for (const l of a)
3807
+ n++, l.children && (n += zl(l.children));
3808
+ return n;
3809
+ }, Gl = (a, n, l = []) => {
3810
+ let e = 0;
3811
+ for (const s of n) {
3812
+ if (e >= a.length) break;
3813
+ const o = [...a[e]];
3814
+ if (l.push(o), e++, s.children && s.children.length > 0) {
3815
+ const t = [];
3816
+ Gl(
3817
+ a.slice(e),
3818
+ s.children,
3819
+ t
3820
+ ), t.length > 0 && (o.push(t), e += zl(s.children));
3821
+ }
3822
+ }
3823
+ return l;
3824
+ }, Zn = (a, n) => {
3825
+ let l = [];
3826
+ return a == null || a.forEach((s) => {
3827
+ s.some((o) => Array.isArray(o)) ? l.push(...s) : l.push(s);
3828
+ }), Gl(l, n);
3829
+ }, cl = (a) => {
3830
+ const n = { label: a[0].trim() };
3831
+ if (a.length > 1) {
3832
+ const l = a.slice(1);
3833
+ l.length === 1 && Array.isArray(l[0]) ? n.children = l[0].map(
3834
+ (e) => Array.isArray(e) ? cl(e) : { label: e.trim() }
3835
+ ) : n.children = l.map(
3836
+ (e) => Array.isArray(e) ? cl(e) : { label: e.trim() }
3837
+ );
3838
+ }
3839
+ return n;
3840
+ }, Al = (a) => {
3841
+ let n = a.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
3842
+ return n = n.replace(/:}(?=,|]|}|$)/g, ':""}'), n = n.replace(/:,(?=\s*")/g, ':"",'), n = n.replace(
3843
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
3844
+ (l, e, s) => `"${e}://${s}"`
3845
+ ), n = n.replace(
3846
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
3847
+ '$1"$2"$3'
3848
+ ), n;
3849
+ }, qn = (a) => {
3850
+ var l;
3851
+ return a.some((e) => !Array.isArray(e)) ? a : (l = c(a)) == null ? void 0 : l.map((e) => {
3852
+ let s = [];
3853
+ return e.some((o) => Array.isArray(o)) ? e == null || e.forEach((o) => {
3854
+ Array.isArray(o) && s.push(cl(o));
3855
+ }) : e.some((o) => o.includes("[")) ? s.push(e) : s = e.map((o) => ({ label: o.trim() })), s;
3856
+ });
3857
+ }, Ml = (a, n, l) => {
3858
+ let e = a, s = l, o = n;
3859
+ return o.children && (Array.isArray(s[s.length - 1]) ? s[s.length - 1].push(e[0]) : s.push(e[0]), e.shift(), o = o.children), Array.isArray(o) && o.forEach((t) => {
3860
+ if (t.children) {
3861
+ const i = Ml(e, t, s);
3862
+ s = i[0], e = i[1];
3863
+ }
3864
+ }), [s, e];
3865
+ }, Qn = (a, n) => {
3866
+ let l = a, e = [];
3867
+ return n.length > 0 ? n == null || n.forEach((s) => {
3868
+ let o = l == null ? void 0 : l[0];
3869
+ l.shift();
3870
+ const t = Ml(c(l), s, o);
3871
+ o = t[0], l = t[1], e.push(o);
3872
+ }) : e = l, e;
3873
+ }, hl = (a, n) => {
3874
+ const l = qn(c(a));
3875
+ return Qn(l, n);
3876
+ }, Xn = (a) => {
3877
+ const n = [];
3878
+ let l = 0;
3879
+ const e = a.length;
3880
+ for (; l < e; ) {
3881
+ const s = a[l];
3882
+ s.key === "tableColumns" && l + 1 < e && a[l + 1].key === "tableContents" ? (n.push({
3883
+ comp: "Table",
3884
+ compData: [s, a[l + 1]],
3885
+ name: ""
3886
+ }), l += 2) : (n.push(s), l += 1);
3887
+ }
3888
+ return n;
3889
+ }, Kl = (a) => hl([a], []), sl = (a) => {
3890
+ const n = [];
3891
+ return a == null || a.forEach((l) => l == null ? void 0 : l.forEach((s) => {
3892
+ var o, t;
3893
+ $l.value++, n.push({
3894
+ id: $l.value,
3895
+ key: (o = Object.keys(s)) == null ? void 0 : o[0],
3896
+ value: (t = Object.values(s)) == null ? void 0 : t[0],
3897
+ // 如果值为空,则key设为空字符串,否则保留原值
3898
+ width: l.length
3899
+ });
3900
+ })), n;
3901
+ }, wl = (a) => {
3902
+ let n = Xn(a);
3903
+ return n = n == null ? void 0 : n.map((l) => {
3904
+ var e, s, o, t;
3905
+ if (l.comp === "Table")
3906
+ (e = l.compData) != null && e.find((i) => (i == null ? void 0 : i.key) === "header") || (l.compData = (s = l.compData) == null ? void 0 : s.map((i) => (i.key === "tableColumns" ? i = {
3907
+ key: "header",
3908
+ contents: hl(i.value, [])
3909
+ } : i = {
3910
+ key: i.key,
3911
+ contents: i.value
3912
+ }, i)), l.compData.push({
3913
+ key: "extraButton",
3914
+ contents: [{ label: "新增" }]
3915
+ }), l.compData.push({
3916
+ key: "rowButton",
3917
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
3918
+ }));
3919
+ else if (l.key === "form") {
3920
+ const i = (o = l == null ? void 0 : l.value) == null ? void 0 : o.map((d) => (Array.isArray(d) || (d = [d]), d));
3921
+ l = {
3922
+ comp: "Form",
3923
+ compData: [
3924
+ {
3925
+ key: "formFlex",
3926
+ contents: ""
3927
+ },
3928
+ {
3929
+ key: "formContent",
3930
+ contents: sl(i)
3931
+ }
3932
+ ],
3933
+ name: ""
3934
+ };
3935
+ } else if (l.key === "formTop") {
3936
+ const i = (t = l == null ? void 0 : l.value) == null ? void 0 : t.map((d) => (Array.isArray(d) || (d = [d]), d));
3937
+ l = {
3938
+ comp: "FormTop",
3939
+ compData: [
3940
+ {
3941
+ key: "formFlex",
3942
+ contents: ""
3943
+ },
3944
+ {
3945
+ key: "formContent",
3946
+ contents: sl(i)
3947
+ },
3948
+ {
3949
+ key: "enableWrap",
3950
+ contents: !0
3951
+ },
3952
+ {
3953
+ key: "formButton",
3954
+ contents: [{
3955
+ label: "查询"
3956
+ }, {
3957
+ label: "重置"
3958
+ }]
3959
+ }
3960
+ ],
3961
+ name: ""
3962
+ };
3963
+ }
3964
+ return l;
3965
+ }), n;
3966
+ }, Yn = (a, n) => {
3967
+ var i, d, b, y, D, k;
3968
+ const l = [], e = Vl((d = (i = a == null ? void 0 : a.find((N) => N.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : d[0]);
3969
+ l.push({
3970
+ key: "tableIndexColumn",
3971
+ contents: n
3972
+ }), l.push({
3973
+ key: "tableIndex",
3974
+ contents: e
3975
+ });
3976
+ let s = [];
3977
+ const o = (b = a == null ? void 0 : a.find((N) => N.key === "tableColumns")) == null ? void 0 : b.value;
3978
+ o.length === 1 && !(o != null && o[0].some((N) => Array.isArray(N))) ? s = (y = o == null ? void 0 : o[0]) == null ? void 0 : y.map((N) => ({ label: N })) : s = hl((D = a == null ? void 0 : a.find((N) => N.key === "tableColumns")) == null ? void 0 : D.value, e), l.push({
3979
+ key: "header",
3980
+ contents: s
3981
+ });
3982
+ const t = Zn((k = a == null ? void 0 : a.find((N) => N.key === "tableContents")) == null ? void 0 : k.value, e);
3983
+ return l.push({
3984
+ key: "tableContents",
3985
+ contents: t
3986
+ }), l.push({
3987
+ key: "extraButton",
3988
+ contents: [{ label: "新增" }]
3989
+ }), l.push({
3990
+ key: "rowButton",
3991
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
3992
+ }), l;
3993
+ }, Hl = (a) => a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (n, l, e) => {
3994
+ const s = Hl(e);
3995
+ return `"${l}",${s}`;
3996
+ }), qe = (a) => {
3997
+ const n = a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
3998
+ return Hl(n).replace(/^"(.*)"$/, "$1");
3999
+ }, eo = (a) => {
4000
+ const n = /* @__PURE__ */ new Set();
4001
+ return a.filter((l) => {
4002
+ const e = JSON.stringify(l);
4003
+ return n.has(e) ? !1 : n.add(e);
4004
+ });
4005
+ }, Tl = (a) => {
4006
+ var l;
4007
+ let n = [];
4008
+ return (l = c(a)) == null || l.forEach((e) => {
4009
+ var s;
4010
+ (s = e.contents) == null || s.forEach((o) => {
4011
+ n.push(o);
4012
+ });
4013
+ }), n = eo(n), n.push({
4014
+ label: "操作"
4015
+ }), [n];
4016
+ }, lo = (a, n) => a.reduce((l, e, s) => {
4017
+ const o = Math.floor(s / n);
4018
+ return l[o] || (l[o] = []), l[o].push(e), l;
4019
+ }, []), Zl = (a) => a.reduce((n, l) => l.children && l.children.length > 0 ? n + Zl(l.children) : n + 1, 0), ao = (a, n) => {
4020
+ var e;
4021
+ let l = [];
4022
+ return (e = lo(a, Zl(n == null ? void 0 : n[0]) - 1)) == null || e.forEach((s) => {
4023
+ let o = [];
4024
+ s.forEach((t) => {
4025
+ var i;
4026
+ Array.isArray(t.contents) ? (i = t.contents) == null || i.forEach((d) => {
4027
+ o.push(d);
4028
+ }) : o.push(t.contents);
4029
+ }), l.push(o);
4030
+ }), [l];
4031
+ }, so = ["方法体", "输入", "输出"], Il = j(1), yl = (a) => {
4032
+ let n;
4033
+ a.replaceAll(" ", `\r
4034
+ `).includes(`\r
4035
+ `) ? n = a.replaceAll(" ", `\r
4036
+ `).split(`\r
4037
+ `).filter((s) => s.trim() !== "") : n = a.replaceAll(" ", `\r
4038
+ `).split(`
4039
+ `).filter((s) => s.trim() !== "");
4040
+ const l = [];
4041
+ let e = "";
4042
+ for (const s of n)
4043
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e += s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && e[e.length - 1] !== "," && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
4044
+ return l;
4045
+ }, no = (a) => {
4046
+ const [n, l] = a.split(/=(.+)/), e = n.replace(/['"]/g, "").trim(), s = l.replace(/^['"]|['"]$/g, "");
4047
+ return { key: e, value: s };
4048
+ }, ol = (a) => {
4049
+ let n;
4050
+ a != null && a.includes(":") ? n = a.split(":").filter((s) => s.trim() !== "") : n = a == null ? void 0 : a.split(":").filter((s) => s.trim() !== "");
4051
+ const l = [];
4052
+ let e = "";
4053
+ for (const s of n)
4054
+ s.includes("{") || e.includes("{") || s.includes("[") || e.includes("[") || s.includes("【") || e.includes("【") || s.includes("(") || e.includes("(") || s.includes("(") || e.includes("(") || s.includes("/*") || e.includes("/*") ? (e = e !== "" ? e + ":" + s.trim() : s.trim(), c(e).split("{").length - 1 === c(e).split("}").length - 1 && c(e).split("【").length - 1 === c(e).split("】").length - 1 && c(e).split("[").length - 1 === c(e).split("]").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("(").length - 1 === c(e).split(")").length - 1 && c(e).split("/*").length - 1 === c(e).split("*/").length - 1 && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
4055
+ return l;
4056
+ }, oo = (a) => /^[\x00-\x7F]*$/.test(a), ro = (a) => {
4057
+ var s, o;
4058
+ const n = (s = a.map((t) => {
4059
+ var d, b;
4060
+ let i = (b = (d = t.key.split("(")) == null ? void 0 : d[1]) == null ? void 0 : b.trim();
4061
+ return i == null ? void 0 : i.slice(0, i.length - 1);
4062
+ })) == null ? void 0 : s.filter((t) => t), l = n == null ? void 0 : n.map((t) => {
4063
+ var d;
4064
+ return (d = ol(t)) == null ? void 0 : d.map((b) => {
4065
+ var y;
4066
+ if (b.includes("{")) {
4067
+ let D = (y = b.split(":")) == null ? void 0 : y[0];
4068
+ b = D.slice(1, D.length);
4069
+ }
4070
+ return b;
4071
+ });
4072
+ }).filter((t) => t.length !== 0), e = (o = l == null ? void 0 : l.filter((t) => t.length !== 0)) == null ? void 0 : o.map((t) => {
4073
+ let i = "";
4074
+ return t.forEach((d) => {
4075
+ d.includes("{") || (i = i === "" ? i + c(d) : i + "/" + c(d));
4076
+ }), i;
4077
+ });
4078
+ return Wl([...new Set(e)]);
4079
+ }, ql = (a) => {
4080
+ var l, e, s, o, t, i, d, b;
4081
+ const n = (e = (l = a.split("(")) == null ? void 0 : l[1]) == null ? void 0 : e.trim();
4082
+ return ((s = ol(n.slice(0, n.length - 1))) == null ? void 0 : s.length) > 0 ? n.slice(0, n.length - 1) : (b = (d = (i = (t = (o = a.split("(")) == null ? void 0 : o[1]) == null ? void 0 : t.trim()) == null ? void 0 : i.split(")")) == null ? void 0 : d[0]) == null ? void 0 : b.trim();
4083
+ }, io = (a) => {
4084
+ var s;
4085
+ if (!a) return;
4086
+ const n = ql(a), l = (s = ol(n)) == null ? void 0 : s.map((o) => {
4087
+ var t;
4088
+ if (o.includes("{")) {
4089
+ let i = (t = o.split(":")) == null ? void 0 : t[0];
4090
+ o = i.slice(1, i.length);
4091
+ }
4092
+ return o;
4093
+ });
4094
+ let e = "";
4095
+ return l.forEach((o) => {
4096
+ o.includes("{") || (e = e === "" ? e + c(o) : e + "/" + c(o));
4097
+ }), e;
4098
+ }, uo = (a) => {
4099
+ const n = a.match(/\[(.*)\]/s);
4100
+ if (n) {
4101
+ const l = `[${n[1]}]`;
4102
+ try {
4103
+ const e = l.replace(/([^\[\],\s]+)/g, '"$1"');
4104
+ return JSON.parse(e);
4105
+ } catch {
4106
+ return JSON.parse(l.replace(/\[(\s*)(,|])/g, '[""$2').replace(/([^\[\],\s]+)/g, '"$1"').replace(/""/g, '"'));
4107
+ }
4108
+ }
4109
+ }, to = (a) => {
4110
+ var o;
4111
+ if (!a) return;
4112
+ const n = ql(a);
4113
+ let l = [], e = [], s = [];
4114
+ return (o = ol(n)) == null || o.forEach((t) => {
4115
+ var i;
4116
+ t.includes("[") ? l.push(uo(t)) : t.includes("{") && (oo((i = t.slice(1, t.length - 1).split(":")) == null ? void 0 : i[0]) ? s.push(JSON.parse(t.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : Le(t.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? e.push(JSON.parse(t.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : t.includes("$"));
4117
+ }), [l, e, s];
4118
+ }, co = (a) => {
4119
+ const n = [];
4120
+ let l = "";
4121
+ for (const e of a)
4122
+ e.includes("[") || l.includes("[") || e.includes("/*") || l.includes("/*") ? (l += e.trim(), c(l).split("{").length - 1 === c(l).split("}").length - 1 && c(l).split("【").length - 1 === c(l).split("】").length - 1 && c(l).split("[").length - 1 === c(l).split("]").length - 1 && c(l).split("(").length - 1 === c(l).split(")").length - 1 && c(l).split("(").length - 1 === c(l).split(")").length - 1 && c(l).split("/*").length - 1 === c(l).split("*/").length - 1 && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
4123
+ return n;
4124
+ }, El = (a) => {
4125
+ var t, i;
4126
+ const n = [], l = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, e = a.match(l);
4127
+ if (e) {
4128
+ const d = e[1] || e[3], b = e[2] || e[4];
4129
+ if (d && b) {
4130
+ const y = `${d}/${b}`;
4131
+ n.push(y);
4132
+ }
4133
+ }
4134
+ const s = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, o = a.match(s);
4135
+ return o ? n.push(o[0].replace(/\)+$/, "")) : (a == null ? void 0 : a.split(",").length) === 2 && n.push((i = (t = a == null ? void 0 : a.split(",")) == null ? void 0 : t[1]) == null ? void 0 : i.trim()), n;
4136
+ }, il = (a) => {
4137
+ let n = a.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
4138
+ return n = n.replace(/\[\s*,/g, '[{"": ""},'), n = n.replace(/,\s*,/g, ', {"": ""},'), n = n.replace(/,\s*\]/g, ', {"": ""}]'), n = n.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (l, e, s, o, t) => s.includes("'") ? `:${e}${s}${o}${t}` : `:${e}"${s}"${o}${t}`), n = n.replace(/:\s*([,\]}])/g, ': ""$1'), n;
4139
+ }, po = (a) => !/\[[^\]]*\{[^\]]*\]/.test(a), fo = (a) => {
4140
+ const n = c(a).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), l = n ? `${n[2]}/${n[3]}` : null, e = a.match(/\[\{([^}]+)\}\]/), s = e == null ? void 0 : e[1].replaceAll(":", "").replaceAll("'", '"').trim();
4141
+ let o = null;
4142
+ if (s)
4143
+ try {
4144
+ o = JSON.parse(s);
4145
+ } catch (t) {
4146
+ console.error("解析数组失败:", t);
4147
+ }
4148
+ return [l, o];
4149
+ }, ho = (a) => {
4150
+ var i, d, b, y, D, k, N, g, S, h, v;
4151
+ let n = [], l = [], e = {}, s = [], o = a.trim(), t = [];
4152
+ if (o.trim().includes("输入") && o.trim().includes("输出")) {
4153
+ let _ = [], r = a.trim();
4154
+ r = c(r).slice(1, c(r).length - 1);
4155
+ const p = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
4156
+ (g = r.match(p)) == null || g.forEach((u, f) => {
4157
+ var V;
4158
+ const U = u;
4159
+ let L = [];
4160
+ (V = U.slice(1, U.length - 1).replace(":", "$:").split("$:")) == null || V.forEach((ee) => {
4161
+ var C, O, $;
4162
+ if (so.find((E) => ee.includes(E)))
4163
+ if (!ee.includes("=="))
4164
+ L.push({ key: "tableIndexColumn", contents: ee.replaceAll("'", "") });
4165
+ else {
4166
+ let E = [];
4167
+ const I = ee.replaceAll("'", "").split("==");
4168
+ E.push(I == null ? void 0 : I[0]), I != null && I[1].includes("[") ? E.push(I == null ? void 0 : I[1].trim().slice(1, (I == null ? void 0 : I[1].length) - 1).split(",")) : E.push([I == null ? void 0 : I[1]]), L.push({ key: "header", contents: [(O = (C = Kl([E])) == null ? void 0 : C[0]) == null ? void 0 : O[0]] });
4169
+ }
4170
+ else {
4171
+ let E = ee.trim().replaceAll(",", ",").replaceAll("'", '"');
4172
+ if (f % 3 === 0)
4173
+ E.slice(1, E.length - 1).includes("[") ? _.push({
4174
+ key: "tableIndex",
4175
+ contents: [{ label: E }]
4176
+ }) : _.push({
4177
+ key: "tableIndex",
4178
+ contents: [{ label: E.slice(1, E.length - 1) }]
4179
+ });
4180
+ else if ((E == null ? void 0 : E[0]) === "{") {
4181
+ let I = [];
4182
+ const R = E.slice(1, E.length - 1).split(":");
4183
+ if (R.every((K) => Le(K.trim()))) {
4184
+ I.push({ key: "tableContentName", contents: "详情" });
4185
+ let K = [];
4186
+ R.forEach((x, H) => {
4187
+ if (H === 0) {
4188
+ const M = JSON.parse(x).map((ae) => ({ label: ae }));
4189
+ M.push({
4190
+ label: "操作"
4191
+ }), K.push({
4192
+ key: "header",
4193
+ contents: M
4194
+ });
4195
+ } else
4196
+ K.push({
4197
+ key: "tableContents",
4198
+ contents: JSON.parse(x)
4199
+ });
4200
+ }), K.push({
4201
+ key: "extraButton",
4202
+ contents: [{ label: "新增" }]
4203
+ }), K.push({
4204
+ key: "rowButton",
4205
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
4206
+ }), I.push({
4207
+ comp: "Table",
4208
+ compData: K,
4209
+ name: ""
4210
+ }), _.push({
4211
+ key: "tableContents",
4212
+ contents: [I]
4213
+ });
4214
+ }
4215
+ } else {
4216
+ let I = E;
4217
+ I.slice(1, I.length - 1).includes("[") || I.slice(1, I.length - 1).includes("{") ? Le(Al(I.replace(/\s+/g, ""))) && (($ = JSON.parse(Al(I.replace(/\s+/g, "")))) == null || $.map((R) => {
4218
+ if (Array.isArray(R == null ? void 0 : R[0])) {
4219
+ const K = [];
4220
+ K.push({ key: "tableContentName", contents: "详情" });
4221
+ let x = [];
4222
+ R.forEach((H) => {
4223
+ H.forEach((M) => {
4224
+ var ae, J;
4225
+ Il.value++, x.push({
4226
+ id: Il.value,
4227
+ key: (ae = Object.keys(M)) == null ? void 0 : ae[0],
4228
+ value: (J = Object.values(M)) == null ? void 0 : J[0],
4229
+ width: H.length
4230
+ });
4231
+ });
4232
+ }), K.push({
4233
+ comp: "Form",
4234
+ compData: [{
4235
+ key: "formFlex",
4236
+ contents: ""
4237
+ }, {
4238
+ key: "formContent",
4239
+ contents: x
4240
+ }],
4241
+ name: ""
4242
+ }), _.push({
4243
+ key: "tableContents",
4244
+ contents: [K]
4245
+ });
4246
+ } else
4247
+ _.push({
4248
+ key: "tableContents",
4249
+ contents: R == null ? void 0 : R[0]
4250
+ });
4251
+ })) : _.push({
4252
+ key: "tableContents",
4253
+ contents: I.trim().slice(1, I.length - 1)
4254
+ });
4255
+ }
4256
+ }
4257
+ }), _.push(L == null ? void 0 : L[0]);
4258
+ }), t.push({
4259
+ key: "tableIndex",
4260
+ contents: (S = _ == null ? void 0 : _.filter((u) => (u == null ? void 0 : u.key) === "tableIndex")) == null ? void 0 : S.map((u) => {
4261
+ var f;
4262
+ return (f = u.contents) == null ? void 0 : f[0];
4263
+ })
4264
+ }), t.push({
4265
+ key: "extraButton",
4266
+ contents: [{ label: "新增" }]
4267
+ }), t.push({
4268
+ key: "rowButton",
4269
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
4270
+ }), t.push({
4271
+ key: "tableIndexColumn",
4272
+ contents: (v = (h = _ == null ? void 0 : _.filter((u) => (u == null ? void 0 : u.key) === "tableIndexColumn")) == null ? void 0 : h[0]) == null ? void 0 : v.contents
4273
+ }), t.push({
4274
+ key: "header",
4275
+ contents: Tl(_ == null ? void 0 : _.filter((u) => (u == null ? void 0 : u.key) === "header"))
4276
+ }), t.push({
4277
+ key: "tableContents",
4278
+ contents: ao(_ == null ? void 0 : _.filter((u) => (u == null ? void 0 : u.key) === "tableContents"), Tl(_ == null ? void 0 : _.filter((u) => (u == null ? void 0 : u.key) === "header")))
4279
+ });
4280
+ } else {
4281
+ const _ = (i = o.trim().split(",$")) == null ? void 0 : i[0];
4282
+ _[0] === "[" ? o = _.slice(1, _.length - 1) : o.includes(",$") && (o = (d = o.trim().split(",$")) == null ? void 0 : d[0]);
4283
+ let r;
4284
+ if (o.includes("$")) {
4285
+ o = c(o), e.method = (y = (b = c(o).trim()) == null ? void 0 : b.slice(1, o.length).split("(")) == null ? void 0 : y[0];
4286
+ let p;
4287
+ El(o.slice(1, o.length - 2)).length > 1 ? p = El(o.slice(1, o.length - 2)) : p = fo(o), e.value = p;
4288
+ } else
4289
+ Le("[" + il(o).replaceAll("'", '"') + "]") && !po(il(o).replaceAll("'", '"')) ? (o = JSON.parse("[" + il(o).replaceAll("'", '"') + "]"), s = o) : r = (k = (D = c(o).split("}")) == null ? void 0 : D.filter((p) => p !== "")) == null ? void 0 : k.map((p) => {
4290
+ let u = p;
4291
+ return u[0] === "," ? u = u.slice(2, u.length) : u = u.slice(1, u.length), u;
4292
+ });
4293
+ (N = c(r)) == null || N.forEach((p) => {
4294
+ var u, f, U, L, V, ee, C, O, $, E, I, R, K, x, H;
4295
+ if (p.includes("==")) {
4296
+ const M = (R = p == null ? void 0 : p.split(":")) == null ? void 0 : R[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), ae = (K = p == null ? void 0 : p.split(":")) == null ? void 0 : K[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
4297
+ if (Le(ae.trim()) ? l.push(JSON.parse(ae.trim())) : l.push(JSON.parse(ae.replaceAll("'", '"').trim())), M[0] !== "[") {
4298
+ let J = [];
4299
+ Le("[" + qe(M) + "]") ? J.push(JSON.parse("[" + qe(M) + "]")) : Le("[" + qe(M).replaceAll("==", ",") + "]") && J.push(JSON.parse("[" + qe(M).replaceAll("==", ",") + "]"));
4300
+ const ce = c(J);
4301
+ ce.push(["操作"]), n.push(ce);
4302
+ } else {
4303
+ const J = (x = M.slice(1, M.length - 1).replaceAll(",", ",|")) == null ? void 0 : x.split("|"), ce = (H = co(J)) == null ? void 0 : H.map((fe) => ((fe == null ? void 0 : fe[fe.length - 1]) === "," && (fe = fe.slice(0, fe.length - 1)), fe));
4304
+ let pe = [];
4305
+ ce == null || ce.forEach((fe) => {
4306
+ var xe, $e, de, ve;
4307
+ let _e = [];
4308
+ _e.push((xe = fe.split("==")) == null ? void 0 : xe[0].trim().replace(/^"|"$/g, "")), (($e = fe.split("==")) == null ? void 0 : $e[1].trim()[0]) === "[" ? _e.push(JSON.parse((de = fe.split("==")) == null ? void 0 : de[1].trim())) : _e.push([JSON.parse((ve = fe.split("==")) == null ? void 0 : ve[1].trim())]), pe.push(_e);
4309
+ });
4310
+ const ye = c(pe);
4311
+ ye.push(["操作"]), n.push(ye);
4312
+ }
4313
+ } else {
4314
+ if (Le((u = p == null ? void 0 : p.split(":")) == null ? void 0 : u[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
4315
+ let M = JSON.parse((f = p == null ? void 0 : p.split(":")) == null ? void 0 : f[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
4316
+ Array.isArray(M) || (M = [M]), M.push("操作"), n.push(M);
4317
+ }
4318
+ Le((V = (L = (U = p == null ? void 0 : p.split(":")) == null ? void 0 : U[1]) == null ? void 0 : L.replace(/^"|"$/g, "'")) == null ? void 0 : V.replace(/'([^']+)'/g, '"$1"')) ? l.push(JSON.parse((ee = p == null ? void 0 : p.split(":")) == null ? void 0 : ee[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : Le((E = ($ = (O = (C = p == null ? void 0 : p.split(":")) == null ? void 0 : C[1]) == null ? void 0 : O.replace(/^"|"$/g, "'")) == null ? void 0 : $.replaceAll("'", '"')) == null ? void 0 : E.replace(/'([^']+)'/g, '"$1"')) && l.push(JSON.parse((I = p == null ? void 0 : p.split(":")) == null ? void 0 : I[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
4319
+ }
4320
+ });
4321
+ }
4322
+ return [n, l, t, e, s];
4323
+ }, yo = (a) => {
4324
+ const n = [], l = io(a == null ? void 0 : a.key), e = to(a == null ? void 0 : a.key), s = ho(a == null ? void 0 : a.value), o = e == null ? void 0 : e[0], t = s == null ? void 0 : s[4], i = e == null ? void 0 : e[1], d = e == null ? void 0 : e[2], b = s == null ? void 0 : s[0], y = s == null ? void 0 : s[1], D = s == null ? void 0 : s[2], k = s == null ? void 0 : s[3];
4325
+ return l && n.push({
4326
+ key: "contentPath",
4327
+ value: l
4328
+ }), (o == null ? void 0 : o.length) > 0 && n.push({
4329
+ key: "tableIndex",
4330
+ value: o
4331
+ }), k && n.push({
4332
+ key: "extraButton",
4333
+ value: k
4334
+ }), (t == null ? void 0 : t.length) > 0 && n.push({
4335
+ key: "form",
4336
+ value: t
4337
+ }), (i == null ? void 0 : i.length) > 0 && n.push({
4338
+ key: "formTop",
4339
+ value: i
4340
+ }), (d == null ? void 0 : d.length) > 0 && n.push({
4341
+ key: "extra",
4342
+ value: d
4343
+ }), (D == null ? void 0 : D.length) > 0 && n.push({
4344
+ comp: "Table",
4345
+ compData: D,
4346
+ name: ""
4347
+ }), (b == null ? void 0 : b.length) > 0 && n.push({
4348
+ key: "tableColumns",
4349
+ value: b
4350
+ }), (y == null ? void 0 : y.length) > 0 && n.push({
4351
+ key: "tableContents",
4352
+ value: y
4353
+ }), n;
4354
+ }, vo = (a) => {
4355
+ let n = [], l = [];
4356
+ a == null || a.forEach((s) => {
4357
+ Array.isArray(s) && (s == null || s.forEach((o) => {
4358
+ var t;
4359
+ o.comp === "FormTop" && ((t = o.compData) == null || t.forEach((i) => {
4360
+ (i == null ? void 0 : i.key) === "formContent" && (l = [...l, ...i.contents]);
4361
+ }));
4362
+ }));
4363
+ });
4364
+ const e = l.reduce((s, o) => s.find((i) => (i == null ? void 0 : i.key) === (o == null ? void 0 : o.key)) ? s : s.concat([o]), []);
4365
+ return e.length !== 0 && n.push([{
4366
+ comp: "FormTop",
4367
+ compData: [{
4368
+ key: "formFlex",
4369
+ contents: ""
4370
+ }, {
4371
+ key: "formContent",
4372
+ contents: e
4373
+ }, {
4374
+ key: "enableWrap",
4375
+ contents: !0
4376
+ }, {
4377
+ key: "formButton",
4378
+ contents: [{
4379
+ label: "查询"
4380
+ }, {
4381
+ label: "重置"
4382
+ }]
4383
+ }]
4384
+ }]), a == null || a.forEach((s) => {
4385
+ if (Array.isArray(s)) {
4386
+ const o = s.filter((t) => t.comp !== "FormTop");
4387
+ n.push(o);
4388
+ } else
4389
+ s.comp !== "FormTop" && n.push(s);
4390
+ }), n;
4391
+ }, mo = (a, n) => {
4392
+ const l = n.split("/");
4393
+ let e = [];
4394
+ return a == null || a.forEach((s) => {
4395
+ var i, d, b, y, D, k, N, g, S, h, v;
4396
+ const o = [], t = (d = (i = s.find((_) => _.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : d[0];
4397
+ if (t && !t.some((_) => Array.isArray(_))) {
4398
+ const _ = (y = (b = s.find((r) => r.key === "tableColumns")) == null ? void 0 : b.value) == null ? void 0 : y[0];
4399
+ o.push({
4400
+ key: "tableIndexColumn",
4401
+ contents: l[l.length - 1]
4402
+ }), o.push({
4403
+ key: "tableIndex",
4404
+ contents: t == null ? void 0 : t.map((r) => ({ label: r }))
4405
+ }), o.push({
4406
+ key: "extraButton",
4407
+ contents: [{ label: "新增" }]
4408
+ }), o.push({
4409
+ key: "rowButton",
4410
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
4411
+ }), Array.isArray(_) && _.some((r) => Array.isArray(r)) ? o.push({
4412
+ key: "header",
4413
+ contents: Kl(_)
4414
+ }) : o.push({
4415
+ key: "header",
4416
+ contents: Array.isArray(_) ? _ == null ? void 0 : _.map((r) => ({ label: r })) : [_].map((r) => ({ label: r }))
4417
+ }), o.push({
4418
+ key: "tableContents",
4419
+ contents: Array.isArray(_) ? (k = (D = s.find((r) => r.key === "tableContents")) == null ? void 0 : D.value) == null ? void 0 : k[0] : (S = (g = (N = s.find((r) => r.key === "tableContents")) == null ? void 0 : N.value) == null ? void 0 : g[0]) == null ? void 0 : S.map((r) => [r])
4420
+ }), e.push({
4421
+ comp: "Table",
4422
+ name: "",
4423
+ compData: o
4424
+ }), s != null && s.find((r) => (r == null ? void 0 : r.key) === "formTop") && e.push({
4425
+ comp: "FormTop",
4426
+ compData: [
4427
+ {
4428
+ key: "formFlex",
4429
+ contents: ""
4430
+ },
4431
+ {
4432
+ key: "formContent",
4433
+ contents: sl([(h = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.key) === "formTop")) == null ? void 0 : h.value])
4434
+ },
4435
+ {
4436
+ key: "enableWrap",
4437
+ contents: !0
4438
+ },
4439
+ {
4440
+ key: "formButton",
4441
+ contents: [{
4442
+ label: "查询"
4443
+ }, {
4444
+ label: "重置"
4445
+ }]
4446
+ }
4447
+ ],
4448
+ name: ""
4449
+ });
4450
+ } else t ? (e.push({
4451
+ comp: "Table",
4452
+ name: "",
4453
+ compData: Yn(s, l[l.length - 1])
4454
+ }), s != null && s.find((_) => (_ == null ? void 0 : _.key) === "formTop") && e.push({
4455
+ comp: "FormTop",
4456
+ compData: [
4457
+ {
4458
+ key: "formFlex",
4459
+ contents: ""
4460
+ },
4461
+ {
4462
+ key: "formContent",
4463
+ contents: sl([(v = s == null ? void 0 : s.find((_) => (_ == null ? void 0 : _.key) === "formTop")) == null ? void 0 : v.value])
4464
+ },
4465
+ {
4466
+ key: "enableWrap",
4467
+ contents: !0
4468
+ },
4469
+ {
4470
+ key: "formButton",
4471
+ contents: [{
4472
+ label: "查询"
4473
+ }, {
4474
+ label: "重置"
4475
+ }]
4476
+ }
4477
+ ],
4478
+ name: ""
4479
+ })) : s.some((_) => _.key === "extra") ? e.push({
4480
+ comp: "calculator",
4481
+ name: "",
4482
+ compData: wl(s)
4483
+ }) : e.push(wl(s));
4484
+ }), vo(e);
4485
+ }, bo = (a, n) => {
4486
+ var s, o;
4487
+ const l = a.map((t) => t.filter((i) => i.key !== "contentPath"));
4488
+ return {
4489
+ comp: "Group",
4490
+ compData: [{
4491
+ contents: mo(l, n),
4492
+ key: "groupContents"
4493
+ }],
4494
+ name: (o = (s = a[0]) == null ? void 0 : s.find((t) => t.key === "contentPath")) == null ? void 0 : o.value
4495
+ };
4496
+ }, go = (a) => {
4497
+ var s;
4498
+ const n = [], l = c(a).map((o) => {
4499
+ var t;
4500
+ if (o != null && o.find((i) => (i == null ? void 0 : i.key) === "contentPath"))
4501
+ return (t = o == null ? void 0 : o.find((i) => (i == null ? void 0 : i.key) === "contentPath")) == null ? void 0 : t.value;
4502
+ }).filter((o) => o !== ""), e = [...new Set(l)];
4503
+ return (s = e == null ? void 0 : e.filter((o) => o)) == null || s.forEach((o) => {
4504
+ var t;
4505
+ n.push(bo((t = c(a)) == null ? void 0 : t.filter((i) => i.find((d) => d.key === "contentPath" && d.value === o)), o));
4506
+ }), n;
4507
+ }, ko = (a) => {
4508
+ let n = [];
4509
+ n.push({
4510
+ comp: "Menu",
4511
+ compData: [{
4512
+ contents: ro(c(a)),
4513
+ key: "menuContents"
4514
+ }],
4515
+ name: ""
4516
+ });
4517
+ const l = a.map((e) => yo(e)).filter((e) => e.length !== 0);
4518
+ return n = [...n, ...go(l)], n;
4519
+ }, Uo = (a) => {
4520
+ var n, l, e, s, o;
4521
+ try {
4522
+ const t = (e = yl((l = (n = c(a)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : l.replace(")", ")"))) == null ? void 0 : e.filter((b) => b !== ""), i = (o = (s = c(t)) == null ? void 0 : s.filter((b) => !b.includes("/*"))) == null ? void 0 : o.map((b) => no(b));
4523
+ return ko(i);
4524
+ } catch {
4525
+ return !1;
4526
+ }
4527
+ }, Qe = j(0), ul = j(0), Co = (a) => {
4528
+ const n = a.trim().replace(/^'|'$/g, ""), l = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, e = {};
4529
+ let s;
4530
+ for (; (s = l.exec(n)) !== null; ) {
4531
+ const o = s[1];
4532
+ let t = s[2].trim();
4533
+ (t.match(/\[/g) || []).length !== (t.match(/\]/g) || []).length && (t = t == null ? void 0 : t.replace(/]$/, "")), e[o] ? (e[o + ul.value] && ul.value++, e[o + ul.value] = o + "=" + t) : e[o] = o + "=" + t;
4534
+ }
4535
+ return e;
4536
+ }, Ql = (a) => {
4537
+ const [n, l] = a.split("=").map((o) => o.trim()), e = n.replace(/['"]/g, ""), s = l.replace(/^['"]|['"]$/g, "");
4538
+ return { key: e, value: s };
4539
+ }, _o = (a) => {
4540
+ var t;
4541
+ let n = [];
4542
+ const [l, e] = a.split(/=(.+)/), s = l.replace(/['"]/g, "").trim(), o = e.replace(/^['"]|['"]$/g, "");
4543
+ return (t = Object.values(Co(o))) == null || t.forEach((i) => {
4544
+ n.push(Ql(i));
4545
+ }), { key: s, value: n };
4546
+ }, el = (a) => {
4547
+ try {
4548
+ return JSON.parse(a), !0;
4549
+ } catch {
4550
+ return !1;
4551
+ }
4552
+ }, Xl = (a) => {
4553
+ try {
4554
+ const n = a.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
4555
+ if (c(n).split("{").length - 1 > 1) {
4556
+ let l = c(n).replace(/^\{(.*)\}$/, "[$1]");
4557
+ if (el(l) && !l.includes("$") || (l = l.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), el(l)) {
4558
+ const e = JSON.parse(l);
4559
+ let s = [];
4560
+ return e == null || e.forEach((o) => {
4561
+ var t;
4562
+ (t = Object.entries(c(o))) == null || t.forEach((i) => {
4563
+ Qe.value++, s.push({
4564
+ id: Qe.value,
4565
+ key: (i == null ? void 0 : i[0]) ?? "",
4566
+ value: (i == null ? void 0 : i[1]) === "" ? "" : i == null ? void 0 : i[1],
4567
+ // 如果值为空,则key设为空字符串,否则保留原值
4568
+ width: Object.keys(c(o)).length
4569
+ });
4570
+ });
4571
+ }), s;
4572
+ } else
4573
+ return console.error("转换类型不正确:"), [];
4574
+ } else if (el(n)) {
4575
+ const l = JSON.parse(n);
4576
+ return Object.entries(l).map(([e, s]) => (Qe.value++, {
4577
+ id: Qe.value,
4578
+ key: e,
4579
+ value: s === "" ? "" : s,
4580
+ // 如果值为空,则key设为空字符串,否则保留原值
4581
+ width: 1
4582
+ }));
4583
+ } else
4584
+ return n;
4585
+ } catch (n) {
4586
+ return console.error("转换失败:", n), [];
4587
+ }
4588
+ }, xo = (a, n) => {
4589
+ try {
4590
+ if (te != null && te.find((l) => (l == null ? void 0 : l.key) === n))
4591
+ return JSON.parse(a.replace(/[’]|[‘]|[']/g, '"'));
4592
+ if (c(a).split("[").length - 1 > 1) {
4593
+ const l = c(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
4594
+ return JSON.parse(l);
4595
+ } else {
4596
+ const l = c(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
4597
+ if (el(l)) {
4598
+ const e = JSON.parse(l);
4599
+ return Array.isArray(e) ? e.map((s) => ({ label: s })) : e;
4600
+ } else
4601
+ return Xl(c(a));
4602
+ }
4603
+ } catch (l) {
4604
+ return console.error("解析失败:", l), a;
4605
+ }
4606
+ }, $o = (a) => ({ [a == null ? void 0 : a.key]: xo(a == null ? void 0 : a.value, a == null ? void 0 : a.key) }), Ao = (a) => {
4607
+ try {
4608
+ if (c(a).split("[").length - 1 > 1) {
4609
+ const n = c(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
4610
+ return JSON.parse(n);
4611
+ } else
4612
+ return JSON.parse(c(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
4613
+ } catch (n) {
4614
+ return console.error("解析失败:", n), a;
4615
+ }
4616
+ }, Yl = (a) => {
4617
+ var n, l, e, s, o, t;
4618
+ try {
4619
+ const i = yl((l = (n = c(a)) == null ? void 0 : n.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), d = (e = c(i)) == null ? void 0 : e.map((D) => {
4620
+ var N, g;
4621
+ let k = (g = (N = c(D)) == null ? void 0 : N.split("=")) == null ? void 0 : g[0];
4622
+ return k != null && k.includes("GroupContents") ? _o(D) : Ql(D);
4623
+ }), b = [];
4624
+ (s = c(d)) == null || s.forEach((D) => {
4625
+ var k, N, g, S, h;
4626
+ te != null && te.find((v) => {
4627
+ var _, r;
4628
+ return ((_ = v == null ? void 0 : v.key) == null ? void 0 : _.toUpperCase()) === ((r = D == null ? void 0 : D.key) == null ? void 0 : r.toUpperCase());
4629
+ }) ? b.push({
4630
+ comp: ((k = te == null ? void 0 : te.find((v) => {
4631
+ var _, r;
4632
+ return ((_ = v == null ? void 0 : v.key) == null ? void 0 : _.toUpperCase()) === ((r = D == null ? void 0 : D.key) == null ? void 0 : r.toUpperCase());
4633
+ })) == null ? void 0 : k.value) ?? "",
4634
+ name: (N = D == null ? void 0 : D.value) == null ? void 0 : N.replace(/[’]|[‘]|[']/g, ""),
4635
+ compData: []
4636
+ }) : ue != null && ue.find((v) => {
4637
+ var _, r;
4638
+ return ((_ = v == null ? void 0 : v.key) == null ? void 0 : _.toUpperCase()) === ((r = D == null ? void 0 : D.key) == null ? void 0 : r.toUpperCase());
4639
+ }) && ((b == null ? void 0 : b.length) === 0 && (g = D.key) != null && g.includes("Menus") && b.push({
4640
+ comp: "Menu",
4641
+ name: "",
4642
+ compData: []
4643
+ }), (S = b == null ? void 0 : b[(b == null ? void 0 : b.length) - 1]) != null && S.compData && b[(b == null ? void 0 : b.length) - 1].compData.push({
4644
+ key: (h = ue == null ? void 0 : ue.find((v) => {
4645
+ var _, r;
4646
+ return ((_ = v == null ? void 0 : v.key) == null ? void 0 : _.toUpperCase()) === ((r = D == null ? void 0 : D.key) == null ? void 0 : r.toUpperCase());
4647
+ })) == null ? void 0 : h.value,
4648
+ contents: D == null ? void 0 : D.value
4649
+ }));
4650
+ }), console.log("newContents", b);
4651
+ let y = (o = c(b)) == null ? void 0 : o.map((D) => {
4652
+ var k;
4653
+ return D != null && D.compData && (D.compData = (k = D == null ? void 0 : D.compData) == null ? void 0 : k.map((N) => {
4654
+ var g, S, h, v, _, r, p, u, f, U, L;
4655
+ if ((N == null ? void 0 : N.key) === "formFlex")
4656
+ N.contents = ((S = (g = N.contents) == null ? void 0 : g.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : S.toUpperCase()) !== "Vertical".toUpperCase();
4657
+ else if ((N == null ? void 0 : N.key) === "groupContents")
4658
+ N.contents = (h = c(N.contents)) == null ? void 0 : h.map((V) => $o(c(V)));
4659
+ else if (((_ = (v = N.contents) == null ? void 0 : v.trim()) != null && _.startsWith("[") || (p = (r = N.contents) == null ? void 0 : r.trim()) != null && p.startsWith("【")) && ((f = (u = N.contents) == null ? void 0 : u.trim()) != null && f.endsWith("]") || (L = (U = N.contents) == null ? void 0 : U.trim()) != null && L.endsWith("】")))
4660
+ N.contents = Ao(c(N.contents));
4661
+ else {
4662
+ if (!N.contents) return;
4663
+ N.contents = Xl(c(N.contents));
4664
+ }
4665
+ return N;
4666
+ })), D;
4667
+ });
4668
+ return y = (t = c(y)) == null ? void 0 : t.map((D) => {
4669
+ var k;
4670
+ return (D == null ? void 0 : D.comp) === "Group" && (D.compData = (k = D.compData) == null ? void 0 : k.map((N) => {
4671
+ var S;
4672
+ let g = [];
4673
+ return (S = N.contents) == null || S.forEach((h) => {
4674
+ var v, _, r, p, u, f, U, L, V, ee, C, O;
4675
+ if (te != null && te.find(($) => {
4676
+ var E, I, R;
4677
+ return ((E = $ == null ? void 0 : $.key) == null ? void 0 : E.toUpperCase()) === ((R = (I = Object.keys(h)) == null ? void 0 : I[0]) == null ? void 0 : R.toUpperCase());
4678
+ }))
4679
+ g.push({
4680
+ comp: (v = te == null ? void 0 : te.find(($) => {
4681
+ var E, I, R;
4682
+ return ((E = $ == null ? void 0 : $.key) == null ? void 0 : E.toUpperCase()) === ((R = (I = Object.keys(h)) == null ? void 0 : I[0]) == null ? void 0 : R.toUpperCase());
4683
+ })) == null ? void 0 : v.value,
4684
+ name: (r = (_ = Object.values(h)) == null ? void 0 : _[0]) == null ? void 0 : r.replace(/[’]|[‘]|[']/g, ""),
4685
+ compData: []
4686
+ });
4687
+ else if (ue != null && ue.find(($) => {
4688
+ var E, I, R;
4689
+ return ((E = $ == null ? void 0 : $.key) == null ? void 0 : E.toUpperCase()) === ((R = (I = Object.keys(h)) == null ? void 0 : I[0]) == null ? void 0 : R.toUpperCase());
4690
+ })) {
4691
+ if ((g == null ? void 0 : g.length) === 0) return;
4692
+ (p = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && p.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
4693
+ key: (u = ue == null ? void 0 : ue.find(($) => {
4694
+ var E, I, R;
4695
+ return ((E = $ == null ? void 0 : $.key) == null ? void 0 : E.toUpperCase()) === ((R = (I = Object.keys(h)) == null ? void 0 : I[0]) == null ? void 0 : R.toUpperCase());
4696
+ })) == null ? void 0 : u.value,
4697
+ contents: (f = Object.values(h)) == null ? void 0 : f[0]
4698
+ });
4699
+ } else if ((L = (U = Object.keys(h)) == null ? void 0 : U[0]) != null && L.includes("$")) {
4700
+ const $ = (ee = (V = Object.keys(c(h))) == null ? void 0 : V[0]) == null ? void 0 : ee.split("$");
4701
+ g[(g == null ? void 0 : g.length) - 1].compData.push({
4702
+ key: (C = ue == null ? void 0 : ue.find((E) => {
4703
+ var I, R;
4704
+ return ((I = E == null ? void 0 : E.key) == null ? void 0 : I.toUpperCase()) === ((R = $ == null ? void 0 : $[0]) == null ? void 0 : R.toUpperCase());
4705
+ })) == null ? void 0 : C.value,
4706
+ contents: (O = Object.values(h)) == null ? void 0 : O[0],
4707
+ selectLabel: $ == null ? void 0 : $[1]
4708
+ });
4709
+ }
4710
+ return h;
4711
+ }), N.contents = g, N;
4712
+ })), D;
4713
+ }), y;
4714
+ } catch {
4715
+ return !1;
4716
+ }
4717
+ }, Po = (a) => Yl(a), Ro = (a) => !!Yl(a), Ge = j(0), Jo = (a) => a.reduce((l, e) => {
4718
+ var o, t;
4719
+ const s = Object.values(l);
4720
+ return (((o = Object.keys(l)) == null ? void 0 : o.length) === 0 || s[s.length - 1].length >= (e == null ? void 0 : e.width)) && (l[Ge.value] = [], Ge.value++), l[Ge.value - 1].push(e), ((t = Object.keys(l)) == null ? void 0 : t.length) === (e == null ? void 0 : e.width) && (l[Ge.value] = [], Ge.value++), l;
4721
+ }, {});
4722
+ export {
4723
+ Jo as a,
4724
+ ql as b,
4725
+ yl as c,
4726
+ jo as d,
4727
+ Po as e,
4728
+ Uo as f,
4729
+ Ln as g,
4730
+ Ro as i,
4731
+ Wl as m,
4732
+ no as p,
4733
+ Lo as s
4734
+ };