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