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