ss-component-new 1.1.106 → 1.1.108
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-Bw_xniaW.js +1620 -0
- package/dist/array-oXZb-AJg.cjs +7 -0
- package/dist/cloneDeep-B63vYPdo.cjs +1 -0
- package/dist/{cloneDeep-BlSdfBfP.js → cloneDeep-DthCQY7X.js} +28 -28
- package/dist/index-BZWjnoyd.cjs +1 -0
- package/dist/index-BeJSKTdN.cjs +1 -0
- package/dist/{index-EaTwoKxH.js → index-Bn3JIIsj.js} +2 -2
- package/dist/index-BnzOClla.js +418 -0
- package/dist/index-Bpgr-r6F.cjs +1 -0
- package/dist/index-C0jnoHBL.js +27 -0
- package/dist/index-C2y-GIYQ.cjs +1 -0
- package/dist/{index-lOKsLCr_.cjs → index-CB4EPC1h.cjs} +1 -1
- package/dist/index-CPeGRDn-.js +329 -0
- package/dist/index-C_lUuzbI.js +2862 -0
- package/dist/index-Ca522QBy.js +205 -0
- package/dist/{index-BTf2Cv6y.cjs → index-Cd4HZR9d.cjs} +1 -1
- package/dist/index-Co2laWWp.cjs +1 -0
- package/dist/index-D8t3GQHd.js +447 -0
- package/dist/{index-BgqHfopq.js → index-DHrVR-KZ.js} +4 -4
- package/dist/{index-B7DIIohI.js → index-DMTbcizk.js} +5 -5
- package/dist/{index-B1PrVTx-.js → index-DTdc9Wwr.js} +45 -45
- package/dist/{index-BOLX0N4O.cjs → index-DVYNsDMA.cjs} +1 -1
- package/dist/{index-Bgri6V0c.cjs → index-DZMc-M99.cjs} +1 -1
- package/dist/{index-D3HYlJwS.js → index-DfpTk1qM.js} +46 -23
- package/dist/{index-BBh1QHH_.cjs → index-DhQg-0Mz.cjs} +1 -1
- package/dist/index-Dy_6IplG.js +407 -0
- package/dist/{index-C5VM8kMN.js → index-GG2WOiqk.js} +178 -176
- package/dist/index-Odp8QoV2.cjs +1 -0
- package/dist/index-VVOqnQ27.cjs +1 -0
- package/dist/index-baJTqQyX.cjs +6 -0
- package/dist/index-j8Yse3sK.cjs +1 -0
- package/dist/{index-DuZaYpIZ.js → index-waDJqzgf.js} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-B7QZ2MPq.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BKWGzAIy.js +192 -0
- package/dist/{main-DWY_Iwy0.js → main-B1wNLXBB.js} +5 -5
- package/dist/{main-B0rp3AsP.cjs → main-CsdrHABa.cjs} +1 -1
- package/dist/modelComp-CHWFvhCq.js +18 -0
- package/dist/modelComp-DY1RniW6.cjs +1 -0
- package/dist/request-C1vE5ufY.js +1888 -0
- package/dist/request-DfYKYfLU.cjs +6 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/array-DO6NtEvO.cjs +0 -12
- package/dist/array-iXTj6fGC.js +0 -3417
- package/dist/cloneDeep-CelbgJQt.cjs +0 -1
- package/dist/index-4JjHmsuX.cjs +0 -1
- package/dist/index-BRTHsPAy.js +0 -417
- package/dist/index-Bsu2fxEv.js +0 -231
- package/dist/index-CBj72g7n.cjs +0 -1
- package/dist/index-CKGoMP8v.js +0 -115
- package/dist/index-CKuvodrt.js +0 -355
- package/dist/index-D5ml9-rt.cjs +0 -1
- package/dist/index-DUI_Ne-a.cjs +0 -1
- package/dist/index-DdMkutJE.js +0 -3235
- package/dist/index-TlYAQ7N3.cjs +0 -1
- package/dist/index-h3AVSjpp.cjs +0 -1
- package/dist/index-wfDLBJ_r.cjs +0 -6
- package/dist/index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-Bjafjd6U.js +0 -190
- package/dist/index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-C-0xEU2s.cjs +0 -1
- package/dist/modelComp-B3sxj_Kp.js +0 -18
- package/dist/modelComp-DAsVXKA0.cjs +0 -1
- /package/dist/{index.vue_vue_type_style_index_0_scoped_eb2796c5_lang-CF5e1L_i.cjs → index.vue_vue_type_style_index_0_scoped_2ff1497d_lang-CF5e1L_i.cjs} +0 -0
- /package/dist/{index.vue_vue_type_style_index_0_scoped_eb2796c5_lang-DrStz9iD.js → index.vue_vue_type_style_index_0_scoped_2ff1497d_lang-DrStz9iD.js} +0 -0
|
@@ -0,0 +1,1620 @@
|
|
|
1
|
+
import { u as De, p as pe, s as Pe } from "./index-D8t3GQHd.js";
|
|
2
|
+
import { ref as G, watch as Q, createElementBlock as ue, openBlock as ie, createVNode as W, resolveComponent as Ce, createElementVNode as v, toDisplayString as z, withCtx as V, createTextVNode as I } from "vue";
|
|
3
|
+
import { s as fe, f as Be, a as ee } from "./index-C_lUuzbI.js";
|
|
4
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import { c as a } from "./cloneDeep-DthCQY7X.js";
|
|
6
|
+
import { _ as Re } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
|
|
7
|
+
import { s as $e, u as Ge } from "./menu-BIINB-0Y.js";
|
|
8
|
+
import "./request-C1vE5ufY.js";
|
|
9
|
+
import { u as ve } from "./modelComp-CHWFvhCq.js";
|
|
10
|
+
const le = [
|
|
11
|
+
{
|
|
12
|
+
key: "单选",
|
|
13
|
+
value: "Select"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: "日期",
|
|
17
|
+
value: "Date"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: "长文本",
|
|
21
|
+
value: "TextArea"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "上传",
|
|
25
|
+
value: "Upload"
|
|
26
|
+
}
|
|
27
|
+
], Le = { class: "form-content" }, We = {
|
|
28
|
+
__name: "index",
|
|
29
|
+
props: {
|
|
30
|
+
itemData: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default: () => []
|
|
33
|
+
},
|
|
34
|
+
childItemData: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: () => []
|
|
37
|
+
},
|
|
38
|
+
index: Number
|
|
39
|
+
},
|
|
40
|
+
emits: ["change", "contentChange"],
|
|
41
|
+
setup(l, { emit: s }) {
|
|
42
|
+
const n = l, e = s, t = G([]), r = G(!1), c = G([]), b = De(pe), x = G(), g = (f) => {
|
|
43
|
+
var d, u, o, C;
|
|
44
|
+
const k = (u = (d = a(n.itemData)) == null ? void 0 : d.find((p) => (p == null ? void 0 : p.key) === "formContent")) == null ? void 0 : u.contents, T = a(f.content);
|
|
45
|
+
let m = {};
|
|
46
|
+
T && ((o = Object.values(T)) == null ? void 0 : o.length) > 0 && ((C = Object.values(T)) == null || C.forEach((p, i) => {
|
|
47
|
+
m[k[i].key] = p;
|
|
48
|
+
}));
|
|
49
|
+
const j = {
|
|
50
|
+
content: m,
|
|
51
|
+
index: n == null ? void 0 : n.index,
|
|
52
|
+
buttonName: f == null ? void 0 : f.buttonName
|
|
53
|
+
};
|
|
54
|
+
e("change", j);
|
|
55
|
+
}, O = (f) => {
|
|
56
|
+
var m, j;
|
|
57
|
+
if (!f) return;
|
|
58
|
+
if (((m = Object.values(a(f))) == null ? void 0 : m.length) > 0) {
|
|
59
|
+
const d = (j = Object.values(a(f))) == null ? void 0 : j.map((o) => o);
|
|
60
|
+
let u = "";
|
|
61
|
+
d == null || d.forEach((o) => {
|
|
62
|
+
o !== "" && o !== void 0 && (u = u === "" ? o : u + "/" + o);
|
|
63
|
+
}), b.setSelectArray(d), b.setSelectString(u);
|
|
64
|
+
}
|
|
65
|
+
const k = a(n.itemData), T = k == null ? void 0 : k.map((d) => {
|
|
66
|
+
var u;
|
|
67
|
+
return (d == null ? void 0 : d.key) === "formContent" && ((u = d.contents) == null || u.map((o, C) => {
|
|
68
|
+
var p, i, h, A, _, N, $, B, E, F, J, R, S, y;
|
|
69
|
+
return o.type = o != null && o.type ? o.type : (h = (i = (p = o == null ? void 0 : o.key.split("$")) == null ? void 0 : p[1]) == null ? void 0 : i.split("(")) != null && h[0] ? (A = le == null ? void 0 : le.find((U) => {
|
|
70
|
+
var L, X, Y;
|
|
71
|
+
return (U == null ? void 0 : U.key) === ((Y = (X = (L = o == null ? void 0 : o.key.split("$")) == null ? void 0 : L[1]) == null ? void 0 : X.split("(")) == null ? void 0 : Y[0]);
|
|
72
|
+
})) == null ? void 0 : A.value : "Input", o.options = o != null && o.options ? o.options : ((N = (_ = o == null ? void 0 : o.key.split("$")) == null ? void 0 : _[1]) == null ? void 0 : N.length) > 0 ? (E = (B = Be(($ = o == null ? void 0 : o.key.split("$")) == null ? void 0 : $[1])) == null ? void 0 : B.split(",")) == null ? void 0 : E.map((U) => ({
|
|
73
|
+
label: U,
|
|
74
|
+
value: U
|
|
75
|
+
})) : [], o != null && o.key.includes("$") && (o.key = (F = o == null ? void 0 : o.key.split("$")) == null ? void 0 : F[0]), o.value = o != null && o.value ? o.value : Array.isArray((J = Object.values(f)) == null ? void 0 : J[C]) ? (S = (R = Object.values(f)) == null ? void 0 : R[C]) == null ? void 0 : S[0] : (y = Object.values(f)) == null ? void 0 : y[C], o;
|
|
76
|
+
})), d;
|
|
77
|
+
});
|
|
78
|
+
e("contentChange", {
|
|
79
|
+
contents: T,
|
|
80
|
+
index: n.index
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
return Q(
|
|
84
|
+
() => n.itemData,
|
|
85
|
+
() => {
|
|
86
|
+
var j, d, u, o, C, p, i, h, A, _;
|
|
87
|
+
const f = (j = a(n.itemData)) == null ? void 0 : j.find((N) => (N == null ? void 0 : N.key) === "formContent"), k = (d = a(n.itemData)) == null ? void 0 : d.find((N) => (N == null ? void 0 : N.key) === "formButton"), T = (u = a(n.itemData)) == null ? void 0 : u.find((N) => (N == null ? void 0 : N.key) === "formFlex"), m = (o = a(n.itemData)) == null ? void 0 : o.find((N) => (N == null ? void 0 : N.key) === "formWrap");
|
|
88
|
+
if ((m == null ? void 0 : m.contents) === "纵向" ? r.value = !1 : r.value = !0, x.value = typeof (T == null ? void 0 : T.contents) != "boolean" ? !(!(T != null && T.contents) === "" || ((C = T == null ? void 0 : T.contents) == null ? void 0 : C.toUpperCase()) === "VERTICAL") : T == null ? void 0 : T.contents, ((p = f == null ? void 0 : f.contents) == null ? void 0 : p.length) > 0 && Array.isArray(f == null ? void 0 : f.contents)) {
|
|
89
|
+
const N = [];
|
|
90
|
+
(i = f == null ? void 0 : f.contents) == null || i.forEach((E, F) => {
|
|
91
|
+
var J, R, S, y, U, L, X, Y, be;
|
|
92
|
+
if ((E == null ? void 0 : E.label) !== "") {
|
|
93
|
+
let ke = (E == null ? void 0 : E.key) ?? "", ae = (E == null ? void 0 : E.type) ?? "", Z = (E == null ? void 0 : E.options) ?? [];
|
|
94
|
+
if (E != null && E.key.includes("$") && (ke = (J = a(E == null ? void 0 : E.key).split("$")) == null ? void 0 : J[0], ((S = (R = a(E == null ? void 0 : E.key).split("$")) == null ? void 0 : R[1]) == null ? void 0 : S.length) > 0)) {
|
|
95
|
+
const [Je, M] = (U = (y = a(E == null ? void 0 : E.key).split("$")) == null ? void 0 : y[1]) == null ? void 0 : U.split(/[()]/);
|
|
96
|
+
ae = ((L = le.find((H) => (H == null ? void 0 : H.key) === Je)) == null ? void 0 : L.value) ?? "", ((X = M == null ? void 0 : M.split(",")) == null ? void 0 : X.length) > 0 && (Z = (Y = M == null ? void 0 : M.split(",")) == null ? void 0 : Y.map((H) => ({
|
|
97
|
+
label: H,
|
|
98
|
+
value: H
|
|
99
|
+
})));
|
|
100
|
+
}
|
|
101
|
+
N.push({
|
|
102
|
+
label: ke ?? "",
|
|
103
|
+
name: "t" + F,
|
|
104
|
+
type: ae === "" ? "Input" : ae,
|
|
105
|
+
value: E != null && E.value ? E.value : (Z == null ? void 0 : Z.length) > 0 ? (be = Z == null ? void 0 : Z[0]) == null ? void 0 : be.value : (E == null ? void 0 : E.value) ?? "",
|
|
106
|
+
id: (E == null ? void 0 : E.id) ?? F,
|
|
107
|
+
contents: Z ?? [],
|
|
108
|
+
width: (E == null ? void 0 : E.width) ?? 1
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const $ = (h = a(N)) == null ? void 0 : h.map((E) => E.value);
|
|
113
|
+
let B = "";
|
|
114
|
+
$ == null || $.forEach((E) => {
|
|
115
|
+
E !== "" && E !== void 0 && (B = B === "" ? E : B + "/" + E);
|
|
116
|
+
}), b.setSelectArray($), b.setSelectString(B), t.value = N;
|
|
117
|
+
} else
|
|
118
|
+
t.value = [];
|
|
119
|
+
if (((A = k == null ? void 0 : k.contents) == null ? void 0 : A.length) > 0) {
|
|
120
|
+
const N = [];
|
|
121
|
+
(_ = k == null ? void 0 : k.contents) == null || _.forEach(($, B) => {
|
|
122
|
+
($ == null ? void 0 : $.label) !== "" && N.push({
|
|
123
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
124
|
+
id: ($ == null ? void 0 : $.id) ?? B,
|
|
125
|
+
type: ($ == null ? void 0 : $.type) ?? "",
|
|
126
|
+
background: $ == null ? void 0 : $.background
|
|
127
|
+
});
|
|
128
|
+
}), c.value = N;
|
|
129
|
+
} else
|
|
130
|
+
c.value = [];
|
|
131
|
+
},
|
|
132
|
+
{ deep: !0, immediate: !0 }
|
|
133
|
+
), (f, k) => (ie(), ue("div", Le, [
|
|
134
|
+
W(fe, {
|
|
135
|
+
rowContents: t.value,
|
|
136
|
+
buttonValue: c.value,
|
|
137
|
+
isRowFlex: x.value,
|
|
138
|
+
isEnableWrap: !1,
|
|
139
|
+
onOnButtonClick: g,
|
|
140
|
+
onChange: O,
|
|
141
|
+
isButtonRow: r.value
|
|
142
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
143
|
+
]));
|
|
144
|
+
}
|
|
145
|
+
}, ze = /* @__PURE__ */ de(We, [["__scopeId", "data-v-156885e4"]]), Ze = { class: "table-operate-content" }, Me = { class: "table-operate-item" }, He = { class: "operate-title" }, qe = { class: "operate-content" }, Qe = { class: "operate-title" }, Xe = { class: "operate-content" }, Ye = { class: "operate-title" }, we = { class: "operate-content" }, Ke = { class: "operate-content" }, Ve = {
|
|
146
|
+
__name: "operate",
|
|
147
|
+
props: {
|
|
148
|
+
itemContents: {
|
|
149
|
+
type: Array,
|
|
150
|
+
default: () => []
|
|
151
|
+
},
|
|
152
|
+
originalItemContents: {
|
|
153
|
+
type: Array,
|
|
154
|
+
default: () => []
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
emits: ["change"],
|
|
158
|
+
setup(l, { emit: s }) {
|
|
159
|
+
const n = l, e = s, t = G([]), r = G([]), c = G([]), b = G([{
|
|
160
|
+
label: "按钮名称",
|
|
161
|
+
prop: "label",
|
|
162
|
+
type: "edit"
|
|
163
|
+
}, {
|
|
164
|
+
label: "按钮类型",
|
|
165
|
+
prop: "type",
|
|
166
|
+
type: "edit"
|
|
167
|
+
}, {
|
|
168
|
+
label: "按钮背景颜色",
|
|
169
|
+
prop: "background",
|
|
170
|
+
type: "edit",
|
|
171
|
+
columnType: "Color"
|
|
172
|
+
}, {
|
|
173
|
+
label: "操作",
|
|
174
|
+
prop: "operate",
|
|
175
|
+
type: "operate",
|
|
176
|
+
sortable: !1
|
|
177
|
+
}]), x = G([{
|
|
178
|
+
label: "标签名称",
|
|
179
|
+
prop: "label",
|
|
180
|
+
type: "edit"
|
|
181
|
+
}, {
|
|
182
|
+
label: "标签类型",
|
|
183
|
+
prop: "type",
|
|
184
|
+
type: "edit"
|
|
185
|
+
}, {
|
|
186
|
+
label: "按钮文字颜色",
|
|
187
|
+
prop: "textColor",
|
|
188
|
+
type: "edit",
|
|
189
|
+
columnType: "Color"
|
|
190
|
+
}, {
|
|
191
|
+
label: "操作",
|
|
192
|
+
prop: "operate",
|
|
193
|
+
type: "operate",
|
|
194
|
+
sortable: !1
|
|
195
|
+
}]), g = G([]), O = G(0), f = G([{
|
|
196
|
+
name: "isPagination",
|
|
197
|
+
label: "是否显示分页",
|
|
198
|
+
type: "Switch",
|
|
199
|
+
value: !0
|
|
200
|
+
}]), k = [{
|
|
201
|
+
label: "标签名",
|
|
202
|
+
prop: "label",
|
|
203
|
+
type: "edit"
|
|
204
|
+
}, {
|
|
205
|
+
label: "属性名",
|
|
206
|
+
prop: "prop",
|
|
207
|
+
type: "edit"
|
|
208
|
+
}, {
|
|
209
|
+
label: "宽度",
|
|
210
|
+
prop: "width",
|
|
211
|
+
type: "edit",
|
|
212
|
+
columnType: "Number"
|
|
213
|
+
}, {
|
|
214
|
+
label: "是否固定列",
|
|
215
|
+
prop: "fixed",
|
|
216
|
+
type: "edit",
|
|
217
|
+
columnType: "Radio",
|
|
218
|
+
contents: [{
|
|
219
|
+
label: "left",
|
|
220
|
+
value: "左"
|
|
221
|
+
}, {
|
|
222
|
+
label: "right",
|
|
223
|
+
value: "右"
|
|
224
|
+
}]
|
|
225
|
+
}, {
|
|
226
|
+
label: "是否支持排序",
|
|
227
|
+
prop: "sortable",
|
|
228
|
+
type: "edit",
|
|
229
|
+
columnType: "Switch"
|
|
230
|
+
}, {
|
|
231
|
+
label: "文本所在位置",
|
|
232
|
+
prop: "align",
|
|
233
|
+
type: "edit",
|
|
234
|
+
columnType: "Radio",
|
|
235
|
+
contents: [{
|
|
236
|
+
label: "left",
|
|
237
|
+
value: "左"
|
|
238
|
+
}, {
|
|
239
|
+
label: "center",
|
|
240
|
+
value: "中"
|
|
241
|
+
}, {
|
|
242
|
+
label: "right",
|
|
243
|
+
value: "右"
|
|
244
|
+
}]
|
|
245
|
+
}, {
|
|
246
|
+
label: "溢出悬浮文字",
|
|
247
|
+
prop: "showOverflowTooltip",
|
|
248
|
+
type: "edit",
|
|
249
|
+
columnType: "Switch"
|
|
250
|
+
}, {
|
|
251
|
+
label: "是否不可拖动",
|
|
252
|
+
prop: "isNotDrag",
|
|
253
|
+
type: "edit",
|
|
254
|
+
columnType: "Switch"
|
|
255
|
+
}, {
|
|
256
|
+
label: "是否可编辑列名",
|
|
257
|
+
//暂不支持
|
|
258
|
+
prop: "isEditCol",
|
|
259
|
+
type: "edit",
|
|
260
|
+
columnType: "Switch"
|
|
261
|
+
}, {
|
|
262
|
+
label: "是否出现在附属界面",
|
|
263
|
+
//暂不支持
|
|
264
|
+
prop: "isOperate",
|
|
265
|
+
type: "edit",
|
|
266
|
+
columnType: "Switch"
|
|
267
|
+
}, {
|
|
268
|
+
label: "操作",
|
|
269
|
+
prop: "operate",
|
|
270
|
+
type: "operate",
|
|
271
|
+
sortable: !1
|
|
272
|
+
}], T = (p) => {
|
|
273
|
+
let i = a(t.value);
|
|
274
|
+
const h = i == null ? void 0 : i.find((A) => A.key === "page");
|
|
275
|
+
(h == null ? void 0 : h.contents) !== void 0 ? i = i == null ? void 0 : i.map((A) => ((A == null ? void 0 : A.key) === "page" && (A.contents = p == null ? void 0 : p.isPagination), A)) : i.push({
|
|
276
|
+
key: "page",
|
|
277
|
+
contents: p == null ? void 0 : p.isPagination
|
|
278
|
+
}), t.value = i;
|
|
279
|
+
};
|
|
280
|
+
Q(
|
|
281
|
+
() => n.originalItemContents,
|
|
282
|
+
() => {
|
|
283
|
+
var p, i, h, A, _, N, $, B, E, F, J, R, S;
|
|
284
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (t.value = a(n.originalItemContents), r.value = (i = (p = t.value) == null ? void 0 : p.find((y) => (y == null ? void 0 : y.key) === "header")) == null ? void 0 : i.contents, c.value = (A = (h = t.value) == null ? void 0 : h.find((y) => (y == null ? void 0 : y.key) === "rowButton")) == null ? void 0 : A.contents, b.value = (N = (_ = t.value) == null ? void 0 : _.find((y) => (y == null ? void 0 : y.key) === "extraButton")) == null ? void 0 : N.contents, f.value = (B = ($ = t.value) == null ? void 0 : $.find((y) => (y == null ? void 0 : y.key) === "page")) != null && B.contents ? [{
|
|
285
|
+
name: "isPagination",
|
|
286
|
+
label: "是否显示分页",
|
|
287
|
+
type: "Switch",
|
|
288
|
+
value: (F = (E = t.value) == null ? void 0 : E.find((y) => (y == null ? void 0 : y.key) === "page")) == null ? void 0 : F.contents
|
|
289
|
+
}] : [{
|
|
290
|
+
name: "isPagination",
|
|
291
|
+
label: "是否显示分页",
|
|
292
|
+
type: "Switch",
|
|
293
|
+
value: !0
|
|
294
|
+
}], r.value = (J = r.value) == null ? void 0 : J.map((y, U) => y = {
|
|
295
|
+
label: (y == null ? void 0 : y.label) ?? "",
|
|
296
|
+
prop: (y == null ? void 0 : y.label) === "操作" ? "operate" : y == null ? void 0 : y.prop,
|
|
297
|
+
width: y != null && y.width ? parseInt(y.width) : "",
|
|
298
|
+
fixed: (y == null ? void 0 : y.fixed) ?? void 0,
|
|
299
|
+
sortable: (y == null ? void 0 : y.sortable) ?? !1,
|
|
300
|
+
align: (y == null ? void 0 : y.align) ?? "center",
|
|
301
|
+
showOverflowTooltip: (y == null ? void 0 : y.showOverflowTooltip) ?? !0,
|
|
302
|
+
isNotDrag: (y == null ? void 0 : y.isNotDrag) ?? !1,
|
|
303
|
+
isEditCol: (y == null ? void 0 : y.isEditCol) ?? !1,
|
|
304
|
+
isOperate: (y == null ? void 0 : y.isOperate) ?? !1,
|
|
305
|
+
id: (y == null ? void 0 : y.id) ?? U
|
|
306
|
+
}), c.value = (R = c.value) == null ? void 0 : R.map((y, U) => y = {
|
|
307
|
+
label: (y == null ? void 0 : y.label) ?? "",
|
|
308
|
+
type: (y == null ? void 0 : y.type) ?? "",
|
|
309
|
+
textColor: (y == null ? void 0 : y.textColor) ?? "#000000",
|
|
310
|
+
id: (y == null ? void 0 : y.id) ?? U
|
|
311
|
+
}), b.value = (S = b.value) == null ? void 0 : S.map((y, U) => y = {
|
|
312
|
+
label: (y == null ? void 0 : y.label) ?? "",
|
|
313
|
+
type: (y == null ? void 0 : y.type) ?? "",
|
|
314
|
+
background: (y == null ? void 0 : y.textColor) ?? "#FFFFFF",
|
|
315
|
+
id: (y == null ? void 0 : y.id) ?? U
|
|
316
|
+
}));
|
|
317
|
+
},
|
|
318
|
+
{ deep: !0, immediate: !0 }
|
|
319
|
+
), Q(
|
|
320
|
+
() => f.value,
|
|
321
|
+
() => {
|
|
322
|
+
var h;
|
|
323
|
+
let p = a(t.value);
|
|
324
|
+
const i = p == null ? void 0 : p.find((A) => A.key === "page");
|
|
325
|
+
i != null && i.contents ? p = p == null ? void 0 : p.map((A) => {
|
|
326
|
+
var _;
|
|
327
|
+
return (A == null ? void 0 : A.key) === "page" && (A.contents = (_ = f.value) == null ? void 0 : _[0].value), A;
|
|
328
|
+
}) : p.push({
|
|
329
|
+
key: "page",
|
|
330
|
+
contents: (h = f.value) == null ? void 0 : h[0].value
|
|
331
|
+
}), t.value = p;
|
|
332
|
+
},
|
|
333
|
+
{ immediate: !0, deep: !0 }
|
|
334
|
+
);
|
|
335
|
+
const m = () => {
|
|
336
|
+
const p = a(r.value);
|
|
337
|
+
let i = a(t.value);
|
|
338
|
+
p.push({
|
|
339
|
+
label: "",
|
|
340
|
+
prop: "",
|
|
341
|
+
width: "",
|
|
342
|
+
fixed: void 0,
|
|
343
|
+
sortable: !1,
|
|
344
|
+
align: "center",
|
|
345
|
+
showOverflowTooltip: !0,
|
|
346
|
+
isNotDrag: !1,
|
|
347
|
+
isEditCol: !1,
|
|
348
|
+
isOperate: !1,
|
|
349
|
+
id: O.value
|
|
350
|
+
}), r.value = p, O.value++;
|
|
351
|
+
const h = i == null ? void 0 : i.find((A) => (A == null ? void 0 : A.key) === "header");
|
|
352
|
+
h != null && h.contents ? (h.contents = p, i = i == null ? void 0 : i.map((A) => ((A == null ? void 0 : A.key) === "header" && (A.contents = p), A))) : i.push({
|
|
353
|
+
key: "header",
|
|
354
|
+
contents: p
|
|
355
|
+
}), t.value = i;
|
|
356
|
+
}, j = () => {
|
|
357
|
+
const p = a(c.value);
|
|
358
|
+
let i = a(t.value);
|
|
359
|
+
p.push({
|
|
360
|
+
label: "",
|
|
361
|
+
type: "",
|
|
362
|
+
textColor: "#000000",
|
|
363
|
+
id: O.value
|
|
364
|
+
}), c.value = p, O.value++;
|
|
365
|
+
const h = i == null ? void 0 : i.find((A) => (A == null ? void 0 : A.key) === "rowButton");
|
|
366
|
+
h != null && h.contents ? (h.contents = p, i = i == null ? void 0 : i.map((A) => ((A == null ? void 0 : A.key) === "rowButton" && (A.contents = p), A))) : i.push({
|
|
367
|
+
key: "rowButton",
|
|
368
|
+
contents: p
|
|
369
|
+
}), t.value = i;
|
|
370
|
+
}, d = () => {
|
|
371
|
+
const p = a(g.value);
|
|
372
|
+
let i = a(t.value);
|
|
373
|
+
p.push({
|
|
374
|
+
label: "",
|
|
375
|
+
type: "",
|
|
376
|
+
background: "#FFFFFF",
|
|
377
|
+
id: O.value
|
|
378
|
+
}), g.value = p, O.value++;
|
|
379
|
+
const h = i == null ? void 0 : i.find((A) => (A == null ? void 0 : A.key) === "extraButton");
|
|
380
|
+
h != null && h.contents ? (h.contents = p, i = i == null ? void 0 : i.map((A) => ((A == null ? void 0 : A.key) === "extraButton" && (A.contents = p), A))) : i.push({
|
|
381
|
+
key: "extraButton",
|
|
382
|
+
contents: p
|
|
383
|
+
}), t.value = i;
|
|
384
|
+
}, u = (p) => {
|
|
385
|
+
const i = a(c.value);
|
|
386
|
+
let h = a(t.value);
|
|
387
|
+
c.value = i.filter((_) => _.id !== p.id);
|
|
388
|
+
const A = h == null ? void 0 : h.find((_) => _.key === "rowButton");
|
|
389
|
+
A != null && A.contents && (h = h == null ? void 0 : h.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = i.filter((N) => N.id !== p.id)), _))), t.value = h;
|
|
390
|
+
}, o = (p) => {
|
|
391
|
+
const i = a(g.value);
|
|
392
|
+
let h = a(t.value);
|
|
393
|
+
g.value = i.filter((_) => _.id !== p.id);
|
|
394
|
+
const A = h == null ? void 0 : h.find((_) => _.key === "extraButton");
|
|
395
|
+
A != null && A.contents && (h = h == null ? void 0 : h.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = i.filter((N) => N.id !== p.id)), _))), t.value = h;
|
|
396
|
+
}, C = (p) => {
|
|
397
|
+
const i = a(r.value);
|
|
398
|
+
let h = a(t.value);
|
|
399
|
+
r.value = i.filter((_) => _.id !== p.id);
|
|
400
|
+
const A = h == null ? void 0 : h.find((_) => _.key === "header");
|
|
401
|
+
A != null && A.contents && (h = h == null ? void 0 : h.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = i.filter((N) => N.id !== p.id)), _))), t.value = h;
|
|
402
|
+
};
|
|
403
|
+
return Q(
|
|
404
|
+
() => [t.value, r.value],
|
|
405
|
+
() => {
|
|
406
|
+
let p = a(t.value);
|
|
407
|
+
const i = p == null ? void 0 : p.find((h) => (h == null ? void 0 : h.key) === "header");
|
|
408
|
+
i != null && i.contents ? (i.contents = r.value, p = p == null ? void 0 : p.map((h) => ((h == null ? void 0 : h.key) === "header" && (h.contents = r.value), h))) : p.push({
|
|
409
|
+
key: "header",
|
|
410
|
+
contents: r.value
|
|
411
|
+
}), e("change", p);
|
|
412
|
+
},
|
|
413
|
+
{ deep: !0, immediate: !0 }
|
|
414
|
+
), (p, i) => {
|
|
415
|
+
const h = Ce("el-button");
|
|
416
|
+
return ie(), ue("div", Ze, [
|
|
417
|
+
v("div", Me, [
|
|
418
|
+
v("div", He, [
|
|
419
|
+
i[1] || (i[1] = v("div", null, z("表头"), -1)),
|
|
420
|
+
W(h, {
|
|
421
|
+
class: "blue-operate-button",
|
|
422
|
+
icon: "ele-Plus",
|
|
423
|
+
onClick: m
|
|
424
|
+
}, {
|
|
425
|
+
default: V(() => i[0] || (i[0] = [
|
|
426
|
+
I(z("新建"))
|
|
427
|
+
])),
|
|
428
|
+
_: 1,
|
|
429
|
+
__: [0]
|
|
430
|
+
})
|
|
431
|
+
]),
|
|
432
|
+
v("div", qe, [
|
|
433
|
+
W(ee, {
|
|
434
|
+
columns: k,
|
|
435
|
+
isShowPagination: !1,
|
|
436
|
+
isShowEdit: !1,
|
|
437
|
+
isMoveColumn: !1,
|
|
438
|
+
tableData: r.value,
|
|
439
|
+
onDeleteRow: C
|
|
440
|
+
}, null, 8, ["tableData"])
|
|
441
|
+
]),
|
|
442
|
+
v("div", Qe, [
|
|
443
|
+
i[3] || (i[3] = v("div", null, z("行内按钮"), -1)),
|
|
444
|
+
W(h, {
|
|
445
|
+
class: "blue-operate-button",
|
|
446
|
+
icon: "ele-Plus",
|
|
447
|
+
onClick: j
|
|
448
|
+
}, {
|
|
449
|
+
default: V(() => i[2] || (i[2] = [
|
|
450
|
+
I(z("新建"))
|
|
451
|
+
])),
|
|
452
|
+
_: 1,
|
|
453
|
+
__: [2]
|
|
454
|
+
})
|
|
455
|
+
]),
|
|
456
|
+
v("div", Xe, [
|
|
457
|
+
W(ee, {
|
|
458
|
+
columns: x.value,
|
|
459
|
+
isShowPagination: !1,
|
|
460
|
+
isShowEdit: !1,
|
|
461
|
+
isMoveColumn: !1,
|
|
462
|
+
tableData: c.value,
|
|
463
|
+
onDeleteRow: u
|
|
464
|
+
}, null, 8, ["columns", "tableData"])
|
|
465
|
+
]),
|
|
466
|
+
v("div", Ye, [
|
|
467
|
+
i[5] || (i[5] = v("div", null, z("表格外部按钮"), -1)),
|
|
468
|
+
W(h, {
|
|
469
|
+
class: "blue-operate-button",
|
|
470
|
+
icon: "ele-Plus",
|
|
471
|
+
onClick: d
|
|
472
|
+
}, {
|
|
473
|
+
default: V(() => i[4] || (i[4] = [
|
|
474
|
+
I(z("新建"))
|
|
475
|
+
])),
|
|
476
|
+
_: 1,
|
|
477
|
+
__: [4]
|
|
478
|
+
})
|
|
479
|
+
]),
|
|
480
|
+
v("div", we, [
|
|
481
|
+
W(ee, {
|
|
482
|
+
columns: b.value,
|
|
483
|
+
isShowPagination: !1,
|
|
484
|
+
isShowEdit: !1,
|
|
485
|
+
isMoveColumn: !1,
|
|
486
|
+
tableData: g.value,
|
|
487
|
+
onDeleteRow: o
|
|
488
|
+
}, null, 8, ["columns", "tableData"])
|
|
489
|
+
]),
|
|
490
|
+
i[6] || (i[6] = v("div", { class: "operate-title" }, [
|
|
491
|
+
v("div", null, z("分页"))
|
|
492
|
+
], -1)),
|
|
493
|
+
v("div", Ke, [
|
|
494
|
+
W(fe, {
|
|
495
|
+
rowContents: f.value,
|
|
496
|
+
onChange: T
|
|
497
|
+
}, null, 8, ["rowContents"])
|
|
498
|
+
])
|
|
499
|
+
])
|
|
500
|
+
]);
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
}, Ie = /* @__PURE__ */ de(Ve, [["__scopeId", "data-v-877911eb"]]), el = { class: "form-operate-content" }, ll = { class: "form-operate-item" }, nl = { class: "operate-title" }, tl = { class: "operate-content" }, sl = { class: "operate-title" }, al = { class: "operate-content" }, rl = { class: "operate-content" }, ol = {
|
|
504
|
+
__name: "operate",
|
|
505
|
+
props: {
|
|
506
|
+
itemContents: {
|
|
507
|
+
type: Array,
|
|
508
|
+
default: () => []
|
|
509
|
+
},
|
|
510
|
+
originalItemContents: {
|
|
511
|
+
type: Array,
|
|
512
|
+
default: () => []
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
emits: ["change"],
|
|
516
|
+
setup(l, { emit: s }) {
|
|
517
|
+
const n = l, e = s, t = G([{
|
|
518
|
+
name: "isRowFlex",
|
|
519
|
+
label: "是否横向布局",
|
|
520
|
+
type: "Switch",
|
|
521
|
+
value: !0
|
|
522
|
+
}]), r = G([{
|
|
523
|
+
label: "字段名称",
|
|
524
|
+
prop: "label",
|
|
525
|
+
type: "edit"
|
|
526
|
+
}, {
|
|
527
|
+
label: "字段类型",
|
|
528
|
+
prop: "type",
|
|
529
|
+
type: "edit"
|
|
530
|
+
}, {
|
|
531
|
+
label: "字段值",
|
|
532
|
+
prop: "key",
|
|
533
|
+
type: "edit"
|
|
534
|
+
}, {
|
|
535
|
+
label: "字段选项值",
|
|
536
|
+
prop: "options",
|
|
537
|
+
type: "edit"
|
|
538
|
+
}, {
|
|
539
|
+
label: "操作",
|
|
540
|
+
prop: "operate",
|
|
541
|
+
type: "operate",
|
|
542
|
+
sortable: !1
|
|
543
|
+
}]), c = G([{
|
|
544
|
+
label: "字段名称",
|
|
545
|
+
prop: "label",
|
|
546
|
+
type: "edit"
|
|
547
|
+
}, {
|
|
548
|
+
label: "字段类型",
|
|
549
|
+
prop: "type",
|
|
550
|
+
type: "edit"
|
|
551
|
+
}, {
|
|
552
|
+
label: "按钮背景颜色",
|
|
553
|
+
prop: "background",
|
|
554
|
+
type: "edit",
|
|
555
|
+
columnType: "Color"
|
|
556
|
+
}, {
|
|
557
|
+
label: "操作",
|
|
558
|
+
prop: "operate",
|
|
559
|
+
type: "operate",
|
|
560
|
+
sortable: !1
|
|
561
|
+
}]), b = G([]), x = G([]), g = G([]), O = G(0);
|
|
562
|
+
Q(
|
|
563
|
+
() => n.originalItemContents,
|
|
564
|
+
() => {
|
|
565
|
+
var d, u, o, C, p, i, h, A, _, N;
|
|
566
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (x.value = a(n.originalItemContents), g.value = (u = (d = x.value) == null ? void 0 : d.find(($) => ($ == null ? void 0 : $.key) === "formContent")) == null ? void 0 : u.contents, b.value = (C = (o = x.value) == null ? void 0 : o.find(($) => ($ == null ? void 0 : $.key) === "formButton")) == null ? void 0 : C.contents, g.value = (p = g.value) == null ? void 0 : p.map(($, B) => $ = {
|
|
567
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
568
|
+
type: ($ == null ? void 0 : $.type) ?? "",
|
|
569
|
+
key: ($ == null ? void 0 : $.key) ?? "",
|
|
570
|
+
options: ($ == null ? void 0 : $.options) ?? "",
|
|
571
|
+
id: ($ == null ? void 0 : $.id) ?? B
|
|
572
|
+
}), b.value = (i = b.value) == null ? void 0 : i.map(($, B) => $ = {
|
|
573
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
574
|
+
type: ($ == null ? void 0 : $.type) ?? "",
|
|
575
|
+
background: ($ == null ? void 0 : $.background) ?? "#000000",
|
|
576
|
+
id: ($ == null ? void 0 : $.id) ?? B
|
|
577
|
+
}), t.value = (A = (h = x.value) == null ? void 0 : h.find(($) => ($ == null ? void 0 : $.key) === "formFlex")) != null && A.contents ? [{
|
|
578
|
+
name: "isRowFlex",
|
|
579
|
+
label: "是否横向布局",
|
|
580
|
+
type: "Switch",
|
|
581
|
+
value: (N = (_ = x.value) == null ? void 0 : _.find(($) => ($ == null ? void 0 : $.key) === "formFlex")) == null ? void 0 : N.contents
|
|
582
|
+
}] : [{
|
|
583
|
+
name: "isRowFlex",
|
|
584
|
+
label: "是否横向布局",
|
|
585
|
+
type: "Switch",
|
|
586
|
+
value: !0
|
|
587
|
+
}]);
|
|
588
|
+
},
|
|
589
|
+
{ deep: !0, immediate: !0 }
|
|
590
|
+
);
|
|
591
|
+
const f = () => {
|
|
592
|
+
const d = a(b.value);
|
|
593
|
+
let u = a(x.value);
|
|
594
|
+
d.push({
|
|
595
|
+
label: "",
|
|
596
|
+
type: "",
|
|
597
|
+
background: "#000000",
|
|
598
|
+
id: O.value
|
|
599
|
+
}), b.value = d, O.value++;
|
|
600
|
+
const o = u == null ? void 0 : u.find((C) => (C == null ? void 0 : C.key) === "formButton");
|
|
601
|
+
o != null && o.contents ? (o.contents = d, u = u == null ? void 0 : u.map((C) => ((C == null ? void 0 : C.key) === "formButton" && (C.contents = d), C))) : u.push({
|
|
602
|
+
key: "formButton",
|
|
603
|
+
contents: d
|
|
604
|
+
}), x.value = u;
|
|
605
|
+
}, k = () => {
|
|
606
|
+
const d = a(g.value);
|
|
607
|
+
let u = a(x.value);
|
|
608
|
+
d.push({
|
|
609
|
+
label: "",
|
|
610
|
+
type: "",
|
|
611
|
+
key: "",
|
|
612
|
+
options: "",
|
|
613
|
+
id: O.value
|
|
614
|
+
}), g.value = d, O.value++;
|
|
615
|
+
const o = u == null ? void 0 : u.find((C) => (C == null ? void 0 : C.key) === "formContent");
|
|
616
|
+
o != null && o.contents ? (o.contents = d, u = u == null ? void 0 : u.map((C) => ((C == null ? void 0 : C.key) === "formContent" && (C.contents = d), C))) : u.push({
|
|
617
|
+
key: "formContent",
|
|
618
|
+
contents: d
|
|
619
|
+
}), x.value = u;
|
|
620
|
+
}, T = (d) => {
|
|
621
|
+
const u = a(b.value);
|
|
622
|
+
let o = a(x.value);
|
|
623
|
+
b.value = u.filter((p) => p.id !== d.id);
|
|
624
|
+
const C = o == null ? void 0 : o.find((p) => p.key === "formButton");
|
|
625
|
+
C != null && C.contents && (o = o == null ? void 0 : o.map((p) => ((p == null ? void 0 : p.key) === "formButton" && (p.contents = u.filter((i) => i.id !== d.id)), p))), x.value = o;
|
|
626
|
+
}, m = (d) => {
|
|
627
|
+
const u = a(g.value);
|
|
628
|
+
let o = a(x.value);
|
|
629
|
+
g.value = u.filter((p) => p.id !== d.id);
|
|
630
|
+
const C = o == null ? void 0 : o.find((p) => p.key === "formContent");
|
|
631
|
+
C != null && C.contents && (o = o == null ? void 0 : o.map((p) => ((p == null ? void 0 : p.key) === "formContent" && (p.contents = u.filter((i) => i.id !== d.id)), p))), x.value = o;
|
|
632
|
+
}, j = (d) => {
|
|
633
|
+
let u = a(x.value);
|
|
634
|
+
const o = u == null ? void 0 : u.find((C) => C.key === "formFlex");
|
|
635
|
+
(o == null ? void 0 : o.contents) !== void 0 ? u = u == null ? void 0 : u.map((C) => ((C == null ? void 0 : C.key) === "formFlex" && (C.contents = d == null ? void 0 : d.isRowFlex), C)) : u.push({
|
|
636
|
+
key: "formFlex",
|
|
637
|
+
contents: d == null ? void 0 : d.isRowFlex
|
|
638
|
+
}), x.value = u;
|
|
639
|
+
};
|
|
640
|
+
return Q(
|
|
641
|
+
() => [x.value, g.value],
|
|
642
|
+
() => {
|
|
643
|
+
let d = a(x.value);
|
|
644
|
+
const u = d == null ? void 0 : d.find((o) => (o == null ? void 0 : o.key) === "formContent");
|
|
645
|
+
u != null && u.contents ? (u.contents = g.value, d = d == null ? void 0 : d.map((o) => ((o == null ? void 0 : o.key) === "formContent" && (o.contents = g.value), o))) : d.push({
|
|
646
|
+
key: "formContent",
|
|
647
|
+
contents: g.value
|
|
648
|
+
}), e("change", d);
|
|
649
|
+
},
|
|
650
|
+
{ deep: !0, immediate: !0 }
|
|
651
|
+
), (d, u) => {
|
|
652
|
+
const o = Ce("el-button");
|
|
653
|
+
return ie(), ue("div", el, [
|
|
654
|
+
v("div", ll, [
|
|
655
|
+
v("div", nl, [
|
|
656
|
+
u[1] || (u[1] = v("div", null, z("表单信息"), -1)),
|
|
657
|
+
W(o, {
|
|
658
|
+
class: "blue-operate-button",
|
|
659
|
+
icon: "ele-Plus",
|
|
660
|
+
onClick: k
|
|
661
|
+
}, {
|
|
662
|
+
default: V(() => u[0] || (u[0] = [
|
|
663
|
+
I(z("新建"))
|
|
664
|
+
])),
|
|
665
|
+
_: 1,
|
|
666
|
+
__: [0]
|
|
667
|
+
})
|
|
668
|
+
]),
|
|
669
|
+
v("div", tl, [
|
|
670
|
+
W(ee, {
|
|
671
|
+
columns: r.value,
|
|
672
|
+
isShowPagination: !1,
|
|
673
|
+
isShowEdit: !1,
|
|
674
|
+
isMoveColumn: !1,
|
|
675
|
+
tableData: g.value,
|
|
676
|
+
onDeleteRow: m
|
|
677
|
+
}, null, 8, ["columns", "tableData"])
|
|
678
|
+
]),
|
|
679
|
+
v("div", sl, [
|
|
680
|
+
u[3] || (u[3] = v("div", null, z("表单按钮"), -1)),
|
|
681
|
+
W(o, {
|
|
682
|
+
class: "blue-operate-button",
|
|
683
|
+
icon: "ele-Plus",
|
|
684
|
+
onClick: f
|
|
685
|
+
}, {
|
|
686
|
+
default: V(() => u[2] || (u[2] = [
|
|
687
|
+
I(z("新建"))
|
|
688
|
+
])),
|
|
689
|
+
_: 1,
|
|
690
|
+
__: [2]
|
|
691
|
+
})
|
|
692
|
+
]),
|
|
693
|
+
v("div", al, [
|
|
694
|
+
W(ee, {
|
|
695
|
+
columns: c.value,
|
|
696
|
+
isShowPagination: !1,
|
|
697
|
+
isShowEdit: !1,
|
|
698
|
+
isMoveColumn: !1,
|
|
699
|
+
tableData: b.value,
|
|
700
|
+
onDeleteRow: T
|
|
701
|
+
}, null, 8, ["columns", "tableData"])
|
|
702
|
+
]),
|
|
703
|
+
u[4] || (u[4] = v("div", { class: "operate-title" }, [
|
|
704
|
+
v("div", null, z("表单布局"))
|
|
705
|
+
], -1)),
|
|
706
|
+
v("div", rl, [
|
|
707
|
+
W(fe, {
|
|
708
|
+
rowContents: t.value,
|
|
709
|
+
onChange: j
|
|
710
|
+
}, null, 8, ["rowContents"])
|
|
711
|
+
])
|
|
712
|
+
])
|
|
713
|
+
]);
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
}, cl = /* @__PURE__ */ de(ol, [["__scopeId", "data-v-a36b8468"]]), ln = G([
|
|
717
|
+
{
|
|
718
|
+
name: "表格",
|
|
719
|
+
type: "table",
|
|
720
|
+
comp: "Table",
|
|
721
|
+
icon: "Grid"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: "表单",
|
|
725
|
+
type: "form",
|
|
726
|
+
comp: "Form",
|
|
727
|
+
icon: "Film"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "折叠",
|
|
731
|
+
type: "fold",
|
|
732
|
+
comp: "Fold",
|
|
733
|
+
icon: "Fold"
|
|
734
|
+
}
|
|
735
|
+
]), pl = {
|
|
736
|
+
Table: Pe,
|
|
737
|
+
Form: ze,
|
|
738
|
+
TableOperate: Ie,
|
|
739
|
+
FormOperate: cl,
|
|
740
|
+
Fold: Re
|
|
741
|
+
// 添加其他组件...
|
|
742
|
+
};
|
|
743
|
+
function nn(l) {
|
|
744
|
+
return pl[l] || null;
|
|
745
|
+
}
|
|
746
|
+
const P = [
|
|
747
|
+
{
|
|
748
|
+
key: "FormName",
|
|
749
|
+
value: "Form"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
key: "TableName",
|
|
753
|
+
value: "Table"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
key: "MenuName",
|
|
757
|
+
value: "Menu"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
key: "GroupName",
|
|
761
|
+
value: "Group"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
key: "SystemKey",
|
|
765
|
+
value: "System"
|
|
766
|
+
}
|
|
767
|
+
], D = [
|
|
768
|
+
{
|
|
769
|
+
key: "FormDirect",
|
|
770
|
+
value: "formFlex"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
key: "Form",
|
|
774
|
+
value: "formContent"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
key: "FormButton",
|
|
778
|
+
value: "formButton"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
key: "FormFlex",
|
|
782
|
+
value: "formWrap"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
key: "TableColumns",
|
|
786
|
+
value: "header"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
key: "TableButton",
|
|
790
|
+
value: "extraButton"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
key: "TableLineButton",
|
|
794
|
+
value: "rowButton"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
key: "Table",
|
|
798
|
+
value: "tableContents"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
key: "TableIndex",
|
|
802
|
+
value: "tableIndex"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
key: "Menus",
|
|
806
|
+
value: "menuContents"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
key: "GroupContents",
|
|
810
|
+
value: "groupContents"
|
|
811
|
+
}
|
|
812
|
+
], q = G(0), ul = (l) => {
|
|
813
|
+
const [s, n] = l.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), t = n.replace(/^['"]|['"]$/g, "");
|
|
814
|
+
return { key: e, value: t };
|
|
815
|
+
}, te = (l) => {
|
|
816
|
+
try {
|
|
817
|
+
return JSON.parse(l), !0;
|
|
818
|
+
} catch {
|
|
819
|
+
return !1;
|
|
820
|
+
}
|
|
821
|
+
}, il = (l) => l.includes("$") && l.trim().endsWith("(") ? l + ")" : l, fl = (l) => {
|
|
822
|
+
let s = l;
|
|
823
|
+
const n = [];
|
|
824
|
+
let e = "";
|
|
825
|
+
for (const t of s)
|
|
826
|
+
t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e += t.trim(), a(e).split("{").length - 1 === a(e).split("}").length - 1 && a(e).split("【").length - 1 === a(e).split("】").length - 1 && a(e).split("[").length - 1 === a(e).split("]").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("/*").length - 1 === a(e).split("*/").length - 1 && (n.push(e), e = "")) : n.push(t.trim());
|
|
827
|
+
return n == null ? void 0 : n.filter((t) => t.includes("{"));
|
|
828
|
+
}, dl = (l) => {
|
|
829
|
+
var n;
|
|
830
|
+
let s = [];
|
|
831
|
+
return (n = fl(l.slice(1, -1))) == null || n.forEach((e) => {
|
|
832
|
+
var r, c, b, x;
|
|
833
|
+
let t = ((c = (r = e.slice(1, -1)) == null ? void 0 : r.split(",")) == null ? void 0 : c.length) ?? 1;
|
|
834
|
+
(x = (b = e.slice(1, -1)) == null ? void 0 : b.split(",")) == null || x.forEach((g) => {
|
|
835
|
+
var T, m, j, d, u, o, C, p, i, h, A, _, N;
|
|
836
|
+
let O = g == null ? void 0 : g.split(":"), f = O != null && O[0] ? (O == null ? void 0 : O[1].split("$").length) - 1 === 1 ? ((T = O == null ? void 0 : O[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1")) + ((m = O == null ? void 0 : O[1]) == null ? void 0 : m.replace(/^"(.*)"$/, "$1")) : Array.isArray((d = (j = O == null ? void 0 : O[1]) == null ? void 0 : j.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) && ((C = (o = (u = O == null ? void 0 : O[1]) == null ? void 0 : u.replace(/^"(.*)"$/, "$1")) == null ? void 0 : o.split("(")) == null ? void 0 : C.length) > 1 ? ((p = O == null ? void 0 : O[0]) == null ? void 0 : p.replace(/^"(.*)"$/, "$1")) + ((A = (h = (i = O == null ? void 0 : O[1]) == null ? void 0 : i.replace(/^"(.*)"$/, "$1")) == null ? void 0 : h.split("(")) == null ? void 0 : A[0]) + "()" : (_ = O == null ? void 0 : O[0]) == null ? void 0 : _.replace(/^"(.*)"$/, "$1") : "", k = (O == null ? void 0 : O[1].split("$").length) - 1 === 0 ? (N = O == null ? void 0 : O[1]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1") : "";
|
|
837
|
+
q.value++, s.push({
|
|
838
|
+
id: q.value,
|
|
839
|
+
key: f,
|
|
840
|
+
value: k,
|
|
841
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
842
|
+
width: t,
|
|
843
|
+
extraContent: O == null ? void 0 : O[1]
|
|
844
|
+
});
|
|
845
|
+
});
|
|
846
|
+
}), s;
|
|
847
|
+
}, Ae = (l) => {
|
|
848
|
+
var s, n;
|
|
849
|
+
try {
|
|
850
|
+
const e = l.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
851
|
+
if (a(e).split("{").length - 1 > 1) {
|
|
852
|
+
let t = a(e).replace(/^\{(.*)\}$/, "[$1]");
|
|
853
|
+
if (te(t) && !t.includes("$") || (t = t.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), te(t)) {
|
|
854
|
+
const r = JSON.parse(t);
|
|
855
|
+
let c = [];
|
|
856
|
+
return r == null || r.forEach((b) => {
|
|
857
|
+
var x;
|
|
858
|
+
(x = Object.entries(a(b))) == null || x.forEach((g) => {
|
|
859
|
+
q.value++, c.push({
|
|
860
|
+
id: q.value,
|
|
861
|
+
key: (g == null ? void 0 : g[0]) ?? "",
|
|
862
|
+
value: (g == null ? void 0 : g[1]) === "" ? "" : g == null ? void 0 : g[1],
|
|
863
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
864
|
+
width: Object.keys(a(b)).length
|
|
865
|
+
});
|
|
866
|
+
});
|
|
867
|
+
}), c;
|
|
868
|
+
} else
|
|
869
|
+
return e.trim().startsWith("{{") ? dl(e.trim()) : re(t);
|
|
870
|
+
} else if (te(e)) {
|
|
871
|
+
const t = JSON.parse(e);
|
|
872
|
+
return Object.entries(t).map(([r, c]) => (q.value++, {
|
|
873
|
+
id: q.value,
|
|
874
|
+
key: r,
|
|
875
|
+
value: c === "" ? "" : c,
|
|
876
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
877
|
+
width: 1
|
|
878
|
+
}));
|
|
879
|
+
} else
|
|
880
|
+
return ((s = re(e)) == null ? void 0 : s.length) === 0 ? e : (n = re(e)) == null ? void 0 : n.map((t) => ({
|
|
881
|
+
label: t.label,
|
|
882
|
+
method: il(t.method)
|
|
883
|
+
}));
|
|
884
|
+
} catch (e) {
|
|
885
|
+
return console.error("转换失败:", e), [];
|
|
886
|
+
}
|
|
887
|
+
}, re = (l) => {
|
|
888
|
+
l = l.trim().replace(/^\{|\}$/g, "").trim();
|
|
889
|
+
const s = [];
|
|
890
|
+
let n = 0;
|
|
891
|
+
for (; n < l.length; ) {
|
|
892
|
+
const e = l.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
|
|
893
|
+
if (!e) break;
|
|
894
|
+
const t = e[1];
|
|
895
|
+
n += e[0].length;
|
|
896
|
+
let r = "", c = 0, b = !1, x = "";
|
|
897
|
+
for (let g = n; g < l.length; g++) {
|
|
898
|
+
const O = l[g];
|
|
899
|
+
if ((O === '"' || O === "'") && !b ? (b = !0, x = O) : O === x && b && (b = !1, x = ""), !b && ((O === "{" || O === "(" || O === "[") && c++, (O === "}" || O === ")" || O === "]") && c--, O === "," && c === 0 || g === l.length - 1)) {
|
|
900
|
+
r = l.slice(n, g + 1).trim(), n = g + 1;
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
s.push({
|
|
905
|
+
label: t,
|
|
906
|
+
method: r
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
return s;
|
|
910
|
+
}, yl = (l, s) => {
|
|
911
|
+
try {
|
|
912
|
+
if (P != null && P.find((n) => (n == null ? void 0 : n.key) === s))
|
|
913
|
+
return l.replace(/['"]/g, "").trim();
|
|
914
|
+
if (a(l).split("[").length - 1 > 1) {
|
|
915
|
+
const n = a(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
916
|
+
return JSON.parse(n);
|
|
917
|
+
} else {
|
|
918
|
+
const n = a(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
919
|
+
if (te(n)) {
|
|
920
|
+
const e = JSON.parse(n);
|
|
921
|
+
return Array.isArray(e) ? e.map((t) => ({ label: t })) : e;
|
|
922
|
+
} else
|
|
923
|
+
return Ae(a(l));
|
|
924
|
+
}
|
|
925
|
+
} catch (n) {
|
|
926
|
+
return console.error("解析失败:", n), l;
|
|
927
|
+
}
|
|
928
|
+
}, hl = (l) => ({ [l == null ? void 0 : l.key]: yl(l == null ? void 0 : l.value, l == null ? void 0 : l.key) }), ml = (l) => {
|
|
929
|
+
try {
|
|
930
|
+
if (a(l).split("[").length - 1 > 1) {
|
|
931
|
+
const s = a(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
932
|
+
return JSON.parse(s);
|
|
933
|
+
} else
|
|
934
|
+
return JSON.parse(a(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
935
|
+
} catch (s) {
|
|
936
|
+
return console.error("解析失败:", s), l;
|
|
937
|
+
}
|
|
938
|
+
}, bl = (l) => {
|
|
939
|
+
const s = l.match(/\(([^)]+)\)/);
|
|
940
|
+
return s ? s[1] : "";
|
|
941
|
+
}, kl = (l) => {
|
|
942
|
+
const s = l.match(/^([^(]+)\s*\(/);
|
|
943
|
+
return s ? s[1].trim() : l;
|
|
944
|
+
}, ge = (l) => l.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((s) => s.trim()).filter((s) => s).join("/"), gl = (l) => {
|
|
945
|
+
var c, b;
|
|
946
|
+
let s = [], n = [];
|
|
947
|
+
const e = (c = a(l)) == null ? void 0 : c.map((x) => x == null ? void 0 : x.key), t = [...new Set((b = a(e)) == null ? void 0 : b.map((x) => bl(x)))];
|
|
948
|
+
t == null || t.forEach((x) => {
|
|
949
|
+
let g = l == null ? void 0 : l.filter((k) => k.key.includes(x));
|
|
950
|
+
g == null || g.forEach((k) => {
|
|
951
|
+
k != null && k.key.includes("Menus") && (s.push({
|
|
952
|
+
key: "GroupName",
|
|
953
|
+
value: ge(k == null ? void 0 : k.value)
|
|
954
|
+
}), n.push(ge(k == null ? void 0 : k.value)));
|
|
955
|
+
});
|
|
956
|
+
let O = l == null ? void 0 : l.filter((k) => k.key.includes(x) && !(k != null && k.key.includes("Menus")));
|
|
957
|
+
O = O == null ? void 0 : O.map((k) => (k.key = kl(k.key), k));
|
|
958
|
+
const f = {
|
|
959
|
+
key: "GroupContents",
|
|
960
|
+
value: O
|
|
961
|
+
};
|
|
962
|
+
s.push(f);
|
|
963
|
+
});
|
|
964
|
+
const r = {
|
|
965
|
+
key: "Menus",
|
|
966
|
+
value: n
|
|
967
|
+
};
|
|
968
|
+
return s.unshift(r), s;
|
|
969
|
+
}, Oe = (l) => {
|
|
970
|
+
var s, n;
|
|
971
|
+
if (Array.isArray(Object.keys(l)) && ((s = Object.keys(l)) == null ? void 0 : s.length) > 0) {
|
|
972
|
+
let e = [];
|
|
973
|
+
return (n = Object.entries(l)) == null || n.forEach(([t, r]) => {
|
|
974
|
+
var b, x;
|
|
975
|
+
let c = [];
|
|
976
|
+
if (c.push(t), ((b = Object.keys(r)) == null ? void 0 : b.length) > 0) {
|
|
977
|
+
let g = [];
|
|
978
|
+
g.push((x = Oe(r)) == null ? void 0 : x[0]), c.push(g == null ? void 0 : g[0]);
|
|
979
|
+
}
|
|
980
|
+
e.push(c);
|
|
981
|
+
}), e;
|
|
982
|
+
}
|
|
983
|
+
}, Cl = (l, s) => {
|
|
984
|
+
var e;
|
|
985
|
+
let n = s;
|
|
986
|
+
return Array.isArray(Object.keys(l)) && ((e = Object.entries(l)) == null || e.forEach(([t, r]) => {
|
|
987
|
+
let c = [t];
|
|
988
|
+
if (typeof r == "object" && r !== null) {
|
|
989
|
+
let b = Oe(r);
|
|
990
|
+
b == null || b.forEach((x) => {
|
|
991
|
+
c.push(x);
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
n.push(c);
|
|
995
|
+
})), n;
|
|
996
|
+
}, $l = (l) => {
|
|
997
|
+
const s = {};
|
|
998
|
+
return l.forEach((e) => {
|
|
999
|
+
const t = e.split("/");
|
|
1000
|
+
let r = s;
|
|
1001
|
+
t.forEach((c) => {
|
|
1002
|
+
r[c] || (r[c] = {}), r = r[c];
|
|
1003
|
+
});
|
|
1004
|
+
}), Cl(s, []);
|
|
1005
|
+
}, xe = (l) => $l(l), tn = (l) => {
|
|
1006
|
+
var s, n, e, t, r, c, b, x;
|
|
1007
|
+
try {
|
|
1008
|
+
const g = ye((n = (s = a(l)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), O = (t = (e = a(g)) == null ? void 0 : e.filter((m) => !m.includes("/*"))) == null ? void 0 : t.map((m) => ul(m)), f = gl(O), k = [];
|
|
1009
|
+
if (((r = f == null ? void 0 : f.find((m) => (m == null ? void 0 : m.key) === "Menus")) == null ? void 0 : r.value.length) === 0)
|
|
1010
|
+
return !1;
|
|
1011
|
+
(c = a(f)) == null || c.forEach((m) => {
|
|
1012
|
+
var j, d, u, o, C;
|
|
1013
|
+
P != null && P.find((p) => {
|
|
1014
|
+
var i, h;
|
|
1015
|
+
return ((i = p == null ? void 0 : p.key) == null ? void 0 : i.toUpperCase()) === ((h = m == null ? void 0 : m.key) == null ? void 0 : h.toUpperCase());
|
|
1016
|
+
}) ? k.push({
|
|
1017
|
+
comp: ((j = P == null ? void 0 : P.find((p) => {
|
|
1018
|
+
var i, h;
|
|
1019
|
+
return ((i = p == null ? void 0 : p.key) == null ? void 0 : i.toUpperCase()) === ((h = m == null ? void 0 : m.key) == null ? void 0 : h.toUpperCase());
|
|
1020
|
+
})) == null ? void 0 : j.value) ?? "",
|
|
1021
|
+
name: (d = m == null ? void 0 : m.value) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, ""),
|
|
1022
|
+
compData: []
|
|
1023
|
+
}) : D != null && D.find((p) => {
|
|
1024
|
+
var i, h;
|
|
1025
|
+
return ((i = p == null ? void 0 : p.key) == null ? void 0 : i.toUpperCase()) === ((h = m == null ? void 0 : m.key) == null ? void 0 : h.toUpperCase());
|
|
1026
|
+
}) && ((k == null ? void 0 : k.length) === 0 && (u = m.key) != null && u.includes("Menus") && k.push({
|
|
1027
|
+
comp: "Menu",
|
|
1028
|
+
name: "",
|
|
1029
|
+
compData: []
|
|
1030
|
+
}), (o = k == null ? void 0 : k[(k == null ? void 0 : k.length) - 1]) != null && o.compData && k[(k == null ? void 0 : k.length) - 1].compData.push({
|
|
1031
|
+
key: (C = D == null ? void 0 : D.find((p) => {
|
|
1032
|
+
var i, h;
|
|
1033
|
+
return ((i = p == null ? void 0 : p.key) == null ? void 0 : i.toUpperCase()) === ((h = m == null ? void 0 : m.key) == null ? void 0 : h.toUpperCase());
|
|
1034
|
+
})) == null ? void 0 : C.value,
|
|
1035
|
+
contents: m == null ? void 0 : m.value
|
|
1036
|
+
}));
|
|
1037
|
+
});
|
|
1038
|
+
let T = (b = a(k)) == null ? void 0 : b.map((m) => {
|
|
1039
|
+
var j;
|
|
1040
|
+
return m != null && m.compData && (m.compData = (j = m == null ? void 0 : m.compData) == null ? void 0 : j.map((d) => {
|
|
1041
|
+
var u, o, C, p, i, h, A, _, N, $, B;
|
|
1042
|
+
if ((d == null ? void 0 : d.key) === "formFlex")
|
|
1043
|
+
d.contents = ((o = (u = d.contents) == null ? void 0 : u.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : o.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1044
|
+
else if ((d == null ? void 0 : d.key) === "groupContents")
|
|
1045
|
+
d.contents = (C = a(d.contents)) == null ? void 0 : C.map((E) => hl(a(E)));
|
|
1046
|
+
else if (Array.isArray(d == null ? void 0 : d.contents))
|
|
1047
|
+
d.contents = xe(d.contents);
|
|
1048
|
+
else if (((i = (p = d == null ? void 0 : d.contents) == null ? void 0 : p.trim()) != null && i.startsWith("[") || (A = (h = d.contents) == null ? void 0 : h.trim()) != null && A.startsWith("【")) && ((N = (_ = d.contents) == null ? void 0 : _.trim()) != null && N.endsWith("]") || (B = ($ = d.contents) == null ? void 0 : $.trim()) != null && B.endsWith("】")))
|
|
1049
|
+
d.contents = ml(a(d.contents));
|
|
1050
|
+
else {
|
|
1051
|
+
if (!d.contents) return;
|
|
1052
|
+
d.contents = Ae(a(d.contents));
|
|
1053
|
+
}
|
|
1054
|
+
return d;
|
|
1055
|
+
})), m;
|
|
1056
|
+
});
|
|
1057
|
+
return T = (x = a(T)) == null ? void 0 : x.map((m) => {
|
|
1058
|
+
var j;
|
|
1059
|
+
return (m == null ? void 0 : m.comp) === "Group" && (m.compData = (j = m.compData) == null ? void 0 : j.map((d) => {
|
|
1060
|
+
var o;
|
|
1061
|
+
let u = [];
|
|
1062
|
+
return (o = d.contents) == null || o.forEach((C) => {
|
|
1063
|
+
var p, i, h, A, _, N, $, B, E, F, J, R;
|
|
1064
|
+
if (P != null && P.find((S) => {
|
|
1065
|
+
var y, U, L;
|
|
1066
|
+
return ((y = S == null ? void 0 : S.key) == null ? void 0 : y.toUpperCase()) === ((L = (U = Object.keys(C)) == null ? void 0 : U[0]) == null ? void 0 : L.toUpperCase());
|
|
1067
|
+
}))
|
|
1068
|
+
u.push({
|
|
1069
|
+
comp: (p = P == null ? void 0 : P.find((S) => {
|
|
1070
|
+
var y, U, L;
|
|
1071
|
+
return ((y = S == null ? void 0 : S.key) == null ? void 0 : y.toUpperCase()) === ((L = (U = Object.keys(C)) == null ? void 0 : U[0]) == null ? void 0 : L.toUpperCase());
|
|
1072
|
+
})) == null ? void 0 : p.value,
|
|
1073
|
+
name: (h = (i = Object.values(C)) == null ? void 0 : i[0]) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
|
|
1074
|
+
compData: []
|
|
1075
|
+
});
|
|
1076
|
+
else if (D != null && D.find((S) => {
|
|
1077
|
+
var y, U, L;
|
|
1078
|
+
return ((y = S == null ? void 0 : S.key) == null ? void 0 : y.toUpperCase()) === ((L = (U = Object.keys(C)) == null ? void 0 : U[0]) == null ? void 0 : L.toUpperCase());
|
|
1079
|
+
})) {
|
|
1080
|
+
if ((u == null ? void 0 : u.length) === 0) return;
|
|
1081
|
+
(A = u == null ? void 0 : u[(u == null ? void 0 : u.length) - 1]) != null && A.compData && u[(u == null ? void 0 : u.length) - 1].compData.push({
|
|
1082
|
+
key: (_ = D == null ? void 0 : D.find((S) => {
|
|
1083
|
+
var y, U, L;
|
|
1084
|
+
return ((y = S == null ? void 0 : S.key) == null ? void 0 : y.toUpperCase()) === ((L = (U = Object.keys(C)) == null ? void 0 : U[0]) == null ? void 0 : L.toUpperCase());
|
|
1085
|
+
})) == null ? void 0 : _.value,
|
|
1086
|
+
contents: (N = Object.values(C)) == null ? void 0 : N[0]
|
|
1087
|
+
});
|
|
1088
|
+
} else if ((B = ($ = Object.keys(C)) == null ? void 0 : $[0]) != null && B.includes("$")) {
|
|
1089
|
+
const S = (F = (E = Object.keys(a(C))) == null ? void 0 : E[0]) == null ? void 0 : F.split("$");
|
|
1090
|
+
u[(u == null ? void 0 : u.length) - 1].compData.push({
|
|
1091
|
+
key: (J = D == null ? void 0 : D.find((y) => {
|
|
1092
|
+
var U, L;
|
|
1093
|
+
return ((U = y == null ? void 0 : y.key) == null ? void 0 : U.toUpperCase()) === ((L = S == null ? void 0 : S[0]) == null ? void 0 : L.toUpperCase());
|
|
1094
|
+
})) == null ? void 0 : J.value,
|
|
1095
|
+
contents: (R = Object.values(C)) == null ? void 0 : R[0],
|
|
1096
|
+
selectLabel: S == null ? void 0 : S[1]
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
return C;
|
|
1100
|
+
}), d.contents = u, d;
|
|
1101
|
+
})), m;
|
|
1102
|
+
}), T;
|
|
1103
|
+
} catch {
|
|
1104
|
+
return !1;
|
|
1105
|
+
}
|
|
1106
|
+
}, K = (l) => {
|
|
1107
|
+
try {
|
|
1108
|
+
return JSON.parse(l), !0;
|
|
1109
|
+
} catch {
|
|
1110
|
+
return !1;
|
|
1111
|
+
}
|
|
1112
|
+
}, Te = (l) => {
|
|
1113
|
+
const s = [];
|
|
1114
|
+
let n = null;
|
|
1115
|
+
for (let e = 0; e < l.length; e++) {
|
|
1116
|
+
const t = l[e];
|
|
1117
|
+
if (Array.isArray(t))
|
|
1118
|
+
n && (n.children = Te(t));
|
|
1119
|
+
else {
|
|
1120
|
+
const r = { label: t };
|
|
1121
|
+
s.push(r), n = r;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
return s;
|
|
1125
|
+
}, _e = (l) => {
|
|
1126
|
+
let s = 0;
|
|
1127
|
+
for (const n of l)
|
|
1128
|
+
s++, n.children && (s += _e(n.children));
|
|
1129
|
+
return s;
|
|
1130
|
+
}, Ee = (l, s, n = []) => {
|
|
1131
|
+
let e = 0;
|
|
1132
|
+
for (const t of s) {
|
|
1133
|
+
if (e >= l.length) break;
|
|
1134
|
+
const r = [...l[e]];
|
|
1135
|
+
if (n.push(r), e++, t.children && t.children.length > 0) {
|
|
1136
|
+
const c = [];
|
|
1137
|
+
Ee(
|
|
1138
|
+
l.slice(e),
|
|
1139
|
+
t.children,
|
|
1140
|
+
c
|
|
1141
|
+
), c.length > 0 && (r.push(c), e += _e(t.children));
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
return n;
|
|
1145
|
+
}, Al = (l, s) => {
|
|
1146
|
+
let n = [];
|
|
1147
|
+
return l == null || l.forEach((t) => {
|
|
1148
|
+
t.some((r) => Array.isArray(r)) ? n.push(...t) : n.push(t);
|
|
1149
|
+
}), Ee(n, s);
|
|
1150
|
+
}, ce = (l) => {
|
|
1151
|
+
const s = { label: l[0] };
|
|
1152
|
+
if (l.length > 1) {
|
|
1153
|
+
const n = l.slice(1);
|
|
1154
|
+
n.length === 1 && Array.isArray(n[0]) ? s.children = n[0].map(
|
|
1155
|
+
(e) => Array.isArray(e) ? ce(e) : { label: e }
|
|
1156
|
+
) : s.children = n.map(
|
|
1157
|
+
(e) => Array.isArray(e) ? ce(e) : { label: e }
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
return s;
|
|
1161
|
+
}, Ol = (l) => {
|
|
1162
|
+
var n;
|
|
1163
|
+
return (n = a(l)) == null ? void 0 : n.map((e) => {
|
|
1164
|
+
let t = [];
|
|
1165
|
+
return e == null || e.forEach((r) => {
|
|
1166
|
+
t.push(ce(r));
|
|
1167
|
+
}), t;
|
|
1168
|
+
});
|
|
1169
|
+
}, Ne = (l, s, n) => {
|
|
1170
|
+
let e = l, t = n, r = s;
|
|
1171
|
+
return r.children && (Array.isArray(t[t.length - 1]) ? t[t.length - 1].push(e[0]) : t.push(e[0]), e.shift(), r = r.children), r.forEach((c) => {
|
|
1172
|
+
if (c.children) {
|
|
1173
|
+
const b = Ne(e, c, t);
|
|
1174
|
+
t = b[0], e = b[1];
|
|
1175
|
+
}
|
|
1176
|
+
}), [t, e];
|
|
1177
|
+
}, xl = (l, s) => {
|
|
1178
|
+
let n = l;
|
|
1179
|
+
const e = [];
|
|
1180
|
+
return s == null || s.forEach((t) => {
|
|
1181
|
+
let r = n == null ? void 0 : n[0];
|
|
1182
|
+
n.shift();
|
|
1183
|
+
const c = Ne(a(n), t, r);
|
|
1184
|
+
r = c[0], n = c[1], e.push(r);
|
|
1185
|
+
}), e;
|
|
1186
|
+
}, Tl = (l, s) => {
|
|
1187
|
+
const n = Ol(a(l));
|
|
1188
|
+
return xl(n, s);
|
|
1189
|
+
}, _l = (l) => {
|
|
1190
|
+
var c, b, x, g, O, f;
|
|
1191
|
+
const s = [], n = Te((b = (c = l == null ? void 0 : l.find((k) => k.key === "tableIndex")) == null ? void 0 : c.value) == null ? void 0 : b[0]);
|
|
1192
|
+
s.push({
|
|
1193
|
+
key: "tableIndex",
|
|
1194
|
+
contents: n
|
|
1195
|
+
});
|
|
1196
|
+
let e = [];
|
|
1197
|
+
const t = (x = l == null ? void 0 : l.find((k) => k.key === "tableColumns")) == null ? void 0 : x.value;
|
|
1198
|
+
t.length === 1 && !(t != null && t[0].some((k) => Array.isArray(k))) ? e = (g = t == null ? void 0 : t[0]) == null ? void 0 : g.map((k) => ({ label: k })) : e = Tl((O = l == null ? void 0 : l.find((k) => k.key === "tableColumns")) == null ? void 0 : O.value, n), s.push({
|
|
1199
|
+
key: "header",
|
|
1200
|
+
contents: e
|
|
1201
|
+
});
|
|
1202
|
+
const r = Al((f = l == null ? void 0 : l.find((k) => k.key === "tableContents")) == null ? void 0 : f.value, n);
|
|
1203
|
+
return s.push({
|
|
1204
|
+
key: "tableContents",
|
|
1205
|
+
contents: r
|
|
1206
|
+
}), s;
|
|
1207
|
+
}, ye = (l) => {
|
|
1208
|
+
let s;
|
|
1209
|
+
l.replaceAll(" ", `\r
|
|
1210
|
+
`).includes(`\r
|
|
1211
|
+
`) ? s = l.replaceAll(" ", `\r
|
|
1212
|
+
`).split(`\r
|
|
1213
|
+
`).filter((t) => t.trim() !== "") : s = l.replaceAll(" ", `\r
|
|
1214
|
+
`).split(`
|
|
1215
|
+
`).filter((t) => t.trim() !== "");
|
|
1216
|
+
const n = [];
|
|
1217
|
+
let e = "";
|
|
1218
|
+
for (const t of s)
|
|
1219
|
+
t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e += t.trim(), a(e).split("{").length - 1 === a(e).split("}").length - 1 && a(e).split("【").length - 1 === a(e).split("】").length - 1 && a(e).split("[").length - 1 === a(e).split("]").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("/*").length - 1 === a(e).split("*/").length - 1 && e[e.length - 1] !== "," && (n.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : n.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1220
|
+
return n;
|
|
1221
|
+
}, El = (l) => {
|
|
1222
|
+
const [s, n] = l.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), t = n.replace(/^['"]|['"]$/g, "");
|
|
1223
|
+
return { key: e, value: t };
|
|
1224
|
+
}, he = (l) => {
|
|
1225
|
+
let s;
|
|
1226
|
+
l.includes(":") ? s = l.split(":").filter((t) => t.trim() !== "") : s = l.split(":").filter((t) => t.trim() !== "");
|
|
1227
|
+
const n = [];
|
|
1228
|
+
let e = "";
|
|
1229
|
+
for (const t of s)
|
|
1230
|
+
t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e = e !== "" ? e + ":" + t.trim() : t.trim(), a(e).split("{").length - 1 === a(e).split("}").length - 1 && a(e).split("【").length - 1 === a(e).split("】").length - 1 && a(e).split("[").length - 1 === a(e).split("]").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("(").length - 1 === a(e).split(")").length - 1 && a(e).split("/*").length - 1 === a(e).split("*/").length - 1 && (n.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : n.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1231
|
+
return n;
|
|
1232
|
+
}, me = (l) => /^[\x00-\x7F]*$/.test(l), Nl = (l) => {
|
|
1233
|
+
var t;
|
|
1234
|
+
const s = l.map((r) => {
|
|
1235
|
+
var b, x;
|
|
1236
|
+
let c = (x = (b = r.key.split("(")) == null ? void 0 : b[1]) == null ? void 0 : x.trim();
|
|
1237
|
+
return c.slice(0, c.length - 1);
|
|
1238
|
+
}), n = s == null ? void 0 : s.map((r) => {
|
|
1239
|
+
var b;
|
|
1240
|
+
return (b = he(r)) == null ? void 0 : b.map((x) => {
|
|
1241
|
+
var g;
|
|
1242
|
+
if (x.includes("{")) {
|
|
1243
|
+
let O = (g = x.split(":")) == null ? void 0 : g[0];
|
|
1244
|
+
x = O.slice(1, O.length);
|
|
1245
|
+
}
|
|
1246
|
+
return x;
|
|
1247
|
+
});
|
|
1248
|
+
}), e = (t = n == null ? void 0 : n.filter((r) => r.length !== 0)) == null ? void 0 : t.map((r) => {
|
|
1249
|
+
let c = "";
|
|
1250
|
+
return r.forEach((b) => {
|
|
1251
|
+
!me(b) && !b.includes("{") && (c = c === "" ? c + a(b) : c + "/" + a(b));
|
|
1252
|
+
}), c;
|
|
1253
|
+
});
|
|
1254
|
+
return xe([...new Set(e)]);
|
|
1255
|
+
}, je = (l) => {
|
|
1256
|
+
var n, e;
|
|
1257
|
+
const s = (e = (n = l.split("(")) == null ? void 0 : n[1]) == null ? void 0 : e.trim();
|
|
1258
|
+
return s.slice(0, s.length - 1);
|
|
1259
|
+
}, jl = (l) => {
|
|
1260
|
+
var t;
|
|
1261
|
+
if (!l) return;
|
|
1262
|
+
const s = je(l), n = (t = he(s)) == null ? void 0 : t.map((r) => {
|
|
1263
|
+
var c;
|
|
1264
|
+
if (r.includes("{")) {
|
|
1265
|
+
let b = (c = r.split(":")) == null ? void 0 : c[0];
|
|
1266
|
+
r = b.slice(1, b.length);
|
|
1267
|
+
}
|
|
1268
|
+
return r;
|
|
1269
|
+
});
|
|
1270
|
+
let e = "";
|
|
1271
|
+
return n.forEach((r) => {
|
|
1272
|
+
me(r) || (e = e === "" ? e + a(r) : e + "/" + a(r));
|
|
1273
|
+
}), e;
|
|
1274
|
+
}, Sl = (l) => {
|
|
1275
|
+
const s = l.match(/\[(.*)\]/s);
|
|
1276
|
+
if (s) {
|
|
1277
|
+
const n = `[${s[1]}]`;
|
|
1278
|
+
try {
|
|
1279
|
+
const e = n.replace(/([^\[\],\s]+)/g, '"$1"');
|
|
1280
|
+
return JSON.parse(e);
|
|
1281
|
+
} catch (e) {
|
|
1282
|
+
console.error("解析失败:", e);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}, Fl = (l) => {
|
|
1286
|
+
var r;
|
|
1287
|
+
if (!l) return;
|
|
1288
|
+
const s = je(l);
|
|
1289
|
+
let n = [], e = [], t = [];
|
|
1290
|
+
return (r = he(s)) == null || r.forEach((c) => {
|
|
1291
|
+
var b;
|
|
1292
|
+
c.includes("[") ? n.push(Sl(c)) : c.includes("{") && (me((b = c.slice(1, c.length - 1).split(":")) == null ? void 0 : b[0]) ? t.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : K(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'))) : e.push(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
|
|
1293
|
+
}), [n, e, t];
|
|
1294
|
+
}, Ul = (l) => {
|
|
1295
|
+
const s = [];
|
|
1296
|
+
let n = "";
|
|
1297
|
+
for (const e of l)
|
|
1298
|
+
e.includes("[") || n.includes("[") || e.includes("/*") || n.includes("/*") ? (n += e.trim(), a(n).split("{").length - 1 === a(n).split("}").length - 1 && a(n).split("【").length - 1 === a(n).split("】").length - 1 && a(n).split("[").length - 1 === a(n).split("]").length - 1 && a(n).split("(").length - 1 === a(n).split(")").length - 1 && a(n).split("(").length - 1 === a(n).split(")").length - 1 && a(n).split("/*").length - 1 === a(n).split("*/").length - 1 && (s.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "")) : s.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1299
|
+
return s;
|
|
1300
|
+
}, Jl = (l) => {
|
|
1301
|
+
var t, r, c, b, x;
|
|
1302
|
+
let s = [], n = [], e = l.trim();
|
|
1303
|
+
if (!(e.trim().includes("输入") && e.trim().includes("输出"))) {
|
|
1304
|
+
const g = (t = e.trim().split(",$")) == null ? void 0 : t[0];
|
|
1305
|
+
g[0] === "[" ? e = g.slice(1, g.length - 1) : e.includes(",$") && (e = (r = e.trim().split(",$")) == null ? void 0 : r[0]);
|
|
1306
|
+
let O;
|
|
1307
|
+
e.includes("$") ? e = a(e) : O = (b = (c = a(e).split("}")) == null ? void 0 : c.filter((f) => f !== "")) == null ? void 0 : b.map((f) => {
|
|
1308
|
+
let k = f;
|
|
1309
|
+
return k[0] === "," ? k = k.slice(2, k.length) : k = k.slice(1, k.length), k;
|
|
1310
|
+
}), (x = a(O)) == null || x.forEach((f) => {
|
|
1311
|
+
var k, T, m, j, d, u, o, C, p, i, h, A;
|
|
1312
|
+
if (!f.includes("=="))
|
|
1313
|
+
K((k = f == null ? void 0 : f.split(":")) == null ? void 0 : k[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"')) && s.push(JSON.parse((T = f == null ? void 0 : f.split(":")) == null ? void 0 : T[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))), K((m = f == null ? void 0 : f.split(":")) == null ? void 0 : m[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"')) ? n.push(JSON.parse((j = f == null ? void 0 : f.split(":")) == null ? void 0 : j[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : K((d = f == null ? void 0 : f.split(":")) == null ? void 0 : d[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')) && n.push(JSON.parse((u = f == null ? void 0 : f.split(":")) == null ? void 0 : u[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
|
|
1314
|
+
else {
|
|
1315
|
+
const _ = (o = f == null ? void 0 : f.split(":")) == null ? void 0 : o[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'), N = (C = f == null ? void 0 : f.split(":")) == null ? void 0 : C[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
|
|
1316
|
+
if (K(N.trim()) ? n.push(JSON.parse(N.trim())) : n.push(JSON.parse(N.replaceAll("'", '"').trim())), _[0] !== "[") {
|
|
1317
|
+
let $ = [];
|
|
1318
|
+
$.push(JSON.parse((p = _.split("==")) == null ? void 0 : p[0].trim())), $.push(JSON.parse((i = _.split("==")) == null ? void 0 : i[1].trim())), s.push($);
|
|
1319
|
+
} else {
|
|
1320
|
+
const $ = (h = _.slice(1, _.length - 1).replaceAll(",", ",|")) == null ? void 0 : h.split("|"), B = (A = Ul($)) == null ? void 0 : A.map((F) => ((F == null ? void 0 : F[F.length - 1]) === "," && (F = F.slice(0, F.length - 1)), F));
|
|
1321
|
+
let E = [];
|
|
1322
|
+
B == null || B.forEach((F) => {
|
|
1323
|
+
var R, S, y, U;
|
|
1324
|
+
let J = [];
|
|
1325
|
+
J.push((R = F.split("==")) == null ? void 0 : R[0].trim().replace(/^"|"$/g, "")), ((S = F.split("==")) == null ? void 0 : S[1].trim()[0]) === "[" ? J.push(JSON.parse((y = F.split("==")) == null ? void 0 : y[1].trim())) : J.push([JSON.parse((U = F.split("==")) == null ? void 0 : U[1].trim())]), E.push(J);
|
|
1326
|
+
}), s.push(E);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
return [s, n];
|
|
1332
|
+
}, Dl = (l) => {
|
|
1333
|
+
const s = [], n = jl(l == null ? void 0 : l.key), e = Fl(l == null ? void 0 : l.key), t = Jl(l == null ? void 0 : l.value), r = e == null ? void 0 : e[0], c = e == null ? void 0 : e[1], b = e == null ? void 0 : e[2], x = t == null ? void 0 : t[0], g = t == null ? void 0 : t[1];
|
|
1334
|
+
return n && s.push({
|
|
1335
|
+
key: "contentPath",
|
|
1336
|
+
value: n
|
|
1337
|
+
}), (r == null ? void 0 : r.length) > 0 && s.push({
|
|
1338
|
+
key: "tableIndex",
|
|
1339
|
+
value: r
|
|
1340
|
+
}), (c == null ? void 0 : c.length) > 0 && s.push({
|
|
1341
|
+
key: "form",
|
|
1342
|
+
value: c
|
|
1343
|
+
}), (b == null ? void 0 : b.length) > 0 && s.push({
|
|
1344
|
+
key: "extra",
|
|
1345
|
+
value: b
|
|
1346
|
+
}), (x == null ? void 0 : x.length) > 0 && s.push({
|
|
1347
|
+
key: "tableColumns",
|
|
1348
|
+
value: x
|
|
1349
|
+
}), (g == null ? void 0 : g.length) > 0 && s.push({
|
|
1350
|
+
key: "tableContents",
|
|
1351
|
+
value: g
|
|
1352
|
+
}), s;
|
|
1353
|
+
}, Pl = (l) => {
|
|
1354
|
+
const s = [];
|
|
1355
|
+
return l == null || l.forEach((n) => {
|
|
1356
|
+
var r, c, b, x, g, O, f, k, T;
|
|
1357
|
+
const e = [], t = (c = (r = n.find((m) => m.key === "tableIndex")) == null ? void 0 : r.value) == null ? void 0 : c[0];
|
|
1358
|
+
if (t && !t.some((m) => Array.isArray(m))) {
|
|
1359
|
+
const m = (x = (b = n.find((j) => j.key === "tableColumns")) == null ? void 0 : b.value) == null ? void 0 : x[0];
|
|
1360
|
+
e.push({
|
|
1361
|
+
key: "tableIndex",
|
|
1362
|
+
contents: t == null ? void 0 : t.map((j) => ({ label: j }))
|
|
1363
|
+
}), e.push({
|
|
1364
|
+
key: "header",
|
|
1365
|
+
contents: Array.isArray(m) ? m == null ? void 0 : m.map((j) => ({ label: j })) : [m].map((j) => ({ label: j }))
|
|
1366
|
+
}), e.push({
|
|
1367
|
+
key: "tableContents",
|
|
1368
|
+
contents: Array.isArray(m) ? (O = (g = n.find((j) => j.key === "tableContents")) == null ? void 0 : g.value) == null ? void 0 : O[0] : (T = (k = (f = n.find((j) => j.key === "tableContents")) == null ? void 0 : f.value) == null ? void 0 : k[0]) == null ? void 0 : T.map((j) => [j])
|
|
1369
|
+
}), s.push({
|
|
1370
|
+
comp: "Table",
|
|
1371
|
+
name: "",
|
|
1372
|
+
compData: e
|
|
1373
|
+
});
|
|
1374
|
+
} else t && s.push({
|
|
1375
|
+
comp: "Table",
|
|
1376
|
+
name: "",
|
|
1377
|
+
compData: _l(n)
|
|
1378
|
+
});
|
|
1379
|
+
}), s;
|
|
1380
|
+
}, Bl = (l) => {
|
|
1381
|
+
var e, t;
|
|
1382
|
+
const s = l.map((r) => r.filter((c) => c.key !== "contentPath"));
|
|
1383
|
+
return {
|
|
1384
|
+
comp: "Group",
|
|
1385
|
+
compData: [{
|
|
1386
|
+
contents: Pl(s),
|
|
1387
|
+
key: "groupContents"
|
|
1388
|
+
}],
|
|
1389
|
+
name: (t = (e = l[0]) == null ? void 0 : e.find((r) => r.key === "contentPath")) == null ? void 0 : t.value
|
|
1390
|
+
};
|
|
1391
|
+
}, Rl = (l) => {
|
|
1392
|
+
const s = [], n = a(l).map((t) => {
|
|
1393
|
+
var r;
|
|
1394
|
+
if (t != null && t.find((c) => (c == null ? void 0 : c.key) === "contentPath"))
|
|
1395
|
+
return (r = t == null ? void 0 : t.find((c) => (c == null ? void 0 : c.key) === "contentPath")) == null ? void 0 : r.value;
|
|
1396
|
+
}).filter((t) => t !== ""), e = [...new Set(n)];
|
|
1397
|
+
return e == null || e.forEach((t) => {
|
|
1398
|
+
var r;
|
|
1399
|
+
s.push(Bl((r = a(l)) == null ? void 0 : r.filter((c) => c.find((b) => b.key === "contentPath" && b.value === t))));
|
|
1400
|
+
}), s;
|
|
1401
|
+
}, Gl = (l) => {
|
|
1402
|
+
let s = [];
|
|
1403
|
+
s.push({
|
|
1404
|
+
comp: "Menu",
|
|
1405
|
+
compData: [{
|
|
1406
|
+
contents: Nl(a(l)),
|
|
1407
|
+
key: "menuContents"
|
|
1408
|
+
}],
|
|
1409
|
+
name: ""
|
|
1410
|
+
});
|
|
1411
|
+
const n = l.map((e) => Dl(e));
|
|
1412
|
+
return s = [...s, ...Rl(n)], s;
|
|
1413
|
+
}, sn = (l) => {
|
|
1414
|
+
var t, r, c, b, x;
|
|
1415
|
+
const s = (c = ye((r = (t = a(l)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : r.replace(")", ")"))) == null ? void 0 : c.filter((g) => g !== ""), n = (x = (b = a(s)) == null ? void 0 : b.filter((g) => !g.includes("/*"))) == null ? void 0 : x.map((g) => El(g));
|
|
1416
|
+
return Gl(n);
|
|
1417
|
+
}, ne = G(0), oe = G(0), vl = (l) => {
|
|
1418
|
+
const s = l.trim().replace(/^'|'$/g, ""), n = /((?:\$?[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 = {};
|
|
1419
|
+
let t;
|
|
1420
|
+
for (; (t = n.exec(s)) !== null; ) {
|
|
1421
|
+
const r = t[1];
|
|
1422
|
+
let c = t[2].trim();
|
|
1423
|
+
(c.match(/\[/g) || []).length !== (c.match(/\]/g) || []).length && (c = c == null ? void 0 : c.replace(/]$/, "")), e[r] ? (e[r + oe.value] && oe.value++, e[r + oe.value] = r + "=" + c) : e[r] = r + "=" + c;
|
|
1424
|
+
}
|
|
1425
|
+
return e;
|
|
1426
|
+
}, Se = (l) => {
|
|
1427
|
+
const [s, n] = l.split("=").map((r) => r.trim()), e = s.replace(/['"]/g, ""), t = n.replace(/^['"]|['"]$/g, "");
|
|
1428
|
+
return { key: e, value: t };
|
|
1429
|
+
}, Ll = (l) => {
|
|
1430
|
+
var c;
|
|
1431
|
+
let s = [];
|
|
1432
|
+
const [n, e] = l.split(/=(.+)/), t = n.replace(/['"]/g, "").trim(), r = e.replace(/^['"]|['"]$/g, "");
|
|
1433
|
+
return (c = Object.values(vl(r))) == null || c.forEach((b) => {
|
|
1434
|
+
s.push(Se(b));
|
|
1435
|
+
}), { key: t, value: s };
|
|
1436
|
+
}, se = (l) => {
|
|
1437
|
+
try {
|
|
1438
|
+
return JSON.parse(l), !0;
|
|
1439
|
+
} catch {
|
|
1440
|
+
return !1;
|
|
1441
|
+
}
|
|
1442
|
+
}, Fe = (l) => {
|
|
1443
|
+
try {
|
|
1444
|
+
const s = l.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1445
|
+
if (a(s).split("{").length - 1 > 1) {
|
|
1446
|
+
let n = a(s).replace(/^\{(.*)\}$/, "[$1]");
|
|
1447
|
+
if (se(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), se(n)) {
|
|
1448
|
+
const e = JSON.parse(n);
|
|
1449
|
+
let t = [];
|
|
1450
|
+
return e == null || e.forEach((r) => {
|
|
1451
|
+
var c;
|
|
1452
|
+
(c = Object.entries(a(r))) == null || c.forEach((b) => {
|
|
1453
|
+
ne.value++, t.push({
|
|
1454
|
+
id: ne.value,
|
|
1455
|
+
key: (b == null ? void 0 : b[0]) ?? "",
|
|
1456
|
+
value: (b == null ? void 0 : b[1]) === "" ? "" : b == null ? void 0 : b[1],
|
|
1457
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1458
|
+
width: Object.keys(a(r)).length
|
|
1459
|
+
});
|
|
1460
|
+
});
|
|
1461
|
+
}), t;
|
|
1462
|
+
} else
|
|
1463
|
+
return console.error("转换类型不正确:"), [];
|
|
1464
|
+
} else if (se(s)) {
|
|
1465
|
+
const n = JSON.parse(s);
|
|
1466
|
+
return Object.entries(n).map(([e, t]) => (ne.value++, {
|
|
1467
|
+
id: ne.value,
|
|
1468
|
+
key: e,
|
|
1469
|
+
value: t === "" ? "" : t,
|
|
1470
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1471
|
+
width: 1
|
|
1472
|
+
}));
|
|
1473
|
+
} else
|
|
1474
|
+
return s;
|
|
1475
|
+
} catch (s) {
|
|
1476
|
+
return console.error("转换失败:", s), [];
|
|
1477
|
+
}
|
|
1478
|
+
}, Wl = (l, s) => {
|
|
1479
|
+
try {
|
|
1480
|
+
if (P != null && P.find((n) => (n == null ? void 0 : n.key) === s))
|
|
1481
|
+
return JSON.parse(l.replace(/[’]|[‘]|[']/g, '"'));
|
|
1482
|
+
if (a(l).split("[").length - 1 > 1) {
|
|
1483
|
+
const n = a(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1484
|
+
return JSON.parse(n);
|
|
1485
|
+
} else {
|
|
1486
|
+
const n = a(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1487
|
+
if (se(n)) {
|
|
1488
|
+
const e = JSON.parse(n);
|
|
1489
|
+
return Array.isArray(e) ? e.map((t) => ({ label: t })) : e;
|
|
1490
|
+
} else
|
|
1491
|
+
return Fe(a(l));
|
|
1492
|
+
}
|
|
1493
|
+
} catch (n) {
|
|
1494
|
+
return console.error("解析失败:", n), l;
|
|
1495
|
+
}
|
|
1496
|
+
}, zl = (l) => ({ [l == null ? void 0 : l.key]: Wl(l == null ? void 0 : l.value, l == null ? void 0 : l.key) }), Zl = (l) => {
|
|
1497
|
+
try {
|
|
1498
|
+
if (a(l).split("[").length - 1 > 1) {
|
|
1499
|
+
const s = a(l).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1500
|
+
return JSON.parse(s);
|
|
1501
|
+
} else
|
|
1502
|
+
return JSON.parse(a(l).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1503
|
+
} catch (s) {
|
|
1504
|
+
return console.error("解析失败:", s), l;
|
|
1505
|
+
}
|
|
1506
|
+
}, Ue = (l) => {
|
|
1507
|
+
var s, n, e, t, r, c;
|
|
1508
|
+
try {
|
|
1509
|
+
const b = ye((n = (s = a(l)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), x = (e = a(b)) == null ? void 0 : e.map((f) => {
|
|
1510
|
+
var T, m;
|
|
1511
|
+
let k = (m = (T = a(f)) == null ? void 0 : T.split("=")) == null ? void 0 : m[0];
|
|
1512
|
+
return k != null && k.includes("GroupContents") ? Ll(f) : Se(f);
|
|
1513
|
+
}), g = [];
|
|
1514
|
+
(t = a(x)) == null || t.forEach((f) => {
|
|
1515
|
+
var k, T, m, j, d;
|
|
1516
|
+
P != null && P.find((u) => {
|
|
1517
|
+
var o, C;
|
|
1518
|
+
return ((o = u == null ? void 0 : u.key) == null ? void 0 : o.toUpperCase()) === ((C = f == null ? void 0 : f.key) == null ? void 0 : C.toUpperCase());
|
|
1519
|
+
}) ? g.push({
|
|
1520
|
+
comp: ((k = P == null ? void 0 : P.find((u) => {
|
|
1521
|
+
var o, C;
|
|
1522
|
+
return ((o = u == null ? void 0 : u.key) == null ? void 0 : o.toUpperCase()) === ((C = f == null ? void 0 : f.key) == null ? void 0 : C.toUpperCase());
|
|
1523
|
+
})) == null ? void 0 : k.value) ?? "",
|
|
1524
|
+
name: (T = f == null ? void 0 : f.value) == null ? void 0 : T.replace(/[’]|[‘]|[']/g, ""),
|
|
1525
|
+
compData: []
|
|
1526
|
+
}) : D != null && D.find((u) => {
|
|
1527
|
+
var o, C;
|
|
1528
|
+
return ((o = u == null ? void 0 : u.key) == null ? void 0 : o.toUpperCase()) === ((C = f == null ? void 0 : f.key) == null ? void 0 : C.toUpperCase());
|
|
1529
|
+
}) && ((g == null ? void 0 : g.length) === 0 && (m = f.key) != null && m.includes("Menus") && g.push({
|
|
1530
|
+
comp: "Menu",
|
|
1531
|
+
name: "",
|
|
1532
|
+
compData: []
|
|
1533
|
+
}), (j = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && j.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
1534
|
+
key: (d = D == null ? void 0 : D.find((u) => {
|
|
1535
|
+
var o, C;
|
|
1536
|
+
return ((o = u == null ? void 0 : u.key) == null ? void 0 : o.toUpperCase()) === ((C = f == null ? void 0 : f.key) == null ? void 0 : C.toUpperCase());
|
|
1537
|
+
})) == null ? void 0 : d.value,
|
|
1538
|
+
contents: f == null ? void 0 : f.value
|
|
1539
|
+
}));
|
|
1540
|
+
}), console.log("newContents", g);
|
|
1541
|
+
let O = (r = a(g)) == null ? void 0 : r.map((f) => {
|
|
1542
|
+
var k;
|
|
1543
|
+
return f != null && f.compData && (f.compData = (k = f == null ? void 0 : f.compData) == null ? void 0 : k.map((T) => {
|
|
1544
|
+
var m, j, d, u, o, C, p, i, h, A, _;
|
|
1545
|
+
if ((T == null ? void 0 : T.key) === "formFlex")
|
|
1546
|
+
T.contents = ((j = (m = T.contents) == null ? void 0 : m.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : j.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1547
|
+
else if ((T == null ? void 0 : T.key) === "groupContents")
|
|
1548
|
+
T.contents = (d = a(T.contents)) == null ? void 0 : d.map((N) => zl(a(N)));
|
|
1549
|
+
else if (((o = (u = T.contents) == null ? void 0 : u.trim()) != null && o.startsWith("[") || (p = (C = T.contents) == null ? void 0 : C.trim()) != null && p.startsWith("【")) && ((h = (i = T.contents) == null ? void 0 : i.trim()) != null && h.endsWith("]") || (_ = (A = T.contents) == null ? void 0 : A.trim()) != null && _.endsWith("】")))
|
|
1550
|
+
T.contents = Zl(a(T.contents));
|
|
1551
|
+
else {
|
|
1552
|
+
if (!T.contents) return;
|
|
1553
|
+
T.contents = Fe(a(T.contents));
|
|
1554
|
+
}
|
|
1555
|
+
return T;
|
|
1556
|
+
})), f;
|
|
1557
|
+
});
|
|
1558
|
+
return O = (c = a(O)) == null ? void 0 : c.map((f) => {
|
|
1559
|
+
var k;
|
|
1560
|
+
return (f == null ? void 0 : f.comp) === "Group" && (f.compData = (k = f.compData) == null ? void 0 : k.map((T) => {
|
|
1561
|
+
var j;
|
|
1562
|
+
let m = [];
|
|
1563
|
+
return (j = T.contents) == null || j.forEach((d) => {
|
|
1564
|
+
var u, o, C, p, i, h, A, _, N, $, B, E;
|
|
1565
|
+
if (P != null && P.find((F) => {
|
|
1566
|
+
var J, R, S;
|
|
1567
|
+
return ((J = F == null ? void 0 : F.key) == null ? void 0 : J.toUpperCase()) === ((S = (R = Object.keys(d)) == null ? void 0 : R[0]) == null ? void 0 : S.toUpperCase());
|
|
1568
|
+
}))
|
|
1569
|
+
m.push({
|
|
1570
|
+
comp: (u = P == null ? void 0 : P.find((F) => {
|
|
1571
|
+
var J, R, S;
|
|
1572
|
+
return ((J = F == null ? void 0 : F.key) == null ? void 0 : J.toUpperCase()) === ((S = (R = Object.keys(d)) == null ? void 0 : R[0]) == null ? void 0 : S.toUpperCase());
|
|
1573
|
+
})) == null ? void 0 : u.value,
|
|
1574
|
+
name: (C = (o = Object.values(d)) == null ? void 0 : o[0]) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, ""),
|
|
1575
|
+
compData: []
|
|
1576
|
+
});
|
|
1577
|
+
else if (D != null && D.find((F) => {
|
|
1578
|
+
var J, R, S;
|
|
1579
|
+
return ((J = F == null ? void 0 : F.key) == null ? void 0 : J.toUpperCase()) === ((S = (R = Object.keys(d)) == null ? void 0 : R[0]) == null ? void 0 : S.toUpperCase());
|
|
1580
|
+
})) {
|
|
1581
|
+
if ((m == null ? void 0 : m.length) === 0) return;
|
|
1582
|
+
(p = m == null ? void 0 : m[(m == null ? void 0 : m.length) - 1]) != null && p.compData && m[(m == null ? void 0 : m.length) - 1].compData.push({
|
|
1583
|
+
key: (i = D == null ? void 0 : D.find((F) => {
|
|
1584
|
+
var J, R, S;
|
|
1585
|
+
return ((J = F == null ? void 0 : F.key) == null ? void 0 : J.toUpperCase()) === ((S = (R = Object.keys(d)) == null ? void 0 : R[0]) == null ? void 0 : S.toUpperCase());
|
|
1586
|
+
})) == null ? void 0 : i.value,
|
|
1587
|
+
contents: (h = Object.values(d)) == null ? void 0 : h[0]
|
|
1588
|
+
});
|
|
1589
|
+
} else if ((_ = (A = Object.keys(d)) == null ? void 0 : A[0]) != null && _.includes("$")) {
|
|
1590
|
+
const F = ($ = (N = Object.keys(a(d))) == null ? void 0 : N[0]) == null ? void 0 : $.split("$");
|
|
1591
|
+
m[(m == null ? void 0 : m.length) - 1].compData.push({
|
|
1592
|
+
key: (B = D == null ? void 0 : D.find((J) => {
|
|
1593
|
+
var R, S;
|
|
1594
|
+
return ((R = J == null ? void 0 : J.key) == null ? void 0 : R.toUpperCase()) === ((S = F == null ? void 0 : F[0]) == null ? void 0 : S.toUpperCase());
|
|
1595
|
+
})) == null ? void 0 : B.value,
|
|
1596
|
+
contents: (E = Object.values(d)) == null ? void 0 : E[0],
|
|
1597
|
+
selectLabel: F == null ? void 0 : F[1]
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
return d;
|
|
1601
|
+
}), T.contents = m, T;
|
|
1602
|
+
})), f;
|
|
1603
|
+
}), O;
|
|
1604
|
+
} catch {
|
|
1605
|
+
return !1;
|
|
1606
|
+
}
|
|
1607
|
+
}, an = (l) => Ue(l), rn = (l) => !!Ue(l), Ml = ve(pe), { itemData: on } = $e(Ml), Hl = Ge(pe), { systemKey: cn, activeMenuPath: pn } = $e(Hl), w = G(0), un = (l) => l.reduce((n, e) => {
|
|
1608
|
+
var r, c;
|
|
1609
|
+
const t = Object.values(n);
|
|
1610
|
+
return (((r = Object.keys(n)) == null ? void 0 : r.length) === 0 || t[t.length - 1].length >= (e == null ? void 0 : e.width)) && (n[w.value] = [], w.value++), n[w.value - 1].push(e), ((c = Object.keys(n)) == null ? void 0 : c.length) === (e == null ? void 0 : e.width) && (n[w.value] = [], w.value++), n;
|
|
1611
|
+
}, {});
|
|
1612
|
+
export {
|
|
1613
|
+
un as a,
|
|
1614
|
+
tn as b,
|
|
1615
|
+
sn as c,
|
|
1616
|
+
an as e,
|
|
1617
|
+
nn as g,
|
|
1618
|
+
rn as i,
|
|
1619
|
+
ln as s
|
|
1620
|
+
};
|