ss-component-new 1.1.203 → 1.1.205
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-559oEJXO.js +2439 -0
- package/dist/array-JF6CCAiw.cjs +7 -0
- package/dist/{cloneDeep-CAdgmyte.cjs → cloneDeep-DgLlm_Jw.cjs} +1 -1
- package/dist/{cloneDeep-BLQghEgs.js → cloneDeep-kffz0j_1.js} +1 -1
- package/dist/index-1-nR6fwq.cjs +1 -0
- package/dist/index-38ObDEJY.cjs +1 -0
- package/dist/{index-iHgg-F_A.js → index-BBpo28RV.js} +10 -10
- package/dist/{index-zkm3iJQ1.js → index-BHZ8bNd2.js} +3 -3
- package/dist/{index-tYeHnS70.cjs → index-BTM77A0p.cjs} +6 -6
- package/dist/{index-DpVDVL0C.js → index-BWI4uVaO.js} +13 -12
- package/dist/index-BWnExbkP.cjs +1 -0
- package/dist/{index-CVOu0TLp.js → index-BbCBJn_d.js} +22 -23
- package/dist/{index-C_SFjPGc.js → index-BbYQJXfY.js} +7 -7
- package/dist/{index-C_4U5pAc.cjs → index-Bjnr25kk.cjs} +2 -2
- package/dist/{index-BE4uhsw4.js → index-Br8oy8H7.js} +17 -18
- package/dist/index-Bvyk67qH.cjs +1 -0
- package/dist/{index-Cdua8FdU.js → index-ByzV6Koo.js} +10 -10
- package/dist/{index-8zvtyKvJ.cjs → index-BzA74Y1p.cjs} +1 -1
- package/dist/index-C2PxHmUq.js +192 -0
- package/dist/{index-DwdOlNEH.js → index-CI8WhwPR.js} +1 -1
- package/dist/index-CL9GlVkc.cjs +1 -0
- package/dist/{index-C24hUN_f.js → index-Cku8YAjO.js} +9 -25
- package/dist/{index-D64eMcNi.js → index-CmAGO9_x.js} +60 -61
- package/dist/{index-Dt6dA5b3.cjs → index-CohpVqQ6.cjs} +19 -19
- package/dist/{index-BispWQeW.cjs → index-CpuZnsAt.cjs} +1 -1
- package/dist/{index-Bu89TD1D.js → index-Ctav4Baa.js} +254 -231
- package/dist/{formToTable--4_ply1A.js → index-D25GS4Fu.js} +7 -23
- package/dist/{index-DQrgyQpG.cjs → index-D4FO3D_8.cjs} +1 -1
- package/dist/{index-BtK6i9pV.js → index-D7EBAesk.js} +420 -418
- package/dist/{index-CbQ_9CDv.cjs → index-D7wUxg_x.cjs} +1 -1
- package/dist/index-D8Lvkefh.cjs +1 -0
- package/dist/index-DBaP5Lzq.cjs +1 -0
- package/dist/index-DCGTTpF2.cjs +1 -0
- package/dist/index-DI1EtlEj.js +409 -0
- package/dist/{index-CYzuIrEX.js → index-DIororWD.js} +2 -2
- package/dist/{index-CdFTOAEw.js → index-Da2go7Uv.js} +13 -13
- package/dist/index-Da_uUHWz.cjs +1 -0
- package/dist/index-DdcX3YIo.js +4 -0
- package/dist/{index-B7KlE4Iz.cjs → index-Di-GQc7_.cjs} +1 -1
- package/dist/index-DjnHoGb3.cjs +1 -0
- package/dist/index-Dq97ANpj.cjs +1 -0
- package/dist/{index-CeJhazIQ.js → index-DxiqylE3.js} +1 -1
- package/dist/{index-CIh-8WPZ.js → index-Sz6D3nDL.js} +676 -671
- package/dist/{index-BOCRVlu3.js → index-Uy4ZULgP.js} +6 -6
- package/dist/index-d9UDAExx.cjs +1 -0
- package/dist/{index-DHO-TIRh.js → index-mNyTYmUr.js} +21 -21
- package/dist/index-mnZaFu-c.cjs +1 -0
- package/dist/{index-BMVKpGjH.cjs → index-q5Gg854X.cjs} +1 -1
- package/dist/{index-CZcQb49C.cjs → index-rEsquz6p.cjs} +11 -11
- package/dist/{index-DknHePUM.js → index-rMiaCknf.js} +6 -6
- package/dist/index.vue_vue_type_script_setup_true_lang-CUKF21sz.js +157 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-Dtsi4tHS.cjs +1 -0
- package/dist/{index-Be5FUSN9.js → index.vue_vue_type_script_setup_true_lang-DvtsjpQB.js} +58 -59
- package/dist/{index-Co-2rSih.cjs → index.vue_vue_type_script_setup_true_lang-jGbdA3_K.cjs} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CS0CxTyd.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-2WQdUmow.js} +6 -6
- package/dist/index.vue_vue_type_style_index_0_scoped_997b1786_lang-5kUSujk8.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_fb273504_lang-BLwmOIyf.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_fb273504_lang-CnYwrRxC.js +491 -0
- package/dist/{login-YVUKYLQ_.js → login-BqSU9LPd.js} +2 -2
- package/dist/{login-CHHhxW8B.cjs → login-CG_skqJM.cjs} +1 -1
- package/dist/{main-CxKKAHce.js → main-BoJ9T3Yc.js} +7 -8
- package/dist/main-CJUqYuHI.cjs +1 -0
- package/dist/{menu-CloMe28c.cjs → menu-C29TTYR-.cjs} +1 -1
- package/dist/{menu-ClqeFk6S.js → menu-CCoQanzl.js} +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-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/array-CFjAQKy7.js +0 -2289
- package/dist/array-D7Sl6w5S.cjs +0 -7
- package/dist/formToTable-DfXTizQm.cjs +0 -1
- package/dist/index-70ma5PtB.js +0 -120
- package/dist/index-BE1qDBEi.cjs +0 -1
- package/dist/index-Bh1Og1wO.js +0 -375
- package/dist/index-BoWb2Khh.cjs +0 -1
- package/dist/index-BqiaKavV.cjs +0 -1
- package/dist/index-CNeO7_VE.cjs +0 -1
- package/dist/index-D9RWfn8t.cjs +0 -1
- package/dist/index-DKwl8Syi.cjs +0 -1
- package/dist/index-DU4fEU0q.cjs +0 -1
- package/dist/index-DwBKBHl2.cjs +0 -1
- package/dist/index-S3sfBb6v.cjs +0 -1
- package/dist/index-XKs8yoYm.cjs +0 -1
- package/dist/index-xjDqSCvD.cjs +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-CsHQ7Z5q.cjs +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-DP5Alumh.js +0 -293
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-82FJYtra.js +0 -481
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-DABNQUIV.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-6shkmv3t.cjs +0 -1
- package/dist/main-Ma-ZG7Ku.cjs +0 -1
- package/dist/modelComp-D8PxHDjf.js +0 -26
- package/dist/modelComp-zpEEQ6Tj.cjs +0 -1
|
@@ -0,0 +1,2439 @@
|
|
|
1
|
+
import { u as $l, g as _l, s as Ol } from "./index-Sz6D3nDL.js";
|
|
2
|
+
import { ref as R, watch as ae, createElementBlock as Y, openBlock as z, createVNode as V, resolveComponent as nl, createElementVNode as I, toDisplayString as X, withCtx as se, createTextVNode as ce, Fragment as he, renderList as xe, createBlock as Be, resolveDynamicComponent as je, createCommentVNode as Tl } from "vue";
|
|
3
|
+
import { p as ke, u as tl, g as Ue, b as xl } from "./index-Ctav4Baa.js";
|
|
4
|
+
import { s as Ee, f as vl, a as ue, b as El } from "./index-D7EBAesk.js";
|
|
5
|
+
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { U as Fe, g as Re, a as we, i as Je, S as Ae, b as Dl, c as u } from "./cloneDeep-kffz0j_1.js";
|
|
7
|
+
import { _ as Nl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
|
|
8
|
+
import { s as De, u as Sl } from "./menu-CCoQanzl.js";
|
|
9
|
+
import { _ as Pl, s as Bl } from "./index.vue_vue_type_script_setup_true_lang-CUKF21sz.js";
|
|
10
|
+
import { M as jl, S as Le, e as Ul, i as Ge, b as Me } from "./index-BbYQJXfY.js";
|
|
11
|
+
var Fl = "__lodash_hash_undefined__";
|
|
12
|
+
function Rl(e) {
|
|
13
|
+
return this.__data__.set(e, Fl), this;
|
|
14
|
+
}
|
|
15
|
+
function wl(e) {
|
|
16
|
+
return this.__data__.has(e);
|
|
17
|
+
}
|
|
18
|
+
function ge(e) {
|
|
19
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
20
|
+
for (this.__data__ = new jl(); ++t < n; )
|
|
21
|
+
this.add(e[t]);
|
|
22
|
+
}
|
|
23
|
+
ge.prototype.add = ge.prototype.push = Rl;
|
|
24
|
+
ge.prototype.has = wl;
|
|
25
|
+
function Jl(e, t) {
|
|
26
|
+
for (var n = -1, l = e == null ? 0 : e.length; ++n < l; )
|
|
27
|
+
if (t(e[n], n, e))
|
|
28
|
+
return !0;
|
|
29
|
+
return !1;
|
|
30
|
+
}
|
|
31
|
+
function Ll(e, t) {
|
|
32
|
+
return e.has(t);
|
|
33
|
+
}
|
|
34
|
+
var Gl = 1, Ml = 2;
|
|
35
|
+
function al(e, t, n, l, a, s) {
|
|
36
|
+
var o = n & Gl, i = e.length, f = t.length;
|
|
37
|
+
if (i != f && !(o && f > i))
|
|
38
|
+
return !1;
|
|
39
|
+
var h = s.get(e), k = s.get(t);
|
|
40
|
+
if (h && k)
|
|
41
|
+
return h == t && k == e;
|
|
42
|
+
var A = -1, $ = !0, O = n & Ml ? new ge() : void 0;
|
|
43
|
+
for (s.set(e, t), s.set(t, e); ++A < i; ) {
|
|
44
|
+
var C = e[A], N = t[A];
|
|
45
|
+
if (l)
|
|
46
|
+
var y = o ? l(N, C, A, t, e, s) : l(C, N, A, e, t, s);
|
|
47
|
+
if (y !== void 0) {
|
|
48
|
+
if (y)
|
|
49
|
+
continue;
|
|
50
|
+
$ = !1;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
if (O) {
|
|
54
|
+
if (!Jl(t, function(d, p) {
|
|
55
|
+
if (!Ll(O, p) && (C === d || a(C, d, n, l, s)))
|
|
56
|
+
return O.push(p);
|
|
57
|
+
})) {
|
|
58
|
+
$ = !1;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
} else if (!(C === N || a(C, N, n, l, s))) {
|
|
62
|
+
$ = !1;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return s.delete(e), s.delete(t), $;
|
|
67
|
+
}
|
|
68
|
+
function Il(e) {
|
|
69
|
+
var t = -1, n = Array(e.size);
|
|
70
|
+
return e.forEach(function(l, a) {
|
|
71
|
+
n[++t] = [a, l];
|
|
72
|
+
}), n;
|
|
73
|
+
}
|
|
74
|
+
function Hl(e) {
|
|
75
|
+
var t = -1, n = Array(e.size);
|
|
76
|
+
return e.forEach(function(l) {
|
|
77
|
+
n[++t] = l;
|
|
78
|
+
}), n;
|
|
79
|
+
}
|
|
80
|
+
var Wl = 1, Zl = 2, Kl = "[object Boolean]", ql = "[object Date]", zl = "[object Error]", Ql = "[object Map]", Xl = "[object Number]", Yl = "[object RegExp]", Vl = "[object Set]", en = "[object String]", ln = "[object Symbol]", nn = "[object ArrayBuffer]", tn = "[object DataView]", Ie = Le ? Le.prototype : void 0, $e = Ie ? Ie.valueOf : void 0;
|
|
81
|
+
function an(e, t, n, l, a, s, o) {
|
|
82
|
+
switch (n) {
|
|
83
|
+
case tn:
|
|
84
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
85
|
+
return !1;
|
|
86
|
+
e = e.buffer, t = t.buffer;
|
|
87
|
+
case nn:
|
|
88
|
+
return !(e.byteLength != t.byteLength || !s(new Fe(e), new Fe(t)));
|
|
89
|
+
case Kl:
|
|
90
|
+
case ql:
|
|
91
|
+
case Xl:
|
|
92
|
+
return Ul(+e, +t);
|
|
93
|
+
case zl:
|
|
94
|
+
return e.name == t.name && e.message == t.message;
|
|
95
|
+
case Yl:
|
|
96
|
+
case en:
|
|
97
|
+
return e == t + "";
|
|
98
|
+
case Ql:
|
|
99
|
+
var i = Il;
|
|
100
|
+
case Vl:
|
|
101
|
+
var f = l & Wl;
|
|
102
|
+
if (i || (i = Hl), e.size != t.size && !f)
|
|
103
|
+
return !1;
|
|
104
|
+
var h = o.get(e);
|
|
105
|
+
if (h)
|
|
106
|
+
return h == t;
|
|
107
|
+
l |= Zl, o.set(e, t);
|
|
108
|
+
var k = al(i(e), i(t), l, a, s, o);
|
|
109
|
+
return o.delete(e), k;
|
|
110
|
+
case ln:
|
|
111
|
+
if ($e)
|
|
112
|
+
return $e.call(e) == $e.call(t);
|
|
113
|
+
}
|
|
114
|
+
return !1;
|
|
115
|
+
}
|
|
116
|
+
var sn = 1, rn = Object.prototype, on = rn.hasOwnProperty;
|
|
117
|
+
function cn(e, t, n, l, a, s) {
|
|
118
|
+
var o = n & sn, i = Re(e), f = i.length, h = Re(t), k = h.length;
|
|
119
|
+
if (f != k && !o)
|
|
120
|
+
return !1;
|
|
121
|
+
for (var A = f; A--; ) {
|
|
122
|
+
var $ = i[A];
|
|
123
|
+
if (!(o ? $ in t : on.call(t, $)))
|
|
124
|
+
return !1;
|
|
125
|
+
}
|
|
126
|
+
var O = s.get(e), C = s.get(t);
|
|
127
|
+
if (O && C)
|
|
128
|
+
return O == t && C == e;
|
|
129
|
+
var N = !0;
|
|
130
|
+
s.set(e, t), s.set(t, e);
|
|
131
|
+
for (var y = o; ++A < f; ) {
|
|
132
|
+
$ = i[A];
|
|
133
|
+
var d = e[$], p = t[$];
|
|
134
|
+
if (l)
|
|
135
|
+
var b = o ? l(p, d, $, t, e, s) : l(d, p, $, e, t, s);
|
|
136
|
+
if (!(b === void 0 ? d === p || a(d, p, n, l, s) : b)) {
|
|
137
|
+
N = !1;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
y || (y = $ == "constructor");
|
|
141
|
+
}
|
|
142
|
+
if (N && !y) {
|
|
143
|
+
var c = e.constructor, r = t.constructor;
|
|
144
|
+
c != r && "constructor" in e && "constructor" in t && !(typeof c == "function" && c instanceof c && typeof r == "function" && r instanceof r) && (N = !1);
|
|
145
|
+
}
|
|
146
|
+
return s.delete(e), s.delete(t), N;
|
|
147
|
+
}
|
|
148
|
+
var un = 1, He = "[object Arguments]", We = "[object Array]", ie = "[object Object]", pn = Object.prototype, Ze = pn.hasOwnProperty;
|
|
149
|
+
function fn(e, t, n, l, a, s) {
|
|
150
|
+
var o = Ge(e), i = Ge(t), f = o ? We : we(e), h = i ? We : we(t);
|
|
151
|
+
f = f == He ? ie : f, h = h == He ? ie : h;
|
|
152
|
+
var k = f == ie, A = h == ie, $ = f == h;
|
|
153
|
+
if ($ && Je(e)) {
|
|
154
|
+
if (!Je(t))
|
|
155
|
+
return !1;
|
|
156
|
+
o = !0, k = !1;
|
|
157
|
+
}
|
|
158
|
+
if ($ && !k)
|
|
159
|
+
return s || (s = new Ae()), o || Dl(e) ? al(e, t, n, l, a, s) : an(e, t, f, n, l, a, s);
|
|
160
|
+
if (!(n & un)) {
|
|
161
|
+
var O = k && Ze.call(e, "__wrapped__"), C = A && Ze.call(t, "__wrapped__");
|
|
162
|
+
if (O || C) {
|
|
163
|
+
var N = O ? e.value() : e, y = C ? t.value() : t;
|
|
164
|
+
return s || (s = new Ae()), a(N, y, n, l, s);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return $ ? (s || (s = new Ae()), cn(e, t, n, l, a, s)) : !1;
|
|
168
|
+
}
|
|
169
|
+
function sl(e, t, n, l, a) {
|
|
170
|
+
return e === t ? !0 : e == null || t == null || !Me(e) && !Me(t) ? e !== e && t !== t : fn(e, t, n, l, sl, a);
|
|
171
|
+
}
|
|
172
|
+
function dn(e, t) {
|
|
173
|
+
return sl(e, t);
|
|
174
|
+
}
|
|
175
|
+
const fe = [
|
|
176
|
+
{
|
|
177
|
+
key: "单选",
|
|
178
|
+
value: "Select"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: "日期",
|
|
182
|
+
value: "Date"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "长文本",
|
|
186
|
+
value: "TextArea"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
key: "上传",
|
|
190
|
+
value: "Upload"
|
|
191
|
+
}
|
|
192
|
+
], yn = { class: "form-content" }, hn = {
|
|
193
|
+
__name: "index",
|
|
194
|
+
props: {
|
|
195
|
+
itemData: {
|
|
196
|
+
type: Array,
|
|
197
|
+
default: () => []
|
|
198
|
+
},
|
|
199
|
+
childItemData: {
|
|
200
|
+
type: Array,
|
|
201
|
+
default: () => []
|
|
202
|
+
},
|
|
203
|
+
index: Number
|
|
204
|
+
},
|
|
205
|
+
emits: ["change", "contentChange"],
|
|
206
|
+
setup(e, { emit: t }) {
|
|
207
|
+
const n = e, l = t, a = R([]), s = R(!1), o = R([]), i = $l(ke), f = R(), h = (A) => {
|
|
208
|
+
var y, d, p, b;
|
|
209
|
+
const $ = (d = (y = u(n.itemData)) == null ? void 0 : y.find((c) => (c == null ? void 0 : c.key) === "formContent")) == null ? void 0 : d.contents, O = u(A.content);
|
|
210
|
+
let C = {};
|
|
211
|
+
O && ((p = Object.values(O)) == null ? void 0 : p.length) > 0 && ((b = Object.values(O)) == null || b.forEach((c, r) => {
|
|
212
|
+
C[$[r].key] = c;
|
|
213
|
+
}));
|
|
214
|
+
const N = {
|
|
215
|
+
content: C,
|
|
216
|
+
index: n == null ? void 0 : n.index,
|
|
217
|
+
buttonName: A == null ? void 0 : A.buttonName
|
|
218
|
+
};
|
|
219
|
+
l("change", N);
|
|
220
|
+
}, k = (A) => {
|
|
221
|
+
var C, N;
|
|
222
|
+
if (!A) return;
|
|
223
|
+
if (((C = Object.values(u(A))) == null ? void 0 : C.length) > 0) {
|
|
224
|
+
const y = (N = Object.values(u(A))) == null ? void 0 : N.map((p) => p);
|
|
225
|
+
let d = "";
|
|
226
|
+
y == null || y.forEach((p) => {
|
|
227
|
+
p !== "" && p !== void 0 && (d = d === "" ? p : d + "/" + p);
|
|
228
|
+
}), i.setSelectArray(y), i.setSelectString(d);
|
|
229
|
+
}
|
|
230
|
+
const $ = u(n.itemData), O = $ == null ? void 0 : $.map((y) => {
|
|
231
|
+
var d;
|
|
232
|
+
return (y == null ? void 0 : y.key) === "formContent" && ((d = y.contents) == null || d.map((p, b) => {
|
|
233
|
+
var c, r, m, _, T, v, x, U, E, D, B, P, S, g, j, F, w, W, K;
|
|
234
|
+
return p.type = p != null && p.type ? p.type : (_ = (m = (r = (c = p == null ? void 0 : p.key) == null ? void 0 : c.split("$")) == null ? void 0 : r[1]) == null ? void 0 : m.split("(")) != null && _[0] ? (T = fe == null ? void 0 : fe.find((Z) => {
|
|
235
|
+
var le, ee, G, Q;
|
|
236
|
+
return (Z == null ? void 0 : Z.key) === ((Q = (G = (ee = (le = p == null ? void 0 : p.key) == null ? void 0 : le.split("$")) == null ? void 0 : ee[1]) == null ? void 0 : G.split("(")) == null ? void 0 : Q[0]);
|
|
237
|
+
})) == null ? void 0 : T.value : "Input", p.options = p != null && p.options ? p.options : ((U = (x = (v = p == null ? void 0 : p.key) == null ? void 0 : v.split("$")) == null ? void 0 : x[1]) == null ? void 0 : U.length) > 0 ? (P = (B = vl((D = (E = p == null ? void 0 : p.key) == null ? void 0 : E.split("$")) == null ? void 0 : D[1])) == null ? void 0 : B.split(",")) == null ? void 0 : P.map((Z) => ({
|
|
238
|
+
label: Z,
|
|
239
|
+
value: Z
|
|
240
|
+
})) : [], (S = p == null ? void 0 : p.key) != null && S.includes("$") && (p.key = (j = (g = p == null ? void 0 : p.key) == null ? void 0 : g.split("$")) == null ? void 0 : j[0]), p.value = Array.isArray((F = Object.values(A)) == null ? void 0 : F[b]) ? (W = (w = Object.values(A)) == null ? void 0 : w[b]) == null ? void 0 : W[0] : (K = Object.values(A)) == null ? void 0 : K[b], p;
|
|
241
|
+
})), y;
|
|
242
|
+
});
|
|
243
|
+
l("contentChange", {
|
|
244
|
+
contents: O,
|
|
245
|
+
index: n.index
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
return ae(
|
|
249
|
+
() => n.itemData,
|
|
250
|
+
() => {
|
|
251
|
+
var N, y, d, p, b, c, r, m, _, T;
|
|
252
|
+
const A = (N = u(n.itemData)) == null ? void 0 : N.find((v) => (v == null ? void 0 : v.key) === "formContent"), $ = (y = u(n.itemData)) == null ? void 0 : y.find((v) => (v == null ? void 0 : v.key) === "formButton"), O = (d = u(n.itemData)) == null ? void 0 : d.find((v) => (v == null ? void 0 : v.key) === "formFlex"), C = (p = u(n.itemData)) == null ? void 0 : p.find((v) => (v == null ? void 0 : v.key) === "formWrap");
|
|
253
|
+
if ((C == null ? void 0 : C.contents) === "纵向" ? s.value = !1 : s.value = !0, f.value = typeof (O == null ? void 0 : O.contents) != "boolean" ? !(!(O != null && O.contents) === "" || ((b = O == null ? void 0 : O.contents) == null ? void 0 : b.toUpperCase()) === "VERTICAL") : O == null ? void 0 : O.contents, ((c = A == null ? void 0 : A.contents) == null ? void 0 : c.length) > 0 && Array.isArray(A == null ? void 0 : A.contents)) {
|
|
254
|
+
const v = [];
|
|
255
|
+
(r = A == null ? void 0 : A.contents) == null || r.forEach((E, D) => {
|
|
256
|
+
var B, P, S, g, j, F, w, W, K, Z;
|
|
257
|
+
if ((E == null ? void 0 : E.label) !== "") {
|
|
258
|
+
let le = (E == null ? void 0 : E.key) ?? "", ee = (E == null ? void 0 : E.type) ?? "", G = (E == null ? void 0 : E.options) ?? [];
|
|
259
|
+
if ((B = E == null ? void 0 : E.key) != null && B.includes("$") && (le = (P = u(E == null ? void 0 : E.key).split("$")) == null ? void 0 : P[0], ((g = (S = u(E == null ? void 0 : E.key).split("$")) == null ? void 0 : S[1]) == null ? void 0 : g.length) > 0)) {
|
|
260
|
+
const [Q, q] = (F = (j = u(E == null ? void 0 : E.key).split("$")) == null ? void 0 : j[1]) == null ? void 0 : F.split(/[()]/);
|
|
261
|
+
ee = ((w = fe.find((H) => (H == null ? void 0 : H.key) === Q)) == null ? void 0 : w.value) ?? "", ((W = q == null ? void 0 : q.split(",")) == null ? void 0 : W.length) > 0 && (G = (K = q == null ? void 0 : q.split(",")) == null ? void 0 : K.map((H) => ({
|
|
262
|
+
label: H,
|
|
263
|
+
value: H
|
|
264
|
+
})));
|
|
265
|
+
}
|
|
266
|
+
v.push({
|
|
267
|
+
label: le ?? "",
|
|
268
|
+
name: "t" + D,
|
|
269
|
+
type: ee === "" ? "Input" : ee,
|
|
270
|
+
value: E != null && E.value ? E.value : (G == null ? void 0 : G.length) > 0 ? (Z = G == null ? void 0 : G[0]) == null ? void 0 : Z.value : (E == null ? void 0 : E.value) ?? "",
|
|
271
|
+
id: (E == null ? void 0 : E.id) ?? D,
|
|
272
|
+
contents: G ?? [],
|
|
273
|
+
width: (E == null ? void 0 : E.width) ?? 1
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
const x = (m = u(v)) == null ? void 0 : m.map((E) => E.value);
|
|
278
|
+
let U = "";
|
|
279
|
+
x == null || x.forEach((E) => {
|
|
280
|
+
E !== "" && E !== void 0 && (U = U === "" ? E : U + "/" + E);
|
|
281
|
+
}), i.setSelectArray(x), i.setSelectString(U), a.value = v;
|
|
282
|
+
} else
|
|
283
|
+
a.value = [];
|
|
284
|
+
if (((_ = $ == null ? void 0 : $.contents) == null ? void 0 : _.length) > 0) {
|
|
285
|
+
const v = [];
|
|
286
|
+
(T = $ == null ? void 0 : $.contents) == null || T.forEach((x, U) => {
|
|
287
|
+
(x == null ? void 0 : x.label) !== "" && v.push({
|
|
288
|
+
label: (x == null ? void 0 : x.label) ?? "",
|
|
289
|
+
id: (x == null ? void 0 : x.id) ?? U,
|
|
290
|
+
type: (x == null ? void 0 : x.type) ?? "",
|
|
291
|
+
background: x == null ? void 0 : x.background
|
|
292
|
+
});
|
|
293
|
+
}), o.value = v;
|
|
294
|
+
} else
|
|
295
|
+
o.value = [];
|
|
296
|
+
},
|
|
297
|
+
{ deep: !0, immediate: !0 }
|
|
298
|
+
), (A, $) => (z(), Y("div", yn, [
|
|
299
|
+
V(Ee, {
|
|
300
|
+
rowContents: a.value,
|
|
301
|
+
buttonValue: o.value,
|
|
302
|
+
isRowFlex: f.value,
|
|
303
|
+
isEnableWrap: !1,
|
|
304
|
+
onOnButtonClick: h,
|
|
305
|
+
onChange: k,
|
|
306
|
+
isButtonRow: s.value
|
|
307
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
308
|
+
]));
|
|
309
|
+
}
|
|
310
|
+
}, mn = /* @__PURE__ */ pe(hn, [["__scopeId", "data-v-3775f389"]]), bn = { class: "table-operate-content" }, gn = { class: "table-operate-item" }, kn = { class: "operate-title" }, Cn = { class: "operate-content" }, An = { class: "operate-title" }, $n = { class: "operate-content" }, _n = { class: "operate-title" }, On = { class: "operate-content" }, Tn = { class: "operate-content" }, xn = {
|
|
311
|
+
__name: "operate",
|
|
312
|
+
props: {
|
|
313
|
+
itemContents: {
|
|
314
|
+
type: Array,
|
|
315
|
+
default: () => []
|
|
316
|
+
},
|
|
317
|
+
originalItemContents: {
|
|
318
|
+
type: Array,
|
|
319
|
+
default: () => []
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
emits: ["change"],
|
|
323
|
+
setup(e, { emit: t }) {
|
|
324
|
+
const n = e, l = t, a = R([]), s = R([]), o = R([]), i = R([{
|
|
325
|
+
label: "按钮名称",
|
|
326
|
+
prop: "label",
|
|
327
|
+
type: "edit"
|
|
328
|
+
}, {
|
|
329
|
+
label: "按钮类型",
|
|
330
|
+
prop: "type",
|
|
331
|
+
type: "edit"
|
|
332
|
+
}, {
|
|
333
|
+
label: "按钮背景颜色",
|
|
334
|
+
prop: "background",
|
|
335
|
+
type: "edit",
|
|
336
|
+
columnType: "Color"
|
|
337
|
+
}, {
|
|
338
|
+
label: "操作",
|
|
339
|
+
prop: "operate",
|
|
340
|
+
type: "operate",
|
|
341
|
+
sortable: !1
|
|
342
|
+
}]), f = R([{
|
|
343
|
+
label: "标签名称",
|
|
344
|
+
prop: "label",
|
|
345
|
+
type: "edit"
|
|
346
|
+
}, {
|
|
347
|
+
label: "标签类型",
|
|
348
|
+
prop: "type",
|
|
349
|
+
type: "edit"
|
|
350
|
+
}, {
|
|
351
|
+
label: "按钮文字颜色",
|
|
352
|
+
prop: "textColor",
|
|
353
|
+
type: "edit",
|
|
354
|
+
columnType: "Color"
|
|
355
|
+
}, {
|
|
356
|
+
label: "操作",
|
|
357
|
+
prop: "operate",
|
|
358
|
+
type: "operate",
|
|
359
|
+
sortable: !1
|
|
360
|
+
}]), h = R([]), k = R(0), A = R([{
|
|
361
|
+
name: "isPagination",
|
|
362
|
+
label: "是否显示分页",
|
|
363
|
+
type: "Switch",
|
|
364
|
+
value: !0
|
|
365
|
+
}]), $ = [{
|
|
366
|
+
label: "标签名",
|
|
367
|
+
prop: "label",
|
|
368
|
+
type: "edit"
|
|
369
|
+
}, {
|
|
370
|
+
label: "属性名",
|
|
371
|
+
prop: "prop",
|
|
372
|
+
type: "edit"
|
|
373
|
+
}, {
|
|
374
|
+
label: "宽度",
|
|
375
|
+
prop: "width",
|
|
376
|
+
type: "edit",
|
|
377
|
+
columnType: "Number"
|
|
378
|
+
}, {
|
|
379
|
+
label: "是否固定列",
|
|
380
|
+
prop: "fixed",
|
|
381
|
+
type: "edit",
|
|
382
|
+
columnType: "Radio",
|
|
383
|
+
contents: [{
|
|
384
|
+
label: "left",
|
|
385
|
+
value: "左"
|
|
386
|
+
}, {
|
|
387
|
+
label: "right",
|
|
388
|
+
value: "右"
|
|
389
|
+
}]
|
|
390
|
+
}, {
|
|
391
|
+
label: "是否支持排序",
|
|
392
|
+
prop: "sortable",
|
|
393
|
+
type: "edit",
|
|
394
|
+
columnType: "Switch"
|
|
395
|
+
}, {
|
|
396
|
+
label: "文本所在位置",
|
|
397
|
+
prop: "align",
|
|
398
|
+
type: "edit",
|
|
399
|
+
columnType: "Radio",
|
|
400
|
+
contents: [{
|
|
401
|
+
label: "left",
|
|
402
|
+
value: "左"
|
|
403
|
+
}, {
|
|
404
|
+
label: "center",
|
|
405
|
+
value: "中"
|
|
406
|
+
}, {
|
|
407
|
+
label: "right",
|
|
408
|
+
value: "右"
|
|
409
|
+
}]
|
|
410
|
+
}, {
|
|
411
|
+
label: "溢出悬浮文字",
|
|
412
|
+
prop: "showOverflowTooltip",
|
|
413
|
+
type: "edit",
|
|
414
|
+
columnType: "Switch"
|
|
415
|
+
}, {
|
|
416
|
+
label: "是否不可拖动",
|
|
417
|
+
prop: "isNotDrag",
|
|
418
|
+
type: "edit",
|
|
419
|
+
columnType: "Switch"
|
|
420
|
+
}, {
|
|
421
|
+
label: "是否可编辑列名",
|
|
422
|
+
//暂不支持
|
|
423
|
+
prop: "isEditCol",
|
|
424
|
+
type: "edit",
|
|
425
|
+
columnType: "Switch"
|
|
426
|
+
}, {
|
|
427
|
+
label: "是否出现在附属界面",
|
|
428
|
+
//暂不支持
|
|
429
|
+
prop: "isOperate",
|
|
430
|
+
type: "edit",
|
|
431
|
+
columnType: "Switch"
|
|
432
|
+
}, {
|
|
433
|
+
label: "操作",
|
|
434
|
+
prop: "operate",
|
|
435
|
+
type: "operate",
|
|
436
|
+
sortable: !1
|
|
437
|
+
}], O = (c) => {
|
|
438
|
+
let r = u(a.value);
|
|
439
|
+
const m = r == null ? void 0 : r.find((_) => _.key === "page");
|
|
440
|
+
(m == null ? void 0 : m.contents) !== void 0 ? r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "page" && (_.contents = c == null ? void 0 : c.isPagination), _)) : r.push({
|
|
441
|
+
key: "page",
|
|
442
|
+
contents: c == null ? void 0 : c.isPagination
|
|
443
|
+
}), a.value = r;
|
|
444
|
+
};
|
|
445
|
+
ae(
|
|
446
|
+
() => n.originalItemContents,
|
|
447
|
+
() => {
|
|
448
|
+
var c, r, m, _, T, v, x, U, E, D, B, P, S;
|
|
449
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (a.value = u(n.originalItemContents), s.value = (r = (c = a.value) == null ? void 0 : c.find((g) => (g == null ? void 0 : g.key) === "header")) == null ? void 0 : r.contents, o.value = (_ = (m = a.value) == null ? void 0 : m.find((g) => (g == null ? void 0 : g.key) === "rowButton")) == null ? void 0 : _.contents, i.value = (v = (T = a.value) == null ? void 0 : T.find((g) => (g == null ? void 0 : g.key) === "extraButton")) == null ? void 0 : v.contents, A.value = (U = (x = a.value) == null ? void 0 : x.find((g) => (g == null ? void 0 : g.key) === "page")) != null && U.contents ? [{
|
|
450
|
+
name: "isPagination",
|
|
451
|
+
label: "是否显示分页",
|
|
452
|
+
type: "Switch",
|
|
453
|
+
value: (D = (E = a.value) == null ? void 0 : E.find((g) => (g == null ? void 0 : g.key) === "page")) == null ? void 0 : D.contents
|
|
454
|
+
}] : [{
|
|
455
|
+
name: "isPagination",
|
|
456
|
+
label: "是否显示分页",
|
|
457
|
+
type: "Switch",
|
|
458
|
+
value: !0
|
|
459
|
+
}], s.value = (B = s.value) == null ? void 0 : B.map((g, j) => g = {
|
|
460
|
+
label: (g == null ? void 0 : g.label) ?? "",
|
|
461
|
+
prop: (g == null ? void 0 : g.label) === "操作" ? "operate" : g == null ? void 0 : g.prop,
|
|
462
|
+
width: g != null && g.width ? parseInt(g.width) : "",
|
|
463
|
+
fixed: (g == null ? void 0 : g.fixed) ?? void 0,
|
|
464
|
+
sortable: (g == null ? void 0 : g.sortable) ?? !1,
|
|
465
|
+
align: (g == null ? void 0 : g.align) ?? "center",
|
|
466
|
+
showOverflowTooltip: (g == null ? void 0 : g.showOverflowTooltip) ?? !0,
|
|
467
|
+
isNotDrag: (g == null ? void 0 : g.isNotDrag) ?? !1,
|
|
468
|
+
isEditCol: (g == null ? void 0 : g.isEditCol) ?? !1,
|
|
469
|
+
isOperate: (g == null ? void 0 : g.isOperate) ?? !1,
|
|
470
|
+
id: (g == null ? void 0 : g.id) ?? j
|
|
471
|
+
}), o.value = (P = o.value) == null ? void 0 : P.map((g, j) => g = {
|
|
472
|
+
label: (g == null ? void 0 : g.label) ?? "",
|
|
473
|
+
type: (g == null ? void 0 : g.type) ?? "",
|
|
474
|
+
textColor: (g == null ? void 0 : g.textColor) ?? "#000000",
|
|
475
|
+
id: (g == null ? void 0 : g.id) ?? j
|
|
476
|
+
}), i.value = (S = i.value) == null ? void 0 : S.map((g, j) => g = {
|
|
477
|
+
label: (g == null ? void 0 : g.label) ?? "",
|
|
478
|
+
type: (g == null ? void 0 : g.type) ?? "",
|
|
479
|
+
background: (g == null ? void 0 : g.textColor) ?? "#FFFFFF",
|
|
480
|
+
id: (g == null ? void 0 : g.id) ?? j
|
|
481
|
+
}));
|
|
482
|
+
},
|
|
483
|
+
{ deep: !0, immediate: !0 }
|
|
484
|
+
), ae(
|
|
485
|
+
() => A.value,
|
|
486
|
+
() => {
|
|
487
|
+
var m;
|
|
488
|
+
let c = u(a.value);
|
|
489
|
+
const r = c == null ? void 0 : c.find((_) => _.key === "page");
|
|
490
|
+
r != null && r.contents ? c = c == null ? void 0 : c.map((_) => {
|
|
491
|
+
var T;
|
|
492
|
+
return (_ == null ? void 0 : _.key) === "page" && (_.contents = (T = A.value) == null ? void 0 : T[0].value), _;
|
|
493
|
+
}) : c.push({
|
|
494
|
+
key: "page",
|
|
495
|
+
contents: (m = A.value) == null ? void 0 : m[0].value
|
|
496
|
+
}), a.value = c;
|
|
497
|
+
},
|
|
498
|
+
{ immediate: !0, deep: !0 }
|
|
499
|
+
);
|
|
500
|
+
const C = () => {
|
|
501
|
+
const c = u(s.value);
|
|
502
|
+
let r = u(a.value);
|
|
503
|
+
c.push({
|
|
504
|
+
label: "",
|
|
505
|
+
prop: "",
|
|
506
|
+
width: "",
|
|
507
|
+
fixed: void 0,
|
|
508
|
+
sortable: !1,
|
|
509
|
+
align: "center",
|
|
510
|
+
showOverflowTooltip: !0,
|
|
511
|
+
isNotDrag: !1,
|
|
512
|
+
isEditCol: !1,
|
|
513
|
+
isOperate: !1,
|
|
514
|
+
id: k.value
|
|
515
|
+
}), s.value = c, k.value++;
|
|
516
|
+
const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "header");
|
|
517
|
+
m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = c), _))) : r.push({
|
|
518
|
+
key: "header",
|
|
519
|
+
contents: c
|
|
520
|
+
}), a.value = r;
|
|
521
|
+
}, N = () => {
|
|
522
|
+
const c = u(o.value);
|
|
523
|
+
let r = u(a.value);
|
|
524
|
+
c.push({
|
|
525
|
+
label: "",
|
|
526
|
+
type: "",
|
|
527
|
+
textColor: "#000000",
|
|
528
|
+
id: k.value
|
|
529
|
+
}), o.value = c, k.value++;
|
|
530
|
+
const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "rowButton");
|
|
531
|
+
m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = c), _))) : r.push({
|
|
532
|
+
key: "rowButton",
|
|
533
|
+
contents: c
|
|
534
|
+
}), a.value = r;
|
|
535
|
+
}, y = () => {
|
|
536
|
+
const c = u(h.value);
|
|
537
|
+
let r = u(a.value);
|
|
538
|
+
c.push({
|
|
539
|
+
label: "",
|
|
540
|
+
type: "",
|
|
541
|
+
background: "#FFFFFF",
|
|
542
|
+
id: k.value
|
|
543
|
+
}), h.value = c, k.value++;
|
|
544
|
+
const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "extraButton");
|
|
545
|
+
m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = c), _))) : r.push({
|
|
546
|
+
key: "extraButton",
|
|
547
|
+
contents: c
|
|
548
|
+
}), a.value = r;
|
|
549
|
+
}, d = (c) => {
|
|
550
|
+
const r = u(o.value);
|
|
551
|
+
let m = u(a.value);
|
|
552
|
+
o.value = r.filter((T) => T.id !== c.id);
|
|
553
|
+
const _ = m == null ? void 0 : m.find((T) => T.key === "rowButton");
|
|
554
|
+
_ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "rowButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), a.value = m;
|
|
555
|
+
}, p = (c) => {
|
|
556
|
+
const r = u(h.value);
|
|
557
|
+
let m = u(a.value);
|
|
558
|
+
h.value = r.filter((T) => T.id !== c.id);
|
|
559
|
+
const _ = m == null ? void 0 : m.find((T) => T.key === "extraButton");
|
|
560
|
+
_ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "extraButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), a.value = m;
|
|
561
|
+
}, b = (c) => {
|
|
562
|
+
const r = u(s.value);
|
|
563
|
+
let m = u(a.value);
|
|
564
|
+
s.value = r.filter((T) => T.id !== c.id);
|
|
565
|
+
const _ = m == null ? void 0 : m.find((T) => T.key === "header");
|
|
566
|
+
_ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "header" && (T.contents = r.filter((v) => v.id !== c.id)), T))), a.value = m;
|
|
567
|
+
};
|
|
568
|
+
return ae(
|
|
569
|
+
() => [a.value, s.value],
|
|
570
|
+
() => {
|
|
571
|
+
let c = u(a.value);
|
|
572
|
+
const r = c == null ? void 0 : c.find((m) => (m == null ? void 0 : m.key) === "header");
|
|
573
|
+
r != null && r.contents ? (r.contents = s.value, c = c == null ? void 0 : c.map((m) => ((m == null ? void 0 : m.key) === "header" && (m.contents = s.value), m))) : c.push({
|
|
574
|
+
key: "header",
|
|
575
|
+
contents: s.value
|
|
576
|
+
}), l("change", c);
|
|
577
|
+
},
|
|
578
|
+
{ deep: !0, immediate: !0 }
|
|
579
|
+
), (c, r) => {
|
|
580
|
+
const m = nl("el-button");
|
|
581
|
+
return z(), Y("div", bn, [
|
|
582
|
+
I("div", gn, [
|
|
583
|
+
I("div", kn, [
|
|
584
|
+
r[1] || (r[1] = I("div", null, X("表头"), -1)),
|
|
585
|
+
V(m, {
|
|
586
|
+
class: "blue-operate-button",
|
|
587
|
+
icon: "ele-Plus",
|
|
588
|
+
onClick: C
|
|
589
|
+
}, {
|
|
590
|
+
default: se(() => r[0] || (r[0] = [
|
|
591
|
+
ce(X("新建"))
|
|
592
|
+
])),
|
|
593
|
+
_: 1,
|
|
594
|
+
__: [0]
|
|
595
|
+
})
|
|
596
|
+
]),
|
|
597
|
+
I("div", Cn, [
|
|
598
|
+
V(ue, {
|
|
599
|
+
columns: $,
|
|
600
|
+
isShowPagination: !1,
|
|
601
|
+
isShowEdit: !1,
|
|
602
|
+
isMoveColumn: !1,
|
|
603
|
+
tableData: s.value,
|
|
604
|
+
onDeleteRow: b
|
|
605
|
+
}, null, 8, ["tableData"])
|
|
606
|
+
]),
|
|
607
|
+
I("div", An, [
|
|
608
|
+
r[3] || (r[3] = I("div", null, X("行内按钮"), -1)),
|
|
609
|
+
V(m, {
|
|
610
|
+
class: "blue-operate-button",
|
|
611
|
+
icon: "ele-Plus",
|
|
612
|
+
onClick: N
|
|
613
|
+
}, {
|
|
614
|
+
default: se(() => r[2] || (r[2] = [
|
|
615
|
+
ce(X("新建"))
|
|
616
|
+
])),
|
|
617
|
+
_: 1,
|
|
618
|
+
__: [2]
|
|
619
|
+
})
|
|
620
|
+
]),
|
|
621
|
+
I("div", $n, [
|
|
622
|
+
V(ue, {
|
|
623
|
+
columns: f.value,
|
|
624
|
+
isShowPagination: !1,
|
|
625
|
+
isShowEdit: !1,
|
|
626
|
+
isMoveColumn: !1,
|
|
627
|
+
tableData: o.value,
|
|
628
|
+
onDeleteRow: d
|
|
629
|
+
}, null, 8, ["columns", "tableData"])
|
|
630
|
+
]),
|
|
631
|
+
I("div", _n, [
|
|
632
|
+
r[5] || (r[5] = I("div", null, X("表格外部按钮"), -1)),
|
|
633
|
+
V(m, {
|
|
634
|
+
class: "blue-operate-button",
|
|
635
|
+
icon: "ele-Plus",
|
|
636
|
+
onClick: y
|
|
637
|
+
}, {
|
|
638
|
+
default: se(() => r[4] || (r[4] = [
|
|
639
|
+
ce(X("新建"))
|
|
640
|
+
])),
|
|
641
|
+
_: 1,
|
|
642
|
+
__: [4]
|
|
643
|
+
})
|
|
644
|
+
]),
|
|
645
|
+
I("div", On, [
|
|
646
|
+
V(ue, {
|
|
647
|
+
columns: i.value,
|
|
648
|
+
isShowPagination: !1,
|
|
649
|
+
isShowEdit: !1,
|
|
650
|
+
isMoveColumn: !1,
|
|
651
|
+
tableData: h.value,
|
|
652
|
+
onDeleteRow: p
|
|
653
|
+
}, null, 8, ["columns", "tableData"])
|
|
654
|
+
]),
|
|
655
|
+
r[6] || (r[6] = I("div", { class: "operate-title" }, [
|
|
656
|
+
I("div", null, X("分页"))
|
|
657
|
+
], -1)),
|
|
658
|
+
I("div", Tn, [
|
|
659
|
+
V(Ee, {
|
|
660
|
+
rowContents: A.value,
|
|
661
|
+
onChange: O
|
|
662
|
+
}, null, 8, ["rowContents"])
|
|
663
|
+
])
|
|
664
|
+
])
|
|
665
|
+
]);
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
}, vn = /* @__PURE__ */ pe(xn, [["__scopeId", "data-v-877911eb"]]), En = { class: "form-operate-content" }, Dn = { class: "form-operate-item" }, Nn = { class: "operate-title" }, Sn = { class: "operate-content" }, Pn = { class: "operate-title" }, Bn = { class: "operate-content" }, jn = { class: "operate-content" }, Un = {
|
|
669
|
+
__name: "operate",
|
|
670
|
+
props: {
|
|
671
|
+
itemContents: {
|
|
672
|
+
type: Array,
|
|
673
|
+
default: () => []
|
|
674
|
+
},
|
|
675
|
+
originalItemContents: {
|
|
676
|
+
type: Array,
|
|
677
|
+
default: () => []
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
emits: ["change"],
|
|
681
|
+
setup(e, { emit: t }) {
|
|
682
|
+
const n = e, l = t, a = R([{
|
|
683
|
+
name: "isRowFlex",
|
|
684
|
+
label: "是否横向布局",
|
|
685
|
+
type: "Switch",
|
|
686
|
+
value: !0
|
|
687
|
+
}]), s = R([{
|
|
688
|
+
label: "字段名称",
|
|
689
|
+
prop: "label",
|
|
690
|
+
type: "edit"
|
|
691
|
+
}, {
|
|
692
|
+
label: "字段类型",
|
|
693
|
+
prop: "type",
|
|
694
|
+
type: "edit"
|
|
695
|
+
}, {
|
|
696
|
+
label: "字段值",
|
|
697
|
+
prop: "key",
|
|
698
|
+
type: "edit"
|
|
699
|
+
}, {
|
|
700
|
+
label: "字段选项值",
|
|
701
|
+
prop: "options",
|
|
702
|
+
type: "edit"
|
|
703
|
+
}, {
|
|
704
|
+
label: "操作",
|
|
705
|
+
prop: "operate",
|
|
706
|
+
type: "operate",
|
|
707
|
+
sortable: !1
|
|
708
|
+
}]), o = R([{
|
|
709
|
+
label: "字段名称",
|
|
710
|
+
prop: "label",
|
|
711
|
+
type: "edit"
|
|
712
|
+
}, {
|
|
713
|
+
label: "字段类型",
|
|
714
|
+
prop: "type",
|
|
715
|
+
type: "edit"
|
|
716
|
+
}, {
|
|
717
|
+
label: "按钮背景颜色",
|
|
718
|
+
prop: "background",
|
|
719
|
+
type: "edit",
|
|
720
|
+
columnType: "Color"
|
|
721
|
+
}, {
|
|
722
|
+
label: "操作",
|
|
723
|
+
prop: "operate",
|
|
724
|
+
type: "operate",
|
|
725
|
+
sortable: !1
|
|
726
|
+
}]), i = R([]), f = R([]), h = R([]), k = R(0);
|
|
727
|
+
ae(
|
|
728
|
+
() => n.originalItemContents,
|
|
729
|
+
() => {
|
|
730
|
+
var y, d, p, b, c, r, m, _, T, v;
|
|
731
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (f.value = u(n.originalItemContents), h.value = (d = (y = f.value) == null ? void 0 : y.find((x) => (x == null ? void 0 : x.key) === "formContent")) == null ? void 0 : d.contents, i.value = (b = (p = f.value) == null ? void 0 : p.find((x) => (x == null ? void 0 : x.key) === "formButton")) == null ? void 0 : b.contents, h.value = (c = h.value) == null ? void 0 : c.map((x, U) => x = {
|
|
732
|
+
label: (x == null ? void 0 : x.label) ?? "",
|
|
733
|
+
type: (x == null ? void 0 : x.type) ?? "",
|
|
734
|
+
key: (x == null ? void 0 : x.key) ?? "",
|
|
735
|
+
options: (x == null ? void 0 : x.options) ?? "",
|
|
736
|
+
id: (x == null ? void 0 : x.id) ?? U
|
|
737
|
+
}), i.value = (r = i.value) == null ? void 0 : r.map((x, U) => x = {
|
|
738
|
+
label: (x == null ? void 0 : x.label) ?? "",
|
|
739
|
+
type: (x == null ? void 0 : x.type) ?? "",
|
|
740
|
+
background: (x == null ? void 0 : x.background) ?? "#000000",
|
|
741
|
+
id: (x == null ? void 0 : x.id) ?? U
|
|
742
|
+
}), a.value = (_ = (m = f.value) == null ? void 0 : m.find((x) => (x == null ? void 0 : x.key) === "formFlex")) != null && _.contents ? [{
|
|
743
|
+
name: "isRowFlex",
|
|
744
|
+
label: "是否横向布局",
|
|
745
|
+
type: "Switch",
|
|
746
|
+
value: (v = (T = f.value) == null ? void 0 : T.find((x) => (x == null ? void 0 : x.key) === "formFlex")) == null ? void 0 : v.contents
|
|
747
|
+
}] : [{
|
|
748
|
+
name: "isRowFlex",
|
|
749
|
+
label: "是否横向布局",
|
|
750
|
+
type: "Switch",
|
|
751
|
+
value: !0
|
|
752
|
+
}]);
|
|
753
|
+
},
|
|
754
|
+
{ deep: !0, immediate: !0 }
|
|
755
|
+
);
|
|
756
|
+
const A = () => {
|
|
757
|
+
const y = u(i.value);
|
|
758
|
+
let d = u(f.value);
|
|
759
|
+
y.push({
|
|
760
|
+
label: "",
|
|
761
|
+
type: "",
|
|
762
|
+
background: "#000000",
|
|
763
|
+
id: k.value
|
|
764
|
+
}), i.value = y, k.value++;
|
|
765
|
+
const p = d == null ? void 0 : d.find((b) => (b == null ? void 0 : b.key) === "formButton");
|
|
766
|
+
p != null && p.contents ? (p.contents = y, d = d == null ? void 0 : d.map((b) => ((b == null ? void 0 : b.key) === "formButton" && (b.contents = y), b))) : d.push({
|
|
767
|
+
key: "formButton",
|
|
768
|
+
contents: y
|
|
769
|
+
}), f.value = d;
|
|
770
|
+
}, $ = () => {
|
|
771
|
+
const y = u(h.value);
|
|
772
|
+
let d = u(f.value);
|
|
773
|
+
y.push({
|
|
774
|
+
label: "",
|
|
775
|
+
type: "",
|
|
776
|
+
key: "",
|
|
777
|
+
options: "",
|
|
778
|
+
id: k.value
|
|
779
|
+
}), h.value = y, k.value++;
|
|
780
|
+
const p = d == null ? void 0 : d.find((b) => (b == null ? void 0 : b.key) === "formContent");
|
|
781
|
+
p != null && p.contents ? (p.contents = y, d = d == null ? void 0 : d.map((b) => ((b == null ? void 0 : b.key) === "formContent" && (b.contents = y), b))) : d.push({
|
|
782
|
+
key: "formContent",
|
|
783
|
+
contents: y
|
|
784
|
+
}), f.value = d;
|
|
785
|
+
}, O = (y) => {
|
|
786
|
+
const d = u(i.value);
|
|
787
|
+
let p = u(f.value);
|
|
788
|
+
i.value = d.filter((c) => c.id !== y.id);
|
|
789
|
+
const b = p == null ? void 0 : p.find((c) => c.key === "formButton");
|
|
790
|
+
b != null && b.contents && (p = p == null ? void 0 : p.map((c) => ((c == null ? void 0 : c.key) === "formButton" && (c.contents = d.filter((r) => r.id !== y.id)), c))), f.value = p;
|
|
791
|
+
}, C = (y) => {
|
|
792
|
+
const d = u(h.value);
|
|
793
|
+
let p = u(f.value);
|
|
794
|
+
h.value = d.filter((c) => c.id !== y.id);
|
|
795
|
+
const b = p == null ? void 0 : p.find((c) => c.key === "formContent");
|
|
796
|
+
b != null && b.contents && (p = p == null ? void 0 : p.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = d.filter((r) => r.id !== y.id)), c))), f.value = p;
|
|
797
|
+
}, N = (y) => {
|
|
798
|
+
let d = u(f.value);
|
|
799
|
+
const p = d == null ? void 0 : d.find((b) => b.key === "formFlex");
|
|
800
|
+
(p == null ? void 0 : p.contents) !== void 0 ? d = d == null ? void 0 : d.map((b) => ((b == null ? void 0 : b.key) === "formFlex" && (b.contents = y == null ? void 0 : y.isRowFlex), b)) : d.push({
|
|
801
|
+
key: "formFlex",
|
|
802
|
+
contents: y == null ? void 0 : y.isRowFlex
|
|
803
|
+
}), f.value = d;
|
|
804
|
+
};
|
|
805
|
+
return ae(
|
|
806
|
+
() => [f.value, h.value],
|
|
807
|
+
() => {
|
|
808
|
+
let y = u(f.value);
|
|
809
|
+
const d = y == null ? void 0 : y.find((p) => (p == null ? void 0 : p.key) === "formContent");
|
|
810
|
+
d != null && d.contents ? (d.contents = h.value, y = y == null ? void 0 : y.map((p) => ((p == null ? void 0 : p.key) === "formContent" && (p.contents = h.value), p))) : y.push({
|
|
811
|
+
key: "formContent",
|
|
812
|
+
contents: h.value
|
|
813
|
+
}), l("change", y);
|
|
814
|
+
},
|
|
815
|
+
{ deep: !0, immediate: !0 }
|
|
816
|
+
), (y, d) => {
|
|
817
|
+
const p = nl("el-button");
|
|
818
|
+
return z(), Y("div", En, [
|
|
819
|
+
I("div", Dn, [
|
|
820
|
+
I("div", Nn, [
|
|
821
|
+
d[1] || (d[1] = I("div", null, X("表单信息"), -1)),
|
|
822
|
+
V(p, {
|
|
823
|
+
class: "blue-operate-button",
|
|
824
|
+
icon: "ele-Plus",
|
|
825
|
+
onClick: $
|
|
826
|
+
}, {
|
|
827
|
+
default: se(() => d[0] || (d[0] = [
|
|
828
|
+
ce(X("新建"))
|
|
829
|
+
])),
|
|
830
|
+
_: 1,
|
|
831
|
+
__: [0]
|
|
832
|
+
})
|
|
833
|
+
]),
|
|
834
|
+
I("div", Sn, [
|
|
835
|
+
V(ue, {
|
|
836
|
+
columns: s.value,
|
|
837
|
+
isShowPagination: !1,
|
|
838
|
+
isShowEdit: !1,
|
|
839
|
+
isMoveColumn: !1,
|
|
840
|
+
tableData: h.value,
|
|
841
|
+
onDeleteRow: C
|
|
842
|
+
}, null, 8, ["columns", "tableData"])
|
|
843
|
+
]),
|
|
844
|
+
I("div", Pn, [
|
|
845
|
+
d[3] || (d[3] = I("div", null, X("表单按钮"), -1)),
|
|
846
|
+
V(p, {
|
|
847
|
+
class: "blue-operate-button",
|
|
848
|
+
icon: "ele-Plus",
|
|
849
|
+
onClick: A
|
|
850
|
+
}, {
|
|
851
|
+
default: se(() => d[2] || (d[2] = [
|
|
852
|
+
ce(X("新建"))
|
|
853
|
+
])),
|
|
854
|
+
_: 1,
|
|
855
|
+
__: [2]
|
|
856
|
+
})
|
|
857
|
+
]),
|
|
858
|
+
I("div", Bn, [
|
|
859
|
+
V(ue, {
|
|
860
|
+
columns: o.value,
|
|
861
|
+
isShowPagination: !1,
|
|
862
|
+
isShowEdit: !1,
|
|
863
|
+
isMoveColumn: !1,
|
|
864
|
+
tableData: i.value,
|
|
865
|
+
onDeleteRow: O
|
|
866
|
+
}, null, 8, ["columns", "tableData"])
|
|
867
|
+
]),
|
|
868
|
+
d[4] || (d[4] = I("div", { class: "operate-title" }, [
|
|
869
|
+
I("div", null, X("表单布局"))
|
|
870
|
+
], -1)),
|
|
871
|
+
I("div", jn, [
|
|
872
|
+
V(Ee, {
|
|
873
|
+
rowContents: a.value,
|
|
874
|
+
onChange: N
|
|
875
|
+
}, null, 8, ["rowContents"])
|
|
876
|
+
])
|
|
877
|
+
])
|
|
878
|
+
]);
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
}, Fn = /* @__PURE__ */ pe(Un, [["__scopeId", "data-v-a36b8468"]]), Rn = { class: "extra-content" }, wn = { key: 0 }, Jn = { key: 1 }, Ln = {
|
|
882
|
+
__name: "index",
|
|
883
|
+
props: {
|
|
884
|
+
itemData: {
|
|
885
|
+
type: Array,
|
|
886
|
+
default: () => []
|
|
887
|
+
},
|
|
888
|
+
childItemData: {
|
|
889
|
+
type: Array,
|
|
890
|
+
default: () => []
|
|
891
|
+
},
|
|
892
|
+
index: Number,
|
|
893
|
+
changedContent: {
|
|
894
|
+
type: Object,
|
|
895
|
+
default: () => {
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
emits: ["change"],
|
|
900
|
+
setup(e, { emit: t }) {
|
|
901
|
+
const n = e, l = R(0), a = R(), s = R(), o = t, i = R(!1), f = R({}), h = R({}), k = R();
|
|
902
|
+
ae(
|
|
903
|
+
() => [n.itemData],
|
|
904
|
+
() => {
|
|
905
|
+
var c;
|
|
906
|
+
const b = u(n.itemData);
|
|
907
|
+
a.value = (c = u(b)) == null ? void 0 : c.map((r) => {
|
|
908
|
+
var m;
|
|
909
|
+
if (r.key === "extra") {
|
|
910
|
+
let _ = [];
|
|
911
|
+
(m = r.value) == null || m.forEach((T) => {
|
|
912
|
+
var v;
|
|
913
|
+
_.push((v = Object.values(T)) == null ? void 0 : v[0]);
|
|
914
|
+
}), r.value = _;
|
|
915
|
+
}
|
|
916
|
+
return r;
|
|
917
|
+
});
|
|
918
|
+
},
|
|
919
|
+
{ deep: !0, immediate: !0 }
|
|
920
|
+
);
|
|
921
|
+
const A = (b, c, r, m) => {
|
|
922
|
+
var T;
|
|
923
|
+
let _ = {};
|
|
924
|
+
((T = b == null ? void 0 : b[0]) == null ? void 0 : T.contents) === "详情" && (i.value = !0, _[c] = b, s.value = b == null ? void 0 : b.filter((v) => (v == null ? void 0 : v.key) !== "tableContentName"), f.value = _, h.value = r, k.value = m.id);
|
|
925
|
+
}, $ = (b) => {
|
|
926
|
+
var v, x, U, E;
|
|
927
|
+
const c = (x = (v = Object.values(u(f.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((D) => (D == null ? void 0 : D.key) === "tableContentName"), r = (E = (U = Object.values(u(f.value))) == null ? void 0 : U[0]) == null ? void 0 : E.filter((D) => (D == null ? void 0 : D.key) !== "tableContentName"), m = r == null ? void 0 : r.map((D, B) => {
|
|
928
|
+
var P;
|
|
929
|
+
return B === b.index && (D == null ? void 0 : D.comp) === "Table" && (D.compData = (P = D.compData) == null ? void 0 : P.map((S) => {
|
|
930
|
+
var g, j;
|
|
931
|
+
return (S == null ? void 0 : S.key) === "tableContents" && (S.contents = (j = (g = b.content) == null ? void 0 : g.map((F) => {
|
|
932
|
+
let w = {};
|
|
933
|
+
for (let W in F)
|
|
934
|
+
W !== "id" && (w[W] = F[W]);
|
|
935
|
+
return w;
|
|
936
|
+
})) == null ? void 0 : j.map((F) => Object.values(F))), S;
|
|
937
|
+
})), D;
|
|
938
|
+
});
|
|
939
|
+
m.unshift(c == null ? void 0 : c[0]);
|
|
940
|
+
let _ = u(f.value), T = {};
|
|
941
|
+
for (let D in _)
|
|
942
|
+
T[D] = m;
|
|
943
|
+
f.value = T;
|
|
944
|
+
}, O = () => {
|
|
945
|
+
i.value = !1, f.value = {}, h.value = {}, k.value = void 0, l.value++;
|
|
946
|
+
}, C = (b) => {
|
|
947
|
+
var v, x, U, E;
|
|
948
|
+
const c = (x = (v = Object.values(u(f.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((D) => (D == null ? void 0 : D.key) === "tableContentName"), r = (E = (U = Object.values(u(f.value))) == null ? void 0 : U[0]) == null ? void 0 : E.filter((D) => (D == null ? void 0 : D.key) !== "tableContentName"), m = r == null ? void 0 : r.map((D, B) => (B === b.index && (D.compData = b.contents), D));
|
|
949
|
+
m.unshift(c == null ? void 0 : c[0]);
|
|
950
|
+
let _ = u(f.value), T = {};
|
|
951
|
+
for (let D in _)
|
|
952
|
+
T[D] = m;
|
|
953
|
+
f.value = T;
|
|
954
|
+
}, N = () => {
|
|
955
|
+
var c, r;
|
|
956
|
+
let b = {};
|
|
957
|
+
for (let m in h.value)
|
|
958
|
+
m === ((c = Object.keys(f.value)) == null ? void 0 : c[0]) ? b[m] = (r = Object.values(f.value)) == null ? void 0 : r[0] : b[m] = h.value[m];
|
|
959
|
+
o("change", {
|
|
960
|
+
buttonName: "编辑",
|
|
961
|
+
index: k.value,
|
|
962
|
+
singleContent: b
|
|
963
|
+
}, "methodData"), i.value = !1, f.value = {}, h.value = {}, k.value = void 0;
|
|
964
|
+
}, y = () => {
|
|
965
|
+
i.value = !1, f.value = {}, h.value = {}, k.value = void 0;
|
|
966
|
+
}, d = (b) => {
|
|
967
|
+
o("change", b, "methodData");
|
|
968
|
+
}, p = (b) => zn(b);
|
|
969
|
+
return (b, c) => (z(), Y(he, null, [
|
|
970
|
+
I("div", Rn, [
|
|
971
|
+
(z(!0), Y(he, null, xe(a.value, (r, m) => (z(), Y("div", { key: l.value }, [
|
|
972
|
+
(r == null ? void 0 : r.key) === "extra" ? (z(), Y("div", wn)) : (z(), Y("div", Jn, [
|
|
973
|
+
(z(), Be(je(p(r.comp)), {
|
|
974
|
+
itemData: r == null ? void 0 : r.compData,
|
|
975
|
+
childItemData: r == null ? void 0 : r.itemChildData,
|
|
976
|
+
key: m,
|
|
977
|
+
index: (r == null ? void 0 : r.id) ?? m,
|
|
978
|
+
onContentClick: A,
|
|
979
|
+
onChange: d
|
|
980
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
981
|
+
]))
|
|
982
|
+
]))), 128))
|
|
983
|
+
]),
|
|
984
|
+
V(El, {
|
|
985
|
+
visible: i.value,
|
|
986
|
+
onBeforeDestroy: y
|
|
987
|
+
}, {
|
|
988
|
+
default: se(() => [
|
|
989
|
+
(z(!0), Y(he, null, xe(s.value, (r, m) => (z(), Y("div", {
|
|
990
|
+
key: m,
|
|
991
|
+
class: "extra-dialog"
|
|
992
|
+
}, [
|
|
993
|
+
(z(), Be(je(p(r.comp)), {
|
|
994
|
+
itemData: r == null ? void 0 : r.compData,
|
|
995
|
+
onChange: $,
|
|
996
|
+
childItemData: r == null ? void 0 : r.itemChildData,
|
|
997
|
+
key: m,
|
|
998
|
+
onContentChange: C,
|
|
999
|
+
index: (r == null ? void 0 : r.id) ?? m,
|
|
1000
|
+
class: "extra-component"
|
|
1001
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
1002
|
+
]))), 128))
|
|
1003
|
+
]),
|
|
1004
|
+
footer: se(() => [
|
|
1005
|
+
I("div", { class: "dialog-footer" }, [
|
|
1006
|
+
I("div", {
|
|
1007
|
+
class: "cancel-button footer-button",
|
|
1008
|
+
onClick: O
|
|
1009
|
+
}, X("取消")),
|
|
1010
|
+
I("div", {
|
|
1011
|
+
class: "confirm-button footer-button",
|
|
1012
|
+
onClick: N
|
|
1013
|
+
}, X("确认"))
|
|
1014
|
+
])
|
|
1015
|
+
]),
|
|
1016
|
+
_: 1
|
|
1017
|
+
}, 8, ["visible"])
|
|
1018
|
+
], 64));
|
|
1019
|
+
}
|
|
1020
|
+
}, Gn = /* @__PURE__ */ pe(Ln, [["__scopeId", "data-v-e3e0f29d"]]), Ke = (e) => {
|
|
1021
|
+
let t = [];
|
|
1022
|
+
function n(a) {
|
|
1023
|
+
a == null || a.forEach((s) => {
|
|
1024
|
+
Array.isArray(s) || (s = [s]), s == null || s.forEach((o) => {
|
|
1025
|
+
!(o != null && o.children) || o.children.length === 0 ? t.push(o.label) : l(o.children);
|
|
1026
|
+
});
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
function l(a) {
|
|
1030
|
+
a == null || a.forEach((s) => {
|
|
1031
|
+
!(s != null && s.children) || s.children.length === 0 ? t.push(s.label) : l(s.children);
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
return n(e), t;
|
|
1035
|
+
}, Mn = (e, t, n) => {
|
|
1036
|
+
var a;
|
|
1037
|
+
let l = (a = u(e)) == null ? void 0 : a.map((s) => (s = s.filter((o) => !o.id), s));
|
|
1038
|
+
return l = l == null ? void 0 : l.map((s) => {
|
|
1039
|
+
var o;
|
|
1040
|
+
return s = (o = s.map((i, f) => {
|
|
1041
|
+
let h = {};
|
|
1042
|
+
if (n != null && n.find((k) => k === t[f]))
|
|
1043
|
+
return h[t[f]] = i, h;
|
|
1044
|
+
})) == null ? void 0 : o.filter((i) => i), s;
|
|
1045
|
+
}), l;
|
|
1046
|
+
}, In = (e, t) => {
|
|
1047
|
+
var o, i;
|
|
1048
|
+
const n = u(e), l = (o = n == null ? void 0 : n.find((f) => (f == null ? void 0 : f.key) === "header")) == null ? void 0 : o.contents, a = (i = n == null ? void 0 : n.find((f) => (f == null ? void 0 : f.key) === "tableContents")) == null ? void 0 : i.contents;
|
|
1049
|
+
return Mn(a, Ke(l).slice(0, Ke(l).length - 1), t);
|
|
1050
|
+
}, Hn = { class: "method-content" }, Wn = ["onClick"], Zn = {
|
|
1051
|
+
__name: "index",
|
|
1052
|
+
props: {
|
|
1053
|
+
itemData: {
|
|
1054
|
+
type: Array,
|
|
1055
|
+
default: () => []
|
|
1056
|
+
},
|
|
1057
|
+
childItemData: {
|
|
1058
|
+
type: Array,
|
|
1059
|
+
default: () => []
|
|
1060
|
+
},
|
|
1061
|
+
index: Number,
|
|
1062
|
+
changedContent: {
|
|
1063
|
+
type: Object,
|
|
1064
|
+
default: () => {
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
setup(e) {
|
|
1069
|
+
const t = R([]), n = e, l = tl(ke), { itemData: a } = De(l), s = (f, h) => {
|
|
1070
|
+
var A;
|
|
1071
|
+
const k = (A = h == null ? void 0 : h[0]) == null ? void 0 : A.children;
|
|
1072
|
+
return f == null ? void 0 : f.map(($) => {
|
|
1073
|
+
var O;
|
|
1074
|
+
return $ = (O = $ == null ? void 0 : $.map((C, N) => {
|
|
1075
|
+
var y;
|
|
1076
|
+
return {
|
|
1077
|
+
key: (y = k[N]) == null ? void 0 : y.label,
|
|
1078
|
+
value: C
|
|
1079
|
+
};
|
|
1080
|
+
})) == null ? void 0 : O.filter((C) => C.key), $;
|
|
1081
|
+
});
|
|
1082
|
+
};
|
|
1083
|
+
ae(
|
|
1084
|
+
() => a.value,
|
|
1085
|
+
async () => {
|
|
1086
|
+
await i(u(n.itemData));
|
|
1087
|
+
},
|
|
1088
|
+
{ deep: !0 }
|
|
1089
|
+
);
|
|
1090
|
+
const o = async (f) => {
|
|
1091
|
+
var p, b, c, r, m, _;
|
|
1092
|
+
let h = {};
|
|
1093
|
+
if ((p = u(f.content)) == null || p.forEach((T, v) => {
|
|
1094
|
+
var x, U, E, D, B, P, S, g, j, F, w, W, K, Z, le, ee, G;
|
|
1095
|
+
if ((T == null ? void 0 : T.comp) === "Table") {
|
|
1096
|
+
let Q = (D = (E = (U = (x = T == null ? void 0 : T.compData) == null ? void 0 : x.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : U.contents) == null ? void 0 : E[0]) == null ? void 0 : D.some((M) => M == null ? void 0 : M.children), q = (S = (P = (B = T == null ? void 0 : T.compData) == null ? void 0 : B.find((M) => (M == null ? void 0 : M.key) === "tableContents")) == null ? void 0 : P.contents) == null ? void 0 : S.map((M) => M.slice(1)), H = (W = (w = (F = (j = (g = T == null ? void 0 : T.compData) == null ? void 0 : g.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : j.contents) == null ? void 0 : F[0]) == null ? void 0 : w[0]) == null ? void 0 : W.label, ne = (le = (Z = (K = T == null ? void 0 : T.compData) == null ? void 0 : K.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : Z.contents) == null ? void 0 : le[0];
|
|
1097
|
+
if (Q)
|
|
1098
|
+
h[H] = s(q, ne);
|
|
1099
|
+
else {
|
|
1100
|
+
const M = [];
|
|
1101
|
+
ne = ne.slice(1, ne.length - 1), ne == null || ne.forEach((Cl, Al) => {
|
|
1102
|
+
q == null || q.forEach((Pe) => {
|
|
1103
|
+
M.push({
|
|
1104
|
+
key: Cl.label + Pe[0],
|
|
1105
|
+
value: Pe[Al + 1]
|
|
1106
|
+
});
|
|
1107
|
+
});
|
|
1108
|
+
}), h["form" + v] = M;
|
|
1109
|
+
}
|
|
1110
|
+
} else {
|
|
1111
|
+
const Q = (G = (ee = T.compData) == null ? void 0 : ee.find((H) => (H == null ? void 0 : H.key) === "formContent")) == null ? void 0 : G.contents;
|
|
1112
|
+
h.form = {};
|
|
1113
|
+
const q = [];
|
|
1114
|
+
Q == null || Q.forEach((H) => {
|
|
1115
|
+
H.key !== "" && (H = {
|
|
1116
|
+
key: H == null ? void 0 : H.key,
|
|
1117
|
+
value: H == null ? void 0 : H.value
|
|
1118
|
+
}, q.push(H));
|
|
1119
|
+
}), h.form = q;
|
|
1120
|
+
}
|
|
1121
|
+
}), f.api) {
|
|
1122
|
+
const T = await xl.post(f.api, {
|
|
1123
|
+
data: h,
|
|
1124
|
+
templateFileName: (b = f == null ? void 0 : f.extraContent) == null ? void 0 : b[0]
|
|
1125
|
+
}, {
|
|
1126
|
+
responseType: "blob",
|
|
1127
|
+
// 必须设置
|
|
1128
|
+
headers: {
|
|
1129
|
+
"Content-Type": "application/json"
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
var k = new Blob([T.data], {
|
|
1133
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1134
|
+
}), A = T.headers["content-disposition"], $ = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), O = $.exec(A), C = ((m = (r = (c = f == null ? void 0 : f.extraContent) == null ? void 0 : c[0]) == null ? void 0 : r.split(".")) == null ? void 0 : m[0]) + "." + ((_ = O[1].split(".")) == null ? void 0 : _[1]), N = document.createElement("a"), y = window.URL.createObjectURL(k), d = /^["](.*)["]$/g;
|
|
1135
|
+
N.style.display = "none", N.href = y, N.download = decodeURI(C.replace(d, "$1")), document.body.appendChild(N), N.click(), document.body.removeChild(N), window.URL.revokeObjectURL(y);
|
|
1136
|
+
}
|
|
1137
|
+
}, i = async (f) => {
|
|
1138
|
+
var $;
|
|
1139
|
+
const h = u(f), k = h == null ? void 0 : h.map(async (O) => {
|
|
1140
|
+
var b, c, r, m, _, T;
|
|
1141
|
+
const N = (b = (await Ue({
|
|
1142
|
+
key: {
|
|
1143
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1144
|
+
parentTable: "",
|
|
1145
|
+
type: "method",
|
|
1146
|
+
methodName: O.method
|
|
1147
|
+
}
|
|
1148
|
+
})).data.result) == null ? void 0 : b[0], y = await Ue({
|
|
1149
|
+
key: {
|
|
1150
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1151
|
+
type: "methodData",
|
|
1152
|
+
tableId: N == null ? void 0 : N.id
|
|
1153
|
+
}
|
|
1154
|
+
}), d = await _l((c = O == null ? void 0 : O.value) == null ? void 0 : c[0], sessionStorage.getItem("systemKey"), ""), p = (r = y.data.result) == null ? void 0 : r[0];
|
|
1155
|
+
return {
|
|
1156
|
+
buttonName: (m = N == null ? void 0 : N.key) == null ? void 0 : m.methodKey,
|
|
1157
|
+
api: (T = (_ = p == null ? void 0 : p.value) == null ? void 0 : _.tableData) == null ? void 0 : T[0],
|
|
1158
|
+
content: d == null ? void 0 : d.filter((v) => v.comp !== "methodButton"),
|
|
1159
|
+
extraContent: u(O.value).slice(1)
|
|
1160
|
+
};
|
|
1161
|
+
}), A = await Promise.all(k);
|
|
1162
|
+
t.value = A, ($ = t.value) == null || $.forEach((O) => {
|
|
1163
|
+
var C;
|
|
1164
|
+
O.api === "" && ((C = O.content) == null || C.forEach((N) => {
|
|
1165
|
+
var y;
|
|
1166
|
+
N.comp == "Table" && l.setExtraContents(In(N.compData, (y = O.extraContent) == null ? void 0 : y[0]));
|
|
1167
|
+
}));
|
|
1168
|
+
});
|
|
1169
|
+
};
|
|
1170
|
+
return ae(
|
|
1171
|
+
() => n.itemData,
|
|
1172
|
+
async () => {
|
|
1173
|
+
await i(u(n.itemData));
|
|
1174
|
+
},
|
|
1175
|
+
{ immediate: !0, deep: !0 }
|
|
1176
|
+
), (f, h) => (z(), Y("div", Hn, [
|
|
1177
|
+
(z(!0), Y(he, null, xe(t.value, (k) => (z(), Y("div", null, [
|
|
1178
|
+
k.api !== "" ? (z(), Y("div", {
|
|
1179
|
+
key: 0,
|
|
1180
|
+
onClick: (A) => o(k),
|
|
1181
|
+
class: "method-buttons"
|
|
1182
|
+
}, X(k.buttonName), 9, Wn)) : Tl("", !0)
|
|
1183
|
+
]))), 256))
|
|
1184
|
+
]));
|
|
1185
|
+
}
|
|
1186
|
+
}, Kn = /* @__PURE__ */ pe(Zn, [["__scopeId", "data-v-3daae5c9"]]), zt = R([
|
|
1187
|
+
{
|
|
1188
|
+
name: "表格",
|
|
1189
|
+
type: "table",
|
|
1190
|
+
comp: "Table",
|
|
1191
|
+
icon: "Grid"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
name: "表单",
|
|
1195
|
+
type: "form",
|
|
1196
|
+
comp: "Form",
|
|
1197
|
+
icon: "Film"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
name: "折叠",
|
|
1201
|
+
type: "fold",
|
|
1202
|
+
comp: "Fold",
|
|
1203
|
+
icon: "Fold"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
name: "头像",
|
|
1207
|
+
type: "avatar",
|
|
1208
|
+
comp: "AvatarUpload",
|
|
1209
|
+
icon: "Avatar"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: "签名",
|
|
1213
|
+
type: "signature",
|
|
1214
|
+
comp: "Signature",
|
|
1215
|
+
icon: "Signature"
|
|
1216
|
+
}
|
|
1217
|
+
]), qn = {
|
|
1218
|
+
TABLE: Ol,
|
|
1219
|
+
FORM: mn,
|
|
1220
|
+
TABLEOPERATE: vn,
|
|
1221
|
+
FORMOPERATE: Fn,
|
|
1222
|
+
FOLD: Nl,
|
|
1223
|
+
CALCULATOR: Gn,
|
|
1224
|
+
METHODBUTTON: Kn,
|
|
1225
|
+
AVATARUPLOAD: Bl,
|
|
1226
|
+
SIGNATURE: Pl
|
|
1227
|
+
// 添加其他组件...
|
|
1228
|
+
};
|
|
1229
|
+
function zn(e) {
|
|
1230
|
+
return qn[e == null ? void 0 : e.toUpperCase()] || null;
|
|
1231
|
+
}
|
|
1232
|
+
const L = [
|
|
1233
|
+
{
|
|
1234
|
+
key: "FormName",
|
|
1235
|
+
value: "Form"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
key: "TableName",
|
|
1239
|
+
value: "Table"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
key: "MenuName",
|
|
1243
|
+
value: "Menu"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
key: "GroupName",
|
|
1247
|
+
value: "Group"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
key: "SystemKey",
|
|
1251
|
+
value: "System"
|
|
1252
|
+
}
|
|
1253
|
+
], J = [
|
|
1254
|
+
{
|
|
1255
|
+
key: "FormDirect",
|
|
1256
|
+
value: "formFlex"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
key: "Form",
|
|
1260
|
+
value: "formContent"
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
key: "FormButton",
|
|
1264
|
+
value: "formButton"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
key: "FormFlex",
|
|
1268
|
+
value: "formWrap"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
key: "TableColumns",
|
|
1272
|
+
value: "header"
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
key: "TableButton",
|
|
1276
|
+
value: "extraButton"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
key: "TableLineButton",
|
|
1280
|
+
value: "rowButton"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
key: "Table",
|
|
1284
|
+
value: "tableContents"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
key: "TableIndex",
|
|
1288
|
+
value: "tableIndex"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
key: "Menus",
|
|
1292
|
+
value: "menuContents"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
key: "GroupContents",
|
|
1296
|
+
value: "groupContents"
|
|
1297
|
+
}
|
|
1298
|
+
], re = R(0), Qn = (e) => {
|
|
1299
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), a = n.replace(/^['"]|['"]$/g, "");
|
|
1300
|
+
return { key: l, value: a };
|
|
1301
|
+
}, me = (e) => {
|
|
1302
|
+
try {
|
|
1303
|
+
return JSON.parse(e), !0;
|
|
1304
|
+
} catch {
|
|
1305
|
+
return !1;
|
|
1306
|
+
}
|
|
1307
|
+
}, Xn = (e) => e.includes("$") && e.trim().endsWith("(") ? e + ")" : e, Yn = (e) => {
|
|
1308
|
+
let t = e;
|
|
1309
|
+
const n = [];
|
|
1310
|
+
let l = "";
|
|
1311
|
+
for (const a of t)
|
|
1312
|
+
a.includes("{") || l.includes("{") || a.includes("[") || l.includes("[") || a.includes("【") || l.includes("【") || a.includes("(") || l.includes("(") || a.includes("(") || l.includes("(") || a.includes("/*") || l.includes("/*") ? (l += a.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && (n.push(l), l = "")) : n.push(a.trim());
|
|
1313
|
+
return n == null ? void 0 : n.filter((a) => a.includes("{"));
|
|
1314
|
+
}, Vn = (e) => {
|
|
1315
|
+
var n;
|
|
1316
|
+
let t = [];
|
|
1317
|
+
return (n = Yn(e.slice(1, -1))) == null || n.forEach((l) => {
|
|
1318
|
+
var s, o, i, f;
|
|
1319
|
+
let a = ((o = (s = l.slice(1, -1)) == null ? void 0 : s.split(",")) == null ? void 0 : o.length) ?? 1;
|
|
1320
|
+
(f = (i = l.slice(1, -1)) == null ? void 0 : i.split(",")) == null || f.forEach((h) => {
|
|
1321
|
+
var O, C, N, y, d, p, b, c, r, m, _, T, v;
|
|
1322
|
+
let k = h == null ? void 0 : h.split(":"), A = k != null && k[0] ? (k == null ? void 0 : k[1].split("$").length) - 1 === 1 ? ((O = k == null ? void 0 : k[0]) == null ? void 0 : O.replace(/^"(.*)"$/, "$1")) + ((C = k == null ? void 0 : k[1]) == null ? void 0 : C.replace(/^"(.*)"$/, "$1")) : Array.isArray((y = (N = k == null ? void 0 : k[1]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1")) == null ? void 0 : y.split("(")) && ((b = (p = (d = k == null ? void 0 : k[1]) == null ? void 0 : d.replace(/^"(.*)"$/, "$1")) == null ? void 0 : p.split("(")) == null ? void 0 : b.length) > 1 ? ((c = k == null ? void 0 : k[0]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) + ((_ = (m = (r = k == null ? void 0 : k[1]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) == null ? void 0 : m.split("(")) == null ? void 0 : _[0]) + "()" : (T = k == null ? void 0 : k[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1") : "", $ = (k == null ? void 0 : k[1].split("$").length) - 1 === 0 ? (v = k == null ? void 0 : k[1]) == null ? void 0 : v.replace(/^"(.*)"$/, "$1") : "";
|
|
1323
|
+
re.value++, t.push({
|
|
1324
|
+
id: re.value,
|
|
1325
|
+
key: A,
|
|
1326
|
+
value: $,
|
|
1327
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1328
|
+
width: a,
|
|
1329
|
+
extraContent: k == null ? void 0 : k[1]
|
|
1330
|
+
});
|
|
1331
|
+
});
|
|
1332
|
+
}), t;
|
|
1333
|
+
}, rl = (e) => {
|
|
1334
|
+
var t, n;
|
|
1335
|
+
try {
|
|
1336
|
+
const l = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1337
|
+
if (u(l).split("{").length - 1 > 1) {
|
|
1338
|
+
let a = u(l).replace(/^\{(.*)\}$/, "[$1]");
|
|
1339
|
+
if (me(a) && !a.includes("$") || (a = a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), me(a)) {
|
|
1340
|
+
const s = JSON.parse(a);
|
|
1341
|
+
let o = [];
|
|
1342
|
+
return s == null || s.forEach((i) => {
|
|
1343
|
+
var f;
|
|
1344
|
+
(f = Object.entries(u(i))) == null || f.forEach((h) => {
|
|
1345
|
+
re.value++, o.push({
|
|
1346
|
+
id: re.value,
|
|
1347
|
+
key: (h == null ? void 0 : h[0]) ?? "",
|
|
1348
|
+
value: (h == null ? void 0 : h[1]) === "" ? "" : h == null ? void 0 : h[1],
|
|
1349
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1350
|
+
width: Object.keys(u(i)).length
|
|
1351
|
+
});
|
|
1352
|
+
});
|
|
1353
|
+
}), o;
|
|
1354
|
+
} else
|
|
1355
|
+
return l.trim().startsWith("{{") ? Vn(l.trim()) : _e(a);
|
|
1356
|
+
} else if (me(l)) {
|
|
1357
|
+
const a = JSON.parse(l);
|
|
1358
|
+
return Object.entries(a).map(([s, o]) => (re.value++, {
|
|
1359
|
+
id: re.value,
|
|
1360
|
+
key: s,
|
|
1361
|
+
value: o === "" ? "" : o,
|
|
1362
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1363
|
+
width: 1
|
|
1364
|
+
}));
|
|
1365
|
+
} else
|
|
1366
|
+
return ((t = _e(l)) == null ? void 0 : t.length) === 0 ? l : (n = _e(l)) == null ? void 0 : n.map((a) => ({
|
|
1367
|
+
label: a.label,
|
|
1368
|
+
method: Xn(a.method)
|
|
1369
|
+
}));
|
|
1370
|
+
} catch (l) {
|
|
1371
|
+
return console.error("转换失败:", l), [];
|
|
1372
|
+
}
|
|
1373
|
+
}, _e = (e) => {
|
|
1374
|
+
e = e.trim().replace(/^\{|\}$/g, "").trim();
|
|
1375
|
+
const t = [];
|
|
1376
|
+
let n = 0;
|
|
1377
|
+
for (; n < e.length; ) {
|
|
1378
|
+
const l = e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
|
|
1379
|
+
if (!l) break;
|
|
1380
|
+
const a = l[1];
|
|
1381
|
+
n += l[0].length;
|
|
1382
|
+
let s = "", o = 0, i = !1, f = "";
|
|
1383
|
+
for (let h = n; h < e.length; h++) {
|
|
1384
|
+
const k = e[h];
|
|
1385
|
+
if ((k === '"' || k === "'") && !i ? (i = !0, f = k) : k === f && i && (i = !1, f = ""), !i && ((k === "{" || k === "(" || k === "[") && o++, (k === "}" || k === ")" || k === "]") && o--, k === "," && o === 0 || h === e.length - 1)) {
|
|
1386
|
+
s = e.slice(n, h + 1).trim(), n = h + 1;
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
t.push({
|
|
1391
|
+
label: a,
|
|
1392
|
+
method: s
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
return t;
|
|
1396
|
+
}, et = (e, t) => {
|
|
1397
|
+
try {
|
|
1398
|
+
if (L != null && L.find((n) => (n == null ? void 0 : n.key) === t))
|
|
1399
|
+
return e.replace(/['"]/g, "").trim();
|
|
1400
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1401
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1402
|
+
return JSON.parse(n);
|
|
1403
|
+
} else {
|
|
1404
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1405
|
+
if (me(n)) {
|
|
1406
|
+
const l = JSON.parse(n);
|
|
1407
|
+
return Array.isArray(l) ? l.map((a) => ({ label: a })) : l;
|
|
1408
|
+
} else
|
|
1409
|
+
return rl(u(e));
|
|
1410
|
+
}
|
|
1411
|
+
} catch (n) {
|
|
1412
|
+
return console.error("解析失败:", n), e;
|
|
1413
|
+
}
|
|
1414
|
+
}, lt = (e) => ({ [e == null ? void 0 : e.key]: et(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), nt = (e) => {
|
|
1415
|
+
try {
|
|
1416
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1417
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1418
|
+
return JSON.parse(t);
|
|
1419
|
+
} else
|
|
1420
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1421
|
+
} catch (t) {
|
|
1422
|
+
return console.error("解析失败:", t), e;
|
|
1423
|
+
}
|
|
1424
|
+
}, tt = (e) => {
|
|
1425
|
+
const t = e.match(/\(([^)]+)\)/);
|
|
1426
|
+
return t ? t[1] : "";
|
|
1427
|
+
}, at = (e) => {
|
|
1428
|
+
const t = e.match(/^([^(]+)\s*\(/);
|
|
1429
|
+
return t ? t[1].trim() : e;
|
|
1430
|
+
}, qe = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((t) => t.trim()).filter((t) => t).join("/"), st = (e) => {
|
|
1431
|
+
var o, i;
|
|
1432
|
+
let t = [], n = [];
|
|
1433
|
+
const l = (o = u(e)) == null ? void 0 : o.map((f) => f == null ? void 0 : f.key), a = [...new Set((i = u(l)) == null ? void 0 : i.map((f) => tt(f)))];
|
|
1434
|
+
a == null || a.forEach((f) => {
|
|
1435
|
+
let h = e == null ? void 0 : e.filter(($) => $.key.includes(f));
|
|
1436
|
+
h == null || h.forEach(($) => {
|
|
1437
|
+
$ != null && $.key.includes("Menus") && (t.push({
|
|
1438
|
+
key: "GroupName",
|
|
1439
|
+
value: qe($ == null ? void 0 : $.value)
|
|
1440
|
+
}), n.push(qe($ == null ? void 0 : $.value)));
|
|
1441
|
+
});
|
|
1442
|
+
let k = e == null ? void 0 : e.filter(($) => $.key.includes(f) && !($ != null && $.key.includes("Menus")));
|
|
1443
|
+
k = k == null ? void 0 : k.map(($) => ($.key = at($.key), $));
|
|
1444
|
+
const A = {
|
|
1445
|
+
key: "GroupContents",
|
|
1446
|
+
value: k
|
|
1447
|
+
};
|
|
1448
|
+
t.push(A);
|
|
1449
|
+
});
|
|
1450
|
+
const s = {
|
|
1451
|
+
key: "Menus",
|
|
1452
|
+
value: n
|
|
1453
|
+
};
|
|
1454
|
+
return t.unshift(s), t;
|
|
1455
|
+
}, ol = (e) => {
|
|
1456
|
+
var t, n;
|
|
1457
|
+
if (Array.isArray(Object.keys(e)) && ((t = Object.keys(e)) == null ? void 0 : t.length) > 0) {
|
|
1458
|
+
let l = [];
|
|
1459
|
+
return (n = Object.entries(e)) == null || n.forEach(([a, s]) => {
|
|
1460
|
+
var i, f;
|
|
1461
|
+
let o = [];
|
|
1462
|
+
if (o.push(a), ((i = Object.keys(s)) == null ? void 0 : i.length) > 0) {
|
|
1463
|
+
let h = [];
|
|
1464
|
+
(f = ol(s)) == null || f.forEach((k) => {
|
|
1465
|
+
h.push(k);
|
|
1466
|
+
}), h == null || h.forEach((k) => {
|
|
1467
|
+
o.push(k);
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
l.push(o);
|
|
1471
|
+
}), l;
|
|
1472
|
+
}
|
|
1473
|
+
}, rt = (e, t) => {
|
|
1474
|
+
var l;
|
|
1475
|
+
let n = t;
|
|
1476
|
+
return Array.isArray(Object.keys(e)) && ((l = Object.entries(e)) == null || l.forEach(([a, s]) => {
|
|
1477
|
+
let o = [a];
|
|
1478
|
+
if (typeof s == "object" && s !== null) {
|
|
1479
|
+
let i = ol(s);
|
|
1480
|
+
i == null || i.forEach((f) => {
|
|
1481
|
+
o.push(f);
|
|
1482
|
+
});
|
|
1483
|
+
}
|
|
1484
|
+
n.push(o);
|
|
1485
|
+
})), n;
|
|
1486
|
+
}, ot = (e) => {
|
|
1487
|
+
const t = {};
|
|
1488
|
+
return e.forEach((l) => {
|
|
1489
|
+
const a = l.split("/");
|
|
1490
|
+
let s = t;
|
|
1491
|
+
a.forEach((o) => {
|
|
1492
|
+
s[o] || (s[o] = {}), s = s[o];
|
|
1493
|
+
});
|
|
1494
|
+
}), rt(t, []);
|
|
1495
|
+
}, cl = (e) => ot(e), Qt = (e) => {
|
|
1496
|
+
var t, n, l, a, s, o, i, f;
|
|
1497
|
+
try {
|
|
1498
|
+
const h = Se((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), k = (a = (l = u(h)) == null ? void 0 : l.filter((C) => !C.includes("/*"))) == null ? void 0 : a.map((C) => Qn(C)), A = st(k), $ = [];
|
|
1499
|
+
if (((s = A == null ? void 0 : A.find((C) => (C == null ? void 0 : C.key) === "Menus")) == null ? void 0 : s.value.length) === 0)
|
|
1500
|
+
return !1;
|
|
1501
|
+
(o = u(A)) == null || o.forEach((C) => {
|
|
1502
|
+
var N, y, d, p, b;
|
|
1503
|
+
L != null && L.find((c) => {
|
|
1504
|
+
var r, m;
|
|
1505
|
+
return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
|
|
1506
|
+
}) ? $.push({
|
|
1507
|
+
comp: ((N = L == null ? void 0 : L.find((c) => {
|
|
1508
|
+
var r, m;
|
|
1509
|
+
return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
|
|
1510
|
+
})) == null ? void 0 : N.value) ?? "",
|
|
1511
|
+
name: (y = C == null ? void 0 : C.value) == null ? void 0 : y.replace(/[’]|[‘]|[']/g, ""),
|
|
1512
|
+
compData: []
|
|
1513
|
+
}) : J != null && J.find((c) => {
|
|
1514
|
+
var r, m;
|
|
1515
|
+
return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
|
|
1516
|
+
}) && (($ == null ? void 0 : $.length) === 0 && (d = C.key) != null && d.includes("Menus") && $.push({
|
|
1517
|
+
comp: "Menu",
|
|
1518
|
+
name: "",
|
|
1519
|
+
compData: []
|
|
1520
|
+
}), (p = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && p.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
|
|
1521
|
+
key: (b = J == null ? void 0 : J.find((c) => {
|
|
1522
|
+
var r, m;
|
|
1523
|
+
return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
|
|
1524
|
+
})) == null ? void 0 : b.value,
|
|
1525
|
+
contents: C == null ? void 0 : C.value
|
|
1526
|
+
}));
|
|
1527
|
+
});
|
|
1528
|
+
let O = (i = u($)) == null ? void 0 : i.map((C) => {
|
|
1529
|
+
var N;
|
|
1530
|
+
return C != null && C.compData && (C.compData = (N = C == null ? void 0 : C.compData) == null ? void 0 : N.map((y) => {
|
|
1531
|
+
var d, p, b, c, r, m, _, T, v, x, U;
|
|
1532
|
+
if ((y == null ? void 0 : y.key) === "formFlex")
|
|
1533
|
+
y.contents = ((p = (d = y.contents) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : p.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1534
|
+
else if ((y == null ? void 0 : y.key) === "groupContents")
|
|
1535
|
+
y.contents = (b = u(y.contents)) == null ? void 0 : b.map((E) => lt(u(E)));
|
|
1536
|
+
else if (Array.isArray(y == null ? void 0 : y.contents))
|
|
1537
|
+
y.contents = cl(y.contents);
|
|
1538
|
+
else if (((r = (c = y == null ? void 0 : y.contents) == null ? void 0 : c.trim()) != null && r.startsWith("[") || (_ = (m = y.contents) == null ? void 0 : m.trim()) != null && _.startsWith("【")) && ((v = (T = y.contents) == null ? void 0 : T.trim()) != null && v.endsWith("]") || (U = (x = y.contents) == null ? void 0 : x.trim()) != null && U.endsWith("】")))
|
|
1539
|
+
y.contents = nt(u(y.contents));
|
|
1540
|
+
else {
|
|
1541
|
+
if (!y.contents) return;
|
|
1542
|
+
y.contents = rl(u(y.contents));
|
|
1543
|
+
}
|
|
1544
|
+
return y;
|
|
1545
|
+
})), C;
|
|
1546
|
+
});
|
|
1547
|
+
return O = (f = u(O)) == null ? void 0 : f.map((C) => {
|
|
1548
|
+
var N;
|
|
1549
|
+
return (C == null ? void 0 : C.comp) === "Group" && (C.compData = (N = C.compData) == null ? void 0 : N.map((y) => {
|
|
1550
|
+
var p;
|
|
1551
|
+
let d = [];
|
|
1552
|
+
return (p = y.contents) == null || p.forEach((b) => {
|
|
1553
|
+
var c, r, m, _, T, v, x, U, E, D, B, P;
|
|
1554
|
+
if (L != null && L.find((S) => {
|
|
1555
|
+
var g, j, F;
|
|
1556
|
+
return ((g = S == null ? void 0 : S.key) == null ? void 0 : g.toUpperCase()) === ((F = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : F.toUpperCase());
|
|
1557
|
+
}))
|
|
1558
|
+
d.push({
|
|
1559
|
+
comp: (c = L == null ? void 0 : L.find((S) => {
|
|
1560
|
+
var g, j, F;
|
|
1561
|
+
return ((g = S == null ? void 0 : S.key) == null ? void 0 : g.toUpperCase()) === ((F = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : F.toUpperCase());
|
|
1562
|
+
})) == null ? void 0 : c.value,
|
|
1563
|
+
name: (m = (r = Object.values(b)) == null ? void 0 : r[0]) == null ? void 0 : m.replace(/[’]|[‘]|[']/g, ""),
|
|
1564
|
+
compData: []
|
|
1565
|
+
});
|
|
1566
|
+
else if (J != null && J.find((S) => {
|
|
1567
|
+
var g, j, F;
|
|
1568
|
+
return ((g = S == null ? void 0 : S.key) == null ? void 0 : g.toUpperCase()) === ((F = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : F.toUpperCase());
|
|
1569
|
+
})) {
|
|
1570
|
+
if ((d == null ? void 0 : d.length) === 0) return;
|
|
1571
|
+
(_ = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && _.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
1572
|
+
key: (T = J == null ? void 0 : J.find((S) => {
|
|
1573
|
+
var g, j, F;
|
|
1574
|
+
return ((g = S == null ? void 0 : S.key) == null ? void 0 : g.toUpperCase()) === ((F = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : F.toUpperCase());
|
|
1575
|
+
})) == null ? void 0 : T.value,
|
|
1576
|
+
contents: (v = Object.values(b)) == null ? void 0 : v[0]
|
|
1577
|
+
});
|
|
1578
|
+
} else if ((U = (x = Object.keys(b)) == null ? void 0 : x[0]) != null && U.includes("$")) {
|
|
1579
|
+
const S = (D = (E = Object.keys(u(b))) == null ? void 0 : E[0]) == null ? void 0 : D.split("$");
|
|
1580
|
+
d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
1581
|
+
key: (B = J == null ? void 0 : J.find((g) => {
|
|
1582
|
+
var j, F;
|
|
1583
|
+
return ((j = g == null ? void 0 : g.key) == null ? void 0 : j.toUpperCase()) === ((F = S == null ? void 0 : S[0]) == null ? void 0 : F.toUpperCase());
|
|
1584
|
+
})) == null ? void 0 : B.value,
|
|
1585
|
+
contents: (P = Object.values(b)) == null ? void 0 : P[0],
|
|
1586
|
+
selectLabel: S == null ? void 0 : S[1]
|
|
1587
|
+
});
|
|
1588
|
+
}
|
|
1589
|
+
return b;
|
|
1590
|
+
}), y.contents = d, y;
|
|
1591
|
+
})), C;
|
|
1592
|
+
}), O;
|
|
1593
|
+
} catch {
|
|
1594
|
+
return !1;
|
|
1595
|
+
}
|
|
1596
|
+
}, te = (e) => {
|
|
1597
|
+
try {
|
|
1598
|
+
return JSON.parse(e), !0;
|
|
1599
|
+
} catch {
|
|
1600
|
+
return !1;
|
|
1601
|
+
}
|
|
1602
|
+
}, Xt = (e, t) => dn(e, t), ze = R(0), ul = (e) => {
|
|
1603
|
+
const t = [];
|
|
1604
|
+
let n = null;
|
|
1605
|
+
for (let l = 0; l < e.length; l++) {
|
|
1606
|
+
const a = e[l];
|
|
1607
|
+
if (Array.isArray(a))
|
|
1608
|
+
n && (n.children = ul(a));
|
|
1609
|
+
else {
|
|
1610
|
+
const s = { label: a };
|
|
1611
|
+
t.push(s), n = s;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
return t;
|
|
1615
|
+
}, pl = (e) => {
|
|
1616
|
+
let t = 0;
|
|
1617
|
+
for (const n of e)
|
|
1618
|
+
t++, n.children && (t += pl(n.children));
|
|
1619
|
+
return t;
|
|
1620
|
+
}, il = (e, t, n = []) => {
|
|
1621
|
+
let l = 0;
|
|
1622
|
+
for (const a of t) {
|
|
1623
|
+
if (l >= e.length) break;
|
|
1624
|
+
const s = [...e[l]];
|
|
1625
|
+
if (n.push(s), l++, a.children && a.children.length > 0) {
|
|
1626
|
+
const o = [];
|
|
1627
|
+
il(
|
|
1628
|
+
e.slice(l),
|
|
1629
|
+
a.children,
|
|
1630
|
+
o
|
|
1631
|
+
), o.length > 0 && (s.push(o), l += pl(a.children));
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
return n;
|
|
1635
|
+
}, ct = (e, t) => {
|
|
1636
|
+
let n = [];
|
|
1637
|
+
return e == null || e.forEach((a) => {
|
|
1638
|
+
a.some((s) => Array.isArray(s)) ? n.push(...a) : n.push(a);
|
|
1639
|
+
}), il(n, t);
|
|
1640
|
+
}, ve = (e) => {
|
|
1641
|
+
const t = { label: e[0].trim() };
|
|
1642
|
+
if (e.length > 1) {
|
|
1643
|
+
const n = e.slice(1);
|
|
1644
|
+
n.length === 1 && Array.isArray(n[0]) ? t.children = n[0].map(
|
|
1645
|
+
(l) => Array.isArray(l) ? ve(l) : { label: l.trim() }
|
|
1646
|
+
) : t.children = n.map(
|
|
1647
|
+
(l) => Array.isArray(l) ? ve(l) : { label: l.trim() }
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
return t;
|
|
1651
|
+
}, Qe = (e) => {
|
|
1652
|
+
let t = e.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
|
|
1653
|
+
return t = t.replace(/:}(?=,|]|}|$)/g, ':""}'), t = t.replace(/:,(?=\s*")/g, ':"",'), t = t.replace(
|
|
1654
|
+
/(https?|HTTPS?):"\/\/([^"]+)"/gi,
|
|
1655
|
+
(n, l, a) => `"${l}://${a}"`
|
|
1656
|
+
), t = t.replace(
|
|
1657
|
+
/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
|
|
1658
|
+
'$1"$2"$3'
|
|
1659
|
+
), t;
|
|
1660
|
+
}, ut = (e) => {
|
|
1661
|
+
var n;
|
|
1662
|
+
return e.some((l) => !Array.isArray(l)) ? e : (n = u(e)) == null ? void 0 : n.map((l) => {
|
|
1663
|
+
let a = [];
|
|
1664
|
+
return l.some((s) => Array.isArray(s)) ? l == null || l.forEach((s) => {
|
|
1665
|
+
Array.isArray(s) && a.push(ve(s));
|
|
1666
|
+
}) : l.some((s) => s.includes("[")) ? a.push(l) : a = l.map((s) => ({ label: s.trim() })), a;
|
|
1667
|
+
});
|
|
1668
|
+
}, fl = (e, t, n) => {
|
|
1669
|
+
let l = e, a = n, s = t;
|
|
1670
|
+
return s.children && (Array.isArray(a[a.length - 1]) ? a[a.length - 1].push(l[0]) : a.push(l[0]), l.shift(), s = s.children), Array.isArray(s) && s.forEach((o) => {
|
|
1671
|
+
if (o.children) {
|
|
1672
|
+
const i = fl(l, o, a);
|
|
1673
|
+
a = i[0], l = i[1];
|
|
1674
|
+
}
|
|
1675
|
+
}), [a, l];
|
|
1676
|
+
}, pt = (e, t) => {
|
|
1677
|
+
let n = e, l = [];
|
|
1678
|
+
return t.length > 0 ? t == null || t.forEach((a) => {
|
|
1679
|
+
let s = n == null ? void 0 : n[0];
|
|
1680
|
+
n.shift();
|
|
1681
|
+
const o = fl(u(n), a, s);
|
|
1682
|
+
s = o[0], n = o[1], l.push(s);
|
|
1683
|
+
}) : l = n, l;
|
|
1684
|
+
}, Ne = (e, t) => {
|
|
1685
|
+
const n = ut(u(e));
|
|
1686
|
+
return pt(n, t);
|
|
1687
|
+
}, it = (e) => {
|
|
1688
|
+
const t = [];
|
|
1689
|
+
let n = 0;
|
|
1690
|
+
const l = e.length;
|
|
1691
|
+
for (; n < l; ) {
|
|
1692
|
+
const a = e[n];
|
|
1693
|
+
a.key === "tableColumns" && n + 1 < l && e[n + 1].key === "tableContents" ? (t.push({
|
|
1694
|
+
comp: "Table",
|
|
1695
|
+
compData: [a, e[n + 1]],
|
|
1696
|
+
name: ""
|
|
1697
|
+
}), n += 2) : (t.push(a), n += 1);
|
|
1698
|
+
}
|
|
1699
|
+
return t;
|
|
1700
|
+
}, dl = (e) => Ne([e], []), Xe = (e) => {
|
|
1701
|
+
const t = [];
|
|
1702
|
+
return e == null || e.forEach((n) => n == null ? void 0 : n.forEach((a) => {
|
|
1703
|
+
var s, o;
|
|
1704
|
+
ze.value++, t.push({
|
|
1705
|
+
id: ze.value,
|
|
1706
|
+
key: (s = Object.keys(a)) == null ? void 0 : s[0],
|
|
1707
|
+
value: (o = Object.values(a)) == null ? void 0 : o[0],
|
|
1708
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1709
|
+
width: n.length
|
|
1710
|
+
});
|
|
1711
|
+
})), t;
|
|
1712
|
+
}, Ye = (e) => {
|
|
1713
|
+
let t = it(e);
|
|
1714
|
+
return t = t == null ? void 0 : t.map((n) => {
|
|
1715
|
+
var l, a, s, o;
|
|
1716
|
+
if (n.comp === "Table")
|
|
1717
|
+
(l = n.compData) != null && l.find((i) => (i == null ? void 0 : i.key) === "header") || (n.compData = (a = n.compData) == null ? void 0 : a.map((i) => (i.key === "tableColumns" ? i = {
|
|
1718
|
+
key: "header",
|
|
1719
|
+
contents: Ne(i.value, [])
|
|
1720
|
+
} : i = {
|
|
1721
|
+
key: i.key,
|
|
1722
|
+
contents: i.value
|
|
1723
|
+
}, i)), n.compData.push({
|
|
1724
|
+
key: "extraButton",
|
|
1725
|
+
contents: [{ label: "新增" }]
|
|
1726
|
+
}), n.compData.push({
|
|
1727
|
+
key: "rowButton",
|
|
1728
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1729
|
+
}));
|
|
1730
|
+
else if (n.key === "form") {
|
|
1731
|
+
const i = (s = n == null ? void 0 : n.value) == null ? void 0 : s.map((f) => (Array.isArray(f) || (f = [f]), f));
|
|
1732
|
+
n = {
|
|
1733
|
+
comp: "Form",
|
|
1734
|
+
compData: [
|
|
1735
|
+
{
|
|
1736
|
+
key: "formFlex",
|
|
1737
|
+
contents: ""
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
key: "formContent",
|
|
1741
|
+
contents: Xe(i)
|
|
1742
|
+
}
|
|
1743
|
+
],
|
|
1744
|
+
name: ""
|
|
1745
|
+
};
|
|
1746
|
+
} else if (n.key === "formTop") {
|
|
1747
|
+
const i = (o = n == null ? void 0 : n.value) == null ? void 0 : o.map((f) => (Array.isArray(f) || (f = [f]), f));
|
|
1748
|
+
n = {
|
|
1749
|
+
comp: "FormTop",
|
|
1750
|
+
compData: [
|
|
1751
|
+
{
|
|
1752
|
+
key: "formFlex",
|
|
1753
|
+
contents: ""
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
key: "formContent",
|
|
1757
|
+
contents: Xe(i)
|
|
1758
|
+
}
|
|
1759
|
+
],
|
|
1760
|
+
name: ""
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
return n;
|
|
1764
|
+
}), t;
|
|
1765
|
+
}, ft = (e, t) => {
|
|
1766
|
+
var i, f, h, k, A, $;
|
|
1767
|
+
const n = [], l = ul((f = (i = e == null ? void 0 : e.find((O) => O.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : f[0]);
|
|
1768
|
+
n.push({
|
|
1769
|
+
key: "tableIndexColumn",
|
|
1770
|
+
contents: t
|
|
1771
|
+
}), n.push({
|
|
1772
|
+
key: "tableIndex",
|
|
1773
|
+
contents: l
|
|
1774
|
+
});
|
|
1775
|
+
let a = [];
|
|
1776
|
+
const s = (h = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : h.value;
|
|
1777
|
+
s.length === 1 && !(s != null && s[0].some((O) => Array.isArray(O))) ? a = (k = s == null ? void 0 : s[0]) == null ? void 0 : k.map((O) => ({ label: O })) : a = Ne((A = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : A.value, l), n.push({
|
|
1778
|
+
key: "header",
|
|
1779
|
+
contents: a
|
|
1780
|
+
});
|
|
1781
|
+
const o = ct(($ = e == null ? void 0 : e.find((O) => O.key === "tableContents")) == null ? void 0 : $.value, l);
|
|
1782
|
+
return n.push({
|
|
1783
|
+
key: "tableContents",
|
|
1784
|
+
contents: o
|
|
1785
|
+
}), n.push({
|
|
1786
|
+
key: "extraButton",
|
|
1787
|
+
contents: [{ label: "新增" }]
|
|
1788
|
+
}), n.push({
|
|
1789
|
+
key: "rowButton",
|
|
1790
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1791
|
+
}), n;
|
|
1792
|
+
}, yl = (e) => e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (t, n, l) => {
|
|
1793
|
+
const a = yl(l);
|
|
1794
|
+
return `"${n}",${a}`;
|
|
1795
|
+
}), de = (e) => {
|
|
1796
|
+
const t = e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
|
|
1797
|
+
return yl(t).replace(/^"(.*)"$/, "$1");
|
|
1798
|
+
}, dt = (e) => {
|
|
1799
|
+
const t = /* @__PURE__ */ new Set();
|
|
1800
|
+
return e.filter((n) => {
|
|
1801
|
+
const l = JSON.stringify(n);
|
|
1802
|
+
return t.has(l) ? !1 : t.add(l);
|
|
1803
|
+
});
|
|
1804
|
+
}, Ve = (e) => {
|
|
1805
|
+
var n;
|
|
1806
|
+
let t = [];
|
|
1807
|
+
return (n = u(e)) == null || n.forEach((l) => {
|
|
1808
|
+
var a;
|
|
1809
|
+
(a = l.contents) == null || a.forEach((s) => {
|
|
1810
|
+
t.push(s);
|
|
1811
|
+
});
|
|
1812
|
+
}), t = dt(t), t.push({
|
|
1813
|
+
label: "操作"
|
|
1814
|
+
}), [t];
|
|
1815
|
+
}, yt = (e, t) => e.reduce((n, l, a) => {
|
|
1816
|
+
const s = Math.floor(a / t);
|
|
1817
|
+
return n[s] || (n[s] = []), n[s].push(l), n;
|
|
1818
|
+
}, []), hl = (e) => e.reduce((t, n) => n.children && n.children.length > 0 ? t + hl(n.children) : t + 1, 0), ht = (e, t) => {
|
|
1819
|
+
var l;
|
|
1820
|
+
let n = [];
|
|
1821
|
+
return (l = yt(e, hl(t == null ? void 0 : t[0]) - 1)) == null || l.forEach((a) => {
|
|
1822
|
+
let s = [];
|
|
1823
|
+
a.forEach((o) => {
|
|
1824
|
+
var i;
|
|
1825
|
+
Array.isArray(o.contents) ? (i = o.contents) == null || i.forEach((f) => {
|
|
1826
|
+
s.push(f);
|
|
1827
|
+
}) : s.push(o.contents);
|
|
1828
|
+
}), n.push(s);
|
|
1829
|
+
}), [n];
|
|
1830
|
+
}, mt = ["方法体", "输入", "输出"], el = R(1), Se = (e) => {
|
|
1831
|
+
let t;
|
|
1832
|
+
e.replaceAll(" ", `\r
|
|
1833
|
+
`).includes(`\r
|
|
1834
|
+
`) ? t = e.replaceAll(" ", `\r
|
|
1835
|
+
`).split(`\r
|
|
1836
|
+
`).filter((a) => a.trim() !== "") : t = e.replaceAll(" ", `\r
|
|
1837
|
+
`).split(`
|
|
1838
|
+
`).filter((a) => a.trim() !== "");
|
|
1839
|
+
const n = [];
|
|
1840
|
+
let l = "";
|
|
1841
|
+
for (const a of t)
|
|
1842
|
+
a.includes("{") || l.includes("{") || a.includes("[") || l.includes("[") || a.includes("【") || l.includes("【") || a.includes("(") || l.includes("(") || a.includes("(") || l.includes("(") || a.includes("/*") || l.includes("/*") ? (l += a.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && l[l.length - 1] !== "," && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1843
|
+
return n;
|
|
1844
|
+
}, bt = (e) => {
|
|
1845
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), a = n.replace(/^['"]|['"]$/g, "");
|
|
1846
|
+
return { key: l, value: a };
|
|
1847
|
+
}, Ce = (e) => {
|
|
1848
|
+
let t;
|
|
1849
|
+
e.includes(":") ? t = e.split(":").filter((a) => a.trim() !== "") : t = e.split(":").filter((a) => a.trim() !== "");
|
|
1850
|
+
const n = [];
|
|
1851
|
+
let l = "";
|
|
1852
|
+
for (const a of t)
|
|
1853
|
+
a.includes("{") || l.includes("{") || a.includes("[") || l.includes("[") || a.includes("【") || l.includes("【") || a.includes("(") || l.includes("(") || a.includes("(") || l.includes("(") || a.includes("/*") || l.includes("/*") ? (l = l !== "" ? l + ":" + a.trim() : a.trim(), u(l).split("{").length - 1 === u(l).split("}").length - 1 && u(l).split("【").length - 1 === u(l).split("】").length - 1 && u(l).split("[").length - 1 === u(l).split("]").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("(").length - 1 === u(l).split(")").length - 1 && u(l).split("/*").length - 1 === u(l).split("*/").length - 1 && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1854
|
+
return n;
|
|
1855
|
+
}, gt = (e) => /^[\x00-\x7F]*$/.test(e), kt = (e) => {
|
|
1856
|
+
var a;
|
|
1857
|
+
const t = e.map((s) => {
|
|
1858
|
+
var i, f;
|
|
1859
|
+
let o = (f = (i = s.key.split("(")) == null ? void 0 : i[1]) == null ? void 0 : f.trim();
|
|
1860
|
+
return o.slice(0, o.length - 1);
|
|
1861
|
+
}), n = t == null ? void 0 : t.map((s) => {
|
|
1862
|
+
var i;
|
|
1863
|
+
return (i = Ce(s)) == null ? void 0 : i.map((f) => {
|
|
1864
|
+
var h;
|
|
1865
|
+
if (f.includes("{")) {
|
|
1866
|
+
let k = (h = f.split(":")) == null ? void 0 : h[0];
|
|
1867
|
+
f = k.slice(1, k.length);
|
|
1868
|
+
}
|
|
1869
|
+
return f;
|
|
1870
|
+
});
|
|
1871
|
+
}).filter((s) => s.length !== 0), l = (a = n == null ? void 0 : n.filter((s) => s.length !== 0)) == null ? void 0 : a.map((s) => {
|
|
1872
|
+
let o = "";
|
|
1873
|
+
return s.forEach((i) => {
|
|
1874
|
+
i.includes("{") || (o = o === "" ? o + u(i) : o + "/" + u(i));
|
|
1875
|
+
}), o;
|
|
1876
|
+
});
|
|
1877
|
+
return cl([...new Set(l)]);
|
|
1878
|
+
}, ml = (e) => {
|
|
1879
|
+
var n, l, a, s, o, i, f, h;
|
|
1880
|
+
const t = (l = (n = e.split("(")) == null ? void 0 : n[1]) == null ? void 0 : l.trim();
|
|
1881
|
+
return ((a = Ce(t.slice(0, t.length - 1))) == null ? void 0 : a.length) > 0 ? t.slice(0, t.length - 1) : (h = (f = (i = (o = (s = e.split("(")) == null ? void 0 : s[1]) == null ? void 0 : o.trim()) == null ? void 0 : i.split(")")) == null ? void 0 : f[0]) == null ? void 0 : h.trim();
|
|
1882
|
+
}, Ct = (e) => {
|
|
1883
|
+
var a;
|
|
1884
|
+
if (!e) return;
|
|
1885
|
+
const t = ml(e), n = (a = Ce(t)) == null ? void 0 : a.map((s) => {
|
|
1886
|
+
var o;
|
|
1887
|
+
if (s.includes("{")) {
|
|
1888
|
+
let i = (o = s.split(":")) == null ? void 0 : o[0];
|
|
1889
|
+
s = i.slice(1, i.length);
|
|
1890
|
+
}
|
|
1891
|
+
return s;
|
|
1892
|
+
});
|
|
1893
|
+
let l = "";
|
|
1894
|
+
return n.forEach((s) => {
|
|
1895
|
+
s.includes("{") || (l = l === "" ? l + u(s) : l + "/" + u(s));
|
|
1896
|
+
}), l;
|
|
1897
|
+
}, At = (e) => {
|
|
1898
|
+
const t = e.match(/\[(.*)\]/s);
|
|
1899
|
+
if (t) {
|
|
1900
|
+
const n = `[${t[1]}]`;
|
|
1901
|
+
try {
|
|
1902
|
+
const l = n.replace(/([^\[\],\s]+)/g, '"$1"');
|
|
1903
|
+
return JSON.parse(l);
|
|
1904
|
+
} catch (l) {
|
|
1905
|
+
console.error("解析失败:", l);
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}, $t = (e) => {
|
|
1909
|
+
var s;
|
|
1910
|
+
if (!e) return;
|
|
1911
|
+
const t = ml(e);
|
|
1912
|
+
let n = [], l = [], a = [];
|
|
1913
|
+
return (s = Ce(t)) == null || s.forEach((o) => {
|
|
1914
|
+
var i;
|
|
1915
|
+
o.includes("[") ? n.push(At(o)) : o.includes("{") && (gt((i = o.slice(1, o.length - 1).split(":")) == null ? void 0 : i[0]) ? a.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : te(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? l.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : o.includes("$") || l.push(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
|
|
1916
|
+
}), [n, l, a];
|
|
1917
|
+
}, _t = (e) => {
|
|
1918
|
+
const t = [];
|
|
1919
|
+
let n = "";
|
|
1920
|
+
for (const l of e)
|
|
1921
|
+
l.includes("[") || n.includes("[") || l.includes("/*") || n.includes("/*") ? (n += l.trim(), u(n).split("{").length - 1 === u(n).split("}").length - 1 && u(n).split("【").length - 1 === u(n).split("】").length - 1 && u(n).split("[").length - 1 === u(n).split("]").length - 1 && u(n).split("(").length - 1 === u(n).split(")").length - 1 && u(n).split("(").length - 1 === u(n).split(")").length - 1 && u(n).split("/*").length - 1 === u(n).split("*/").length - 1 && (t.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "")) : t.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
1922
|
+
return t;
|
|
1923
|
+
}, ll = (e) => {
|
|
1924
|
+
var o, i;
|
|
1925
|
+
const t = [], n = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, l = e.match(n);
|
|
1926
|
+
if (l) {
|
|
1927
|
+
const f = l[1] || l[3], h = l[2] || l[4];
|
|
1928
|
+
if (f && h) {
|
|
1929
|
+
const k = `${f}/${h}`;
|
|
1930
|
+
t.push(k);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
const a = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, s = e.match(a);
|
|
1934
|
+
return s ? t.push(s[0].replace(/\)+$/, "")) : (e == null ? void 0 : e.split(",").length) === 2 && t.push((i = (o = e == null ? void 0 : e.split(",")) == null ? void 0 : o[1]) == null ? void 0 : i.trim()), t;
|
|
1935
|
+
}, Oe = (e) => {
|
|
1936
|
+
let t = e.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
|
|
1937
|
+
return t = t.replace(/\[\s*,/g, '[{"": ""},'), t = t.replace(/,\s*,/g, ', {"": ""},'), t = t.replace(/,\s*\]/g, ', {"": ""}]'), t = t.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (n, l, a, s, o) => a.includes("'") ? `:${l}${a}${s}${o}` : `:${l}"${a}"${s}${o}`), t = t.replace(/:\s*([,\]}])/g, ': ""$1'), t;
|
|
1938
|
+
}, Ot = (e) => !/\[[^\]]*\{[^\]]*\]/.test(e), Tt = (e) => {
|
|
1939
|
+
const t = u(e).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), n = t ? `${t[2]}/${t[3]}` : null, l = e.match(/\[\{([^}]+)\}\]/), a = l == null ? void 0 : l[1].replaceAll(":", "").replaceAll("'", '"').trim();
|
|
1940
|
+
let s = null;
|
|
1941
|
+
if (a)
|
|
1942
|
+
try {
|
|
1943
|
+
s = JSON.parse(a);
|
|
1944
|
+
} catch (o) {
|
|
1945
|
+
console.error("解析数组失败:", o);
|
|
1946
|
+
}
|
|
1947
|
+
return [n, s];
|
|
1948
|
+
}, xt = (e) => {
|
|
1949
|
+
var i, f, h, k, A, $, O, C, N, y, d;
|
|
1950
|
+
let t = [], n = [], l = {}, a = [], s = e.trim(), o = [];
|
|
1951
|
+
if (s.trim().includes("输入") && s.trim().includes("输出")) {
|
|
1952
|
+
let p = [], b = e.trim();
|
|
1953
|
+
b = u(b).slice(1, u(b).length - 1);
|
|
1954
|
+
const c = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
|
|
1955
|
+
(C = b.match(c)) == null || C.forEach((r, m) => {
|
|
1956
|
+
var v;
|
|
1957
|
+
const _ = r;
|
|
1958
|
+
let T = [];
|
|
1959
|
+
(v = _.slice(1, _.length - 1).replace(":", "$:").split("$:")) == null || v.forEach((x) => {
|
|
1960
|
+
var U, E, D;
|
|
1961
|
+
if (mt.find((B) => x.includes(B)))
|
|
1962
|
+
if (!x.includes("=="))
|
|
1963
|
+
T.push({ key: "tableIndexColumn", contents: x.replaceAll("'", "") });
|
|
1964
|
+
else {
|
|
1965
|
+
let B = [];
|
|
1966
|
+
const P = x.replaceAll("'", "").split("==");
|
|
1967
|
+
B.push(P == null ? void 0 : P[0]), P != null && P[1].includes("[") ? B.push(P == null ? void 0 : P[1].trim().slice(1, (P == null ? void 0 : P[1].length) - 1).split(",")) : B.push([P == null ? void 0 : P[1]]), T.push({ key: "header", contents: [(E = (U = dl([B])) == null ? void 0 : U[0]) == null ? void 0 : E[0]] });
|
|
1968
|
+
}
|
|
1969
|
+
else {
|
|
1970
|
+
let B = x.trim().replaceAll(",", ",").replaceAll("'", '"');
|
|
1971
|
+
if (m % 3 === 0)
|
|
1972
|
+
B.slice(1, B.length - 1).includes("[") ? p.push({
|
|
1973
|
+
key: "tableIndex",
|
|
1974
|
+
contents: [{ label: B }]
|
|
1975
|
+
}) : p.push({
|
|
1976
|
+
key: "tableIndex",
|
|
1977
|
+
contents: [{ label: B.slice(1, B.length - 1) }]
|
|
1978
|
+
});
|
|
1979
|
+
else if ((B == null ? void 0 : B[0]) === "{") {
|
|
1980
|
+
let P = [];
|
|
1981
|
+
const S = B.slice(1, B.length - 1).split(":");
|
|
1982
|
+
if (S.every((g) => te(g.trim()))) {
|
|
1983
|
+
P.push({ key: "tableContentName", contents: "详情" });
|
|
1984
|
+
let g = [];
|
|
1985
|
+
S.forEach((j, F) => {
|
|
1986
|
+
if (F === 0) {
|
|
1987
|
+
const w = JSON.parse(j).map((W) => ({ label: W }));
|
|
1988
|
+
w.push({
|
|
1989
|
+
label: "操作"
|
|
1990
|
+
}), g.push({
|
|
1991
|
+
key: "header",
|
|
1992
|
+
contents: w
|
|
1993
|
+
});
|
|
1994
|
+
} else
|
|
1995
|
+
g.push({
|
|
1996
|
+
key: "tableContents",
|
|
1997
|
+
contents: JSON.parse(j)
|
|
1998
|
+
});
|
|
1999
|
+
}), g.push({
|
|
2000
|
+
key: "extraButton",
|
|
2001
|
+
contents: [{ label: "新增" }]
|
|
2002
|
+
}), g.push({
|
|
2003
|
+
key: "rowButton",
|
|
2004
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
2005
|
+
}), P.push({
|
|
2006
|
+
comp: "Table",
|
|
2007
|
+
compData: g,
|
|
2008
|
+
name: ""
|
|
2009
|
+
}), p.push({
|
|
2010
|
+
key: "tableContents",
|
|
2011
|
+
contents: [P]
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
} else {
|
|
2015
|
+
let P = B;
|
|
2016
|
+
P.slice(1, P.length - 1).includes("[") || P.slice(1, P.length - 1).includes("{") ? te(Qe(P.replace(/\s+/g, ""))) && ((D = JSON.parse(Qe(P.replace(/\s+/g, "")))) == null || D.map((S) => {
|
|
2017
|
+
if (Array.isArray(S == null ? void 0 : S[0])) {
|
|
2018
|
+
const g = [];
|
|
2019
|
+
g.push({ key: "tableContentName", contents: "详情" });
|
|
2020
|
+
let j = [];
|
|
2021
|
+
S.forEach((F) => {
|
|
2022
|
+
F.forEach((w) => {
|
|
2023
|
+
var W, K;
|
|
2024
|
+
el.value++, j.push({
|
|
2025
|
+
id: el.value,
|
|
2026
|
+
key: (W = Object.keys(w)) == null ? void 0 : W[0],
|
|
2027
|
+
value: (K = Object.values(w)) == null ? void 0 : K[0],
|
|
2028
|
+
width: F.length
|
|
2029
|
+
});
|
|
2030
|
+
});
|
|
2031
|
+
}), g.push({
|
|
2032
|
+
comp: "Form",
|
|
2033
|
+
compData: [{
|
|
2034
|
+
key: "formFlex",
|
|
2035
|
+
contents: ""
|
|
2036
|
+
}, {
|
|
2037
|
+
key: "formContent",
|
|
2038
|
+
contents: j
|
|
2039
|
+
}],
|
|
2040
|
+
name: ""
|
|
2041
|
+
}), p.push({
|
|
2042
|
+
key: "tableContents",
|
|
2043
|
+
contents: [g]
|
|
2044
|
+
});
|
|
2045
|
+
} else
|
|
2046
|
+
p.push({
|
|
2047
|
+
key: "tableContents",
|
|
2048
|
+
contents: S == null ? void 0 : S[0]
|
|
2049
|
+
});
|
|
2050
|
+
})) : p.push({
|
|
2051
|
+
key: "tableContents",
|
|
2052
|
+
contents: P.trim().slice(1, P.length - 1)
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}), p.push(T == null ? void 0 : T[0]);
|
|
2057
|
+
}), o.push({
|
|
2058
|
+
key: "tableIndex",
|
|
2059
|
+
contents: (N = p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : N.map((r) => {
|
|
2060
|
+
var m;
|
|
2061
|
+
return (m = r.contents) == null ? void 0 : m[0];
|
|
2062
|
+
})
|
|
2063
|
+
}), o.push({
|
|
2064
|
+
key: "extraButton",
|
|
2065
|
+
contents: [{ label: "新增" }]
|
|
2066
|
+
}), o.push({
|
|
2067
|
+
key: "rowButton",
|
|
2068
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
2069
|
+
}), o.push({
|
|
2070
|
+
key: "tableIndexColumn",
|
|
2071
|
+
contents: (d = (y = p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : y[0]) == null ? void 0 : d.contents
|
|
2072
|
+
}), o.push({
|
|
2073
|
+
key: "header",
|
|
2074
|
+
contents: Ve(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "header"))
|
|
2075
|
+
}), o.push({
|
|
2076
|
+
key: "tableContents",
|
|
2077
|
+
contents: ht(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), Ve(p == null ? void 0 : p.filter((r) => (r == null ? void 0 : r.key) === "header")))
|
|
2078
|
+
});
|
|
2079
|
+
} else {
|
|
2080
|
+
const p = (i = s.trim().split(",$")) == null ? void 0 : i[0];
|
|
2081
|
+
p[0] === "[" ? s = p.slice(1, p.length - 1) : s.includes(",$") && (s = (f = s.trim().split(",$")) == null ? void 0 : f[0]);
|
|
2082
|
+
let b;
|
|
2083
|
+
if (s.includes("$")) {
|
|
2084
|
+
s = u(s), l.method = (k = (h = u(s).trim()) == null ? void 0 : h.slice(1, s.length).split("(")) == null ? void 0 : k[0];
|
|
2085
|
+
let c;
|
|
2086
|
+
ll(s.slice(1, s.length - 2)).length > 1 ? c = ll(s.slice(1, s.length - 2)) : c = Tt(s), l.value = c;
|
|
2087
|
+
} else
|
|
2088
|
+
te("[" + Oe(s).replaceAll("'", '"') + "]") && !Ot(Oe(s).replaceAll("'", '"')) ? (s = JSON.parse("[" + Oe(s).replaceAll("'", '"') + "]"), a = s) : b = ($ = (A = u(s).split("}")) == null ? void 0 : A.filter((c) => c !== "")) == null ? void 0 : $.map((c) => {
|
|
2089
|
+
let r = c;
|
|
2090
|
+
return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
|
|
2091
|
+
});
|
|
2092
|
+
(O = u(b)) == null || O.forEach((c) => {
|
|
2093
|
+
var r, m, _, T, v, x, U, E, D, B, P, S, g, j, F;
|
|
2094
|
+
if (c.includes("==")) {
|
|
2095
|
+
const w = (S = c == null ? void 0 : c.split(":")) == null ? void 0 : S[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), W = (g = c == null ? void 0 : c.split(":")) == null ? void 0 : g[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
|
|
2096
|
+
if (te(W.trim()) ? n.push(JSON.parse(W.trim())) : n.push(JSON.parse(W.replaceAll("'", '"').trim())), w[0] !== "[") {
|
|
2097
|
+
let K = [];
|
|
2098
|
+
te("[" + de(w) + "]") ? K.push(JSON.parse("[" + de(w) + "]")) : te("[" + de(w).replaceAll("==", ",") + "]") && K.push(JSON.parse("[" + de(w).replaceAll("==", ",") + "]"));
|
|
2099
|
+
const Z = u(K);
|
|
2100
|
+
Z.push(["操作"]), t.push(Z);
|
|
2101
|
+
} else {
|
|
2102
|
+
const K = (j = w.slice(1, w.length - 1).replaceAll(",", ",|")) == null ? void 0 : j.split("|"), Z = (F = _t(K)) == null ? void 0 : F.map((G) => ((G == null ? void 0 : G[G.length - 1]) === "," && (G = G.slice(0, G.length - 1)), G));
|
|
2103
|
+
let le = [];
|
|
2104
|
+
Z == null || Z.forEach((G) => {
|
|
2105
|
+
var q, H, ne, M;
|
|
2106
|
+
let Q = [];
|
|
2107
|
+
Q.push((q = G.split("==")) == null ? void 0 : q[0].trim().replace(/^"|"$/g, "")), ((H = G.split("==")) == null ? void 0 : H[1].trim()[0]) === "[" ? Q.push(JSON.parse((ne = G.split("==")) == null ? void 0 : ne[1].trim())) : Q.push([JSON.parse((M = G.split("==")) == null ? void 0 : M[1].trim())]), le.push(Q);
|
|
2108
|
+
});
|
|
2109
|
+
const ee = u(le);
|
|
2110
|
+
ee.push(["操作"]), t.push(ee);
|
|
2111
|
+
}
|
|
2112
|
+
} else {
|
|
2113
|
+
if (te((r = c == null ? void 0 : c.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
|
|
2114
|
+
let w = JSON.parse((m = c == null ? void 0 : c.split(":")) == null ? void 0 : m[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
|
|
2115
|
+
Array.isArray(w) || (w = [w]), w.push("操作"), t.push(w);
|
|
2116
|
+
}
|
|
2117
|
+
te((v = (T = (_ = c == null ? void 0 : c.split(":")) == null ? void 0 : _[1]) == null ? void 0 : T.replace(/^"|"$/g, "'")) == null ? void 0 : v.replace(/'([^']+)'/g, '"$1"')) ? n.push(JSON.parse((x = c == null ? void 0 : c.split(":")) == null ? void 0 : x[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : te((B = (D = (E = (U = c == null ? void 0 : c.split(":")) == null ? void 0 : U[1]) == null ? void 0 : E.replace(/^"|"$/g, "'")) == null ? void 0 : D.replaceAll("'", '"')) == null ? void 0 : B.replace(/'([^']+)'/g, '"$1"')) && n.push(JSON.parse((P = c == null ? void 0 : c.split(":")) == null ? void 0 : P[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
|
|
2118
|
+
}
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
return [t, n, o, l, a];
|
|
2122
|
+
}, vt = (e) => {
|
|
2123
|
+
const t = [], n = Ct(e == null ? void 0 : e.key), l = $t(e == null ? void 0 : e.key), a = xt(e == null ? void 0 : e.value), s = l == null ? void 0 : l[0], o = a == null ? void 0 : a[4], i = l == null ? void 0 : l[1], f = l == null ? void 0 : l[2], h = a == null ? void 0 : a[0], k = a == null ? void 0 : a[1], A = a == null ? void 0 : a[2], $ = a == null ? void 0 : a[3];
|
|
2124
|
+
return n && t.push({
|
|
2125
|
+
key: "contentPath",
|
|
2126
|
+
value: n
|
|
2127
|
+
}), (s == null ? void 0 : s.length) > 0 && t.push({
|
|
2128
|
+
key: "tableIndex",
|
|
2129
|
+
value: s
|
|
2130
|
+
}), $ && t.push({
|
|
2131
|
+
key: "extraButton",
|
|
2132
|
+
value: $
|
|
2133
|
+
}), (o == null ? void 0 : o.length) > 0 && t.push({
|
|
2134
|
+
key: "form",
|
|
2135
|
+
value: o
|
|
2136
|
+
}), (i == null ? void 0 : i.length) > 0 && t.push({
|
|
2137
|
+
key: "formTop",
|
|
2138
|
+
value: i
|
|
2139
|
+
}), (f == null ? void 0 : f.length) > 0 && t.push({
|
|
2140
|
+
key: "extra",
|
|
2141
|
+
value: f
|
|
2142
|
+
}), (A == null ? void 0 : A.length) > 0 && t.push({
|
|
2143
|
+
comp: "Table",
|
|
2144
|
+
compData: A,
|
|
2145
|
+
name: ""
|
|
2146
|
+
}), (h == null ? void 0 : h.length) > 0 && t.push({
|
|
2147
|
+
key: "tableColumns",
|
|
2148
|
+
value: h
|
|
2149
|
+
}), (k == null ? void 0 : k.length) > 0 && t.push({
|
|
2150
|
+
key: "tableContents",
|
|
2151
|
+
value: k
|
|
2152
|
+
}), t;
|
|
2153
|
+
}, Et = (e, t) => {
|
|
2154
|
+
const n = t.split("/");
|
|
2155
|
+
let l = [];
|
|
2156
|
+
return e == null || e.forEach((a) => {
|
|
2157
|
+
var i, f, h, k, A, $, O, C, N;
|
|
2158
|
+
const s = [], o = (f = (i = a.find((y) => y.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : f[0];
|
|
2159
|
+
if (o && !o.some((y) => Array.isArray(y))) {
|
|
2160
|
+
const y = (k = (h = a.find((d) => d.key === "tableColumns")) == null ? void 0 : h.value) == null ? void 0 : k[0];
|
|
2161
|
+
s.push({
|
|
2162
|
+
key: "tableIndexColumn",
|
|
2163
|
+
contents: n[n.length - 1]
|
|
2164
|
+
}), s.push({
|
|
2165
|
+
key: "tableIndex",
|
|
2166
|
+
contents: o == null ? void 0 : o.map((d) => ({ label: d }))
|
|
2167
|
+
}), s.push({
|
|
2168
|
+
key: "extraButton",
|
|
2169
|
+
contents: [{ label: "新增" }]
|
|
2170
|
+
}), s.push({
|
|
2171
|
+
key: "rowButton",
|
|
2172
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
2173
|
+
}), Array.isArray(y) && y.some((d) => Array.isArray(d)) ? s.push({
|
|
2174
|
+
key: "header",
|
|
2175
|
+
contents: dl(y)
|
|
2176
|
+
}) : s.push({
|
|
2177
|
+
key: "header",
|
|
2178
|
+
contents: Array.isArray(y) ? y == null ? void 0 : y.map((d) => ({ label: d })) : [y].map((d) => ({ label: d }))
|
|
2179
|
+
}), s.push({
|
|
2180
|
+
key: "tableContents",
|
|
2181
|
+
contents: Array.isArray(y) ? ($ = (A = a.find((d) => d.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : $[0] : (N = (C = (O = a.find((d) => d.key === "tableContents")) == null ? void 0 : O.value) == null ? void 0 : C[0]) == null ? void 0 : N.map((d) => [d])
|
|
2182
|
+
}), l.push({
|
|
2183
|
+
comp: "Table",
|
|
2184
|
+
name: "",
|
|
2185
|
+
compData: s
|
|
2186
|
+
});
|
|
2187
|
+
} else o ? l.push({
|
|
2188
|
+
comp: "Table",
|
|
2189
|
+
name: "",
|
|
2190
|
+
compData: ft(a, n[n.length - 1])
|
|
2191
|
+
}) : a.some((y) => y.key === "extra") ? l.push({
|
|
2192
|
+
comp: "calculator",
|
|
2193
|
+
name: "",
|
|
2194
|
+
compData: Ye(a)
|
|
2195
|
+
}) : l.push(Ye(a));
|
|
2196
|
+
}), l;
|
|
2197
|
+
}, Dt = (e, t) => {
|
|
2198
|
+
var a, s;
|
|
2199
|
+
const n = e.map((o) => o.filter((i) => i.key !== "contentPath"));
|
|
2200
|
+
return {
|
|
2201
|
+
comp: "Group",
|
|
2202
|
+
compData: [{
|
|
2203
|
+
contents: Et(n, t),
|
|
2204
|
+
key: "groupContents"
|
|
2205
|
+
}],
|
|
2206
|
+
name: (s = (a = e[0]) == null ? void 0 : a.find((o) => o.key === "contentPath")) == null ? void 0 : s.value
|
|
2207
|
+
};
|
|
2208
|
+
}, Nt = (e) => {
|
|
2209
|
+
var a;
|
|
2210
|
+
const t = [], n = u(e).map((s) => {
|
|
2211
|
+
var o;
|
|
2212
|
+
if (s != null && s.find((i) => (i == null ? void 0 : i.key) === "contentPath"))
|
|
2213
|
+
return (o = s == null ? void 0 : s.find((i) => (i == null ? void 0 : i.key) === "contentPath")) == null ? void 0 : o.value;
|
|
2214
|
+
}).filter((s) => s !== ""), l = [...new Set(n)];
|
|
2215
|
+
return (a = l == null ? void 0 : l.filter((s) => s)) == null || a.forEach((s) => {
|
|
2216
|
+
var o;
|
|
2217
|
+
t.push(Dt((o = u(e)) == null ? void 0 : o.filter((i) => i.find((f) => f.key === "contentPath" && f.value === s)), s));
|
|
2218
|
+
}), t;
|
|
2219
|
+
}, St = (e) => {
|
|
2220
|
+
let t = [];
|
|
2221
|
+
t.push({
|
|
2222
|
+
comp: "Menu",
|
|
2223
|
+
compData: [{
|
|
2224
|
+
contents: kt(u(e)),
|
|
2225
|
+
key: "menuContents"
|
|
2226
|
+
}],
|
|
2227
|
+
name: ""
|
|
2228
|
+
});
|
|
2229
|
+
const n = e.map((l) => vt(l)).filter((l) => l.length !== 0);
|
|
2230
|
+
return t = [...t, ...Nt(n)], t;
|
|
2231
|
+
}, Yt = (e) => {
|
|
2232
|
+
var a, s, o, i, f;
|
|
2233
|
+
const t = (o = Se((s = (a = u(e)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : s.replace(")", ")"))) == null ? void 0 : o.filter((h) => h !== ""), n = (f = (i = u(t)) == null ? void 0 : i.filter((h) => !h.includes("/*"))) == null ? void 0 : f.map((h) => bt(h));
|
|
2234
|
+
return St(n);
|
|
2235
|
+
}, ye = R(0), Te = R(0), Pt = (e) => {
|
|
2236
|
+
const t = e.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, l = {};
|
|
2237
|
+
let a;
|
|
2238
|
+
for (; (a = n.exec(t)) !== null; ) {
|
|
2239
|
+
const s = a[1];
|
|
2240
|
+
let o = a[2].trim();
|
|
2241
|
+
(o.match(/\[/g) || []).length !== (o.match(/\]/g) || []).length && (o = o == null ? void 0 : o.replace(/]$/, "")), l[s] ? (l[s + Te.value] && Te.value++, l[s + Te.value] = s + "=" + o) : l[s] = s + "=" + o;
|
|
2242
|
+
}
|
|
2243
|
+
return l;
|
|
2244
|
+
}, bl = (e) => {
|
|
2245
|
+
const [t, n] = e.split("=").map((s) => s.trim()), l = t.replace(/['"]/g, ""), a = n.replace(/^['"]|['"]$/g, "");
|
|
2246
|
+
return { key: l, value: a };
|
|
2247
|
+
}, Bt = (e) => {
|
|
2248
|
+
var o;
|
|
2249
|
+
let t = [];
|
|
2250
|
+
const [n, l] = e.split(/=(.+)/), a = n.replace(/['"]/g, "").trim(), s = l.replace(/^['"]|['"]$/g, "");
|
|
2251
|
+
return (o = Object.values(Pt(s))) == null || o.forEach((i) => {
|
|
2252
|
+
t.push(bl(i));
|
|
2253
|
+
}), { key: a, value: t };
|
|
2254
|
+
}, be = (e) => {
|
|
2255
|
+
try {
|
|
2256
|
+
return JSON.parse(e), !0;
|
|
2257
|
+
} catch {
|
|
2258
|
+
return !1;
|
|
2259
|
+
}
|
|
2260
|
+
}, gl = (e) => {
|
|
2261
|
+
try {
|
|
2262
|
+
const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
2263
|
+
if (u(t).split("{").length - 1 > 1) {
|
|
2264
|
+
let n = u(t).replace(/^\{(.*)\}$/, "[$1]");
|
|
2265
|
+
if (be(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), be(n)) {
|
|
2266
|
+
const l = JSON.parse(n);
|
|
2267
|
+
let a = [];
|
|
2268
|
+
return l == null || l.forEach((s) => {
|
|
2269
|
+
var o;
|
|
2270
|
+
(o = Object.entries(u(s))) == null || o.forEach((i) => {
|
|
2271
|
+
ye.value++, a.push({
|
|
2272
|
+
id: ye.value,
|
|
2273
|
+
key: (i == null ? void 0 : i[0]) ?? "",
|
|
2274
|
+
value: (i == null ? void 0 : i[1]) === "" ? "" : i == null ? void 0 : i[1],
|
|
2275
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2276
|
+
width: Object.keys(u(s)).length
|
|
2277
|
+
});
|
|
2278
|
+
});
|
|
2279
|
+
}), a;
|
|
2280
|
+
} else
|
|
2281
|
+
return console.error("转换类型不正确:"), [];
|
|
2282
|
+
} else if (be(t)) {
|
|
2283
|
+
const n = JSON.parse(t);
|
|
2284
|
+
return Object.entries(n).map(([l, a]) => (ye.value++, {
|
|
2285
|
+
id: ye.value,
|
|
2286
|
+
key: l,
|
|
2287
|
+
value: a === "" ? "" : a,
|
|
2288
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2289
|
+
width: 1
|
|
2290
|
+
}));
|
|
2291
|
+
} else
|
|
2292
|
+
return t;
|
|
2293
|
+
} catch (t) {
|
|
2294
|
+
return console.error("转换失败:", t), [];
|
|
2295
|
+
}
|
|
2296
|
+
}, jt = (e, t) => {
|
|
2297
|
+
try {
|
|
2298
|
+
if (L != null && L.find((n) => (n == null ? void 0 : n.key) === t))
|
|
2299
|
+
return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
|
|
2300
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2301
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2302
|
+
return JSON.parse(n);
|
|
2303
|
+
} else {
|
|
2304
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
2305
|
+
if (be(n)) {
|
|
2306
|
+
const l = JSON.parse(n);
|
|
2307
|
+
return Array.isArray(l) ? l.map((a) => ({ label: a })) : l;
|
|
2308
|
+
} else
|
|
2309
|
+
return gl(u(e));
|
|
2310
|
+
}
|
|
2311
|
+
} catch (n) {
|
|
2312
|
+
return console.error("解析失败:", n), e;
|
|
2313
|
+
}
|
|
2314
|
+
}, Ut = (e) => ({ [e == null ? void 0 : e.key]: jt(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Ft = (e) => {
|
|
2315
|
+
try {
|
|
2316
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2317
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2318
|
+
return JSON.parse(t);
|
|
2319
|
+
} else
|
|
2320
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
2321
|
+
} catch (t) {
|
|
2322
|
+
return console.error("解析失败:", t), e;
|
|
2323
|
+
}
|
|
2324
|
+
}, kl = (e) => {
|
|
2325
|
+
var t, n, l, a, s, o;
|
|
2326
|
+
try {
|
|
2327
|
+
const i = Se((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), f = (l = u(i)) == null ? void 0 : l.map((A) => {
|
|
2328
|
+
var O, C;
|
|
2329
|
+
let $ = (C = (O = u(A)) == null ? void 0 : O.split("=")) == null ? void 0 : C[0];
|
|
2330
|
+
return $ != null && $.includes("GroupContents") ? Bt(A) : bl(A);
|
|
2331
|
+
}), h = [];
|
|
2332
|
+
(a = u(f)) == null || a.forEach((A) => {
|
|
2333
|
+
var $, O, C, N, y;
|
|
2334
|
+
L != null && L.find((d) => {
|
|
2335
|
+
var p, b;
|
|
2336
|
+
return ((p = d == null ? void 0 : d.key) == null ? void 0 : p.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
|
|
2337
|
+
}) ? h.push({
|
|
2338
|
+
comp: (($ = L == null ? void 0 : L.find((d) => {
|
|
2339
|
+
var p, b;
|
|
2340
|
+
return ((p = d == null ? void 0 : d.key) == null ? void 0 : p.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
|
|
2341
|
+
})) == null ? void 0 : $.value) ?? "",
|
|
2342
|
+
name: (O = A == null ? void 0 : A.value) == null ? void 0 : O.replace(/[’]|[‘]|[']/g, ""),
|
|
2343
|
+
compData: []
|
|
2344
|
+
}) : J != null && J.find((d) => {
|
|
2345
|
+
var p, b;
|
|
2346
|
+
return ((p = d == null ? void 0 : d.key) == null ? void 0 : p.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
|
|
2347
|
+
}) && ((h == null ? void 0 : h.length) === 0 && (C = A.key) != null && C.includes("Menus") && h.push({
|
|
2348
|
+
comp: "Menu",
|
|
2349
|
+
name: "",
|
|
2350
|
+
compData: []
|
|
2351
|
+
}), (N = h == null ? void 0 : h[(h == null ? void 0 : h.length) - 1]) != null && N.compData && h[(h == null ? void 0 : h.length) - 1].compData.push({
|
|
2352
|
+
key: (y = J == null ? void 0 : J.find((d) => {
|
|
2353
|
+
var p, b;
|
|
2354
|
+
return ((p = d == null ? void 0 : d.key) == null ? void 0 : p.toUpperCase()) === ((b = A == null ? void 0 : A.key) == null ? void 0 : b.toUpperCase());
|
|
2355
|
+
})) == null ? void 0 : y.value,
|
|
2356
|
+
contents: A == null ? void 0 : A.value
|
|
2357
|
+
}));
|
|
2358
|
+
}), console.log("newContents", h);
|
|
2359
|
+
let k = (s = u(h)) == null ? void 0 : s.map((A) => {
|
|
2360
|
+
var $;
|
|
2361
|
+
return A != null && A.compData && (A.compData = ($ = A == null ? void 0 : A.compData) == null ? void 0 : $.map((O) => {
|
|
2362
|
+
var C, N, y, d, p, b, c, r, m, _, T;
|
|
2363
|
+
if ((O == null ? void 0 : O.key) === "formFlex")
|
|
2364
|
+
O.contents = ((N = (C = O.contents) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : N.toUpperCase()) !== "Vertical".toUpperCase();
|
|
2365
|
+
else if ((O == null ? void 0 : O.key) === "groupContents")
|
|
2366
|
+
O.contents = (y = u(O.contents)) == null ? void 0 : y.map((v) => Ut(u(v)));
|
|
2367
|
+
else if (((p = (d = O.contents) == null ? void 0 : d.trim()) != null && p.startsWith("[") || (c = (b = O.contents) == null ? void 0 : b.trim()) != null && c.startsWith("【")) && ((m = (r = O.contents) == null ? void 0 : r.trim()) != null && m.endsWith("]") || (T = (_ = O.contents) == null ? void 0 : _.trim()) != null && T.endsWith("】")))
|
|
2368
|
+
O.contents = Ft(u(O.contents));
|
|
2369
|
+
else {
|
|
2370
|
+
if (!O.contents) return;
|
|
2371
|
+
O.contents = gl(u(O.contents));
|
|
2372
|
+
}
|
|
2373
|
+
return O;
|
|
2374
|
+
})), A;
|
|
2375
|
+
});
|
|
2376
|
+
return k = (o = u(k)) == null ? void 0 : o.map((A) => {
|
|
2377
|
+
var $;
|
|
2378
|
+
return (A == null ? void 0 : A.comp) === "Group" && (A.compData = ($ = A.compData) == null ? void 0 : $.map((O) => {
|
|
2379
|
+
var N;
|
|
2380
|
+
let C = [];
|
|
2381
|
+
return (N = O.contents) == null || N.forEach((y) => {
|
|
2382
|
+
var d, p, b, c, r, m, _, T, v, x, U, E;
|
|
2383
|
+
if (L != null && L.find((D) => {
|
|
2384
|
+
var B, P, S;
|
|
2385
|
+
return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
|
|
2386
|
+
}))
|
|
2387
|
+
C.push({
|
|
2388
|
+
comp: (d = L == null ? void 0 : L.find((D) => {
|
|
2389
|
+
var B, P, S;
|
|
2390
|
+
return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
|
|
2391
|
+
})) == null ? void 0 : d.value,
|
|
2392
|
+
name: (b = (p = Object.values(y)) == null ? void 0 : p[0]) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
|
|
2393
|
+
compData: []
|
|
2394
|
+
});
|
|
2395
|
+
else if (J != null && J.find((D) => {
|
|
2396
|
+
var B, P, S;
|
|
2397
|
+
return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
|
|
2398
|
+
})) {
|
|
2399
|
+
if ((C == null ? void 0 : C.length) === 0) return;
|
|
2400
|
+
(c = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && c.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
|
|
2401
|
+
key: (r = J == null ? void 0 : J.find((D) => {
|
|
2402
|
+
var B, P, S;
|
|
2403
|
+
return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
|
|
2404
|
+
})) == null ? void 0 : r.value,
|
|
2405
|
+
contents: (m = Object.values(y)) == null ? void 0 : m[0]
|
|
2406
|
+
});
|
|
2407
|
+
} else if ((T = (_ = Object.keys(y)) == null ? void 0 : _[0]) != null && T.includes("$")) {
|
|
2408
|
+
const D = (x = (v = Object.keys(u(y))) == null ? void 0 : v[0]) == null ? void 0 : x.split("$");
|
|
2409
|
+
C[(C == null ? void 0 : C.length) - 1].compData.push({
|
|
2410
|
+
key: (U = J == null ? void 0 : J.find((B) => {
|
|
2411
|
+
var P, S;
|
|
2412
|
+
return ((P = B == null ? void 0 : B.key) == null ? void 0 : P.toUpperCase()) === ((S = D == null ? void 0 : D[0]) == null ? void 0 : S.toUpperCase());
|
|
2413
|
+
})) == null ? void 0 : U.value,
|
|
2414
|
+
contents: (E = Object.values(y)) == null ? void 0 : E[0],
|
|
2415
|
+
selectLabel: D == null ? void 0 : D[1]
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
return y;
|
|
2419
|
+
}), O.contents = C, O;
|
|
2420
|
+
})), A;
|
|
2421
|
+
}), k;
|
|
2422
|
+
} catch {
|
|
2423
|
+
return !1;
|
|
2424
|
+
}
|
|
2425
|
+
}, Vt = (e) => kl(e), ea = (e) => !!kl(e), Rt = tl(ke), { itemData: la } = De(Rt), wt = Sl(ke), { systemKey: na, activeMenuPath: ta } = De(wt), oe = R(0), aa = (e) => e.reduce((n, l) => {
|
|
2426
|
+
var s, o;
|
|
2427
|
+
const a = Object.values(n);
|
|
2428
|
+
return (((s = Object.keys(n)) == null ? void 0 : s.length) === 0 || a[a.length - 1].length >= (l == null ? void 0 : l.width)) && (n[oe.value] = [], oe.value++), n[oe.value - 1].push(l), ((o = Object.keys(n)) == null ? void 0 : o.length) === (l == null ? void 0 : l.width) && (n[oe.value] = [], oe.value++), n;
|
|
2429
|
+
}, {});
|
|
2430
|
+
export {
|
|
2431
|
+
aa as a,
|
|
2432
|
+
Qt as b,
|
|
2433
|
+
Yt as c,
|
|
2434
|
+
Xt as d,
|
|
2435
|
+
Vt as e,
|
|
2436
|
+
zn as g,
|
|
2437
|
+
ea as i,
|
|
2438
|
+
zt as s
|
|
2439
|
+
};
|