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