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