ss-component-new 1.1.232 → 1.1.234

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