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