ss-component-new 1.1.232 → 1.1.233

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 (80) hide show
  1. package/dist/array-B86yviQY.cjs +7 -0
  2. package/dist/array-cs5V7Y6_.js +3652 -0
  3. package/dist/{cloneDeep-CktvOFQx.cjs → cloneDeep-E9vLiIxh.cjs} +1 -1
  4. package/dist/{cloneDeep-Dof88Xfu.js → cloneDeep-rq9zaa1w.js} +1 -1
  5. package/dist/{index-BhkmOuOr.js → index-2CGOpPmh.js} +1 -1
  6. package/dist/{index-6i92JFtr.cjs → index-8PaOrNDR.cjs} +1 -1
  7. package/dist/index-9lPgpkGK.cjs +1 -0
  8. package/dist/{index-MHmvswgz.cjs → index-B37UvP2y.cjs} +1 -1
  9. package/dist/{index-CiGPupSC.js → index-B4pDkJNU.js} +1 -1
  10. package/dist/{index-Z1xr-ejC.js → index-B6jVaGs4.js} +1 -1
  11. package/dist/{index-DtJQBHbx.js → index-BMUfxqMd.js} +1 -1
  12. package/dist/{index-DAUiPeRo.js → index-BP5hb3Um.js} +7 -7
  13. package/dist/{index-CpL7Ek4u.cjs → index-BZHTZ9C5.cjs} +1 -1
  14. package/dist/{index-BdcivI0n.js → index-BfvkRKjx.js} +9 -9
  15. package/dist/{index-D672QpxY.cjs → index-BnyrJQBl.cjs} +1 -1
  16. package/dist/{index-B27v9fmq.cjs → index-Bv7WoEDc.cjs} +1 -1
  17. package/dist/index-BvEXBAUK.js +683 -0
  18. package/dist/{index-CRzDMz2f.js → index-C3mEVJgU.js} +7 -7
  19. package/dist/{index-CTDvgz6D.js → index-C7itP7K7.js} +4 -4
  20. package/dist/{index-DXmlMdoB.cjs → index-CBl53aQj.cjs} +1 -1
  21. package/dist/{index-BS-dYA6V.cjs → index-CJyVNY4m.cjs} +1 -1
  22. package/dist/{index-CRxtHDjt.cjs → index-CMSII8_z.cjs} +1 -1
  23. package/dist/{index-CD_V87KZ.cjs → index-CO3-_vKi.cjs} +1 -1
  24. package/dist/{index-DJkyWXUQ.cjs → index-CPz8QnpI.cjs} +1 -1
  25. package/dist/{index-BHOafXrq.js → index-CU2d6hKG.js} +80 -80
  26. package/dist/{index-DBVoOuwx.js → index-CYM-4Fce.js} +5 -5
  27. package/dist/{index-B1DkFC1_.cjs → index-CZShjOok.cjs} +1 -1
  28. package/dist/{index-B5ixqHZB.cjs → index-Cs21pF86.cjs} +1 -1
  29. package/dist/{index-DTl2kpLh.js → index-Ct5RVdm9.js} +5 -5
  30. package/dist/{index-DEdZZ43j.js → index-CwAQ5Reh.js} +1 -1
  31. package/dist/{index-CrBfrGyt.cjs → index-CxIxmcBL.cjs} +1 -1
  32. package/dist/{index-Q_XvzZ_1.js → index-CxpDmVeO.js} +3 -3
  33. package/dist/{index-BS5q4oAa.js → index-D4B6hNFI.js} +5 -5
  34. package/dist/{index-Dt26RGyl.cjs → index-DEo9AxUH.cjs} +1 -1
  35. package/dist/{index-BP9e1URk.js → index-DHpBlKW-.js} +7 -7
  36. package/dist/{index-B1ACt1r8.cjs → index-DMpM6R19.cjs} +1 -1
  37. package/dist/{index-1AAX7OWr.js → index-DWNFS9b5.js} +1 -1
  38. package/dist/index-DbB9Xwdc.cjs +1 -0
  39. package/dist/{index-sjkdiuXH.cjs → index-DeFBG6ZK.cjs} +1 -1
  40. package/dist/{index-CFrZVme4.js → index-DeQ9D91f.js} +4 -4
  41. package/dist/{index-Cz4RyK4P.js → index-DoCGNjQ1.js} +8 -8
  42. package/dist/{index-DvpoH0CQ.js → index-DpDTUHhk.js} +7 -7
  43. package/dist/{index-DFsguBq1.cjs → index-DwnZLgLM.cjs} +1 -1
  44. package/dist/{index-CXHQlToy.js → index-DxC6YYBs.js} +4 -4
  45. package/dist/{index-BaGt6aM0.cjs → index-Dyw51iVc.cjs} +3 -3
  46. package/dist/{index-BoSTyMal.cjs → index-Qp0Ei1HO.cjs} +1 -1
  47. package/dist/{index-CP1rxlQW.cjs → index-V-2S_leI.cjs} +1 -1
  48. package/dist/{index-D7bfd1SP.js → index-WFYNryJI.js} +6 -6
  49. package/dist/{index-KAxfvpFC.cjs → index-aCDLjfK8.cjs} +1 -1
  50. package/dist/{index-Cy8P0O9s.cjs → index-h6PQYGka.cjs} +1 -1
  51. package/dist/{index-CewL0ZVN.js → index-p7PKGLT2.js} +4 -4
  52. package/dist/{index-By2WyWxQ.js → index-v6Bd2aVR.js} +3 -3
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-BTS3qCYJ.js → index.vue_vue_type_script_setup_true_lang-4t6RYIAB.js} +4 -4
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-CHN4GMRq.js → index.vue_vue_type_script_setup_true_lang-B8n4k43K.js} +1 -1
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-D3T3IoTp.cjs → index.vue_vue_type_script_setup_true_lang-BUlzxTym.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-Bg0LXFmQ.cjs → index.vue_vue_type_script_setup_true_lang-CpSvslDx.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BdYMXloP.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-B0m5ZMmX.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BmL8jkus.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-D3x_OVy3.js} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Ctz7x3hQ.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Cw3_IH1D.js} +8 -8
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Du4fk0u8.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-D1yEUZXC.cjs} +1 -1
  61. package/dist/{login-DnqNwFzD.js → login-DQPlWdfH.js} +2 -2
  62. package/dist/{login-TVZKm0bS.cjs → login-DwXodp2O.cjs} +1 -1
  63. package/dist/{main-DqSAQJ-I.js → main-BLNFjhWy.js} +6 -6
  64. package/dist/{main-jkBzFk0x.cjs → main-B_QUEIbJ.cjs} +1 -1
  65. package/dist/{menu-DNjiqLiy.js → menu-CAjYtlXf.js} +1 -1
  66. package/dist/{menu-xHRrBcoq.cjs → menu-hvzjfJeP.cjs} +1 -1
  67. package/dist/{modelComp-BZYWE77x.js → modelComp-B2ygsfez.js} +12 -4
  68. package/dist/modelComp-DLKJo5WV.cjs +1 -0
  69. package/dist/ss-component.cjs +1 -1
  70. package/dist/ss-component.css +1 -1
  71. package/dist/ss-component.js +7 -7
  72. package/dist/ss-component3.cjs +1 -1
  73. package/dist/ss-component3.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/array-CX_klfYT.cjs +0 -7
  76. package/dist/array-CcAct9KU.js +0 -3587
  77. package/dist/index-BNG8jvzJ.js +0 -662
  78. package/dist/index-SZd8Ei1D.cjs +0 -1
  79. package/dist/index-kkjIPdQ2.cjs +0 -1
  80. package/dist/modelComp-Dq1Brxk6.cjs +0 -1
@@ -0,0 +1,3652 @@
1
+ import { u as Al, g as xl, m as Il, s as Tl, I as fe } from "./index-DHpBlKW-.js";
2
+ import { ref as L, watch as pe, createElementBlock as R, openBlock as U, createBlock as ae, createVNode as H, Fragment as le, renderList as re, createElementVNode as N, createCommentVNode as $e, toDisplayString as P, withCtx as K, resolveComponent as de, defineComponent as ge, reactive as el, createTextVNode as ke, resolveDynamicComponent as Ue, computed as Ol, renderSlot as Oe, createSlots as El, mergeProps as wl } from "vue";
3
+ import { p as Se, g as ze, a as Dl } from "./index-BMUfxqMd.js";
4
+ import { s as he, a as me, b as Nl, g as Sl } from "./index-DoCGNjQ1.js";
5
+ import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { c as p } from "./cloneDeep-rq9zaa1w.js";
7
+ import { d as Fl, s as Pe, E as Ce } from "./menu-CAjYtlXf.js";
8
+ import { E as _e } from "./index-CxpDmVeO.js";
9
+ import { _ as Bl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
10
+ import { u as Ll } from "./modelComp-B2ygsfez.js";
11
+ import { _ as jl, s as Ul } from "./index.vue_vue_type_script_setup_true_lang-4t6RYIAB.js";
12
+ const Jl = (l) => l.match(/\((.*)\)/)[1], xe = [
13
+ {
14
+ key: "单选",
15
+ value: "Select"
16
+ },
17
+ {
18
+ key: "日期",
19
+ value: "Date"
20
+ },
21
+ {
22
+ key: "长文本",
23
+ value: "TextArea"
24
+ },
25
+ {
26
+ key: "上传",
27
+ value: "Upload"
28
+ }
29
+ ], Ae = [
30
+ {
31
+ label: "输入框",
32
+ value: "Input"
33
+ },
34
+ {
35
+ label: "单选框",
36
+ value: "Select"
37
+ },
38
+ {
39
+ label: "日期选择器",
40
+ value: "Date"
41
+ },
42
+ {
43
+ label: "长文本",
44
+ value: "TextArea"
45
+ },
46
+ {
47
+ label: "附件选择器",
48
+ value: "Upload"
49
+ }
50
+ ], Pl = [
51
+ {
52
+ key: "label",
53
+ label: "标签名",
54
+ type: "Input"
55
+ },
56
+ {
57
+ key: "type",
58
+ label: "类型",
59
+ type: "Select",
60
+ options: Ae
61
+ },
62
+ {
63
+ key: "originalContent",
64
+ label: "初始值",
65
+ type: "Input"
66
+ },
67
+ {
68
+ key: "value",
69
+ label: "固定值",
70
+ type: "Input"
71
+ }
72
+ ], Rl = [
73
+ {
74
+ key: "label",
75
+ label: "标签名",
76
+ type: "Input"
77
+ },
78
+ {
79
+ key: "type",
80
+ label: "类型",
81
+ type: "Select",
82
+ options: Ae
83
+ },
84
+ {
85
+ key: "originalContent",
86
+ label: "初始值",
87
+ type: "Select"
88
+ },
89
+ {
90
+ key: "contents",
91
+ label: "选项值",
92
+ type: "Input"
93
+ }
94
+ ], Wl = [
95
+ {
96
+ key: "label",
97
+ label: "标签名",
98
+ type: "Input"
99
+ },
100
+ {
101
+ key: "type",
102
+ label: "类型",
103
+ type: "Select",
104
+ options: Ae
105
+ },
106
+ {
107
+ key: "originalContent",
108
+ label: "初始值",
109
+ type: "Date"
110
+ }
111
+ ], Vl = [
112
+ {
113
+ key: "label",
114
+ label: "标签名",
115
+ type: "Input"
116
+ },
117
+ {
118
+ key: "type",
119
+ label: "类型",
120
+ type: "Select",
121
+ options: Ae
122
+ },
123
+ {
124
+ key: "originalContent",
125
+ label: "初始值",
126
+ type: "Input"
127
+ }
128
+ ], zl = [
129
+ {
130
+ key: "label",
131
+ label: "标签名",
132
+ type: "Input"
133
+ },
134
+ {
135
+ key: "type",
136
+ label: "类型",
137
+ type: "Select",
138
+ options: Ae
139
+ }
140
+ ], ie = [
141
+ {
142
+ key: "Input",
143
+ value: Pl
144
+ },
145
+ {
146
+ key: "Select",
147
+ value: Rl
148
+ },
149
+ {
150
+ key: "Date",
151
+ value: Wl
152
+ },
153
+ {
154
+ key: "TextArea",
155
+ value: Vl
156
+ },
157
+ {
158
+ key: "Upload",
159
+ value: zl
160
+ }
161
+ ], Gl = [
162
+ {
163
+ value: "normal",
164
+ label: "自定义"
165
+ },
166
+ {
167
+ value: "add",
168
+ label: "新增"
169
+ },
170
+ {
171
+ value: "fix",
172
+ label: "修改"
173
+ },
174
+ {
175
+ value: "view",
176
+ label: "查看"
177
+ },
178
+ {
179
+ value: "delete",
180
+ label: "删除"
181
+ }
182
+ ], ye = [
183
+ {
184
+ key: "label",
185
+ label: "按钮名",
186
+ type: "Input"
187
+ },
188
+ {
189
+ key: "type",
190
+ label: "类型",
191
+ type: "Select",
192
+ options: Gl
193
+ },
194
+ {
195
+ key: "background",
196
+ label: "颜色",
197
+ type: "Color"
198
+ }
199
+ ], Ml = { class: "form-content" }, Zl = {
200
+ __name: "index",
201
+ props: {
202
+ formRules: Object,
203
+ itemData: {
204
+ type: Array,
205
+ default: () => []
206
+ },
207
+ childItemData: {
208
+ type: Array,
209
+ default: () => []
210
+ },
211
+ index: Number
212
+ },
213
+ emits: ["change", "contentChange"],
214
+ setup(l, { emit: s }) {
215
+ const a = l, e = s, n = L([]), r = L(!1), c = L([]), d = Al(Se), b = L(!1), m = L(), y = (C) => {
216
+ var k, _, t, i;
217
+ const w = (_ = (k = p(a.itemData)) == null ? void 0 : k.find((o) => (o == null ? void 0 : o.key) === "formContent")) == null ? void 0 : _.contents, v = p(C.content);
218
+ let j = {};
219
+ v && ((t = Object.values(v)) == null ? void 0 : t.length) > 0 && ((i = Object.values(v)) == null || i.forEach((o, h) => {
220
+ j[w[h].key] = o;
221
+ }));
222
+ const g = {
223
+ content: j,
224
+ index: a == null ? void 0 : a.index,
225
+ buttonName: C == null ? void 0 : C.buttonName
226
+ };
227
+ e("change", g);
228
+ }, A = (C) => {
229
+ var j, g;
230
+ if (!C) return;
231
+ if (((j = Object.values(p(C))) == null ? void 0 : j.length) > 0) {
232
+ const k = (g = Object.values(p(C))) == null ? void 0 : g.map((t) => t);
233
+ let _ = "";
234
+ k == null || k.forEach((t) => {
235
+ t !== "" && t !== void 0 && (_ = _ === "" ? t : _ + "/" + t);
236
+ }), d.setSelectArray(k), d.setSelectString(_);
237
+ }
238
+ const w = p(a.itemData), v = w == null ? void 0 : w.map((k) => {
239
+ var _;
240
+ return (k == null ? void 0 : k.key) === "formContent" && ((_ = k.contents) == null || _.map((t, i) => {
241
+ var o, h, x, T, F, f, E, O, u, D, $, S, I, J, B, W, Z, Q, ne;
242
+ return t.type = t != null && t.type ? t.type : (T = (x = (h = (o = t == null ? void 0 : t.key) == null ? void 0 : o.split("$")) == null ? void 0 : h[1]) == null ? void 0 : x.split("(")) != null && T[0] ? (F = xe == null ? void 0 : xe.find((se) => {
243
+ var ue, q, ce, oe;
244
+ return (se == null ? void 0 : se.key) === ((oe = (ce = (q = (ue = t == null ? void 0 : t.key) == null ? void 0 : ue.split("$")) == null ? void 0 : q[1]) == null ? void 0 : ce.split("(")) == null ? void 0 : oe[0]);
245
+ })) == null ? void 0 : F.value : "Input", t.options = t != null && t.options ? t.options : ((O = (E = (f = t == null ? void 0 : t.key) == null ? void 0 : f.split("$")) == null ? void 0 : E[1]) == null ? void 0 : O.length) > 0 ? (S = ($ = Jl((D = (u = t == null ? void 0 : t.key) == null ? void 0 : u.split("$")) == null ? void 0 : D[1])) == null ? void 0 : $.split(",")) == null ? void 0 : S.map((se) => ({
246
+ label: se,
247
+ value: se
248
+ })) : [], (I = t == null ? void 0 : t.key) != null && I.includes("$") && (t.key = (B = (J = t == null ? void 0 : t.key) == null ? void 0 : J.split("$")) == null ? void 0 : B[0]), t.value = Array.isArray((W = Object.values(C)) == null ? void 0 : W[i]) ? (Q = (Z = Object.values(C)) == null ? void 0 : Z[i]) == null ? void 0 : Q[0] : (ne = Object.values(C)) == null ? void 0 : ne[i], t;
249
+ })), k;
250
+ });
251
+ e("contentChange", {
252
+ contents: v,
253
+ index: a.index
254
+ });
255
+ };
256
+ return pe(
257
+ () => a.itemData,
258
+ () => {
259
+ var k, _, t, i, o, h, x, T, F, f, E;
260
+ const C = (k = p(a.itemData)) == null ? void 0 : k.find((O) => (O == null ? void 0 : O.key) === "formContent"), w = (_ = p(a.itemData)) == null ? void 0 : _.find((O) => (O == null ? void 0 : O.key) === "formButton"), v = (t = p(a.itemData)) == null ? void 0 : t.find((O) => (O == null ? void 0 : O.key) === "formFlex"), j = (i = p(a.itemData)) == null ? void 0 : i.find((O) => (O == null ? void 0 : O.key) === "formWrap"), g = (o = p(a.itemData)) == null ? void 0 : o.find((O) => (O == null ? void 0 : O.key) === "enableWrap");
261
+ if ((j == null ? void 0 : j.contents) === "纵向" ? r.value = !1 : r.value = !0, b.value = (g == null ? void 0 : g.contents) === void 0 ? !1 : g == null ? void 0 : g.contents, m.value = typeof (v == null ? void 0 : v.contents) != "boolean" ? !(!(v != null && v.contents) === "" || ((h = v == null ? void 0 : v.contents) == null ? void 0 : h.toUpperCase()) === "VERTICAL") : v == null ? void 0 : v.contents, ((x = C == null ? void 0 : C.contents) == null ? void 0 : x.length) > 0 && Array.isArray(C == null ? void 0 : C.contents)) {
262
+ const O = [];
263
+ (T = C == null ? void 0 : C.contents) == null || T.forEach(($, S) => {
264
+ var I, J, B, W, Z, Q, ne, se, ue, q;
265
+ if (($ == null ? void 0 : $.label) !== "") {
266
+ let ce = ($ == null ? void 0 : $.label) ?? ($ == null ? void 0 : $.key) ?? "", oe = ($ == null ? void 0 : $.type) ?? "", Y = ($ == null ? void 0 : $.options) ?? [];
267
+ if ((I = $ == null ? void 0 : $.key) != null && I.includes("$") && (ce = (J = p($ == null ? void 0 : $.key).split("$")) == null ? void 0 : J[0], ((W = (B = p($ == null ? void 0 : $.key).split("$")) == null ? void 0 : B[1]) == null ? void 0 : W.length) > 0)) {
268
+ const [X, ee] = (Q = (Z = p($ == null ? void 0 : $.key).split("$")) == null ? void 0 : Z[1]) == null ? void 0 : Q.split(/[()]/);
269
+ oe = ((ne = xe.find((z) => (z == null ? void 0 : z.key) === X)) == null ? void 0 : ne.value) ?? "", ((se = ee == null ? void 0 : ee.split(",")) == null ? void 0 : se.length) > 0 && (Y = (ue = ee == null ? void 0 : ee.split(",")) == null ? void 0 : ue.map((z) => ({
270
+ label: z,
271
+ value: z
272
+ })));
273
+ }
274
+ O.push({
275
+ label: ce ?? "",
276
+ name: "t" + S,
277
+ type: oe === "" ? "Input" : oe,
278
+ value: $ != null && $.value ? $.value : (Y == null ? void 0 : Y.length) > 0 ? (q = Y == null ? void 0 : Y[0]) == null ? void 0 : q.value : ($ == null ? void 0 : $.value) ?? "",
279
+ id: ($ == null ? void 0 : $.id) ?? S,
280
+ contents: Y ?? [],
281
+ width: ($ == null ? void 0 : $.width) ?? 1
282
+ });
283
+ }
284
+ });
285
+ const u = (F = p(O)) == null ? void 0 : F.map(($) => $.value);
286
+ let D = "";
287
+ u == null || u.forEach(($) => {
288
+ $ !== "" && $ !== void 0 && (D = D === "" ? $ : D + "/" + $);
289
+ }), d.setSelectArray(u), d.setSelectString(D), n.value = O;
290
+ } else
291
+ n.value = [];
292
+ if (((f = w == null ? void 0 : w.contents) == null ? void 0 : f.length) > 0) {
293
+ const O = [];
294
+ (E = w == null ? void 0 : w.contents) == null || E.forEach((u, D) => {
295
+ (u == null ? void 0 : u.label) !== "" && O.push({
296
+ label: (u == null ? void 0 : u.label) ?? "",
297
+ id: (u == null ? void 0 : u.id) ?? D,
298
+ type: (u == null ? void 0 : u.type) ?? "",
299
+ background: u == null ? void 0 : u.background
300
+ });
301
+ }), c.value = O;
302
+ } else
303
+ c.value = [];
304
+ },
305
+ { deep: !0, immediate: !0 }
306
+ ), (C, w) => (U(), R("div", Ml, [
307
+ (U(), ae(he, {
308
+ rowContents: n.value,
309
+ formRules: l.formRules,
310
+ buttonValue: c.value,
311
+ isRowFlex: m.value,
312
+ isEnableWrap: b.value,
313
+ onOnButtonClick: y,
314
+ onChange: A,
315
+ isButtonRow: r.value,
316
+ key: a.itemData
317
+ }, null, 8, ["rowContents", "formRules", "buttonValue", "isRowFlex", "isEnableWrap", "isButtonRow"]))
318
+ ]));
319
+ }
320
+ }, Ge = /* @__PURE__ */ te(Zl, [["__scopeId", "data-v-63ad44fd"]]), De = L(0), ll = (l) => {
321
+ var s;
322
+ return !l || (l == null ? void 0 : l.length) === 0 ? [] : (s = p(l)) == null ? void 0 : s.map((e) => (De.value++, e = {
323
+ label: (e == null ? void 0 : e.label) ?? "",
324
+ prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
325
+ width: e != null && e.width ? parseInt(e.width) : "",
326
+ fixed: (e == null ? void 0 : e.fixed) ?? void 0,
327
+ sortable: (e == null ? void 0 : e.sortable) ?? !1,
328
+ align: (e == null ? void 0 : e.align) ?? "center",
329
+ showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
330
+ isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
331
+ isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
332
+ isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
333
+ id: (e == null ? void 0 : e.id) ?? De.value,
334
+ children: ll(e == null ? void 0 : e.children)
335
+ }, e));
336
+ }, Kl = (l) => {
337
+ var a;
338
+ return (a = p(l)) == null ? void 0 : a.map((e) => (De.value++, e = {
339
+ label: (e == null ? void 0 : e.label) ?? "",
340
+ prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
341
+ width: e != null && e.width ? parseInt(e.width) : "",
342
+ fixed: (e == null ? void 0 : e.fixed) ?? void 0,
343
+ sortable: (e == null ? void 0 : e.sortable) ?? !1,
344
+ align: (e == null ? void 0 : e.align) ?? "center",
345
+ showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
346
+ isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
347
+ isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
348
+ isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
349
+ id: (e == null ? void 0 : e.id) ?? De.value,
350
+ children: ll(e == null ? void 0 : e.children)
351
+ }, e));
352
+ }, al = (l, s) => {
353
+ var a;
354
+ return l != null && l.find((e) => (e == null ? void 0 : e.id) === s) ? (a = p(l)) == null ? void 0 : a.filter((n) => (n == null ? void 0 : n.id) !== s) : (l = l == null ? void 0 : l.map((e) => (e.children = al(e == null ? void 0 : e.children, s), e)), l);
355
+ }, nl = (l, s) => {
356
+ var a;
357
+ return l != null && l.find((e) => (e == null ? void 0 : e.id) === (s == null ? void 0 : s.id)) ? (a = p(l)) == null ? void 0 : a.map((n) => ((n == null ? void 0 : n.id) === (s == null ? void 0 : s.id) && (n = s), n)) : (l = l == null ? void 0 : l.map((e) => (e.children = nl(e == null ? void 0 : e.children, s), e)), l);
358
+ }, sl = (l, s) => {
359
+ var a;
360
+ return l != null && l.find((e) => {
361
+ var n;
362
+ return (e == null ? void 0 : e.id) === ((n = s == null ? void 0 : s.contents) == null ? void 0 : n.id);
363
+ }) ? (a = p(l)) == null ? void 0 : a.map((n) => {
364
+ var r;
365
+ return (n == null ? void 0 : n.id) === ((r = s == null ? void 0 : s.contents) == null ? void 0 : r.id) && (n = s == null ? void 0 : s.contents), n;
366
+ }) : (l = l == null ? void 0 : l.map((e) => (e.children = sl(e == null ? void 0 : e.children, s), e)), l);
367
+ }, ol = (l, s) => {
368
+ var a;
369
+ return l != null && l.find((e) => (e == null ? void 0 : e.id) === (s == null ? void 0 : s.id)) ? (a = p(l)) == null ? void 0 : a.map((n) => ((n == null ? void 0 : n.id) === (s == null ? void 0 : s.id) && (n != null && n.children || (n.children = []), n.children.push(s.contents)), n)) : (l = l == null ? void 0 : l.map((e) => (e.children = ol(e == null ? void 0 : e.children, s), e)), l);
370
+ }, V = [
371
+ {
372
+ key: "label",
373
+ label: "标签名",
374
+ type: "Input"
375
+ },
376
+ {
377
+ key: "prop",
378
+ label: "属性名",
379
+ type: "Input"
380
+ },
381
+ {
382
+ key: "width",
383
+ label: "宽度",
384
+ type: "Input"
385
+ },
386
+ {
387
+ key: "sortable",
388
+ label: "是否支持排序",
389
+ type: "Switch"
390
+ },
391
+ {
392
+ key: "align",
393
+ label: "文本所在位置",
394
+ type: "Radio",
395
+ options: [
396
+ {
397
+ label: "left",
398
+ value: "左"
399
+ },
400
+ {
401
+ label: "center",
402
+ value: "中"
403
+ },
404
+ {
405
+ label: "right",
406
+ value: "右"
407
+ }
408
+ ]
409
+ },
410
+ {
411
+ key: "fixed",
412
+ label: "是否固定列",
413
+ type: "Switch"
414
+ }
415
+ ], rl = Fl("modelTableComp", {
416
+ state: () => ({
417
+ tableIndex: 0
418
+ }),
419
+ actions: {
420
+ setTableIndex(l) {
421
+ this.tableIndex = l;
422
+ }
423
+ }
424
+ }), Hl = { class: "table-header-child" }, ql = { class: "table-header-child-main" }, Ql = { class: "table-header-child-content" }, Xl = { class: "table-header-child-content-item" }, Yl = { class: "fix-button" }, ea = ["onClick"], la = ["onClick"], aa = ["onClick"], na = { key: 0 }, sa = { class: "form-content" }, oa = {
425
+ __name: "tableNewChild",
426
+ props: {
427
+ tableChildContents: Array
428
+ },
429
+ emits: ["fixChange", "deleteChange"],
430
+ setup(l, { emit: s }) {
431
+ const a = l, e = s, n = L(!1), r = L(""), c = rl(Se), { tableIndex: d } = Pe(c);
432
+ L(0);
433
+ const b = L(""), m = L([]), y = L([]), A = (t) => {
434
+ var o;
435
+ n.value = !0;
436
+ let i = [];
437
+ V == null || V.forEach((h) => {
438
+ let x = p(d.value) + 1;
439
+ c.setTableIndex(x), i.push({
440
+ label: h == null ? void 0 : h.label,
441
+ name: h == null ? void 0 : h.label,
442
+ type: h.type,
443
+ value: t[h.key],
444
+ id: d.value,
445
+ contents: h == null ? void 0 : h.options
446
+ });
447
+ }), t != null && t.children && ((o = t == null ? void 0 : t.children) == null ? void 0 : o.length) > 0 && i.push({
448
+ children: t == null ? void 0 : t.children,
449
+ isFormColHidden: !0
450
+ }), b.value = t == null ? void 0 : t.id, m.value = i, y.value = i;
451
+ }, C = (t) => {
452
+ e("fixChange", p(t));
453
+ }, w = (t) => {
454
+ e("deleteChange", p(t));
455
+ }, v = (t) => {
456
+ n.value = !0;
457
+ let i = [];
458
+ V == null || V.forEach((o) => {
459
+ let h = p(d.value) + 1;
460
+ c.setTableIndex(h), i.push({
461
+ label: o == null ? void 0 : o.label,
462
+ name: o == null ? void 0 : o.label,
463
+ type: o.type,
464
+ value: "",
465
+ id: d.value,
466
+ contents: o == null ? void 0 : o.options
467
+ });
468
+ }), r.value = t == null ? void 0 : t.id, m.value = i, y.value = i;
469
+ }, j = (t) => {
470
+ let i = p(y.value);
471
+ i = i == null ? void 0 : i.map((o) => (o.children || (o.value = t == null ? void 0 : t[o.name]), o)), y.value = i;
472
+ }, g = () => {
473
+ var i, o;
474
+ m.value = y.value;
475
+ let t = {};
476
+ if (b.value !== "")
477
+ t.id = b.value, (i = m.value) == null || i.forEach((h) => {
478
+ const x = V == null ? void 0 : V.find((T) => (T == null ? void 0 : T.label) === (h == null ? void 0 : h.label));
479
+ x ? t[x.key] = h.value : h != null && h.children && h.children.length > 0 && (t.children = h.children);
480
+ }), n.value = !1, e("fixChange", {
481
+ contents: p(t),
482
+ id: r.value,
483
+ type: "fix"
484
+ });
485
+ else {
486
+ let h = p(d.value) + 1;
487
+ c.setTableIndex(h), t.id = "id" + d.value, (o = m.value) == null || o.forEach((x) => {
488
+ const T = V == null ? void 0 : V.find((F) => (F == null ? void 0 : F.label) === (x == null ? void 0 : x.label));
489
+ T ? t[T.key] = x.value : x != null && x.children && x.children.length > 0 && (t.children = x.children);
490
+ }), n.value = !1, e("fixChange", {
491
+ contents: p(t),
492
+ id: r.value,
493
+ type: "add"
494
+ });
495
+ }
496
+ b.value = "", m.value = [], y.value = [];
497
+ }, k = () => {
498
+ n.value = !1, b.value = "", r.value = "", m.value = [], y.value = [];
499
+ }, _ = (t) => {
500
+ _e.confirm("是否确认要删除", "", {
501
+ confirmButtonText: "确认",
502
+ cancelButtonText: "取消",
503
+ type: "warning"
504
+ }).then(
505
+ () => {
506
+ e("deleteChange", t), Ce({
507
+ type: "success",
508
+ message: "删除成功"
509
+ });
510
+ }
511
+ ).catch(() => {
512
+ });
513
+ };
514
+ return (t, i) => (U(), R("div", Hl, [
515
+ (U(!0), R(le, null, re(a == null ? void 0 : a.tableChildContents, (o, h) => (U(), R("div", ql, [
516
+ N("div", Ql, [
517
+ N("div", Xl, P(o.label), 1),
518
+ N("div", Yl, [
519
+ N("div", {
520
+ class: "icon-content",
521
+ onClick: (x) => v(o)
522
+ }, P("新增"), 8, ea),
523
+ N("div", {
524
+ class: "icon-content",
525
+ onClick: (x) => A(o)
526
+ }, P("修改"), 8, la),
527
+ N("div", {
528
+ class: "icon-content",
529
+ onClick: (x) => _(o)
530
+ }, P("删除"), 8, aa)
531
+ ])
532
+ ]),
533
+ o != null && o.children && o.children.length > 0 ? (U(), R("div", na, [
534
+ H(tl, {
535
+ tableChildContents: o == null ? void 0 : o.children,
536
+ onDeleteChange: w,
537
+ onFixChange: C
538
+ }, null, 8, ["tableChildContents"])
539
+ ])) : $e("", !0)
540
+ ]))), 256)),
541
+ H(me, {
542
+ visible: n.value,
543
+ onBeforeDestroy: k,
544
+ width: 840
545
+ }, {
546
+ default: K(() => [
547
+ N("div", sa, [
548
+ (U(), ae(he, {
549
+ rowContents: m.value,
550
+ key: m.value,
551
+ isEnableWrap: !0,
552
+ onChange: j
553
+ }, null, 8, ["rowContents"]))
554
+ ])
555
+ ]),
556
+ footer: K(() => [
557
+ N("div", { class: "dialog-footer" }, [
558
+ N("div", {
559
+ onClick: k,
560
+ class: "cancel-button button"
561
+ }, P("取消")),
562
+ N("div", {
563
+ class: "ok-button button",
564
+ onClick: g
565
+ }, P("确认"))
566
+ ])
567
+ ]),
568
+ _: 1
569
+ }, 8, ["visible"])
570
+ ]));
571
+ }
572
+ }, ra = /* @__PURE__ */ te(oa, [["__scopeId", "data-v-50120da7"]]), ta = { class: "table-header-child" }, ca = { class: "table-header-child-main" }, ia = { class: "table-header-child-content" }, ua = { class: "table-header-child-content-item" }, pa = { class: "fix-button" }, da = ["onClick"], fa = ["onClick"], ha = ["onClick"], ya = { key: 0 }, ma = { class: "form-content" }, ba = {
573
+ __name: "tableChildren",
574
+ props: {
575
+ tableChildContents: Array
576
+ },
577
+ emits: ["fixChange", "deleteChange"],
578
+ setup(l, { emit: s }) {
579
+ const a = l, e = s, n = L(!1), r = L(""), c = rl(Se), { tableIndex: d } = Pe(c), b = L(""), m = L([]), y = L([]), A = (t) => {
580
+ e("fixChange", p(t));
581
+ }, C = (t) => {
582
+ var o;
583
+ n.value = !0;
584
+ let i = [];
585
+ V == null || V.forEach((h) => {
586
+ let x = p(d.value) + 1;
587
+ c.setTableIndex(x), i.push({
588
+ label: h == null ? void 0 : h.label,
589
+ name: h == null ? void 0 : h.label,
590
+ type: h.type,
591
+ value: t[h.key],
592
+ id: d.value,
593
+ contents: h == null ? void 0 : h.options
594
+ });
595
+ }), t != null && t.children && ((o = t == null ? void 0 : t.children) == null ? void 0 : o.length) > 0 && i.push({
596
+ children: t == null ? void 0 : t.children,
597
+ isFormColHidden: !0
598
+ }), b.value = t == null ? void 0 : t.id, m.value = i, y.value = i;
599
+ }, w = (t) => {
600
+ n.value = !0;
601
+ let i = [];
602
+ V == null || V.forEach((o) => {
603
+ let h = p(d.value) + 1;
604
+ c.setTableIndex(h), i.push({
605
+ label: o == null ? void 0 : o.label,
606
+ name: o == null ? void 0 : o.label,
607
+ type: o.type,
608
+ value: "",
609
+ id: d.value,
610
+ contents: o == null ? void 0 : o.options
611
+ });
612
+ }), r.value = t == null ? void 0 : t.id, m.value = i, y.value = i;
613
+ }, v = (t) => {
614
+ let i = p(y.value);
615
+ i = i == null ? void 0 : i.map((o) => (o.children || (o.value = t == null ? void 0 : t[o.name]), o)), y.value = i;
616
+ }, j = () => {
617
+ var i, o;
618
+ m.value = y.value;
619
+ let t = {};
620
+ if (b.value !== "")
621
+ t.id = b.value, (i = m.value) == null || i.forEach((h) => {
622
+ const x = V == null ? void 0 : V.find((T) => (T == null ? void 0 : T.label) === (h == null ? void 0 : h.label));
623
+ x ? t[x.key] = h.value : h != null && h.children && h.children.length > 0 && (t.children = h.children);
624
+ }), n.value = !1, e("fixChange", {
625
+ contents: p(t),
626
+ id: r.value,
627
+ type: "fix"
628
+ });
629
+ else {
630
+ let h = p(d.value) + 1;
631
+ c.setTableIndex(h), t.id = "idChild" + d.value, (o = m.value) == null || o.forEach((x) => {
632
+ const T = V == null ? void 0 : V.find((F) => (F == null ? void 0 : F.label) === (x == null ? void 0 : x.label));
633
+ T ? t[T.key] = x.value : x != null && x.children && x.children.length > 0 && (t.children = x.children);
634
+ }), n.value = !1, e("fixChange", {
635
+ contents: p(t),
636
+ id: r.value,
637
+ type: "add"
638
+ });
639
+ }
640
+ b.value = "", m.value = [], y.value = [];
641
+ }, g = () => {
642
+ n.value = !1, b.value = "", r.value = "", m.value = [], y.value = [];
643
+ }, k = (t) => {
644
+ _e.confirm("是否确认要删除", "", {
645
+ confirmButtonText: "确认",
646
+ cancelButtonText: "取消",
647
+ type: "warning"
648
+ }).then(
649
+ () => {
650
+ e("deleteChange", t), Ce({
651
+ type: "success",
652
+ message: "删除成功"
653
+ });
654
+ }
655
+ ).catch(() => {
656
+ });
657
+ }, _ = (t) => {
658
+ e("deleteChange", t);
659
+ };
660
+ return (t, i) => (U(), R("div", ta, [
661
+ (U(!0), R(le, null, re(a == null ? void 0 : a.tableChildContents, (o, h) => (U(), R("div", ca, [
662
+ N("div", ia, [
663
+ N("div", ua, P(o.label), 1),
664
+ N("div", pa, [
665
+ N("div", {
666
+ class: "icon-content",
667
+ onClick: (x) => w(o)
668
+ }, P("新增"), 8, da),
669
+ N("div", {
670
+ class: "icon-content",
671
+ onClick: (x) => C(o)
672
+ }, P("修改"), 8, fa),
673
+ N("div", {
674
+ class: "icon-content",
675
+ onClick: (x) => k(o)
676
+ }, P("删除"), 8, ha)
677
+ ])
678
+ ]),
679
+ o != null && o.children && o.children.length > 0 ? (U(), R("div", ya, [
680
+ H(ra, {
681
+ tableChildContents: o == null ? void 0 : o.children,
682
+ onDeleteChange: _,
683
+ onFixChange: A
684
+ }, null, 8, ["tableChildContents"])
685
+ ])) : $e("", !0)
686
+ ]))), 256)),
687
+ H(me, {
688
+ visible: n.value,
689
+ onBeforeDestroy: g,
690
+ width: 840
691
+ }, {
692
+ default: K(() => [
693
+ N("div", ma, [
694
+ (U(), ae(he, {
695
+ rowContents: m.value,
696
+ key: m.value,
697
+ isEnableWrap: !0,
698
+ onChange: v
699
+ }, null, 8, ["rowContents"]))
700
+ ])
701
+ ]),
702
+ footer: K(() => [
703
+ N("div", { class: "dialog-footer" }, [
704
+ N("div", {
705
+ onClick: g,
706
+ class: "cancel-button button"
707
+ }, P("取消")),
708
+ N("div", {
709
+ class: "ok-button button",
710
+ onClick: j
711
+ }, P("确认"))
712
+ ])
713
+ ]),
714
+ _: 1
715
+ }, 8, ["visible"])
716
+ ]));
717
+ }
718
+ }, tl = /* @__PURE__ */ te(ba, [["__scopeId", "data-v-aa24990b"]]), ka = { class: "table-operate-content" }, ga = { class: "table-operate-item" }, va = { class: "operate-title" }, Ca = { class: "operate-content" }, _a = { class: "fix-content" }, $a = { class: "fix-content-label" }, Aa = { class: "fix-button" }, xa = ["onClick"], Ia = ["onClick"], Ta = ["onClick"], Oa = { key: 0 }, Ea = { class: "form-content" }, wa = {
719
+ __name: "operate",
720
+ props: {
721
+ itemContents: {
722
+ type: Array,
723
+ default: () => []
724
+ },
725
+ originalItemContents: {
726
+ type: Array,
727
+ default: () => []
728
+ }
729
+ },
730
+ emits: ["change"],
731
+ setup(l, { emit: s }) {
732
+ const a = l, e = s, n = L([]), r = L(!1), c = L([]), d = L([]), b = L([]), m = L(""), y = L(""), A = L(0), C = () => {
733
+ r.value = !0;
734
+ let o = [];
735
+ V == null || V.forEach((h) => {
736
+ A.value++, o.push({
737
+ label: h == null ? void 0 : h.label,
738
+ name: h == null ? void 0 : h.label,
739
+ type: h.type,
740
+ value: "",
741
+ id: A.value,
742
+ contents: h == null ? void 0 : h.options
743
+ });
744
+ }), d.value = o, b.value = o;
745
+ }, w = (o) => {
746
+ r.value = !0;
747
+ let h = [];
748
+ V == null || V.forEach((x) => {
749
+ A.value++, h.push({
750
+ label: x == null ? void 0 : x.label,
751
+ name: x == null ? void 0 : x.label,
752
+ type: x.type,
753
+ value: "",
754
+ id: A.value,
755
+ contents: x == null ? void 0 : x.options
756
+ });
757
+ }), d.value = h, y.value = o == null ? void 0 : o.id, b.value = h;
758
+ }, v = (o) => {
759
+ var h;
760
+ c.value = al(p(c.value), o == null ? void 0 : o.id), e("change", (h = p(a.originalItemContents)) == null ? void 0 : h.map((x) => {
761
+ var T;
762
+ return (x == null ? void 0 : x.key) === "header" && (x.contents = (T = c.value) != null && T.some((F) => F == null ? void 0 : F.children) ? [c.value] : c.value), x;
763
+ }));
764
+ }, j = (o) => {
765
+ var x, T, F;
766
+ o.type === "fix" ? o.id !== "" ? c.value = sl(c.value, o) : c.value = nl(c.value, o == null ? void 0 : o.contents) : c.value = ol(c.value, o), c.value = (x = c.value) != null && x.some((f) => f == null ? void 0 : f.children) ? [c.value] : c.value, m.value = "";
767
+ let h = p(a.originalItemContents);
768
+ (T = p(a.originalItemContents)) != null && T.find((f) => (f == null ? void 0 : f.key) === "header") ? h = (F = p(a.originalItemContents)) == null ? void 0 : F.map((f) => ((f == null ? void 0 : f.key) === "header" && (f.contents = c.value), f)) : h.push({
769
+ key: "header",
770
+ contents: c.value
771
+ }), e("change", h);
772
+ }, g = (o) => {
773
+ var x;
774
+ r.value = !0;
775
+ let h = [];
776
+ V == null || V.forEach((T) => {
777
+ A.value++, h.push({
778
+ label: T == null ? void 0 : T.label,
779
+ name: T == null ? void 0 : T.label,
780
+ type: T.type,
781
+ value: o[T.key],
782
+ id: A.value,
783
+ contents: T == null ? void 0 : T.options
784
+ });
785
+ }), o != null && o.children && ((x = o == null ? void 0 : o.children) == null ? void 0 : x.length) > 0 && h.push({
786
+ children: o == null ? void 0 : o.children,
787
+ isFormColHidden: !0
788
+ }), m.value = o == null ? void 0 : o.id, y.value = "", d.value = h, b.value = h;
789
+ }, k = (o) => {
790
+ let h = p(b.value);
791
+ h = h == null ? void 0 : h.map((x) => (x.children || (x.value = o == null ? void 0 : o[x.name]), x)), b.value = h;
792
+ }, _ = () => {
793
+ r.value = !1, m.value = "", y.value = "", b.value = [];
794
+ }, t = () => {
795
+ var x, T, F, f, E, O;
796
+ d.value = b.value;
797
+ let o = {};
798
+ if (m.value !== "" ? o.id = m.value : (A.value++, o.id = "id" + A.value), (x = d.value) == null || x.forEach((u) => {
799
+ const D = V == null ? void 0 : V.find(($) => ($ == null ? void 0 : $.label) === (u == null ? void 0 : u.label));
800
+ D ? o[D.key] = u.value : u != null && u.children && u.children.length > 0 && (o.children = u.children);
801
+ }), (T = c.value) != null && T.find((u) => u.id === o.id))
802
+ c.value = (F = c.value) == null ? void 0 : F.map((u) => (u.id === o.id && (u = o), u));
803
+ else {
804
+ let u = p(c.value);
805
+ y.value === "" ? u.push(o) : u = u == null ? void 0 : u.map((D) => (D.id === y.value && (D.children || (D.children = []), D.children.push(o)), D)), c.value = u;
806
+ }
807
+ c.value = (f = c.value) != null && f.some((u) => u == null ? void 0 : u.children) ? [c.value] : c.value, r.value = !1, m.value = "", y.value = "";
808
+ let h = p(a.originalItemContents);
809
+ (E = p(a.originalItemContents)) != null && E.find((u) => (u == null ? void 0 : u.key) === "header") ? h = (O = p(a.originalItemContents)) == null ? void 0 : O.map((u) => ((u == null ? void 0 : u.key) === "header" && (u.contents = c.value), u)) : h.push({
810
+ key: "header",
811
+ contents: c.value
812
+ }), e("change", h);
813
+ }, i = (o) => {
814
+ _e.confirm("是否确认要删除", "", {
815
+ confirmButtonText: "确认",
816
+ cancelButtonText: "取消",
817
+ type: "warning"
818
+ }).then(
819
+ () => {
820
+ var h, x;
821
+ c.value = (h = p(c.value)) == null ? void 0 : h.filter((T) => (T == null ? void 0 : T.id) !== (o == null ? void 0 : o.id)), e("change", (x = p(a.originalItemContents)) == null ? void 0 : x.map((T) => {
822
+ var F;
823
+ return (T == null ? void 0 : T.key) === "header" && (T.contents = (F = c.value) != null && F.some((f) => f == null ? void 0 : f.children) ? [c.value] : c.value), T;
824
+ })), Ce({
825
+ type: "success",
826
+ message: "删除成功"
827
+ });
828
+ }
829
+ ).catch(() => {
830
+ });
831
+ };
832
+ return pe(
833
+ () => a.originalItemContents,
834
+ () => {
835
+ var o, h, x, T, F;
836
+ !a.originalItemContents || a.originalItemContents.length === 0 || (n.value = p(a.originalItemContents), c.value = (h = (o = n.value) == null ? void 0 : o.find((f) => (f == null ? void 0 : f.key) === "header")) == null ? void 0 : h.contents, c.value = (x = c.value) == null ? void 0 : x.map((f, E) => (Array.isArray(f) ? f = Kl(f) : f = {
837
+ label: (f == null ? void 0 : f.label) ?? "",
838
+ prop: (f == null ? void 0 : f.label) === "操作" ? "operate" : f == null ? void 0 : f.prop,
839
+ width: f != null && f.width ? parseInt(f.width) : "",
840
+ fixed: (f == null ? void 0 : f.fixed) ?? void 0,
841
+ sortable: (f == null ? void 0 : f.sortable) ?? !1,
842
+ align: (f == null ? void 0 : f.align) ?? "center",
843
+ showOverflowTooltip: (f == null ? void 0 : f.showOverflowTooltip) ?? !0,
844
+ isNotDrag: (f == null ? void 0 : f.isNotDrag) ?? !1,
845
+ isEditCol: (f == null ? void 0 : f.isEditCol) ?? !1,
846
+ isOperate: (f == null ? void 0 : f.isOperate) ?? !1,
847
+ id: (f == null ? void 0 : f.id) ?? E
848
+ }, f)), c.value = (T = c.value) != null && T.every((f) => Array.isArray(f)) ? (F = c.value) == null ? void 0 : F[0] : c.value);
849
+ },
850
+ { deep: !0, immediate: !0 }
851
+ ), (o, h) => {
852
+ const x = de("svg-icon");
853
+ return U(), R("div", ka, [
854
+ N("div", ga, [
855
+ N("div", va, [
856
+ h[1] || (h[1] = N("div", null, P("表头"), -1)),
857
+ N("div", {
858
+ class: "icon-content",
859
+ onClick: C
860
+ }, [
861
+ H(x, {
862
+ name: "Plus",
863
+ class: "icon-size"
864
+ }),
865
+ h[0] || (h[0] = N("div", null, P("新增"), -1))
866
+ ])
867
+ ]),
868
+ N("div", Ca, [
869
+ (U(!0), R(le, null, re(c.value, (T, F) => (U(), R("div", { key: F }, [
870
+ N("div", _a, [
871
+ N("div", $a, P(T == null ? void 0 : T.label), 1),
872
+ N("div", Aa, [
873
+ N("div", {
874
+ class: "icon-content",
875
+ onClick: (f) => w(T)
876
+ }, P("新增"), 8, xa),
877
+ N("div", {
878
+ class: "icon-content",
879
+ onClick: (f) => g(T)
880
+ }, P("修改"), 8, Ia),
881
+ N("div", {
882
+ class: "icon-content",
883
+ onClick: (f) => i(T)
884
+ }, P("删除"), 8, Ta)
885
+ ])
886
+ ]),
887
+ T != null && T.children && T.children.length > 0 ? (U(), R("div", Oa, [
888
+ H(tl, {
889
+ tableChildContents: T == null ? void 0 : T.children,
890
+ onDeleteChange: v,
891
+ onFixChange: j
892
+ }, null, 8, ["tableChildContents"])
893
+ ])) : $e("", !0)
894
+ ]))), 128))
895
+ ])
896
+ ]),
897
+ H(me, {
898
+ visible: r.value,
899
+ onBeforeDestroy: _,
900
+ width: 840
901
+ }, {
902
+ default: K(() => [
903
+ N("div", Ea, [
904
+ (U(), ae(he, {
905
+ rowContents: d.value,
906
+ key: d.value,
907
+ isEnableWrap: !0,
908
+ onChange: k
909
+ }, null, 8, ["rowContents"]))
910
+ ])
911
+ ]),
912
+ footer: K(() => [
913
+ N("div", { class: "dialog-footer" }, [
914
+ N("div", {
915
+ onClick: _,
916
+ class: "cancel-button button"
917
+ }, P("取消")),
918
+ N("div", {
919
+ class: "ok-button button",
920
+ onClick: t
921
+ }, P("确认"))
922
+ ])
923
+ ]),
924
+ _: 1
925
+ }, 8, ["visible"])
926
+ ]);
927
+ };
928
+ }
929
+ }, Da = /* @__PURE__ */ te(wa, [["__scopeId", "data-v-1a4cfddf"]]), Na = { class: "form-operate-content" }, Sa = { class: "form-operate-item" }, Fa = { class: "operate-title" }, Ba = { class: "operate-content" }, La = { class: "fix-content" }, ja = { class: "fix-button" }, Ua = ["onClick"], Ja = ["onClick"], Pa = { class: "operate-title" }, Ra = { class: "operate-content" }, Wa = { class: "fix-content" }, Va = { class: "fix-button" }, za = ["onClick"], Ga = ["onClick"], Ma = { style: { display: "flex", "justify-content": "space-between" } }, Za = { class: "form-content" }, Ka = { class: "form-content" }, Ha = {
930
+ __name: "operate",
931
+ props: {
932
+ itemContents: {
933
+ type: Array,
934
+ default: () => []
935
+ },
936
+ originalItemContents: {
937
+ type: Array,
938
+ default: () => []
939
+ }
940
+ },
941
+ emits: ["change"],
942
+ setup(l, { emit: s }) {
943
+ const a = l, e = s, n = L(!1), r = L([]), c = L([]), d = L(!1), b = L([]), m = L([]), y = L(""), A = L(!1), C = L(0), w = L([]), v = L([]), j = (f) => {
944
+ var O, u;
945
+ n.value = !0;
946
+ let E = [];
947
+ (u = (O = ie == null ? void 0 : ie.find((D) => (D == null ? void 0 : D.key) === ((f == null ? void 0 : f.type) === "" ? "Input" : f == null ? void 0 : f.type))) == null ? void 0 : O.value) == null || u.forEach((D) => {
948
+ C.value++, E.push({
949
+ label: D == null ? void 0 : D.label,
950
+ name: D == null ? void 0 : D.label,
951
+ type: D.type,
952
+ value: (D == null ? void 0 : D.label) === "类型" && f[D.key] === "" ? "Input" : f[D.key],
953
+ id: C.value,
954
+ contents: D == null ? void 0 : D.options
955
+ });
956
+ }), y.value = f == null ? void 0 : f.id, r.value = E, c.value = E;
957
+ }, g = (f) => {
958
+ d.value = !0;
959
+ let E = [];
960
+ ye == null || ye.forEach((O) => {
961
+ C.value++, E.push({
962
+ label: O == null ? void 0 : O.label,
963
+ name: O == null ? void 0 : O.label,
964
+ type: O.type,
965
+ value: (O == null ? void 0 : O.label) === "类型" && f[O.key] === "" ? "normal" : f[O.key],
966
+ id: C.value,
967
+ contents: O == null ? void 0 : O.options
968
+ });
969
+ }), w.value = E, v.value = E, y.value = f == null ? void 0 : f.id;
970
+ };
971
+ pe(
972
+ () => A.value,
973
+ () => {
974
+ var E, O;
975
+ let f = p(a.originalItemContents);
976
+ (E = p(a.originalItemContents)) != null && E.find((u) => (u == null ? void 0 : u.key) === "enableWrap") ? f = (O = p(a.originalItemContents)) == null ? void 0 : O.map((u) => ((u == null ? void 0 : u.key) === "enableWrap" && (u.contents = !A.value), u)) : f.push({
977
+ key: "enableWrap",
978
+ contents: !A.value
979
+ }), e("change", f);
980
+ },
981
+ { deep: !0, immediate: !0 }
982
+ );
983
+ const k = () => {
984
+ var O, u, D, $, S;
985
+ w.value = v.value;
986
+ let f = {};
987
+ if (y.value !== "" ? f.id = y.value : (C.value++, f.id = "id" + C.value), (O = w.value) == null || O.forEach((I) => {
988
+ const J = ye == null ? void 0 : ye.find((B) => (B == null ? void 0 : B.label) === (I == null ? void 0 : I.label));
989
+ J && (f[J.key] = I.value);
990
+ }), (u = b.value) != null && u.find((I) => I.id === f.id))
991
+ b.value = (D = b.value) == null ? void 0 : D.map((I) => (I.id === f.id && (I = f), I));
992
+ else {
993
+ let I = p(b.value);
994
+ b.value || (b.value = []), I.push(f), b.value = I;
995
+ }
996
+ d.value = !1, y.value = "";
997
+ let E = p(a.originalItemContents);
998
+ ($ = p(a.originalItemContents)) != null && $.find((I) => (I == null ? void 0 : I.key) === "formButton") ? E = (S = p(a.originalItemContents)) == null ? void 0 : S.map((I) => ((I == null ? void 0 : I.key) === "formButton" && (I.contents = b.value), I)) : E.push({
999
+ key: "formButton",
1000
+ contents: b.value
1001
+ }), e("change", E);
1002
+ }, _ = (f) => {
1003
+ _e.confirm("是否确认要删除", "", {
1004
+ confirmButtonText: "确认",
1005
+ cancelButtonText: "取消",
1006
+ type: "warning"
1007
+ }).then(
1008
+ () => {
1009
+ var E, O;
1010
+ m.value = (E = p(m.value)) == null ? void 0 : E.filter((u) => (u == null ? void 0 : u.id) !== (f == null ? void 0 : f.id)), e("change", (O = p(a.originalItemContents)) == null ? void 0 : O.map((u) => ((u == null ? void 0 : u.key) === "formContent" && (u.contents = m.value), u))), Ce({
1011
+ type: "success",
1012
+ message: "删除成功"
1013
+ });
1014
+ }
1015
+ ).catch(() => {
1016
+ });
1017
+ }, t = (f) => {
1018
+ _e.confirm("是否确认要删除", "", {
1019
+ confirmButtonText: "确认",
1020
+ cancelButtonText: "取消",
1021
+ type: "warning"
1022
+ }).then(
1023
+ () => {
1024
+ var E, O;
1025
+ b.value = (E = p(b.value)) == null ? void 0 : E.filter((u) => (u == null ? void 0 : u.id) !== (f == null ? void 0 : f.id)), e("change", (O = p(a.originalItemContents)) == null ? void 0 : O.map((u) => ((u == null ? void 0 : u.key) === "formButton" && (u.contents = b.value), u))), Ce({
1026
+ type: "success",
1027
+ message: "删除成功"
1028
+ });
1029
+ }
1030
+ ).catch(() => {
1031
+ });
1032
+ }, i = () => {
1033
+ d.value = !0;
1034
+ let f = [];
1035
+ ye == null || ye.forEach((E) => {
1036
+ C.value++, f.push({
1037
+ label: E == null ? void 0 : E.label,
1038
+ name: E == null ? void 0 : E.label,
1039
+ type: E.type,
1040
+ value: (E == null ? void 0 : E.label) === "类型" ? "normal" : "",
1041
+ id: C.value,
1042
+ contents: E == null ? void 0 : E.options
1043
+ });
1044
+ }), w.value = f, v.value = f;
1045
+ }, o = () => {
1046
+ var E, O;
1047
+ n.value = !0;
1048
+ let f = [];
1049
+ (O = (E = ie == null ? void 0 : ie.find((u) => (u == null ? void 0 : u.key) === "Input")) == null ? void 0 : E.value) == null || O.forEach((u) => {
1050
+ C.value++, f.push({
1051
+ label: u == null ? void 0 : u.label,
1052
+ name: u == null ? void 0 : u.label,
1053
+ type: u.type,
1054
+ value: (u == null ? void 0 : u.label) === "类型" ? "Input" : "",
1055
+ id: C.value,
1056
+ contents: u == null ? void 0 : u.options
1057
+ });
1058
+ }), r.value = f, c.value = f;
1059
+ }, h = (f) => {
1060
+ let E = p(v.value);
1061
+ E = E == null ? void 0 : E.map((O) => (O.value = f == null ? void 0 : f[O.name], O)), v.value = E;
1062
+ }, x = (f) => {
1063
+ var E, O, u, D;
1064
+ if ((f == null ? void 0 : f.类型) !== ((O = (E = c.value) == null ? void 0 : E.find(($) => ($ == null ? void 0 : $.label) === "类型")) == null ? void 0 : O.value)) {
1065
+ let $ = [];
1066
+ (D = (u = ie == null ? void 0 : ie.find((S) => (S == null ? void 0 : S.key) === ((f == null ? void 0 : f.类型) === "" ? "Input" : f == null ? void 0 : f.类型))) == null ? void 0 : u.value) == null || D.forEach((S) => {
1067
+ C.value++, $.push({
1068
+ label: S == null ? void 0 : S.label,
1069
+ name: S == null ? void 0 : S.label,
1070
+ type: S.type,
1071
+ value: (f == null ? void 0 : f[S.label]) ?? "",
1072
+ id: C.value,
1073
+ contents: S == null ? void 0 : S.options
1074
+ });
1075
+ }), c.value = $, r.value = $;
1076
+ } else {
1077
+ let $ = p(c.value);
1078
+ $ = $ == null ? void 0 : $.map((S) => (S.value = f == null ? void 0 : f[S.name], S)), c.value = $;
1079
+ }
1080
+ }, T = () => {
1081
+ var u, D, $, S, I, J;
1082
+ r.value = c.value;
1083
+ let f = {};
1084
+ y.value !== "" ? f.id = y.value : (C.value++, f.id = "id" + C.value);
1085
+ let E = (u = ie == null ? void 0 : ie.find((B) => {
1086
+ var W, Z;
1087
+ return (B == null ? void 0 : B.key) === (((Z = (W = r.value) == null ? void 0 : W.find((Q) => (Q == null ? void 0 : Q.label) === "类型")) == null ? void 0 : Z.value) ?? "label");
1088
+ })) == null ? void 0 : u.value;
1089
+ if ((D = r.value) == null || D.forEach((B) => {
1090
+ const W = E == null ? void 0 : E.find((Z) => (Z == null ? void 0 : Z.label) === (B == null ? void 0 : B.label));
1091
+ W && (f[W.key] = B.value);
1092
+ }), f.width = 1, ($ = m.value) != null && $.find((B) => B.id === f.id))
1093
+ m.value = (S = m.value) == null ? void 0 : S.map((B) => (B.id === f.id && (B = f), B));
1094
+ else {
1095
+ let B = p(m.value);
1096
+ B.push(f), m.value = B;
1097
+ }
1098
+ n.value = !1, y.value = "";
1099
+ let O = p(a.originalItemContents);
1100
+ (I = p(a.originalItemContents)) != null && I.find((B) => (B == null ? void 0 : B.key) === "formContent") ? O = (J = p(a.originalItemContents)) == null ? void 0 : J.map((B) => ((B == null ? void 0 : B.key) === "formContent" && (B.contents = m.value), B)) : O.push({
1101
+ key: "formContent",
1102
+ contents: m.value
1103
+ }), e("change", O);
1104
+ }, F = () => {
1105
+ n.value = !1, d.value = !1, y.value = "", c.value = [], v.value = [];
1106
+ };
1107
+ return pe(
1108
+ () => a.originalItemContents,
1109
+ () => {
1110
+ var E, O, u, D, $, S;
1111
+ if (!a.originalItemContents || a.originalItemContents.length === 0) return;
1112
+ const f = p(a.originalItemContents);
1113
+ m.value = ((E = f == null ? void 0 : f.find((I) => (I == null ? void 0 : I.key) === "formContent")) == null ? void 0 : E.contents) ?? [], b.value = ((O = f == null ? void 0 : f.find((I) => (I == null ? void 0 : I.key) === "formButton")) == null ? void 0 : O.contents) ?? [], A.value = ((u = f == null ? void 0 : f.find((I) => (I == null ? void 0 : I.key) === "enableWrap")) == null ? void 0 : u.contents) !== void 0 ? !((D = f == null ? void 0 : f.find((I) => (I == null ? void 0 : I.key) === "enableWrap")) != null && D.contents) : !0, m.value = ($ = p(m.value)) == null ? void 0 : $.map((I, J) => I = {
1114
+ label: (I == null ? void 0 : I.key) ?? (I == null ? void 0 : I.label) ?? "",
1115
+ type: (I == null ? void 0 : I.type) ?? "",
1116
+ contents: (I == null ? void 0 : I.options) ?? "",
1117
+ id: (I == null ? void 0 : I.id) ?? J,
1118
+ value: (I == null ? void 0 : I.value) ?? ""
1119
+ }), b.value = (S = b.value) == null ? void 0 : S.map((I, J) => I = {
1120
+ label: (I == null ? void 0 : I.label) ?? "",
1121
+ type: (I == null ? void 0 : I.type) ?? "",
1122
+ background: (I == null ? void 0 : I.background) ?? "var(--ssComponent-primary-color)",
1123
+ id: (I == null ? void 0 : I.id) ?? J
1124
+ });
1125
+ },
1126
+ { deep: !0, immediate: !0 }
1127
+ ), (f, E) => {
1128
+ const O = de("svg-icon");
1129
+ return U(), R("div", Na, [
1130
+ N("div", Sa, [
1131
+ N("div", Fa, [
1132
+ E[2] || (E[2] = N("div", null, P("表单内容"), -1)),
1133
+ N("div", {
1134
+ class: "icon-content",
1135
+ onClick: o
1136
+ }, [
1137
+ H(O, {
1138
+ name: "Plus",
1139
+ class: "icon-size"
1140
+ }),
1141
+ E[1] || (E[1] = N("div", null, P("新增"), -1))
1142
+ ])
1143
+ ]),
1144
+ N("div", Ba, [
1145
+ (U(!0), R(le, null, re(m.value, (u, D) => (U(), R("div", { key: D }, [
1146
+ N("div", La, [
1147
+ N("div", null, P(u.label), 1),
1148
+ N("div", ja, [
1149
+ N("div", {
1150
+ class: "icon-content",
1151
+ onClick: ($) => j(u)
1152
+ }, P("修改"), 8, Ua),
1153
+ N("div", {
1154
+ class: "icon-content",
1155
+ onClick: ($) => _(u)
1156
+ }, P("删除"), 8, Ja)
1157
+ ])
1158
+ ])
1159
+ ]))), 128))
1160
+ ]),
1161
+ N("div", Pa, [
1162
+ E[4] || (E[4] = N("div", null, P("表单按钮"), -1)),
1163
+ N("div", {
1164
+ class: "icon-content",
1165
+ onClick: i
1166
+ }, [
1167
+ H(O, {
1168
+ name: "Plus",
1169
+ class: "icon-size"
1170
+ }),
1171
+ E[3] || (E[3] = N("div", null, P("新增"), -1))
1172
+ ])
1173
+ ]),
1174
+ N("div", Ra, [
1175
+ (U(!0), R(le, null, re(b.value, (u, D) => (U(), R("div", { key: D }, [
1176
+ N("div", Wa, [
1177
+ N("div", null, P(u.label), 1),
1178
+ N("div", Va, [
1179
+ N("div", {
1180
+ class: "icon-content",
1181
+ onClick: ($) => g(u)
1182
+ }, P("修改"), 8, za),
1183
+ N("div", {
1184
+ class: "icon-content",
1185
+ onClick: ($) => t(u)
1186
+ }, P("删除"), 8, Ga)
1187
+ ])
1188
+ ])
1189
+ ]))), 128))
1190
+ ]),
1191
+ E[6] || (E[6] = N("div", { class: "operate-title" }, [
1192
+ N("div", null, P("表单布局"))
1193
+ ], -1)),
1194
+ N("div", Ma, [
1195
+ E[5] || (E[5] = N("div", null, P("是否自动撑宽"), -1)),
1196
+ H(Nl, {
1197
+ modelValue: A.value,
1198
+ "onUpdate:modelValue": E[0] || (E[0] = (u) => A.value = u)
1199
+ }, null, 8, ["modelValue"])
1200
+ ])
1201
+ ]),
1202
+ H(me, {
1203
+ visible: n.value,
1204
+ onBeforeDestroy: F,
1205
+ width: 840
1206
+ }, {
1207
+ default: K(() => [
1208
+ N("div", Za, [
1209
+ (U(), ae(he, {
1210
+ rowContents: r.value,
1211
+ key: r.value,
1212
+ isEnableWrap: !0,
1213
+ onChange: x
1214
+ }, null, 8, ["rowContents"]))
1215
+ ])
1216
+ ]),
1217
+ footer: K(() => [
1218
+ N("div", { class: "dialog-footer" }, [
1219
+ N("div", {
1220
+ onClick: F,
1221
+ class: "cancel-button button"
1222
+ }, P("取消")),
1223
+ N("div", {
1224
+ class: "ok-button button",
1225
+ onClick: T
1226
+ }, P("确认"))
1227
+ ])
1228
+ ]),
1229
+ _: 1
1230
+ }, 8, ["visible"]),
1231
+ H(me, {
1232
+ visible: d.value,
1233
+ onBeforeDestroy: F,
1234
+ width: 840
1235
+ }, {
1236
+ default: K(() => [
1237
+ N("div", Ka, [
1238
+ (U(), ae(he, {
1239
+ rowContents: w.value,
1240
+ key: w.value,
1241
+ isEnableWrap: !0,
1242
+ onChange: h
1243
+ }, null, 8, ["rowContents"]))
1244
+ ])
1245
+ ]),
1246
+ footer: K(() => [
1247
+ N("div", { class: "dialog-footer" }, [
1248
+ N("div", {
1249
+ onClick: F,
1250
+ class: "cancel-button button"
1251
+ }, P("取消")),
1252
+ N("div", {
1253
+ class: "ok-button button",
1254
+ onClick: k
1255
+ }, P("确认"))
1256
+ ])
1257
+ ]),
1258
+ _: 1
1259
+ }, 8, ["visible"])
1260
+ ]);
1261
+ };
1262
+ }
1263
+ }, Me = /* @__PURE__ */ te(Ha, [["__scopeId", "data-v-d6fcac3c"]]), qa = { class: "step-module content" }, Qa = { class: "module-data" }, Xa = { class: "step-module layout" }, Ya = { class: "form-content" }, en = /* @__PURE__ */ ge({
1264
+ __name: "operate",
1265
+ props: {
1266
+ itemContents: {
1267
+ type: Array,
1268
+ default: () => []
1269
+ },
1270
+ originalItemContents: {
1271
+ type: Array,
1272
+ default: () => []
1273
+ }
1274
+ },
1275
+ emits: ["change"],
1276
+ setup(l, { emit: s }) {
1277
+ const a = l, e = s, n = L([
1278
+ {
1279
+ label: "方向:",
1280
+ prop: "direction",
1281
+ type: "RADIO",
1282
+ contents: [
1283
+ {
1284
+ label: "水平",
1285
+ value: "horizontal"
1286
+ },
1287
+ {
1288
+ label: "垂直",
1289
+ value: "vertical"
1290
+ }
1291
+ ],
1292
+ value: "horizontal"
1293
+ },
1294
+ {
1295
+ label: "是否居中:",
1296
+ prop: "alignCenter",
1297
+ type: "RADIO",
1298
+ contents: [
1299
+ {
1300
+ label: "是",
1301
+ value: !0
1302
+ },
1303
+ {
1304
+ label: "否",
1305
+ value: !1
1306
+ }
1307
+ ],
1308
+ value: !0
1309
+ },
1310
+ // {
1311
+ // label: '是否交互',
1312
+ // prop: 'allowTrigger',
1313
+ // type: 'RADIO',
1314
+ // contents: [
1315
+ // {
1316
+ // label: '是',
1317
+ // value: true,
1318
+ // }, {
1319
+ // label: '否',
1320
+ // value: false,
1321
+ // },
1322
+ // ],
1323
+ // value: 'horizontal'
1324
+ // },
1325
+ {
1326
+ label: "应用简洁风格",
1327
+ prop: "simple",
1328
+ type: "RADIO",
1329
+ contents: [
1330
+ {
1331
+ label: "是",
1332
+ value: !0
1333
+ },
1334
+ {
1335
+ label: "否",
1336
+ value: !1
1337
+ }
1338
+ ],
1339
+ value: !1
1340
+ }
1341
+ ]), r = L([
1342
+ {
1343
+ label: "",
1344
+ prop: "index",
1345
+ type: "input",
1346
+ value: "",
1347
+ isFormColHidden: !0
1348
+ },
1349
+ {
1350
+ label: "标题",
1351
+ prop: "title",
1352
+ type: "input",
1353
+ value: ""
1354
+ },
1355
+ {
1356
+ label: "描述",
1357
+ prop: "description",
1358
+ type: "input",
1359
+ value: ""
1360
+ }
1361
+ ]), c = L([
1362
+ {
1363
+ label: "取消",
1364
+ background: "#c0c4cc"
1365
+ },
1366
+ {
1367
+ label: "确认",
1368
+ background: "#436aaf"
1369
+ }
1370
+ ]), d = el({
1371
+ visible: !1,
1372
+ width: "40%",
1373
+ title: "步骤条"
1374
+ }), b = L("create"), m = L({}), y = L([]), A = (g) => {
1375
+ var k;
1376
+ m.value = g, e("change", (k = v()) == null ? void 0 : k.compData);
1377
+ }, C = (g, k) => {
1378
+ var _, t;
1379
+ switch (g) {
1380
+ case "create":
1381
+ (_ = r.value) == null || _.forEach((i) => {
1382
+ i.value = "";
1383
+ }), b.value = "create", d.visible = !0;
1384
+ break;
1385
+ case "update":
1386
+ (t = r.value) == null || t.forEach((i) => {
1387
+ i.value = k[i == null ? void 0 : i.prop];
1388
+ }), b.value = "update", d.visible = !0;
1389
+ break;
1390
+ case "delete":
1391
+ y.value.splice(k, 1), b.value = "delete";
1392
+ break;
1393
+ }
1394
+ }, w = (g) => {
1395
+ var k, _, t;
1396
+ if ((g == null ? void 0 : g.buttonName) === "确认") {
1397
+ const i = p(g == null ? void 0 : g.content);
1398
+ switch (Object.keys(i).forEach((o) => {
1399
+ i[o] === "" && delete i[o];
1400
+ }), b.value) {
1401
+ case "create":
1402
+ y.value.push({
1403
+ ...i,
1404
+ index: ((k = y.value) == null ? void 0 : k.length) + 1
1405
+ });
1406
+ break;
1407
+ case "update":
1408
+ y.value = (_ = y.value) == null ? void 0 : _.map((o) => o.index === (i == null ? void 0 : i.index) ? {
1409
+ ...o,
1410
+ title: i == null ? void 0 : i.title,
1411
+ description: i == null ? void 0 : i.description
1412
+ } : o);
1413
+ break;
1414
+ }
1415
+ e("change", (t = v()) == null ? void 0 : t.compData), d.visible = !1;
1416
+ } else
1417
+ d.visible = !1;
1418
+ }, v = () => ({
1419
+ comp: "Step",
1420
+ compData: [
1421
+ {
1422
+ key: "stepList",
1423
+ contents: y.value
1424
+ },
1425
+ {
1426
+ key: "stepConfig",
1427
+ contents: m.value
1428
+ }
1429
+ ]
1430
+ }), j = () => {
1431
+ d.visible = !1;
1432
+ };
1433
+ return pe(() => a == null ? void 0 : a.itemContents, (g) => {
1434
+ var k, _;
1435
+ g && (m.value = ((k = g == null ? void 0 : g.find((t) => t.key === "stepConfig")) == null ? void 0 : k.contents) ?? {}, y.value = ((_ = g == null ? void 0 : g.find((t) => t.key === "stepList")) == null ? void 0 : _.contents) ?? []);
1436
+ }, { immediate: !0 }), (g, k) => {
1437
+ const _ = de("svg-icon"), t = de("el-button");
1438
+ return U(), R(le, null, [
1439
+ N("div", null, [
1440
+ N("div", qa, [
1441
+ k[2] || (k[2] = N("h4", { class: "module-title" }, "内容", -1)),
1442
+ N("div", {
1443
+ class: "module-icon",
1444
+ onClick: k[0] || (k[0] = (i) => C("create"))
1445
+ }, [
1446
+ H(_, {
1447
+ name: "Plus",
1448
+ class: "icon-size"
1449
+ }),
1450
+ k[1] || (k[1] = N("div", null, "新增", -1))
1451
+ ])
1452
+ ]),
1453
+ N("div", Qa, [
1454
+ (U(!0), R(le, null, re(y.value, (i, o) => (U(), R("div", {
1455
+ class: "module-data-item",
1456
+ key: o
1457
+ }, [
1458
+ N("span", null, P(i == null ? void 0 : i.title), 1),
1459
+ N("div", null, [
1460
+ H(t, {
1461
+ type: "primary",
1462
+ size: "small",
1463
+ onClick: (h) => C("update", { ...i, index: o + 1 })
1464
+ }, {
1465
+ default: K(() => k[3] || (k[3] = [
1466
+ ke("修改")
1467
+ ])),
1468
+ _: 2,
1469
+ __: [3]
1470
+ }, 1032, ["onClick"]),
1471
+ H(t, {
1472
+ type: "danger",
1473
+ size: "small",
1474
+ onClick: (h) => C("delete", o)
1475
+ }, {
1476
+ default: K(() => k[4] || (k[4] = [
1477
+ ke("删除")
1478
+ ])),
1479
+ _: 2,
1480
+ __: [4]
1481
+ }, 1032, ["onClick"])
1482
+ ])
1483
+ ]))), 128))
1484
+ ]),
1485
+ N("div", Xa, [
1486
+ k[5] || (k[5] = N("div", { class: "module-title" }, "布局", -1)),
1487
+ H(he, {
1488
+ rowContents: n.value,
1489
+ onChange: A
1490
+ }, null, 8, ["rowContents"])
1491
+ ])
1492
+ ]),
1493
+ H(me, {
1494
+ visible: d.visible,
1495
+ title: d.title,
1496
+ onBeforeDestroy: j,
1497
+ width: d.width
1498
+ }, {
1499
+ default: K(() => [
1500
+ N("div", Ya, [
1501
+ (U(), ae(he, {
1502
+ rowContents: r.value,
1503
+ key: r.value,
1504
+ isEnableWrap: !1,
1505
+ isButtonRow: !1,
1506
+ isStartJustify: !1,
1507
+ buttonValue: c.value,
1508
+ onOnButtonClick: w
1509
+ }, null, 8, ["rowContents", "buttonValue"]))
1510
+ ])
1511
+ ]),
1512
+ _: 1
1513
+ }, 8, ["visible", "title", "width"])
1514
+ ], 64);
1515
+ };
1516
+ }
1517
+ }), ln = /* @__PURE__ */ te(en, [["__scopeId", "data-v-9361c99f"]]), an = { class: "step-module content" }, nn = { class: "module-data" }, sn = { class: "step-module layout" }, on = { class: "form-content" }, rn = /* @__PURE__ */ ge({
1518
+ __name: "operate",
1519
+ props: {
1520
+ itemContents: {
1521
+ type: Array,
1522
+ default: () => []
1523
+ },
1524
+ originalItemContents: {
1525
+ type: Array,
1526
+ default: () => []
1527
+ }
1528
+ },
1529
+ emits: ["change"],
1530
+ setup(l, { emit: s }) {
1531
+ const a = l, e = s, n = L("create"), r = L({}), c = L([]), d = L([
1532
+ {
1533
+ label: "方向:",
1534
+ prop: "placement",
1535
+ type: "radio",
1536
+ contents: [
1537
+ {
1538
+ label: "底部",
1539
+ value: "bottom"
1540
+ },
1541
+ {
1542
+ label: "顶部",
1543
+ value: "top"
1544
+ }
1545
+ ],
1546
+ value: "bottom"
1547
+ },
1548
+ {
1549
+ label: "节点类型:",
1550
+ prop: "type",
1551
+ type: "select",
1552
+ contents: [
1553
+ {
1554
+ label: "primary",
1555
+ value: "primary"
1556
+ },
1557
+ {
1558
+ label: "success",
1559
+ value: "success"
1560
+ },
1561
+ {
1562
+ label: "warning",
1563
+ value: "warning"
1564
+ },
1565
+ {
1566
+ label: "danger",
1567
+ value: "danger"
1568
+ },
1569
+ {
1570
+ label: "info",
1571
+ value: "info"
1572
+ }
1573
+ ],
1574
+ value: "primary"
1575
+ },
1576
+ {
1577
+ label: "颜色:",
1578
+ prop: "color",
1579
+ type: "color",
1580
+ value: ""
1581
+ },
1582
+ {
1583
+ label: "尺寸:",
1584
+ prop: "size",
1585
+ type: "radio",
1586
+ contents: [
1587
+ {
1588
+ label: "normal",
1589
+ value: "normal"
1590
+ },
1591
+ {
1592
+ label: "large",
1593
+ value: "large"
1594
+ }
1595
+ ],
1596
+ value: "normal"
1597
+ },
1598
+ {
1599
+ label: "是否空心",
1600
+ prop: "isHollow",
1601
+ type: "RADIO",
1602
+ contents: [
1603
+ {
1604
+ label: "是",
1605
+ value: !0
1606
+ },
1607
+ {
1608
+ label: "否",
1609
+ value: !1
1610
+ }
1611
+ ],
1612
+ value: !0
1613
+ },
1614
+ {
1615
+ label: "是否居中",
1616
+ prop: "isCenter",
1617
+ type: "RADIO",
1618
+ contents: [
1619
+ {
1620
+ label: "是",
1621
+ value: !0
1622
+ },
1623
+ {
1624
+ label: "否",
1625
+ value: !1
1626
+ }
1627
+ ],
1628
+ value: !0
1629
+ }
1630
+ ]), b = L([
1631
+ {
1632
+ label: "",
1633
+ prop: "index",
1634
+ type: "input",
1635
+ value: "",
1636
+ isFormColHidden: !0
1637
+ },
1638
+ {
1639
+ label: "内容",
1640
+ prop: "content",
1641
+ type: "input",
1642
+ value: ""
1643
+ },
1644
+ {
1645
+ label: "时间戳",
1646
+ prop: "timestamp",
1647
+ type: "datetime",
1648
+ value: ""
1649
+ }
1650
+ ]), m = L([
1651
+ {
1652
+ label: "取消",
1653
+ background: "#c0c4cc"
1654
+ },
1655
+ {
1656
+ label: "确认",
1657
+ background: "#436aaf"
1658
+ }
1659
+ ]), y = el({
1660
+ visible: !1,
1661
+ width: "40%",
1662
+ title: "时间线"
1663
+ }), A = (g) => {
1664
+ var k;
1665
+ r.value = g, console.log(1212, g), e("change", (k = v()) == null ? void 0 : k.compData);
1666
+ }, C = (g, k) => {
1667
+ var _, t;
1668
+ switch (g) {
1669
+ case "create":
1670
+ (_ = b.value) == null || _.forEach((i) => {
1671
+ i.value = "";
1672
+ }), n.value = "create", y.visible = !0;
1673
+ break;
1674
+ case "update":
1675
+ (t = b.value) == null || t.forEach((i) => {
1676
+ i.value = k[i == null ? void 0 : i.prop];
1677
+ }), n.value = "update", y.visible = !0;
1678
+ break;
1679
+ case "delete":
1680
+ c.value.splice(k, 1), n.value = "delete";
1681
+ break;
1682
+ }
1683
+ }, w = (g) => {
1684
+ var k, _, t, i;
1685
+ if ((g == null ? void 0 : g.buttonName) === "确认") {
1686
+ const o = p(g == null ? void 0 : g.content);
1687
+ switch (Object.keys(o).forEach((h) => {
1688
+ o[h] === "" && delete o[h];
1689
+ }), n.value) {
1690
+ case "create":
1691
+ console.log(1335, c.value, o), (_ = c.value) == null || _.push({
1692
+ ...o,
1693
+ index: ((k = c.value) == null ? void 0 : k.length) + 1
1694
+ });
1695
+ break;
1696
+ case "update":
1697
+ c.value = (t = c.value) == null ? void 0 : t.map((h) => h.index === (o == null ? void 0 : o.index) ? {
1698
+ ...h,
1699
+ content: o == null ? void 0 : o.content,
1700
+ timestamp: o == null ? void 0 : o.timestamp
1701
+ } : h);
1702
+ break;
1703
+ }
1704
+ e("change", (i = v()) == null ? void 0 : i.compData), y.visible = !1;
1705
+ } else
1706
+ y.visible = !1;
1707
+ }, v = () => ({
1708
+ comp: "TimeLine",
1709
+ compData: [
1710
+ {
1711
+ key: "timeLineList",
1712
+ contents: c.value
1713
+ },
1714
+ {
1715
+ key: "timeLineConfig",
1716
+ contents: r.value
1717
+ }
1718
+ ]
1719
+ }), j = () => {
1720
+ y.visible = !1;
1721
+ };
1722
+ return pe(() => a == null ? void 0 : a.itemContents, (g) => {
1723
+ var k, _;
1724
+ g && (r.value = ((k = g == null ? void 0 : g.find((t) => t.key === "timeLineConfig")) == null ? void 0 : k.contents) ?? {}, c.value = ((_ = g == null ? void 0 : g.find((t) => t.key === "timeLineList")) == null ? void 0 : _.contents) ?? []);
1725
+ }, { immediate: !0 }), (g, k) => {
1726
+ const _ = de("svg-icon"), t = de("el-button");
1727
+ return U(), R(le, null, [
1728
+ N("div", null, [
1729
+ N("div", an, [
1730
+ k[2] || (k[2] = N("h4", { class: "module-title" }, "内容", -1)),
1731
+ N("div", {
1732
+ class: "module-icon",
1733
+ onClick: k[0] || (k[0] = (i) => C("create"))
1734
+ }, [
1735
+ H(_, {
1736
+ name: "Plus",
1737
+ class: "icon-size"
1738
+ }),
1739
+ k[1] || (k[1] = N("div", null, "新增", -1))
1740
+ ])
1741
+ ]),
1742
+ N("div", nn, [
1743
+ (U(!0), R(le, null, re(c.value, (i, o) => (U(), R("div", {
1744
+ class: "module-data-item",
1745
+ key: o
1746
+ }, [
1747
+ N("span", null, P(i == null ? void 0 : i.content), 1),
1748
+ N("div", null, [
1749
+ H(t, {
1750
+ type: "primary",
1751
+ size: "small",
1752
+ onClick: (h) => C("update", { ...i, index: o + 1 })
1753
+ }, {
1754
+ default: K(() => k[3] || (k[3] = [
1755
+ ke("修改")
1756
+ ])),
1757
+ _: 2,
1758
+ __: [3]
1759
+ }, 1032, ["onClick"]),
1760
+ H(t, {
1761
+ type: "danger",
1762
+ size: "small",
1763
+ onClick: (h) => C("delete", o)
1764
+ }, {
1765
+ default: K(() => k[4] || (k[4] = [
1766
+ ke("删除")
1767
+ ])),
1768
+ _: 2,
1769
+ __: [4]
1770
+ }, 1032, ["onClick"])
1771
+ ])
1772
+ ]))), 128))
1773
+ ]),
1774
+ N("div", sn, [
1775
+ k[5] || (k[5] = N("div", { class: "module-title" }, "布局", -1)),
1776
+ H(he, {
1777
+ rowContents: d.value,
1778
+ onChange: A
1779
+ }, null, 8, ["rowContents"])
1780
+ ])
1781
+ ]),
1782
+ H(me, {
1783
+ visible: y.visible,
1784
+ title: y.title,
1785
+ onBeforeDestroy: j,
1786
+ width: y.width
1787
+ }, {
1788
+ default: K(() => [
1789
+ N("div", on, [
1790
+ (U(), ae(he, {
1791
+ rowContents: b.value,
1792
+ key: b.value,
1793
+ isEnableWrap: !1,
1794
+ isButtonRow: !1,
1795
+ isStartJustify: !1,
1796
+ buttonValue: m.value,
1797
+ onOnButtonClick: w
1798
+ }, null, 8, ["rowContents", "buttonValue"]))
1799
+ ])
1800
+ ]),
1801
+ _: 1
1802
+ }, 8, ["visible", "title", "width"])
1803
+ ], 64);
1804
+ };
1805
+ }
1806
+ }), tn = /* @__PURE__ */ te(rn, [["__scopeId", "data-v-40aea043"]]), cn = { class: "extra-content" }, un = { key: 0 }, pn = { key: 1 }, dn = {
1807
+ __name: "index",
1808
+ props: {
1809
+ itemData: {
1810
+ type: Array,
1811
+ default: () => []
1812
+ },
1813
+ childItemData: {
1814
+ type: Array,
1815
+ default: () => []
1816
+ },
1817
+ index: Number,
1818
+ changedContent: {
1819
+ type: Object,
1820
+ default: () => {
1821
+ }
1822
+ }
1823
+ },
1824
+ emits: ["change"],
1825
+ setup(l, { emit: s }) {
1826
+ const a = l, e = L(0), n = L(), r = L(), c = s, d = L(!1), b = L({}), m = L({}), y = L();
1827
+ pe(
1828
+ () => [a.itemData],
1829
+ () => {
1830
+ var i;
1831
+ const t = p(a.itemData);
1832
+ n.value = (i = p(t)) == null ? void 0 : i.map((o) => {
1833
+ var h;
1834
+ if (o.key === "extra") {
1835
+ let x = [];
1836
+ (h = o.value) == null || h.forEach((T) => {
1837
+ var F;
1838
+ x.push((F = Object.values(T)) == null ? void 0 : F[0]);
1839
+ }), o.value = x;
1840
+ }
1841
+ return o;
1842
+ });
1843
+ },
1844
+ { deep: !0, immediate: !0 }
1845
+ );
1846
+ const A = (t, i, o, h) => {
1847
+ var T;
1848
+ let x = {};
1849
+ ((T = t == null ? void 0 : t[0]) == null ? void 0 : T.contents) === "详情" && (d.value = !0, x[i] = t, r.value = t == null ? void 0 : t.filter((F) => (F == null ? void 0 : F.key) !== "tableContentName"), b.value = x, m.value = o, y.value = h.id);
1850
+ }, C = (t) => {
1851
+ var F, f, E, O;
1852
+ const i = (f = (F = Object.values(p(b.value))) == null ? void 0 : F[0]) == null ? void 0 : f.filter((u) => (u == null ? void 0 : u.key) === "tableContentName"), o = (O = (E = Object.values(p(b.value))) == null ? void 0 : E[0]) == null ? void 0 : O.filter((u) => (u == null ? void 0 : u.key) !== "tableContentName"), h = o == null ? void 0 : o.map((u, D) => {
1853
+ var $;
1854
+ return D === t.index && (u == null ? void 0 : u.comp) === "Table" && (u.compData = ($ = u.compData) == null ? void 0 : $.map((S) => {
1855
+ var I, J;
1856
+ return (S == null ? void 0 : S.key) === "tableContents" && (S.contents = (J = (I = t.content) == null ? void 0 : I.map((B) => {
1857
+ let W = {};
1858
+ for (let Z in B)
1859
+ Z !== "id" && (W[Z] = B[Z]);
1860
+ return W;
1861
+ })) == null ? void 0 : J.map((B) => Object.values(B))), S;
1862
+ })), u;
1863
+ });
1864
+ h.unshift(i == null ? void 0 : i[0]);
1865
+ let x = p(b.value), T = {};
1866
+ for (let u in x)
1867
+ T[u] = h;
1868
+ b.value = T;
1869
+ }, w = () => {
1870
+ d.value = !1, b.value = {}, m.value = {}, y.value = void 0, e.value++;
1871
+ }, v = (t) => {
1872
+ var F, f, E, O;
1873
+ const i = (f = (F = Object.values(p(b.value))) == null ? void 0 : F[0]) == null ? void 0 : f.filter((u) => (u == null ? void 0 : u.key) === "tableContentName"), o = (O = (E = Object.values(p(b.value))) == null ? void 0 : E[0]) == null ? void 0 : O.filter((u) => (u == null ? void 0 : u.key) !== "tableContentName"), h = o == null ? void 0 : o.map((u, D) => (D === t.index && (u.compData = t.contents), u));
1874
+ h.unshift(i == null ? void 0 : i[0]);
1875
+ let x = p(b.value), T = {};
1876
+ for (let u in x)
1877
+ T[u] = h;
1878
+ b.value = T;
1879
+ }, j = () => {
1880
+ var i, o;
1881
+ let t = {};
1882
+ for (let h in m.value)
1883
+ h === ((i = Object.keys(b.value)) == null ? void 0 : i[0]) ? t[h] = (o = Object.values(b.value)) == null ? void 0 : o[0] : t[h] = m.value[h];
1884
+ c("change", {
1885
+ buttonName: "编辑",
1886
+ index: y.value,
1887
+ singleContent: t
1888
+ }, "methodData"), d.value = !1, b.value = {}, m.value = {}, y.value = void 0;
1889
+ }, g = () => {
1890
+ d.value = !1, b.value = {}, m.value = {}, y.value = void 0;
1891
+ }, k = (t) => {
1892
+ c("change", t, "methodData");
1893
+ }, _ = (t) => Fn(t);
1894
+ return (t, i) => (U(), R("div", cn, [
1895
+ (U(!0), R(le, null, re(n.value, (o, h) => (U(), R("div", { key: e.value }, [
1896
+ (o == null ? void 0 : o.key) === "extra" ? (U(), R("div", un)) : (U(), R("div", pn, [
1897
+ (U(), ae(Ue(_(o.comp)), {
1898
+ itemData: o == null ? void 0 : o.compData,
1899
+ childItemData: o == null ? void 0 : o.itemChildData,
1900
+ key: h,
1901
+ index: (o == null ? void 0 : o.id) ?? h,
1902
+ onContentClick: A,
1903
+ onChange: k
1904
+ }, null, 40, ["itemData", "childItemData", "index"]))
1905
+ ]))
1906
+ ]))), 128)),
1907
+ H(me, {
1908
+ visible: d.value,
1909
+ onBeforeDestroy: g
1910
+ }, {
1911
+ default: K(() => [
1912
+ (U(!0), R(le, null, re(r.value, (o, h) => (U(), R("div", {
1913
+ key: h,
1914
+ class: "extra-dialog"
1915
+ }, [
1916
+ (U(), ae(Ue(_(o.comp)), {
1917
+ itemData: o == null ? void 0 : o.compData,
1918
+ onChange: C,
1919
+ childItemData: o == null ? void 0 : o.itemChildData,
1920
+ key: h,
1921
+ onContentChange: v,
1922
+ index: (o == null ? void 0 : o.id) ?? h,
1923
+ class: "extra-component"
1924
+ }, null, 40, ["itemData", "childItemData", "index"]))
1925
+ ]))), 128))
1926
+ ]),
1927
+ footer: K(() => [
1928
+ N("div", { class: "dialog-footer" }, [
1929
+ N("div", {
1930
+ class: "cancel-button footer-button",
1931
+ onClick: w
1932
+ }, P("取消")),
1933
+ N("div", {
1934
+ class: "confirm-button footer-button",
1935
+ onClick: j
1936
+ }, P("确认"))
1937
+ ])
1938
+ ]),
1939
+ _: 1
1940
+ }, 8, ["visible"])
1941
+ ]));
1942
+ }
1943
+ }, fn = /* @__PURE__ */ te(dn, [["__scopeId", "data-v-b0b2f71f"]]), hn = { class: "method-content" }, yn = ["onClick"], mn = {
1944
+ __name: "index",
1945
+ props: {
1946
+ itemData: {
1947
+ type: Array,
1948
+ default: () => []
1949
+ },
1950
+ childItemData: {
1951
+ type: Array,
1952
+ default: () => []
1953
+ },
1954
+ index: Number,
1955
+ changedContent: {
1956
+ type: Object,
1957
+ default: () => {
1958
+ }
1959
+ }
1960
+ },
1961
+ setup(l) {
1962
+ const s = L([]), a = l, e = Ll(Se), { itemData: n, isEdit: r } = Pe(e), c = (m, y) => {
1963
+ var C;
1964
+ const A = (C = y == null ? void 0 : y[0]) == null ? void 0 : C.children;
1965
+ return m == null ? void 0 : m.map((w) => {
1966
+ var v;
1967
+ return w = (v = w == null ? void 0 : w.map((j, g) => {
1968
+ var k;
1969
+ return {
1970
+ key: (k = A[g]) == null ? void 0 : k.label,
1971
+ value: j
1972
+ };
1973
+ })) == null ? void 0 : v.filter((j) => j.key), w;
1974
+ });
1975
+ };
1976
+ pe(
1977
+ () => n.value,
1978
+ async () => {
1979
+ r.value == "view" && await b(p(a.itemData));
1980
+ },
1981
+ { deep: !0 }
1982
+ );
1983
+ const d = async (m) => {
1984
+ var t, i, o, h, x, T;
1985
+ let y = {};
1986
+ if ((t = p(m.content)) == null || t.forEach((F, f) => {
1987
+ var E, O, u, D, $, S, I, J, B, W, Z, Q, ne, se, ue, q, ce;
1988
+ if ((F == null ? void 0 : F.comp) === "Table") {
1989
+ let oe = (D = (u = (O = (E = F == null ? void 0 : F.compData) == null ? void 0 : E.find((z) => (z == null ? void 0 : z.key) === "header")) == null ? void 0 : O.contents) == null ? void 0 : u[0]) == null ? void 0 : D.some((z) => z == null ? void 0 : z.children), Y = (I = (S = ($ = F == null ? void 0 : F.compData) == null ? void 0 : $.find((z) => (z == null ? void 0 : z.key) === "tableContents")) == null ? void 0 : S.contents) == null ? void 0 : I.map((z) => z.slice(1)), X = (Q = (Z = (W = (B = (J = F == null ? void 0 : F.compData) == null ? void 0 : J.find((z) => (z == null ? void 0 : z.key) === "header")) == null ? void 0 : B.contents) == null ? void 0 : W[0]) == null ? void 0 : Z[0]) == null ? void 0 : Q.label, ee = (ue = (se = (ne = F == null ? void 0 : F.compData) == null ? void 0 : ne.find((z) => (z == null ? void 0 : z.key) === "header")) == null ? void 0 : se.contents) == null ? void 0 : ue[0];
1990
+ if (oe)
1991
+ y[X] = c(Y, ee);
1992
+ else {
1993
+ const z = [];
1994
+ ee = ee.slice(1, ee.length - 1), ee == null || ee.forEach((_l, $l) => {
1995
+ Y == null || Y.forEach((Ve) => {
1996
+ z.push({
1997
+ key: _l.label + Ve[0],
1998
+ value: Ve[$l + 1]
1999
+ });
2000
+ });
2001
+ }), y["form" + f] = z;
2002
+ }
2003
+ } else {
2004
+ const oe = (ce = (q = F.compData) == null ? void 0 : q.find((X) => (X == null ? void 0 : X.key) === "formContent")) == null ? void 0 : ce.contents;
2005
+ y.form = {};
2006
+ const Y = [];
2007
+ oe == null || oe.forEach((X) => {
2008
+ X.key !== "" && (X = {
2009
+ key: X == null ? void 0 : X.key,
2010
+ value: X == null ? void 0 : X.value
2011
+ }, Y.push(X));
2012
+ }), y.form = Y;
2013
+ }
2014
+ }), m.api) {
2015
+ const F = await Dl.post(m.api, {
2016
+ data: y,
2017
+ templateFileName: (i = m == null ? void 0 : m.extraContent) == null ? void 0 : i[0]
2018
+ }, {
2019
+ responseType: "blob",
2020
+ // 必须设置
2021
+ headers: {
2022
+ "Content-Type": "application/json"
2023
+ }
2024
+ });
2025
+ var A = new Blob([F.data], {
2026
+ type: "application/octet-stream;charset=UTF-8"
2027
+ }), C = F.headers["content-disposition"], w = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), v = w.exec(C), j = ((x = (h = (o = m == null ? void 0 : m.extraContent) == null ? void 0 : o[0]) == null ? void 0 : h.split(".")) == null ? void 0 : x[0]) + "." + ((T = v[1].split(".")) == null ? void 0 : T[1]), g = document.createElement("a"), k = window.URL.createObjectURL(A), _ = /^["](.*)["]$/g;
2028
+ g.style.display = "none", g.href = k, g.download = decodeURI(j.replace(_, "$1")), document.body.appendChild(g), g.click(), document.body.removeChild(g), window.URL.revokeObjectURL(k);
2029
+ }
2030
+ }, b = async (m) => {
2031
+ var w;
2032
+ const y = p(m), A = y == null ? void 0 : y.map(async (v) => {
2033
+ var i, o, h, x, T, F, f;
2034
+ const g = (i = (await ze({
2035
+ key: {
2036
+ systemKey: sessionStorage.getItem("systemKey"),
2037
+ parentTable: "",
2038
+ type: "method",
2039
+ methodName: v.method
2040
+ }
2041
+ })).data.result) == null ? void 0 : i[0], k = await ze({
2042
+ key: {
2043
+ systemKey: sessionStorage.getItem("systemKey"),
2044
+ type: "methodData",
2045
+ tableId: g == null ? void 0 : g.id
2046
+ }
2047
+ }), _ = await xl((o = v == null ? void 0 : v.value) == null ? void 0 : o[0], sessionStorage.getItem("systemKey"), ""), t = (h = k.data.result) == null ? void 0 : h[0];
2048
+ return {
2049
+ buttonName: (x = g == null ? void 0 : g.key) == null ? void 0 : x.methodKey,
2050
+ api: (F = (T = t == null ? void 0 : t.value) == null ? void 0 : T.tableData) == null ? void 0 : F[0],
2051
+ content: _ == null ? void 0 : _.filter((E) => E.comp !== "methodButton"),
2052
+ extraContent: (f = p(v.value)) == null ? void 0 : f.slice(1)
2053
+ };
2054
+ }), C = await Promise.all(A);
2055
+ s.value = C == null ? void 0 : C.filter((v) => v == null ? void 0 : v.extraContent), (w = s.value) == null || w.forEach((v) => {
2056
+ var j;
2057
+ v.api === "" && ((j = v.content) == null || j.forEach((g) => {
2058
+ var k;
2059
+ g.comp == "Table" && e.setExtraContents(Il(g.compData, (k = v.extraContent) == null ? void 0 : k[0]));
2060
+ }));
2061
+ });
2062
+ };
2063
+ return pe(
2064
+ () => a.itemData,
2065
+ async () => {
2066
+ r.value == "view" && await b(p(a.itemData));
2067
+ },
2068
+ { immediate: !0, deep: !0 }
2069
+ ), (m, y) => (U(), R("div", hn, [
2070
+ (U(!0), R(le, null, re(s.value, (A) => (U(), R("div", null, [
2071
+ A.api !== "" ? (U(), R("div", {
2072
+ key: 0,
2073
+ onClick: (C) => d(A),
2074
+ class: "method-buttons"
2075
+ }, P(A.buttonName), 9, yn)) : $e("", !0)
2076
+ ]))), 256))
2077
+ ]));
2078
+ }
2079
+ }, bn = /* @__PURE__ */ te(mn, [["__scopeId", "data-v-9df085f9"]]), kn = {};
2080
+ function gn(l, s) {
2081
+ return " 567 ";
2082
+ }
2083
+ const vn = /* @__PURE__ */ te(kn, [["render", gn]]), Cn = {};
2084
+ function _n(l, s) {
2085
+ return " 1212 ";
2086
+ }
2087
+ const $n = /* @__PURE__ */ te(Cn, [["render", _n]]), An = /* @__PURE__ */ ge({
2088
+ __name: "index",
2089
+ props: {
2090
+ stepConfig: {
2091
+ type: Object,
2092
+ default: {}
2093
+ },
2094
+ stepList: {
2095
+ type: Array,
2096
+ default: () => []
2097
+ }
2098
+ },
2099
+ emits: ["clickStep", "clickTrigger", "changeTrigger"],
2100
+ setup(l, { emit: s }) {
2101
+ const a = l, e = s, n = L(1), r = Ol(() => {
2102
+ var A, C;
2103
+ return (A = a == null ? void 0 : a.stepConfig) != null && A.allowTrigger ? n.value : (C = a == null ? void 0 : a.stepConfig) == null ? void 0 : C.active;
2104
+ }), c = (A, C) => {
2105
+ n.value = C, e("clickStep", A, C);
2106
+ }, d = (A) => Sl(A), b = () => {
2107
+ var C;
2108
+ const A = (C = a == null ? void 0 : a.stepList) == null ? void 0 : C.find((w, v) => v + 1 === r.value);
2109
+ return console.log("findStep", A), A ? A == null ? void 0 : A.children : [];
2110
+ }, m = (A) => {
2111
+ e("clickTrigger", A);
2112
+ }, y = (A) => {
2113
+ e("changeTrigger", A);
2114
+ };
2115
+ return (A, C) => {
2116
+ var j, g, k, _, t;
2117
+ const w = de("el-step"), v = de("el-steps");
2118
+ return U(), R(le, null, [
2119
+ H(v, {
2120
+ direction: (j = l.stepConfig) == null ? void 0 : j.direction,
2121
+ active: r.value,
2122
+ "finish-status": "success",
2123
+ simple: (g = l.stepConfig) == null ? void 0 : g.simple,
2124
+ "align-center": (k = l.stepConfig) == null ? void 0 : k.alignCenter
2125
+ }, {
2126
+ default: K(() => [
2127
+ (U(!0), R(le, null, re(l.stepList, (i, o) => (U(), ae(w, {
2128
+ key: o,
2129
+ class: "step-item",
2130
+ onClick: (h) => c(i, o + 1)
2131
+ }, {
2132
+ title: K(() => [
2133
+ Oe(A.$slots, "title", {
2134
+ title: i == null ? void 0 : i.title
2135
+ }, void 0, !0)
2136
+ ]),
2137
+ description: K(() => [
2138
+ Oe(A.$slots, "description", {
2139
+ description: i == null ? void 0 : i.description
2140
+ }, void 0, !0)
2141
+ ]),
2142
+ _: 2
2143
+ }, 1032, ["onClick"]))), 128))
2144
+ ]),
2145
+ _: 3
2146
+ }, 8, ["direction", "active", "simple", "align-center"]),
2147
+ (_ = l.stepConfig) != null && _.allowTrigger && ((t = l.stepConfig) != null && t.active) ? (U(!0), R(le, { key: 0 }, re(b(), (i, o) => (U(), R("div", {
2148
+ key: o,
2149
+ class: "step-cont-wrap"
2150
+ }, [
2151
+ (U(), ae(Ue(d(i == null ? void 0 : i.type)), {
2152
+ modelValue: i.value,
2153
+ "onUpdate:modelValue": (h) => i.value = h,
2154
+ onClickTrigger: m,
2155
+ onChangeTrigger: y,
2156
+ content: i == null ? void 0 : i.content
2157
+ }, El({ _: 2 }, [
2158
+ re(A.$slots, (h, x) => ({
2159
+ name: x,
2160
+ fn: K((T) => [
2161
+ Oe(A.$slots, x, wl({ ref_for: !0 }, T || {}), void 0, !0)
2162
+ ])
2163
+ }))
2164
+ ]), 1064, ["modelValue", "onUpdate:modelValue", "content"]))
2165
+ ]))), 128)) : $e("", !0)
2166
+ ], 64);
2167
+ };
2168
+ }
2169
+ }), xn = /* @__PURE__ */ te(An, [["__scopeId", "data-v-003d9390"]]), In = /* @__PURE__ */ ge({
2170
+ __name: "index",
2171
+ props: {
2172
+ itemData: {
2173
+ type: Array,
2174
+ default: () => []
2175
+ },
2176
+ childItemData: {
2177
+ type: Array,
2178
+ default: () => []
2179
+ }
2180
+ },
2181
+ emits: ["clickStep"],
2182
+ setup(l, { emit: s }) {
2183
+ const a = l, e = s, n = L({}), r = L([]), c = (d, b) => {
2184
+ e("clickStep", d, b);
2185
+ };
2186
+ return pe(() => a == null ? void 0 : a.itemData, (d) => {
2187
+ var b, m;
2188
+ r.value = (b = d == null ? void 0 : d.find((y) => (y == null ? void 0 : y.key) === "stepList")) == null ? void 0 : b.contents, n.value = (m = d == null ? void 0 : d.find((y) => (y == null ? void 0 : y.key) === "stepConfig")) == null ? void 0 : m.contents;
2189
+ }, {
2190
+ immediate: !0
2191
+ }), (d, b) => {
2192
+ const m = de("svg-icon");
2193
+ return U(), ae(xn, {
2194
+ stepConfig: n.value,
2195
+ stepList: r.value,
2196
+ onClickStep: c
2197
+ }, {
2198
+ icon: K(() => [
2199
+ H(m, { name: "import" })
2200
+ ]),
2201
+ title: K(({ title: y }) => [
2202
+ ke(P(y), 1)
2203
+ ]),
2204
+ description: K(({ description: y }) => [
2205
+ ke(P(y), 1)
2206
+ ]),
2207
+ _: 1
2208
+ }, 8, ["stepConfig", "stepList"]);
2209
+ };
2210
+ }
2211
+ }), Tn = /* @__PURE__ */ ge({
2212
+ __name: "index",
2213
+ props: {
2214
+ activities: {
2215
+ type: Array,
2216
+ default: () => []
2217
+ },
2218
+ timeLineConfig: {
2219
+ type: Object,
2220
+ default: () => {
2221
+ }
2222
+ }
2223
+ },
2224
+ setup(l) {
2225
+ return (s, a) => {
2226
+ const e = de("el-timeline-item"), n = de("el-timeline");
2227
+ return U(), ae(n, null, {
2228
+ default: K(() => [
2229
+ (U(!0), R(le, null, re(l.activities, (r, c) => (U(), ae(e, {
2230
+ key: c,
2231
+ timestamp: r.timestamp,
2232
+ placement: l.timeLineConfig.placement,
2233
+ center: l.timeLineConfig.isCenter,
2234
+ "hide-timestamp": !0,
2235
+ type: l.timeLineConfig.type,
2236
+ color: l.timeLineConfig.color,
2237
+ size: l.timeLineConfig.size,
2238
+ icon: l.timeLineConfig.icon,
2239
+ hollow: l.timeLineConfig.isHollow
2240
+ }, {
2241
+ default: K(() => [
2242
+ Oe(s.$slots, "content", {
2243
+ content: r == null ? void 0 : r.content,
2244
+ timestamp: r == null ? void 0 : r.timestamp
2245
+ }, void 0, !0)
2246
+ ]),
2247
+ _: 2
2248
+ }, 1032, ["timestamp", "placement", "center", "type", "color", "size", "icon", "hollow"]))), 128))
2249
+ ]),
2250
+ _: 3
2251
+ });
2252
+ };
2253
+ }
2254
+ }), On = /* @__PURE__ */ te(Tn, [["__scopeId", "data-v-4172a886"]]), En = { class: "line-content" }, wn = { class: "line-time" }, Dn = /* @__PURE__ */ ge({
2255
+ __name: "index",
2256
+ props: {
2257
+ itemData: {
2258
+ type: Array,
2259
+ default: () => []
2260
+ }
2261
+ },
2262
+ setup(l) {
2263
+ const s = l, a = L({}), e = L([]);
2264
+ return pe(() => s == null ? void 0 : s.itemData, (n) => {
2265
+ var r, c;
2266
+ e.value = (r = n == null ? void 0 : n.find((d) => (d == null ? void 0 : d.key) === "timeLineList")) == null ? void 0 : r.contents, a.value = (c = n == null ? void 0 : n.find((d) => (d == null ? void 0 : d.key) === "timeLineConfig")) == null ? void 0 : c.contents;
2267
+ }, {
2268
+ immediate: !0
2269
+ }), (n, r) => (U(), ae(On, {
2270
+ activities: e.value,
2271
+ timeLineConfig: a.value
2272
+ }, {
2273
+ content: K(({ content: c, timestamp: d }) => [
2274
+ N("span", En, P(c), 1),
2275
+ N("span", wn, P(d), 1)
2276
+ ]),
2277
+ _: 1
2278
+ }, 8, ["activities", "timeLineConfig"]));
2279
+ }
2280
+ }), Nn = /* @__PURE__ */ te(Dn, [["__scopeId", "data-v-b4d9deed"]]), Fs = L([
2281
+ {
2282
+ name: "表格",
2283
+ type: "table",
2284
+ comp: "Table",
2285
+ icon: "Table"
2286
+ },
2287
+ {
2288
+ name: "表单",
2289
+ type: "form",
2290
+ comp: "Form",
2291
+ icon: "Form"
2292
+ },
2293
+ {
2294
+ name: "折叠",
2295
+ type: "fold",
2296
+ comp: "Fold",
2297
+ icon: "Fold"
2298
+ },
2299
+ {
2300
+ name: "头像",
2301
+ type: "avatar",
2302
+ comp: "AvatarUpload",
2303
+ icon: "Avatar"
2304
+ },
2305
+ {
2306
+ name: "签名",
2307
+ type: "signature",
2308
+ comp: "Signature",
2309
+ icon: "Signature"
2310
+ },
2311
+ {
2312
+ name: "步骤条",
2313
+ type: "step",
2314
+ comp: "Step",
2315
+ icon: "Step"
2316
+ },
2317
+ {
2318
+ name: "时间线",
2319
+ type: "timeLine",
2320
+ comp: "TimeLine",
2321
+ icon: "TimeLine"
2322
+ }
2323
+ ]), Sn = {
2324
+ TABLE: Tl,
2325
+ FORM: Ge,
2326
+ TABLEOPERATE: Da,
2327
+ FORMOPERATE: Me,
2328
+ FOLD: Bl,
2329
+ CALCULATOR: fn,
2330
+ METHODBUTTON: bn,
2331
+ AVATARUPLOAD: Ul,
2332
+ SIGNATURE: jl,
2333
+ FORMTOP: Ge,
2334
+ STEP: In,
2335
+ STEPOPERATE: ln,
2336
+ TIMELINE: Nn,
2337
+ TIMELINEOPERATE: tn,
2338
+ FORMTOPOPERATE: Me,
2339
+ SIGNATUREOPERATE: $n,
2340
+ AVATARUPLOADOPERATE: vn
2341
+ // 添加其他组件...
2342
+ };
2343
+ function Fn(l) {
2344
+ return Sn[l == null ? void 0 : l.toUpperCase()] || null;
2345
+ }
2346
+ const M = [
2347
+ {
2348
+ key: "FormName",
2349
+ value: "Form"
2350
+ },
2351
+ {
2352
+ key: "TableName",
2353
+ value: "Table"
2354
+ },
2355
+ {
2356
+ key: "MenuName",
2357
+ value: "Menu"
2358
+ },
2359
+ {
2360
+ key: "GroupName",
2361
+ value: "Group"
2362
+ },
2363
+ {
2364
+ key: "SystemKey",
2365
+ value: "System"
2366
+ }
2367
+ ], G = [
2368
+ {
2369
+ key: "FormDirect",
2370
+ value: "formFlex"
2371
+ },
2372
+ {
2373
+ key: "Form",
2374
+ value: "formContent"
2375
+ },
2376
+ {
2377
+ key: "FormButton",
2378
+ value: "formButton"
2379
+ },
2380
+ {
2381
+ key: "FormFlex",
2382
+ value: "formWrap"
2383
+ },
2384
+ {
2385
+ key: "TableColumns",
2386
+ value: "header"
2387
+ },
2388
+ {
2389
+ key: "TableButton",
2390
+ value: "extraButton"
2391
+ },
2392
+ {
2393
+ key: "TableLineButton",
2394
+ value: "rowButton"
2395
+ },
2396
+ {
2397
+ key: "Table",
2398
+ value: "tableContents"
2399
+ },
2400
+ {
2401
+ key: "TableIndex",
2402
+ value: "tableIndex"
2403
+ },
2404
+ {
2405
+ key: "Menus",
2406
+ value: "menuContents"
2407
+ },
2408
+ {
2409
+ key: "GroupContents",
2410
+ value: "groupContents"
2411
+ }
2412
+ ], be = L(0), Bn = (l) => {
2413
+ const [s, a] = l.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), n = a.replace(/^['"]|['"]$/g, "");
2414
+ return { key: e, value: n };
2415
+ }, Ee = (l) => {
2416
+ try {
2417
+ return JSON.parse(l), !0;
2418
+ } catch {
2419
+ return !1;
2420
+ }
2421
+ }, Ln = (l) => l.includes("$") && l.trim().endsWith("(") ? l + ")" : l, jn = (l) => {
2422
+ let s = l;
2423
+ const a = [];
2424
+ let e = "";
2425
+ for (const n of s)
2426
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e += n.trim(), p(e).split("{").length - 1 === p(e).split("}").length - 1 && p(e).split("【").length - 1 === p(e).split("】").length - 1 && p(e).split("[").length - 1 === p(e).split("]").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("/*").length - 1 === p(e).split("*/").length - 1 && (a.push(e), e = "")) : a.push(n.trim());
2427
+ return a == null ? void 0 : a.filter((n) => n.includes("{"));
2428
+ }, Un = (l) => {
2429
+ var a;
2430
+ let s = [];
2431
+ return (a = jn(l.slice(1, -1))) == null || a.forEach((e) => {
2432
+ var r, c, d, b;
2433
+ let n = ((c = (r = e.slice(1, -1)) == null ? void 0 : r.split(",")) == null ? void 0 : c.length) ?? 1;
2434
+ (b = (d = e.slice(1, -1)) == null ? void 0 : d.split(",")) == null || b.forEach((m) => {
2435
+ var w, v, j, g, k, _, t, i, o, h, x, T, F;
2436
+ let y = m == null ? void 0 : m.split(":"), A = y != null && y[0] ? (y == null ? void 0 : y[1].split("$").length) - 1 === 1 ? ((w = y == null ? void 0 : y[0]) == null ? void 0 : w.replace(/^"(.*)"$/, "$1")) + ((v = y == null ? void 0 : y[1]) == null ? void 0 : v.replace(/^"(.*)"$/, "$1")) : Array.isArray((g = (j = y == null ? void 0 : y[1]) == null ? void 0 : j.replace(/^"(.*)"$/, "$1")) == null ? void 0 : g.split("(")) && ((t = (_ = (k = y == null ? void 0 : y[1]) == null ? void 0 : k.replace(/^"(.*)"$/, "$1")) == null ? void 0 : _.split("(")) == null ? void 0 : t.length) > 1 ? ((i = y == null ? void 0 : y[0]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) + ((x = (h = (o = y == null ? void 0 : y[1]) == null ? void 0 : o.replace(/^"(.*)"$/, "$1")) == null ? void 0 : h.split("(")) == null ? void 0 : x[0]) + "()" : (T = y == null ? void 0 : y[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1") : "", C = (y == null ? void 0 : y[1].split("$").length) - 1 === 0 ? (F = y == null ? void 0 : y[1]) == null ? void 0 : F.replace(/^"(.*)"$/, "$1") : "";
2437
+ be.value++, s.push({
2438
+ id: be.value,
2439
+ key: A,
2440
+ value: C,
2441
+ // 如果值为空,则key设为空字符串,否则保留原值
2442
+ width: n,
2443
+ extraContent: y == null ? void 0 : y[1]
2444
+ });
2445
+ });
2446
+ }), s;
2447
+ }, cl = (l) => {
2448
+ var s, a;
2449
+ try {
2450
+ const e = l.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
2451
+ if (p(e).split("{").length - 1 > 1) {
2452
+ let n = p(e).replace(/^\{(.*)\}$/, "[$1]");
2453
+ if (Ee(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Ee(n)) {
2454
+ const r = JSON.parse(n);
2455
+ let c = [];
2456
+ return r == null || r.forEach((d) => {
2457
+ var b;
2458
+ (b = Object.entries(p(d))) == null || b.forEach((m) => {
2459
+ be.value++, c.push({
2460
+ id: be.value,
2461
+ key: (m == null ? void 0 : m[0]) ?? "",
2462
+ value: (m == null ? void 0 : m[1]) === "" ? "" : m == null ? void 0 : m[1],
2463
+ // 如果值为空,则key设为空字符串,否则保留原值
2464
+ width: Object.keys(p(d)).length
2465
+ });
2466
+ });
2467
+ }), c;
2468
+ } else
2469
+ return e.trim().startsWith("{{") ? Un(e.trim()) : Be(n);
2470
+ } else if (Ee(e)) {
2471
+ const n = JSON.parse(e);
2472
+ return Object.entries(n).map(([r, c]) => (be.value++, {
2473
+ id: be.value,
2474
+ key: r,
2475
+ value: c === "" ? "" : c,
2476
+ // 如果值为空,则key设为空字符串,否则保留原值
2477
+ width: 1
2478
+ }));
2479
+ } else
2480
+ return ((s = Be(e)) == null ? void 0 : s.length) === 0 ? e : (a = Be(e)) == null ? void 0 : a.map((n) => ({
2481
+ label: n.label,
2482
+ method: Ln(n.method)
2483
+ }));
2484
+ } catch (e) {
2485
+ return console.error("转换失败:", e), [];
2486
+ }
2487
+ }, Be = (l) => {
2488
+ l = l.trim().replace(/^\{|\}$/g, "").trim();
2489
+ const s = [];
2490
+ let a = 0;
2491
+ for (; a < l.length; ) {
2492
+ const e = l.slice(a).match(/^\s*"([^"]+)"\s*:\s*/);
2493
+ if (!e) break;
2494
+ const n = e[1];
2495
+ a += e[0].length;
2496
+ let r = "", c = 0, d = !1, b = "";
2497
+ for (let m = a; m < l.length; m++) {
2498
+ const y = l[m];
2499
+ if ((y === '"' || y === "'") && !d ? (d = !0, b = y) : y === b && d && (d = !1, b = ""), !d && ((y === "{" || y === "(" || y === "[") && c++, (y === "}" || y === ")" || y === "]") && c--, y === "," && c === 0 || m === l.length - 1)) {
2500
+ r = l.slice(a, m + 1).trim(), a = m + 1;
2501
+ break;
2502
+ }
2503
+ }
2504
+ s.push({
2505
+ label: n,
2506
+ method: r
2507
+ });
2508
+ }
2509
+ return s;
2510
+ }, Jn = (l, s) => {
2511
+ try {
2512
+ if (M != null && M.find((a) => (a == null ? void 0 : a.key) === s))
2513
+ return l.replace(/['"]/g, "").trim();
2514
+ if (p(l).split("[").length - 1 > 1) {
2515
+ const a = p(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2516
+ return JSON.parse(a);
2517
+ } else {
2518
+ const a = p(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
2519
+ if (Ee(a)) {
2520
+ const e = JSON.parse(a);
2521
+ return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
2522
+ } else
2523
+ return cl(p(l));
2524
+ }
2525
+ } catch (a) {
2526
+ return console.error("解析失败:", a), l;
2527
+ }
2528
+ }, Pn = (l) => ({ [l == null ? void 0 : l.key]: Jn(l == null ? void 0 : l.value, l == null ? void 0 : l.key) }), Rn = (l) => {
2529
+ try {
2530
+ if (p(l).split("[").length - 1 > 1) {
2531
+ const s = p(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2532
+ return JSON.parse(s);
2533
+ } else
2534
+ return JSON.parse(p(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((a) => ({ label: a }));
2535
+ } catch (s) {
2536
+ return console.error("解析失败:", s), l;
2537
+ }
2538
+ }, Wn = (l) => {
2539
+ const s = l.match(/\(([^)]+)\)/);
2540
+ return s ? s[1] : "";
2541
+ }, Vn = (l) => {
2542
+ const s = l.match(/^([^(]+)\s*\(/);
2543
+ return s ? s[1].trim() : l;
2544
+ }, Ze = (l) => l.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((s) => s.trim()).filter((s) => s).join("/"), zn = (l) => {
2545
+ var c, d;
2546
+ let s = [], a = [];
2547
+ const e = (c = p(l)) == null ? void 0 : c.map((b) => b == null ? void 0 : b.key), n = [...new Set((d = p(e)) == null ? void 0 : d.map((b) => Wn(b)))];
2548
+ n == null || n.forEach((b) => {
2549
+ let m = l == null ? void 0 : l.filter((C) => C.key.includes(b));
2550
+ m == null || m.forEach((C) => {
2551
+ C != null && C.key.includes("Menus") && (s.push({
2552
+ key: "GroupName",
2553
+ value: Ze(C == null ? void 0 : C.value)
2554
+ }), a.push(Ze(C == null ? void 0 : C.value)));
2555
+ });
2556
+ let y = l == null ? void 0 : l.filter((C) => C.key.includes(b) && !(C != null && C.key.includes("Menus")));
2557
+ y = y == null ? void 0 : y.map((C) => (C.key = Vn(C.key), C));
2558
+ const A = {
2559
+ key: "GroupContents",
2560
+ value: y
2561
+ };
2562
+ s.push(A);
2563
+ });
2564
+ const r = {
2565
+ key: "Menus",
2566
+ value: a
2567
+ };
2568
+ return s.unshift(r), s;
2569
+ }, il = (l) => {
2570
+ var s, a;
2571
+ if (Array.isArray(Object.keys(l)) && ((s = Object.keys(l)) == null ? void 0 : s.length) > 0) {
2572
+ let e = [];
2573
+ return (a = Object.entries(l)) == null || a.forEach(([n, r]) => {
2574
+ var d, b;
2575
+ let c = [];
2576
+ if (c.push(n), ((d = Object.keys(r)) == null ? void 0 : d.length) > 0) {
2577
+ let m = [];
2578
+ (b = il(r)) == null || b.forEach((y) => {
2579
+ m.push(y);
2580
+ }), m == null || m.forEach((y) => {
2581
+ c.push(y);
2582
+ });
2583
+ }
2584
+ e.push(c);
2585
+ }), e;
2586
+ }
2587
+ }, Gn = (l, s) => {
2588
+ var e;
2589
+ let a = s;
2590
+ return Array.isArray(Object.keys(l)) && ((e = Object.entries(l)) == null || e.forEach(([n, r]) => {
2591
+ let c = [n];
2592
+ if (typeof r == "object" && r !== null) {
2593
+ let d = il(r);
2594
+ d == null || d.forEach((b) => {
2595
+ c.push(b);
2596
+ });
2597
+ }
2598
+ a.push(c);
2599
+ })), a;
2600
+ }, Mn = (l) => {
2601
+ const s = {};
2602
+ return l.forEach((e) => {
2603
+ const n = e.split("/");
2604
+ let r = s;
2605
+ n.forEach((c) => {
2606
+ r[c] || (r[c] = {}), r = r[c];
2607
+ });
2608
+ }), Gn(s, []);
2609
+ }, ul = (l) => Mn(l), Bs = (l) => {
2610
+ var s, a, e, n, r, c, d, b;
2611
+ try {
2612
+ const m = We((a = (s = p(l)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")")), y = (n = (e = p(m)) == null ? void 0 : e.filter((v) => !v.includes("/*"))) == null ? void 0 : n.map((v) => Bn(v)), A = zn(y), C = [];
2613
+ if (((r = A == null ? void 0 : A.find((v) => (v == null ? void 0 : v.key) === "Menus")) == null ? void 0 : r.value.length) === 0)
2614
+ return !1;
2615
+ (c = p(A)) == null || c.forEach((v) => {
2616
+ var j, g, k, _, t;
2617
+ M != null && M.find((i) => {
2618
+ var o, h;
2619
+ return ((o = i == null ? void 0 : i.key) == null ? void 0 : o.toUpperCase()) === ((h = v == null ? void 0 : v.key) == null ? void 0 : h.toUpperCase());
2620
+ }) ? C.push({
2621
+ comp: ((j = M == null ? void 0 : M.find((i) => {
2622
+ var o, h;
2623
+ return ((o = i == null ? void 0 : i.key) == null ? void 0 : o.toUpperCase()) === ((h = v == null ? void 0 : v.key) == null ? void 0 : h.toUpperCase());
2624
+ })) == null ? void 0 : j.value) ?? "",
2625
+ name: (g = v == null ? void 0 : v.value) == null ? void 0 : g.replace(/[’]|[‘]|[']/g, ""),
2626
+ compData: []
2627
+ }) : G != null && G.find((i) => {
2628
+ var o, h;
2629
+ return ((o = i == null ? void 0 : i.key) == null ? void 0 : o.toUpperCase()) === ((h = v == null ? void 0 : v.key) == null ? void 0 : h.toUpperCase());
2630
+ }) && ((C == null ? void 0 : C.length) === 0 && (k = v.key) != null && k.includes("Menus") && C.push({
2631
+ comp: "Menu",
2632
+ name: "",
2633
+ compData: []
2634
+ }), (_ = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && _.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
2635
+ key: (t = G == null ? void 0 : G.find((i) => {
2636
+ var o, h;
2637
+ return ((o = i == null ? void 0 : i.key) == null ? void 0 : o.toUpperCase()) === ((h = v == null ? void 0 : v.key) == null ? void 0 : h.toUpperCase());
2638
+ })) == null ? void 0 : t.value,
2639
+ contents: v == null ? void 0 : v.value
2640
+ }));
2641
+ });
2642
+ let w = (d = p(C)) == null ? void 0 : d.map((v) => {
2643
+ var j;
2644
+ return v != null && v.compData && (v.compData = (j = v == null ? void 0 : v.compData) == null ? void 0 : j.map((g) => {
2645
+ var k, _, t, i, o, h, x, T, F, f, E;
2646
+ if ((g == null ? void 0 : g.key) === "formFlex")
2647
+ g.contents = ((_ = (k = g.contents) == null ? void 0 : k.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : _.toUpperCase()) !== "Vertical".toUpperCase();
2648
+ else if ((g == null ? void 0 : g.key) === "groupContents")
2649
+ g.contents = (t = p(g.contents)) == null ? void 0 : t.map((O) => Pn(p(O)));
2650
+ else if (Array.isArray(g == null ? void 0 : g.contents))
2651
+ g.contents = ul(g.contents);
2652
+ else if (((o = (i = g == null ? void 0 : g.contents) == null ? void 0 : i.trim()) != null && o.startsWith("[") || (x = (h = g.contents) == null ? void 0 : h.trim()) != null && x.startsWith("【")) && ((F = (T = g.contents) == null ? void 0 : T.trim()) != null && F.endsWith("]") || (E = (f = g.contents) == null ? void 0 : f.trim()) != null && E.endsWith("】")))
2653
+ g.contents = Rn(p(g.contents));
2654
+ else {
2655
+ if (!g.contents) return;
2656
+ g.contents = cl(p(g.contents));
2657
+ }
2658
+ return g;
2659
+ })), v;
2660
+ });
2661
+ return w = (b = p(w)) == null ? void 0 : b.map((v) => {
2662
+ var j;
2663
+ return (v == null ? void 0 : v.comp) === "Group" && (v.compData = (j = v.compData) == null ? void 0 : j.map((g) => {
2664
+ var _;
2665
+ let k = [];
2666
+ return (_ = g.contents) == null || _.forEach((t) => {
2667
+ var i, o, h, x, T, F, f, E, O, u, D, $;
2668
+ if (M != null && M.find((S) => {
2669
+ var I, J, B;
2670
+ return ((I = S == null ? void 0 : S.key) == null ? void 0 : I.toUpperCase()) === ((B = (J = Object.keys(t)) == null ? void 0 : J[0]) == null ? void 0 : B.toUpperCase());
2671
+ }))
2672
+ k.push({
2673
+ comp: (i = M == null ? void 0 : M.find((S) => {
2674
+ var I, J, B;
2675
+ return ((I = S == null ? void 0 : S.key) == null ? void 0 : I.toUpperCase()) === ((B = (J = Object.keys(t)) == null ? void 0 : J[0]) == null ? void 0 : B.toUpperCase());
2676
+ })) == null ? void 0 : i.value,
2677
+ name: (h = (o = Object.values(t)) == null ? void 0 : o[0]) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
2678
+ compData: []
2679
+ });
2680
+ else if (G != null && G.find((S) => {
2681
+ var I, J, B;
2682
+ return ((I = S == null ? void 0 : S.key) == null ? void 0 : I.toUpperCase()) === ((B = (J = Object.keys(t)) == null ? void 0 : J[0]) == null ? void 0 : B.toUpperCase());
2683
+ })) {
2684
+ if ((k == null ? void 0 : k.length) === 0) return;
2685
+ (x = k == null ? void 0 : k[(k == null ? void 0 : k.length) - 1]) != null && x.compData && k[(k == null ? void 0 : k.length) - 1].compData.push({
2686
+ key: (T = G == null ? void 0 : G.find((S) => {
2687
+ var I, J, B;
2688
+ return ((I = S == null ? void 0 : S.key) == null ? void 0 : I.toUpperCase()) === ((B = (J = Object.keys(t)) == null ? void 0 : J[0]) == null ? void 0 : B.toUpperCase());
2689
+ })) == null ? void 0 : T.value,
2690
+ contents: (F = Object.values(t)) == null ? void 0 : F[0]
2691
+ });
2692
+ } else if ((E = (f = Object.keys(t)) == null ? void 0 : f[0]) != null && E.includes("$")) {
2693
+ const S = (u = (O = Object.keys(p(t))) == null ? void 0 : O[0]) == null ? void 0 : u.split("$");
2694
+ k[(k == null ? void 0 : k.length) - 1].compData.push({
2695
+ key: (D = G == null ? void 0 : G.find((I) => {
2696
+ var J, B;
2697
+ return ((J = I == null ? void 0 : I.key) == null ? void 0 : J.toUpperCase()) === ((B = S == null ? void 0 : S[0]) == null ? void 0 : B.toUpperCase());
2698
+ })) == null ? void 0 : D.value,
2699
+ contents: ($ = Object.values(t)) == null ? void 0 : $[0],
2700
+ selectLabel: S == null ? void 0 : S[1]
2701
+ });
2702
+ }
2703
+ return t;
2704
+ }), g.contents = k, g;
2705
+ })), v;
2706
+ }), w;
2707
+ } catch {
2708
+ return !1;
2709
+ }
2710
+ }, Ke = L(0), pl = (l) => {
2711
+ const s = [];
2712
+ let a = null;
2713
+ for (let e = 0; e < l.length; e++) {
2714
+ const n = l[e];
2715
+ if (Array.isArray(n))
2716
+ a && (a.children = pl(n));
2717
+ else {
2718
+ const r = { label: n };
2719
+ s.push(r), a = r;
2720
+ }
2721
+ }
2722
+ return s;
2723
+ }, dl = (l) => {
2724
+ let s = 0;
2725
+ for (const a of l)
2726
+ s++, a.children && (s += dl(a.children));
2727
+ return s;
2728
+ }, fl = (l, s, a = []) => {
2729
+ let e = 0;
2730
+ for (const n of s) {
2731
+ if (e >= l.length) break;
2732
+ const r = [...l[e]];
2733
+ if (a.push(r), e++, n.children && n.children.length > 0) {
2734
+ const c = [];
2735
+ fl(
2736
+ l.slice(e),
2737
+ n.children,
2738
+ c
2739
+ ), c.length > 0 && (r.push(c), e += dl(n.children));
2740
+ }
2741
+ }
2742
+ return a;
2743
+ }, Zn = (l, s) => {
2744
+ let a = [];
2745
+ return l == null || l.forEach((n) => {
2746
+ n.some((r) => Array.isArray(r)) ? a.push(...n) : a.push(n);
2747
+ }), fl(a, s);
2748
+ }, Je = (l) => {
2749
+ const s = { label: l[0].trim() };
2750
+ if (l.length > 1) {
2751
+ const a = l.slice(1);
2752
+ a.length === 1 && Array.isArray(a[0]) ? s.children = a[0].map(
2753
+ (e) => Array.isArray(e) ? Je(e) : { label: e.trim() }
2754
+ ) : s.children = a.map(
2755
+ (e) => Array.isArray(e) ? Je(e) : { label: e.trim() }
2756
+ );
2757
+ }
2758
+ return s;
2759
+ }, He = (l) => {
2760
+ let s = l.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
2761
+ return s = s.replace(/:}(?=,|]|}|$)/g, ':""}'), s = s.replace(/:,(?=\s*")/g, ':"",'), s = s.replace(
2762
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
2763
+ (a, e, n) => `"${e}://${n}"`
2764
+ ), s = s.replace(
2765
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
2766
+ '$1"$2"$3'
2767
+ ), s;
2768
+ }, Kn = (l) => {
2769
+ var a;
2770
+ return l.some((e) => !Array.isArray(e)) ? l : (a = p(l)) == null ? void 0 : a.map((e) => {
2771
+ let n = [];
2772
+ return e.some((r) => Array.isArray(r)) ? e == null || e.forEach((r) => {
2773
+ Array.isArray(r) && n.push(Je(r));
2774
+ }) : e.some((r) => r.includes("[")) ? n.push(e) : n = e.map((r) => ({ label: r.trim() })), n;
2775
+ });
2776
+ }, hl = (l, s, a) => {
2777
+ let e = l, n = a, r = s;
2778
+ return r.children && (Array.isArray(n[n.length - 1]) ? n[n.length - 1].push(e[0]) : n.push(e[0]), e.shift(), r = r.children), Array.isArray(r) && r.forEach((c) => {
2779
+ if (c.children) {
2780
+ const d = hl(e, c, n);
2781
+ n = d[0], e = d[1];
2782
+ }
2783
+ }), [n, e];
2784
+ }, Hn = (l, s) => {
2785
+ let a = l, e = [];
2786
+ return s.length > 0 ? s == null || s.forEach((n) => {
2787
+ let r = a == null ? void 0 : a[0];
2788
+ a.shift();
2789
+ const c = hl(p(a), n, r);
2790
+ r = c[0], a = c[1], e.push(r);
2791
+ }) : e = a, e;
2792
+ }, Re = (l, s) => {
2793
+ const a = Kn(p(l));
2794
+ return Hn(a, s);
2795
+ }, qn = (l) => {
2796
+ const s = [];
2797
+ let a = 0;
2798
+ const e = l.length;
2799
+ for (; a < e; ) {
2800
+ const n = l[a];
2801
+ n.key === "tableColumns" && a + 1 < e && l[a + 1].key === "tableContents" ? (s.push({
2802
+ comp: "Table",
2803
+ compData: [n, l[a + 1]],
2804
+ name: ""
2805
+ }), a += 2) : (s.push(n), a += 1);
2806
+ }
2807
+ return s;
2808
+ }, yl = (l) => Re([l], []), Ne = (l) => {
2809
+ const s = [];
2810
+ return l == null || l.forEach((a) => a == null ? void 0 : a.forEach((n) => {
2811
+ var r, c;
2812
+ Ke.value++, s.push({
2813
+ id: Ke.value,
2814
+ key: (r = Object.keys(n)) == null ? void 0 : r[0],
2815
+ value: (c = Object.values(n)) == null ? void 0 : c[0],
2816
+ // 如果值为空,则key设为空字符串,否则保留原值
2817
+ width: a.length
2818
+ });
2819
+ })), s;
2820
+ }, qe = (l) => {
2821
+ let s = qn(l);
2822
+ return s = s == null ? void 0 : s.map((a) => {
2823
+ var e, n, r, c;
2824
+ if (a.comp === "Table")
2825
+ (e = a.compData) != null && e.find((d) => (d == null ? void 0 : d.key) === "header") || (a.compData = (n = a.compData) == null ? void 0 : n.map((d) => (d.key === "tableColumns" ? d = {
2826
+ key: "header",
2827
+ contents: Re(d.value, [])
2828
+ } : d = {
2829
+ key: d.key,
2830
+ contents: d.value
2831
+ }, d)), a.compData.push({
2832
+ key: "extraButton",
2833
+ contents: [{ label: "新增" }]
2834
+ }), a.compData.push({
2835
+ key: "rowButton",
2836
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2837
+ }));
2838
+ else if (a.key === "form") {
2839
+ const d = (r = a == null ? void 0 : a.value) == null ? void 0 : r.map((b) => (Array.isArray(b) || (b = [b]), b));
2840
+ a = {
2841
+ comp: "Form",
2842
+ compData: [
2843
+ {
2844
+ key: "formFlex",
2845
+ contents: ""
2846
+ },
2847
+ {
2848
+ key: "formContent",
2849
+ contents: Ne(d)
2850
+ }
2851
+ ],
2852
+ name: ""
2853
+ };
2854
+ } else if (a.key === "formTop") {
2855
+ const d = (c = a == null ? void 0 : a.value) == null ? void 0 : c.map((b) => (Array.isArray(b) || (b = [b]), b));
2856
+ a = {
2857
+ comp: "FormTop",
2858
+ compData: [
2859
+ {
2860
+ key: "formFlex",
2861
+ contents: ""
2862
+ },
2863
+ {
2864
+ key: "formContent",
2865
+ contents: Ne(d)
2866
+ },
2867
+ {
2868
+ key: "enableWrap",
2869
+ contents: !0
2870
+ },
2871
+ {
2872
+ key: "formButton",
2873
+ contents: [{
2874
+ label: "查询"
2875
+ }, {
2876
+ label: "重置"
2877
+ }]
2878
+ }
2879
+ ],
2880
+ name: ""
2881
+ };
2882
+ }
2883
+ return a;
2884
+ }), s;
2885
+ }, Qn = (l, s) => {
2886
+ var d, b, m, y, A, C;
2887
+ const a = [], e = pl((b = (d = l == null ? void 0 : l.find((w) => w.key === "tableIndex")) == null ? void 0 : d.value) == null ? void 0 : b[0]);
2888
+ a.push({
2889
+ key: "tableIndexColumn",
2890
+ contents: s
2891
+ }), a.push({
2892
+ key: "tableIndex",
2893
+ contents: e
2894
+ });
2895
+ let n = [];
2896
+ const r = (m = l == null ? void 0 : l.find((w) => w.key === "tableColumns")) == null ? void 0 : m.value;
2897
+ r.length === 1 && !(r != null && r[0].some((w) => Array.isArray(w))) ? n = (y = r == null ? void 0 : r[0]) == null ? void 0 : y.map((w) => ({ label: w })) : n = Re((A = l == null ? void 0 : l.find((w) => w.key === "tableColumns")) == null ? void 0 : A.value, e), a.push({
2898
+ key: "header",
2899
+ contents: n
2900
+ });
2901
+ const c = Zn((C = l == null ? void 0 : l.find((w) => w.key === "tableContents")) == null ? void 0 : C.value, e);
2902
+ return a.push({
2903
+ key: "tableContents",
2904
+ contents: c
2905
+ }), a.push({
2906
+ key: "extraButton",
2907
+ contents: [{ label: "新增" }]
2908
+ }), a.push({
2909
+ key: "rowButton",
2910
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2911
+ }), a;
2912
+ }, ml = (l) => l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (s, a, e) => {
2913
+ const n = ml(e);
2914
+ return `"${a}",${n}`;
2915
+ }), Ie = (l) => {
2916
+ const s = l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
2917
+ return ml(s).replace(/^"(.*)"$/, "$1");
2918
+ }, Xn = (l) => {
2919
+ const s = /* @__PURE__ */ new Set();
2920
+ return l.filter((a) => {
2921
+ const e = JSON.stringify(a);
2922
+ return s.has(e) ? !1 : s.add(e);
2923
+ });
2924
+ }, Qe = (l) => {
2925
+ var a;
2926
+ let s = [];
2927
+ return (a = p(l)) == null || a.forEach((e) => {
2928
+ var n;
2929
+ (n = e.contents) == null || n.forEach((r) => {
2930
+ s.push(r);
2931
+ });
2932
+ }), s = Xn(s), s.push({
2933
+ label: "操作"
2934
+ }), [s];
2935
+ }, Yn = (l, s) => l.reduce((a, e, n) => {
2936
+ const r = Math.floor(n / s);
2937
+ return a[r] || (a[r] = []), a[r].push(e), a;
2938
+ }, []), bl = (l) => l.reduce((s, a) => a.children && a.children.length > 0 ? s + bl(a.children) : s + 1, 0), es = (l, s) => {
2939
+ var e;
2940
+ let a = [];
2941
+ return (e = Yn(l, bl(s == null ? void 0 : s[0]) - 1)) == null || e.forEach((n) => {
2942
+ let r = [];
2943
+ n.forEach((c) => {
2944
+ var d;
2945
+ Array.isArray(c.contents) ? (d = c.contents) == null || d.forEach((b) => {
2946
+ r.push(b);
2947
+ }) : r.push(c.contents);
2948
+ }), a.push(r);
2949
+ }), [a];
2950
+ }, ls = ["方法体", "输入", "输出"], Xe = L(1), We = (l) => {
2951
+ let s;
2952
+ l.replaceAll(" ", `\r
2953
+ `).includes(`\r
2954
+ `) ? s = l.replaceAll(" ", `\r
2955
+ `).split(`\r
2956
+ `).filter((n) => n.trim() !== "") : s = l.replaceAll(" ", `\r
2957
+ `).split(`
2958
+ `).filter((n) => n.trim() !== "");
2959
+ const a = [];
2960
+ let e = "";
2961
+ for (const n of s)
2962
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e += n.trim(), p(e).split("{").length - 1 === p(e).split("}").length - 1 && p(e).split("【").length - 1 === p(e).split("】").length - 1 && p(e).split("[").length - 1 === p(e).split("]").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("/*").length - 1 === p(e).split("*/").length - 1 && e[e.length - 1] !== "," && (a.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : a.push(n.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
2963
+ return a;
2964
+ }, as = (l) => {
2965
+ const [s, a] = l.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), n = a.replace(/^['"]|['"]$/g, "");
2966
+ return { key: e, value: n };
2967
+ }, Fe = (l) => {
2968
+ let s;
2969
+ l != null && l.includes(":") ? s = l.split(":").filter((n) => n.trim() !== "") : s = l == null ? void 0 : l.split(":").filter((n) => n.trim() !== "");
2970
+ const a = [];
2971
+ let e = "";
2972
+ for (const n of s)
2973
+ n.includes("{") || e.includes("{") || n.includes("[") || e.includes("[") || n.includes("【") || e.includes("【") || n.includes("(") || e.includes("(") || n.includes("(") || e.includes("(") || n.includes("/*") || e.includes("/*") ? (e = e !== "" ? e + ":" + n.trim() : n.trim(), p(e).split("{").length - 1 === p(e).split("}").length - 1 && p(e).split("【").length - 1 === p(e).split("】").length - 1 && p(e).split("[").length - 1 === p(e).split("]").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("(").length - 1 === p(e).split(")").length - 1 && p(e).split("/*").length - 1 === p(e).split("*/").length - 1 && (a.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : a.push(n.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
2974
+ return a;
2975
+ }, ns = (l) => /^[\x00-\x7F]*$/.test(l), ss = (l) => {
2976
+ var n, r;
2977
+ const s = (n = l.map((c) => {
2978
+ var b, m;
2979
+ let d = (m = (b = c.key.split("(")) == null ? void 0 : b[1]) == null ? void 0 : m.trim();
2980
+ return d == null ? void 0 : d.slice(0, d.length - 1);
2981
+ })) == null ? void 0 : n.filter((c) => c), a = s == null ? void 0 : s.map((c) => {
2982
+ var b;
2983
+ return (b = Fe(c)) == null ? void 0 : b.map((m) => {
2984
+ var y;
2985
+ if (m.includes("{")) {
2986
+ let A = (y = m.split(":")) == null ? void 0 : y[0];
2987
+ m = A.slice(1, A.length);
2988
+ }
2989
+ return m;
2990
+ });
2991
+ }).filter((c) => c.length !== 0), e = (r = a == null ? void 0 : a.filter((c) => c.length !== 0)) == null ? void 0 : r.map((c) => {
2992
+ let d = "";
2993
+ return c.forEach((b) => {
2994
+ b.includes("{") || (d = d === "" ? d + p(b) : d + "/" + p(b));
2995
+ }), d;
2996
+ });
2997
+ return ul([...new Set(e)]);
2998
+ }, kl = (l) => {
2999
+ var a, e, n, r, c, d, b, m;
3000
+ const s = (e = (a = l.split("(")) == null ? void 0 : a[1]) == null ? void 0 : e.trim();
3001
+ return ((n = Fe(s.slice(0, s.length - 1))) == null ? void 0 : n.length) > 0 ? s.slice(0, s.length - 1) : (m = (b = (d = (c = (r = l.split("(")) == null ? void 0 : r[1]) == null ? void 0 : c.trim()) == null ? void 0 : d.split(")")) == null ? void 0 : b[0]) == null ? void 0 : m.trim();
3002
+ }, os = (l) => {
3003
+ var n;
3004
+ if (!l) return;
3005
+ const s = kl(l), a = (n = Fe(s)) == null ? void 0 : n.map((r) => {
3006
+ var c;
3007
+ if (r.includes("{")) {
3008
+ let d = (c = r.split(":")) == null ? void 0 : c[0];
3009
+ r = d.slice(1, d.length);
3010
+ }
3011
+ return r;
3012
+ });
3013
+ let e = "";
3014
+ return a.forEach((r) => {
3015
+ r.includes("{") || (e = e === "" ? e + p(r) : e + "/" + p(r));
3016
+ }), e;
3017
+ }, rs = (l) => {
3018
+ const s = l.match(/\[(.*)\]/s);
3019
+ if (s) {
3020
+ const a = `[${s[1]}]`;
3021
+ try {
3022
+ const e = a.replace(/([^\[\],\s]+)/g, '"$1"');
3023
+ return JSON.parse(e);
3024
+ } catch {
3025
+ return JSON.parse(a.replace(/\[(\s*)(,|])/g, '[""$2').replace(/([^\[\],\s]+)/g, '"$1"').replace(/""/g, '"'));
3026
+ }
3027
+ }
3028
+ }, ts = (l) => {
3029
+ var r;
3030
+ if (!l) return;
3031
+ const s = kl(l);
3032
+ let a = [], e = [], n = [];
3033
+ return (r = Fe(s)) == null || r.forEach((c) => {
3034
+ var d;
3035
+ c.includes("[") ? a.push(rs(c)) : c.includes("{") && (ns((d = c.slice(1, c.length - 1).split(":")) == null ? void 0 : d[0]) ? n.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : fe(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? e.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : c.includes("$"));
3036
+ }), [a, e, n];
3037
+ }, cs = (l) => {
3038
+ const s = [];
3039
+ let a = "";
3040
+ for (const e of l)
3041
+ e.includes("[") || a.includes("[") || e.includes("/*") || a.includes("/*") ? (a += e.trim(), p(a).split("{").length - 1 === p(a).split("}").length - 1 && p(a).split("【").length - 1 === p(a).split("】").length - 1 && p(a).split("[").length - 1 === p(a).split("]").length - 1 && p(a).split("(").length - 1 === p(a).split(")").length - 1 && p(a).split("(").length - 1 === p(a).split(")").length - 1 && p(a).split("/*").length - 1 === p(a).split("*/").length - 1 && (s.push(a.replace(/\/\*[\s\S]*?\*\//g, "")), a = "")) : s.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
3042
+ return s;
3043
+ }, Ye = (l) => {
3044
+ var c, d;
3045
+ const s = [], a = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, e = l.match(a);
3046
+ if (e) {
3047
+ const b = e[1] || e[3], m = e[2] || e[4];
3048
+ if (b && m) {
3049
+ const y = `${b}/${m}`;
3050
+ s.push(y);
3051
+ }
3052
+ }
3053
+ const n = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, r = l.match(n);
3054
+ return r ? s.push(r[0].replace(/\)+$/, "")) : (l == null ? void 0 : l.split(",").length) === 2 && s.push((d = (c = l == null ? void 0 : l.split(",")) == null ? void 0 : c[1]) == null ? void 0 : d.trim()), s;
3055
+ }, Le = (l) => {
3056
+ let s = l.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
3057
+ return s = s.replace(/\[\s*,/g, '[{"": ""},'), s = s.replace(/,\s*,/g, ', {"": ""},'), s = s.replace(/,\s*\]/g, ', {"": ""}]'), s = s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (a, e, n, r, c) => n.includes("'") ? `:${e}${n}${r}${c}` : `:${e}"${n}"${r}${c}`), s = s.replace(/:\s*([,\]}])/g, ': ""$1'), s;
3058
+ }, is = (l) => !/\[[^\]]*\{[^\]]*\]/.test(l), us = (l) => {
3059
+ const s = p(l).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), a = s ? `${s[2]}/${s[3]}` : null, e = l.match(/\[\{([^}]+)\}\]/), n = e == null ? void 0 : e[1].replaceAll(":", "").replaceAll("'", '"').trim();
3060
+ let r = null;
3061
+ if (n)
3062
+ try {
3063
+ r = JSON.parse(n);
3064
+ } catch (c) {
3065
+ console.error("解析数组失败:", c);
3066
+ }
3067
+ return [a, r];
3068
+ }, ps = (l) => {
3069
+ var d, b, m, y, A, C, w, v, j, g, k;
3070
+ let s = [], a = [], e = {}, n = [], r = l.trim(), c = [];
3071
+ if (r.trim().includes("输入") && r.trim().includes("输出")) {
3072
+ let _ = [], t = l.trim();
3073
+ t = p(t).slice(1, p(t).length - 1);
3074
+ const i = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
3075
+ (v = t.match(i)) == null || v.forEach((o, h) => {
3076
+ var F;
3077
+ const x = o;
3078
+ let T = [];
3079
+ (F = x.slice(1, x.length - 1).replace(":", "$:").split("$:")) == null || F.forEach((f) => {
3080
+ var E, O, u;
3081
+ if (ls.find((D) => f.includes(D)))
3082
+ if (!f.includes("=="))
3083
+ T.push({ key: "tableIndexColumn", contents: f.replaceAll("'", "") });
3084
+ else {
3085
+ let D = [];
3086
+ const $ = f.replaceAll("'", "").split("==");
3087
+ D.push($ == null ? void 0 : $[0]), $ != null && $[1].includes("[") ? D.push($ == null ? void 0 : $[1].trim().slice(1, ($ == null ? void 0 : $[1].length) - 1).split(",")) : D.push([$ == null ? void 0 : $[1]]), T.push({ key: "header", contents: [(O = (E = yl([D])) == null ? void 0 : E[0]) == null ? void 0 : O[0]] });
3088
+ }
3089
+ else {
3090
+ let D = f.trim().replaceAll(",", ",").replaceAll("'", '"');
3091
+ if (h % 3 === 0)
3092
+ D.slice(1, D.length - 1).includes("[") ? _.push({
3093
+ key: "tableIndex",
3094
+ contents: [{ label: D }]
3095
+ }) : _.push({
3096
+ key: "tableIndex",
3097
+ contents: [{ label: D.slice(1, D.length - 1) }]
3098
+ });
3099
+ else if ((D == null ? void 0 : D[0]) === "{") {
3100
+ let $ = [];
3101
+ const S = D.slice(1, D.length - 1).split(":");
3102
+ if (S.every((I) => fe(I.trim()))) {
3103
+ $.push({ key: "tableContentName", contents: "详情" });
3104
+ let I = [];
3105
+ S.forEach((J, B) => {
3106
+ if (B === 0) {
3107
+ const W = JSON.parse(J).map((Z) => ({ label: Z }));
3108
+ W.push({
3109
+ label: "操作"
3110
+ }), I.push({
3111
+ key: "header",
3112
+ contents: W
3113
+ });
3114
+ } else
3115
+ I.push({
3116
+ key: "tableContents",
3117
+ contents: JSON.parse(J)
3118
+ });
3119
+ }), I.push({
3120
+ key: "extraButton",
3121
+ contents: [{ label: "新增" }]
3122
+ }), I.push({
3123
+ key: "rowButton",
3124
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
3125
+ }), $.push({
3126
+ comp: "Table",
3127
+ compData: I,
3128
+ name: ""
3129
+ }), _.push({
3130
+ key: "tableContents",
3131
+ contents: [$]
3132
+ });
3133
+ }
3134
+ } else {
3135
+ let $ = D;
3136
+ $.slice(1, $.length - 1).includes("[") || $.slice(1, $.length - 1).includes("{") ? fe(He($.replace(/\s+/g, ""))) && ((u = JSON.parse(He($.replace(/\s+/g, "")))) == null || u.map((S) => {
3137
+ if (Array.isArray(S == null ? void 0 : S[0])) {
3138
+ const I = [];
3139
+ I.push({ key: "tableContentName", contents: "详情" });
3140
+ let J = [];
3141
+ S.forEach((B) => {
3142
+ B.forEach((W) => {
3143
+ var Z, Q;
3144
+ Xe.value++, J.push({
3145
+ id: Xe.value,
3146
+ key: (Z = Object.keys(W)) == null ? void 0 : Z[0],
3147
+ value: (Q = Object.values(W)) == null ? void 0 : Q[0],
3148
+ width: B.length
3149
+ });
3150
+ });
3151
+ }), I.push({
3152
+ comp: "Form",
3153
+ compData: [{
3154
+ key: "formFlex",
3155
+ contents: ""
3156
+ }, {
3157
+ key: "formContent",
3158
+ contents: J
3159
+ }],
3160
+ name: ""
3161
+ }), _.push({
3162
+ key: "tableContents",
3163
+ contents: [I]
3164
+ });
3165
+ } else
3166
+ _.push({
3167
+ key: "tableContents",
3168
+ contents: S == null ? void 0 : S[0]
3169
+ });
3170
+ })) : _.push({
3171
+ key: "tableContents",
3172
+ contents: $.trim().slice(1, $.length - 1)
3173
+ });
3174
+ }
3175
+ }
3176
+ }), _.push(T == null ? void 0 : T[0]);
3177
+ }), c.push({
3178
+ key: "tableIndex",
3179
+ contents: (j = _ == null ? void 0 : _.filter((o) => (o == null ? void 0 : o.key) === "tableIndex")) == null ? void 0 : j.map((o) => {
3180
+ var h;
3181
+ return (h = o.contents) == null ? void 0 : h[0];
3182
+ })
3183
+ }), c.push({
3184
+ key: "extraButton",
3185
+ contents: [{ label: "新增" }]
3186
+ }), c.push({
3187
+ key: "rowButton",
3188
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
3189
+ }), c.push({
3190
+ key: "tableIndexColumn",
3191
+ contents: (k = (g = _ == null ? void 0 : _.filter((o) => (o == null ? void 0 : o.key) === "tableIndexColumn")) == null ? void 0 : g[0]) == null ? void 0 : k.contents
3192
+ }), c.push({
3193
+ key: "header",
3194
+ contents: Qe(_ == null ? void 0 : _.filter((o) => (o == null ? void 0 : o.key) === "header"))
3195
+ }), c.push({
3196
+ key: "tableContents",
3197
+ contents: es(_ == null ? void 0 : _.filter((o) => (o == null ? void 0 : o.key) === "tableContents"), Qe(_ == null ? void 0 : _.filter((o) => (o == null ? void 0 : o.key) === "header")))
3198
+ });
3199
+ } else {
3200
+ const _ = (d = r.trim().split(",$")) == null ? void 0 : d[0];
3201
+ _[0] === "[" ? r = _.slice(1, _.length - 1) : r.includes(",$") && (r = (b = r.trim().split(",$")) == null ? void 0 : b[0]);
3202
+ let t;
3203
+ if (r.includes("$")) {
3204
+ r = p(r), e.method = (y = (m = p(r).trim()) == null ? void 0 : m.slice(1, r.length).split("(")) == null ? void 0 : y[0];
3205
+ let i;
3206
+ Ye(r.slice(1, r.length - 2)).length > 1 ? i = Ye(r.slice(1, r.length - 2)) : i = us(r), e.value = i;
3207
+ } else
3208
+ fe("[" + Le(r).replaceAll("'", '"') + "]") && !is(Le(r).replaceAll("'", '"')) ? (r = JSON.parse("[" + Le(r).replaceAll("'", '"') + "]"), n = r) : t = (C = (A = p(r).split("}")) == null ? void 0 : A.filter((i) => i !== "")) == null ? void 0 : C.map((i) => {
3209
+ let o = i;
3210
+ return o[0] === "," ? o = o.slice(2, o.length) : o = o.slice(1, o.length), o;
3211
+ });
3212
+ (w = p(t)) == null || w.forEach((i) => {
3213
+ var o, h, x, T, F, f, E, O, u, D, $, S, I, J, B;
3214
+ if (i.includes("==")) {
3215
+ const W = (S = i == null ? void 0 : i.split(":")) == null ? void 0 : S[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), Z = (I = i == null ? void 0 : i.split(":")) == null ? void 0 : I[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
3216
+ if (fe(Z.trim()) ? a.push(JSON.parse(Z.trim())) : a.push(JSON.parse(Z.replaceAll("'", '"').trim())), W[0] !== "[") {
3217
+ let Q = [];
3218
+ fe("[" + Ie(W) + "]") ? Q.push(JSON.parse("[" + Ie(W) + "]")) : fe("[" + Ie(W).replaceAll("==", ",") + "]") && Q.push(JSON.parse("[" + Ie(W).replaceAll("==", ",") + "]"));
3219
+ const ne = p(Q);
3220
+ ne.push(["操作"]), s.push(ne);
3221
+ } else {
3222
+ const Q = (J = W.slice(1, W.length - 1).replaceAll(",", ",|")) == null ? void 0 : J.split("|"), ne = (B = cs(Q)) == null ? void 0 : B.map((q) => ((q == null ? void 0 : q[q.length - 1]) === "," && (q = q.slice(0, q.length - 1)), q));
3223
+ let se = [];
3224
+ ne == null || ne.forEach((q) => {
3225
+ var oe, Y, X, ee;
3226
+ let ce = [];
3227
+ ce.push((oe = q.split("==")) == null ? void 0 : oe[0].trim().replace(/^"|"$/g, "")), ((Y = q.split("==")) == null ? void 0 : Y[1].trim()[0]) === "[" ? ce.push(JSON.parse((X = q.split("==")) == null ? void 0 : X[1].trim())) : ce.push([JSON.parse((ee = q.split("==")) == null ? void 0 : ee[1].trim())]), se.push(ce);
3228
+ });
3229
+ const ue = p(se);
3230
+ ue.push(["操作"]), s.push(ue);
3231
+ }
3232
+ } else {
3233
+ if (fe((o = i == null ? void 0 : i.split(":")) == null ? void 0 : o[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
3234
+ let W = JSON.parse((h = i == null ? void 0 : i.split(":")) == null ? void 0 : h[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
3235
+ Array.isArray(W) || (W = [W]), W.push("操作"), s.push(W);
3236
+ }
3237
+ fe((F = (T = (x = i == null ? void 0 : i.split(":")) == null ? void 0 : x[1]) == null ? void 0 : T.replace(/^"|"$/g, "'")) == null ? void 0 : F.replace(/'([^']+)'/g, '"$1"')) ? a.push(JSON.parse((f = i == null ? void 0 : i.split(":")) == null ? void 0 : f[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : fe((D = (u = (O = (E = i == null ? void 0 : i.split(":")) == null ? void 0 : E[1]) == null ? void 0 : O.replace(/^"|"$/g, "'")) == null ? void 0 : u.replaceAll("'", '"')) == null ? void 0 : D.replace(/'([^']+)'/g, '"$1"')) && a.push(JSON.parse(($ = i == null ? void 0 : i.split(":")) == null ? void 0 : $[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
3238
+ }
3239
+ });
3240
+ }
3241
+ return [s, a, c, e, n];
3242
+ }, ds = (l) => {
3243
+ const s = [], a = os(l == null ? void 0 : l.key), e = ts(l == null ? void 0 : l.key), n = ps(l == null ? void 0 : l.value), r = e == null ? void 0 : e[0], c = n == null ? void 0 : n[4], d = e == null ? void 0 : e[1], b = e == null ? void 0 : e[2], m = n == null ? void 0 : n[0], y = n == null ? void 0 : n[1], A = n == null ? void 0 : n[2], C = n == null ? void 0 : n[3];
3244
+ return a && s.push({
3245
+ key: "contentPath",
3246
+ value: a
3247
+ }), (r == null ? void 0 : r.length) > 0 && s.push({
3248
+ key: "tableIndex",
3249
+ value: r
3250
+ }), C && s.push({
3251
+ key: "extraButton",
3252
+ value: C
3253
+ }), (c == null ? void 0 : c.length) > 0 && s.push({
3254
+ key: "form",
3255
+ value: c
3256
+ }), (d == null ? void 0 : d.length) > 0 && s.push({
3257
+ key: "formTop",
3258
+ value: d
3259
+ }), (b == null ? void 0 : b.length) > 0 && s.push({
3260
+ key: "extra",
3261
+ value: b
3262
+ }), (A == null ? void 0 : A.length) > 0 && s.push({
3263
+ comp: "Table",
3264
+ compData: A,
3265
+ name: ""
3266
+ }), (m == null ? void 0 : m.length) > 0 && s.push({
3267
+ key: "tableColumns",
3268
+ value: m
3269
+ }), (y == null ? void 0 : y.length) > 0 && s.push({
3270
+ key: "tableContents",
3271
+ value: y
3272
+ }), s;
3273
+ }, fs = (l) => {
3274
+ let s = [], a = [];
3275
+ l == null || l.forEach((n) => {
3276
+ Array.isArray(n) && (n == null || n.forEach((r) => {
3277
+ var c;
3278
+ r.comp === "FormTop" && ((c = r.compData) == null || c.forEach((d) => {
3279
+ (d == null ? void 0 : d.key) === "formContent" && (a = [...a, ...d.contents]);
3280
+ }));
3281
+ }));
3282
+ });
3283
+ const e = a.reduce((n, r) => n.find((d) => (d == null ? void 0 : d.key) === (r == null ? void 0 : r.key)) ? n : n.concat([r]), []);
3284
+ return e.length !== 0 && s.push([{
3285
+ comp: "FormTop",
3286
+ compData: [{
3287
+ key: "formFlex",
3288
+ contents: ""
3289
+ }, {
3290
+ key: "formContent",
3291
+ contents: e
3292
+ }, {
3293
+ key: "enableWrap",
3294
+ contents: !0
3295
+ }, {
3296
+ key: "formButton",
3297
+ contents: [{
3298
+ label: "查询"
3299
+ }, {
3300
+ label: "重置"
3301
+ }]
3302
+ }]
3303
+ }]), l == null || l.forEach((n) => {
3304
+ if (Array.isArray(n)) {
3305
+ const r = n.filter((c) => c.comp !== "FormTop");
3306
+ s.push(r);
3307
+ } else
3308
+ n.comp !== "FormTop" && s.push(n);
3309
+ }), s;
3310
+ }, hs = (l, s) => {
3311
+ const a = s.split("/");
3312
+ let e = [];
3313
+ return l == null || l.forEach((n) => {
3314
+ var d, b, m, y, A, C, w, v, j, g, k;
3315
+ const r = [], c = (b = (d = n.find((_) => _.key === "tableIndex")) == null ? void 0 : d.value) == null ? void 0 : b[0];
3316
+ if (c && !c.some((_) => Array.isArray(_))) {
3317
+ const _ = (y = (m = n.find((t) => t.key === "tableColumns")) == null ? void 0 : m.value) == null ? void 0 : y[0];
3318
+ r.push({
3319
+ key: "tableIndexColumn",
3320
+ contents: a[a.length - 1]
3321
+ }), r.push({
3322
+ key: "tableIndex",
3323
+ contents: c == null ? void 0 : c.map((t) => ({ label: t }))
3324
+ }), r.push({
3325
+ key: "extraButton",
3326
+ contents: [{ label: "新增" }]
3327
+ }), r.push({
3328
+ key: "rowButton",
3329
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
3330
+ }), Array.isArray(_) && _.some((t) => Array.isArray(t)) ? r.push({
3331
+ key: "header",
3332
+ contents: yl(_)
3333
+ }) : r.push({
3334
+ key: "header",
3335
+ contents: Array.isArray(_) ? _ == null ? void 0 : _.map((t) => ({ label: t })) : [_].map((t) => ({ label: t }))
3336
+ }), r.push({
3337
+ key: "tableContents",
3338
+ contents: Array.isArray(_) ? (C = (A = n.find((t) => t.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : C[0] : (j = (v = (w = n.find((t) => t.key === "tableContents")) == null ? void 0 : w.value) == null ? void 0 : v[0]) == null ? void 0 : j.map((t) => [t])
3339
+ }), e.push({
3340
+ comp: "Table",
3341
+ name: "",
3342
+ compData: r
3343
+ }), n != null && n.find((t) => (t == null ? void 0 : t.key) === "formTop") && e.push({
3344
+ comp: "FormTop",
3345
+ compData: [
3346
+ {
3347
+ key: "formFlex",
3348
+ contents: ""
3349
+ },
3350
+ {
3351
+ key: "formContent",
3352
+ contents: Ne([(g = n == null ? void 0 : n.find((t) => (t == null ? void 0 : t.key) === "formTop")) == null ? void 0 : g.value])
3353
+ },
3354
+ {
3355
+ key: "enableWrap",
3356
+ contents: !0
3357
+ },
3358
+ {
3359
+ key: "formButton",
3360
+ contents: [{
3361
+ label: "查询"
3362
+ }, {
3363
+ label: "重置"
3364
+ }]
3365
+ }
3366
+ ],
3367
+ name: ""
3368
+ });
3369
+ } else c ? (e.push({
3370
+ comp: "Table",
3371
+ name: "",
3372
+ compData: Qn(n, a[a.length - 1])
3373
+ }), n != null && n.find((_) => (_ == null ? void 0 : _.key) === "formTop") && e.push({
3374
+ comp: "FormTop",
3375
+ compData: [
3376
+ {
3377
+ key: "formFlex",
3378
+ contents: ""
3379
+ },
3380
+ {
3381
+ key: "formContent",
3382
+ contents: Ne([(k = n == null ? void 0 : n.find((_) => (_ == null ? void 0 : _.key) === "formTop")) == null ? void 0 : k.value])
3383
+ },
3384
+ {
3385
+ key: "enableWrap",
3386
+ contents: !0
3387
+ },
3388
+ {
3389
+ key: "formButton",
3390
+ contents: [{
3391
+ label: "查询"
3392
+ }, {
3393
+ label: "重置"
3394
+ }]
3395
+ }
3396
+ ],
3397
+ name: ""
3398
+ })) : n.some((_) => _.key === "extra") ? e.push({
3399
+ comp: "calculator",
3400
+ name: "",
3401
+ compData: qe(n)
3402
+ }) : e.push(qe(n));
3403
+ }), fs(e);
3404
+ }, ys = (l, s) => {
3405
+ var n, r;
3406
+ const a = l.map((c) => c.filter((d) => d.key !== "contentPath"));
3407
+ return {
3408
+ comp: "Group",
3409
+ compData: [{
3410
+ contents: hs(a, s),
3411
+ key: "groupContents"
3412
+ }],
3413
+ name: (r = (n = l[0]) == null ? void 0 : n.find((c) => c.key === "contentPath")) == null ? void 0 : r.value
3414
+ };
3415
+ }, ms = (l) => {
3416
+ var n;
3417
+ const s = [], a = p(l).map((r) => {
3418
+ var c;
3419
+ if (r != null && r.find((d) => (d == null ? void 0 : d.key) === "contentPath"))
3420
+ return (c = r == null ? void 0 : r.find((d) => (d == null ? void 0 : d.key) === "contentPath")) == null ? void 0 : c.value;
3421
+ }).filter((r) => r !== ""), e = [...new Set(a)];
3422
+ return (n = e == null ? void 0 : e.filter((r) => r)) == null || n.forEach((r) => {
3423
+ var c;
3424
+ s.push(ys((c = p(l)) == null ? void 0 : c.filter((d) => d.find((b) => b.key === "contentPath" && b.value === r)), r));
3425
+ }), s;
3426
+ }, bs = (l) => {
3427
+ let s = [];
3428
+ s.push({
3429
+ comp: "Menu",
3430
+ compData: [{
3431
+ contents: ss(p(l)),
3432
+ key: "menuContents"
3433
+ }],
3434
+ name: ""
3435
+ });
3436
+ const a = l.map((e) => ds(e)).filter((e) => e.length !== 0);
3437
+ return s = [...s, ...ms(a)], s;
3438
+ }, Ls = (l) => {
3439
+ var s, a, e, n, r;
3440
+ try {
3441
+ const c = (e = We((a = (s = p(l)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")"))) == null ? void 0 : e.filter((m) => m !== ""), d = (r = (n = p(c)) == null ? void 0 : n.filter((m) => !m.includes("/*"))) == null ? void 0 : r.map((m) => as(m));
3442
+ return bs(d);
3443
+ } catch {
3444
+ return !1;
3445
+ }
3446
+ }, Te = L(0), je = L(0), ks = (l) => {
3447
+ const s = l.trim().replace(/^'|'$/g, ""), a = /((?:\$?[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 = {};
3448
+ let n;
3449
+ for (; (n = a.exec(s)) !== null; ) {
3450
+ const r = n[1];
3451
+ let c = n[2].trim();
3452
+ (c.match(/\[/g) || []).length !== (c.match(/\]/g) || []).length && (c = c == null ? void 0 : c.replace(/]$/, "")), e[r] ? (e[r + je.value] && je.value++, e[r + je.value] = r + "=" + c) : e[r] = r + "=" + c;
3453
+ }
3454
+ return e;
3455
+ }, gl = (l) => {
3456
+ const [s, a] = l.split("=").map((r) => r.trim()), e = s.replace(/['"]/g, ""), n = a.replace(/^['"]|['"]$/g, "");
3457
+ return { key: e, value: n };
3458
+ }, gs = (l) => {
3459
+ var c;
3460
+ let s = [];
3461
+ const [a, e] = l.split(/=(.+)/), n = a.replace(/['"]/g, "").trim(), r = e.replace(/^['"]|['"]$/g, "");
3462
+ return (c = Object.values(ks(r))) == null || c.forEach((d) => {
3463
+ s.push(gl(d));
3464
+ }), { key: n, value: s };
3465
+ }, we = (l) => {
3466
+ try {
3467
+ return JSON.parse(l), !0;
3468
+ } catch {
3469
+ return !1;
3470
+ }
3471
+ }, vl = (l) => {
3472
+ try {
3473
+ const s = l.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
3474
+ if (p(s).split("{").length - 1 > 1) {
3475
+ let a = p(s).replace(/^\{(.*)\}$/, "[$1]");
3476
+ if (we(a) && !a.includes("$") || (a = a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), we(a)) {
3477
+ const e = JSON.parse(a);
3478
+ let n = [];
3479
+ return e == null || e.forEach((r) => {
3480
+ var c;
3481
+ (c = Object.entries(p(r))) == null || c.forEach((d) => {
3482
+ Te.value++, n.push({
3483
+ id: Te.value,
3484
+ key: (d == null ? void 0 : d[0]) ?? "",
3485
+ value: (d == null ? void 0 : d[1]) === "" ? "" : d == null ? void 0 : d[1],
3486
+ // 如果值为空,则key设为空字符串,否则保留原值
3487
+ width: Object.keys(p(r)).length
3488
+ });
3489
+ });
3490
+ }), n;
3491
+ } else
3492
+ return console.error("转换类型不正确:"), [];
3493
+ } else if (we(s)) {
3494
+ const a = JSON.parse(s);
3495
+ return Object.entries(a).map(([e, n]) => (Te.value++, {
3496
+ id: Te.value,
3497
+ key: e,
3498
+ value: n === "" ? "" : n,
3499
+ // 如果值为空,则key设为空字符串,否则保留原值
3500
+ width: 1
3501
+ }));
3502
+ } else
3503
+ return s;
3504
+ } catch (s) {
3505
+ return console.error("转换失败:", s), [];
3506
+ }
3507
+ }, vs = (l, s) => {
3508
+ try {
3509
+ if (M != null && M.find((a) => (a == null ? void 0 : a.key) === s))
3510
+ return JSON.parse(l.replace(/[’]|[‘]|[']/g, '"'));
3511
+ if (p(l).split("[").length - 1 > 1) {
3512
+ const a = p(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
3513
+ return JSON.parse(a);
3514
+ } else {
3515
+ const a = p(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
3516
+ if (we(a)) {
3517
+ const e = JSON.parse(a);
3518
+ return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
3519
+ } else
3520
+ return vl(p(l));
3521
+ }
3522
+ } catch (a) {
3523
+ return console.error("解析失败:", a), l;
3524
+ }
3525
+ }, Cs = (l) => ({ [l == null ? void 0 : l.key]: vs(l == null ? void 0 : l.value, l == null ? void 0 : l.key) }), _s = (l) => {
3526
+ try {
3527
+ if (p(l).split("[").length - 1 > 1) {
3528
+ const s = p(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
3529
+ return JSON.parse(s);
3530
+ } else
3531
+ return JSON.parse(p(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((a) => ({ label: a }));
3532
+ } catch (s) {
3533
+ return console.error("解析失败:", s), l;
3534
+ }
3535
+ }, Cl = (l) => {
3536
+ var s, a, e, n, r, c;
3537
+ try {
3538
+ const d = We((a = (s = p(l)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")")), b = (e = p(d)) == null ? void 0 : e.map((A) => {
3539
+ var w, v;
3540
+ let C = (v = (w = p(A)) == null ? void 0 : w.split("=")) == null ? void 0 : v[0];
3541
+ return C != null && C.includes("GroupContents") ? gs(A) : gl(A);
3542
+ }), m = [];
3543
+ (n = p(b)) == null || n.forEach((A) => {
3544
+ var C, w, v, j, g;
3545
+ M != null && M.find((k) => {
3546
+ var _, t;
3547
+ return ((_ = k == null ? void 0 : k.key) == null ? void 0 : _.toUpperCase()) === ((t = A == null ? void 0 : A.key) == null ? void 0 : t.toUpperCase());
3548
+ }) ? m.push({
3549
+ comp: ((C = M == null ? void 0 : M.find((k) => {
3550
+ var _, t;
3551
+ return ((_ = k == null ? void 0 : k.key) == null ? void 0 : _.toUpperCase()) === ((t = A == null ? void 0 : A.key) == null ? void 0 : t.toUpperCase());
3552
+ })) == null ? void 0 : C.value) ?? "",
3553
+ name: (w = A == null ? void 0 : A.value) == null ? void 0 : w.replace(/[’]|[‘]|[']/g, ""),
3554
+ compData: []
3555
+ }) : G != null && G.find((k) => {
3556
+ var _, t;
3557
+ return ((_ = k == null ? void 0 : k.key) == null ? void 0 : _.toUpperCase()) === ((t = A == null ? void 0 : A.key) == null ? void 0 : t.toUpperCase());
3558
+ }) && ((m == null ? void 0 : m.length) === 0 && (v = A.key) != null && v.includes("Menus") && m.push({
3559
+ comp: "Menu",
3560
+ name: "",
3561
+ compData: []
3562
+ }), (j = m == null ? void 0 : m[(m == null ? void 0 : m.length) - 1]) != null && j.compData && m[(m == null ? void 0 : m.length) - 1].compData.push({
3563
+ key: (g = G == null ? void 0 : G.find((k) => {
3564
+ var _, t;
3565
+ return ((_ = k == null ? void 0 : k.key) == null ? void 0 : _.toUpperCase()) === ((t = A == null ? void 0 : A.key) == null ? void 0 : t.toUpperCase());
3566
+ })) == null ? void 0 : g.value,
3567
+ contents: A == null ? void 0 : A.value
3568
+ }));
3569
+ }), console.log("newContents", m);
3570
+ let y = (r = p(m)) == null ? void 0 : r.map((A) => {
3571
+ var C;
3572
+ return A != null && A.compData && (A.compData = (C = A == null ? void 0 : A.compData) == null ? void 0 : C.map((w) => {
3573
+ var v, j, g, k, _, t, i, o, h, x, T;
3574
+ if ((w == null ? void 0 : w.key) === "formFlex")
3575
+ w.contents = ((j = (v = w.contents) == null ? void 0 : v.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : j.toUpperCase()) !== "Vertical".toUpperCase();
3576
+ else if ((w == null ? void 0 : w.key) === "groupContents")
3577
+ w.contents = (g = p(w.contents)) == null ? void 0 : g.map((F) => Cs(p(F)));
3578
+ else if (((_ = (k = w.contents) == null ? void 0 : k.trim()) != null && _.startsWith("[") || (i = (t = w.contents) == null ? void 0 : t.trim()) != null && i.startsWith("【")) && ((h = (o = w.contents) == null ? void 0 : o.trim()) != null && h.endsWith("]") || (T = (x = w.contents) == null ? void 0 : x.trim()) != null && T.endsWith("】")))
3579
+ w.contents = _s(p(w.contents));
3580
+ else {
3581
+ if (!w.contents) return;
3582
+ w.contents = vl(p(w.contents));
3583
+ }
3584
+ return w;
3585
+ })), A;
3586
+ });
3587
+ return y = (c = p(y)) == null ? void 0 : c.map((A) => {
3588
+ var C;
3589
+ return (A == null ? void 0 : A.comp) === "Group" && (A.compData = (C = A.compData) == null ? void 0 : C.map((w) => {
3590
+ var j;
3591
+ let v = [];
3592
+ return (j = w.contents) == null || j.forEach((g) => {
3593
+ var k, _, t, i, o, h, x, T, F, f, E, O;
3594
+ if (M != null && M.find((u) => {
3595
+ var D, $, S;
3596
+ return ((D = u == null ? void 0 : u.key) == null ? void 0 : D.toUpperCase()) === ((S = ($ = Object.keys(g)) == null ? void 0 : $[0]) == null ? void 0 : S.toUpperCase());
3597
+ }))
3598
+ v.push({
3599
+ comp: (k = M == null ? void 0 : M.find((u) => {
3600
+ var D, $, S;
3601
+ return ((D = u == null ? void 0 : u.key) == null ? void 0 : D.toUpperCase()) === ((S = ($ = Object.keys(g)) == null ? void 0 : $[0]) == null ? void 0 : S.toUpperCase());
3602
+ })) == null ? void 0 : k.value,
3603
+ name: (t = (_ = Object.values(g)) == null ? void 0 : _[0]) == null ? void 0 : t.replace(/[’]|[‘]|[']/g, ""),
3604
+ compData: []
3605
+ });
3606
+ else if (G != null && G.find((u) => {
3607
+ var D, $, S;
3608
+ return ((D = u == null ? void 0 : u.key) == null ? void 0 : D.toUpperCase()) === ((S = ($ = Object.keys(g)) == null ? void 0 : $[0]) == null ? void 0 : S.toUpperCase());
3609
+ })) {
3610
+ if ((v == null ? void 0 : v.length) === 0) return;
3611
+ (i = v == null ? void 0 : v[(v == null ? void 0 : v.length) - 1]) != null && i.compData && v[(v == null ? void 0 : v.length) - 1].compData.push({
3612
+ key: (o = G == null ? void 0 : G.find((u) => {
3613
+ var D, $, S;
3614
+ return ((D = u == null ? void 0 : u.key) == null ? void 0 : D.toUpperCase()) === ((S = ($ = Object.keys(g)) == null ? void 0 : $[0]) == null ? void 0 : S.toUpperCase());
3615
+ })) == null ? void 0 : o.value,
3616
+ contents: (h = Object.values(g)) == null ? void 0 : h[0]
3617
+ });
3618
+ } else if ((T = (x = Object.keys(g)) == null ? void 0 : x[0]) != null && T.includes("$")) {
3619
+ const u = (f = (F = Object.keys(p(g))) == null ? void 0 : F[0]) == null ? void 0 : f.split("$");
3620
+ v[(v == null ? void 0 : v.length) - 1].compData.push({
3621
+ key: (E = G == null ? void 0 : G.find((D) => {
3622
+ var $, S;
3623
+ return (($ = D == null ? void 0 : D.key) == null ? void 0 : $.toUpperCase()) === ((S = u == null ? void 0 : u[0]) == null ? void 0 : S.toUpperCase());
3624
+ })) == null ? void 0 : E.value,
3625
+ contents: (O = Object.values(g)) == null ? void 0 : O[0],
3626
+ selectLabel: u == null ? void 0 : u[1]
3627
+ });
3628
+ }
3629
+ return g;
3630
+ }), w.contents = v, w;
3631
+ })), A;
3632
+ }), y;
3633
+ } catch {
3634
+ return !1;
3635
+ }
3636
+ }, js = (l) => Cl(l), Us = (l) => !!Cl(l), ve = L(0), Js = (l) => l.reduce((a, e) => {
3637
+ var r, c;
3638
+ const n = Object.values(a);
3639
+ return (((r = Object.keys(a)) == null ? void 0 : r.length) === 0 || n[n.length - 1].length >= (e == null ? void 0 : e.width)) && (a[ve.value] = [], ve.value++), a[ve.value - 1].push(e), ((c = Object.keys(a)) == null ? void 0 : c.length) === (e == null ? void 0 : e.width) && (a[ve.value] = [], ve.value++), a;
3640
+ }, {});
3641
+ export {
3642
+ Js as a,
3643
+ Bs as b,
3644
+ We as c,
3645
+ Ls as d,
3646
+ js as e,
3647
+ Fn as g,
3648
+ Us as i,
3649
+ as as p,
3650
+ Fs as s,
3651
+ ss as t
3652
+ };