ss-component-new 1.1.133 → 1.1.135
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-BoBns6b6.js +2273 -0
- package/dist/array-CtW9apSN.cjs +7 -0
- package/dist/{cloneDeep-BQoP7E6P.js → cloneDeep-CcJ_68m1.js} +1 -1
- package/dist/{cloneDeep-CsHXk826.cjs → cloneDeep-JI-hW6GZ.cjs} +1 -1
- package/dist/index-1JB6SAum.js +29 -0
- package/dist/index-5Kdyc3hr.cjs +1 -0
- package/dist/{index-CuAN0-xx.js → index-B7ppJl_E.js} +10 -11
- package/dist/{index-DkgNAIBW.js → index-BA2nXnI1.js} +215 -208
- package/dist/{index-DW88tT1i.cjs → index-BCebTmpm.cjs} +3 -3
- package/dist/{index-C6o2b8f9.js → index-BRiHVkUN.js} +11 -12
- package/dist/{index-DMVyflvZ.js → index-BZjFt7jR.js} +1 -1
- package/dist/{index-BBrZc2ts.js → index-BbvQ_-PO.js} +1 -1
- package/dist/{index-BSQTddv6.js → index-BcB6jTfD.js} +286 -283
- package/dist/{index-CUcSZWGY.js → index-BdHgfr0s.js} +8 -8
- package/dist/index-BlsR2SgQ.cjs +1 -0
- package/dist/index-C4wz9Anh.cjs +1 -0
- package/dist/{index-Cnn7BYWc.cjs → index-CFvekfF_.cjs} +2 -2
- package/dist/index-CMDXQzyv.cjs +1 -0
- package/dist/index-CWP7EfL9.js +650 -0
- package/dist/index-Cf9SLSKq.cjs +6 -0
- package/dist/{index-C1nEiwS_.js → index-CuBKQUtX.js} +6 -6
- package/dist/index-D1PQiR90.cjs +1 -0
- package/dist/index-D2W7wasL.cjs +1 -0
- package/dist/index-D7FxJLXB.cjs +1 -0
- package/dist/index-D7j4vmXl.js +2114 -0
- package/dist/index-DLwI2um1.cjs +1 -0
- package/dist/index-DOCw1Ujc.cjs +1 -0
- package/dist/index-DPMP5Wqk.cjs +1 -0
- package/dist/{index-Dd9JU-rT.cjs → index-DQPnha5v.cjs} +1 -1
- package/dist/index-DVnJwytZ.js +330 -0
- package/dist/{index-DapkCVR-.cjs → index-DYJdQU9l.cjs} +1 -1
- package/dist/index-DdmpVJtL.js +134 -0
- package/dist/{index-BjHHtq0H.cjs → index-DjDvdVaE.cjs} +1 -1
- package/dist/index-DqwrOZfN.js +159 -0
- package/dist/{index-F1JZKA3O.js → index-Dy2eeJpE.js} +15 -5
- package/dist/index-DyS8L_n3.cjs +1 -0
- package/dist/{index-C7TXApuI.js → index-J43mUzFc.js} +46 -46
- package/dist/{index-CRXMXllz.js → index-Kx4-494q.js} +55 -44
- package/dist/index-PMqWabfT.cjs +1 -0
- package/dist/{index-C6jYxUl-.cjs → index-XN5utN-m.cjs} +1 -1
- package/dist/{index-Csvp7zQ6.js → index-eC2kXZnK.js} +23 -23
- package/dist/index-g-QJ37cO.js +112 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-3HDmDp9j.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-Qjwn3MPO.js +431 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang--KS9hp9U.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-B1cqnmPt.js} +65 -66
- package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-D880a_nG.cjs +1 -0
- package/dist/login-BGQRObON.cjs +1 -0
- package/dist/login-O17dVyHc.js +93 -0
- package/dist/{main-q_g057qZ.cjs → main-CGqR8_30.cjs} +1 -1
- package/dist/{main-0A6J0tfQ.js → main-DzQbUDO7.js} +6 -6
- package/dist/{menu-Vw6lHZ6c.cjs → menu-BSGA05K6.cjs} +5 -5
- package/dist/{menu-DhRidUh1.js → menu-BVwmysEG.js} +195 -177
- package/dist/modelComp-CMNS_0n5.cjs +1 -0
- package/dist/{modelComp-aHbvsnuW.js → modelComp-CkvoVV21.js} +3 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/array-Ps2_F41b.cjs +0 -7
- package/dist/array-VnlUFMvr.js +0 -2179
- package/dist/index--zxFg7Lt.cjs +0 -1
- package/dist/index-9JVPwVJi.js +0 -319
- package/dist/index-BD5ud3vj.js +0 -138
- package/dist/index-BFBmQW3K.js +0 -31
- package/dist/index-BJ0D7ChR.cjs +0 -1
- package/dist/index-BdPXDZ3n.cjs +0 -1
- package/dist/index-BfxltCFw.cjs +0 -1
- package/dist/index-CDMEpt1q.cjs +0 -1
- package/dist/index-Cncsdqv3.cjs +0 -1
- package/dist/index-Cq6kwKj1.cjs +0 -6
- package/dist/index-Dc6YPa4g.js +0 -199
- package/dist/index-DlZElT_T.cjs +0 -1
- package/dist/index-DvVCTjQ-.js +0 -1919
- package/dist/index-Dy-d6pfi.cjs +0 -1
- package/dist/index-NCSUqjC0.cjs +0 -1
- package/dist/index-REtctbFe.cjs +0 -1
- package/dist/index-d5EpoHA5.cjs +0 -1
- package/dist/index-vRdcHOVV.js +0 -644
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-B-mhhWPm.js +0 -344
- package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-DiS2qUC5.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CaGlY5ig.cjs +0 -1
- package/dist/login-BS-a770c.js +0 -56
- package/dist/login-u3K69Doq.cjs +0 -1
- package/dist/modelComp-CCS_z2X4.cjs +0 -1
|
@@ -0,0 +1,2273 @@
|
|
|
1
|
+
import { u as il, g as fl, s as dl } from "./index-CWP7EfL9.js";
|
|
2
|
+
import { ref as J, watch as V, createElementBlock as K, openBlock as I, createVNode as H, resolveComponent as Ze, createElementVNode as L, toDisplayString as W, withCtx as ee, createTextVNode as se, Fragment as de, renderList as Ae, createBlock as De, resolveDynamicComponent as Ee } from "vue";
|
|
3
|
+
import { p as _e, g as Ne, s as yl } from "./index-D7j4vmXl.js";
|
|
4
|
+
import { s as Oe, f as hl, a as re, b as ml } from "./index-BdHgfr0s.js";
|
|
5
|
+
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { U as Se, g as Pe, a as Be, i as je, S as be, b as bl, c as u } from "./cloneDeep-CcJ_68m1.js";
|
|
7
|
+
import { _ as gl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
|
|
8
|
+
import { M as kl, S as Fe, e as Cl, i as Ue, b as Je } from "./index-Dy2eeJpE.js";
|
|
9
|
+
import { s as qe, u as Al } from "./menu-BVwmysEG.js";
|
|
10
|
+
import { u as $l } from "./modelComp-CkvoVV21.js";
|
|
11
|
+
var _l = "__lodash_hash_undefined__";
|
|
12
|
+
function Ol(e) {
|
|
13
|
+
return this.__data__.set(e, _l), this;
|
|
14
|
+
}
|
|
15
|
+
function xl(e) {
|
|
16
|
+
return this.__data__.has(e);
|
|
17
|
+
}
|
|
18
|
+
function me(e) {
|
|
19
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
20
|
+
for (this.__data__ = new kl(); ++t < n; )
|
|
21
|
+
this.add(e[t]);
|
|
22
|
+
}
|
|
23
|
+
me.prototype.add = me.prototype.push = Ol;
|
|
24
|
+
me.prototype.has = xl;
|
|
25
|
+
function Tl(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 vl(e, t) {
|
|
32
|
+
return e.has(t);
|
|
33
|
+
}
|
|
34
|
+
var Dl = 1, El = 2;
|
|
35
|
+
function ze(e, t, n, l, a, s) {
|
|
36
|
+
var p = n & Dl, y = e.length, m = t.length;
|
|
37
|
+
if (y != m && !(p && m > y))
|
|
38
|
+
return !1;
|
|
39
|
+
var g = s.get(e), k = s.get(t);
|
|
40
|
+
if (g && k)
|
|
41
|
+
return g == t && k == e;
|
|
42
|
+
var A = -1, $ = !0, O = n & El ? new me() : void 0;
|
|
43
|
+
for (s.set(e, t), s.set(t, e); ++A < y; ) {
|
|
44
|
+
var C = e[A], P = t[A];
|
|
45
|
+
if (l)
|
|
46
|
+
var d = p ? l(P, C, A, t, e, s) : l(C, P, A, e, t, s);
|
|
47
|
+
if (d !== void 0) {
|
|
48
|
+
if (d)
|
|
49
|
+
continue;
|
|
50
|
+
$ = !1;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
if (O) {
|
|
54
|
+
if (!Tl(t, function(o, f) {
|
|
55
|
+
if (!vl(O, f) && (C === o || a(C, o, n, l, s)))
|
|
56
|
+
return O.push(f);
|
|
57
|
+
})) {
|
|
58
|
+
$ = !1;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
} else if (!(C === P || a(C, P, n, l, s))) {
|
|
62
|
+
$ = !1;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return s.delete(e), s.delete(t), $;
|
|
67
|
+
}
|
|
68
|
+
function Nl(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 Sl(e) {
|
|
75
|
+
var t = -1, n = Array(e.size);
|
|
76
|
+
return e.forEach(function(l) {
|
|
77
|
+
n[++t] = l;
|
|
78
|
+
}), n;
|
|
79
|
+
}
|
|
80
|
+
var Pl = 1, Bl = 2, jl = "[object Boolean]", Fl = "[object Date]", Ul = "[object Error]", Jl = "[object Map]", wl = "[object Number]", Rl = "[object RegExp]", Ll = "[object Set]", Gl = "[object String]", Ml = "[object Symbol]", Il = "[object ArrayBuffer]", Wl = "[object DataView]", we = Fe ? Fe.prototype : void 0, ge = we ? we.valueOf : void 0;
|
|
81
|
+
function Hl(e, t, n, l, a, s, p) {
|
|
82
|
+
switch (n) {
|
|
83
|
+
case Wl:
|
|
84
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
85
|
+
return !1;
|
|
86
|
+
e = e.buffer, t = t.buffer;
|
|
87
|
+
case Il:
|
|
88
|
+
return !(e.byteLength != t.byteLength || !s(new Se(e), new Se(t)));
|
|
89
|
+
case jl:
|
|
90
|
+
case Fl:
|
|
91
|
+
case wl:
|
|
92
|
+
return Cl(+e, +t);
|
|
93
|
+
case Ul:
|
|
94
|
+
return e.name == t.name && e.message == t.message;
|
|
95
|
+
case Rl:
|
|
96
|
+
case Gl:
|
|
97
|
+
return e == t + "";
|
|
98
|
+
case Jl:
|
|
99
|
+
var y = Nl;
|
|
100
|
+
case Ll:
|
|
101
|
+
var m = l & Pl;
|
|
102
|
+
if (y || (y = Sl), e.size != t.size && !m)
|
|
103
|
+
return !1;
|
|
104
|
+
var g = p.get(e);
|
|
105
|
+
if (g)
|
|
106
|
+
return g == t;
|
|
107
|
+
l |= Bl, p.set(e, t);
|
|
108
|
+
var k = ze(y(e), y(t), l, a, s, p);
|
|
109
|
+
return p.delete(e), k;
|
|
110
|
+
case Ml:
|
|
111
|
+
if (ge)
|
|
112
|
+
return ge.call(e) == ge.call(t);
|
|
113
|
+
}
|
|
114
|
+
return !1;
|
|
115
|
+
}
|
|
116
|
+
var Kl = 1, Zl = Object.prototype, ql = Zl.hasOwnProperty;
|
|
117
|
+
function zl(e, t, n, l, a, s) {
|
|
118
|
+
var p = n & Kl, y = Pe(e), m = y.length, g = Pe(t), k = g.length;
|
|
119
|
+
if (m != k && !p)
|
|
120
|
+
return !1;
|
|
121
|
+
for (var A = m; A--; ) {
|
|
122
|
+
var $ = y[A];
|
|
123
|
+
if (!(p ? $ in t : ql.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 P = !0;
|
|
130
|
+
s.set(e, t), s.set(t, e);
|
|
131
|
+
for (var d = p; ++A < m; ) {
|
|
132
|
+
$ = y[A];
|
|
133
|
+
var o = e[$], f = t[$];
|
|
134
|
+
if (l)
|
|
135
|
+
var i = p ? l(f, o, $, t, e, s) : l(o, f, $, e, t, s);
|
|
136
|
+
if (!(i === void 0 ? o === f || a(o, f, n, l, s) : i)) {
|
|
137
|
+
P = !1;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
d || (d = $ == "constructor");
|
|
141
|
+
}
|
|
142
|
+
if (P && !d) {
|
|
143
|
+
var r = e.constructor, c = t.constructor;
|
|
144
|
+
r != c && "constructor" in e && "constructor" in t && !(typeof r == "function" && r instanceof r && typeof c == "function" && c instanceof c) && (P = !1);
|
|
145
|
+
}
|
|
146
|
+
return s.delete(e), s.delete(t), P;
|
|
147
|
+
}
|
|
148
|
+
var Ql = 1, Re = "[object Arguments]", Le = "[object Array]", ue = "[object Object]", Xl = Object.prototype, Ge = Xl.hasOwnProperty;
|
|
149
|
+
function Yl(e, t, n, l, a, s) {
|
|
150
|
+
var p = Ue(e), y = Ue(t), m = p ? Le : Be(e), g = y ? Le : Be(t);
|
|
151
|
+
m = m == Re ? ue : m, g = g == Re ? ue : g;
|
|
152
|
+
var k = m == ue, A = g == ue, $ = m == g;
|
|
153
|
+
if ($ && je(e)) {
|
|
154
|
+
if (!je(t))
|
|
155
|
+
return !1;
|
|
156
|
+
p = !0, k = !1;
|
|
157
|
+
}
|
|
158
|
+
if ($ && !k)
|
|
159
|
+
return s || (s = new be()), p || bl(e) ? ze(e, t, n, l, a, s) : Hl(e, t, m, n, l, a, s);
|
|
160
|
+
if (!(n & Ql)) {
|
|
161
|
+
var O = k && Ge.call(e, "__wrapped__"), C = A && Ge.call(t, "__wrapped__");
|
|
162
|
+
if (O || C) {
|
|
163
|
+
var P = O ? e.value() : e, d = C ? t.value() : t;
|
|
164
|
+
return s || (s = new be()), a(P, d, n, l, s);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return $ ? (s || (s = new be()), zl(e, t, n, l, a, s)) : !1;
|
|
168
|
+
}
|
|
169
|
+
function Qe(e, t, n, l, a) {
|
|
170
|
+
return e === t ? !0 : e == null || t == null || !Je(e) && !Je(t) ? e !== e && t !== t : Yl(e, t, n, l, Qe, a);
|
|
171
|
+
}
|
|
172
|
+
function Vl(e, t) {
|
|
173
|
+
return Qe(e, t);
|
|
174
|
+
}
|
|
175
|
+
const pe = [
|
|
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
|
+
], en = { class: "form-content" }, ln = {
|
|
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 = J([]), s = J(!1), p = J([]), y = il(_e), m = J(), g = (A) => {
|
|
208
|
+
var d, o, f, i;
|
|
209
|
+
const $ = (o = (d = u(n.itemData)) == null ? void 0 : d.find((r) => (r == null ? void 0 : r.key) === "formContent")) == null ? void 0 : o.contents, O = u(A.content);
|
|
210
|
+
let C = {};
|
|
211
|
+
O && ((f = Object.values(O)) == null ? void 0 : f.length) > 0 && ((i = Object.values(O)) == null || i.forEach((r, c) => {
|
|
212
|
+
C[$[c].key] = r;
|
|
213
|
+
}));
|
|
214
|
+
const P = {
|
|
215
|
+
content: C,
|
|
216
|
+
index: n == null ? void 0 : n.index,
|
|
217
|
+
buttonName: A == null ? void 0 : A.buttonName
|
|
218
|
+
};
|
|
219
|
+
l("change", P);
|
|
220
|
+
}, k = (A) => {
|
|
221
|
+
var C, P;
|
|
222
|
+
if (!A) return;
|
|
223
|
+
if (((C = Object.values(u(A))) == null ? void 0 : C.length) > 0) {
|
|
224
|
+
const d = (P = Object.values(u(A))) == null ? void 0 : P.map((f) => f);
|
|
225
|
+
let o = "";
|
|
226
|
+
d == null || d.forEach((f) => {
|
|
227
|
+
f !== "" && f !== void 0 && (o = o === "" ? f : o + "/" + f);
|
|
228
|
+
}), y.setSelectArray(d), y.setSelectString(o);
|
|
229
|
+
}
|
|
230
|
+
const $ = u(n.itemData), O = $ == null ? void 0 : $.map((d) => {
|
|
231
|
+
var o;
|
|
232
|
+
return (d == null ? void 0 : d.key) === "formContent" && ((o = d.contents) == null || o.map((f, i) => {
|
|
233
|
+
var r, c, h, _, x, E, T, j, N, v, D, B, S, b, F, U, G, M, X;
|
|
234
|
+
return f.type = f != null && f.type ? f.type : (_ = (h = (c = (r = f == null ? void 0 : f.key) == null ? void 0 : r.split("$")) == null ? void 0 : c[1]) == null ? void 0 : h.split("(")) != null && _[0] ? (x = pe == null ? void 0 : pe.find((Z) => {
|
|
235
|
+
var Y, z, q, ce;
|
|
236
|
+
return (Z == null ? void 0 : Z.key) === ((ce = (q = (z = (Y = f == null ? void 0 : f.key) == null ? void 0 : Y.split("$")) == null ? void 0 : z[1]) == null ? void 0 : q.split("(")) == null ? void 0 : ce[0]);
|
|
237
|
+
})) == null ? void 0 : x.value : "Input", f.options = f != null && f.options ? f.options : ((j = (T = (E = f == null ? void 0 : f.key) == null ? void 0 : E.split("$")) == null ? void 0 : T[1]) == null ? void 0 : j.length) > 0 ? (B = (D = hl((v = (N = f == null ? void 0 : f.key) == null ? void 0 : N.split("$")) == null ? void 0 : v[1])) == null ? void 0 : D.split(",")) == null ? void 0 : B.map((Z) => ({
|
|
238
|
+
label: Z,
|
|
239
|
+
value: Z
|
|
240
|
+
})) : [], (S = f == null ? void 0 : f.key) != null && S.includes("$") && (f.key = (F = (b = f == null ? void 0 : f.key) == null ? void 0 : b.split("$")) == null ? void 0 : F[0]), f.value = f != null && f.value ? f.value : Array.isArray((U = Object.values(A)) == null ? void 0 : U[i]) ? (M = (G = Object.values(A)) == null ? void 0 : G[i]) == null ? void 0 : M[0] : (X = Object.values(A)) == null ? void 0 : X[i], f;
|
|
241
|
+
})), d;
|
|
242
|
+
});
|
|
243
|
+
l("contentChange", {
|
|
244
|
+
contents: O,
|
|
245
|
+
index: n.index
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
return V(
|
|
249
|
+
() => n.itemData,
|
|
250
|
+
() => {
|
|
251
|
+
var P, d, o, f, i, r, c, h, _, x;
|
|
252
|
+
const A = (P = u(n.itemData)) == null ? void 0 : P.find((E) => (E == null ? void 0 : E.key) === "formContent"), $ = (d = u(n.itemData)) == null ? void 0 : d.find((E) => (E == null ? void 0 : E.key) === "formButton"), O = (o = u(n.itemData)) == null ? void 0 : o.find((E) => (E == null ? void 0 : E.key) === "formFlex"), C = (f = u(n.itemData)) == null ? void 0 : f.find((E) => (E == null ? void 0 : E.key) === "formWrap");
|
|
253
|
+
if ((C == null ? void 0 : C.contents) === "纵向" ? s.value = !1 : s.value = !0, m.value = typeof (O == null ? void 0 : O.contents) != "boolean" ? !(!(O != null && O.contents) === "" || ((i = O == null ? void 0 : O.contents) == null ? void 0 : i.toUpperCase()) === "VERTICAL") : O == null ? void 0 : O.contents, ((r = A == null ? void 0 : A.contents) == null ? void 0 : r.length) > 0 && Array.isArray(A == null ? void 0 : A.contents)) {
|
|
254
|
+
const E = [];
|
|
255
|
+
(c = A == null ? void 0 : A.contents) == null || c.forEach((N, v) => {
|
|
256
|
+
var D, B, S, b, F, U, G, M, X, Z;
|
|
257
|
+
if ((N == null ? void 0 : N.label) !== "") {
|
|
258
|
+
let Y = (N == null ? void 0 : N.key) ?? "", z = (N == null ? void 0 : N.type) ?? "", q = (N == null ? void 0 : N.options) ?? [];
|
|
259
|
+
if ((D = N == null ? void 0 : N.key) != null && D.includes("$") && (Y = (B = u(N == null ? void 0 : N.key).split("$")) == null ? void 0 : B[0], ((b = (S = u(N == null ? void 0 : N.key).split("$")) == null ? void 0 : S[1]) == null ? void 0 : b.length) > 0)) {
|
|
260
|
+
const [ce, le] = (U = (F = u(N == null ? void 0 : N.key).split("$")) == null ? void 0 : F[1]) == null ? void 0 : U.split(/[()]/);
|
|
261
|
+
z = ((G = pe.find((ne) => (ne == null ? void 0 : ne.key) === ce)) == null ? void 0 : G.value) ?? "", ((M = le == null ? void 0 : le.split(",")) == null ? void 0 : M.length) > 0 && (q = (X = le == null ? void 0 : le.split(",")) == null ? void 0 : X.map((ne) => ({
|
|
262
|
+
label: ne,
|
|
263
|
+
value: ne
|
|
264
|
+
})));
|
|
265
|
+
}
|
|
266
|
+
E.push({
|
|
267
|
+
label: Y ?? "",
|
|
268
|
+
name: "t" + v,
|
|
269
|
+
type: z === "" ? "Input" : z,
|
|
270
|
+
value: N != null && N.value ? N.value : (q == null ? void 0 : q.length) > 0 ? (Z = q == null ? void 0 : q[0]) == null ? void 0 : Z.value : (N == null ? void 0 : N.value) ?? "",
|
|
271
|
+
id: (N == null ? void 0 : N.id) ?? v,
|
|
272
|
+
contents: q ?? [],
|
|
273
|
+
width: (N == null ? void 0 : N.width) ?? 1
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
const T = (h = u(E)) == null ? void 0 : h.map((N) => N.value);
|
|
278
|
+
let j = "";
|
|
279
|
+
T == null || T.forEach((N) => {
|
|
280
|
+
N !== "" && N !== void 0 && (j = j === "" ? N : j + "/" + N);
|
|
281
|
+
}), y.setSelectArray(T), y.setSelectString(j), a.value = E;
|
|
282
|
+
} else
|
|
283
|
+
a.value = [];
|
|
284
|
+
if (((_ = $ == null ? void 0 : $.contents) == null ? void 0 : _.length) > 0) {
|
|
285
|
+
const E = [];
|
|
286
|
+
(x = $ == null ? void 0 : $.contents) == null || x.forEach((T, j) => {
|
|
287
|
+
(T == null ? void 0 : T.label) !== "" && E.push({
|
|
288
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
289
|
+
id: (T == null ? void 0 : T.id) ?? j,
|
|
290
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
291
|
+
background: T == null ? void 0 : T.background
|
|
292
|
+
});
|
|
293
|
+
}), p.value = E;
|
|
294
|
+
} else
|
|
295
|
+
p.value = [];
|
|
296
|
+
},
|
|
297
|
+
{ deep: !0, immediate: !0 }
|
|
298
|
+
), (A, $) => (I(), K("div", en, [
|
|
299
|
+
H(Oe, {
|
|
300
|
+
rowContents: a.value,
|
|
301
|
+
buttonValue: p.value,
|
|
302
|
+
isRowFlex: m.value,
|
|
303
|
+
isEnableWrap: !1,
|
|
304
|
+
onOnButtonClick: g,
|
|
305
|
+
onChange: k,
|
|
306
|
+
isButtonRow: s.value
|
|
307
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
308
|
+
]));
|
|
309
|
+
}
|
|
310
|
+
}, nn = /* @__PURE__ */ oe(ln, [["__scopeId", "data-v-1b0ef247"]]), tn = { class: "table-operate-content" }, an = { class: "table-operate-item" }, sn = { class: "operate-title" }, rn = { class: "operate-content" }, on = { class: "operate-title" }, cn = { class: "operate-content" }, un = { class: "operate-title" }, pn = { class: "operate-content" }, fn = { class: "operate-content" }, dn = {
|
|
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 = J([]), s = J([]), p = J([]), y = J([{
|
|
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
|
+
}]), m = J([{
|
|
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
|
+
}]), g = J([]), k = J(0), A = J([{
|
|
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 = (r) => {
|
|
438
|
+
let c = u(a.value);
|
|
439
|
+
const h = c == null ? void 0 : c.find((_) => _.key === "page");
|
|
440
|
+
(h == null ? void 0 : h.contents) !== void 0 ? c = c == null ? void 0 : c.map((_) => ((_ == null ? void 0 : _.key) === "page" && (_.contents = r == null ? void 0 : r.isPagination), _)) : c.push({
|
|
441
|
+
key: "page",
|
|
442
|
+
contents: r == null ? void 0 : r.isPagination
|
|
443
|
+
}), a.value = c;
|
|
444
|
+
};
|
|
445
|
+
V(
|
|
446
|
+
() => n.originalItemContents,
|
|
447
|
+
() => {
|
|
448
|
+
var r, c, h, _, x, E, T, j, N, v, D, B, S;
|
|
449
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (a.value = u(n.originalItemContents), s.value = (c = (r = a.value) == null ? void 0 : r.find((b) => (b == null ? void 0 : b.key) === "header")) == null ? void 0 : c.contents, p.value = (_ = (h = a.value) == null ? void 0 : h.find((b) => (b == null ? void 0 : b.key) === "rowButton")) == null ? void 0 : _.contents, y.value = (E = (x = a.value) == null ? void 0 : x.find((b) => (b == null ? void 0 : b.key) === "extraButton")) == null ? void 0 : E.contents, A.value = (j = (T = a.value) == null ? void 0 : T.find((b) => (b == null ? void 0 : b.key) === "page")) != null && j.contents ? [{
|
|
450
|
+
name: "isPagination",
|
|
451
|
+
label: "是否显示分页",
|
|
452
|
+
type: "Switch",
|
|
453
|
+
value: (v = (N = a.value) == null ? void 0 : N.find((b) => (b == null ? void 0 : b.key) === "page")) == null ? void 0 : v.contents
|
|
454
|
+
}] : [{
|
|
455
|
+
name: "isPagination",
|
|
456
|
+
label: "是否显示分页",
|
|
457
|
+
type: "Switch",
|
|
458
|
+
value: !0
|
|
459
|
+
}], s.value = (D = s.value) == null ? void 0 : D.map((b, F) => b = {
|
|
460
|
+
label: (b == null ? void 0 : b.label) ?? "",
|
|
461
|
+
prop: (b == null ? void 0 : b.label) === "操作" ? "operate" : b == null ? void 0 : b.prop,
|
|
462
|
+
width: b != null && b.width ? parseInt(b.width) : "",
|
|
463
|
+
fixed: (b == null ? void 0 : b.fixed) ?? void 0,
|
|
464
|
+
sortable: (b == null ? void 0 : b.sortable) ?? !1,
|
|
465
|
+
align: (b == null ? void 0 : b.align) ?? "center",
|
|
466
|
+
showOverflowTooltip: (b == null ? void 0 : b.showOverflowTooltip) ?? !0,
|
|
467
|
+
isNotDrag: (b == null ? void 0 : b.isNotDrag) ?? !1,
|
|
468
|
+
isEditCol: (b == null ? void 0 : b.isEditCol) ?? !1,
|
|
469
|
+
isOperate: (b == null ? void 0 : b.isOperate) ?? !1,
|
|
470
|
+
id: (b == null ? void 0 : b.id) ?? F
|
|
471
|
+
}), p.value = (B = p.value) == null ? void 0 : B.map((b, F) => b = {
|
|
472
|
+
label: (b == null ? void 0 : b.label) ?? "",
|
|
473
|
+
type: (b == null ? void 0 : b.type) ?? "",
|
|
474
|
+
textColor: (b == null ? void 0 : b.textColor) ?? "#000000",
|
|
475
|
+
id: (b == null ? void 0 : b.id) ?? F
|
|
476
|
+
}), y.value = (S = y.value) == null ? void 0 : S.map((b, F) => b = {
|
|
477
|
+
label: (b == null ? void 0 : b.label) ?? "",
|
|
478
|
+
type: (b == null ? void 0 : b.type) ?? "",
|
|
479
|
+
background: (b == null ? void 0 : b.textColor) ?? "#FFFFFF",
|
|
480
|
+
id: (b == null ? void 0 : b.id) ?? F
|
|
481
|
+
}));
|
|
482
|
+
},
|
|
483
|
+
{ deep: !0, immediate: !0 }
|
|
484
|
+
), V(
|
|
485
|
+
() => A.value,
|
|
486
|
+
() => {
|
|
487
|
+
var h;
|
|
488
|
+
let r = u(a.value);
|
|
489
|
+
const c = r == null ? void 0 : r.find((_) => _.key === "page");
|
|
490
|
+
c != null && c.contents ? r = r == null ? void 0 : r.map((_) => {
|
|
491
|
+
var x;
|
|
492
|
+
return (_ == null ? void 0 : _.key) === "page" && (_.contents = (x = A.value) == null ? void 0 : x[0].value), _;
|
|
493
|
+
}) : r.push({
|
|
494
|
+
key: "page",
|
|
495
|
+
contents: (h = A.value) == null ? void 0 : h[0].value
|
|
496
|
+
}), a.value = r;
|
|
497
|
+
},
|
|
498
|
+
{ immediate: !0, deep: !0 }
|
|
499
|
+
);
|
|
500
|
+
const C = () => {
|
|
501
|
+
const r = u(s.value);
|
|
502
|
+
let c = u(a.value);
|
|
503
|
+
r.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 = r, k.value++;
|
|
516
|
+
const h = c == null ? void 0 : c.find((_) => (_ == null ? void 0 : _.key) === "header");
|
|
517
|
+
h != null && h.contents ? (h.contents = r, c = c == null ? void 0 : c.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = r), _))) : c.push({
|
|
518
|
+
key: "header",
|
|
519
|
+
contents: r
|
|
520
|
+
}), a.value = c;
|
|
521
|
+
}, P = () => {
|
|
522
|
+
const r = u(p.value);
|
|
523
|
+
let c = u(a.value);
|
|
524
|
+
r.push({
|
|
525
|
+
label: "",
|
|
526
|
+
type: "",
|
|
527
|
+
textColor: "#000000",
|
|
528
|
+
id: k.value
|
|
529
|
+
}), p.value = r, k.value++;
|
|
530
|
+
const h = c == null ? void 0 : c.find((_) => (_ == null ? void 0 : _.key) === "rowButton");
|
|
531
|
+
h != null && h.contents ? (h.contents = r, c = c == null ? void 0 : c.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = r), _))) : c.push({
|
|
532
|
+
key: "rowButton",
|
|
533
|
+
contents: r
|
|
534
|
+
}), a.value = c;
|
|
535
|
+
}, d = () => {
|
|
536
|
+
const r = u(g.value);
|
|
537
|
+
let c = u(a.value);
|
|
538
|
+
r.push({
|
|
539
|
+
label: "",
|
|
540
|
+
type: "",
|
|
541
|
+
background: "#FFFFFF",
|
|
542
|
+
id: k.value
|
|
543
|
+
}), g.value = r, k.value++;
|
|
544
|
+
const h = c == null ? void 0 : c.find((_) => (_ == null ? void 0 : _.key) === "extraButton");
|
|
545
|
+
h != null && h.contents ? (h.contents = r, c = c == null ? void 0 : c.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = r), _))) : c.push({
|
|
546
|
+
key: "extraButton",
|
|
547
|
+
contents: r
|
|
548
|
+
}), a.value = c;
|
|
549
|
+
}, o = (r) => {
|
|
550
|
+
const c = u(p.value);
|
|
551
|
+
let h = u(a.value);
|
|
552
|
+
p.value = c.filter((x) => x.id !== r.id);
|
|
553
|
+
const _ = h == null ? void 0 : h.find((x) => x.key === "rowButton");
|
|
554
|
+
_ != null && _.contents && (h = h == null ? void 0 : h.map((x) => ((x == null ? void 0 : x.key) === "rowButton" && (x.contents = c.filter((E) => E.id !== r.id)), x))), a.value = h;
|
|
555
|
+
}, f = (r) => {
|
|
556
|
+
const c = u(g.value);
|
|
557
|
+
let h = u(a.value);
|
|
558
|
+
g.value = c.filter((x) => x.id !== r.id);
|
|
559
|
+
const _ = h == null ? void 0 : h.find((x) => x.key === "extraButton");
|
|
560
|
+
_ != null && _.contents && (h = h == null ? void 0 : h.map((x) => ((x == null ? void 0 : x.key) === "extraButton" && (x.contents = c.filter((E) => E.id !== r.id)), x))), a.value = h;
|
|
561
|
+
}, i = (r) => {
|
|
562
|
+
const c = u(s.value);
|
|
563
|
+
let h = u(a.value);
|
|
564
|
+
s.value = c.filter((x) => x.id !== r.id);
|
|
565
|
+
const _ = h == null ? void 0 : h.find((x) => x.key === "header");
|
|
566
|
+
_ != null && _.contents && (h = h == null ? void 0 : h.map((x) => ((x == null ? void 0 : x.key) === "header" && (x.contents = c.filter((E) => E.id !== r.id)), x))), a.value = h;
|
|
567
|
+
};
|
|
568
|
+
return V(
|
|
569
|
+
() => [a.value, s.value],
|
|
570
|
+
() => {
|
|
571
|
+
let r = u(a.value);
|
|
572
|
+
const c = r == null ? void 0 : r.find((h) => (h == null ? void 0 : h.key) === "header");
|
|
573
|
+
c != null && c.contents ? (c.contents = s.value, r = r == null ? void 0 : r.map((h) => ((h == null ? void 0 : h.key) === "header" && (h.contents = s.value), h))) : r.push({
|
|
574
|
+
key: "header",
|
|
575
|
+
contents: s.value
|
|
576
|
+
}), l("change", r);
|
|
577
|
+
},
|
|
578
|
+
{ deep: !0, immediate: !0 }
|
|
579
|
+
), (r, c) => {
|
|
580
|
+
const h = Ze("el-button");
|
|
581
|
+
return I(), K("div", tn, [
|
|
582
|
+
L("div", an, [
|
|
583
|
+
L("div", sn, [
|
|
584
|
+
c[1] || (c[1] = L("div", null, W("表头"), -1)),
|
|
585
|
+
H(h, {
|
|
586
|
+
class: "blue-operate-button",
|
|
587
|
+
icon: "ele-Plus",
|
|
588
|
+
onClick: C
|
|
589
|
+
}, {
|
|
590
|
+
default: ee(() => c[0] || (c[0] = [
|
|
591
|
+
se(W("新建"))
|
|
592
|
+
])),
|
|
593
|
+
_: 1,
|
|
594
|
+
__: [0]
|
|
595
|
+
})
|
|
596
|
+
]),
|
|
597
|
+
L("div", rn, [
|
|
598
|
+
H(re, {
|
|
599
|
+
columns: $,
|
|
600
|
+
isShowPagination: !1,
|
|
601
|
+
isShowEdit: !1,
|
|
602
|
+
isMoveColumn: !1,
|
|
603
|
+
tableData: s.value,
|
|
604
|
+
onDeleteRow: i
|
|
605
|
+
}, null, 8, ["tableData"])
|
|
606
|
+
]),
|
|
607
|
+
L("div", on, [
|
|
608
|
+
c[3] || (c[3] = L("div", null, W("行内按钮"), -1)),
|
|
609
|
+
H(h, {
|
|
610
|
+
class: "blue-operate-button",
|
|
611
|
+
icon: "ele-Plus",
|
|
612
|
+
onClick: P
|
|
613
|
+
}, {
|
|
614
|
+
default: ee(() => c[2] || (c[2] = [
|
|
615
|
+
se(W("新建"))
|
|
616
|
+
])),
|
|
617
|
+
_: 1,
|
|
618
|
+
__: [2]
|
|
619
|
+
})
|
|
620
|
+
]),
|
|
621
|
+
L("div", cn, [
|
|
622
|
+
H(re, {
|
|
623
|
+
columns: m.value,
|
|
624
|
+
isShowPagination: !1,
|
|
625
|
+
isShowEdit: !1,
|
|
626
|
+
isMoveColumn: !1,
|
|
627
|
+
tableData: p.value,
|
|
628
|
+
onDeleteRow: o
|
|
629
|
+
}, null, 8, ["columns", "tableData"])
|
|
630
|
+
]),
|
|
631
|
+
L("div", un, [
|
|
632
|
+
c[5] || (c[5] = L("div", null, W("表格外部按钮"), -1)),
|
|
633
|
+
H(h, {
|
|
634
|
+
class: "blue-operate-button",
|
|
635
|
+
icon: "ele-Plus",
|
|
636
|
+
onClick: d
|
|
637
|
+
}, {
|
|
638
|
+
default: ee(() => c[4] || (c[4] = [
|
|
639
|
+
se(W("新建"))
|
|
640
|
+
])),
|
|
641
|
+
_: 1,
|
|
642
|
+
__: [4]
|
|
643
|
+
})
|
|
644
|
+
]),
|
|
645
|
+
L("div", pn, [
|
|
646
|
+
H(re, {
|
|
647
|
+
columns: y.value,
|
|
648
|
+
isShowPagination: !1,
|
|
649
|
+
isShowEdit: !1,
|
|
650
|
+
isMoveColumn: !1,
|
|
651
|
+
tableData: g.value,
|
|
652
|
+
onDeleteRow: f
|
|
653
|
+
}, null, 8, ["columns", "tableData"])
|
|
654
|
+
]),
|
|
655
|
+
c[6] || (c[6] = L("div", { class: "operate-title" }, [
|
|
656
|
+
L("div", null, W("分页"))
|
|
657
|
+
], -1)),
|
|
658
|
+
L("div", fn, [
|
|
659
|
+
H(Oe, {
|
|
660
|
+
rowContents: A.value,
|
|
661
|
+
onChange: O
|
|
662
|
+
}, null, 8, ["rowContents"])
|
|
663
|
+
])
|
|
664
|
+
])
|
|
665
|
+
]);
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
}, yn = /* @__PURE__ */ oe(dn, [["__scopeId", "data-v-877911eb"]]), hn = { class: "form-operate-content" }, mn = { class: "form-operate-item" }, bn = { class: "operate-title" }, gn = { class: "operate-content" }, kn = { class: "operate-title" }, Cn = { class: "operate-content" }, An = { class: "operate-content" }, $n = {
|
|
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 = J([{
|
|
683
|
+
name: "isRowFlex",
|
|
684
|
+
label: "是否横向布局",
|
|
685
|
+
type: "Switch",
|
|
686
|
+
value: !0
|
|
687
|
+
}]), s = J([{
|
|
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
|
+
}]), p = J([{
|
|
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
|
+
}]), y = J([]), m = J([]), g = J([]), k = J(0);
|
|
727
|
+
V(
|
|
728
|
+
() => n.originalItemContents,
|
|
729
|
+
() => {
|
|
730
|
+
var d, o, f, i, r, c, h, _, x, E;
|
|
731
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (m.value = u(n.originalItemContents), g.value = (o = (d = m.value) == null ? void 0 : d.find((T) => (T == null ? void 0 : T.key) === "formContent")) == null ? void 0 : o.contents, y.value = (i = (f = m.value) == null ? void 0 : f.find((T) => (T == null ? void 0 : T.key) === "formButton")) == null ? void 0 : i.contents, g.value = (r = g.value) == null ? void 0 : r.map((T, j) => T = {
|
|
732
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
733
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
734
|
+
key: (T == null ? void 0 : T.key) ?? "",
|
|
735
|
+
options: (T == null ? void 0 : T.options) ?? "",
|
|
736
|
+
id: (T == null ? void 0 : T.id) ?? j
|
|
737
|
+
}), y.value = (c = y.value) == null ? void 0 : c.map((T, j) => T = {
|
|
738
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
739
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
740
|
+
background: (T == null ? void 0 : T.background) ?? "#000000",
|
|
741
|
+
id: (T == null ? void 0 : T.id) ?? j
|
|
742
|
+
}), a.value = (_ = (h = m.value) == null ? void 0 : h.find((T) => (T == null ? void 0 : T.key) === "formFlex")) != null && _.contents ? [{
|
|
743
|
+
name: "isRowFlex",
|
|
744
|
+
label: "是否横向布局",
|
|
745
|
+
type: "Switch",
|
|
746
|
+
value: (E = (x = m.value) == null ? void 0 : x.find((T) => (T == null ? void 0 : T.key) === "formFlex")) == null ? void 0 : E.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 d = u(y.value);
|
|
758
|
+
let o = u(m.value);
|
|
759
|
+
d.push({
|
|
760
|
+
label: "",
|
|
761
|
+
type: "",
|
|
762
|
+
background: "#000000",
|
|
763
|
+
id: k.value
|
|
764
|
+
}), y.value = d, k.value++;
|
|
765
|
+
const f = o == null ? void 0 : o.find((i) => (i == null ? void 0 : i.key) === "formButton");
|
|
766
|
+
f != null && f.contents ? (f.contents = d, o = o == null ? void 0 : o.map((i) => ((i == null ? void 0 : i.key) === "formButton" && (i.contents = d), i))) : o.push({
|
|
767
|
+
key: "formButton",
|
|
768
|
+
contents: d
|
|
769
|
+
}), m.value = o;
|
|
770
|
+
}, $ = () => {
|
|
771
|
+
const d = u(g.value);
|
|
772
|
+
let o = u(m.value);
|
|
773
|
+
d.push({
|
|
774
|
+
label: "",
|
|
775
|
+
type: "",
|
|
776
|
+
key: "",
|
|
777
|
+
options: "",
|
|
778
|
+
id: k.value
|
|
779
|
+
}), g.value = d, k.value++;
|
|
780
|
+
const f = o == null ? void 0 : o.find((i) => (i == null ? void 0 : i.key) === "formContent");
|
|
781
|
+
f != null && f.contents ? (f.contents = d, o = o == null ? void 0 : o.map((i) => ((i == null ? void 0 : i.key) === "formContent" && (i.contents = d), i))) : o.push({
|
|
782
|
+
key: "formContent",
|
|
783
|
+
contents: d
|
|
784
|
+
}), m.value = o;
|
|
785
|
+
}, O = (d) => {
|
|
786
|
+
const o = u(y.value);
|
|
787
|
+
let f = u(m.value);
|
|
788
|
+
y.value = o.filter((r) => r.id !== d.id);
|
|
789
|
+
const i = f == null ? void 0 : f.find((r) => r.key === "formButton");
|
|
790
|
+
i != null && i.contents && (f = f == null ? void 0 : f.map((r) => ((r == null ? void 0 : r.key) === "formButton" && (r.contents = o.filter((c) => c.id !== d.id)), r))), m.value = f;
|
|
791
|
+
}, C = (d) => {
|
|
792
|
+
const o = u(g.value);
|
|
793
|
+
let f = u(m.value);
|
|
794
|
+
g.value = o.filter((r) => r.id !== d.id);
|
|
795
|
+
const i = f == null ? void 0 : f.find((r) => r.key === "formContent");
|
|
796
|
+
i != null && i.contents && (f = f == null ? void 0 : f.map((r) => ((r == null ? void 0 : r.key) === "formContent" && (r.contents = o.filter((c) => c.id !== d.id)), r))), m.value = f;
|
|
797
|
+
}, P = (d) => {
|
|
798
|
+
let o = u(m.value);
|
|
799
|
+
const f = o == null ? void 0 : o.find((i) => i.key === "formFlex");
|
|
800
|
+
(f == null ? void 0 : f.contents) !== void 0 ? o = o == null ? void 0 : o.map((i) => ((i == null ? void 0 : i.key) === "formFlex" && (i.contents = d == null ? void 0 : d.isRowFlex), i)) : o.push({
|
|
801
|
+
key: "formFlex",
|
|
802
|
+
contents: d == null ? void 0 : d.isRowFlex
|
|
803
|
+
}), m.value = o;
|
|
804
|
+
};
|
|
805
|
+
return V(
|
|
806
|
+
() => [m.value, g.value],
|
|
807
|
+
() => {
|
|
808
|
+
let d = u(m.value);
|
|
809
|
+
const o = d == null ? void 0 : d.find((f) => (f == null ? void 0 : f.key) === "formContent");
|
|
810
|
+
o != null && o.contents ? (o.contents = g.value, d = d == null ? void 0 : d.map((f) => ((f == null ? void 0 : f.key) === "formContent" && (f.contents = g.value), f))) : d.push({
|
|
811
|
+
key: "formContent",
|
|
812
|
+
contents: g.value
|
|
813
|
+
}), l("change", d);
|
|
814
|
+
},
|
|
815
|
+
{ deep: !0, immediate: !0 }
|
|
816
|
+
), (d, o) => {
|
|
817
|
+
const f = Ze("el-button");
|
|
818
|
+
return I(), K("div", hn, [
|
|
819
|
+
L("div", mn, [
|
|
820
|
+
L("div", bn, [
|
|
821
|
+
o[1] || (o[1] = L("div", null, W("表单信息"), -1)),
|
|
822
|
+
H(f, {
|
|
823
|
+
class: "blue-operate-button",
|
|
824
|
+
icon: "ele-Plus",
|
|
825
|
+
onClick: $
|
|
826
|
+
}, {
|
|
827
|
+
default: ee(() => o[0] || (o[0] = [
|
|
828
|
+
se(W("新建"))
|
|
829
|
+
])),
|
|
830
|
+
_: 1,
|
|
831
|
+
__: [0]
|
|
832
|
+
})
|
|
833
|
+
]),
|
|
834
|
+
L("div", gn, [
|
|
835
|
+
H(re, {
|
|
836
|
+
columns: s.value,
|
|
837
|
+
isShowPagination: !1,
|
|
838
|
+
isShowEdit: !1,
|
|
839
|
+
isMoveColumn: !1,
|
|
840
|
+
tableData: g.value,
|
|
841
|
+
onDeleteRow: C
|
|
842
|
+
}, null, 8, ["columns", "tableData"])
|
|
843
|
+
]),
|
|
844
|
+
L("div", kn, [
|
|
845
|
+
o[3] || (o[3] = L("div", null, W("表单按钮"), -1)),
|
|
846
|
+
H(f, {
|
|
847
|
+
class: "blue-operate-button",
|
|
848
|
+
icon: "ele-Plus",
|
|
849
|
+
onClick: A
|
|
850
|
+
}, {
|
|
851
|
+
default: ee(() => o[2] || (o[2] = [
|
|
852
|
+
se(W("新建"))
|
|
853
|
+
])),
|
|
854
|
+
_: 1,
|
|
855
|
+
__: [2]
|
|
856
|
+
})
|
|
857
|
+
]),
|
|
858
|
+
L("div", Cn, [
|
|
859
|
+
H(re, {
|
|
860
|
+
columns: p.value,
|
|
861
|
+
isShowPagination: !1,
|
|
862
|
+
isShowEdit: !1,
|
|
863
|
+
isMoveColumn: !1,
|
|
864
|
+
tableData: y.value,
|
|
865
|
+
onDeleteRow: O
|
|
866
|
+
}, null, 8, ["columns", "tableData"])
|
|
867
|
+
]),
|
|
868
|
+
o[4] || (o[4] = L("div", { class: "operate-title" }, [
|
|
869
|
+
L("div", null, W("表单布局"))
|
|
870
|
+
], -1)),
|
|
871
|
+
L("div", An, [
|
|
872
|
+
H(Oe, {
|
|
873
|
+
rowContents: a.value,
|
|
874
|
+
onChange: P
|
|
875
|
+
}, null, 8, ["rowContents"])
|
|
876
|
+
])
|
|
877
|
+
])
|
|
878
|
+
]);
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
}, _n = /* @__PURE__ */ oe($n, [["__scopeId", "data-v-a36b8468"]]), On = { class: "extra-content" }, xn = { key: 0 }, Tn = { key: 1 }, vn = {
|
|
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 = J(0), a = J(), s = J(), p = t, y = J(!1), m = J({}), g = J({}), k = J();
|
|
902
|
+
V(
|
|
903
|
+
() => [n.itemData],
|
|
904
|
+
() => {
|
|
905
|
+
var r;
|
|
906
|
+
const i = u(n.itemData);
|
|
907
|
+
a.value = (r = u(i)) == null ? void 0 : r.map((c) => {
|
|
908
|
+
var h;
|
|
909
|
+
if (c.key === "extra") {
|
|
910
|
+
let _ = [];
|
|
911
|
+
(h = c.value) == null || h.forEach((x) => {
|
|
912
|
+
var E;
|
|
913
|
+
_.push((E = Object.values(x)) == null ? void 0 : E[0]);
|
|
914
|
+
}), c.value = _;
|
|
915
|
+
}
|
|
916
|
+
return c;
|
|
917
|
+
});
|
|
918
|
+
},
|
|
919
|
+
{ deep: !0, immediate: !0 }
|
|
920
|
+
);
|
|
921
|
+
const A = (i, r, c, h) => {
|
|
922
|
+
var x;
|
|
923
|
+
let _ = {};
|
|
924
|
+
((x = i == null ? void 0 : i[0]) == null ? void 0 : x.contents) === "详情" && (y.value = !0, _[r] = i, s.value = i == null ? void 0 : i.filter((E) => (E == null ? void 0 : E.key) !== "tableContentName"), m.value = _, g.value = c, k.value = h.id);
|
|
925
|
+
}, $ = (i) => {
|
|
926
|
+
var E, T, j, N;
|
|
927
|
+
const r = (T = (E = Object.values(u(m.value))) == null ? void 0 : E[0]) == null ? void 0 : T.filter((v) => (v == null ? void 0 : v.key) === "tableContentName"), c = (N = (j = Object.values(u(m.value))) == null ? void 0 : j[0]) == null ? void 0 : N.filter((v) => (v == null ? void 0 : v.key) !== "tableContentName"), h = c == null ? void 0 : c.map((v, D) => {
|
|
928
|
+
var B;
|
|
929
|
+
return D === i.index && (v == null ? void 0 : v.comp) === "Table" && (v.compData = (B = v.compData) == null ? void 0 : B.map((S) => {
|
|
930
|
+
var b, F;
|
|
931
|
+
return (S == null ? void 0 : S.key) === "tableContents" && (S.contents = (F = (b = i.content) == null ? void 0 : b.map((U) => {
|
|
932
|
+
let G = {};
|
|
933
|
+
for (let M in U)
|
|
934
|
+
M !== "id" && (G[M] = U[M]);
|
|
935
|
+
return G;
|
|
936
|
+
})) == null ? void 0 : F.map((U) => Object.values(U))), S;
|
|
937
|
+
})), v;
|
|
938
|
+
});
|
|
939
|
+
h.unshift(r == null ? void 0 : r[0]);
|
|
940
|
+
let _ = u(m.value), x = {};
|
|
941
|
+
for (let v in _)
|
|
942
|
+
x[v] = h;
|
|
943
|
+
m.value = x;
|
|
944
|
+
}, O = () => {
|
|
945
|
+
y.value = !1, m.value = {}, g.value = {}, k.value = void 0, l.value++;
|
|
946
|
+
}, C = (i) => {
|
|
947
|
+
var E, T, j, N;
|
|
948
|
+
const r = (T = (E = Object.values(u(m.value))) == null ? void 0 : E[0]) == null ? void 0 : T.filter((v) => (v == null ? void 0 : v.key) === "tableContentName"), c = (N = (j = Object.values(u(m.value))) == null ? void 0 : j[0]) == null ? void 0 : N.filter((v) => (v == null ? void 0 : v.key) !== "tableContentName"), h = c == null ? void 0 : c.map((v, D) => (D === i.index && (v.compData = i.contents), v));
|
|
949
|
+
h.unshift(r == null ? void 0 : r[0]);
|
|
950
|
+
let _ = u(m.value), x = {};
|
|
951
|
+
for (let v in _)
|
|
952
|
+
x[v] = h;
|
|
953
|
+
m.value = x;
|
|
954
|
+
}, P = () => {
|
|
955
|
+
var r, c;
|
|
956
|
+
let i = {};
|
|
957
|
+
for (let h in g.value)
|
|
958
|
+
h === ((r = Object.keys(m.value)) == null ? void 0 : r[0]) ? i[h] = (c = Object.values(m.value)) == null ? void 0 : c[0] : i[h] = g.value[h];
|
|
959
|
+
p("change", {
|
|
960
|
+
buttonName: "编辑",
|
|
961
|
+
index: k.value,
|
|
962
|
+
singleContent: i
|
|
963
|
+
}, "methodData"), y.value = !1, m.value = {}, g.value = {}, k.value = void 0;
|
|
964
|
+
}, d = () => {
|
|
965
|
+
y.value = !1, m.value = {}, g.value = {}, k.value = void 0;
|
|
966
|
+
}, o = (i) => {
|
|
967
|
+
p("change", i, "methodData");
|
|
968
|
+
}, f = (i) => Fn(i);
|
|
969
|
+
return (i, r) => (I(), K(de, null, [
|
|
970
|
+
L("div", On, [
|
|
971
|
+
(I(!0), K(de, null, Ae(a.value, (c, h) => (I(), K("div", { key: l.value }, [
|
|
972
|
+
(c == null ? void 0 : c.key) === "extra" ? (I(), K("div", xn)) : (I(), K("div", Tn, [
|
|
973
|
+
(I(), De(Ee(f(c.comp)), {
|
|
974
|
+
itemData: c == null ? void 0 : c.compData,
|
|
975
|
+
childItemData: c == null ? void 0 : c.itemChildData,
|
|
976
|
+
key: h,
|
|
977
|
+
index: (c == null ? void 0 : c.id) ?? h,
|
|
978
|
+
onContentClick: A,
|
|
979
|
+
onChange: o
|
|
980
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
981
|
+
]))
|
|
982
|
+
]))), 128))
|
|
983
|
+
]),
|
|
984
|
+
H(ml, {
|
|
985
|
+
visible: y.value,
|
|
986
|
+
onBeforeDestroy: d
|
|
987
|
+
}, {
|
|
988
|
+
default: ee(() => [
|
|
989
|
+
(I(!0), K(de, null, Ae(s.value, (c, h) => (I(), K("div", {
|
|
990
|
+
key: h,
|
|
991
|
+
class: "extra-dialog"
|
|
992
|
+
}, [
|
|
993
|
+
(I(), De(Ee(f(c.comp)), {
|
|
994
|
+
itemData: c == null ? void 0 : c.compData,
|
|
995
|
+
onChange: $,
|
|
996
|
+
childItemData: c == null ? void 0 : c.itemChildData,
|
|
997
|
+
key: h,
|
|
998
|
+
onContentChange: C,
|
|
999
|
+
index: (c == null ? void 0 : c.id) ?? h,
|
|
1000
|
+
class: "extra-component"
|
|
1001
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
1002
|
+
]))), 128))
|
|
1003
|
+
]),
|
|
1004
|
+
footer: ee(() => [
|
|
1005
|
+
L("div", { class: "dialog-footer" }, [
|
|
1006
|
+
L("div", {
|
|
1007
|
+
class: "cancel-button footer-button",
|
|
1008
|
+
onClick: O
|
|
1009
|
+
}, W("取消")),
|
|
1010
|
+
L("div", {
|
|
1011
|
+
class: "confirm-button footer-button",
|
|
1012
|
+
onClick: P
|
|
1013
|
+
}, W("确认"))
|
|
1014
|
+
])
|
|
1015
|
+
]),
|
|
1016
|
+
_: 1
|
|
1017
|
+
}, 8, ["visible"])
|
|
1018
|
+
], 64));
|
|
1019
|
+
}
|
|
1020
|
+
}, Dn = /* @__PURE__ */ oe(vn, [["__scopeId", "data-v-e3e0f29d"]]), En = { class: "method-content" }, Nn = { class: "method-buttons" }, Sn = ["onClick"], Pn = {
|
|
1021
|
+
__name: "index",
|
|
1022
|
+
props: {
|
|
1023
|
+
itemData: {
|
|
1024
|
+
type: Array,
|
|
1025
|
+
default: () => []
|
|
1026
|
+
},
|
|
1027
|
+
childItemData: {
|
|
1028
|
+
type: Array,
|
|
1029
|
+
default: () => []
|
|
1030
|
+
},
|
|
1031
|
+
index: Number,
|
|
1032
|
+
changedContent: {
|
|
1033
|
+
type: Object,
|
|
1034
|
+
default: () => {
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
setup(e) {
|
|
1039
|
+
const t = J([]), n = e, l = (a) => {
|
|
1040
|
+
var p, y;
|
|
1041
|
+
let s = {};
|
|
1042
|
+
(p = u(a.content)) == null || p.forEach((m) => {
|
|
1043
|
+
var g, k, A, $, O, C, P, d, o, f, i, r;
|
|
1044
|
+
if ((m == null ? void 0 : m.comp) === "Table") {
|
|
1045
|
+
let c = ($ = (A = (k = (g = m == null ? void 0 : m.compData) == null ? void 0 : g.find((x) => (x == null ? void 0 : x.key) === "header")) == null ? void 0 : k.contents) == null ? void 0 : A[0]) == null ? void 0 : $.some((x) => x == null ? void 0 : x.children), h = (P = (C = (O = m == null ? void 0 : m.compData) == null ? void 0 : O.find((x) => (x == null ? void 0 : x.key) === "tableContents")) == null ? void 0 : C.contents) == null ? void 0 : P.map((x) => x.slice(1)), _ = (r = (i = (f = (o = (d = m == null ? void 0 : m.compData) == null ? void 0 : d.find((x) => (x == null ? void 0 : x.key) === "header")) == null ? void 0 : o.contents) == null ? void 0 : f[0]) == null ? void 0 : i[0]) == null ? void 0 : r.label;
|
|
1046
|
+
c && (s[_] = h);
|
|
1047
|
+
}
|
|
1048
|
+
}), a.api && yl({
|
|
1049
|
+
url: a.api,
|
|
1050
|
+
method: "post",
|
|
1051
|
+
content: {
|
|
1052
|
+
content: s,
|
|
1053
|
+
templateFile: (y = a == null ? void 0 : a.extra) == null ? void 0 : y[0]
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
};
|
|
1057
|
+
return V(
|
|
1058
|
+
() => n.itemData,
|
|
1059
|
+
async () => {
|
|
1060
|
+
const a = u(n.itemData), s = a == null ? void 0 : a.map(async (y) => {
|
|
1061
|
+
var O, C, P, d, o, f;
|
|
1062
|
+
const g = (O = (await Ne({
|
|
1063
|
+
key: {
|
|
1064
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1065
|
+
parentTable: "",
|
|
1066
|
+
type: "method",
|
|
1067
|
+
methodName: y.method
|
|
1068
|
+
}
|
|
1069
|
+
})).data.result) == null ? void 0 : O[0], k = await Ne({
|
|
1070
|
+
key: {
|
|
1071
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1072
|
+
type: "methodData",
|
|
1073
|
+
tableId: g.id
|
|
1074
|
+
}
|
|
1075
|
+
}), A = await fl((C = y == null ? void 0 : y.value) == null ? void 0 : C[0], sessionStorage.getItem("systemKey"), ""), $ = (P = k.data.result) == null ? void 0 : P[0];
|
|
1076
|
+
return {
|
|
1077
|
+
buttonName: (d = $ == null ? void 0 : $.key) == null ? void 0 : d.methodKey,
|
|
1078
|
+
api: (f = (o = $ == null ? void 0 : $.value) == null ? void 0 : o.tableData) == null ? void 0 : f[0],
|
|
1079
|
+
content: A == null ? void 0 : A.filter((i) => i.comp !== "methodButton"),
|
|
1080
|
+
extraContent: u(y.value).slice(1)
|
|
1081
|
+
};
|
|
1082
|
+
}), p = await Promise.all(s);
|
|
1083
|
+
t.value = p;
|
|
1084
|
+
},
|
|
1085
|
+
{ immediate: !0, deep: !0 }
|
|
1086
|
+
), (a, s) => (I(), K("div", En, [
|
|
1087
|
+
(I(!0), K(de, null, Ae(t.value, (p) => (I(), K("div", Nn, [
|
|
1088
|
+
L("div", {
|
|
1089
|
+
onClick: (y) => l(p)
|
|
1090
|
+
}, W(p.buttonName), 9, Sn)
|
|
1091
|
+
]))), 256))
|
|
1092
|
+
]));
|
|
1093
|
+
}
|
|
1094
|
+
}, Bn = /* @__PURE__ */ oe(Pn, [["__scopeId", "data-v-22bc7b1e"]]), jt = J([
|
|
1095
|
+
{
|
|
1096
|
+
name: "表格",
|
|
1097
|
+
type: "table",
|
|
1098
|
+
comp: "Table",
|
|
1099
|
+
icon: "Grid"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
name: "表单",
|
|
1103
|
+
type: "form",
|
|
1104
|
+
comp: "Form",
|
|
1105
|
+
icon: "Film"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: "折叠",
|
|
1109
|
+
type: "fold",
|
|
1110
|
+
comp: "Fold",
|
|
1111
|
+
icon: "Fold"
|
|
1112
|
+
}
|
|
1113
|
+
]), jn = {
|
|
1114
|
+
TABLE: dl,
|
|
1115
|
+
FORM: nn,
|
|
1116
|
+
TableOperate: yn,
|
|
1117
|
+
FormOperate: _n,
|
|
1118
|
+
FOLD: gl,
|
|
1119
|
+
CALCULATOR: Dn,
|
|
1120
|
+
METHODBUTTON: Bn
|
|
1121
|
+
// 添加其他组件...
|
|
1122
|
+
};
|
|
1123
|
+
function Fn(e) {
|
|
1124
|
+
return jn[e == null ? void 0 : e.toUpperCase()] || null;
|
|
1125
|
+
}
|
|
1126
|
+
const R = [
|
|
1127
|
+
{
|
|
1128
|
+
key: "FormName",
|
|
1129
|
+
value: "Form"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
key: "TableName",
|
|
1133
|
+
value: "Table"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
key: "MenuName",
|
|
1137
|
+
value: "Menu"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
key: "GroupName",
|
|
1141
|
+
value: "Group"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
key: "SystemKey",
|
|
1145
|
+
value: "System"
|
|
1146
|
+
}
|
|
1147
|
+
], w = [
|
|
1148
|
+
{
|
|
1149
|
+
key: "FormDirect",
|
|
1150
|
+
value: "formFlex"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
key: "Form",
|
|
1154
|
+
value: "formContent"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
key: "FormButton",
|
|
1158
|
+
value: "formButton"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
key: "FormFlex",
|
|
1162
|
+
value: "formWrap"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
key: "TableColumns",
|
|
1166
|
+
value: "header"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
key: "TableButton",
|
|
1170
|
+
value: "extraButton"
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
key: "TableLineButton",
|
|
1174
|
+
value: "rowButton"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
key: "Table",
|
|
1178
|
+
value: "tableContents"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
key: "TableIndex",
|
|
1182
|
+
value: "tableIndex"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
key: "Menus",
|
|
1186
|
+
value: "menuContents"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
key: "GroupContents",
|
|
1190
|
+
value: "groupContents"
|
|
1191
|
+
}
|
|
1192
|
+
], te = J(0), Un = (e) => {
|
|
1193
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), a = n.replace(/^['"]|['"]$/g, "");
|
|
1194
|
+
return { key: l, value: a };
|
|
1195
|
+
}, ye = (e) => {
|
|
1196
|
+
try {
|
|
1197
|
+
return JSON.parse(e), !0;
|
|
1198
|
+
} catch {
|
|
1199
|
+
return !1;
|
|
1200
|
+
}
|
|
1201
|
+
}, Jn = (e) => e.includes("$") && e.trim().endsWith("(") ? e + ")" : e, wn = (e) => {
|
|
1202
|
+
let t = e;
|
|
1203
|
+
const n = [];
|
|
1204
|
+
let l = "";
|
|
1205
|
+
for (const a of t)
|
|
1206
|
+
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());
|
|
1207
|
+
return n == null ? void 0 : n.filter((a) => a.includes("{"));
|
|
1208
|
+
}, Rn = (e) => {
|
|
1209
|
+
var n;
|
|
1210
|
+
let t = [];
|
|
1211
|
+
return (n = wn(e.slice(1, -1))) == null || n.forEach((l) => {
|
|
1212
|
+
var s, p, y, m;
|
|
1213
|
+
let a = ((p = (s = l.slice(1, -1)) == null ? void 0 : s.split(",")) == null ? void 0 : p.length) ?? 1;
|
|
1214
|
+
(m = (y = l.slice(1, -1)) == null ? void 0 : y.split(",")) == null || m.forEach((g) => {
|
|
1215
|
+
var O, C, P, d, o, f, i, r, c, h, _, x, E;
|
|
1216
|
+
let k = g == null ? void 0 : g.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((d = (P = k == null ? void 0 : k[1]) == null ? void 0 : P.replace(/^"(.*)"$/, "$1")) == null ? void 0 : d.split("(")) && ((i = (f = (o = k == null ? void 0 : k[1]) == null ? void 0 : o.replace(/^"(.*)"$/, "$1")) == null ? void 0 : f.split("(")) == null ? void 0 : i.length) > 1 ? ((r = k == null ? void 0 : k[0]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) + ((_ = (h = (c = k == null ? void 0 : k[1]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) == null ? void 0 : h.split("(")) == null ? void 0 : _[0]) + "()" : (x = k == null ? void 0 : k[0]) == null ? void 0 : x.replace(/^"(.*)"$/, "$1") : "", $ = (k == null ? void 0 : k[1].split("$").length) - 1 === 0 ? (E = k == null ? void 0 : k[1]) == null ? void 0 : E.replace(/^"(.*)"$/, "$1") : "";
|
|
1217
|
+
te.value++, t.push({
|
|
1218
|
+
id: te.value,
|
|
1219
|
+
key: A,
|
|
1220
|
+
value: $,
|
|
1221
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1222
|
+
width: a,
|
|
1223
|
+
extraContent: k == null ? void 0 : k[1]
|
|
1224
|
+
});
|
|
1225
|
+
});
|
|
1226
|
+
}), t;
|
|
1227
|
+
}, Xe = (e) => {
|
|
1228
|
+
var t, n;
|
|
1229
|
+
try {
|
|
1230
|
+
const l = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1231
|
+
if (u(l).split("{").length - 1 > 1) {
|
|
1232
|
+
let a = u(l).replace(/^\{(.*)\}$/, "[$1]");
|
|
1233
|
+
if (ye(a) && !a.includes("$") || (a = a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), ye(a)) {
|
|
1234
|
+
const s = JSON.parse(a);
|
|
1235
|
+
let p = [];
|
|
1236
|
+
return s == null || s.forEach((y) => {
|
|
1237
|
+
var m;
|
|
1238
|
+
(m = Object.entries(u(y))) == null || m.forEach((g) => {
|
|
1239
|
+
te.value++, p.push({
|
|
1240
|
+
id: te.value,
|
|
1241
|
+
key: (g == null ? void 0 : g[0]) ?? "",
|
|
1242
|
+
value: (g == null ? void 0 : g[1]) === "" ? "" : g == null ? void 0 : g[1],
|
|
1243
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1244
|
+
width: Object.keys(u(y)).length
|
|
1245
|
+
});
|
|
1246
|
+
});
|
|
1247
|
+
}), p;
|
|
1248
|
+
} else
|
|
1249
|
+
return l.trim().startsWith("{{") ? Rn(l.trim()) : ke(a);
|
|
1250
|
+
} else if (ye(l)) {
|
|
1251
|
+
const a = JSON.parse(l);
|
|
1252
|
+
return Object.entries(a).map(([s, p]) => (te.value++, {
|
|
1253
|
+
id: te.value,
|
|
1254
|
+
key: s,
|
|
1255
|
+
value: p === "" ? "" : p,
|
|
1256
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1257
|
+
width: 1
|
|
1258
|
+
}));
|
|
1259
|
+
} else
|
|
1260
|
+
return ((t = ke(l)) == null ? void 0 : t.length) === 0 ? l : (n = ke(l)) == null ? void 0 : n.map((a) => ({
|
|
1261
|
+
label: a.label,
|
|
1262
|
+
method: Jn(a.method)
|
|
1263
|
+
}));
|
|
1264
|
+
} catch (l) {
|
|
1265
|
+
return console.error("转换失败:", l), [];
|
|
1266
|
+
}
|
|
1267
|
+
}, ke = (e) => {
|
|
1268
|
+
e = e.trim().replace(/^\{|\}$/g, "").trim();
|
|
1269
|
+
const t = [];
|
|
1270
|
+
let n = 0;
|
|
1271
|
+
for (; n < e.length; ) {
|
|
1272
|
+
const l = e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
|
|
1273
|
+
if (!l) break;
|
|
1274
|
+
const a = l[1];
|
|
1275
|
+
n += l[0].length;
|
|
1276
|
+
let s = "", p = 0, y = !1, m = "";
|
|
1277
|
+
for (let g = n; g < e.length; g++) {
|
|
1278
|
+
const k = e[g];
|
|
1279
|
+
if ((k === '"' || k === "'") && !y ? (y = !0, m = k) : k === m && y && (y = !1, m = ""), !y && ((k === "{" || k === "(" || k === "[") && p++, (k === "}" || k === ")" || k === "]") && p--, k === "," && p === 0 || g === e.length - 1)) {
|
|
1280
|
+
s = e.slice(n, g + 1).trim(), n = g + 1;
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
t.push({
|
|
1285
|
+
label: a,
|
|
1286
|
+
method: s
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
return t;
|
|
1290
|
+
}, Ln = (e, t) => {
|
|
1291
|
+
try {
|
|
1292
|
+
if (R != null && R.find((n) => (n == null ? void 0 : n.key) === t))
|
|
1293
|
+
return e.replace(/['"]/g, "").trim();
|
|
1294
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1295
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1296
|
+
return JSON.parse(n);
|
|
1297
|
+
} else {
|
|
1298
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1299
|
+
if (ye(n)) {
|
|
1300
|
+
const l = JSON.parse(n);
|
|
1301
|
+
return Array.isArray(l) ? l.map((a) => ({ label: a })) : l;
|
|
1302
|
+
} else
|
|
1303
|
+
return Xe(u(e));
|
|
1304
|
+
}
|
|
1305
|
+
} catch (n) {
|
|
1306
|
+
return console.error("解析失败:", n), e;
|
|
1307
|
+
}
|
|
1308
|
+
}, Gn = (e) => ({ [e == null ? void 0 : e.key]: Ln(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Mn = (e) => {
|
|
1309
|
+
try {
|
|
1310
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
1311
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1312
|
+
return JSON.parse(t);
|
|
1313
|
+
} else
|
|
1314
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1315
|
+
} catch (t) {
|
|
1316
|
+
return console.error("解析失败:", t), e;
|
|
1317
|
+
}
|
|
1318
|
+
}, In = (e) => {
|
|
1319
|
+
const t = e.match(/\(([^)]+)\)/);
|
|
1320
|
+
return t ? t[1] : "";
|
|
1321
|
+
}, Wn = (e) => {
|
|
1322
|
+
const t = e.match(/^([^(]+)\s*\(/);
|
|
1323
|
+
return t ? t[1].trim() : e;
|
|
1324
|
+
}, Me = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((t) => t.trim()).filter((t) => t).join("/"), Hn = (e) => {
|
|
1325
|
+
var p, y;
|
|
1326
|
+
let t = [], n = [];
|
|
1327
|
+
const l = (p = u(e)) == null ? void 0 : p.map((m) => m == null ? void 0 : m.key), a = [...new Set((y = u(l)) == null ? void 0 : y.map((m) => In(m)))];
|
|
1328
|
+
a == null || a.forEach((m) => {
|
|
1329
|
+
let g = e == null ? void 0 : e.filter(($) => $.key.includes(m));
|
|
1330
|
+
g == null || g.forEach(($) => {
|
|
1331
|
+
$ != null && $.key.includes("Menus") && (t.push({
|
|
1332
|
+
key: "GroupName",
|
|
1333
|
+
value: Me($ == null ? void 0 : $.value)
|
|
1334
|
+
}), n.push(Me($ == null ? void 0 : $.value)));
|
|
1335
|
+
});
|
|
1336
|
+
let k = e == null ? void 0 : e.filter(($) => $.key.includes(m) && !($ != null && $.key.includes("Menus")));
|
|
1337
|
+
k = k == null ? void 0 : k.map(($) => ($.key = Wn($.key), $));
|
|
1338
|
+
const A = {
|
|
1339
|
+
key: "GroupContents",
|
|
1340
|
+
value: k
|
|
1341
|
+
};
|
|
1342
|
+
t.push(A);
|
|
1343
|
+
});
|
|
1344
|
+
const s = {
|
|
1345
|
+
key: "Menus",
|
|
1346
|
+
value: n
|
|
1347
|
+
};
|
|
1348
|
+
return t.unshift(s), t;
|
|
1349
|
+
}, Ye = (e) => {
|
|
1350
|
+
var t, n;
|
|
1351
|
+
if (Array.isArray(Object.keys(e)) && ((t = Object.keys(e)) == null ? void 0 : t.length) > 0) {
|
|
1352
|
+
let l = [];
|
|
1353
|
+
return (n = Object.entries(e)) == null || n.forEach(([a, s]) => {
|
|
1354
|
+
var y, m;
|
|
1355
|
+
let p = [];
|
|
1356
|
+
if (p.push(a), ((y = Object.keys(s)) == null ? void 0 : y.length) > 0) {
|
|
1357
|
+
let g = [];
|
|
1358
|
+
(m = Ye(s)) == null || m.forEach((k) => {
|
|
1359
|
+
g.push(k);
|
|
1360
|
+
}), g == null || g.forEach((k) => {
|
|
1361
|
+
p.push(k);
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
l.push(p);
|
|
1365
|
+
}), l;
|
|
1366
|
+
}
|
|
1367
|
+
}, Kn = (e, t) => {
|
|
1368
|
+
var l;
|
|
1369
|
+
let n = t;
|
|
1370
|
+
return Array.isArray(Object.keys(e)) && ((l = Object.entries(e)) == null || l.forEach(([a, s]) => {
|
|
1371
|
+
let p = [a];
|
|
1372
|
+
if (typeof s == "object" && s !== null) {
|
|
1373
|
+
let y = Ye(s);
|
|
1374
|
+
y == null || y.forEach((m) => {
|
|
1375
|
+
p.push(m);
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
n.push(p);
|
|
1379
|
+
})), n;
|
|
1380
|
+
}, Zn = (e) => {
|
|
1381
|
+
const t = {};
|
|
1382
|
+
return e.forEach((l) => {
|
|
1383
|
+
const a = l.split("/");
|
|
1384
|
+
let s = t;
|
|
1385
|
+
a.forEach((p) => {
|
|
1386
|
+
s[p] || (s[p] = {}), s = s[p];
|
|
1387
|
+
});
|
|
1388
|
+
}), Kn(t, []);
|
|
1389
|
+
}, Ve = (e) => Zn(e), Ft = (e) => {
|
|
1390
|
+
var t, n, l, a, s, p, y, m;
|
|
1391
|
+
try {
|
|
1392
|
+
const g = Te((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), k = (a = (l = u(g)) == null ? void 0 : l.filter((C) => !C.includes("/*"))) == null ? void 0 : a.map((C) => Un(C)), A = Hn(k), $ = [];
|
|
1393
|
+
if (((s = A == null ? void 0 : A.find((C) => (C == null ? void 0 : C.key) === "Menus")) == null ? void 0 : s.value.length) === 0)
|
|
1394
|
+
return !1;
|
|
1395
|
+
(p = u(A)) == null || p.forEach((C) => {
|
|
1396
|
+
var P, d, o, f, i;
|
|
1397
|
+
R != null && R.find((r) => {
|
|
1398
|
+
var c, h;
|
|
1399
|
+
return ((c = r == null ? void 0 : r.key) == null ? void 0 : c.toUpperCase()) === ((h = C == null ? void 0 : C.key) == null ? void 0 : h.toUpperCase());
|
|
1400
|
+
}) ? $.push({
|
|
1401
|
+
comp: ((P = R == null ? void 0 : R.find((r) => {
|
|
1402
|
+
var c, h;
|
|
1403
|
+
return ((c = r == null ? void 0 : r.key) == null ? void 0 : c.toUpperCase()) === ((h = C == null ? void 0 : C.key) == null ? void 0 : h.toUpperCase());
|
|
1404
|
+
})) == null ? void 0 : P.value) ?? "",
|
|
1405
|
+
name: (d = C == null ? void 0 : C.value) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, ""),
|
|
1406
|
+
compData: []
|
|
1407
|
+
}) : w != null && w.find((r) => {
|
|
1408
|
+
var c, h;
|
|
1409
|
+
return ((c = r == null ? void 0 : r.key) == null ? void 0 : c.toUpperCase()) === ((h = C == null ? void 0 : C.key) == null ? void 0 : h.toUpperCase());
|
|
1410
|
+
}) && (($ == null ? void 0 : $.length) === 0 && (o = C.key) != null && o.includes("Menus") && $.push({
|
|
1411
|
+
comp: "Menu",
|
|
1412
|
+
name: "",
|
|
1413
|
+
compData: []
|
|
1414
|
+
}), (f = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && f.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
|
|
1415
|
+
key: (i = w == null ? void 0 : w.find((r) => {
|
|
1416
|
+
var c, h;
|
|
1417
|
+
return ((c = r == null ? void 0 : r.key) == null ? void 0 : c.toUpperCase()) === ((h = C == null ? void 0 : C.key) == null ? void 0 : h.toUpperCase());
|
|
1418
|
+
})) == null ? void 0 : i.value,
|
|
1419
|
+
contents: C == null ? void 0 : C.value
|
|
1420
|
+
}));
|
|
1421
|
+
});
|
|
1422
|
+
let O = (y = u($)) == null ? void 0 : y.map((C) => {
|
|
1423
|
+
var P;
|
|
1424
|
+
return C != null && C.compData && (C.compData = (P = C == null ? void 0 : C.compData) == null ? void 0 : P.map((d) => {
|
|
1425
|
+
var o, f, i, r, c, h, _, x, E, T, j;
|
|
1426
|
+
if ((d == null ? void 0 : d.key) === "formFlex")
|
|
1427
|
+
d.contents = ((f = (o = d.contents) == null ? void 0 : o.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : f.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1428
|
+
else if ((d == null ? void 0 : d.key) === "groupContents")
|
|
1429
|
+
d.contents = (i = u(d.contents)) == null ? void 0 : i.map((N) => Gn(u(N)));
|
|
1430
|
+
else if (Array.isArray(d == null ? void 0 : d.contents))
|
|
1431
|
+
d.contents = Ve(d.contents);
|
|
1432
|
+
else if (((c = (r = d == null ? void 0 : d.contents) == null ? void 0 : r.trim()) != null && c.startsWith("[") || (_ = (h = d.contents) == null ? void 0 : h.trim()) != null && _.startsWith("【")) && ((E = (x = d.contents) == null ? void 0 : x.trim()) != null && E.endsWith("]") || (j = (T = d.contents) == null ? void 0 : T.trim()) != null && j.endsWith("】")))
|
|
1433
|
+
d.contents = Mn(u(d.contents));
|
|
1434
|
+
else {
|
|
1435
|
+
if (!d.contents) return;
|
|
1436
|
+
d.contents = Xe(u(d.contents));
|
|
1437
|
+
}
|
|
1438
|
+
return d;
|
|
1439
|
+
})), C;
|
|
1440
|
+
});
|
|
1441
|
+
return O = (m = u(O)) == null ? void 0 : m.map((C) => {
|
|
1442
|
+
var P;
|
|
1443
|
+
return (C == null ? void 0 : C.comp) === "Group" && (C.compData = (P = C.compData) == null ? void 0 : P.map((d) => {
|
|
1444
|
+
var f;
|
|
1445
|
+
let o = [];
|
|
1446
|
+
return (f = d.contents) == null || f.forEach((i) => {
|
|
1447
|
+
var r, c, h, _, x, E, T, j, N, v, D, B;
|
|
1448
|
+
if (R != null && R.find((S) => {
|
|
1449
|
+
var b, F, U;
|
|
1450
|
+
return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(i)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
|
|
1451
|
+
}))
|
|
1452
|
+
o.push({
|
|
1453
|
+
comp: (r = R == null ? void 0 : R.find((S) => {
|
|
1454
|
+
var b, F, U;
|
|
1455
|
+
return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(i)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
|
|
1456
|
+
})) == null ? void 0 : r.value,
|
|
1457
|
+
name: (h = (c = Object.values(i)) == null ? void 0 : c[0]) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
|
|
1458
|
+
compData: []
|
|
1459
|
+
});
|
|
1460
|
+
else if (w != null && w.find((S) => {
|
|
1461
|
+
var b, F, U;
|
|
1462
|
+
return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(i)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
|
|
1463
|
+
})) {
|
|
1464
|
+
if ((o == null ? void 0 : o.length) === 0) return;
|
|
1465
|
+
(_ = o == null ? void 0 : o[(o == null ? void 0 : o.length) - 1]) != null && _.compData && o[(o == null ? void 0 : o.length) - 1].compData.push({
|
|
1466
|
+
key: (x = w == null ? void 0 : w.find((S) => {
|
|
1467
|
+
var b, F, U;
|
|
1468
|
+
return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(i)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
|
|
1469
|
+
})) == null ? void 0 : x.value,
|
|
1470
|
+
contents: (E = Object.values(i)) == null ? void 0 : E[0]
|
|
1471
|
+
});
|
|
1472
|
+
} else if ((j = (T = Object.keys(i)) == null ? void 0 : T[0]) != null && j.includes("$")) {
|
|
1473
|
+
const S = (v = (N = Object.keys(u(i))) == null ? void 0 : N[0]) == null ? void 0 : v.split("$");
|
|
1474
|
+
o[(o == null ? void 0 : o.length) - 1].compData.push({
|
|
1475
|
+
key: (D = w == null ? void 0 : w.find((b) => {
|
|
1476
|
+
var F, U;
|
|
1477
|
+
return ((F = b == null ? void 0 : b.key) == null ? void 0 : F.toUpperCase()) === ((U = S == null ? void 0 : S[0]) == null ? void 0 : U.toUpperCase());
|
|
1478
|
+
})) == null ? void 0 : D.value,
|
|
1479
|
+
contents: (B = Object.values(i)) == null ? void 0 : B[0],
|
|
1480
|
+
selectLabel: S == null ? void 0 : S[1]
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
return i;
|
|
1484
|
+
}), d.contents = o, d;
|
|
1485
|
+
})), C;
|
|
1486
|
+
}), O;
|
|
1487
|
+
} catch {
|
|
1488
|
+
return !1;
|
|
1489
|
+
}
|
|
1490
|
+
}, Q = (e) => {
|
|
1491
|
+
try {
|
|
1492
|
+
return JSON.parse(e), !0;
|
|
1493
|
+
} catch {
|
|
1494
|
+
return !1;
|
|
1495
|
+
}
|
|
1496
|
+
}, Ut = (e, t) => Vl(e, t), el = (e) => {
|
|
1497
|
+
const t = [];
|
|
1498
|
+
let n = null;
|
|
1499
|
+
for (let l = 0; l < e.length; l++) {
|
|
1500
|
+
const a = e[l];
|
|
1501
|
+
if (Array.isArray(a))
|
|
1502
|
+
n && (n.children = el(a));
|
|
1503
|
+
else {
|
|
1504
|
+
const s = { label: a };
|
|
1505
|
+
t.push(s), n = s;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
return t;
|
|
1509
|
+
}, ll = (e) => {
|
|
1510
|
+
let t = 0;
|
|
1511
|
+
for (const n of e)
|
|
1512
|
+
t++, n.children && (t += ll(n.children));
|
|
1513
|
+
return t;
|
|
1514
|
+
}, nl = (e, t, n = []) => {
|
|
1515
|
+
let l = 0;
|
|
1516
|
+
for (const a of t) {
|
|
1517
|
+
if (l >= e.length) break;
|
|
1518
|
+
const s = [...e[l]];
|
|
1519
|
+
if (n.push(s), l++, a.children && a.children.length > 0) {
|
|
1520
|
+
const p = [];
|
|
1521
|
+
nl(
|
|
1522
|
+
e.slice(l),
|
|
1523
|
+
a.children,
|
|
1524
|
+
p
|
|
1525
|
+
), p.length > 0 && (s.push(p), l += ll(a.children));
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
return n;
|
|
1529
|
+
}, qn = (e, t) => {
|
|
1530
|
+
let n = [];
|
|
1531
|
+
return e == null || e.forEach((a) => {
|
|
1532
|
+
a.some((s) => Array.isArray(s)) ? n.push(...a) : n.push(a);
|
|
1533
|
+
}), nl(n, t);
|
|
1534
|
+
}, $e = (e) => {
|
|
1535
|
+
const t = { label: e[0].trim() };
|
|
1536
|
+
if (e.length > 1) {
|
|
1537
|
+
const n = e.slice(1);
|
|
1538
|
+
n.length === 1 && Array.isArray(n[0]) ? t.children = n[0].map(
|
|
1539
|
+
(l) => Array.isArray(l) ? $e(l) : { label: l.trim() }
|
|
1540
|
+
) : t.children = n.map(
|
|
1541
|
+
(l) => Array.isArray(l) ? $e(l) : { label: l.trim() }
|
|
1542
|
+
);
|
|
1543
|
+
}
|
|
1544
|
+
return t;
|
|
1545
|
+
}, Ie = (e) => {
|
|
1546
|
+
let t = e.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
|
|
1547
|
+
return t = t.replace(/:}(?=,|]|}|$)/g, ':""}'), t = t.replace(/:,(?=\s*")/g, ':"",'), t = t.replace(
|
|
1548
|
+
/(https?|HTTPS?):"\/\/([^"]+)"/gi,
|
|
1549
|
+
(n, l, a) => `"${l}://${a}"`
|
|
1550
|
+
), t = t.replace(
|
|
1551
|
+
/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
|
|
1552
|
+
'$1"$2"$3'
|
|
1553
|
+
), t;
|
|
1554
|
+
}, zn = (e) => {
|
|
1555
|
+
var n;
|
|
1556
|
+
return e.some((l) => !Array.isArray(l)) ? e : (n = u(e)) == null ? void 0 : n.map((l) => {
|
|
1557
|
+
let a = [];
|
|
1558
|
+
return l.some((s) => Array.isArray(s)) ? l == null || l.forEach((s) => {
|
|
1559
|
+
Array.isArray(s) && a.push($e(s));
|
|
1560
|
+
}) : l.some((s) => s.includes("[")) ? a.push(l) : a = l.map((s) => ({ label: s.trim() })), a;
|
|
1561
|
+
});
|
|
1562
|
+
}, tl = (e, t, n) => {
|
|
1563
|
+
let l = e, a = n, s = t;
|
|
1564
|
+
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((p) => {
|
|
1565
|
+
if (p.children) {
|
|
1566
|
+
const y = tl(l, p, a);
|
|
1567
|
+
a = y[0], l = y[1];
|
|
1568
|
+
}
|
|
1569
|
+
}), [a, l];
|
|
1570
|
+
}, Qn = (e, t) => {
|
|
1571
|
+
let n = e, l = [];
|
|
1572
|
+
return t.length > 0 ? t == null || t.forEach((a) => {
|
|
1573
|
+
let s = n == null ? void 0 : n[0];
|
|
1574
|
+
n.shift();
|
|
1575
|
+
const p = tl(u(n), a, s);
|
|
1576
|
+
s = p[0], n = p[1], l.push(s);
|
|
1577
|
+
}) : l = n, l;
|
|
1578
|
+
}, xe = (e, t) => {
|
|
1579
|
+
const n = zn(u(e));
|
|
1580
|
+
return Qn(n, t);
|
|
1581
|
+
}, Xn = (e) => {
|
|
1582
|
+
const t = [];
|
|
1583
|
+
let n = 0;
|
|
1584
|
+
const l = e.length;
|
|
1585
|
+
for (; n < l; ) {
|
|
1586
|
+
const a = e[n];
|
|
1587
|
+
a.key === "tableColumns" && n + 1 < l && e[n + 1].key === "tableContents" ? (t.push({
|
|
1588
|
+
comp: "Table",
|
|
1589
|
+
compData: [a, e[n + 1]],
|
|
1590
|
+
name: ""
|
|
1591
|
+
}), n += 2) : (t.push(a), n += 1);
|
|
1592
|
+
}
|
|
1593
|
+
return t;
|
|
1594
|
+
}, al = (e) => xe([e], []), We = (e) => {
|
|
1595
|
+
let t = Xn(e);
|
|
1596
|
+
return t = t == null ? void 0 : t.map((n) => {
|
|
1597
|
+
var l, a;
|
|
1598
|
+
return n.comp === "Table" ? (l = n.compData) != null && l.find((s) => (s == null ? void 0 : s.key) === "header") || (n.compData = (a = n.compData) == null ? void 0 : a.map((s) => (s.key === "tableColumns" ? s = {
|
|
1599
|
+
key: "header",
|
|
1600
|
+
contents: xe(s.value, [])
|
|
1601
|
+
} : s = {
|
|
1602
|
+
key: s.key,
|
|
1603
|
+
contents: s.value
|
|
1604
|
+
}, s)), n.compData.push({
|
|
1605
|
+
key: "extraButton",
|
|
1606
|
+
contents: [{ label: "新增" }]
|
|
1607
|
+
}), n.compData.push({
|
|
1608
|
+
key: "rowButton",
|
|
1609
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1610
|
+
})) : n.key === "form" && (n = {
|
|
1611
|
+
comp: "Form",
|
|
1612
|
+
compData: [],
|
|
1613
|
+
name: ""
|
|
1614
|
+
}), n;
|
|
1615
|
+
}), t;
|
|
1616
|
+
}, Yn = (e, t) => {
|
|
1617
|
+
var y, m, g, k, A, $;
|
|
1618
|
+
const n = [], l = el((m = (y = e == null ? void 0 : e.find((O) => O.key === "tableIndex")) == null ? void 0 : y.value) == null ? void 0 : m[0]);
|
|
1619
|
+
n.push({
|
|
1620
|
+
key: "tableIndexColumn",
|
|
1621
|
+
contents: t
|
|
1622
|
+
}), n.push({
|
|
1623
|
+
key: "tableIndex",
|
|
1624
|
+
contents: l
|
|
1625
|
+
});
|
|
1626
|
+
let a = [];
|
|
1627
|
+
const s = (g = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : g.value;
|
|
1628
|
+
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 = xe((A = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : A.value, l), n.push({
|
|
1629
|
+
key: "header",
|
|
1630
|
+
contents: a
|
|
1631
|
+
});
|
|
1632
|
+
const p = qn(($ = e == null ? void 0 : e.find((O) => O.key === "tableContents")) == null ? void 0 : $.value, l);
|
|
1633
|
+
return n.push({
|
|
1634
|
+
key: "tableContents",
|
|
1635
|
+
contents: p
|
|
1636
|
+
}), n.push({
|
|
1637
|
+
key: "extraButton",
|
|
1638
|
+
contents: [{ label: "新增" }]
|
|
1639
|
+
}), n.push({
|
|
1640
|
+
key: "rowButton",
|
|
1641
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1642
|
+
}), n;
|
|
1643
|
+
}, sl = (e) => e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (t, n, l) => {
|
|
1644
|
+
const a = sl(l);
|
|
1645
|
+
return `"${n}",${a}`;
|
|
1646
|
+
}), ie = (e) => {
|
|
1647
|
+
const t = e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
|
|
1648
|
+
return sl(t).replace(/^"(.*)"$/, "$1");
|
|
1649
|
+
}, Vn = (e) => {
|
|
1650
|
+
const t = /* @__PURE__ */ new Set();
|
|
1651
|
+
return e.filter((n) => {
|
|
1652
|
+
const l = JSON.stringify(n);
|
|
1653
|
+
return t.has(l) ? !1 : t.add(l);
|
|
1654
|
+
});
|
|
1655
|
+
}, He = (e) => {
|
|
1656
|
+
var n;
|
|
1657
|
+
let t = [];
|
|
1658
|
+
return (n = u(e)) == null || n.forEach((l) => {
|
|
1659
|
+
var a;
|
|
1660
|
+
(a = l.contents) == null || a.forEach((s) => {
|
|
1661
|
+
t.push(s);
|
|
1662
|
+
});
|
|
1663
|
+
}), t = Vn(t), t.push({
|
|
1664
|
+
label: "操作"
|
|
1665
|
+
}), [t];
|
|
1666
|
+
}, et = (e, t) => e.reduce((n, l, a) => {
|
|
1667
|
+
const s = Math.floor(a / t);
|
|
1668
|
+
return n[s] || (n[s] = []), n[s].push(l), n;
|
|
1669
|
+
}, []), rl = (e) => e.reduce((t, n) => n.children && n.children.length > 0 ? t + rl(n.children) : t + 1, 0), lt = (e, t) => {
|
|
1670
|
+
var l;
|
|
1671
|
+
let n = [];
|
|
1672
|
+
return (l = et(e, rl(t == null ? void 0 : t[0]) - 1)) == null || l.forEach((a) => {
|
|
1673
|
+
let s = [];
|
|
1674
|
+
a.forEach((p) => {
|
|
1675
|
+
var y;
|
|
1676
|
+
Array.isArray(p.contents) ? (y = p.contents) == null || y.forEach((m) => {
|
|
1677
|
+
s.push(m);
|
|
1678
|
+
}) : s.push(p.contents);
|
|
1679
|
+
}), n.push(s);
|
|
1680
|
+
}), [n];
|
|
1681
|
+
}, nt = ["方法体", "输入", "输出"], Ke = J(1), Te = (e) => {
|
|
1682
|
+
let t;
|
|
1683
|
+
e.replaceAll(" ", `\r
|
|
1684
|
+
`).includes(`\r
|
|
1685
|
+
`) ? t = e.replaceAll(" ", `\r
|
|
1686
|
+
`).split(`\r
|
|
1687
|
+
`).filter((a) => a.trim() !== "") : t = e.replaceAll(" ", `\r
|
|
1688
|
+
`).split(`
|
|
1689
|
+
`).filter((a) => a.trim() !== "");
|
|
1690
|
+
const n = [];
|
|
1691
|
+
let l = "";
|
|
1692
|
+
for (const a of t)
|
|
1693
|
+
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, ""));
|
|
1694
|
+
return n;
|
|
1695
|
+
}, tt = (e) => {
|
|
1696
|
+
const [t, n] = e.split(/=(.+)/), l = t.replace(/['"]/g, "").trim(), a = n.replace(/^['"]|['"]$/g, "");
|
|
1697
|
+
return { key: l, value: a };
|
|
1698
|
+
}, ve = (e) => {
|
|
1699
|
+
let t;
|
|
1700
|
+
e.includes(":") ? t = e.split(":").filter((a) => a.trim() !== "") : t = e.split(":").filter((a) => a.trim() !== "");
|
|
1701
|
+
const n = [];
|
|
1702
|
+
let l = "";
|
|
1703
|
+
for (const a of t)
|
|
1704
|
+
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, ""));
|
|
1705
|
+
return n;
|
|
1706
|
+
}, at = (e) => /^[\x00-\x7F]*$/.test(e), st = (e) => {
|
|
1707
|
+
var a;
|
|
1708
|
+
const t = e.map((s) => {
|
|
1709
|
+
var y, m;
|
|
1710
|
+
let p = (m = (y = s.key.split("(")) == null ? void 0 : y[1]) == null ? void 0 : m.trim();
|
|
1711
|
+
return p.slice(0, p.length - 1);
|
|
1712
|
+
}), n = t == null ? void 0 : t.map((s) => {
|
|
1713
|
+
var y;
|
|
1714
|
+
return (y = ve(s)) == null ? void 0 : y.map((m) => {
|
|
1715
|
+
var g;
|
|
1716
|
+
if (m.includes("{")) {
|
|
1717
|
+
let k = (g = m.split(":")) == null ? void 0 : g[0];
|
|
1718
|
+
m = k.slice(1, k.length);
|
|
1719
|
+
}
|
|
1720
|
+
return m;
|
|
1721
|
+
});
|
|
1722
|
+
}).filter((s) => s.length !== 0), l = (a = n == null ? void 0 : n.filter((s) => s.length !== 0)) == null ? void 0 : a.map((s) => {
|
|
1723
|
+
let p = "";
|
|
1724
|
+
return s.forEach((y) => {
|
|
1725
|
+
y.includes("{") || (p = p === "" ? p + u(y) : p + "/" + u(y));
|
|
1726
|
+
}), p;
|
|
1727
|
+
});
|
|
1728
|
+
return Ve([...new Set(l)]);
|
|
1729
|
+
}, ol = (e) => {
|
|
1730
|
+
var n, l;
|
|
1731
|
+
const t = (l = (n = e.split("(")) == null ? void 0 : n[1]) == null ? void 0 : l.trim();
|
|
1732
|
+
return t.slice(0, t.length - 1);
|
|
1733
|
+
}, rt = (e) => {
|
|
1734
|
+
var a;
|
|
1735
|
+
if (!e) return;
|
|
1736
|
+
const t = ol(e), n = (a = ve(t)) == null ? void 0 : a.map((s) => {
|
|
1737
|
+
var p;
|
|
1738
|
+
if (s.includes("{")) {
|
|
1739
|
+
let y = (p = s.split(":")) == null ? void 0 : p[0];
|
|
1740
|
+
s = y.slice(1, y.length);
|
|
1741
|
+
}
|
|
1742
|
+
return s;
|
|
1743
|
+
});
|
|
1744
|
+
let l = "";
|
|
1745
|
+
return n.forEach((s) => {
|
|
1746
|
+
s.includes("{") || (l = l === "" ? l + u(s) : l + "/" + u(s));
|
|
1747
|
+
}), l;
|
|
1748
|
+
}, ot = (e) => {
|
|
1749
|
+
const t = e.match(/\[(.*)\]/s);
|
|
1750
|
+
if (t) {
|
|
1751
|
+
const n = `[${t[1]}]`;
|
|
1752
|
+
try {
|
|
1753
|
+
const l = n.replace(/([^\[\],\s]+)/g, '"$1"');
|
|
1754
|
+
return JSON.parse(l);
|
|
1755
|
+
} catch (l) {
|
|
1756
|
+
console.error("解析失败:", l);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}, ct = (e) => {
|
|
1760
|
+
var s;
|
|
1761
|
+
if (!e) return;
|
|
1762
|
+
const t = ol(e);
|
|
1763
|
+
let n = [], l = [], a = [];
|
|
1764
|
+
return (s = ve(t)) == null || s.forEach((p) => {
|
|
1765
|
+
var y;
|
|
1766
|
+
p.includes("[") ? n.push(ot(p)) : p.includes("{") && (at((y = p.slice(1, p.length - 1).split(":")) == null ? void 0 : y[0]) ? a.push(JSON.parse(p.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : Q(p.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? l.push(JSON.parse(p.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : p.includes("$") || l.push(p.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
|
|
1767
|
+
}), [n, l, a];
|
|
1768
|
+
}, ut = (e) => {
|
|
1769
|
+
const t = [];
|
|
1770
|
+
let n = "";
|
|
1771
|
+
for (const l of e)
|
|
1772
|
+
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, ""));
|
|
1773
|
+
return t;
|
|
1774
|
+
}, pt = (e) => {
|
|
1775
|
+
const t = [], n = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, l = e.match(n);
|
|
1776
|
+
if (l) {
|
|
1777
|
+
const p = l[1] || l[3], y = l[2] || l[4];
|
|
1778
|
+
if (p && y) {
|
|
1779
|
+
const m = `${p}/${y}`;
|
|
1780
|
+
t.push(m);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
const a = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+)/i, s = e.match(a);
|
|
1784
|
+
return s && t.push(s[0].replace(/\)+$/, "")), t;
|
|
1785
|
+
}, it = (e) => {
|
|
1786
|
+
var p, y, m, g, k, A, $, O, C, P, d;
|
|
1787
|
+
let t = [], n = [], l = {}, a = e.trim(), s = [];
|
|
1788
|
+
if (a.trim().includes("输入") && a.trim().includes("输出")) {
|
|
1789
|
+
let o = [], f = e.trim();
|
|
1790
|
+
f = u(f).slice(1, u(f).length - 1);
|
|
1791
|
+
const i = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
|
|
1792
|
+
(O = f.match(i)) == null || O.forEach((r, c) => {
|
|
1793
|
+
var x;
|
|
1794
|
+
const h = r;
|
|
1795
|
+
let _ = [];
|
|
1796
|
+
(x = h.slice(1, h.length - 1).replace(":", "$:").split("$:")) == null || x.forEach((E) => {
|
|
1797
|
+
var T, j, N;
|
|
1798
|
+
if (nt.find((v) => E.includes(v)))
|
|
1799
|
+
if (!E.includes("=="))
|
|
1800
|
+
_.push({ key: "tableIndexColumn", contents: E.replaceAll("'", "") });
|
|
1801
|
+
else {
|
|
1802
|
+
let v = [];
|
|
1803
|
+
const D = E.replaceAll("'", "").split("==");
|
|
1804
|
+
v.push(D == null ? void 0 : D[0]), D != null && D[1].includes("[") ? v.push(D == null ? void 0 : D[1].trim().slice(1, (D == null ? void 0 : D[1].length) - 1).split(",")) : v.push([D == null ? void 0 : D[1]]), _.push({ key: "header", contents: [(j = (T = al([v])) == null ? void 0 : T[0]) == null ? void 0 : j[0]] });
|
|
1805
|
+
}
|
|
1806
|
+
else {
|
|
1807
|
+
let v = E.trim().replaceAll(",", ",").replaceAll("'", '"');
|
|
1808
|
+
if (c % 3 === 0)
|
|
1809
|
+
v.slice(1, v.length - 1).includes("[") ? o.push({
|
|
1810
|
+
key: "tableIndex",
|
|
1811
|
+
contents: [{ label: v }]
|
|
1812
|
+
}) : o.push({
|
|
1813
|
+
key: "tableIndex",
|
|
1814
|
+
contents: [{ label: v.slice(1, v.length - 1) }]
|
|
1815
|
+
});
|
|
1816
|
+
else if ((v == null ? void 0 : v[0]) === "{") {
|
|
1817
|
+
let D = [];
|
|
1818
|
+
const B = v.slice(1, v.length - 1).split(":");
|
|
1819
|
+
if (B.every((S) => Q(S.trim()))) {
|
|
1820
|
+
D.push({ key: "tableContentName", contents: "详情" });
|
|
1821
|
+
let S = [];
|
|
1822
|
+
B.forEach((b, F) => {
|
|
1823
|
+
if (F === 0) {
|
|
1824
|
+
const U = JSON.parse(b).map((G) => ({ label: G }));
|
|
1825
|
+
U.push({
|
|
1826
|
+
label: "操作"
|
|
1827
|
+
}), S.push({
|
|
1828
|
+
key: "header",
|
|
1829
|
+
contents: U
|
|
1830
|
+
});
|
|
1831
|
+
} else
|
|
1832
|
+
S.push({
|
|
1833
|
+
key: "tableContents",
|
|
1834
|
+
contents: JSON.parse(b)
|
|
1835
|
+
});
|
|
1836
|
+
}), S.push({
|
|
1837
|
+
key: "extraButton",
|
|
1838
|
+
contents: [{ label: "新增" }]
|
|
1839
|
+
}), S.push({
|
|
1840
|
+
key: "rowButton",
|
|
1841
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1842
|
+
}), D.push({
|
|
1843
|
+
comp: "Table",
|
|
1844
|
+
compData: S,
|
|
1845
|
+
name: ""
|
|
1846
|
+
}), o.push({
|
|
1847
|
+
key: "tableContents",
|
|
1848
|
+
contents: [D]
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
} else {
|
|
1852
|
+
let D = v;
|
|
1853
|
+
D.slice(1, D.length - 1).includes("[") || D.slice(1, D.length - 1).includes("{") ? Q(Ie(D.replace(/\s+/g, ""))) && ((N = JSON.parse(Ie(D.replace(/\s+/g, "")))) == null || N.map((B) => {
|
|
1854
|
+
if (Array.isArray(B == null ? void 0 : B[0])) {
|
|
1855
|
+
const S = [];
|
|
1856
|
+
S.push({ key: "tableContentName", contents: "详情" });
|
|
1857
|
+
let b = [];
|
|
1858
|
+
B.forEach((F) => {
|
|
1859
|
+
F.forEach((U) => {
|
|
1860
|
+
var G, M;
|
|
1861
|
+
Ke.value++, b.push({
|
|
1862
|
+
id: Ke.value,
|
|
1863
|
+
key: (G = Object.keys(U)) == null ? void 0 : G[0],
|
|
1864
|
+
value: (M = Object.values(U)) == null ? void 0 : M[0],
|
|
1865
|
+
width: F.length
|
|
1866
|
+
});
|
|
1867
|
+
});
|
|
1868
|
+
}), S.push({
|
|
1869
|
+
comp: "Form",
|
|
1870
|
+
compData: [{
|
|
1871
|
+
key: "formFlex",
|
|
1872
|
+
contents: ""
|
|
1873
|
+
}, {
|
|
1874
|
+
key: "formContent",
|
|
1875
|
+
contents: b
|
|
1876
|
+
}],
|
|
1877
|
+
name: ""
|
|
1878
|
+
}), o.push({
|
|
1879
|
+
key: "tableContents",
|
|
1880
|
+
contents: [S]
|
|
1881
|
+
});
|
|
1882
|
+
} else
|
|
1883
|
+
o.push({
|
|
1884
|
+
key: "tableContents",
|
|
1885
|
+
contents: B == null ? void 0 : B[0]
|
|
1886
|
+
});
|
|
1887
|
+
})) : o.push({
|
|
1888
|
+
key: "tableContents",
|
|
1889
|
+
contents: D.trim().slice(1, D.length - 1)
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}), o.push(_ == null ? void 0 : _[0]);
|
|
1894
|
+
}), s.push({
|
|
1895
|
+
key: "tableIndex",
|
|
1896
|
+
contents: (C = o == null ? void 0 : o.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : C.map((r) => {
|
|
1897
|
+
var c;
|
|
1898
|
+
return (c = r.contents) == null ? void 0 : c[0];
|
|
1899
|
+
})
|
|
1900
|
+
}), s.push({
|
|
1901
|
+
key: "extraButton",
|
|
1902
|
+
contents: [{ label: "新增" }]
|
|
1903
|
+
}), s.push({
|
|
1904
|
+
key: "rowButton",
|
|
1905
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
1906
|
+
}), s.push({
|
|
1907
|
+
key: "tableIndexColumn",
|
|
1908
|
+
contents: (d = (P = o == null ? void 0 : o.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : P[0]) == null ? void 0 : d.contents
|
|
1909
|
+
}), s.push({
|
|
1910
|
+
key: "header",
|
|
1911
|
+
contents: He(o == null ? void 0 : o.filter((r) => (r == null ? void 0 : r.key) === "header"))
|
|
1912
|
+
}), s.push({
|
|
1913
|
+
key: "tableContents",
|
|
1914
|
+
contents: lt(o == null ? void 0 : o.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), He(o == null ? void 0 : o.filter((r) => (r == null ? void 0 : r.key) === "header")))
|
|
1915
|
+
});
|
|
1916
|
+
} else {
|
|
1917
|
+
const o = (p = a.trim().split(",$")) == null ? void 0 : p[0];
|
|
1918
|
+
o[0] === "[" ? a = o.slice(1, o.length - 1) : a.includes(",$") && (a = (y = a.trim().split(",$")) == null ? void 0 : y[0]);
|
|
1919
|
+
let f;
|
|
1920
|
+
if (a.includes("$")) {
|
|
1921
|
+
a = u(a), l.method = (g = (m = u(a).trim()) == null ? void 0 : m.slice(1, a.length).split("(")) == null ? void 0 : g[0];
|
|
1922
|
+
const i = pt(a.slice(1, a.length - 2));
|
|
1923
|
+
l.value = i;
|
|
1924
|
+
} else
|
|
1925
|
+
f = (A = (k = u(a).split("}")) == null ? void 0 : k.filter((i) => i !== "")) == null ? void 0 : A.map((i) => {
|
|
1926
|
+
let r = i;
|
|
1927
|
+
return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
|
|
1928
|
+
});
|
|
1929
|
+
($ = u(f)) == null || $.forEach((i) => {
|
|
1930
|
+
var r, c, h, _, x, E, T, j, N, v;
|
|
1931
|
+
if (i.includes("==")) {
|
|
1932
|
+
const D = (T = i == null ? void 0 : i.split(":")) == null ? void 0 : T[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), B = (j = i == null ? void 0 : i.split(":")) == null ? void 0 : j[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
|
|
1933
|
+
if (Q(B.trim()) ? n.push(JSON.parse(B.trim())) : n.push(JSON.parse(B.replaceAll("'", '"').trim())), D[0] !== "[") {
|
|
1934
|
+
let S = [];
|
|
1935
|
+
Q("[" + ie(D) + "]") ? S.push(JSON.parse("[" + ie(D) + "]")) : Q("[" + ie(D).replaceAll("==", ",") + "]") && S.push(JSON.parse("[" + ie(D).replaceAll("==", ",") + "]"));
|
|
1936
|
+
const b = u(S);
|
|
1937
|
+
b.push(["操作"]), t.push(b);
|
|
1938
|
+
} else {
|
|
1939
|
+
const S = (N = D.slice(1, D.length - 1).replaceAll(",", ",|")) == null ? void 0 : N.split("|"), b = (v = ut(S)) == null ? void 0 : v.map((G) => ((G == null ? void 0 : G[G.length - 1]) === "," && (G = G.slice(0, G.length - 1)), G));
|
|
1940
|
+
let F = [];
|
|
1941
|
+
b == null || b.forEach((G) => {
|
|
1942
|
+
var X, Z, Y, z;
|
|
1943
|
+
let M = [];
|
|
1944
|
+
M.push((X = G.split("==")) == null ? void 0 : X[0].trim().replace(/^"|"$/g, "")), ((Z = G.split("==")) == null ? void 0 : Z[1].trim()[0]) === "[" ? M.push(JSON.parse((Y = G.split("==")) == null ? void 0 : Y[1].trim())) : M.push([JSON.parse((z = G.split("==")) == null ? void 0 : z[1].trim())]), F.push(M);
|
|
1945
|
+
});
|
|
1946
|
+
const U = u(F);
|
|
1947
|
+
U.push(["操作"]), t.push(U);
|
|
1948
|
+
}
|
|
1949
|
+
} else {
|
|
1950
|
+
if (Q((r = i == null ? void 0 : i.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
|
|
1951
|
+
let D = JSON.parse((c = i == null ? void 0 : i.split(":")) == null ? void 0 : c[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
|
|
1952
|
+
Array.isArray(D) || (D = [D]), D.push("操作"), t.push(D);
|
|
1953
|
+
}
|
|
1954
|
+
Q((h = i == null ? void 0 : i.split(":")) == null ? void 0 : h[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"')) ? n.push(JSON.parse((_ = i == null ? void 0 : i.split(":")) == null ? void 0 : _[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : Q((x = i == null ? void 0 : i.split(":")) == null ? void 0 : x[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')) && n.push(JSON.parse((E = i == null ? void 0 : i.split(":")) == null ? void 0 : E[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1958
|
+
return [t, n, s, l];
|
|
1959
|
+
}, ft = (e) => {
|
|
1960
|
+
const t = [], n = rt(e == null ? void 0 : e.key), l = ct(e == null ? void 0 : e.key), a = it(e == null ? void 0 : e.value), s = l == null ? void 0 : l[0], p = l == null ? void 0 : l[1], y = l == null ? void 0 : l[2], m = a == null ? void 0 : a[0], g = a == null ? void 0 : a[1], k = a == null ? void 0 : a[2], A = a == null ? void 0 : a[3];
|
|
1961
|
+
return n && t.push({
|
|
1962
|
+
key: "contentPath",
|
|
1963
|
+
value: n
|
|
1964
|
+
}), (s == null ? void 0 : s.length) > 0 && t.push({
|
|
1965
|
+
key: "tableIndex",
|
|
1966
|
+
value: s
|
|
1967
|
+
}), A && t.push({
|
|
1968
|
+
key: "extraButton",
|
|
1969
|
+
value: A
|
|
1970
|
+
}), (p == null ? void 0 : p.length) > 0 && t.push({
|
|
1971
|
+
key: "form",
|
|
1972
|
+
value: p
|
|
1973
|
+
}), (y == null ? void 0 : y.length) > 0 && t.push({
|
|
1974
|
+
key: "extra",
|
|
1975
|
+
value: y
|
|
1976
|
+
}), (k == null ? void 0 : k.length) > 0 && t.push({
|
|
1977
|
+
comp: "Table",
|
|
1978
|
+
compData: k,
|
|
1979
|
+
name: ""
|
|
1980
|
+
}), (m == null ? void 0 : m.length) > 0 && t.push({
|
|
1981
|
+
key: "tableColumns",
|
|
1982
|
+
value: m
|
|
1983
|
+
}), (g == null ? void 0 : g.length) > 0 && t.push({
|
|
1984
|
+
key: "tableContents",
|
|
1985
|
+
value: g
|
|
1986
|
+
}), t;
|
|
1987
|
+
}, dt = (e, t) => {
|
|
1988
|
+
const n = t.split("/");
|
|
1989
|
+
let l = [];
|
|
1990
|
+
return e == null || e.forEach((a) => {
|
|
1991
|
+
var y, m, g, k, A, $, O, C, P;
|
|
1992
|
+
const s = [], p = (m = (y = a.find((d) => d.key === "tableIndex")) == null ? void 0 : y.value) == null ? void 0 : m[0];
|
|
1993
|
+
if (p && !p.some((d) => Array.isArray(d))) {
|
|
1994
|
+
const d = (k = (g = a.find((o) => o.key === "tableColumns")) == null ? void 0 : g.value) == null ? void 0 : k[0];
|
|
1995
|
+
s.push({
|
|
1996
|
+
key: "tableIndexColumn",
|
|
1997
|
+
contents: n[n.length - 1]
|
|
1998
|
+
}), s.push({
|
|
1999
|
+
key: "tableIndex",
|
|
2000
|
+
contents: p == null ? void 0 : p.map((o) => ({ label: o }))
|
|
2001
|
+
}), s.push({
|
|
2002
|
+
key: "extraButton",
|
|
2003
|
+
contents: [{ label: "新增" }]
|
|
2004
|
+
}), s.push({
|
|
2005
|
+
key: "rowButton",
|
|
2006
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
2007
|
+
}), Array.isArray(d) && d.some((o) => Array.isArray(o)) ? s.push({
|
|
2008
|
+
key: "header",
|
|
2009
|
+
contents: al(d)
|
|
2010
|
+
}) : s.push({
|
|
2011
|
+
key: "header",
|
|
2012
|
+
contents: Array.isArray(d) ? d == null ? void 0 : d.map((o) => ({ label: o })) : [d].map((o) => ({ label: o }))
|
|
2013
|
+
}), s.push({
|
|
2014
|
+
key: "tableContents",
|
|
2015
|
+
contents: Array.isArray(d) ? ($ = (A = a.find((o) => o.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : $[0] : (P = (C = (O = a.find((o) => o.key === "tableContents")) == null ? void 0 : O.value) == null ? void 0 : C[0]) == null ? void 0 : P.map((o) => [o])
|
|
2016
|
+
}), l.push({
|
|
2017
|
+
comp: "Table",
|
|
2018
|
+
name: "",
|
|
2019
|
+
compData: s
|
|
2020
|
+
});
|
|
2021
|
+
} else p ? l.push({
|
|
2022
|
+
comp: "Table",
|
|
2023
|
+
name: "",
|
|
2024
|
+
compData: Yn(a, n[n.length - 1])
|
|
2025
|
+
}) : a.some((d) => d.key === "extra") ? l.push({
|
|
2026
|
+
comp: "calculator",
|
|
2027
|
+
name: "",
|
|
2028
|
+
compData: We(a)
|
|
2029
|
+
}) : l.push(We(a));
|
|
2030
|
+
}), l;
|
|
2031
|
+
}, yt = (e, t) => {
|
|
2032
|
+
var a, s;
|
|
2033
|
+
const n = e.map((p) => p.filter((y) => y.key !== "contentPath"));
|
|
2034
|
+
return {
|
|
2035
|
+
comp: "Group",
|
|
2036
|
+
compData: [{
|
|
2037
|
+
contents: dt(n, t),
|
|
2038
|
+
key: "groupContents"
|
|
2039
|
+
}],
|
|
2040
|
+
name: (s = (a = e[0]) == null ? void 0 : a.find((p) => p.key === "contentPath")) == null ? void 0 : s.value
|
|
2041
|
+
};
|
|
2042
|
+
}, ht = (e) => {
|
|
2043
|
+
var a;
|
|
2044
|
+
const t = [], n = u(e).map((s) => {
|
|
2045
|
+
var p;
|
|
2046
|
+
if (s != null && s.find((y) => (y == null ? void 0 : y.key) === "contentPath"))
|
|
2047
|
+
return (p = s == null ? void 0 : s.find((y) => (y == null ? void 0 : y.key) === "contentPath")) == null ? void 0 : p.value;
|
|
2048
|
+
}).filter((s) => s !== ""), l = [...new Set(n)];
|
|
2049
|
+
return (a = l == null ? void 0 : l.filter((s) => s)) == null || a.forEach((s) => {
|
|
2050
|
+
var p;
|
|
2051
|
+
t.push(yt((p = u(e)) == null ? void 0 : p.filter((y) => y.find((m) => m.key === "contentPath" && m.value === s)), s));
|
|
2052
|
+
}), t;
|
|
2053
|
+
}, mt = (e) => {
|
|
2054
|
+
let t = [];
|
|
2055
|
+
t.push({
|
|
2056
|
+
comp: "Menu",
|
|
2057
|
+
compData: [{
|
|
2058
|
+
contents: st(u(e)),
|
|
2059
|
+
key: "menuContents"
|
|
2060
|
+
}],
|
|
2061
|
+
name: ""
|
|
2062
|
+
});
|
|
2063
|
+
const n = e.map((l) => ft(l)).filter((l) => l.length !== 0);
|
|
2064
|
+
return t = [...t, ...ht(n)], t;
|
|
2065
|
+
}, Jt = (e) => {
|
|
2066
|
+
var a, s, p, y, m;
|
|
2067
|
+
const t = (p = Te((s = (a = u(e)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : s.replace(")", ")"))) == null ? void 0 : p.filter((g) => g !== ""), n = (m = (y = u(t)) == null ? void 0 : y.filter((g) => !g.includes("/*"))) == null ? void 0 : m.map((g) => tt(g));
|
|
2068
|
+
return mt(n);
|
|
2069
|
+
}, fe = J(0), Ce = J(0), bt = (e) => {
|
|
2070
|
+
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 = {};
|
|
2071
|
+
let a;
|
|
2072
|
+
for (; (a = n.exec(t)) !== null; ) {
|
|
2073
|
+
const s = a[1];
|
|
2074
|
+
let p = a[2].trim();
|
|
2075
|
+
(p.match(/\[/g) || []).length !== (p.match(/\]/g) || []).length && (p = p == null ? void 0 : p.replace(/]$/, "")), l[s] ? (l[s + Ce.value] && Ce.value++, l[s + Ce.value] = s + "=" + p) : l[s] = s + "=" + p;
|
|
2076
|
+
}
|
|
2077
|
+
return l;
|
|
2078
|
+
}, cl = (e) => {
|
|
2079
|
+
const [t, n] = e.split("=").map((s) => s.trim()), l = t.replace(/['"]/g, ""), a = n.replace(/^['"]|['"]$/g, "");
|
|
2080
|
+
return { key: l, value: a };
|
|
2081
|
+
}, gt = (e) => {
|
|
2082
|
+
var p;
|
|
2083
|
+
let t = [];
|
|
2084
|
+
const [n, l] = e.split(/=(.+)/), a = n.replace(/['"]/g, "").trim(), s = l.replace(/^['"]|['"]$/g, "");
|
|
2085
|
+
return (p = Object.values(bt(s))) == null || p.forEach((y) => {
|
|
2086
|
+
t.push(cl(y));
|
|
2087
|
+
}), { key: a, value: t };
|
|
2088
|
+
}, he = (e) => {
|
|
2089
|
+
try {
|
|
2090
|
+
return JSON.parse(e), !0;
|
|
2091
|
+
} catch {
|
|
2092
|
+
return !1;
|
|
2093
|
+
}
|
|
2094
|
+
}, ul = (e) => {
|
|
2095
|
+
try {
|
|
2096
|
+
const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
2097
|
+
if (u(t).split("{").length - 1 > 1) {
|
|
2098
|
+
let n = u(t).replace(/^\{(.*)\}$/, "[$1]");
|
|
2099
|
+
if (he(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), he(n)) {
|
|
2100
|
+
const l = JSON.parse(n);
|
|
2101
|
+
let a = [];
|
|
2102
|
+
return l == null || l.forEach((s) => {
|
|
2103
|
+
var p;
|
|
2104
|
+
(p = Object.entries(u(s))) == null || p.forEach((y) => {
|
|
2105
|
+
fe.value++, a.push({
|
|
2106
|
+
id: fe.value,
|
|
2107
|
+
key: (y == null ? void 0 : y[0]) ?? "",
|
|
2108
|
+
value: (y == null ? void 0 : y[1]) === "" ? "" : y == null ? void 0 : y[1],
|
|
2109
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2110
|
+
width: Object.keys(u(s)).length
|
|
2111
|
+
});
|
|
2112
|
+
});
|
|
2113
|
+
}), a;
|
|
2114
|
+
} else
|
|
2115
|
+
return console.error("转换类型不正确:"), [];
|
|
2116
|
+
} else if (he(t)) {
|
|
2117
|
+
const n = JSON.parse(t);
|
|
2118
|
+
return Object.entries(n).map(([l, a]) => (fe.value++, {
|
|
2119
|
+
id: fe.value,
|
|
2120
|
+
key: l,
|
|
2121
|
+
value: a === "" ? "" : a,
|
|
2122
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
2123
|
+
width: 1
|
|
2124
|
+
}));
|
|
2125
|
+
} else
|
|
2126
|
+
return t;
|
|
2127
|
+
} catch (t) {
|
|
2128
|
+
return console.error("转换失败:", t), [];
|
|
2129
|
+
}
|
|
2130
|
+
}, kt = (e, t) => {
|
|
2131
|
+
try {
|
|
2132
|
+
if (R != null && R.find((n) => (n == null ? void 0 : n.key) === t))
|
|
2133
|
+
return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
|
|
2134
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2135
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2136
|
+
return JSON.parse(n);
|
|
2137
|
+
} else {
|
|
2138
|
+
const n = u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
2139
|
+
if (he(n)) {
|
|
2140
|
+
const l = JSON.parse(n);
|
|
2141
|
+
return Array.isArray(l) ? l.map((a) => ({ label: a })) : l;
|
|
2142
|
+
} else
|
|
2143
|
+
return ul(u(e));
|
|
2144
|
+
}
|
|
2145
|
+
} catch (n) {
|
|
2146
|
+
return console.error("解析失败:", n), e;
|
|
2147
|
+
}
|
|
2148
|
+
}, Ct = (e) => ({ [e == null ? void 0 : e.key]: kt(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), At = (e) => {
|
|
2149
|
+
try {
|
|
2150
|
+
if (u(e).split("[").length - 1 > 1) {
|
|
2151
|
+
const t = u(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
2152
|
+
return JSON.parse(t);
|
|
2153
|
+
} else
|
|
2154
|
+
return JSON.parse(u(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
2155
|
+
} catch (t) {
|
|
2156
|
+
return console.error("解析失败:", t), e;
|
|
2157
|
+
}
|
|
2158
|
+
}, pl = (e) => {
|
|
2159
|
+
var t, n, l, a, s, p;
|
|
2160
|
+
try {
|
|
2161
|
+
const y = Te((n = (t = u(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), m = (l = u(y)) == null ? void 0 : l.map((A) => {
|
|
2162
|
+
var O, C;
|
|
2163
|
+
let $ = (C = (O = u(A)) == null ? void 0 : O.split("=")) == null ? void 0 : C[0];
|
|
2164
|
+
return $ != null && $.includes("GroupContents") ? gt(A) : cl(A);
|
|
2165
|
+
}), g = [];
|
|
2166
|
+
(a = u(m)) == null || a.forEach((A) => {
|
|
2167
|
+
var $, O, C, P, d;
|
|
2168
|
+
R != null && R.find((o) => {
|
|
2169
|
+
var f, i;
|
|
2170
|
+
return ((f = o == null ? void 0 : o.key) == null ? void 0 : f.toUpperCase()) === ((i = A == null ? void 0 : A.key) == null ? void 0 : i.toUpperCase());
|
|
2171
|
+
}) ? g.push({
|
|
2172
|
+
comp: (($ = R == null ? void 0 : R.find((o) => {
|
|
2173
|
+
var f, i;
|
|
2174
|
+
return ((f = o == null ? void 0 : o.key) == null ? void 0 : f.toUpperCase()) === ((i = A == null ? void 0 : A.key) == null ? void 0 : i.toUpperCase());
|
|
2175
|
+
})) == null ? void 0 : $.value) ?? "",
|
|
2176
|
+
name: (O = A == null ? void 0 : A.value) == null ? void 0 : O.replace(/[’]|[‘]|[']/g, ""),
|
|
2177
|
+
compData: []
|
|
2178
|
+
}) : w != null && w.find((o) => {
|
|
2179
|
+
var f, i;
|
|
2180
|
+
return ((f = o == null ? void 0 : o.key) == null ? void 0 : f.toUpperCase()) === ((i = A == null ? void 0 : A.key) == null ? void 0 : i.toUpperCase());
|
|
2181
|
+
}) && ((g == null ? void 0 : g.length) === 0 && (C = A.key) != null && C.includes("Menus") && g.push({
|
|
2182
|
+
comp: "Menu",
|
|
2183
|
+
name: "",
|
|
2184
|
+
compData: []
|
|
2185
|
+
}), (P = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && P.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
2186
|
+
key: (d = w == null ? void 0 : w.find((o) => {
|
|
2187
|
+
var f, i;
|
|
2188
|
+
return ((f = o == null ? void 0 : o.key) == null ? void 0 : f.toUpperCase()) === ((i = A == null ? void 0 : A.key) == null ? void 0 : i.toUpperCase());
|
|
2189
|
+
})) == null ? void 0 : d.value,
|
|
2190
|
+
contents: A == null ? void 0 : A.value
|
|
2191
|
+
}));
|
|
2192
|
+
}), console.log("newContents", g);
|
|
2193
|
+
let k = (s = u(g)) == null ? void 0 : s.map((A) => {
|
|
2194
|
+
var $;
|
|
2195
|
+
return A != null && A.compData && (A.compData = ($ = A == null ? void 0 : A.compData) == null ? void 0 : $.map((O) => {
|
|
2196
|
+
var C, P, d, o, f, i, r, c, h, _, x;
|
|
2197
|
+
if ((O == null ? void 0 : O.key) === "formFlex")
|
|
2198
|
+
O.contents = ((P = (C = O.contents) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : P.toUpperCase()) !== "Vertical".toUpperCase();
|
|
2199
|
+
else if ((O == null ? void 0 : O.key) === "groupContents")
|
|
2200
|
+
O.contents = (d = u(O.contents)) == null ? void 0 : d.map((E) => Ct(u(E)));
|
|
2201
|
+
else if (((f = (o = O.contents) == null ? void 0 : o.trim()) != null && f.startsWith("[") || (r = (i = O.contents) == null ? void 0 : i.trim()) != null && r.startsWith("【")) && ((h = (c = O.contents) == null ? void 0 : c.trim()) != null && h.endsWith("]") || (x = (_ = O.contents) == null ? void 0 : _.trim()) != null && x.endsWith("】")))
|
|
2202
|
+
O.contents = At(u(O.contents));
|
|
2203
|
+
else {
|
|
2204
|
+
if (!O.contents) return;
|
|
2205
|
+
O.contents = ul(u(O.contents));
|
|
2206
|
+
}
|
|
2207
|
+
return O;
|
|
2208
|
+
})), A;
|
|
2209
|
+
});
|
|
2210
|
+
return k = (p = u(k)) == null ? void 0 : p.map((A) => {
|
|
2211
|
+
var $;
|
|
2212
|
+
return (A == null ? void 0 : A.comp) === "Group" && (A.compData = ($ = A.compData) == null ? void 0 : $.map((O) => {
|
|
2213
|
+
var P;
|
|
2214
|
+
let C = [];
|
|
2215
|
+
return (P = O.contents) == null || P.forEach((d) => {
|
|
2216
|
+
var o, f, i, r, c, h, _, x, E, T, j, N;
|
|
2217
|
+
if (R != null && R.find((v) => {
|
|
2218
|
+
var D, B, S;
|
|
2219
|
+
return ((D = v == null ? void 0 : v.key) == null ? void 0 : D.toUpperCase()) === ((S = (B = Object.keys(d)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2220
|
+
}))
|
|
2221
|
+
C.push({
|
|
2222
|
+
comp: (o = R == null ? void 0 : R.find((v) => {
|
|
2223
|
+
var D, B, S;
|
|
2224
|
+
return ((D = v == null ? void 0 : v.key) == null ? void 0 : D.toUpperCase()) === ((S = (B = Object.keys(d)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2225
|
+
})) == null ? void 0 : o.value,
|
|
2226
|
+
name: (i = (f = Object.values(d)) == null ? void 0 : f[0]) == null ? void 0 : i.replace(/[’]|[‘]|[']/g, ""),
|
|
2227
|
+
compData: []
|
|
2228
|
+
});
|
|
2229
|
+
else if (w != null && w.find((v) => {
|
|
2230
|
+
var D, B, S;
|
|
2231
|
+
return ((D = v == null ? void 0 : v.key) == null ? void 0 : D.toUpperCase()) === ((S = (B = Object.keys(d)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2232
|
+
})) {
|
|
2233
|
+
if ((C == null ? void 0 : C.length) === 0) return;
|
|
2234
|
+
(r = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && r.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
|
|
2235
|
+
key: (c = w == null ? void 0 : w.find((v) => {
|
|
2236
|
+
var D, B, S;
|
|
2237
|
+
return ((D = v == null ? void 0 : v.key) == null ? void 0 : D.toUpperCase()) === ((S = (B = Object.keys(d)) == null ? void 0 : B[0]) == null ? void 0 : S.toUpperCase());
|
|
2238
|
+
})) == null ? void 0 : c.value,
|
|
2239
|
+
contents: (h = Object.values(d)) == null ? void 0 : h[0]
|
|
2240
|
+
});
|
|
2241
|
+
} else if ((x = (_ = Object.keys(d)) == null ? void 0 : _[0]) != null && x.includes("$")) {
|
|
2242
|
+
const v = (T = (E = Object.keys(u(d))) == null ? void 0 : E[0]) == null ? void 0 : T.split("$");
|
|
2243
|
+
C[(C == null ? void 0 : C.length) - 1].compData.push({
|
|
2244
|
+
key: (j = w == null ? void 0 : w.find((D) => {
|
|
2245
|
+
var B, S;
|
|
2246
|
+
return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = v == null ? void 0 : v[0]) == null ? void 0 : S.toUpperCase());
|
|
2247
|
+
})) == null ? void 0 : j.value,
|
|
2248
|
+
contents: (N = Object.values(d)) == null ? void 0 : N[0],
|
|
2249
|
+
selectLabel: v == null ? void 0 : v[1]
|
|
2250
|
+
});
|
|
2251
|
+
}
|
|
2252
|
+
return d;
|
|
2253
|
+
}), O.contents = C, O;
|
|
2254
|
+
})), A;
|
|
2255
|
+
}), k;
|
|
2256
|
+
} catch {
|
|
2257
|
+
return !1;
|
|
2258
|
+
}
|
|
2259
|
+
}, wt = (e) => pl(e), Rt = (e) => !!pl(e), $t = $l(_e), { itemData: Lt } = qe($t), _t = Al(_e), { systemKey: Gt, activeMenuPath: Mt } = qe(_t), ae = J(0), It = (e) => e.reduce((n, l) => {
|
|
2260
|
+
var s, p;
|
|
2261
|
+
const a = Object.values(n);
|
|
2262
|
+
return (((s = Object.keys(n)) == null ? void 0 : s.length) === 0 || a[a.length - 1].length >= (l == null ? void 0 : l.width)) && (n[ae.value] = [], ae.value++), n[ae.value - 1].push(l), ((p = Object.keys(n)) == null ? void 0 : p.length) === (l == null ? void 0 : l.width) && (n[ae.value] = [], ae.value++), n;
|
|
2263
|
+
}, {});
|
|
2264
|
+
export {
|
|
2265
|
+
It as a,
|
|
2266
|
+
Ft as b,
|
|
2267
|
+
Jt as c,
|
|
2268
|
+
Ut as d,
|
|
2269
|
+
wt as e,
|
|
2270
|
+
Fn as g,
|
|
2271
|
+
Rt as i,
|
|
2272
|
+
jt as s
|
|
2273
|
+
};
|