ss-component-new 1.1.254 → 1.1.255
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-D0ksMxBm.js +4732 -0
- package/dist/array-FnDBAqr_.cjs +7 -0
- package/dist/{cloneDeep-CCTIOi71.cjs → cloneDeep-C-pGUQKf.cjs} +1 -1
- package/dist/{cloneDeep-C2BfVSk2.js → cloneDeep-Dyt41_L-.js} +1 -1
- package/dist/index-1L58FxXE.cjs +1 -0
- package/dist/{index-D7Q10Cf6.js → index-4QOp-GFW.js} +7 -7
- package/dist/{index-2IxpMtEC.cjs → index-4zv-tITd.cjs} +1 -1
- package/dist/{index-Df80axHS.cjs → index-AmZEXNoQ.cjs} +1 -1
- package/dist/{index-CfboEWD8.js → index-BCY2xvgA.js} +1 -1
- package/dist/{index-DgMhyJyt.cjs → index-BHBz_g9I.cjs} +1 -1
- package/dist/{index-DSvBBQuS.js → index-BJGqjruN.js} +1 -1
- package/dist/index-BKvrNIq2.js +4199 -0
- package/dist/index-BLMAsu2L.cjs +1 -0
- package/dist/{index-DbuaMPQ8.js → index-BPhMb7pK.js} +4 -4
- package/dist/{index-ZJhNp_ic.js → index-BT1bqIxy.js} +4 -4
- package/dist/{index-D60rB1yM.js → index-BZCF6V6l.js} +30 -30
- package/dist/index-Bb-62WPF.cjs +1 -0
- package/dist/{index-DgqqTBP8.cjs → index-Bb_UeGKJ.cjs} +1 -1
- package/dist/index-BeYOMEs2.js +674 -0
- package/dist/index-BipikeGR.js +199 -0
- package/dist/index-BjjXJSlm.cjs +1 -0
- package/dist/index-BqgOQWUB.js +300 -0
- package/dist/{index-qHv5uE0r.js → index-Bs2mNVJb.js} +3 -3
- package/dist/{index-RTtdkTT4.js → index-Bvff3Rjc.js} +5 -5
- package/dist/{index-inDdv1bq.cjs → index-ByA8EBvo.cjs} +1 -1
- package/dist/{index-DNDyshI4.js → index-C9zbvQ_u.js} +23 -24
- package/dist/{index-BtrInOkn.js → index-CJz4osvs.js} +6 -6
- package/dist/{index-BuhOzhkS.js → index-CNw33JR-.js} +32 -33
- package/dist/{index-DYsPCw2I.cjs → index-CXnqXm6c.cjs} +1 -1
- package/dist/{index-CnLLjZHN.js → index-CgreBJdF.js} +20 -21
- package/dist/index-ChBbyPw-.cjs +1 -0
- package/dist/{index-BTszhcxL.cjs → index-ChC7cQXw.cjs} +1 -1
- package/dist/{index-D76VI2D8.cjs → index-ChLhaUgK.cjs} +173 -173
- package/dist/{index-BguXioNR.cjs → index-D2mqkg4c.cjs} +1 -1
- package/dist/{index-C9T7S-GJ.cjs → index-D2pc-BzQ.cjs} +1 -1
- package/dist/{index-Bq0RFlfn.js → index-D5Bz4nyQ.js} +1 -1
- package/dist/index-DALSlEkV.cjs +1 -0
- package/dist/{index-D-BVcCFi.js → index-DFaF-8_G.js} +9 -9
- package/dist/index-DRIDbmGM.cjs +1 -0
- package/dist/{index-gbXtE5pf.js → index-DV6L8VsR.js} +5 -5
- package/dist/{index-B8fqJdK-.js → index-DVg2yzki.js} +1 -1
- package/dist/{index-Dlsa7Ecu.cjs → index-DVpKjSNf.cjs} +1 -1
- package/dist/{index-C_QsXP3i.js → index-DY1Iv1Nz.js} +8 -8
- package/dist/{index-C8hMS2Pa.js → index-D_zly77U.js} +1598 -1651
- package/dist/index-DeUj3yRd.cjs +9 -0
- package/dist/{index-n4eQ2Ni1.js → index-DmOEedex.js} +12 -13
- package/dist/{index-P0Dt5Xj5.cjs → index-DokJCYVc.cjs} +1 -1
- package/dist/{index-Ddr-MraN.cjs → index-DsP7FB21.cjs} +1 -1
- package/dist/index-Dxbc5WoF.cjs +1 -0
- package/dist/index-HW8r5PRa.cjs +1 -0
- package/dist/{index-BsqMj_d6.cjs → index-Hiw-v6tJ.cjs} +1 -1
- package/dist/index-JN1a_LH1.cjs +1 -0
- package/dist/{index-CKbzESKQ.cjs → index-VEIBSb0L.cjs} +1 -1
- package/dist/{index-CcTAW3y-.js → index-XqdyrkBW.js} +7 -8
- package/dist/{index-B7X4YrTQ.js → index-ZO1MQu0A.js} +4 -4
- package/dist/{index-9ZWsl-8_.js → index-exmBUjmZ.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-hFv-AT4_.cjs → index.vue_vue_type_script_setup_true_lang-BJKLFe1B.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-ChgvD-CO.js → index.vue_vue_type_script_setup_true_lang-DKt1jWSZ.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-B3CNE9YB.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-B7wukF06.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-BpvISHMO.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-BJ_xZq3T.js} +6 -6
- package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-ByetdKK8.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-CUy9QkFH.js +908 -0
- package/dist/login-Bps4AQ46.cjs +1 -0
- package/dist/{login-fr8WlB8t.js → login-l8Wv_G2i.js} +6 -6
- package/dist/{main-DiMsGmpS.js → main-AjMVz5uU.js} +6 -6
- package/dist/{main-DSesWXgb.cjs → main-WNNH9wBa.cjs} +1 -1
- package/dist/menu-BEvMDEbJ.js +6783 -0
- package/dist/menu-Cj-UKXED.cjs +16 -0
- package/dist/{modelComp-DHs2PxCA.js → modelComp-CxFffZnZ.js} +1 -1
- package/dist/{modelComp-DvCBfsQJ.cjs → modelComp-CyktectM.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +16 -16
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/dist/array-B4GNG3Pe.js +0 -4782
- package/dist/array-D80-Sfvq.cjs +0 -7
- package/dist/index-BFRarJev.cjs +0 -9
- package/dist/index-BFzTZcNN.cjs +0 -1
- package/dist/index-BPz3IHyD.js +0 -2115
- package/dist/index-BQjBpvbE.js +0 -228
- package/dist/index-CFUXMBG-.cjs +0 -1
- package/dist/index-CbjqU6nq.cjs +0 -1
- package/dist/index-CdosZWJF.cjs +0 -1
- package/dist/index-CiMaz81G.cjs +0 -1
- package/dist/index-CtfGlAH0.cjs +0 -1
- package/dist/index-D1G6qEje.js +0 -668
- package/dist/index-D8ZhPz1q.cjs +0 -1
- package/dist/index-Db4-HdDJ.cjs +0 -1
- package/dist/index-DtKB2fyH.cjs +0 -1
- package/dist/index-FJqdQ_o0.cjs +0 -6
- package/dist/index-rUeYTZ80.js +0 -3762
- package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-B4_oouTA.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-DAF4pYyG.js +0 -896
- package/dist/login-D1d96MIe.cjs +0 -1
- package/dist/menu-C6rqOvt-.js +0 -4855
- package/dist/menu-ClKjI1j6.cjs +0 -11
|
@@ -0,0 +1,4732 @@
|
|
|
1
|
+
import { u as aa, g as na, m as sa, s as oa, I as Ue } from "./index-D_zly77U.js";
|
|
2
|
+
import { ref as U, watch as we, createElementBlock as z, openBlock as P, createBlock as ve, resolveComponent as be, createVNode as V, Fragment as he, renderList as ge, createElementVNode as x, createCommentVNode as Se, toDisplayString as q, withCtx as ne, defineComponent as Me, reactive as ml, createTextVNode as ze, resolveDynamicComponent as Xe, computed as Bl, renderSlot as al, createSlots as ra, mergeProps as ta, unref as ia, normalizeStyle as ua, withModifiers as Ke } from "vue";
|
|
3
|
+
import { p as Ge } from "./index-BipikeGR.js";
|
|
4
|
+
import { F as Cl, s as Te, a as Ie, g as ca, b as Fl, c as xe, f as Ye, m as ul, d as qe, e as cl, h as pa, i as da, _ as fa } from "./index-BKvrNIq2.js";
|
|
5
|
+
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { c as u } from "./cloneDeep-Dyt41_L-.js";
|
|
7
|
+
import { e as Nl, s as Ze, E as Ve, g as _l, f as ha } from "./menu-BEvMDEbJ.js";
|
|
8
|
+
import { E as We } from "./index-Bs2mNVJb.js";
|
|
9
|
+
import { u as ma } from "./modelComp-CxFffZnZ.js";
|
|
10
|
+
import { s as va, a as ya } from "./index-BZCF6V6l.js";
|
|
11
|
+
import ba from "./index-CZtXRS3l.js";
|
|
12
|
+
const ga = (a) => a.match(/\((.*)\)/)[1], ka = { class: "form-content" }, Ca = {
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
formRules: Object,
|
|
16
|
+
itemData: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
childItemData: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: () => []
|
|
23
|
+
},
|
|
24
|
+
index: Number
|
|
25
|
+
},
|
|
26
|
+
emits: ["change", "contentChange"],
|
|
27
|
+
setup(a, { emit: s }) {
|
|
28
|
+
const l = a, e = s, n = U([]), r = U(!1), p = U([]), i = aa(Ge), _ = U(!1), v = U(), g = ($) => {
|
|
29
|
+
var d, y, o, c;
|
|
30
|
+
const I = (y = (d = u(l.itemData)) == null ? void 0 : d.find((t) => (t == null ? void 0 : t.key) === "formContent")) == null ? void 0 : y.contents, k = u($.content);
|
|
31
|
+
let N = {};
|
|
32
|
+
k && ((o = Object.values(k)) == null ? void 0 : o.length) > 0 && ((c = Object.values(k)) == null || c.forEach((t, b) => {
|
|
33
|
+
N[I[b].key] = t;
|
|
34
|
+
}));
|
|
35
|
+
const f = {
|
|
36
|
+
content: N,
|
|
37
|
+
index: l == null ? void 0 : l.index,
|
|
38
|
+
buttonName: $ == null ? void 0 : $.buttonName
|
|
39
|
+
};
|
|
40
|
+
e("change", f);
|
|
41
|
+
}, T = ($) => {
|
|
42
|
+
var N, f;
|
|
43
|
+
if (!$) return;
|
|
44
|
+
if (((N = Object.values(u($))) == null ? void 0 : N.length) > 0) {
|
|
45
|
+
const d = (f = Object.values(u($))) == null ? void 0 : f.map((o) => o);
|
|
46
|
+
let y = "";
|
|
47
|
+
d == null || d.forEach((o) => {
|
|
48
|
+
o !== "" && o !== void 0 && (y = y === "" ? o : y + "/" + o);
|
|
49
|
+
}), i.setSelectArray(d), i.setSelectString(y);
|
|
50
|
+
}
|
|
51
|
+
const I = u(l.itemData), k = I == null ? void 0 : I.map((d) => {
|
|
52
|
+
var y;
|
|
53
|
+
return (d == null ? void 0 : d.key) === "formContent" && ((y = d.contents) == null || y.map((o, c) => {
|
|
54
|
+
var t, b, S, j, R, se, oe, h, w, O, m, F, G, X, D, Y, M, te, me, _e;
|
|
55
|
+
return o.type = o != null && o.type ? o.type : (j = (S = (b = (t = o == null ? void 0 : o.key) == null ? void 0 : t.split("$")) == null ? void 0 : b[1]) == null ? void 0 : S.split("(")) != null && j[0] ? (se = (R = Cl) == null ? void 0 : R.find((J) => {
|
|
56
|
+
var ae, H, ue, $e;
|
|
57
|
+
return (J == null ? void 0 : J.key) === (($e = (ue = (H = (ae = o == null ? void 0 : o.key) == null ? void 0 : ae.split("$")) == null ? void 0 : H[1]) == null ? void 0 : ue.split("(")) == null ? void 0 : $e[0]);
|
|
58
|
+
})) == null ? void 0 : se.value : "Input", o.options = o != null && o.options ? o.options : ((w = (h = (oe = o == null ? void 0 : o.key) == null ? void 0 : oe.split("$")) == null ? void 0 : h[1]) == null ? void 0 : w.length) > 0 ? (G = (F = ga((m = (O = o == null ? void 0 : o.key) == null ? void 0 : O.split("$")) == null ? void 0 : m[1])) == null ? void 0 : F.split(",")) == null ? void 0 : G.map((J) => ({
|
|
59
|
+
label: J,
|
|
60
|
+
value: J
|
|
61
|
+
})) : [], (X = o == null ? void 0 : o.key) != null && X.includes("$") && (o.key = (Y = (D = o == null ? void 0 : o.key) == null ? void 0 : D.split("$")) == null ? void 0 : Y[0]), o.value = Array.isArray((M = Object.values($)) == null ? void 0 : M[c]) ? (me = (te = Object.values($)) == null ? void 0 : te[c]) == null ? void 0 : me[0] : (_e = Object.values($)) == null ? void 0 : _e[c], o;
|
|
62
|
+
})), d;
|
|
63
|
+
});
|
|
64
|
+
e("contentChange", {
|
|
65
|
+
contents: k,
|
|
66
|
+
index: l.index
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return we(
|
|
70
|
+
() => l.itemData,
|
|
71
|
+
async () => {
|
|
72
|
+
var d, y, o, c, t, b, S, j, R, se, oe;
|
|
73
|
+
const $ = (d = u(l.itemData)) == null ? void 0 : d.find((h) => (h == null ? void 0 : h.key) === "formContent"), I = (y = u(l.itemData)) == null ? void 0 : y.find((h) => (h == null ? void 0 : h.key) === "formButton"), k = (o = u(l.itemData)) == null ? void 0 : o.find((h) => (h == null ? void 0 : h.key) === "formFlex"), N = (c = u(l.itemData)) == null ? void 0 : c.find((h) => (h == null ? void 0 : h.key) === "formWrap"), f = (t = u(l.itemData)) == null ? void 0 : t.find((h) => (h == null ? void 0 : h.key) === "enableWrap");
|
|
74
|
+
if ((N == null ? void 0 : N.contents) === "纵向" ? r.value = !1 : r.value = !0, _.value = (f == null ? void 0 : f.contents) === void 0 ? !1 : f == null ? void 0 : f.contents, v.value = typeof (k == null ? void 0 : k.contents) != "boolean" ? !(!(k != null && k.contents) === "" || ((b = k == null ? void 0 : k.contents) == null ? void 0 : b.toUpperCase()) === "VERTICAL") : k == null ? void 0 : k.contents, ((S = $ == null ? void 0 : $.contents) == null ? void 0 : S.length) > 0 && Array.isArray($ == null ? void 0 : $.contents)) {
|
|
75
|
+
const h = [];
|
|
76
|
+
await ((j = $ == null ? void 0 : $.contents) == null ? void 0 : j.forEach(async (m, F) => {
|
|
77
|
+
var G, X, D, Y, M, te, me, _e, J, ae, H, ue;
|
|
78
|
+
if ((m == null ? void 0 : m.label) !== "") {
|
|
79
|
+
let $e = (m == null ? void 0 : m.label) ?? (m == null ? void 0 : m.key) ?? "", fe = (m == null ? void 0 : m.type) ?? "", ye = (m == null ? void 0 : m.options) ?? [];
|
|
80
|
+
if ((G = m == null ? void 0 : m.key) != null && G.includes("$") && ($e = (X = u(m == null ? void 0 : m.key).split("$")) == null ? void 0 : X[0], ((Y = (D = u(m == null ? void 0 : m.key).split("$")) == null ? void 0 : D[1]) == null ? void 0 : Y.length) > 0)) {
|
|
81
|
+
const [Pe, Le] = (te = (M = u(m == null ? void 0 : m.key).split("$")) == null ? void 0 : M[1]) == null ? void 0 : te.split(/[()]/);
|
|
82
|
+
fe = ((me = Cl.find((Ne) => (Ne == null ? void 0 : Ne.key) === Pe)) == null ? void 0 : me.value) ?? "", ((_e = Le == null ? void 0 : Le.split(",")) == null ? void 0 : _e.length) > 0 && (ye = (J = Le == null ? void 0 : Le.split(",")) == null ? void 0 : J.map((Ne) => ({
|
|
83
|
+
label: Ne,
|
|
84
|
+
value: Ne
|
|
85
|
+
})));
|
|
86
|
+
}
|
|
87
|
+
let ie = [];
|
|
88
|
+
m != null && m.contents && !Array.isArray(m == null ? void 0 : m.contents) && ((H = (ae = m == null ? void 0 : m.contents) == null ? void 0 : ae.split(",")) == null || H.map((Pe) => ({
|
|
89
|
+
label: Pe,
|
|
90
|
+
value: Pe
|
|
91
|
+
}))), h.push({
|
|
92
|
+
label: $e ?? "",
|
|
93
|
+
name: "t" + F,
|
|
94
|
+
type: fe === "" ? "Input" : fe,
|
|
95
|
+
value: m != null && m.originalContent && (m == null ? void 0 : m.originalContent) !== "" ? m.originalContent : m != null && m.value ? m.value : (ye == null ? void 0 : ye.length) > 0 ? (ue = ye == null ? void 0 : ye[0]) == null ? void 0 : ue.value : (m == null ? void 0 : m.value) ?? "",
|
|
96
|
+
id: (m == null ? void 0 : m.id) ?? F,
|
|
97
|
+
contents: (ie == null ? void 0 : ie.length) > 0 ? ie : ye ?? [],
|
|
98
|
+
width: (m == null ? void 0 : m.width) ?? 1,
|
|
99
|
+
config: m == null ? void 0 : m.config,
|
|
100
|
+
optionUrl: m
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}));
|
|
104
|
+
const w = (R = u(h)) == null ? void 0 : R.map((m) => m.value);
|
|
105
|
+
let O = "";
|
|
106
|
+
w == null || w.forEach((m) => {
|
|
107
|
+
m !== "" && m !== void 0 && (O = O === "" ? m : O + "/" + m);
|
|
108
|
+
}), i.setSelectArray(w), i.setSelectString(O), n.value = h;
|
|
109
|
+
} else
|
|
110
|
+
n.value = [];
|
|
111
|
+
if (((se = I == null ? void 0 : I.contents) == null ? void 0 : se.length) > 0) {
|
|
112
|
+
const h = [];
|
|
113
|
+
(oe = I == null ? void 0 : I.contents) == null || oe.forEach((w, O) => {
|
|
114
|
+
(w == null ? void 0 : w.label) !== "" && h.push({
|
|
115
|
+
label: (w == null ? void 0 : w.label) ?? "",
|
|
116
|
+
id: (w == null ? void 0 : w.id) ?? O,
|
|
117
|
+
type: (w == null ? void 0 : w.type) ?? "",
|
|
118
|
+
background: w == null ? void 0 : w.background
|
|
119
|
+
});
|
|
120
|
+
}), p.value = h;
|
|
121
|
+
} else
|
|
122
|
+
p.value = [];
|
|
123
|
+
},
|
|
124
|
+
{ deep: !0, immediate: !0 }
|
|
125
|
+
), ($, I) => (P(), z("div", ka, [
|
|
126
|
+
(P(), ve(Te, {
|
|
127
|
+
rowContents: n.value,
|
|
128
|
+
formRules: a.formRules,
|
|
129
|
+
buttonValue: p.value,
|
|
130
|
+
isRowFlex: v.value,
|
|
131
|
+
isEnableWrap: _.value,
|
|
132
|
+
onOnButtonClick: g,
|
|
133
|
+
onChange: T,
|
|
134
|
+
isButtonRow: r.value,
|
|
135
|
+
key: l.itemData
|
|
136
|
+
}, null, 8, ["rowContents", "formRules", "buttonValue", "isRowFlex", "isEnableWrap", "isButtonRow"]))
|
|
137
|
+
]));
|
|
138
|
+
}
|
|
139
|
+
}, $l = /* @__PURE__ */ Ce(Ca, [["__scopeId", "data-v-e939562f"]]), ol = U(0), Sl = (a) => {
|
|
140
|
+
var s;
|
|
141
|
+
return !a || (a == null ? void 0 : a.length) === 0 ? [] : (s = u(a)) == null ? void 0 : s.map((e) => (ol.value++, e = {
|
|
142
|
+
label: (e == null ? void 0 : e.label) ?? "",
|
|
143
|
+
prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
|
|
144
|
+
width: e != null && e.width ? parseInt(e.width) : "",
|
|
145
|
+
fixed: (e == null ? void 0 : e.fixed) ?? void 0,
|
|
146
|
+
sortable: (e == null ? void 0 : e.sortable) ?? !1,
|
|
147
|
+
align: (e == null ? void 0 : e.align) ?? "center",
|
|
148
|
+
showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
|
|
149
|
+
isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
|
|
150
|
+
isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
|
|
151
|
+
isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
|
|
152
|
+
id: (e == null ? void 0 : e.id) ?? ol.value,
|
|
153
|
+
children: Sl(e == null ? void 0 : e.children)
|
|
154
|
+
}, e));
|
|
155
|
+
}, _a = (a) => {
|
|
156
|
+
var l;
|
|
157
|
+
return (l = u(a)) == null ? void 0 : l.map((e) => (ol.value++, e = {
|
|
158
|
+
label: (e == null ? void 0 : e.label) ?? "",
|
|
159
|
+
prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : e == null ? void 0 : e.prop,
|
|
160
|
+
width: e != null && e.width ? parseInt(e.width) : "",
|
|
161
|
+
fixed: (e == null ? void 0 : e.fixed) ?? void 0,
|
|
162
|
+
sortable: (e == null ? void 0 : e.sortable) ?? !1,
|
|
163
|
+
align: (e == null ? void 0 : e.align) ?? "center",
|
|
164
|
+
showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
|
|
165
|
+
isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
|
|
166
|
+
isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
|
|
167
|
+
isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
|
|
168
|
+
id: (e == null ? void 0 : e.id) ?? ol.value,
|
|
169
|
+
children: Sl(e == null ? void 0 : e.children)
|
|
170
|
+
}, e));
|
|
171
|
+
}, Ll = (a, s) => {
|
|
172
|
+
var l;
|
|
173
|
+
return a != null && a.find((e) => (e == null ? void 0 : e.id) === s) ? (l = u(a)) == null ? void 0 : l.filter((n) => (n == null ? void 0 : n.id) !== s) : (a = a == null ? void 0 : a.map((e) => (e.children = Ll(e == null ? void 0 : e.children, s), e)), a);
|
|
174
|
+
}, jl = (a, s) => {
|
|
175
|
+
var l;
|
|
176
|
+
return a != null && a.find((e) => (e == null ? void 0 : e.id) === (s == null ? void 0 : s.id)) ? (l = u(a)) == null ? void 0 : l.map((n) => ((n == null ? void 0 : n.id) === (s == null ? void 0 : s.id) && (n = s), n)) : (a = a == null ? void 0 : a.map((e) => (e.children = jl(e == null ? void 0 : e.children, s), e)), a);
|
|
177
|
+
}, Ul = (a, s) => {
|
|
178
|
+
var l;
|
|
179
|
+
return a != null && a.find((e) => {
|
|
180
|
+
var n;
|
|
181
|
+
return (e == null ? void 0 : e.id) === ((n = s == null ? void 0 : s.contents) == null ? void 0 : n.id);
|
|
182
|
+
}) ? (l = u(a)) == null ? void 0 : l.map((n) => {
|
|
183
|
+
var r;
|
|
184
|
+
return (n == null ? void 0 : n.id) === ((r = s == null ? void 0 : s.contents) == null ? void 0 : r.id) && (n = s == null ? void 0 : s.contents), n;
|
|
185
|
+
}) : (a = a == null ? void 0 : a.map((e) => (e.children = Ul(e == null ? void 0 : e.children, s), e)), a);
|
|
186
|
+
}, Pl = (a, s) => {
|
|
187
|
+
var l;
|
|
188
|
+
return a != null && a.find((e) => (e == null ? void 0 : e.id) === (s == null ? void 0 : s.id)) ? (l = u(a)) == null ? void 0 : l.map((n) => ((n == null ? void 0 : n.id) === (s == null ? void 0 : s.id) && (n != null && n.children || (n.children = []), n.children.push(s.contents)), n)) : (a = a == null ? void 0 : a.map((e) => (e.children = Pl(e == null ? void 0 : e.children, s), e)), a);
|
|
189
|
+
}, re = [
|
|
190
|
+
{
|
|
191
|
+
key: "label",
|
|
192
|
+
label: "标签名",
|
|
193
|
+
type: "Input"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
key: "prop",
|
|
197
|
+
label: "属性名",
|
|
198
|
+
type: "Input"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: "width",
|
|
202
|
+
label: "宽度",
|
|
203
|
+
type: "Input"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
key: "sortable",
|
|
207
|
+
label: "是否支持排序",
|
|
208
|
+
type: "Switch"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: "align",
|
|
212
|
+
label: "文本所在位置",
|
|
213
|
+
type: "Radio",
|
|
214
|
+
options: [
|
|
215
|
+
{
|
|
216
|
+
label: "left",
|
|
217
|
+
value: "左"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
label: "center",
|
|
221
|
+
value: "中"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
label: "right",
|
|
225
|
+
value: "右"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
key: "fixed",
|
|
231
|
+
label: "是否固定列",
|
|
232
|
+
type: "Switch"
|
|
233
|
+
}
|
|
234
|
+
], $a = [
|
|
235
|
+
{
|
|
236
|
+
label: "view",
|
|
237
|
+
value: "查看"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: "fix",
|
|
241
|
+
value: "修改"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: "delete",
|
|
245
|
+
value: "删除"
|
|
246
|
+
}
|
|
247
|
+
], xa = [
|
|
248
|
+
{
|
|
249
|
+
label: "add",
|
|
250
|
+
value: "新增"
|
|
251
|
+
}
|
|
252
|
+
], Re = [
|
|
253
|
+
{
|
|
254
|
+
key: "label",
|
|
255
|
+
label: "按钮名",
|
|
256
|
+
type: "Input"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
key: "type",
|
|
260
|
+
label: "类型",
|
|
261
|
+
type: "Select",
|
|
262
|
+
options: xa
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
key: "background",
|
|
266
|
+
label: "按钮背景色",
|
|
267
|
+
type: "Color"
|
|
268
|
+
}
|
|
269
|
+
], Je = [
|
|
270
|
+
{
|
|
271
|
+
key: "label",
|
|
272
|
+
label: "按钮名",
|
|
273
|
+
type: "Input"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
key: "type",
|
|
277
|
+
label: "类型",
|
|
278
|
+
type: "Select",
|
|
279
|
+
options: $a
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
key: "textColor",
|
|
283
|
+
label: "按钮颜色",
|
|
284
|
+
type: "Color"
|
|
285
|
+
}
|
|
286
|
+
], Rl = Nl("modelTableComp", {
|
|
287
|
+
state: () => ({
|
|
288
|
+
tableIndex: 0
|
|
289
|
+
}),
|
|
290
|
+
actions: {
|
|
291
|
+
setTableIndex(a) {
|
|
292
|
+
this.tableIndex = a;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}), wa = { class: "table-header-child" }, Aa = { class: "table-header-child-main" }, Ta = { class: "table-header-child-content" }, Ia = { class: "table-header-child-content-item" }, Da = { class: "fix-button" }, Ea = { key: 0 }, Oa = { class: "form-content" }, Ba = {
|
|
296
|
+
__name: "tableNewChild",
|
|
297
|
+
props: {
|
|
298
|
+
tableChildContents: Array
|
|
299
|
+
},
|
|
300
|
+
emits: ["fixChange", "deleteChange"],
|
|
301
|
+
setup(a, { emit: s }) {
|
|
302
|
+
const l = a, e = s, n = U(!1), r = U(""), p = Rl(Ge), { tableIndex: i } = Ze(p);
|
|
303
|
+
U(0);
|
|
304
|
+
const _ = U(""), v = U([]), g = U([]), T = (o) => {
|
|
305
|
+
var t;
|
|
306
|
+
n.value = !0;
|
|
307
|
+
let c = [];
|
|
308
|
+
re == null || re.forEach((b) => {
|
|
309
|
+
let S = u(i.value) + 1;
|
|
310
|
+
p.setTableIndex(S), c.push({
|
|
311
|
+
label: b == null ? void 0 : b.label,
|
|
312
|
+
name: b == null ? void 0 : b.label,
|
|
313
|
+
type: b.type,
|
|
314
|
+
value: o[b.key],
|
|
315
|
+
id: i.value,
|
|
316
|
+
contents: b == null ? void 0 : b.options
|
|
317
|
+
});
|
|
318
|
+
}), o != null && o.children && ((t = o == null ? void 0 : o.children) == null ? void 0 : t.length) > 0 && c.push({
|
|
319
|
+
children: o == null ? void 0 : o.children,
|
|
320
|
+
isFormColHidden: !0
|
|
321
|
+
}), _.value = o == null ? void 0 : o.id, v.value = c, g.value = c;
|
|
322
|
+
}, $ = (o) => {
|
|
323
|
+
e("fixChange", u(o));
|
|
324
|
+
}, I = (o) => {
|
|
325
|
+
e("deleteChange", u(o));
|
|
326
|
+
}, k = (o) => {
|
|
327
|
+
n.value = !0;
|
|
328
|
+
let c = [];
|
|
329
|
+
re == null || re.forEach((t) => {
|
|
330
|
+
let b = u(i.value) + 1;
|
|
331
|
+
p.setTableIndex(b), c.push({
|
|
332
|
+
label: t == null ? void 0 : t.label,
|
|
333
|
+
name: t == null ? void 0 : t.label,
|
|
334
|
+
type: t.type,
|
|
335
|
+
value: "",
|
|
336
|
+
id: i.value,
|
|
337
|
+
contents: t == null ? void 0 : t.options
|
|
338
|
+
});
|
|
339
|
+
}), r.value = o == null ? void 0 : o.id, v.value = c, g.value = c;
|
|
340
|
+
}, N = (o) => {
|
|
341
|
+
let c = u(g.value);
|
|
342
|
+
c = c == null ? void 0 : c.map((t) => (t.children || (t.value = o == null ? void 0 : o[t.name]), t)), g.value = c;
|
|
343
|
+
}, f = () => {
|
|
344
|
+
var c, t;
|
|
345
|
+
v.value = g.value;
|
|
346
|
+
let o = {};
|
|
347
|
+
if (_.value !== "")
|
|
348
|
+
o.id = _.value, (c = v.value) == null || c.forEach((b) => {
|
|
349
|
+
const S = re == null ? void 0 : re.find((j) => (j == null ? void 0 : j.label) === (b == null ? void 0 : b.label));
|
|
350
|
+
S ? o[S.key] = b.value : b != null && b.children && b.children.length > 0 && (o.children = b.children);
|
|
351
|
+
}), n.value = !1, e("fixChange", {
|
|
352
|
+
contents: u(o),
|
|
353
|
+
id: r.value,
|
|
354
|
+
type: "fix"
|
|
355
|
+
});
|
|
356
|
+
else {
|
|
357
|
+
let b = u(i.value) + 1;
|
|
358
|
+
p.setTableIndex(b), o.id = "id" + i.value, (t = v.value) == null || t.forEach((S) => {
|
|
359
|
+
const j = re == null ? void 0 : re.find((R) => (R == null ? void 0 : R.label) === (S == null ? void 0 : S.label));
|
|
360
|
+
j ? o[j.key] = S.value : S != null && S.children && S.children.length > 0 && (o.children = S.children);
|
|
361
|
+
}), n.value = !1, e("fixChange", {
|
|
362
|
+
contents: u(o),
|
|
363
|
+
id: r.value,
|
|
364
|
+
type: "add"
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
_.value = "", v.value = [], g.value = [];
|
|
368
|
+
}, d = () => {
|
|
369
|
+
n.value = !1, _.value = "", r.value = "", v.value = [], g.value = [];
|
|
370
|
+
}, y = (o) => {
|
|
371
|
+
We.confirm("是否确认要删除", "", {
|
|
372
|
+
confirmButtonText: "确认",
|
|
373
|
+
cancelButtonText: "取消",
|
|
374
|
+
type: "warning"
|
|
375
|
+
}).then(
|
|
376
|
+
() => {
|
|
377
|
+
e("deleteChange", o), Ve({
|
|
378
|
+
type: "success",
|
|
379
|
+
message: "删除成功"
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
).catch(() => {
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
return (o, c) => {
|
|
386
|
+
const t = be("svg-icon");
|
|
387
|
+
return P(), z("div", wa, [
|
|
388
|
+
(P(!0), z(he, null, ge(l == null ? void 0 : l.tableChildContents, (b, S) => (P(), z("div", Aa, [
|
|
389
|
+
x("div", Ta, [
|
|
390
|
+
x("div", Ia, q(b.label), 1),
|
|
391
|
+
x("div", Da, [
|
|
392
|
+
V(t, {
|
|
393
|
+
name: "ChildAdd",
|
|
394
|
+
class: "svg-icon-content",
|
|
395
|
+
style: { width: "24px", height: "24px" },
|
|
396
|
+
onClick: (j) => k(b)
|
|
397
|
+
}, null, 8, ["onClick"]),
|
|
398
|
+
V(t, {
|
|
399
|
+
name: "ChildFix",
|
|
400
|
+
class: "svg-icon-content",
|
|
401
|
+
style: { width: "24px", height: "24px" },
|
|
402
|
+
onClick: (j) => T(b)
|
|
403
|
+
}, null, 8, ["onClick"]),
|
|
404
|
+
V(t, {
|
|
405
|
+
name: "ChildDelete",
|
|
406
|
+
class: "svg-icon-content",
|
|
407
|
+
style: { width: "24px", height: "24px" },
|
|
408
|
+
onClick: (j) => y(b)
|
|
409
|
+
}, null, 8, ["onClick"])
|
|
410
|
+
])
|
|
411
|
+
]),
|
|
412
|
+
b != null && b.children && b.children.length > 0 ? (P(), z("div", Ea, [
|
|
413
|
+
V(Jl, {
|
|
414
|
+
tableChildContents: b == null ? void 0 : b.children,
|
|
415
|
+
onDeleteChange: I,
|
|
416
|
+
onFixChange: $
|
|
417
|
+
}, null, 8, ["tableChildContents"])
|
|
418
|
+
])) : Se("", !0)
|
|
419
|
+
]))), 256)),
|
|
420
|
+
V(Ie, {
|
|
421
|
+
visible: n.value,
|
|
422
|
+
onBeforeDestroy: d,
|
|
423
|
+
width: 840
|
|
424
|
+
}, {
|
|
425
|
+
default: ne(() => [
|
|
426
|
+
x("div", Oa, [
|
|
427
|
+
(P(), ve(Te, {
|
|
428
|
+
rowContents: v.value,
|
|
429
|
+
key: v.value,
|
|
430
|
+
isEnableWrap: !0,
|
|
431
|
+
onChange: N
|
|
432
|
+
}, null, 8, ["rowContents"]))
|
|
433
|
+
])
|
|
434
|
+
]),
|
|
435
|
+
footer: ne(() => [
|
|
436
|
+
x("div", { class: "dialog-footer" }, [
|
|
437
|
+
x("div", {
|
|
438
|
+
onClick: d,
|
|
439
|
+
class: "cancel-button button"
|
|
440
|
+
}, q("取消")),
|
|
441
|
+
x("div", {
|
|
442
|
+
class: "ok-button button",
|
|
443
|
+
onClick: f
|
|
444
|
+
}, q("确认"))
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
}, 8, ["visible"])
|
|
449
|
+
]);
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
}, Fa = /* @__PURE__ */ Ce(Ba, [["__scopeId", "data-v-e0fef72d"]]), Na = { class: "table-header-child" }, Sa = { class: "table-header-child-main" }, La = { class: "table-header-child-content" }, ja = { class: "table-header-child-content-item" }, Ua = { class: "fix-button" }, Pa = { key: 0 }, Ra = { class: "form-content" }, Ja = {
|
|
453
|
+
__name: "tableChildren",
|
|
454
|
+
props: {
|
|
455
|
+
tableChildContents: Array
|
|
456
|
+
},
|
|
457
|
+
emits: ["fixChange", "deleteChange"],
|
|
458
|
+
setup(a, { emit: s }) {
|
|
459
|
+
const l = a, e = s, n = U(!1), r = U(""), p = Rl(Ge), { tableIndex: i } = Ze(p), _ = U(""), v = U([]), g = U([]), T = (o) => {
|
|
460
|
+
e("fixChange", u(o));
|
|
461
|
+
}, $ = (o) => {
|
|
462
|
+
var t;
|
|
463
|
+
n.value = !0;
|
|
464
|
+
let c = [];
|
|
465
|
+
re == null || re.forEach((b) => {
|
|
466
|
+
let S = u(i.value) + 1;
|
|
467
|
+
p.setTableIndex(S), c.push({
|
|
468
|
+
label: b == null ? void 0 : b.label,
|
|
469
|
+
name: b == null ? void 0 : b.label,
|
|
470
|
+
type: b.type,
|
|
471
|
+
value: o[b.key],
|
|
472
|
+
id: i.value,
|
|
473
|
+
contents: b == null ? void 0 : b.options
|
|
474
|
+
});
|
|
475
|
+
}), o != null && o.children && ((t = o == null ? void 0 : o.children) == null ? void 0 : t.length) > 0 && c.push({
|
|
476
|
+
children: o == null ? void 0 : o.children,
|
|
477
|
+
isFormColHidden: !0
|
|
478
|
+
}), _.value = o == null ? void 0 : o.id, v.value = c, g.value = c;
|
|
479
|
+
}, I = (o) => {
|
|
480
|
+
n.value = !0;
|
|
481
|
+
let c = [];
|
|
482
|
+
re == null || re.forEach((t) => {
|
|
483
|
+
let b = u(i.value) + 1;
|
|
484
|
+
p.setTableIndex(b), c.push({
|
|
485
|
+
label: t == null ? void 0 : t.label,
|
|
486
|
+
name: t == null ? void 0 : t.label,
|
|
487
|
+
type: t.type,
|
|
488
|
+
value: "",
|
|
489
|
+
id: i.value,
|
|
490
|
+
contents: t == null ? void 0 : t.options
|
|
491
|
+
});
|
|
492
|
+
}), r.value = o == null ? void 0 : o.id, v.value = c, g.value = c;
|
|
493
|
+
}, k = (o) => {
|
|
494
|
+
let c = u(g.value);
|
|
495
|
+
c = c == null ? void 0 : c.map((t) => (t.children || (t.value = o == null ? void 0 : o[t.name]), t)), g.value = c;
|
|
496
|
+
}, N = () => {
|
|
497
|
+
var c, t;
|
|
498
|
+
v.value = g.value;
|
|
499
|
+
let o = {};
|
|
500
|
+
if (_.value !== "")
|
|
501
|
+
o.id = _.value, (c = v.value) == null || c.forEach((b) => {
|
|
502
|
+
const S = re == null ? void 0 : re.find((j) => (j == null ? void 0 : j.label) === (b == null ? void 0 : b.label));
|
|
503
|
+
S ? o[S.key] = b.value : b != null && b.children && b.children.length > 0 && (o.children = b.children);
|
|
504
|
+
}), n.value = !1, e("fixChange", {
|
|
505
|
+
contents: u(o),
|
|
506
|
+
id: r.value,
|
|
507
|
+
type: "fix"
|
|
508
|
+
});
|
|
509
|
+
else {
|
|
510
|
+
let b = u(i.value) + 1;
|
|
511
|
+
p.setTableIndex(b), o.id = "idChild" + i.value, (t = v.value) == null || t.forEach((S) => {
|
|
512
|
+
const j = re == null ? void 0 : re.find((R) => (R == null ? void 0 : R.label) === (S == null ? void 0 : S.label));
|
|
513
|
+
j ? o[j.key] = S.value : S != null && S.children && S.children.length > 0 && (o.children = S.children);
|
|
514
|
+
}), n.value = !1, e("fixChange", {
|
|
515
|
+
contents: u(o),
|
|
516
|
+
id: r.value,
|
|
517
|
+
type: "add"
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
_.value = "", v.value = [], g.value = [];
|
|
521
|
+
}, f = () => {
|
|
522
|
+
n.value = !1, _.value = "", r.value = "", v.value = [], g.value = [];
|
|
523
|
+
}, d = (o) => {
|
|
524
|
+
We.confirm("是否确认要删除", "", {
|
|
525
|
+
confirmButtonText: "确认",
|
|
526
|
+
cancelButtonText: "取消",
|
|
527
|
+
type: "warning"
|
|
528
|
+
}).then(
|
|
529
|
+
() => {
|
|
530
|
+
e("deleteChange", o), Ve({
|
|
531
|
+
type: "success",
|
|
532
|
+
message: "删除成功"
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
).catch(() => {
|
|
536
|
+
});
|
|
537
|
+
}, y = (o) => {
|
|
538
|
+
e("deleteChange", o);
|
|
539
|
+
};
|
|
540
|
+
return (o, c) => {
|
|
541
|
+
const t = be("svg-icon");
|
|
542
|
+
return P(), z("div", Na, [
|
|
543
|
+
(P(!0), z(he, null, ge(l == null ? void 0 : l.tableChildContents, (b, S) => (P(), z("div", Sa, [
|
|
544
|
+
x("div", La, [
|
|
545
|
+
x("div", ja, q(b.label), 1),
|
|
546
|
+
x("div", Ua, [
|
|
547
|
+
V(t, {
|
|
548
|
+
name: "ChildAdd",
|
|
549
|
+
class: "svg-icon-content",
|
|
550
|
+
style: { width: "24px", height: "24px" },
|
|
551
|
+
onClick: (j) => I(b)
|
|
552
|
+
}, null, 8, ["onClick"]),
|
|
553
|
+
V(t, {
|
|
554
|
+
name: "ChildFix",
|
|
555
|
+
class: "svg-icon-content",
|
|
556
|
+
style: { width: "24px", height: "24px" },
|
|
557
|
+
onClick: (j) => $(b)
|
|
558
|
+
}, null, 8, ["onClick"]),
|
|
559
|
+
V(t, {
|
|
560
|
+
name: "ChildDelete",
|
|
561
|
+
class: "svg-icon-content",
|
|
562
|
+
style: { width: "24px", height: "24px" },
|
|
563
|
+
onClick: (j) => d(b)
|
|
564
|
+
}, null, 8, ["onClick"])
|
|
565
|
+
])
|
|
566
|
+
]),
|
|
567
|
+
b != null && b.children && b.children.length > 0 ? (P(), z("div", Pa, [
|
|
568
|
+
V(Fa, {
|
|
569
|
+
tableChildContents: b == null ? void 0 : b.children,
|
|
570
|
+
onDeleteChange: y,
|
|
571
|
+
onFixChange: T
|
|
572
|
+
}, null, 8, ["tableChildContents"])
|
|
573
|
+
])) : Se("", !0)
|
|
574
|
+
]))), 256)),
|
|
575
|
+
V(Ie, {
|
|
576
|
+
visible: n.value,
|
|
577
|
+
onBeforeDestroy: f,
|
|
578
|
+
width: 840
|
|
579
|
+
}, {
|
|
580
|
+
default: ne(() => [
|
|
581
|
+
x("div", Ra, [
|
|
582
|
+
(P(), ve(Te, {
|
|
583
|
+
rowContents: v.value,
|
|
584
|
+
key: v.value,
|
|
585
|
+
isEnableWrap: !0,
|
|
586
|
+
onChange: k
|
|
587
|
+
}, null, 8, ["rowContents"]))
|
|
588
|
+
])
|
|
589
|
+
]),
|
|
590
|
+
footer: ne(() => [
|
|
591
|
+
x("div", { class: "dialog-footer" }, [
|
|
592
|
+
x("div", {
|
|
593
|
+
onClick: f,
|
|
594
|
+
class: "cancel-button button"
|
|
595
|
+
}, q("取消")),
|
|
596
|
+
x("div", {
|
|
597
|
+
class: "ok-button button",
|
|
598
|
+
onClick: N
|
|
599
|
+
}, q("确认"))
|
|
600
|
+
])
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
}, 8, ["visible"])
|
|
604
|
+
]);
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
}, Jl = /* @__PURE__ */ Ce(Ja, [["__scopeId", "data-v-cc311a5f"]]), Va = { class: "table-operate-content" }, Wa = { class: "table-operate-item" }, za = { class: "operate-title" }, Ga = { class: "operate-content" }, Ma = { class: "fix-content" }, Za = { class: "fix-content-label" }, Ha = { class: "fix-button" }, Ka = { key: 0 }, qa = { class: "operate-title" }, Qa = { class: "operate-content" }, Xa = { class: "fix-content" }, Ya = { class: "fix-content-label" }, en = { class: "fix-button" }, ln = { class: "operate-title" }, an = { class: "operate-content" }, nn = { class: "fix-content" }, sn = { class: "fix-content-label" }, on = { class: "fix-button" }, rn = { class: "operate-title" }, tn = { class: "operate-content" }, un = { class: "fix-content" }, cn = { class: "fix-content-label" }, pn = { class: "fix-button" }, dn = { class: "operate-content" }, fn = { style: { display: "flex", "justify-content": "space-between" } }, hn = { class: "form-content" }, mn = { class: "form-content" }, vn = { class: "form-content" }, yn = { class: "form-content" }, bn = {
|
|
608
|
+
__name: "operate",
|
|
609
|
+
props: {
|
|
610
|
+
itemContents: {
|
|
611
|
+
type: Array,
|
|
612
|
+
default: () => []
|
|
613
|
+
},
|
|
614
|
+
originalItemContents: {
|
|
615
|
+
type: Array,
|
|
616
|
+
default: () => []
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
emits: ["change"],
|
|
620
|
+
setup(a, { emit: s }) {
|
|
621
|
+
const l = a, e = s, n = U([]), r = U(!1), p = U(!1), i = U([]), _ = U(!1), v = U([]), g = U(!1), T = U([]), $ = U(""), I = U(""), k = U([]), N = U([]), f = U([]), d = U([]), y = U(!1), o = U([]), c = U([]), t = U(0), b = U([]), S = U([]), j = U([]), R = () => {
|
|
622
|
+
y.value = !0;
|
|
623
|
+
let C = [];
|
|
624
|
+
Re == null || Re.forEach((A) => {
|
|
625
|
+
t.value++, C.push({
|
|
626
|
+
label: A == null ? void 0 : A.label,
|
|
627
|
+
name: A == null ? void 0 : A.label,
|
|
628
|
+
type: A.type,
|
|
629
|
+
value: (A == null ? void 0 : A.key) === "background" ? "var(--ssComponent-primary-color)" : "",
|
|
630
|
+
id: t.value,
|
|
631
|
+
contents: A == null ? void 0 : A.options
|
|
632
|
+
});
|
|
633
|
+
}), o.value = C, c.value = C;
|
|
634
|
+
}, se = () => {
|
|
635
|
+
var A, B, E;
|
|
636
|
+
p.value = !0;
|
|
637
|
+
let C = [];
|
|
638
|
+
(E = (B = (A = xe) == null ? void 0 : A.find((K) => (K == null ? void 0 : K.key) === "Input")) == null ? void 0 : B.value) == null || E.forEach((K) => {
|
|
639
|
+
t.value++, C.push({
|
|
640
|
+
label: K == null ? void 0 : K.label,
|
|
641
|
+
name: K == null ? void 0 : K.label,
|
|
642
|
+
type: K.type,
|
|
643
|
+
value: (K == null ? void 0 : K.label) === "类型" ? "Input" : "",
|
|
644
|
+
id: t.value,
|
|
645
|
+
contents: K == null ? void 0 : K.options
|
|
646
|
+
});
|
|
647
|
+
}), b.value = C, S.value = C;
|
|
648
|
+
}, oe = async (C) => {
|
|
649
|
+
var A, B, E, K, ee, ke, W, Q, de, Ae;
|
|
650
|
+
if ((C == null ? void 0 : C.类型) !== ((B = (A = S.value) == null ? void 0 : A.find((le) => (le == null ? void 0 : le.label) === "类型")) == null ? void 0 : B.value)) {
|
|
651
|
+
let le = [], De = await ((ee = (K = (E = xe) == null ? void 0 : E.find((Z) => (Z == null ? void 0 : Z.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : K.value) == null ? void 0 : ee.value) ? await ((Ae = (de = (Q = xe) == null ? void 0 : Q.find((Z) => (Z == null ? void 0 : Z.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : de.value) == null ? void 0 : Ae.value) : (W = (ke = xe) == null ? void 0 : ke.find((Z) => (Z == null ? void 0 : Z.key) === ((C == null ? void 0 : C.类型) === "" ? "Input" : C == null ? void 0 : C.类型))) == null ? void 0 : W.value;
|
|
652
|
+
De == null || De.forEach((Z) => {
|
|
653
|
+
t.value++, le.push({
|
|
654
|
+
label: Z == null ? void 0 : Z.label,
|
|
655
|
+
name: Z == null ? void 0 : Z.label,
|
|
656
|
+
type: Z.type,
|
|
657
|
+
value: (C == null ? void 0 : C[Z.label]) ?? "",
|
|
658
|
+
id: t.value,
|
|
659
|
+
contents: Z == null ? void 0 : Z.options
|
|
660
|
+
});
|
|
661
|
+
}), S.value = le, b.value = le;
|
|
662
|
+
} else {
|
|
663
|
+
let le = u(b.value);
|
|
664
|
+
le = le == null ? void 0 : le.map((De) => (De.value = C == null ? void 0 : C[De.name], De)), S.value = le;
|
|
665
|
+
}
|
|
666
|
+
}, h = async (C) => {
|
|
667
|
+
var E, K, ee, ke, W, Q, de, Ae;
|
|
668
|
+
p.value = !0;
|
|
669
|
+
let A = [];
|
|
670
|
+
const B = await ((ee = (K = (E = xe) == null ? void 0 : E.find((le) => (le == null ? void 0 : le.key) === ((C == null ? void 0 : C.type) === "" ? "Input" : C == null ? void 0 : C.type))) == null ? void 0 : K.value) == null ? void 0 : ee.value) ? await ((Ae = (de = (Q = xe) == null ? void 0 : Q.find((le) => (le == null ? void 0 : le.key) === ((C == null ? void 0 : C.type) === "" ? "Input" : C == null ? void 0 : C.type))) == null ? void 0 : de.value) == null ? void 0 : Ae.value) : (W = (ke = xe) == null ? void 0 : ke.find((le) => (le == null ? void 0 : le.key) === ((C == null ? void 0 : C.type) === "" ? "Input" : C == null ? void 0 : C.type))) == null ? void 0 : W.value;
|
|
671
|
+
B == null || B.forEach((le) => {
|
|
672
|
+
t.value++, A.push({
|
|
673
|
+
label: le == null ? void 0 : le.label,
|
|
674
|
+
name: le == null ? void 0 : le.label,
|
|
675
|
+
type: le.type,
|
|
676
|
+
value: (le == null ? void 0 : le.label) === "类型" && C[le.key] === "" ? "Input" : C[le.key],
|
|
677
|
+
id: t.value,
|
|
678
|
+
contents: le == null ? void 0 : le.options
|
|
679
|
+
});
|
|
680
|
+
}), $.value = C == null ? void 0 : C.id, b.value = A, S.value = A;
|
|
681
|
+
}, w = (C) => {
|
|
682
|
+
We.confirm("是否确认要删除", "", {
|
|
683
|
+
confirmButtonText: "确认",
|
|
684
|
+
cancelButtonText: "取消",
|
|
685
|
+
type: "warning"
|
|
686
|
+
}).then(
|
|
687
|
+
() => {
|
|
688
|
+
var A, B;
|
|
689
|
+
j.value = (A = u(j.value)) == null ? void 0 : A.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", (B = u(l.originalItemContents)) == null ? void 0 : B.map((E) => ((E == null ? void 0 : E.key) === "tableToForm" && (E.contents = j.value), E))), Ve({
|
|
690
|
+
type: "success",
|
|
691
|
+
message: "删除成功"
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
).catch(() => {
|
|
695
|
+
});
|
|
696
|
+
}, O = () => {
|
|
697
|
+
p.value = !1, b.value = [], $.value = "";
|
|
698
|
+
}, m = async () => {
|
|
699
|
+
var E, K, ee, ke, W, Q, de, Ae, le, De;
|
|
700
|
+
b.value = S.value;
|
|
701
|
+
let C = {};
|
|
702
|
+
$.value !== "" ? C.id = $.value : (t.value++, C.id = "id" + t.value);
|
|
703
|
+
let A = await ((ee = (K = (E = xe) == null ? void 0 : E.find((Z) => {
|
|
704
|
+
var Ee, Be;
|
|
705
|
+
return (Z == null ? void 0 : Z.key) === (((Be = (Ee = b.value) == null ? void 0 : Ee.find((je) => (je == null ? void 0 : je.label) === "类型")) == null ? void 0 : Be.value) ?? "label");
|
|
706
|
+
})) == null ? void 0 : K.value) == null ? void 0 : ee.value) ?? ((W = (ke = xe) == null ? void 0 : ke.find((Z) => {
|
|
707
|
+
var Ee, Be;
|
|
708
|
+
return (Z == null ? void 0 : Z.key) === (((Be = (Ee = b.value) == null ? void 0 : Ee.find((je) => (je == null ? void 0 : je.label) === "类型")) == null ? void 0 : Be.value) ?? "label");
|
|
709
|
+
})) == null ? void 0 : W.value);
|
|
710
|
+
if ((Q = b.value) == null || Q.forEach((Z) => {
|
|
711
|
+
const Ee = A == null ? void 0 : A.find((Be) => (Be == null ? void 0 : Be.label) === (Z == null ? void 0 : Z.label));
|
|
712
|
+
Ee && (C[Ee.key] = Z.value);
|
|
713
|
+
}), C.name = C.label, (de = j.value) != null && de.find((Z) => Z.id === C.id))
|
|
714
|
+
j.value = (Ae = j.value) == null ? void 0 : Ae.map((Z) => (Z.id === C.id && (Z = C), Z));
|
|
715
|
+
else {
|
|
716
|
+
let Z = u(j.value);
|
|
717
|
+
j.value || (j.value = []), Z.push(C), j.value = Z;
|
|
718
|
+
}
|
|
719
|
+
j.value = j.value.map(({ id: Z, ...Ee }) => Ee), p.value = !1, $.value = "";
|
|
720
|
+
let B = u(l.originalItemContents);
|
|
721
|
+
(le = u(l.originalItemContents)) != null && le.find((Z) => (Z == null ? void 0 : Z.key) === "tableToForm") ? B = (De = u(l.originalItemContents)) == null ? void 0 : De.map((Z) => ((Z == null ? void 0 : Z.key) === "tableToForm" && (Z.contents = j.value), Z)) : B.push({
|
|
722
|
+
key: "tableToForm",
|
|
723
|
+
contents: j.value
|
|
724
|
+
}), e("change", B);
|
|
725
|
+
}, F = (C) => {
|
|
726
|
+
y.value = !0;
|
|
727
|
+
let A = [];
|
|
728
|
+
Re == null || Re.forEach((B) => {
|
|
729
|
+
t.value++, A.push({
|
|
730
|
+
label: B == null ? void 0 : B.label,
|
|
731
|
+
name: B == null ? void 0 : B.label,
|
|
732
|
+
type: B.type,
|
|
733
|
+
value: C[B.key],
|
|
734
|
+
id: t.value,
|
|
735
|
+
contents: B == null ? void 0 : B.options
|
|
736
|
+
});
|
|
737
|
+
}), $.value = C == null ? void 0 : C.id, o.value = A, c.value = A;
|
|
738
|
+
};
|
|
739
|
+
we(
|
|
740
|
+
() => g.value,
|
|
741
|
+
() => {
|
|
742
|
+
var A, B;
|
|
743
|
+
let C = u(l.originalItemContents);
|
|
744
|
+
(A = u(l.originalItemContents)) != null && A.find((E) => (E == null ? void 0 : E.key) === "page") ? C = (B = u(l.originalItemContents)) == null ? void 0 : B.map((E) => ((E == null ? void 0 : E.key) === "page" && (E.contents = g.value), E)) : C.push({
|
|
745
|
+
key: "page",
|
|
746
|
+
contents: g.value
|
|
747
|
+
}), e("change", C);
|
|
748
|
+
},
|
|
749
|
+
{ deep: !0 }
|
|
750
|
+
);
|
|
751
|
+
const G = (C) => {
|
|
752
|
+
We.confirm("是否确认要删除", "", {
|
|
753
|
+
confirmButtonText: "确认",
|
|
754
|
+
cancelButtonText: "取消",
|
|
755
|
+
type: "warning"
|
|
756
|
+
}).then(
|
|
757
|
+
() => {
|
|
758
|
+
var A, B;
|
|
759
|
+
N.value = (A = u(N.value)) == null ? void 0 : A.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", (B = u(l.originalItemContents)) == null ? void 0 : B.map((E) => ((E == null ? void 0 : E.key) === "extraButton" && (E.contents = N.value), E))), Ve({
|
|
760
|
+
type: "success",
|
|
761
|
+
message: "删除成功"
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
).catch(() => {
|
|
765
|
+
});
|
|
766
|
+
}, X = () => {
|
|
767
|
+
var B, E, K, ee, ke;
|
|
768
|
+
o.value = c.value;
|
|
769
|
+
let C = {};
|
|
770
|
+
if ($.value !== "" ? C.id = $.value : (t.value++, C.id = "id" + t.value), (B = o.value) == null || B.forEach((W) => {
|
|
771
|
+
const Q = Re == null ? void 0 : Re.find((de) => (de == null ? void 0 : de.label) === (W == null ? void 0 : W.label));
|
|
772
|
+
Q ? C[Q.key] = W.value : W != null && W.children && W.children.length > 0 && (C.children = W.children);
|
|
773
|
+
}), (E = N.value) != null && E.find((W) => W.id === C.id))
|
|
774
|
+
N.value = (K = N.value) == null ? void 0 : K.map((W) => (W.id === C.id && (W = C), W));
|
|
775
|
+
else {
|
|
776
|
+
let W = u(N.value);
|
|
777
|
+
W.push(C), N.value = W;
|
|
778
|
+
}
|
|
779
|
+
y.value = !1, $.value = "";
|
|
780
|
+
let A = u(l.originalItemContents);
|
|
781
|
+
(ee = u(l.originalItemContents)) != null && ee.find((W) => (W == null ? void 0 : W.key) === "extraButton") ? A = (ke = u(l.originalItemContents)) == null ? void 0 : ke.map((W) => ((W == null ? void 0 : W.key) === "extraButton" && (W.contents = N.value), W)) : A.push({
|
|
782
|
+
key: "extraButton",
|
|
783
|
+
contents: N.value
|
|
784
|
+
}), e("change", A);
|
|
785
|
+
}, D = (C) => {
|
|
786
|
+
let A = u(c.value);
|
|
787
|
+
A = A == null ? void 0 : A.map((B) => (B.children || (B.value = C == null ? void 0 : C[B.name]), B)), c.value = A;
|
|
788
|
+
}, Y = () => {
|
|
789
|
+
y.value = !1, o.value = [], $.value = "";
|
|
790
|
+
}, M = (C) => {
|
|
791
|
+
_.value = !0;
|
|
792
|
+
let A = [];
|
|
793
|
+
Je == null || Je.forEach((B) => {
|
|
794
|
+
t.value++, A.push({
|
|
795
|
+
label: B == null ? void 0 : B.label,
|
|
796
|
+
name: B == null ? void 0 : B.label,
|
|
797
|
+
type: B.type,
|
|
798
|
+
value: C[B.key],
|
|
799
|
+
id: t.value,
|
|
800
|
+
contents: B == null ? void 0 : B.options
|
|
801
|
+
});
|
|
802
|
+
}), $.value = C == null ? void 0 : C.id, f.value = A, d.value = A;
|
|
803
|
+
}, te = (C) => {
|
|
804
|
+
We.confirm("是否确认要删除", "", {
|
|
805
|
+
confirmButtonText: "确认",
|
|
806
|
+
cancelButtonText: "取消",
|
|
807
|
+
type: "warning"
|
|
808
|
+
}).then(
|
|
809
|
+
() => {
|
|
810
|
+
var A, B;
|
|
811
|
+
k.value = (A = u(k.value)) == null ? void 0 : A.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", (B = u(l.originalItemContents)) == null ? void 0 : B.map((E) => ((E == null ? void 0 : E.key) === "rowButton" && (E.contents = k.value), E))), Ve({
|
|
812
|
+
type: "success",
|
|
813
|
+
message: "删除成功"
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
).catch(() => {
|
|
817
|
+
});
|
|
818
|
+
}, me = () => {
|
|
819
|
+
r.value = !0;
|
|
820
|
+
let C = [];
|
|
821
|
+
re == null || re.forEach((A) => {
|
|
822
|
+
t.value++, C.push({
|
|
823
|
+
label: A == null ? void 0 : A.label,
|
|
824
|
+
name: A == null ? void 0 : A.label,
|
|
825
|
+
type: A.type,
|
|
826
|
+
value: "",
|
|
827
|
+
id: t.value,
|
|
828
|
+
contents: A == null ? void 0 : A.options
|
|
829
|
+
});
|
|
830
|
+
}), v.value = C, T.value = C;
|
|
831
|
+
}, _e = () => {
|
|
832
|
+
_.value = !0;
|
|
833
|
+
let C = [];
|
|
834
|
+
Je == null || Je.forEach((A) => {
|
|
835
|
+
t.value++, C.push({
|
|
836
|
+
label: A == null ? void 0 : A.label,
|
|
837
|
+
name: A == null ? void 0 : A.label,
|
|
838
|
+
type: A.type,
|
|
839
|
+
value: "",
|
|
840
|
+
id: t.value,
|
|
841
|
+
contents: A == null ? void 0 : A.options
|
|
842
|
+
});
|
|
843
|
+
}), f.value = C, d.value = C;
|
|
844
|
+
}, J = (C) => {
|
|
845
|
+
let A = u(d.value);
|
|
846
|
+
A = A == null ? void 0 : A.map((B) => (B.children || (B.value = C == null ? void 0 : C[B.name]), B)), d.value = A;
|
|
847
|
+
}, ae = () => {
|
|
848
|
+
var B, E, K, ee, ke;
|
|
849
|
+
f.value = d.value;
|
|
850
|
+
let C = {};
|
|
851
|
+
if ($.value !== "" ? C.id = $.value : (t.value++, C.id = "id" + t.value), (B = f.value) == null || B.forEach((W) => {
|
|
852
|
+
const Q = Je == null ? void 0 : Je.find((de) => (de == null ? void 0 : de.label) === (W == null ? void 0 : W.label));
|
|
853
|
+
Q ? C[Q.key] = W.value : W != null && W.children && W.children.length > 0 && (C.children = W.children);
|
|
854
|
+
}), (E = k.value) != null && E.find((W) => W.id === C.id))
|
|
855
|
+
k.value = (K = k.value) == null ? void 0 : K.map((W) => (W.id === C.id && (W = C), W));
|
|
856
|
+
else {
|
|
857
|
+
let W = u(k.value);
|
|
858
|
+
W.push(C), k.value = W;
|
|
859
|
+
}
|
|
860
|
+
_.value = !1, $.value = "";
|
|
861
|
+
let A = u(l.originalItemContents);
|
|
862
|
+
(ee = u(l.originalItemContents)) != null && ee.find((W) => (W == null ? void 0 : W.key) === "rowButton") ? A = (ke = u(l.originalItemContents)) == null ? void 0 : ke.map((W) => ((W == null ? void 0 : W.key) === "rowButton" && (W.contents = k.value), W)) : A.push({
|
|
863
|
+
key: "rowButton",
|
|
864
|
+
contents: k.value
|
|
865
|
+
}), e("change", A);
|
|
866
|
+
}, H = () => {
|
|
867
|
+
_.value = !1, $.value = "", d.value = [], f.value = [];
|
|
868
|
+
}, ue = (C) => {
|
|
869
|
+
r.value = !0;
|
|
870
|
+
let A = [];
|
|
871
|
+
re == null || re.forEach((B) => {
|
|
872
|
+
t.value++, A.push({
|
|
873
|
+
label: B == null ? void 0 : B.label,
|
|
874
|
+
name: B == null ? void 0 : B.label,
|
|
875
|
+
type: B.type,
|
|
876
|
+
value: "",
|
|
877
|
+
id: t.value,
|
|
878
|
+
contents: B == null ? void 0 : B.options
|
|
879
|
+
});
|
|
880
|
+
}), v.value = A, I.value = C == null ? void 0 : C.id, T.value = A;
|
|
881
|
+
}, $e = (C) => {
|
|
882
|
+
var A;
|
|
883
|
+
i.value = Ll(u(i.value), C == null ? void 0 : C.id), e("change", (A = u(l.originalItemContents)) == null ? void 0 : A.map((B) => {
|
|
884
|
+
var E;
|
|
885
|
+
return (B == null ? void 0 : B.key) === "header" && (B.contents = (E = i.value) != null && E.some((K) => K == null ? void 0 : K.children) ? [i.value] : i.value), B;
|
|
886
|
+
}));
|
|
887
|
+
}, fe = (C) => {
|
|
888
|
+
var B, E, K;
|
|
889
|
+
C.type === "fix" ? C.id !== "" ? i.value = Ul(i.value, C) : i.value = jl(i.value, C == null ? void 0 : C.contents) : i.value = Pl(i.value, C), i.value = (B = i.value) != null && B.some((ee) => ee == null ? void 0 : ee.children) ? [i.value] : i.value, $.value = "";
|
|
890
|
+
let A = u(l.originalItemContents);
|
|
891
|
+
(E = u(l.originalItemContents)) != null && E.find((ee) => (ee == null ? void 0 : ee.key) === "header") ? A = (K = u(l.originalItemContents)) == null ? void 0 : K.map((ee) => ((ee == null ? void 0 : ee.key) === "header" && (ee.contents = i.value), ee)) : A.push({
|
|
892
|
+
key: "header",
|
|
893
|
+
contents: i.value
|
|
894
|
+
}), e("change", A);
|
|
895
|
+
}, ye = (C) => {
|
|
896
|
+
var B;
|
|
897
|
+
r.value = !0;
|
|
898
|
+
let A = [];
|
|
899
|
+
re == null || re.forEach((E) => {
|
|
900
|
+
t.value++, A.push({
|
|
901
|
+
label: E == null ? void 0 : E.label,
|
|
902
|
+
name: E == null ? void 0 : E.label,
|
|
903
|
+
type: E.type,
|
|
904
|
+
value: C[E.key],
|
|
905
|
+
id: t.value,
|
|
906
|
+
contents: E == null ? void 0 : E.options
|
|
907
|
+
});
|
|
908
|
+
}), C != null && C.children && ((B = C == null ? void 0 : C.children) == null ? void 0 : B.length) > 0 && A.push({
|
|
909
|
+
children: C == null ? void 0 : C.children,
|
|
910
|
+
isFormColHidden: !0
|
|
911
|
+
}), $.value = C == null ? void 0 : C.id, I.value = "", v.value = A, T.value = A;
|
|
912
|
+
}, ie = (C) => {
|
|
913
|
+
let A = u(T.value);
|
|
914
|
+
A = A == null ? void 0 : A.map((B) => (B.children || (B.value = C == null ? void 0 : C[B.name]), B)), T.value = A;
|
|
915
|
+
}, Pe = () => {
|
|
916
|
+
r.value = !1, $.value = "", I.value = "", T.value = [];
|
|
917
|
+
}, Le = () => {
|
|
918
|
+
var B, E, K, ee, ke, W;
|
|
919
|
+
v.value = T.value;
|
|
920
|
+
let C = {};
|
|
921
|
+
if ($.value !== "" ? C.id = $.value : (t.value++, C.id = "id" + t.value), (B = v.value) == null || B.forEach((Q) => {
|
|
922
|
+
const de = re == null ? void 0 : re.find((Ae) => (Ae == null ? void 0 : Ae.label) === (Q == null ? void 0 : Q.label));
|
|
923
|
+
de ? C[de.key] = Q.value : Q != null && Q.children && Q.children.length > 0 && (C.children = Q.children);
|
|
924
|
+
}), (E = i.value) != null && E.find((Q) => Q.id === C.id))
|
|
925
|
+
i.value = (K = i.value) == null ? void 0 : K.map((Q) => (Q.id === C.id && (Q = C), Q));
|
|
926
|
+
else {
|
|
927
|
+
let Q = u(i.value) ?? [];
|
|
928
|
+
I.value === "" ? Q.push(C) : Q = Q == null ? void 0 : Q.map((de) => (de.id === I.value && (de.children || (de.children = []), de.children.push(C)), de)), i.value = Q;
|
|
929
|
+
}
|
|
930
|
+
i.value = (ee = i.value) != null && ee.some((Q) => Q == null ? void 0 : Q.children) ? [i.value] : i.value, r.value = !1, $.value = "", I.value = "";
|
|
931
|
+
let A = u(l.originalItemContents);
|
|
932
|
+
(ke = u(l.originalItemContents)) != null && ke.find((Q) => (Q == null ? void 0 : Q.key) === "header") ? A = (W = u(l.originalItemContents)) == null ? void 0 : W.map((Q) => ((Q == null ? void 0 : Q.key) === "header" && (Q.contents = i.value), Q)) : A.push({
|
|
933
|
+
key: "header",
|
|
934
|
+
contents: i.value
|
|
935
|
+
}), e("change", A);
|
|
936
|
+
}, Ne = (C) => {
|
|
937
|
+
We.confirm("是否确认要删除", "", {
|
|
938
|
+
confirmButtonText: "确认",
|
|
939
|
+
cancelButtonText: "取消",
|
|
940
|
+
type: "warning"
|
|
941
|
+
}).then(
|
|
942
|
+
() => {
|
|
943
|
+
var A, B;
|
|
944
|
+
i.value = (A = u(i.value)) == null ? void 0 : A.filter((E) => (E == null ? void 0 : E.id) !== (C == null ? void 0 : C.id)), e("change", (B = u(l.originalItemContents)) == null ? void 0 : B.map((E) => {
|
|
945
|
+
var K;
|
|
946
|
+
return (E == null ? void 0 : E.key) === "header" && (E.contents = (K = i.value) != null && K.some((ee) => ee == null ? void 0 : ee.children) ? [i.value] : i.value), E;
|
|
947
|
+
})), Ve({
|
|
948
|
+
type: "success",
|
|
949
|
+
message: "删除成功"
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
).catch(() => {
|
|
953
|
+
});
|
|
954
|
+
};
|
|
955
|
+
return we(
|
|
956
|
+
() => l.originalItemContents,
|
|
957
|
+
() => {
|
|
958
|
+
var C, A, B, E, K, ee, ke, W, Q, de, Ae, le, De, Z, Ee, Be, je, gl, kl;
|
|
959
|
+
if (!(!l.originalItemContents || l.originalItemContents.length === 0))
|
|
960
|
+
if (n.value = u(l.originalItemContents), i.value = (A = (C = n.value) == null ? void 0 : C.find((L) => (L == null ? void 0 : L.key) === "header")) == null ? void 0 : A.contents, k.value = (E = (B = n.value) == null ? void 0 : B.find((L) => (L == null ? void 0 : L.key) === "rowButton")) == null ? void 0 : E.contents, N.value = (ee = (K = n.value) == null ? void 0 : K.find((L) => (L == null ? void 0 : L.key) === "extraButton")) == null ? void 0 : ee.contents, g.value = (W = (ke = n.value) == null ? void 0 : ke.find((L) => (L == null ? void 0 : L.key) === "page")) != null && W.contents ? !!((de = (Q = n.value) == null ? void 0 : Q.find((L) => (L == null ? void 0 : L.key) === "page")) != null && de.contents) : !1, j.value = (le = (Ae = n.value) == null ? void 0 : Ae.find((L) => (L == null ? void 0 : L.key) === "tableToForm")) == null ? void 0 : le.contents, i.value = (De = i.value) == null ? void 0 : De.map((L, Fe) => (Array.isArray(L) ? L = _a(L) : L = {
|
|
961
|
+
label: (L == null ? void 0 : L.label) ?? "",
|
|
962
|
+
prop: (L == null ? void 0 : L.label) === "操作" ? "operate" : L == null ? void 0 : L.prop,
|
|
963
|
+
width: L != null && L.width ? parseInt(L.width) : "",
|
|
964
|
+
fixed: (L == null ? void 0 : L.fixed) ?? void 0,
|
|
965
|
+
sortable: (L == null ? void 0 : L.sortable) ?? !1,
|
|
966
|
+
align: (L == null ? void 0 : L.align) ?? "center",
|
|
967
|
+
showOverflowTooltip: (L == null ? void 0 : L.showOverflowTooltip) ?? !0,
|
|
968
|
+
isNotDrag: (L == null ? void 0 : L.isNotDrag) ?? !1,
|
|
969
|
+
isEditCol: (L == null ? void 0 : L.isEditCol) ?? !1,
|
|
970
|
+
isOperate: (L == null ? void 0 : L.isOperate) ?? !1,
|
|
971
|
+
id: (L == null ? void 0 : L.id) ?? Fe
|
|
972
|
+
}, L)), i.value = (Z = i.value) != null && Z.every((L) => Array.isArray(L)) ? (Ee = i.value) == null ? void 0 : Ee[0] : i.value, k.value = (Be = k.value) == null ? void 0 : Be.map((L, Fe) => L = {
|
|
973
|
+
label: (L == null ? void 0 : L.label) ?? "",
|
|
974
|
+
type: (L == null ? void 0 : L.type) ?? "",
|
|
975
|
+
textColor: (L == null ? void 0 : L.textColor) ?? "#000000",
|
|
976
|
+
id: (L == null ? void 0 : L.id) ?? Fe
|
|
977
|
+
}), N.value = (je = N.value) == null ? void 0 : je.map((L, Fe) => L = {
|
|
978
|
+
label: (L == null ? void 0 : L.label) ?? "",
|
|
979
|
+
type: (L == null ? void 0 : L.type) ?? "",
|
|
980
|
+
background: (L == null ? void 0 : L.background) ?? "var(--ssComponent-primary-color)",
|
|
981
|
+
id: (L == null ? void 0 : L.id) ?? Fe
|
|
982
|
+
}), j.value)
|
|
983
|
+
j.value = (kl = j.value) == null ? void 0 : kl.map((L) => {
|
|
984
|
+
t.value++;
|
|
985
|
+
let Fe = L;
|
|
986
|
+
return Fe.id = t.value, Fe;
|
|
987
|
+
});
|
|
988
|
+
else {
|
|
989
|
+
let L = [];
|
|
990
|
+
const Fe = (gl = ca(u(i.value))) == null ? void 0 : gl.filter((Oe) => (Oe == null ? void 0 : Oe.prop) !== "operate");
|
|
991
|
+
Fe == null || Fe.forEach((Oe) => {
|
|
992
|
+
t.value++, L.push({
|
|
993
|
+
label: Oe == null ? void 0 : Oe.label,
|
|
994
|
+
name: Oe == null ? void 0 : Oe.label,
|
|
995
|
+
type: "Input",
|
|
996
|
+
value: "",
|
|
997
|
+
id: t.value,
|
|
998
|
+
contents: Oe == null ? void 0 : Oe.options
|
|
999
|
+
});
|
|
1000
|
+
}), j.value = L;
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
{ deep: !0, immediate: !0 }
|
|
1004
|
+
), (C, A) => {
|
|
1005
|
+
const B = be("svg-icon");
|
|
1006
|
+
return P(), z("div", Va, [
|
|
1007
|
+
x("div", Wa, [
|
|
1008
|
+
x("div", za, [
|
|
1009
|
+
A[2] || (A[2] = x("div", null, q("表头"), -1)),
|
|
1010
|
+
x("div", {
|
|
1011
|
+
class: "icon-content",
|
|
1012
|
+
onClick: me
|
|
1013
|
+
}, [
|
|
1014
|
+
V(B, {
|
|
1015
|
+
name: "Plus",
|
|
1016
|
+
class: "icon-size"
|
|
1017
|
+
}),
|
|
1018
|
+
A[1] || (A[1] = x("div", null, q("新增"), -1))
|
|
1019
|
+
])
|
|
1020
|
+
]),
|
|
1021
|
+
x("div", Ga, [
|
|
1022
|
+
(P(!0), z(he, null, ge(i.value, (E, K) => (P(), z("div", { key: K }, [
|
|
1023
|
+
x("div", Ma, [
|
|
1024
|
+
x("div", Za, q(E == null ? void 0 : E.label), 1),
|
|
1025
|
+
x("div", Ha, [
|
|
1026
|
+
V(B, {
|
|
1027
|
+
name: "ChildAdd",
|
|
1028
|
+
class: "svg-icon-content",
|
|
1029
|
+
style: { width: "24px", height: "24px" },
|
|
1030
|
+
onClick: (ee) => ue(E)
|
|
1031
|
+
}, null, 8, ["onClick"]),
|
|
1032
|
+
V(B, {
|
|
1033
|
+
name: "ChildFix",
|
|
1034
|
+
class: "svg-icon-content",
|
|
1035
|
+
style: { width: "24px", height: "24px" },
|
|
1036
|
+
onClick: (ee) => ye(E)
|
|
1037
|
+
}, null, 8, ["onClick"]),
|
|
1038
|
+
V(B, {
|
|
1039
|
+
name: "ChildDelete",
|
|
1040
|
+
class: "svg-icon-content",
|
|
1041
|
+
style: { width: "24px", height: "24px" },
|
|
1042
|
+
onClick: (ee) => Ne(E)
|
|
1043
|
+
}, null, 8, ["onClick"])
|
|
1044
|
+
])
|
|
1045
|
+
]),
|
|
1046
|
+
E != null && E.children && E.children.length > 0 ? (P(), z("div", Ka, [
|
|
1047
|
+
V(Jl, {
|
|
1048
|
+
tableChildContents: E == null ? void 0 : E.children,
|
|
1049
|
+
onDeleteChange: $e,
|
|
1050
|
+
onFixChange: fe
|
|
1051
|
+
}, null, 8, ["tableChildContents"])
|
|
1052
|
+
])) : Se("", !0)
|
|
1053
|
+
]))), 128))
|
|
1054
|
+
]),
|
|
1055
|
+
x("div", qa, [
|
|
1056
|
+
A[4] || (A[4] = x("div", null, q("行内按钮"), -1)),
|
|
1057
|
+
x("div", {
|
|
1058
|
+
class: "icon-content",
|
|
1059
|
+
onClick: _e
|
|
1060
|
+
}, [
|
|
1061
|
+
V(B, {
|
|
1062
|
+
name: "Plus",
|
|
1063
|
+
class: "icon-size"
|
|
1064
|
+
}),
|
|
1065
|
+
A[3] || (A[3] = x("div", null, q("新增"), -1))
|
|
1066
|
+
])
|
|
1067
|
+
]),
|
|
1068
|
+
x("div", Qa, [
|
|
1069
|
+
(P(!0), z(he, null, ge(k.value, (E, K) => (P(), z("div", { key: K }, [
|
|
1070
|
+
x("div", Xa, [
|
|
1071
|
+
x("div", Ya, q(E == null ? void 0 : E.label), 1),
|
|
1072
|
+
x("div", en, [
|
|
1073
|
+
V(B, {
|
|
1074
|
+
name: "ChildFix",
|
|
1075
|
+
style: { width: "24px", height: "24px" },
|
|
1076
|
+
class: "svg-icon-content",
|
|
1077
|
+
onClick: (ee) => M(E)
|
|
1078
|
+
}, null, 8, ["onClick"]),
|
|
1079
|
+
V(B, {
|
|
1080
|
+
name: "ChildDelete",
|
|
1081
|
+
class: "svg-icon-content",
|
|
1082
|
+
style: { width: "24px", height: "24px" },
|
|
1083
|
+
onClick: (ee) => te(E)
|
|
1084
|
+
}, null, 8, ["onClick"])
|
|
1085
|
+
])
|
|
1086
|
+
])
|
|
1087
|
+
]))), 128))
|
|
1088
|
+
]),
|
|
1089
|
+
x("div", ln, [
|
|
1090
|
+
A[6] || (A[6] = x("div", null, q("表外按钮"), -1)),
|
|
1091
|
+
x("div", {
|
|
1092
|
+
class: "icon-content",
|
|
1093
|
+
onClick: R
|
|
1094
|
+
}, [
|
|
1095
|
+
V(B, {
|
|
1096
|
+
name: "Plus",
|
|
1097
|
+
class: "icon-size"
|
|
1098
|
+
}),
|
|
1099
|
+
A[5] || (A[5] = x("div", null, q("新增"), -1))
|
|
1100
|
+
])
|
|
1101
|
+
]),
|
|
1102
|
+
x("div", an, [
|
|
1103
|
+
(P(!0), z(he, null, ge(N.value, (E, K) => (P(), z("div", { key: K }, [
|
|
1104
|
+
x("div", nn, [
|
|
1105
|
+
x("div", sn, q(E == null ? void 0 : E.label), 1),
|
|
1106
|
+
x("div", on, [
|
|
1107
|
+
V(B, {
|
|
1108
|
+
name: "ChildFix",
|
|
1109
|
+
style: { width: "24px", height: "24px" },
|
|
1110
|
+
class: "svg-icon-content",
|
|
1111
|
+
onClick: (ee) => F(E)
|
|
1112
|
+
}, null, 8, ["onClick"]),
|
|
1113
|
+
V(B, {
|
|
1114
|
+
name: "ChildDelete",
|
|
1115
|
+
class: "svg-icon-content",
|
|
1116
|
+
style: { width: "24px", height: "24px" },
|
|
1117
|
+
onClick: (ee) => G(E)
|
|
1118
|
+
}, null, 8, ["onClick"])
|
|
1119
|
+
])
|
|
1120
|
+
])
|
|
1121
|
+
]))), 128))
|
|
1122
|
+
]),
|
|
1123
|
+
x("div", rn, [
|
|
1124
|
+
A[8] || (A[8] = x("div", null, q("表格弹框字段设置"), -1)),
|
|
1125
|
+
x("div", {
|
|
1126
|
+
class: "icon-content",
|
|
1127
|
+
onClick: se
|
|
1128
|
+
}, [
|
|
1129
|
+
V(B, {
|
|
1130
|
+
name: "Plus",
|
|
1131
|
+
class: "icon-size"
|
|
1132
|
+
}),
|
|
1133
|
+
A[7] || (A[7] = x("div", null, q("新增"), -1))
|
|
1134
|
+
])
|
|
1135
|
+
]),
|
|
1136
|
+
x("div", tn, [
|
|
1137
|
+
(P(!0), z(he, null, ge(j.value, (E, K) => (P(), z("div", { key: K }, [
|
|
1138
|
+
x("div", un, [
|
|
1139
|
+
x("div", cn, q(E == null ? void 0 : E.label), 1),
|
|
1140
|
+
x("div", pn, [
|
|
1141
|
+
V(B, {
|
|
1142
|
+
name: "ChildFix",
|
|
1143
|
+
style: { width: "24px", height: "24px" },
|
|
1144
|
+
class: "svg-icon-content",
|
|
1145
|
+
onClick: (ee) => h(E)
|
|
1146
|
+
}, null, 8, ["onClick"]),
|
|
1147
|
+
V(B, {
|
|
1148
|
+
name: "ChildDelete",
|
|
1149
|
+
class: "svg-icon-content",
|
|
1150
|
+
style: { width: "24px", height: "24px" },
|
|
1151
|
+
onClick: (ee) => w(E)
|
|
1152
|
+
}, null, 8, ["onClick"])
|
|
1153
|
+
])
|
|
1154
|
+
])
|
|
1155
|
+
]))), 128))
|
|
1156
|
+
]),
|
|
1157
|
+
A[10] || (A[10] = x("div", { class: "operate-title" }, [
|
|
1158
|
+
x("div", null, q("分页"))
|
|
1159
|
+
], -1)),
|
|
1160
|
+
x("div", dn, [
|
|
1161
|
+
x("div", fn, [
|
|
1162
|
+
A[9] || (A[9] = x("div", { class: "operate-center-content" }, q("是否分页"), -1)),
|
|
1163
|
+
V(Fl, {
|
|
1164
|
+
modelValue: g.value,
|
|
1165
|
+
"onUpdate:modelValue": A[0] || (A[0] = (E) => g.value = E)
|
|
1166
|
+
}, null, 8, ["modelValue"])
|
|
1167
|
+
])
|
|
1168
|
+
])
|
|
1169
|
+
]),
|
|
1170
|
+
V(Ie, {
|
|
1171
|
+
visible: r.value,
|
|
1172
|
+
onBeforeDestroy: Pe,
|
|
1173
|
+
width: 840
|
|
1174
|
+
}, {
|
|
1175
|
+
default: ne(() => [
|
|
1176
|
+
x("div", hn, [
|
|
1177
|
+
(P(), ve(Te, {
|
|
1178
|
+
rowContents: v.value,
|
|
1179
|
+
key: v.value,
|
|
1180
|
+
isEnableWrap: !0,
|
|
1181
|
+
onChange: ie
|
|
1182
|
+
}, null, 8, ["rowContents"]))
|
|
1183
|
+
])
|
|
1184
|
+
]),
|
|
1185
|
+
footer: ne(() => [
|
|
1186
|
+
x("div", { class: "dialog-footer" }, [
|
|
1187
|
+
x("div", {
|
|
1188
|
+
onClick: Pe,
|
|
1189
|
+
class: "cancel-button button"
|
|
1190
|
+
}, q("取消")),
|
|
1191
|
+
x("div", {
|
|
1192
|
+
class: "ok-button button",
|
|
1193
|
+
onClick: Le
|
|
1194
|
+
}, q("确认"))
|
|
1195
|
+
])
|
|
1196
|
+
]),
|
|
1197
|
+
_: 1
|
|
1198
|
+
}, 8, ["visible"]),
|
|
1199
|
+
V(Ie, {
|
|
1200
|
+
visible: _.value,
|
|
1201
|
+
onBeforeDestroy: H,
|
|
1202
|
+
width: 840
|
|
1203
|
+
}, {
|
|
1204
|
+
default: ne(() => [
|
|
1205
|
+
x("div", mn, [
|
|
1206
|
+
(P(), ve(Te, {
|
|
1207
|
+
rowContents: f.value,
|
|
1208
|
+
key: f.value,
|
|
1209
|
+
isEnableWrap: !0,
|
|
1210
|
+
onChange: J
|
|
1211
|
+
}, null, 8, ["rowContents"]))
|
|
1212
|
+
])
|
|
1213
|
+
]),
|
|
1214
|
+
footer: ne(() => [
|
|
1215
|
+
x("div", { class: "dialog-footer" }, [
|
|
1216
|
+
x("div", {
|
|
1217
|
+
onClick: H,
|
|
1218
|
+
class: "cancel-button button"
|
|
1219
|
+
}, q("取消")),
|
|
1220
|
+
x("div", {
|
|
1221
|
+
class: "ok-button button",
|
|
1222
|
+
onClick: ae
|
|
1223
|
+
}, q("确认"))
|
|
1224
|
+
])
|
|
1225
|
+
]),
|
|
1226
|
+
_: 1
|
|
1227
|
+
}, 8, ["visible"]),
|
|
1228
|
+
V(Ie, {
|
|
1229
|
+
visible: y.value,
|
|
1230
|
+
onBeforeDestroy: Y,
|
|
1231
|
+
width: 840
|
|
1232
|
+
}, {
|
|
1233
|
+
default: ne(() => [
|
|
1234
|
+
x("div", vn, [
|
|
1235
|
+
(P(), ve(Te, {
|
|
1236
|
+
rowContents: o.value,
|
|
1237
|
+
key: o.value,
|
|
1238
|
+
isEnableWrap: !0,
|
|
1239
|
+
onChange: D
|
|
1240
|
+
}, null, 8, ["rowContents"]))
|
|
1241
|
+
])
|
|
1242
|
+
]),
|
|
1243
|
+
footer: ne(() => [
|
|
1244
|
+
x("div", { class: "dialog-footer" }, [
|
|
1245
|
+
x("div", {
|
|
1246
|
+
onClick: Y,
|
|
1247
|
+
class: "cancel-button button"
|
|
1248
|
+
}, q("取消")),
|
|
1249
|
+
x("div", {
|
|
1250
|
+
class: "ok-button button",
|
|
1251
|
+
onClick: X
|
|
1252
|
+
}, q("确认"))
|
|
1253
|
+
])
|
|
1254
|
+
]),
|
|
1255
|
+
_: 1
|
|
1256
|
+
}, 8, ["visible"]),
|
|
1257
|
+
V(Ie, {
|
|
1258
|
+
visible: p.value,
|
|
1259
|
+
onBeforeDestroy: O,
|
|
1260
|
+
width: 840
|
|
1261
|
+
}, {
|
|
1262
|
+
default: ne(() => [
|
|
1263
|
+
x("div", yn, [
|
|
1264
|
+
(P(), ve(Te, {
|
|
1265
|
+
rowContents: b.value,
|
|
1266
|
+
key: b.value,
|
|
1267
|
+
isEnableWrap: !0,
|
|
1268
|
+
onChange: oe
|
|
1269
|
+
}, null, 8, ["rowContents"]))
|
|
1270
|
+
])
|
|
1271
|
+
]),
|
|
1272
|
+
footer: ne(() => [
|
|
1273
|
+
x("div", { class: "dialog-footer" }, [
|
|
1274
|
+
x("div", {
|
|
1275
|
+
onClick: O,
|
|
1276
|
+
class: "cancel-button button"
|
|
1277
|
+
}, q("取消")),
|
|
1278
|
+
x("div", {
|
|
1279
|
+
class: "ok-button button",
|
|
1280
|
+
onClick: m
|
|
1281
|
+
}, q("确认"))
|
|
1282
|
+
])
|
|
1283
|
+
]),
|
|
1284
|
+
_: 1
|
|
1285
|
+
}, 8, ["visible"])
|
|
1286
|
+
]);
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
}, gn = /* @__PURE__ */ Ce(bn, [["__scopeId", "data-v-14ead5ff"]]), kn = { class: "form-operate-content" }, Cn = { class: "form-operate-item" }, _n = { class: "operate-title" }, $n = { class: "operate-content" }, xn = { class: "fix-content" }, wn = { class: "fix-button" }, An = { class: "operate-title" }, Tn = { class: "operate-content" }, In = { class: "fix-content" }, Dn = { class: "fix-button" }, En = { style: { display: "flex", "justify-content": "space-between" } }, On = { class: "form-content" }, Bn = { class: "form-content" }, Fn = {
|
|
1290
|
+
__name: "operate",
|
|
1291
|
+
props: {
|
|
1292
|
+
itemContents: {
|
|
1293
|
+
type: Array,
|
|
1294
|
+
default: () => []
|
|
1295
|
+
},
|
|
1296
|
+
originalItemContents: {
|
|
1297
|
+
type: Array,
|
|
1298
|
+
default: () => []
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
emits: ["change"],
|
|
1302
|
+
setup(a, { emit: s }) {
|
|
1303
|
+
const l = a, e = s, n = U(!1), r = U([]), p = U([]), i = U(!1), _ = U([]), v = U([]), g = U(""), T = U(!1), $ = U(0), I = U([]), k = U([]), N = async (h) => {
|
|
1304
|
+
var m, F, G, X, D, Y;
|
|
1305
|
+
n.value = !0;
|
|
1306
|
+
let w = [];
|
|
1307
|
+
const O = await ((G = (F = (m = xe) == null ? void 0 : m.find((M) => (M == null ? void 0 : M.key) === ((h == null ? void 0 : h.type) === "" ? "Input" : h == null ? void 0 : h.type))) == null ? void 0 : F.value) == null ? void 0 : G.value) ?? ((D = (X = xe) == null ? void 0 : X.find((M) => (M == null ? void 0 : M.key) === ((h == null ? void 0 : h.type) === "" ? "Input" : h == null ? void 0 : h.type))) == null ? void 0 : D.value);
|
|
1308
|
+
if (O == null || O.forEach((M) => {
|
|
1309
|
+
$.value++, w.push({
|
|
1310
|
+
label: M == null ? void 0 : M.label,
|
|
1311
|
+
name: M == null ? void 0 : M.label,
|
|
1312
|
+
type: M.type,
|
|
1313
|
+
value: (M == null ? void 0 : M.label) === "类型" && h[M.key] === "" ? "Input" : h[M.key],
|
|
1314
|
+
id: $.value,
|
|
1315
|
+
contents: M == null ? void 0 : M.options
|
|
1316
|
+
});
|
|
1317
|
+
}), h != null && h.menuSelect && ((Y = h == null ? void 0 : h.menuSelect) == null ? void 0 : Y.length) > 0) {
|
|
1318
|
+
const M = await ul(h == null ? void 0 : h.menuSelect);
|
|
1319
|
+
w = w == null ? void 0 : w.map((te) => ((te == null ? void 0 : te.name) === "组信息选项" && (te.contents = M), te));
|
|
1320
|
+
}
|
|
1321
|
+
g.value = h == null ? void 0 : h.id, r.value = await qe(Ye(w)), p.value = await qe(Ye(w));
|
|
1322
|
+
}, f = (h) => {
|
|
1323
|
+
var O;
|
|
1324
|
+
i.value = !0;
|
|
1325
|
+
let w = [];
|
|
1326
|
+
(O = cl) == null || O.forEach((m) => {
|
|
1327
|
+
$.value++, w.push({
|
|
1328
|
+
label: m == null ? void 0 : m.label,
|
|
1329
|
+
name: m == null ? void 0 : m.label,
|
|
1330
|
+
type: m.type,
|
|
1331
|
+
value: (m == null ? void 0 : m.label) === "类型" && h[m.key] === "" ? "normal" : h[m.key],
|
|
1332
|
+
id: $.value,
|
|
1333
|
+
contents: m == null ? void 0 : m.options
|
|
1334
|
+
});
|
|
1335
|
+
}), I.value = w, k.value = w, g.value = h == null ? void 0 : h.id;
|
|
1336
|
+
};
|
|
1337
|
+
we(
|
|
1338
|
+
() => T.value,
|
|
1339
|
+
() => {
|
|
1340
|
+
var w, O;
|
|
1341
|
+
let h = u(l.originalItemContents);
|
|
1342
|
+
(w = u(l.originalItemContents)) != null && w.find((m) => (m == null ? void 0 : m.key) === "enableWrap") ? h = (O = u(l.originalItemContents)) == null ? void 0 : O.map((m) => ((m == null ? void 0 : m.key) === "enableWrap" && (m.contents = !T.value), m)) : h.push({
|
|
1343
|
+
key: "enableWrap",
|
|
1344
|
+
contents: !T.value
|
|
1345
|
+
}), e("change", h);
|
|
1346
|
+
},
|
|
1347
|
+
{ deep: !0 }
|
|
1348
|
+
);
|
|
1349
|
+
const d = () => {
|
|
1350
|
+
var O, m, F, G, X;
|
|
1351
|
+
I.value = k.value;
|
|
1352
|
+
let h = {};
|
|
1353
|
+
if (g.value !== "" ? h.id = g.value : ($.value++, h.id = "id" + $.value), (O = I.value) == null || O.forEach((D) => {
|
|
1354
|
+
var M;
|
|
1355
|
+
const Y = (M = cl) == null ? void 0 : M.find((te) => (te == null ? void 0 : te.label) === (D == null ? void 0 : D.label));
|
|
1356
|
+
Y && (h[Y.key] = D.value);
|
|
1357
|
+
}), (m = _.value) != null && m.find((D) => D.id === h.id))
|
|
1358
|
+
_.value = (F = _.value) == null ? void 0 : F.map((D) => (D.id === h.id && (D = h), D));
|
|
1359
|
+
else {
|
|
1360
|
+
let D = u(_.value);
|
|
1361
|
+
_.value || (_.value = []), D.push(h), _.value = D;
|
|
1362
|
+
}
|
|
1363
|
+
i.value = !1, g.value = "";
|
|
1364
|
+
let w = u(l.originalItemContents);
|
|
1365
|
+
(G = u(l.originalItemContents)) != null && G.find((D) => (D == null ? void 0 : D.key) === "formButton") ? w = (X = u(l.originalItemContents)) == null ? void 0 : X.map((D) => ((D == null ? void 0 : D.key) === "formButton" && (D.contents = _.value), D)) : w.push({
|
|
1366
|
+
key: "formButton",
|
|
1367
|
+
contents: _.value
|
|
1368
|
+
}), e("change", w);
|
|
1369
|
+
}, y = (h) => {
|
|
1370
|
+
We.confirm("是否确认要删除", "", {
|
|
1371
|
+
confirmButtonText: "确认",
|
|
1372
|
+
cancelButtonText: "取消",
|
|
1373
|
+
type: "warning"
|
|
1374
|
+
}).then(
|
|
1375
|
+
() => {
|
|
1376
|
+
var w, O;
|
|
1377
|
+
v.value = (w = u(v.value)) == null ? void 0 : w.filter((m) => (m == null ? void 0 : m.id) !== (h == null ? void 0 : h.id)), e("change", (O = u(l.originalItemContents)) == null ? void 0 : O.map((m) => ((m == null ? void 0 : m.key) === "formContent" && (m.contents = v.value), m))), Ve({
|
|
1378
|
+
type: "success",
|
|
1379
|
+
message: "删除成功"
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
).catch(() => {
|
|
1383
|
+
});
|
|
1384
|
+
}, o = (h) => {
|
|
1385
|
+
We.confirm("是否确认要删除", "", {
|
|
1386
|
+
confirmButtonText: "确认",
|
|
1387
|
+
cancelButtonText: "取消",
|
|
1388
|
+
type: "warning"
|
|
1389
|
+
}).then(
|
|
1390
|
+
() => {
|
|
1391
|
+
var w, O;
|
|
1392
|
+
_.value = (w = u(_.value)) == null ? void 0 : w.filter((m) => (m == null ? void 0 : m.id) !== (h == null ? void 0 : h.id)), e("change", (O = u(l.originalItemContents)) == null ? void 0 : O.map((m) => ((m == null ? void 0 : m.key) === "formButton" && (m.contents = _.value), m))), Ve({
|
|
1393
|
+
type: "success",
|
|
1394
|
+
message: "删除成功"
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
).catch(() => {
|
|
1398
|
+
});
|
|
1399
|
+
}, c = () => {
|
|
1400
|
+
var w;
|
|
1401
|
+
i.value = !0;
|
|
1402
|
+
let h = [];
|
|
1403
|
+
(w = cl) == null || w.forEach((O) => {
|
|
1404
|
+
$.value++, h.push({
|
|
1405
|
+
label: O == null ? void 0 : O.label,
|
|
1406
|
+
name: O == null ? void 0 : O.label,
|
|
1407
|
+
type: O.type,
|
|
1408
|
+
value: (O == null ? void 0 : O.label) === "类型" ? "normal" : "",
|
|
1409
|
+
id: $.value,
|
|
1410
|
+
contents: O == null ? void 0 : O.options
|
|
1411
|
+
});
|
|
1412
|
+
}), I.value = h, k.value = h;
|
|
1413
|
+
}, t = () => {
|
|
1414
|
+
var w, O, m;
|
|
1415
|
+
n.value = !0;
|
|
1416
|
+
let h = [];
|
|
1417
|
+
(m = (O = (w = xe) == null ? void 0 : w.find((F) => (F == null ? void 0 : F.key) === "Input")) == null ? void 0 : O.value) == null || m.forEach((F) => {
|
|
1418
|
+
$.value++, h.push({
|
|
1419
|
+
label: F == null ? void 0 : F.label,
|
|
1420
|
+
name: F == null ? void 0 : F.label,
|
|
1421
|
+
type: F.type,
|
|
1422
|
+
value: (F == null ? void 0 : F.label) === "类型" ? "Input" : "",
|
|
1423
|
+
id: $.value,
|
|
1424
|
+
contents: F == null ? void 0 : F.options
|
|
1425
|
+
});
|
|
1426
|
+
}), r.value = h, p.value = h;
|
|
1427
|
+
}, b = (h) => {
|
|
1428
|
+
let w = u(k.value);
|
|
1429
|
+
w = w == null ? void 0 : w.map((O) => (O.value = h == null ? void 0 : h[O.name], O)), k.value = w;
|
|
1430
|
+
}, S = async (h) => {
|
|
1431
|
+
var w, O, m, F, G, X, D, Y, M, te, me, _e;
|
|
1432
|
+
if ((h == null ? void 0 : h.类型) !== ((O = (w = p.value) == null ? void 0 : w.find((J) => (J == null ? void 0 : J.label) === "类型")) == null ? void 0 : O.value)) {
|
|
1433
|
+
let J = [];
|
|
1434
|
+
const ae = await ((G = (F = (m = xe) == null ? void 0 : m.find((H) => (H == null ? void 0 : H.key) === ((h == null ? void 0 : h.类型) === "" ? "Input" : h == null ? void 0 : h.类型))) == null ? void 0 : F.value) == null ? void 0 : G.value) ? await ((te = (M = (Y = xe) == null ? void 0 : Y.find((H) => (H == null ? void 0 : H.key) === ((h == null ? void 0 : h.类型) === "" ? "Input" : h == null ? void 0 : h.类型))) == null ? void 0 : M.value) == null ? void 0 : te.value) : (D = (X = xe) == null ? void 0 : X.find((H) => (H == null ? void 0 : H.key) === ((h == null ? void 0 : h.类型) === "" ? "Input" : h == null ? void 0 : h.类型))) == null ? void 0 : D.value;
|
|
1435
|
+
if (ae == null || ae.forEach((H) => {
|
|
1436
|
+
$.value++, J.push({
|
|
1437
|
+
label: H == null ? void 0 : H.label,
|
|
1438
|
+
name: H == null ? void 0 : H.label,
|
|
1439
|
+
type: H.type,
|
|
1440
|
+
value: (h == null ? void 0 : h[H.label]) ?? "",
|
|
1441
|
+
id: $.value,
|
|
1442
|
+
contents: H == null ? void 0 : H.options
|
|
1443
|
+
});
|
|
1444
|
+
}), h != null && h.菜单选项 && ((me = h == null ? void 0 : h.菜单选项) == null ? void 0 : me.length) > 0) {
|
|
1445
|
+
const H = await ul(h == null ? void 0 : h.菜单选项);
|
|
1446
|
+
J = J == null ? void 0 : J.map((ue) => ((ue == null ? void 0 : ue.name) === "组信息选项" && (ue.contents = H), ue));
|
|
1447
|
+
}
|
|
1448
|
+
p.value = await qe(u(J)), r.value = await qe(u(J));
|
|
1449
|
+
} else {
|
|
1450
|
+
let J = u(p.value);
|
|
1451
|
+
if (J = J == null ? void 0 : J.map((ae) => (ae.value = h == null ? void 0 : h[ae.name], ae)), h != null && h.菜单选项 && ((_e = h == null ? void 0 : h.菜单选项) == null ? void 0 : _e.length) > 0) {
|
|
1452
|
+
const ae = await ul(h == null ? void 0 : h.菜单选项);
|
|
1453
|
+
J = J == null ? void 0 : J.map((H) => ((H == null ? void 0 : H.name) === "组信息选项" && (H.contents = ae), H));
|
|
1454
|
+
}
|
|
1455
|
+
J = Ye(J), p.value = await qe(u(J));
|
|
1456
|
+
}
|
|
1457
|
+
}, j = (h) => {
|
|
1458
|
+
h || (r.value = p.value);
|
|
1459
|
+
}, R = async (h) => {
|
|
1460
|
+
}, se = async () => {
|
|
1461
|
+
var m, F, G, X, D, Y, M, te, me, _e;
|
|
1462
|
+
r.value = p.value;
|
|
1463
|
+
let h = {};
|
|
1464
|
+
g.value !== "" ? h.id = g.value : ($.value++, h.id = "id" + $.value);
|
|
1465
|
+
let w = await ((G = (F = (m = xe) == null ? void 0 : m.find((J) => {
|
|
1466
|
+
var ae, H;
|
|
1467
|
+
return (J == null ? void 0 : J.key) === (((H = (ae = r.value) == null ? void 0 : ae.find((ue) => (ue == null ? void 0 : ue.label) === "类型")) == null ? void 0 : H.value) ?? "label");
|
|
1468
|
+
})) == null ? void 0 : F.value) == null ? void 0 : G.value) ?? ((D = (X = xe) == null ? void 0 : X.find((J) => {
|
|
1469
|
+
var ae, H;
|
|
1470
|
+
return (J == null ? void 0 : J.key) === (((H = (ae = r.value) == null ? void 0 : ae.find((ue) => (ue == null ? void 0 : ue.label) === "类型")) == null ? void 0 : H.value) ?? "label");
|
|
1471
|
+
})) == null ? void 0 : D.value);
|
|
1472
|
+
if ((Y = r.value) == null || Y.forEach((J) => {
|
|
1473
|
+
const ae = w == null ? void 0 : w.find((H) => (H == null ? void 0 : H.label) === (J == null ? void 0 : J.label));
|
|
1474
|
+
ae && (h[ae.key] = J.value);
|
|
1475
|
+
}), h.width = 1, h.key = h == null ? void 0 : h.label, (M = v.value) != null && M.find((J) => J.id === h.id))
|
|
1476
|
+
v.value = (te = v.value) == null ? void 0 : te.map((J) => (J.id === h.id && (J = h), J));
|
|
1477
|
+
else {
|
|
1478
|
+
let J = u(v.value);
|
|
1479
|
+
J.push(h), v.value = J;
|
|
1480
|
+
}
|
|
1481
|
+
v.value = v.value.map(({ id: J, ...ae }) => ae), n.value = !1, g.value = "";
|
|
1482
|
+
let O = u(l.originalItemContents);
|
|
1483
|
+
(me = u(l.originalItemContents)) != null && me.find((J) => (J == null ? void 0 : J.key) === "formContent") ? O = (_e = u(l.originalItemContents)) == null ? void 0 : _e.map((J) => ((J == null ? void 0 : J.key) === "formContent" && (J.contents = v.value), J)) : O.push({
|
|
1484
|
+
key: "formContent",
|
|
1485
|
+
contents: v.value
|
|
1486
|
+
}), e("change", O);
|
|
1487
|
+
}, oe = () => {
|
|
1488
|
+
n.value = !1, i.value = !1, g.value = "", p.value = [], k.value = [];
|
|
1489
|
+
};
|
|
1490
|
+
return we(
|
|
1491
|
+
() => l.originalItemContents,
|
|
1492
|
+
() => {
|
|
1493
|
+
var w, O, m, F, G, X;
|
|
1494
|
+
if (!l.originalItemContents || l.originalItemContents.length === 0) return;
|
|
1495
|
+
const h = u(l.originalItemContents);
|
|
1496
|
+
v.value = ((w = h == null ? void 0 : h.find((D) => (D == null ? void 0 : D.key) === "formContent")) == null ? void 0 : w.contents) ?? [], _.value = ((O = h == null ? void 0 : h.find((D) => (D == null ? void 0 : D.key) === "formButton")) == null ? void 0 : O.contents) ?? [], T.value = (m = h == null ? void 0 : h.find((D) => (D == null ? void 0 : D.key) === "enableWrap")) != null && m.contents ? !((F = h == null ? void 0 : h.find((D) => (D == null ? void 0 : D.key) === "enableWrap")) != null && F.contents) : !0, v.value = (G = u(v.value)) == null ? void 0 : G.map((D, Y) => {
|
|
1497
|
+
let M = D;
|
|
1498
|
+
return M.id = (D == null ? void 0 : D.id) ?? Y, D != null && D.label || (D.label = (D == null ? void 0 : D.key) ?? (D == null ? void 0 : D.label) ?? ""), D != null && D.type || (D.type = (D == null ? void 0 : D.type) ?? ""), D.contents = (D == null ? void 0 : D.options) ?? "", M;
|
|
1499
|
+
}), v.value = Ye(v.value), _.value = (X = _.value) == null ? void 0 : X.map((D, Y) => D = {
|
|
1500
|
+
label: (D == null ? void 0 : D.label) ?? "",
|
|
1501
|
+
type: (D == null ? void 0 : D.type) ?? "",
|
|
1502
|
+
background: (D == null ? void 0 : D.background) ?? "var(--ssComponent-primary-color)",
|
|
1503
|
+
id: (D == null ? void 0 : D.id) ?? Y
|
|
1504
|
+
});
|
|
1505
|
+
},
|
|
1506
|
+
{ deep: !0, immediate: !0 }
|
|
1507
|
+
), (h, w) => {
|
|
1508
|
+
const O = be("svg-icon");
|
|
1509
|
+
return P(), z("div", kn, [
|
|
1510
|
+
x("div", Cn, [
|
|
1511
|
+
x("div", _n, [
|
|
1512
|
+
w[2] || (w[2] = x("div", null, q("表单内容"), -1)),
|
|
1513
|
+
x("div", {
|
|
1514
|
+
class: "icon-content",
|
|
1515
|
+
onClick: t
|
|
1516
|
+
}, [
|
|
1517
|
+
V(O, {
|
|
1518
|
+
name: "Plus",
|
|
1519
|
+
class: "icon-size"
|
|
1520
|
+
}),
|
|
1521
|
+
w[1] || (w[1] = x("div", null, q("新增"), -1))
|
|
1522
|
+
])
|
|
1523
|
+
]),
|
|
1524
|
+
x("div", $n, [
|
|
1525
|
+
(P(!0), z(he, null, ge(v.value, (m, F) => (P(), z("div", { key: F }, [
|
|
1526
|
+
x("div", xn, [
|
|
1527
|
+
x("div", null, q(m.label), 1),
|
|
1528
|
+
x("div", wn, [
|
|
1529
|
+
V(O, {
|
|
1530
|
+
name: "ChildFix",
|
|
1531
|
+
class: "svg-icon-content",
|
|
1532
|
+
style: { width: "24px", height: "24px" },
|
|
1533
|
+
onClick: (G) => N(m)
|
|
1534
|
+
}, null, 8, ["onClick"]),
|
|
1535
|
+
V(O, {
|
|
1536
|
+
name: "ChildDelete",
|
|
1537
|
+
class: "svg-icon-content",
|
|
1538
|
+
style: { width: "24px", height: "24px" },
|
|
1539
|
+
onClick: (G) => y(m)
|
|
1540
|
+
}, null, 8, ["onClick"])
|
|
1541
|
+
])
|
|
1542
|
+
])
|
|
1543
|
+
]))), 128))
|
|
1544
|
+
]),
|
|
1545
|
+
x("div", An, [
|
|
1546
|
+
w[4] || (w[4] = x("div", null, q("表单按钮"), -1)),
|
|
1547
|
+
x("div", {
|
|
1548
|
+
class: "icon-content",
|
|
1549
|
+
onClick: c
|
|
1550
|
+
}, [
|
|
1551
|
+
V(O, {
|
|
1552
|
+
name: "Plus",
|
|
1553
|
+
class: "icon-size"
|
|
1554
|
+
}),
|
|
1555
|
+
w[3] || (w[3] = x("div", null, q("新增"), -1))
|
|
1556
|
+
])
|
|
1557
|
+
]),
|
|
1558
|
+
x("div", Tn, [
|
|
1559
|
+
(P(!0), z(he, null, ge(_.value, (m, F) => (P(), z("div", { key: F }, [
|
|
1560
|
+
x("div", In, [
|
|
1561
|
+
x("div", null, q(m.label), 1),
|
|
1562
|
+
x("div", Dn, [
|
|
1563
|
+
V(O, {
|
|
1564
|
+
name: "ChildFix",
|
|
1565
|
+
class: "svg-icon-content",
|
|
1566
|
+
style: { width: "24px", height: "24px" },
|
|
1567
|
+
onClick: (G) => f(m)
|
|
1568
|
+
}, null, 8, ["onClick"]),
|
|
1569
|
+
V(O, {
|
|
1570
|
+
name: "ChildDelete",
|
|
1571
|
+
class: "svg-icon-content",
|
|
1572
|
+
style: { width: "24px", height: "24px" },
|
|
1573
|
+
onClick: (G) => o(m)
|
|
1574
|
+
}, null, 8, ["onClick"])
|
|
1575
|
+
])
|
|
1576
|
+
])
|
|
1577
|
+
]))), 128))
|
|
1578
|
+
]),
|
|
1579
|
+
w[6] || (w[6] = x("div", { class: "operate-title" }, [
|
|
1580
|
+
x("div", null, q("表单布局"))
|
|
1581
|
+
], -1)),
|
|
1582
|
+
x("div", En, [
|
|
1583
|
+
w[5] || (w[5] = x("div", { class: "operate-center-content" }, q("是否自动撑宽"), -1)),
|
|
1584
|
+
V(Fl, {
|
|
1585
|
+
modelValue: T.value,
|
|
1586
|
+
"onUpdate:modelValue": w[0] || (w[0] = (m) => T.value = m)
|
|
1587
|
+
}, null, 8, ["modelValue"])
|
|
1588
|
+
])
|
|
1589
|
+
]),
|
|
1590
|
+
V(Ie, {
|
|
1591
|
+
visible: n.value,
|
|
1592
|
+
onBeforeDestroy: oe,
|
|
1593
|
+
width: 840
|
|
1594
|
+
}, {
|
|
1595
|
+
default: ne(() => [
|
|
1596
|
+
x("div", On, [
|
|
1597
|
+
(P(), ve(Te, {
|
|
1598
|
+
rowContents: r.value,
|
|
1599
|
+
key: r.value,
|
|
1600
|
+
isEnableWrap: !0,
|
|
1601
|
+
onChange: S,
|
|
1602
|
+
onChangeVisible: j,
|
|
1603
|
+
onBlurChange: R
|
|
1604
|
+
}, null, 8, ["rowContents"]))
|
|
1605
|
+
])
|
|
1606
|
+
]),
|
|
1607
|
+
footer: ne(() => [
|
|
1608
|
+
x("div", { class: "dialog-footer" }, [
|
|
1609
|
+
x("div", {
|
|
1610
|
+
onClick: oe,
|
|
1611
|
+
class: "cancel-button button"
|
|
1612
|
+
}, q("取消")),
|
|
1613
|
+
x("div", {
|
|
1614
|
+
class: "ok-button button",
|
|
1615
|
+
onClick: se
|
|
1616
|
+
}, q("确认"))
|
|
1617
|
+
])
|
|
1618
|
+
]),
|
|
1619
|
+
_: 1
|
|
1620
|
+
}, 8, ["visible"]),
|
|
1621
|
+
V(Ie, {
|
|
1622
|
+
visible: i.value,
|
|
1623
|
+
onBeforeDestroy: oe,
|
|
1624
|
+
width: 840
|
|
1625
|
+
}, {
|
|
1626
|
+
default: ne(() => [
|
|
1627
|
+
x("div", Bn, [
|
|
1628
|
+
(P(), ve(Te, {
|
|
1629
|
+
rowContents: I.value,
|
|
1630
|
+
key: I.value,
|
|
1631
|
+
isEnableWrap: !0,
|
|
1632
|
+
onChange: b
|
|
1633
|
+
}, null, 8, ["rowContents"]))
|
|
1634
|
+
])
|
|
1635
|
+
]),
|
|
1636
|
+
footer: ne(() => [
|
|
1637
|
+
x("div", { class: "dialog-footer" }, [
|
|
1638
|
+
x("div", {
|
|
1639
|
+
onClick: oe,
|
|
1640
|
+
class: "cancel-button button"
|
|
1641
|
+
}, q("取消")),
|
|
1642
|
+
x("div", {
|
|
1643
|
+
class: "ok-button button",
|
|
1644
|
+
onClick: d
|
|
1645
|
+
}, q("确认"))
|
|
1646
|
+
])
|
|
1647
|
+
]),
|
|
1648
|
+
_: 1
|
|
1649
|
+
}, 8, ["visible"])
|
|
1650
|
+
]);
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1653
|
+
}, xl = /* @__PURE__ */ Ce(Fn, [["__scopeId", "data-v-204cab68"]]), Nn = { class: "step-module content" }, Sn = { class: "module-data" }, Ln = { class: "step-module layout" }, jn = { class: "form-content" }, Un = /* @__PURE__ */ Me({
|
|
1654
|
+
__name: "operate",
|
|
1655
|
+
props: {
|
|
1656
|
+
itemContents: {
|
|
1657
|
+
type: Array,
|
|
1658
|
+
default: () => []
|
|
1659
|
+
},
|
|
1660
|
+
originalItemContents: {
|
|
1661
|
+
type: Array,
|
|
1662
|
+
default: () => []
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
emits: ["change"],
|
|
1666
|
+
setup(a, { emit: s }) {
|
|
1667
|
+
const l = a, e = s, n = U([
|
|
1668
|
+
{
|
|
1669
|
+
label: "方向:",
|
|
1670
|
+
prop: "direction",
|
|
1671
|
+
type: "RADIO",
|
|
1672
|
+
contents: [
|
|
1673
|
+
{
|
|
1674
|
+
label: "水平",
|
|
1675
|
+
value: "horizontal"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
label: "垂直",
|
|
1679
|
+
value: "vertical"
|
|
1680
|
+
}
|
|
1681
|
+
],
|
|
1682
|
+
value: "horizontal"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
label: "是否居中:",
|
|
1686
|
+
prop: "alignCenter",
|
|
1687
|
+
type: "RADIO",
|
|
1688
|
+
contents: [
|
|
1689
|
+
{
|
|
1690
|
+
label: "是",
|
|
1691
|
+
value: !0
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
label: "否",
|
|
1695
|
+
value: !1
|
|
1696
|
+
}
|
|
1697
|
+
],
|
|
1698
|
+
value: !0
|
|
1699
|
+
},
|
|
1700
|
+
// {
|
|
1701
|
+
// label: '是否交互',
|
|
1702
|
+
// prop: 'allowTrigger',
|
|
1703
|
+
// type: 'RADIO',
|
|
1704
|
+
// contents: [
|
|
1705
|
+
// {
|
|
1706
|
+
// label: '是',
|
|
1707
|
+
// value: true,
|
|
1708
|
+
// }, {
|
|
1709
|
+
// label: '否',
|
|
1710
|
+
// value: false,
|
|
1711
|
+
// },
|
|
1712
|
+
// ],
|
|
1713
|
+
// value: 'horizontal'
|
|
1714
|
+
// },
|
|
1715
|
+
{
|
|
1716
|
+
label: "应用简洁风格",
|
|
1717
|
+
prop: "simple",
|
|
1718
|
+
type: "RADIO",
|
|
1719
|
+
contents: [
|
|
1720
|
+
{
|
|
1721
|
+
label: "是",
|
|
1722
|
+
value: !0
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
label: "否",
|
|
1726
|
+
value: !1
|
|
1727
|
+
}
|
|
1728
|
+
],
|
|
1729
|
+
value: !1
|
|
1730
|
+
}
|
|
1731
|
+
]), r = U([
|
|
1732
|
+
{
|
|
1733
|
+
label: "",
|
|
1734
|
+
prop: "index",
|
|
1735
|
+
type: "input",
|
|
1736
|
+
value: "",
|
|
1737
|
+
isFormColHidden: !0
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
label: "标题",
|
|
1741
|
+
prop: "title",
|
|
1742
|
+
type: "input",
|
|
1743
|
+
value: ""
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
label: "描述",
|
|
1747
|
+
prop: "description",
|
|
1748
|
+
type: "input",
|
|
1749
|
+
value: ""
|
|
1750
|
+
}
|
|
1751
|
+
]), p = U([
|
|
1752
|
+
{
|
|
1753
|
+
label: "取消",
|
|
1754
|
+
background: "#c0c4cc"
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
label: "确认",
|
|
1758
|
+
background: "#436aaf"
|
|
1759
|
+
}
|
|
1760
|
+
]), i = ml({
|
|
1761
|
+
visible: !1,
|
|
1762
|
+
width: "40%",
|
|
1763
|
+
title: "步骤条"
|
|
1764
|
+
}), _ = U("create"), v = U({}), g = U([]), T = (f) => {
|
|
1765
|
+
var d;
|
|
1766
|
+
v.value = f, e("change", (d = k()) == null ? void 0 : d.compData);
|
|
1767
|
+
}, $ = (f, d) => {
|
|
1768
|
+
var y, o;
|
|
1769
|
+
switch (f) {
|
|
1770
|
+
case "create":
|
|
1771
|
+
(y = r.value) == null || y.forEach((c) => {
|
|
1772
|
+
c.value = "";
|
|
1773
|
+
}), _.value = "create", i.visible = !0;
|
|
1774
|
+
break;
|
|
1775
|
+
case "update":
|
|
1776
|
+
(o = r.value) == null || o.forEach((c) => {
|
|
1777
|
+
c.value = d[c == null ? void 0 : c.prop];
|
|
1778
|
+
}), _.value = "update", i.visible = !0;
|
|
1779
|
+
break;
|
|
1780
|
+
case "delete":
|
|
1781
|
+
g.value.splice(d, 1), _.value = "delete";
|
|
1782
|
+
break;
|
|
1783
|
+
}
|
|
1784
|
+
}, I = (f) => {
|
|
1785
|
+
var d, y, o;
|
|
1786
|
+
if ((f == null ? void 0 : f.buttonName) === "确认") {
|
|
1787
|
+
const c = u(f == null ? void 0 : f.content);
|
|
1788
|
+
switch (Object.keys(c).forEach((t) => {
|
|
1789
|
+
c[t] === "" && delete c[t];
|
|
1790
|
+
}), _.value) {
|
|
1791
|
+
case "create":
|
|
1792
|
+
g.value.push({
|
|
1793
|
+
...c,
|
|
1794
|
+
index: ((d = g.value) == null ? void 0 : d.length) + 1
|
|
1795
|
+
});
|
|
1796
|
+
break;
|
|
1797
|
+
case "update":
|
|
1798
|
+
g.value = (y = g.value) == null ? void 0 : y.map((t) => t.index === (c == null ? void 0 : c.index) ? {
|
|
1799
|
+
...t,
|
|
1800
|
+
title: c == null ? void 0 : c.title,
|
|
1801
|
+
description: c == null ? void 0 : c.description
|
|
1802
|
+
} : t);
|
|
1803
|
+
break;
|
|
1804
|
+
}
|
|
1805
|
+
e("change", (o = k()) == null ? void 0 : o.compData), i.visible = !1;
|
|
1806
|
+
} else
|
|
1807
|
+
i.visible = !1;
|
|
1808
|
+
}, k = () => ({
|
|
1809
|
+
comp: "Step",
|
|
1810
|
+
compData: [
|
|
1811
|
+
{
|
|
1812
|
+
key: "stepList",
|
|
1813
|
+
contents: g.value
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
key: "stepConfig",
|
|
1817
|
+
contents: v.value
|
|
1818
|
+
}
|
|
1819
|
+
]
|
|
1820
|
+
}), N = () => {
|
|
1821
|
+
i.visible = !1;
|
|
1822
|
+
};
|
|
1823
|
+
return we(() => l == null ? void 0 : l.itemContents, (f) => {
|
|
1824
|
+
var d, y;
|
|
1825
|
+
f && (v.value = ((d = f == null ? void 0 : f.find((o) => o.key === "stepConfig")) == null ? void 0 : d.contents) ?? {}, g.value = ((y = f == null ? void 0 : f.find((o) => o.key === "stepList")) == null ? void 0 : y.contents) ?? []);
|
|
1826
|
+
}, { immediate: !0 }), (f, d) => {
|
|
1827
|
+
const y = be("svg-icon"), o = be("el-button");
|
|
1828
|
+
return P(), z(he, null, [
|
|
1829
|
+
x("div", null, [
|
|
1830
|
+
x("div", Nn, [
|
|
1831
|
+
d[2] || (d[2] = x("h4", { class: "module-title" }, "内容", -1)),
|
|
1832
|
+
x("div", {
|
|
1833
|
+
class: "module-icon",
|
|
1834
|
+
onClick: d[0] || (d[0] = (c) => $("create"))
|
|
1835
|
+
}, [
|
|
1836
|
+
V(y, {
|
|
1837
|
+
name: "Plus",
|
|
1838
|
+
class: "icon-size"
|
|
1839
|
+
}),
|
|
1840
|
+
d[1] || (d[1] = x("div", null, "新增", -1))
|
|
1841
|
+
])
|
|
1842
|
+
]),
|
|
1843
|
+
x("div", Sn, [
|
|
1844
|
+
(P(!0), z(he, null, ge(g.value, (c, t) => (P(), z("div", {
|
|
1845
|
+
class: "module-data-item",
|
|
1846
|
+
key: t
|
|
1847
|
+
}, [
|
|
1848
|
+
x("span", null, q(c == null ? void 0 : c.title), 1),
|
|
1849
|
+
x("div", null, [
|
|
1850
|
+
V(o, {
|
|
1851
|
+
type: "primary",
|
|
1852
|
+
size: "small",
|
|
1853
|
+
onClick: (b) => $("update", { ...c, index: t + 1 })
|
|
1854
|
+
}, {
|
|
1855
|
+
default: ne(() => d[3] || (d[3] = [
|
|
1856
|
+
ze("修改")
|
|
1857
|
+
])),
|
|
1858
|
+
_: 2,
|
|
1859
|
+
__: [3]
|
|
1860
|
+
}, 1032, ["onClick"]),
|
|
1861
|
+
V(o, {
|
|
1862
|
+
type: "danger",
|
|
1863
|
+
size: "small",
|
|
1864
|
+
onClick: (b) => $("delete", t)
|
|
1865
|
+
}, {
|
|
1866
|
+
default: ne(() => d[4] || (d[4] = [
|
|
1867
|
+
ze("删除")
|
|
1868
|
+
])),
|
|
1869
|
+
_: 2,
|
|
1870
|
+
__: [4]
|
|
1871
|
+
}, 1032, ["onClick"])
|
|
1872
|
+
])
|
|
1873
|
+
]))), 128))
|
|
1874
|
+
]),
|
|
1875
|
+
x("div", Ln, [
|
|
1876
|
+
d[5] || (d[5] = x("div", { class: "module-title" }, "布局", -1)),
|
|
1877
|
+
V(Te, {
|
|
1878
|
+
rowContents: n.value,
|
|
1879
|
+
onChange: T
|
|
1880
|
+
}, null, 8, ["rowContents"])
|
|
1881
|
+
])
|
|
1882
|
+
]),
|
|
1883
|
+
V(Ie, {
|
|
1884
|
+
visible: i.visible,
|
|
1885
|
+
title: i.title,
|
|
1886
|
+
onBeforeDestroy: N,
|
|
1887
|
+
width: i.width
|
|
1888
|
+
}, {
|
|
1889
|
+
default: ne(() => [
|
|
1890
|
+
x("div", jn, [
|
|
1891
|
+
(P(), ve(Te, {
|
|
1892
|
+
rowContents: r.value,
|
|
1893
|
+
key: r.value,
|
|
1894
|
+
isEnableWrap: !1,
|
|
1895
|
+
isButtonRow: !1,
|
|
1896
|
+
isStartJustify: !1,
|
|
1897
|
+
buttonValue: p.value,
|
|
1898
|
+
onOnButtonClick: I
|
|
1899
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
1900
|
+
])
|
|
1901
|
+
]),
|
|
1902
|
+
_: 1
|
|
1903
|
+
}, 8, ["visible", "title", "width"])
|
|
1904
|
+
], 64);
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
}), Pn = /* @__PURE__ */ Ce(Un, [["__scopeId", "data-v-47438605"]]), Rn = { class: "step-module content" }, Jn = { class: "module-data" }, Vn = { class: "step-module layout" }, Wn = { class: "form-content" }, zn = /* @__PURE__ */ Me({
|
|
1908
|
+
__name: "operate",
|
|
1909
|
+
props: {
|
|
1910
|
+
itemContents: {
|
|
1911
|
+
type: Array,
|
|
1912
|
+
default: () => []
|
|
1913
|
+
},
|
|
1914
|
+
originalItemContents: {
|
|
1915
|
+
type: Array,
|
|
1916
|
+
default: () => []
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
emits: ["change"],
|
|
1920
|
+
setup(a, { emit: s }) {
|
|
1921
|
+
const l = a, e = s, n = U("create"), r = U({}), p = U([]), i = U([
|
|
1922
|
+
{
|
|
1923
|
+
label: "方向:",
|
|
1924
|
+
prop: "placement",
|
|
1925
|
+
type: "radio",
|
|
1926
|
+
contents: [
|
|
1927
|
+
{
|
|
1928
|
+
label: "底部",
|
|
1929
|
+
value: "bottom"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
label: "顶部",
|
|
1933
|
+
value: "top"
|
|
1934
|
+
}
|
|
1935
|
+
],
|
|
1936
|
+
value: "bottom"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
label: "节点类型:",
|
|
1940
|
+
prop: "type",
|
|
1941
|
+
type: "select",
|
|
1942
|
+
contents: [
|
|
1943
|
+
{
|
|
1944
|
+
label: "primary",
|
|
1945
|
+
value: "primary"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
label: "success",
|
|
1949
|
+
value: "success"
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
label: "warning",
|
|
1953
|
+
value: "warning"
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
label: "danger",
|
|
1957
|
+
value: "danger"
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
label: "info",
|
|
1961
|
+
value: "info"
|
|
1962
|
+
}
|
|
1963
|
+
],
|
|
1964
|
+
value: "primary"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
label: "颜色:",
|
|
1968
|
+
prop: "color",
|
|
1969
|
+
type: "color",
|
|
1970
|
+
value: ""
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
label: "尺寸:",
|
|
1974
|
+
prop: "size",
|
|
1975
|
+
type: "radio",
|
|
1976
|
+
contents: [
|
|
1977
|
+
{
|
|
1978
|
+
label: "normal",
|
|
1979
|
+
value: "normal"
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
label: "large",
|
|
1983
|
+
value: "large"
|
|
1984
|
+
}
|
|
1985
|
+
],
|
|
1986
|
+
value: "normal"
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
label: "是否空心",
|
|
1990
|
+
prop: "isHollow",
|
|
1991
|
+
type: "RADIO",
|
|
1992
|
+
contents: [
|
|
1993
|
+
{
|
|
1994
|
+
label: "是",
|
|
1995
|
+
value: !0
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
label: "否",
|
|
1999
|
+
value: !1
|
|
2000
|
+
}
|
|
2001
|
+
],
|
|
2002
|
+
value: !0
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
label: "是否居中",
|
|
2006
|
+
prop: "isCenter",
|
|
2007
|
+
type: "RADIO",
|
|
2008
|
+
contents: [
|
|
2009
|
+
{
|
|
2010
|
+
label: "是",
|
|
2011
|
+
value: !0
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
label: "否",
|
|
2015
|
+
value: !1
|
|
2016
|
+
}
|
|
2017
|
+
],
|
|
2018
|
+
value: !0
|
|
2019
|
+
}
|
|
2020
|
+
]), _ = U([
|
|
2021
|
+
{
|
|
2022
|
+
label: "",
|
|
2023
|
+
prop: "index",
|
|
2024
|
+
type: "input",
|
|
2025
|
+
value: "",
|
|
2026
|
+
isFormColHidden: !0
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
label: "内容",
|
|
2030
|
+
prop: "content",
|
|
2031
|
+
type: "input",
|
|
2032
|
+
value: ""
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
label: "时间戳",
|
|
2036
|
+
prop: "timestamp",
|
|
2037
|
+
type: "datetime",
|
|
2038
|
+
value: ""
|
|
2039
|
+
}
|
|
2040
|
+
]), v = U([
|
|
2041
|
+
{
|
|
2042
|
+
label: "取消",
|
|
2043
|
+
background: "#c0c4cc"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
label: "确认",
|
|
2047
|
+
background: "#436aaf"
|
|
2048
|
+
}
|
|
2049
|
+
]), g = ml({
|
|
2050
|
+
visible: !1,
|
|
2051
|
+
width: "40%",
|
|
2052
|
+
title: "时间线"
|
|
2053
|
+
}), T = (f) => {
|
|
2054
|
+
var d;
|
|
2055
|
+
r.value = f, console.log(1212, f), e("change", (d = k()) == null ? void 0 : d.compData);
|
|
2056
|
+
}, $ = (f, d) => {
|
|
2057
|
+
var y, o;
|
|
2058
|
+
switch (f) {
|
|
2059
|
+
case "create":
|
|
2060
|
+
(y = _.value) == null || y.forEach((c) => {
|
|
2061
|
+
c.value = "";
|
|
2062
|
+
}), n.value = "create", g.visible = !0;
|
|
2063
|
+
break;
|
|
2064
|
+
case "update":
|
|
2065
|
+
(o = _.value) == null || o.forEach((c) => {
|
|
2066
|
+
c.value = d[c == null ? void 0 : c.prop];
|
|
2067
|
+
}), n.value = "update", g.visible = !0;
|
|
2068
|
+
break;
|
|
2069
|
+
case "delete":
|
|
2070
|
+
p.value.splice(d, 1), n.value = "delete";
|
|
2071
|
+
break;
|
|
2072
|
+
}
|
|
2073
|
+
}, I = (f) => {
|
|
2074
|
+
var d, y, o, c;
|
|
2075
|
+
if ((f == null ? void 0 : f.buttonName) === "确认") {
|
|
2076
|
+
const t = u(f == null ? void 0 : f.content);
|
|
2077
|
+
switch (Object.keys(t).forEach((b) => {
|
|
2078
|
+
t[b] === "" && delete t[b];
|
|
2079
|
+
}), n.value) {
|
|
2080
|
+
case "create":
|
|
2081
|
+
console.log(1335, p.value, t), (y = p.value) == null || y.push({
|
|
2082
|
+
...t,
|
|
2083
|
+
index: ((d = p.value) == null ? void 0 : d.length) + 1
|
|
2084
|
+
});
|
|
2085
|
+
break;
|
|
2086
|
+
case "update":
|
|
2087
|
+
p.value = (o = p.value) == null ? void 0 : o.map((b) => b.index === (t == null ? void 0 : t.index) ? {
|
|
2088
|
+
...b,
|
|
2089
|
+
content: t == null ? void 0 : t.content,
|
|
2090
|
+
timestamp: t == null ? void 0 : t.timestamp
|
|
2091
|
+
} : b);
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
e("change", (c = k()) == null ? void 0 : c.compData), g.visible = !1;
|
|
2095
|
+
} else
|
|
2096
|
+
g.visible = !1;
|
|
2097
|
+
}, k = () => ({
|
|
2098
|
+
comp: "TimeLine",
|
|
2099
|
+
compData: [
|
|
2100
|
+
{
|
|
2101
|
+
key: "timeLineList",
|
|
2102
|
+
contents: p.value
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
key: "timeLineConfig",
|
|
2106
|
+
contents: r.value
|
|
2107
|
+
}
|
|
2108
|
+
]
|
|
2109
|
+
}), N = () => {
|
|
2110
|
+
g.visible = !1;
|
|
2111
|
+
};
|
|
2112
|
+
return we(() => l == null ? void 0 : l.itemContents, (f) => {
|
|
2113
|
+
var d, y;
|
|
2114
|
+
f && (r.value = ((d = f == null ? void 0 : f.find((o) => o.key === "timeLineConfig")) == null ? void 0 : d.contents) ?? {}, p.value = ((y = f == null ? void 0 : f.find((o) => o.key === "timeLineList")) == null ? void 0 : y.contents) ?? []);
|
|
2115
|
+
}, { immediate: !0 }), (f, d) => {
|
|
2116
|
+
const y = be("svg-icon"), o = be("el-button");
|
|
2117
|
+
return P(), z(he, null, [
|
|
2118
|
+
x("div", null, [
|
|
2119
|
+
x("div", Rn, [
|
|
2120
|
+
d[2] || (d[2] = x("h4", { class: "module-title" }, "内容", -1)),
|
|
2121
|
+
x("div", {
|
|
2122
|
+
class: "module-icon",
|
|
2123
|
+
onClick: d[0] || (d[0] = (c) => $("create"))
|
|
2124
|
+
}, [
|
|
2125
|
+
V(y, {
|
|
2126
|
+
name: "Plus",
|
|
2127
|
+
class: "icon-size"
|
|
2128
|
+
}),
|
|
2129
|
+
d[1] || (d[1] = x("div", null, "新增", -1))
|
|
2130
|
+
])
|
|
2131
|
+
]),
|
|
2132
|
+
x("div", Jn, [
|
|
2133
|
+
(P(!0), z(he, null, ge(p.value, (c, t) => (P(), z("div", {
|
|
2134
|
+
class: "module-data-item",
|
|
2135
|
+
key: t
|
|
2136
|
+
}, [
|
|
2137
|
+
x("span", null, q(c == null ? void 0 : c.content), 1),
|
|
2138
|
+
x("div", null, [
|
|
2139
|
+
V(o, {
|
|
2140
|
+
type: "primary",
|
|
2141
|
+
size: "small",
|
|
2142
|
+
onClick: (b) => $("update", { ...c, index: t + 1 })
|
|
2143
|
+
}, {
|
|
2144
|
+
default: ne(() => d[3] || (d[3] = [
|
|
2145
|
+
ze("修改")
|
|
2146
|
+
])),
|
|
2147
|
+
_: 2,
|
|
2148
|
+
__: [3]
|
|
2149
|
+
}, 1032, ["onClick"]),
|
|
2150
|
+
V(o, {
|
|
2151
|
+
type: "danger",
|
|
2152
|
+
size: "small",
|
|
2153
|
+
onClick: (b) => $("delete", t)
|
|
2154
|
+
}, {
|
|
2155
|
+
default: ne(() => d[4] || (d[4] = [
|
|
2156
|
+
ze("删除")
|
|
2157
|
+
])),
|
|
2158
|
+
_: 2,
|
|
2159
|
+
__: [4]
|
|
2160
|
+
}, 1032, ["onClick"])
|
|
2161
|
+
])
|
|
2162
|
+
]))), 128))
|
|
2163
|
+
]),
|
|
2164
|
+
x("div", Vn, [
|
|
2165
|
+
d[5] || (d[5] = x("div", { class: "module-title" }, "布局", -1)),
|
|
2166
|
+
V(Te, {
|
|
2167
|
+
rowContents: i.value,
|
|
2168
|
+
onChange: T
|
|
2169
|
+
}, null, 8, ["rowContents"])
|
|
2170
|
+
])
|
|
2171
|
+
]),
|
|
2172
|
+
V(Ie, {
|
|
2173
|
+
visible: g.visible,
|
|
2174
|
+
title: g.title,
|
|
2175
|
+
onBeforeDestroy: N,
|
|
2176
|
+
width: g.width
|
|
2177
|
+
}, {
|
|
2178
|
+
default: ne(() => [
|
|
2179
|
+
x("div", Wn, [
|
|
2180
|
+
(P(), ve(Te, {
|
|
2181
|
+
rowContents: _.value,
|
|
2182
|
+
key: _.value,
|
|
2183
|
+
isEnableWrap: !1,
|
|
2184
|
+
isButtonRow: !1,
|
|
2185
|
+
isStartJustify: !1,
|
|
2186
|
+
buttonValue: v.value,
|
|
2187
|
+
onOnButtonClick: I
|
|
2188
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
2189
|
+
])
|
|
2190
|
+
]),
|
|
2191
|
+
_: 1
|
|
2192
|
+
}, 8, ["visible", "title", "width"])
|
|
2193
|
+
], 64);
|
|
2194
|
+
};
|
|
2195
|
+
}
|
|
2196
|
+
}), Gn = /* @__PURE__ */ Ce(zn, [["__scopeId", "data-v-40aea043"]]), Mn = {};
|
|
2197
|
+
function Zn(a, s) {
|
|
2198
|
+
return P(), z("div");
|
|
2199
|
+
}
|
|
2200
|
+
const Hn = /* @__PURE__ */ Ce(Mn, [["render", Zn]]), Kn = { class: "extra-content" }, qn = { key: 0 }, Qn = { key: 1 }, Xn = {
|
|
2201
|
+
__name: "index",
|
|
2202
|
+
props: {
|
|
2203
|
+
itemData: {
|
|
2204
|
+
type: Array,
|
|
2205
|
+
default: () => []
|
|
2206
|
+
},
|
|
2207
|
+
childItemData: {
|
|
2208
|
+
type: Array,
|
|
2209
|
+
default: () => []
|
|
2210
|
+
},
|
|
2211
|
+
index: Number,
|
|
2212
|
+
changedContent: {
|
|
2213
|
+
type: Object,
|
|
2214
|
+
default: () => {
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
emits: ["change"],
|
|
2219
|
+
setup(a, { emit: s }) {
|
|
2220
|
+
const l = a, e = U(0), n = U(), r = U(), p = s, i = U(!1), _ = U({}), v = U({}), g = U();
|
|
2221
|
+
we(
|
|
2222
|
+
() => [l.itemData],
|
|
2223
|
+
() => {
|
|
2224
|
+
var c;
|
|
2225
|
+
const o = u(l.itemData);
|
|
2226
|
+
n.value = (c = u(o)) == null ? void 0 : c.map((t) => {
|
|
2227
|
+
var b;
|
|
2228
|
+
if (t.key === "extra") {
|
|
2229
|
+
let S = [];
|
|
2230
|
+
(b = t.value) == null || b.forEach((j) => {
|
|
2231
|
+
var R;
|
|
2232
|
+
S.push((R = Object.values(j)) == null ? void 0 : R[0]);
|
|
2233
|
+
}), t.value = S;
|
|
2234
|
+
}
|
|
2235
|
+
return t;
|
|
2236
|
+
});
|
|
2237
|
+
},
|
|
2238
|
+
{ deep: !0, immediate: !0 }
|
|
2239
|
+
);
|
|
2240
|
+
const T = (o, c, t, b) => {
|
|
2241
|
+
var j;
|
|
2242
|
+
let S = {};
|
|
2243
|
+
((j = o == null ? void 0 : o[0]) == null ? void 0 : j.contents) === "详情" && (i.value = !0, S[c] = o, r.value = o == null ? void 0 : o.filter((R) => (R == null ? void 0 : R.key) !== "tableContentName"), _.value = S, v.value = t, g.value = b.id);
|
|
2244
|
+
}, $ = (o) => {
|
|
2245
|
+
var R, se, oe, h;
|
|
2246
|
+
const c = (se = (R = Object.values(u(_.value))) == null ? void 0 : R[0]) == null ? void 0 : se.filter((w) => (w == null ? void 0 : w.key) === "tableContentName"), t = (h = (oe = Object.values(u(_.value))) == null ? void 0 : oe[0]) == null ? void 0 : h.filter((w) => (w == null ? void 0 : w.key) !== "tableContentName"), b = t == null ? void 0 : t.map((w, O) => {
|
|
2247
|
+
var m;
|
|
2248
|
+
return O === o.index && (w == null ? void 0 : w.comp) === "Table" && (w.compData = (m = w.compData) == null ? void 0 : m.map((F) => {
|
|
2249
|
+
var G, X;
|
|
2250
|
+
return (F == null ? void 0 : F.key) === "tableContents" && (F.contents = (X = (G = o.content) == null ? void 0 : G.map((D) => {
|
|
2251
|
+
let Y = {};
|
|
2252
|
+
for (let M in D)
|
|
2253
|
+
M !== "id" && (Y[M] = D[M]);
|
|
2254
|
+
return Y;
|
|
2255
|
+
})) == null ? void 0 : X.map((D) => Object.values(D))), F;
|
|
2256
|
+
})), w;
|
|
2257
|
+
});
|
|
2258
|
+
b.unshift(c == null ? void 0 : c[0]);
|
|
2259
|
+
let S = u(_.value), j = {};
|
|
2260
|
+
for (let w in S)
|
|
2261
|
+
j[w] = b;
|
|
2262
|
+
_.value = j;
|
|
2263
|
+
}, I = () => {
|
|
2264
|
+
i.value = !1, _.value = {}, v.value = {}, g.value = void 0, e.value++;
|
|
2265
|
+
}, k = (o) => {
|
|
2266
|
+
var R, se, oe, h;
|
|
2267
|
+
const c = (se = (R = Object.values(u(_.value))) == null ? void 0 : R[0]) == null ? void 0 : se.filter((w) => (w == null ? void 0 : w.key) === "tableContentName"), t = (h = (oe = Object.values(u(_.value))) == null ? void 0 : oe[0]) == null ? void 0 : h.filter((w) => (w == null ? void 0 : w.key) !== "tableContentName"), b = t == null ? void 0 : t.map((w, O) => (O === o.index && (w.compData = o.contents), w));
|
|
2268
|
+
b.unshift(c == null ? void 0 : c[0]);
|
|
2269
|
+
let S = u(_.value), j = {};
|
|
2270
|
+
for (let w in S)
|
|
2271
|
+
j[w] = b;
|
|
2272
|
+
_.value = j;
|
|
2273
|
+
}, N = () => {
|
|
2274
|
+
var c, t;
|
|
2275
|
+
let o = {};
|
|
2276
|
+
for (let b in v.value)
|
|
2277
|
+
b === ((c = Object.keys(_.value)) == null ? void 0 : c[0]) ? o[b] = (t = Object.values(_.value)) == null ? void 0 : t[0] : o[b] = v.value[b];
|
|
2278
|
+
p("change", {
|
|
2279
|
+
buttonName: "编辑",
|
|
2280
|
+
index: g.value,
|
|
2281
|
+
singleContent: o
|
|
2282
|
+
}, "methodData"), i.value = !1, _.value = {}, v.value = {}, g.value = void 0;
|
|
2283
|
+
}, f = () => {
|
|
2284
|
+
i.value = !1, _.value = {}, v.value = {}, g.value = void 0;
|
|
2285
|
+
}, d = (o) => {
|
|
2286
|
+
p("change", o, "methodData");
|
|
2287
|
+
}, y = (o) => vl(o);
|
|
2288
|
+
return (o, c) => (P(), z("div", Kn, [
|
|
2289
|
+
(P(!0), z(he, null, ge(n.value, (t, b) => (P(), z("div", { key: e.value }, [
|
|
2290
|
+
(t == null ? void 0 : t.key) === "extra" ? (P(), z("div", qn)) : (P(), z("div", Qn, [
|
|
2291
|
+
(P(), ve(Xe(y(t.comp)), {
|
|
2292
|
+
itemData: t == null ? void 0 : t.compData,
|
|
2293
|
+
childItemData: t == null ? void 0 : t.itemChildData,
|
|
2294
|
+
key: b,
|
|
2295
|
+
index: (t == null ? void 0 : t.id) ?? b,
|
|
2296
|
+
onContentClick: T,
|
|
2297
|
+
onChange: d
|
|
2298
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
2299
|
+
]))
|
|
2300
|
+
]))), 128)),
|
|
2301
|
+
V(Ie, {
|
|
2302
|
+
visible: i.value,
|
|
2303
|
+
onBeforeDestroy: f
|
|
2304
|
+
}, {
|
|
2305
|
+
default: ne(() => [
|
|
2306
|
+
(P(!0), z(he, null, ge(r.value, (t, b) => (P(), z("div", {
|
|
2307
|
+
key: b,
|
|
2308
|
+
class: "extra-dialog"
|
|
2309
|
+
}, [
|
|
2310
|
+
(P(), ve(Xe(y(t.comp)), {
|
|
2311
|
+
itemData: t == null ? void 0 : t.compData,
|
|
2312
|
+
onChange: $,
|
|
2313
|
+
childItemData: t == null ? void 0 : t.itemChildData,
|
|
2314
|
+
key: b,
|
|
2315
|
+
onContentChange: k,
|
|
2316
|
+
index: (t == null ? void 0 : t.id) ?? b,
|
|
2317
|
+
class: "extra-component"
|
|
2318
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
2319
|
+
]))), 128))
|
|
2320
|
+
]),
|
|
2321
|
+
footer: ne(() => [
|
|
2322
|
+
x("div", { class: "dialog-footer" }, [
|
|
2323
|
+
x("div", {
|
|
2324
|
+
class: "cancel-button footer-button",
|
|
2325
|
+
onClick: I
|
|
2326
|
+
}, q("取消")),
|
|
2327
|
+
x("div", {
|
|
2328
|
+
class: "confirm-button footer-button",
|
|
2329
|
+
onClick: N
|
|
2330
|
+
}, q("确认"))
|
|
2331
|
+
])
|
|
2332
|
+
]),
|
|
2333
|
+
_: 1
|
|
2334
|
+
}, 8, ["visible"])
|
|
2335
|
+
]));
|
|
2336
|
+
}
|
|
2337
|
+
}, Yn = /* @__PURE__ */ Ce(Xn, [["__scopeId", "data-v-b0b2f71f"]]), es = { class: "method-content" }, ls = ["onClick"], as = {
|
|
2338
|
+
__name: "index",
|
|
2339
|
+
props: {
|
|
2340
|
+
itemData: {
|
|
2341
|
+
type: Array,
|
|
2342
|
+
default: () => []
|
|
2343
|
+
},
|
|
2344
|
+
childItemData: {
|
|
2345
|
+
type: Array,
|
|
2346
|
+
default: () => []
|
|
2347
|
+
},
|
|
2348
|
+
index: Number,
|
|
2349
|
+
changedContent: {
|
|
2350
|
+
type: Object,
|
|
2351
|
+
default: () => {
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
},
|
|
2355
|
+
setup(a) {
|
|
2356
|
+
const s = U([]), l = a, e = ma(Ge), { itemData: n, isEdit: r } = Ze(e), p = (v, g) => {
|
|
2357
|
+
var $;
|
|
2358
|
+
const T = ($ = g == null ? void 0 : g[0]) == null ? void 0 : $.children;
|
|
2359
|
+
return v == null ? void 0 : v.map((I) => {
|
|
2360
|
+
var k;
|
|
2361
|
+
return I = (k = I == null ? void 0 : I.map((N, f) => {
|
|
2362
|
+
var d;
|
|
2363
|
+
return {
|
|
2364
|
+
key: (d = T[f]) == null ? void 0 : d.label,
|
|
2365
|
+
value: N
|
|
2366
|
+
};
|
|
2367
|
+
})) == null ? void 0 : k.filter((N) => N.key), I;
|
|
2368
|
+
});
|
|
2369
|
+
};
|
|
2370
|
+
we(
|
|
2371
|
+
() => n.value,
|
|
2372
|
+
async () => {
|
|
2373
|
+
r.value == "view" && await _(u(l.itemData));
|
|
2374
|
+
},
|
|
2375
|
+
{ deep: !0 }
|
|
2376
|
+
);
|
|
2377
|
+
const i = async (v) => {
|
|
2378
|
+
var o, c, t, b, S, j;
|
|
2379
|
+
let g = {};
|
|
2380
|
+
if ((o = u(v.content)) == null || o.forEach((R, se) => {
|
|
2381
|
+
var oe, h, w, O, m, F, G, X, D, Y, M, te, me, _e, J, ae, H;
|
|
2382
|
+
if ((R == null ? void 0 : R.comp) === "Table") {
|
|
2383
|
+
let ue = (O = (w = (h = (oe = R == null ? void 0 : R.compData) == null ? void 0 : oe.find((ie) => (ie == null ? void 0 : ie.key) === "header")) == null ? void 0 : h.contents) == null ? void 0 : w[0]) == null ? void 0 : O.some((ie) => ie == null ? void 0 : ie.children), $e = (G = (F = (m = R == null ? void 0 : R.compData) == null ? void 0 : m.find((ie) => (ie == null ? void 0 : ie.key) === "tableContents")) == null ? void 0 : F.contents) == null ? void 0 : G.map((ie) => ie.slice(1)), fe = (te = (M = (Y = (D = (X = R == null ? void 0 : R.compData) == null ? void 0 : X.find((ie) => (ie == null ? void 0 : ie.key) === "header")) == null ? void 0 : D.contents) == null ? void 0 : Y[0]) == null ? void 0 : M[0]) == null ? void 0 : te.label, ye = (J = (_e = (me = R == null ? void 0 : R.compData) == null ? void 0 : me.find((ie) => (ie == null ? void 0 : ie.key) === "header")) == null ? void 0 : _e.contents) == null ? void 0 : J[0];
|
|
2384
|
+
if (ue)
|
|
2385
|
+
g[fe] = p($e, ye);
|
|
2386
|
+
else {
|
|
2387
|
+
const ie = [];
|
|
2388
|
+
ye = ye.slice(1, ye.length - 1), ye == null || ye.forEach((Pe, Le) => {
|
|
2389
|
+
$e == null || $e.forEach((Ne) => {
|
|
2390
|
+
ie.push({
|
|
2391
|
+
key: Pe.label + Ne[0],
|
|
2392
|
+
value: Ne[Le + 1]
|
|
2393
|
+
});
|
|
2394
|
+
});
|
|
2395
|
+
}), g["form" + se] = ie;
|
|
2396
|
+
}
|
|
2397
|
+
} else {
|
|
2398
|
+
const ue = (H = (ae = R.compData) == null ? void 0 : ae.find((fe) => (fe == null ? void 0 : fe.key) === "formContent")) == null ? void 0 : H.contents;
|
|
2399
|
+
g.form = {};
|
|
2400
|
+
const $e = [];
|
|
2401
|
+
ue == null || ue.forEach((fe) => {
|
|
2402
|
+
fe.key !== "" && (fe = {
|
|
2403
|
+
key: (fe == null ? void 0 : fe.key) ?? (fe == null ? void 0 : fe.label),
|
|
2404
|
+
value: fe == null ? void 0 : fe.value
|
|
2405
|
+
}, $e.push(fe));
|
|
2406
|
+
}), g.form = $e;
|
|
2407
|
+
}
|
|
2408
|
+
}), v.api) {
|
|
2409
|
+
const R = await ha.post(v.api, {
|
|
2410
|
+
data: g,
|
|
2411
|
+
templateFileName: (c = v == null ? void 0 : v.extraContent) == null ? void 0 : c[0]
|
|
2412
|
+
}, {
|
|
2413
|
+
responseType: "blob",
|
|
2414
|
+
// 必须设置
|
|
2415
|
+
headers: {
|
|
2416
|
+
"Content-Type": "application/json"
|
|
2417
|
+
}
|
|
2418
|
+
});
|
|
2419
|
+
var T = new Blob([R.data], {
|
|
2420
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
2421
|
+
}), $ = R.headers["content-disposition"], I = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), k = I.exec($), N = ((S = (b = (t = v == null ? void 0 : v.extraContent) == null ? void 0 : t[0]) == null ? void 0 : b.split(".")) == null ? void 0 : S[0]) + "." + ((j = k[1].split(".")) == null ? void 0 : j[1]), f = document.createElement("a"), d = window.URL.createObjectURL(T), y = /^["](.*)["]$/g;
|
|
2422
|
+
f.style.display = "none", f.href = d, f.download = decodeURI(N.replace(y, "$1")), document.body.appendChild(f), f.click(), document.body.removeChild(f), window.URL.revokeObjectURL(d);
|
|
2423
|
+
}
|
|
2424
|
+
}, _ = async (v) => {
|
|
2425
|
+
var I;
|
|
2426
|
+
const g = u(v), T = g == null ? void 0 : g.map(async (k) => {
|
|
2427
|
+
var c, t, b, S, j, R, se;
|
|
2428
|
+
const f = (c = (await _l({
|
|
2429
|
+
key: {
|
|
2430
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
2431
|
+
parentTable: "",
|
|
2432
|
+
type: "method",
|
|
2433
|
+
methodName: k.method
|
|
2434
|
+
}
|
|
2435
|
+
})).data.result) == null ? void 0 : c[0], d = await _l({
|
|
2436
|
+
key: {
|
|
2437
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
2438
|
+
type: "methodData",
|
|
2439
|
+
tableId: f == null ? void 0 : f.id
|
|
2440
|
+
}
|
|
2441
|
+
}), y = await na((t = k == null ? void 0 : k.value) == null ? void 0 : t[0], sessionStorage.getItem("systemKey"), ""), o = (b = d.data.result) == null ? void 0 : b[0];
|
|
2442
|
+
return {
|
|
2443
|
+
buttonName: (S = f == null ? void 0 : f.key) == null ? void 0 : S.methodKey,
|
|
2444
|
+
api: (R = (j = o == null ? void 0 : o.value) == null ? void 0 : j.tableData) == null ? void 0 : R[0],
|
|
2445
|
+
content: y == null ? void 0 : y.filter((oe) => oe.comp !== "methodButton"),
|
|
2446
|
+
extraContent: (se = u(k.value)) == null ? void 0 : se.slice(1)
|
|
2447
|
+
};
|
|
2448
|
+
}), $ = await Promise.all(T);
|
|
2449
|
+
s.value = $ == null ? void 0 : $.filter((k) => k == null ? void 0 : k.extraContent), (I = s.value) == null || I.forEach((k) => {
|
|
2450
|
+
var N;
|
|
2451
|
+
k.api === "" && ((N = k.content) == null || N.forEach((f) => {
|
|
2452
|
+
var d;
|
|
2453
|
+
f.comp == "Table" && e.setExtraContents(sa(f.compData, (d = k.extraContent) == null ? void 0 : d[0]));
|
|
2454
|
+
}));
|
|
2455
|
+
});
|
|
2456
|
+
};
|
|
2457
|
+
return we(
|
|
2458
|
+
() => l.itemData,
|
|
2459
|
+
async () => {
|
|
2460
|
+
r.value == "view" && await _(u(l.itemData));
|
|
2461
|
+
},
|
|
2462
|
+
{ immediate: !0, deep: !0 }
|
|
2463
|
+
), (v, g) => (P(), z("div", es, [
|
|
2464
|
+
(P(!0), z(he, null, ge(s.value, (T) => (P(), z("div", null, [
|
|
2465
|
+
T.api !== "" ? (P(), z("div", {
|
|
2466
|
+
key: 0,
|
|
2467
|
+
onClick: ($) => i(T),
|
|
2468
|
+
class: "method-buttons"
|
|
2469
|
+
}, q(T.buttonName), 9, ls)) : Se("", !0)
|
|
2470
|
+
]))), 256))
|
|
2471
|
+
]));
|
|
2472
|
+
}
|
|
2473
|
+
}, ns = /* @__PURE__ */ Ce(as, [["__scopeId", "data-v-0c52611a"]]), ss = {};
|
|
2474
|
+
function os(a, s) {
|
|
2475
|
+
return " 567 ";
|
|
2476
|
+
}
|
|
2477
|
+
const rs = /* @__PURE__ */ Ce(ss, [["render", os]]), ts = { class: "module content" }, is = { class: "module data" }, us = { class: "module layout" }, cs = { class: "form-content" }, ps = /* @__PURE__ */ Me({
|
|
2478
|
+
__name: "operate",
|
|
2479
|
+
props: {
|
|
2480
|
+
itemContents: {
|
|
2481
|
+
type: Array,
|
|
2482
|
+
default: () => []
|
|
2483
|
+
},
|
|
2484
|
+
originalItemContents: {
|
|
2485
|
+
type: Array,
|
|
2486
|
+
default: () => []
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
emits: ["change"],
|
|
2490
|
+
setup(a, { emit: s }) {
|
|
2491
|
+
const l = a, e = s, n = ml({
|
|
2492
|
+
visible: !1,
|
|
2493
|
+
width: "40%",
|
|
2494
|
+
title: "签名配置"
|
|
2495
|
+
}), r = U("create"), p = U([
|
|
2496
|
+
{
|
|
2497
|
+
label: "取消",
|
|
2498
|
+
background: "#c0c4cc"
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
label: "确认",
|
|
2502
|
+
background: "#436aaf"
|
|
2503
|
+
}
|
|
2504
|
+
]), i = U([
|
|
2505
|
+
{
|
|
2506
|
+
label: "宽度(%):",
|
|
2507
|
+
prop: "signPadWidth",
|
|
2508
|
+
type: "number",
|
|
2509
|
+
value: "30"
|
|
2510
|
+
},
|
|
2511
|
+
{
|
|
2512
|
+
label: "弹窗名称:",
|
|
2513
|
+
prop: "dialogTitle",
|
|
2514
|
+
type: "input",
|
|
2515
|
+
value: ""
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
label: "弹窗宽度(%):",
|
|
2519
|
+
prop: "dialogWidth",
|
|
2520
|
+
type: "number",
|
|
2521
|
+
value: "30"
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
label: "弹窗显示:",
|
|
2525
|
+
prop: "dialogShow",
|
|
2526
|
+
type: "radio",
|
|
2527
|
+
contents: [
|
|
2528
|
+
{
|
|
2529
|
+
label: "显示",
|
|
2530
|
+
value: !0
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
label: "隐藏",
|
|
2534
|
+
value: !1
|
|
2535
|
+
}
|
|
2536
|
+
],
|
|
2537
|
+
value: !1,
|
|
2538
|
+
isFormColHidden: !0
|
|
2539
|
+
},
|
|
2540
|
+
{
|
|
2541
|
+
label: "路径:",
|
|
2542
|
+
prop: "url",
|
|
2543
|
+
type: "input",
|
|
2544
|
+
value: "",
|
|
2545
|
+
isFormColHidden: !0
|
|
2546
|
+
}
|
|
2547
|
+
]), _ = Bl(() => [
|
|
2548
|
+
{
|
|
2549
|
+
label: "",
|
|
2550
|
+
prop: "index",
|
|
2551
|
+
type: "input",
|
|
2552
|
+
value: "",
|
|
2553
|
+
isFormColHidden: !0
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
label: "类型:",
|
|
2557
|
+
prop: "label",
|
|
2558
|
+
type: "select",
|
|
2559
|
+
contents: [
|
|
2560
|
+
{
|
|
2561
|
+
label: "电子签名",
|
|
2562
|
+
value: "电子签名"
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
label: "签字版",
|
|
2566
|
+
value: "签字版"
|
|
2567
|
+
},
|
|
2568
|
+
{
|
|
2569
|
+
label: "上传签名",
|
|
2570
|
+
value: "上传签名"
|
|
2571
|
+
}
|
|
2572
|
+
],
|
|
2573
|
+
value: ""
|
|
2574
|
+
},
|
|
2575
|
+
{
|
|
2576
|
+
label: "图标",
|
|
2577
|
+
prop: "icon",
|
|
2578
|
+
type: "inputPopover",
|
|
2579
|
+
value: ""
|
|
2580
|
+
}
|
|
2581
|
+
// {
|
|
2582
|
+
// label: '是否禁用',
|
|
2583
|
+
// prop: 'disabled',
|
|
2584
|
+
// type: 'radio',
|
|
2585
|
+
// contents: [
|
|
2586
|
+
// {
|
|
2587
|
+
// label: '是',
|
|
2588
|
+
// value: true,
|
|
2589
|
+
// },
|
|
2590
|
+
// {
|
|
2591
|
+
// label: '否',
|
|
2592
|
+
// value: false,
|
|
2593
|
+
// }
|
|
2594
|
+
// ],
|
|
2595
|
+
// value: false
|
|
2596
|
+
// },
|
|
2597
|
+
]), v = U({}), g = U([]), T = () => ({
|
|
2598
|
+
comp: "Signature",
|
|
2599
|
+
compData: [
|
|
2600
|
+
{
|
|
2601
|
+
key: "signTypeList",
|
|
2602
|
+
contents: g.value
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
key: "signConfig",
|
|
2606
|
+
contents: v.value
|
|
2607
|
+
}
|
|
2608
|
+
]
|
|
2609
|
+
}), $ = (f) => {
|
|
2610
|
+
var d;
|
|
2611
|
+
v.value = u(f), e("change", (d = T()) == null ? void 0 : d.compData);
|
|
2612
|
+
}, I = (f) => {
|
|
2613
|
+
var d, y;
|
|
2614
|
+
if ((f == null ? void 0 : f.buttonName) === "确认") {
|
|
2615
|
+
const o = u(f == null ? void 0 : f.content);
|
|
2616
|
+
switch (r.value) {
|
|
2617
|
+
case "create":
|
|
2618
|
+
g.value.push({
|
|
2619
|
+
...o,
|
|
2620
|
+
index: ((d = g.value) == null ? void 0 : d.length) + 1
|
|
2621
|
+
});
|
|
2622
|
+
break;
|
|
2623
|
+
}
|
|
2624
|
+
e("change", (y = T()) == null ? void 0 : y.compData), n.visible = !1;
|
|
2625
|
+
} else
|
|
2626
|
+
n.visible = !1;
|
|
2627
|
+
}, k = (f, d) => {
|
|
2628
|
+
var y, o;
|
|
2629
|
+
switch (f) {
|
|
2630
|
+
case "create":
|
|
2631
|
+
(y = _.value) == null || y.forEach((c) => {
|
|
2632
|
+
c.value = "";
|
|
2633
|
+
}), r.value = "create", n.visible = !0;
|
|
2634
|
+
break;
|
|
2635
|
+
case "update":
|
|
2636
|
+
(o = _.value) == null || o.forEach((c) => {
|
|
2637
|
+
c.value = d[c == null ? void 0 : c.prop];
|
|
2638
|
+
}), console.log(345, d), r.value = "update", n.visible = !0;
|
|
2639
|
+
break;
|
|
2640
|
+
case "delete":
|
|
2641
|
+
g.value.splice(d, 1), r.value = "delete";
|
|
2642
|
+
break;
|
|
2643
|
+
}
|
|
2644
|
+
}, N = () => {
|
|
2645
|
+
n.visible = !1;
|
|
2646
|
+
};
|
|
2647
|
+
return we(() => l == null ? void 0 : l.itemContents, (f) => {
|
|
2648
|
+
var d, y;
|
|
2649
|
+
f && (v.value = ((d = f == null ? void 0 : f.find((o) => o.key === "signConfig")) == null ? void 0 : d.contents) ?? {}, g.value = ((y = f == null ? void 0 : f.find((o) => o.key === "signTypeList")) == null ? void 0 : y.contents) ?? []);
|
|
2650
|
+
}, { immediate: !0 }), (f, d) => {
|
|
2651
|
+
const y = be("svg-icon"), o = be("el-button");
|
|
2652
|
+
return P(), z(he, null, [
|
|
2653
|
+
x("div", null, [
|
|
2654
|
+
x("div", ts, [
|
|
2655
|
+
d[2] || (d[2] = x("h4", { class: "module-title" }, "签名类型", -1)),
|
|
2656
|
+
x("div", {
|
|
2657
|
+
class: "module-icon",
|
|
2658
|
+
onClick: d[0] || (d[0] = (c) => k("create"))
|
|
2659
|
+
}, [
|
|
2660
|
+
x("div", null, [
|
|
2661
|
+
V(y, {
|
|
2662
|
+
name: "Plus",
|
|
2663
|
+
class: "icon-size"
|
|
2664
|
+
}),
|
|
2665
|
+
d[1] || (d[1] = x("span", null, "新增", -1))
|
|
2666
|
+
])
|
|
2667
|
+
])
|
|
2668
|
+
]),
|
|
2669
|
+
x("div", is, [
|
|
2670
|
+
(P(!0), z(he, null, ge(g.value, (c, t) => (P(), z("div", {
|
|
2671
|
+
class: "module-data-item",
|
|
2672
|
+
key: t
|
|
2673
|
+
}, [
|
|
2674
|
+
x("span", null, q(c == null ? void 0 : c.label), 1),
|
|
2675
|
+
x("div", null, [
|
|
2676
|
+
V(o, {
|
|
2677
|
+
type: "primary",
|
|
2678
|
+
size: "small",
|
|
2679
|
+
onClick: (b) => k("update", { ...c, index: t + 1 })
|
|
2680
|
+
}, {
|
|
2681
|
+
default: ne(() => d[3] || (d[3] = [
|
|
2682
|
+
ze("修改")
|
|
2683
|
+
])),
|
|
2684
|
+
_: 2,
|
|
2685
|
+
__: [3]
|
|
2686
|
+
}, 1032, ["onClick"]),
|
|
2687
|
+
V(o, {
|
|
2688
|
+
type: "danger",
|
|
2689
|
+
size: "small",
|
|
2690
|
+
onClick: (b) => k("delete", t)
|
|
2691
|
+
}, {
|
|
2692
|
+
default: ne(() => d[4] || (d[4] = [
|
|
2693
|
+
ze("删除")
|
|
2694
|
+
])),
|
|
2695
|
+
_: 2,
|
|
2696
|
+
__: [4]
|
|
2697
|
+
}, 1032, ["onClick"])
|
|
2698
|
+
])
|
|
2699
|
+
]))), 128))
|
|
2700
|
+
]),
|
|
2701
|
+
x("div", us, [
|
|
2702
|
+
V(Te, {
|
|
2703
|
+
rowContents: i.value,
|
|
2704
|
+
onChange: $
|
|
2705
|
+
}, null, 8, ["rowContents"])
|
|
2706
|
+
])
|
|
2707
|
+
]),
|
|
2708
|
+
V(Ie, {
|
|
2709
|
+
visible: n.visible,
|
|
2710
|
+
title: n.title,
|
|
2711
|
+
onBeforeDestroy: N,
|
|
2712
|
+
width: n.width
|
|
2713
|
+
}, {
|
|
2714
|
+
default: ne(() => [
|
|
2715
|
+
x("div", cs, [
|
|
2716
|
+
(P(), ve(Te, {
|
|
2717
|
+
rowContents: _.value,
|
|
2718
|
+
key: _.value,
|
|
2719
|
+
isEnableWrap: !1,
|
|
2720
|
+
isButtonRow: !1,
|
|
2721
|
+
isStartJustify: !1,
|
|
2722
|
+
buttonValue: p.value,
|
|
2723
|
+
onOnButtonClick: I
|
|
2724
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
2725
|
+
])
|
|
2726
|
+
]),
|
|
2727
|
+
_: 1
|
|
2728
|
+
}, 8, ["visible", "title", "width"])
|
|
2729
|
+
], 64);
|
|
2730
|
+
};
|
|
2731
|
+
}
|
|
2732
|
+
}), ds = /* @__PURE__ */ Ce(ps, [["__scopeId", "data-v-a90b5f7d"]]), fs = /* @__PURE__ */ Me({
|
|
2733
|
+
__name: "index",
|
|
2734
|
+
props: {
|
|
2735
|
+
stepConfig: {
|
|
2736
|
+
type: Object,
|
|
2737
|
+
default: {}
|
|
2738
|
+
},
|
|
2739
|
+
stepList: {
|
|
2740
|
+
type: Array,
|
|
2741
|
+
default: () => []
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2744
|
+
emits: ["clickStep", "clickTrigger", "changeTrigger"],
|
|
2745
|
+
setup(a, { emit: s }) {
|
|
2746
|
+
const l = a, e = s, n = U(1), r = Bl(() => {
|
|
2747
|
+
var T, $;
|
|
2748
|
+
return (T = l == null ? void 0 : l.stepConfig) != null && T.allowTrigger ? n.value : ($ = l == null ? void 0 : l.stepConfig) == null ? void 0 : $.active;
|
|
2749
|
+
}), p = (T, $) => {
|
|
2750
|
+
n.value = $, e("clickStep", T, $);
|
|
2751
|
+
}, i = (T) => pa(T), _ = () => {
|
|
2752
|
+
var $;
|
|
2753
|
+
const T = ($ = l == null ? void 0 : l.stepList) == null ? void 0 : $.find((I, k) => k + 1 === r.value);
|
|
2754
|
+
return console.log("findStep", T), T ? T == null ? void 0 : T.children : [];
|
|
2755
|
+
}, v = (T) => {
|
|
2756
|
+
e("clickTrigger", T);
|
|
2757
|
+
}, g = (T) => {
|
|
2758
|
+
e("changeTrigger", T);
|
|
2759
|
+
};
|
|
2760
|
+
return (T, $) => {
|
|
2761
|
+
var N, f, d, y, o;
|
|
2762
|
+
const I = be("el-step"), k = be("el-steps");
|
|
2763
|
+
return P(), z(he, null, [
|
|
2764
|
+
V(k, {
|
|
2765
|
+
direction: (N = a.stepConfig) == null ? void 0 : N.direction,
|
|
2766
|
+
active: r.value,
|
|
2767
|
+
"finish-status": "success",
|
|
2768
|
+
simple: (f = a.stepConfig) == null ? void 0 : f.simple,
|
|
2769
|
+
"align-center": ((d = a.stepConfig) == null ? void 0 : d.alignCenter) ?? !0
|
|
2770
|
+
}, {
|
|
2771
|
+
default: ne(() => [
|
|
2772
|
+
(P(!0), z(he, null, ge(a.stepList, (c, t) => (P(), ve(I, {
|
|
2773
|
+
key: t,
|
|
2774
|
+
class: "step-item",
|
|
2775
|
+
onClick: (b) => p(c, t + 1)
|
|
2776
|
+
}, {
|
|
2777
|
+
title: ne(() => [
|
|
2778
|
+
al(T.$slots, "title", {
|
|
2779
|
+
title: c == null ? void 0 : c.title
|
|
2780
|
+
}, void 0, !0)
|
|
2781
|
+
]),
|
|
2782
|
+
description: ne(() => [
|
|
2783
|
+
al(T.$slots, "description", {
|
|
2784
|
+
description: c == null ? void 0 : c.description
|
|
2785
|
+
}, void 0, !0)
|
|
2786
|
+
]),
|
|
2787
|
+
_: 2
|
|
2788
|
+
}, 1032, ["onClick"]))), 128))
|
|
2789
|
+
]),
|
|
2790
|
+
_: 3
|
|
2791
|
+
}, 8, ["direction", "active", "simple", "align-center"]),
|
|
2792
|
+
(y = a.stepConfig) != null && y.allowTrigger && ((o = a.stepConfig) != null && o.active) ? (P(!0), z(he, { key: 0 }, ge(_(), (c, t) => (P(), z("div", {
|
|
2793
|
+
key: t,
|
|
2794
|
+
class: "step-cont-wrap"
|
|
2795
|
+
}, [
|
|
2796
|
+
(P(), ve(Xe(i(c == null ? void 0 : c.type)), {
|
|
2797
|
+
modelValue: c.value,
|
|
2798
|
+
"onUpdate:modelValue": (b) => c.value = b,
|
|
2799
|
+
onClickTrigger: v,
|
|
2800
|
+
onChangeTrigger: g,
|
|
2801
|
+
content: c == null ? void 0 : c.content
|
|
2802
|
+
}, ra({ _: 2 }, [
|
|
2803
|
+
ge(T.$slots, (b, S) => ({
|
|
2804
|
+
name: S,
|
|
2805
|
+
fn: ne((j) => [
|
|
2806
|
+
al(T.$slots, S, ta({ ref_for: !0 }, j || {}), void 0, !0)
|
|
2807
|
+
])
|
|
2808
|
+
}))
|
|
2809
|
+
]), 1064, ["modelValue", "onUpdate:modelValue", "content"]))
|
|
2810
|
+
]))), 128)) : Se("", !0)
|
|
2811
|
+
], 64);
|
|
2812
|
+
};
|
|
2813
|
+
}
|
|
2814
|
+
}), hs = /* @__PURE__ */ Ce(fs, [["__scopeId", "data-v-d7c99969"]]), ms = /* @__PURE__ */ Me({
|
|
2815
|
+
__name: "index",
|
|
2816
|
+
props: {
|
|
2817
|
+
itemData: {
|
|
2818
|
+
type: Array,
|
|
2819
|
+
default: () => []
|
|
2820
|
+
},
|
|
2821
|
+
childItemData: {
|
|
2822
|
+
type: Array,
|
|
2823
|
+
default: () => []
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
emits: ["clickStep"],
|
|
2827
|
+
setup(a, { emit: s }) {
|
|
2828
|
+
const l = a, e = s, n = U({}), r = U([]), p = (i, _) => {
|
|
2829
|
+
e("clickStep", i, _);
|
|
2830
|
+
};
|
|
2831
|
+
return we(() => l == null ? void 0 : l.itemData, (i) => {
|
|
2832
|
+
var _, v;
|
|
2833
|
+
r.value = (_ = i == null ? void 0 : i.find((g) => (g == null ? void 0 : g.key) === "stepList")) == null ? void 0 : _.contents, n.value = (v = i == null ? void 0 : i.find((g) => (g == null ? void 0 : g.key) === "stepConfig")) == null ? void 0 : v.contents;
|
|
2834
|
+
}, {
|
|
2835
|
+
immediate: !0
|
|
2836
|
+
}), (i, _) => {
|
|
2837
|
+
const v = be("svg-icon");
|
|
2838
|
+
return P(), ve(hs, {
|
|
2839
|
+
stepConfig: n.value,
|
|
2840
|
+
stepList: r.value,
|
|
2841
|
+
onClickStep: p
|
|
2842
|
+
}, {
|
|
2843
|
+
icon: ne(() => [
|
|
2844
|
+
V(v, { name: "import" })
|
|
2845
|
+
]),
|
|
2846
|
+
title: ne(({ title: g }) => [
|
|
2847
|
+
ze(q(g), 1)
|
|
2848
|
+
]),
|
|
2849
|
+
description: ne(({ description: g }) => [
|
|
2850
|
+
ze(q(g), 1)
|
|
2851
|
+
]),
|
|
2852
|
+
_: 1
|
|
2853
|
+
}, 8, ["stepConfig", "stepList"]);
|
|
2854
|
+
};
|
|
2855
|
+
}
|
|
2856
|
+
}), vs = /* @__PURE__ */ Me({
|
|
2857
|
+
__name: "index",
|
|
2858
|
+
props: {
|
|
2859
|
+
activities: {
|
|
2860
|
+
type: Array,
|
|
2861
|
+
default: () => []
|
|
2862
|
+
},
|
|
2863
|
+
timeLineConfig: {
|
|
2864
|
+
type: Object,
|
|
2865
|
+
default: () => {
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
},
|
|
2869
|
+
setup(a) {
|
|
2870
|
+
return (s, l) => {
|
|
2871
|
+
const e = be("el-timeline-item"), n = be("el-timeline");
|
|
2872
|
+
return P(), ve(n, null, {
|
|
2873
|
+
default: ne(() => [
|
|
2874
|
+
(P(!0), z(he, null, ge(a.activities, (r, p) => (P(), ve(e, {
|
|
2875
|
+
key: p,
|
|
2876
|
+
timestamp: r.timestamp,
|
|
2877
|
+
placement: a.timeLineConfig.placement,
|
|
2878
|
+
center: a.timeLineConfig.isCenter,
|
|
2879
|
+
"hide-timestamp": !0,
|
|
2880
|
+
type: a.timeLineConfig.type,
|
|
2881
|
+
color: a.timeLineConfig.color,
|
|
2882
|
+
size: a.timeLineConfig.size,
|
|
2883
|
+
icon: a.timeLineConfig.icon,
|
|
2884
|
+
hollow: a.timeLineConfig.isHollow
|
|
2885
|
+
}, {
|
|
2886
|
+
default: ne(() => [
|
|
2887
|
+
al(s.$slots, "content", {
|
|
2888
|
+
content: r == null ? void 0 : r.content,
|
|
2889
|
+
timestamp: r == null ? void 0 : r.timestamp
|
|
2890
|
+
}, void 0, !0)
|
|
2891
|
+
]),
|
|
2892
|
+
_: 2
|
|
2893
|
+
}, 1032, ["timestamp", "placement", "center", "type", "color", "size", "icon", "hollow"]))), 128))
|
|
2894
|
+
]),
|
|
2895
|
+
_: 3
|
|
2896
|
+
});
|
|
2897
|
+
};
|
|
2898
|
+
}
|
|
2899
|
+
}), ys = /* @__PURE__ */ Ce(vs, [["__scopeId", "data-v-4172a886"]]), bs = { class: "line-content" }, gs = { class: "line-time" }, ks = /* @__PURE__ */ Me({
|
|
2900
|
+
__name: "index",
|
|
2901
|
+
props: {
|
|
2902
|
+
itemData: {
|
|
2903
|
+
type: Array,
|
|
2904
|
+
default: () => []
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
setup(a) {
|
|
2908
|
+
const s = a, l = U({}), e = U([]);
|
|
2909
|
+
return we(() => s == null ? void 0 : s.itemData, (n) => {
|
|
2910
|
+
var r, p;
|
|
2911
|
+
e.value = (r = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.key) === "timeLineList")) == null ? void 0 : r.contents, l.value = (p = n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.key) === "timeLineConfig")) == null ? void 0 : p.contents;
|
|
2912
|
+
}, {
|
|
2913
|
+
immediate: !0
|
|
2914
|
+
}), (n, r) => (P(), ve(ys, {
|
|
2915
|
+
activities: e.value,
|
|
2916
|
+
timeLineConfig: l.value
|
|
2917
|
+
}, {
|
|
2918
|
+
content: ne(({ content: p, timestamp: i }) => [
|
|
2919
|
+
x("span", bs, q(p), 1),
|
|
2920
|
+
x("span", gs, q(i), 1)
|
|
2921
|
+
]),
|
|
2922
|
+
_: 1
|
|
2923
|
+
}, 8, ["activities", "timeLineConfig"]));
|
|
2924
|
+
}
|
|
2925
|
+
}), Cs = /* @__PURE__ */ Ce(ks, [["__scopeId", "data-v-b4d9deed"]]), _s = { class: "tabs-content" }, $s = {
|
|
2926
|
+
__name: "index",
|
|
2927
|
+
props: {
|
|
2928
|
+
itemData: {
|
|
2929
|
+
type: Array,
|
|
2930
|
+
default: () => []
|
|
2931
|
+
},
|
|
2932
|
+
childItemData: {
|
|
2933
|
+
type: Array,
|
|
2934
|
+
default: () => []
|
|
2935
|
+
},
|
|
2936
|
+
index: Number
|
|
2937
|
+
},
|
|
2938
|
+
setup(a) {
|
|
2939
|
+
const s = a, l = U([]);
|
|
2940
|
+
return we(
|
|
2941
|
+
() => s == null ? void 0 : s.itemData,
|
|
2942
|
+
(e) => {
|
|
2943
|
+
const n = e.find((r) => (r == null ? void 0 : r.key) == "stepList");
|
|
2944
|
+
n && (l.value = n.contents.map((r) => ({
|
|
2945
|
+
value: r.value || r.title,
|
|
2946
|
+
label: r.label || r.title,
|
|
2947
|
+
children: r.children || []
|
|
2948
|
+
// 关键:传递子内容
|
|
2949
|
+
})));
|
|
2950
|
+
},
|
|
2951
|
+
{ immediate: !0, deep: !0 }
|
|
2952
|
+
), (e, n) => (P(), z("div", _s, [
|
|
2953
|
+
V(da, { tabsContents: l.value }, null, 8, ["tabsContents"])
|
|
2954
|
+
]));
|
|
2955
|
+
}
|
|
2956
|
+
}, xs = /* @__PURE__ */ Ce($s, [["__scopeId", "data-v-d3bb10b7"]]), tl = Nl("tabComp", {
|
|
2957
|
+
state: () => ({
|
|
2958
|
+
itemData: [],
|
|
2959
|
+
originalData: [],
|
|
2960
|
+
extraContents: [],
|
|
2961
|
+
nodeDev: "",
|
|
2962
|
+
isEdit: "view",
|
|
2963
|
+
isRefreshCurStructure: !1,
|
|
2964
|
+
curStructureCompIds: []
|
|
2965
|
+
}),
|
|
2966
|
+
actions: {
|
|
2967
|
+
setItemData(a) {
|
|
2968
|
+
this.itemData = a;
|
|
2969
|
+
},
|
|
2970
|
+
setCurStructureCompIds(a) {
|
|
2971
|
+
this.curStructureCompIds = a;
|
|
2972
|
+
},
|
|
2973
|
+
setRefreshCurStructure(a) {
|
|
2974
|
+
this.isRefreshCurStructure = a;
|
|
2975
|
+
},
|
|
2976
|
+
setOriginalData(a) {
|
|
2977
|
+
this.originalData = a;
|
|
2978
|
+
},
|
|
2979
|
+
setExtraContents(a) {
|
|
2980
|
+
this.extraContents = a;
|
|
2981
|
+
},
|
|
2982
|
+
setNodeDev(a) {
|
|
2983
|
+
this.nodeDev = a;
|
|
2984
|
+
},
|
|
2985
|
+
setIsEdit(a) {
|
|
2986
|
+
this.isEdit = a;
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
}), ws = { class: "type-select" }, As = ["onClick"], Ts = { class: "list-icon" }, Is = {
|
|
2990
|
+
__name: "modelSelect",
|
|
2991
|
+
setup(a) {
|
|
2992
|
+
const s = tl(Ge), { itemData: l } = Ze(s), e = (n) => {
|
|
2993
|
+
const r = u(l.value);
|
|
2994
|
+
r.push({
|
|
2995
|
+
comp: n.comp,
|
|
2996
|
+
name: n.name,
|
|
2997
|
+
compData: []
|
|
2998
|
+
}), s.setItemData(r);
|
|
2999
|
+
};
|
|
3000
|
+
return (n, r) => {
|
|
3001
|
+
const p = be("svg-icon");
|
|
3002
|
+
return P(), z("div", ws, [
|
|
3003
|
+
(P(!0), z(he, null, ge(ia(no), (i, _) => (P(), z("div", {
|
|
3004
|
+
class: "type-list",
|
|
3005
|
+
key: _
|
|
3006
|
+
}, [
|
|
3007
|
+
x("div", {
|
|
3008
|
+
class: "list-content",
|
|
3009
|
+
onClick: (v) => e(i)
|
|
3010
|
+
}, [
|
|
3011
|
+
x("div", Ts, [
|
|
3012
|
+
V(p, {
|
|
3013
|
+
name: i.icon
|
|
3014
|
+
}, null, 8, ["name"])
|
|
3015
|
+
]),
|
|
3016
|
+
x("div", null, q(i.name), 1)
|
|
3017
|
+
], 8, As)
|
|
3018
|
+
]))), 128))
|
|
3019
|
+
]);
|
|
3020
|
+
};
|
|
3021
|
+
}
|
|
3022
|
+
}, Ds = /* @__PURE__ */ Ce(Is, [["__scopeId", "data-v-a77f8023"]]), Es = { class: "fill-content" }, Os = { class: "operate-content" }, Bs = { class: "collapse-title-content" }, Fs = { class: "collapse-title-item" }, Ns = { key: 1 }, Ss = ["onClick"], Ls = { class: "icon-content" }, js = {
|
|
3023
|
+
key: 0,
|
|
3024
|
+
class: "edit-content"
|
|
3025
|
+
}, Us = ["onClick"], Ps = { class: "comp-child" }, Rs = {
|
|
3026
|
+
__name: "modelFill",
|
|
3027
|
+
setup(a) {
|
|
3028
|
+
const s = tl(Ge), { itemData: l, originalData: e } = Ze(s), n = U([]);
|
|
3029
|
+
U([]);
|
|
3030
|
+
const r = U([]), p = U([]), i = (I) => {
|
|
3031
|
+
var N;
|
|
3032
|
+
let k = (N = u(p.value)) == null ? void 0 : N.map((f, d) => (I === d && (f.content = !0), f));
|
|
3033
|
+
p.value = k;
|
|
3034
|
+
}, _ = (I) => {
|
|
3035
|
+
var N;
|
|
3036
|
+
let k = (N = u(p.value)) == null ? void 0 : N.map((f, d) => (I === d && (f.content = !1), f));
|
|
3037
|
+
p.value = k, n.value = u(l.value);
|
|
3038
|
+
}, v = (I, k) => {
|
|
3039
|
+
var y;
|
|
3040
|
+
let N = (y = u(p.value)) == null ? void 0 : y.map((o, c) => (I === c && (o.content = !1), o));
|
|
3041
|
+
p.value = N;
|
|
3042
|
+
const f = u(l.value), d = f == null ? void 0 : f.filter((o, c) => (c === I && (o.name = k), o));
|
|
3043
|
+
s.setOriginalData(d), s.setItemData(d);
|
|
3044
|
+
};
|
|
3045
|
+
we(
|
|
3046
|
+
() => l.value,
|
|
3047
|
+
() => {
|
|
3048
|
+
var I, k, N;
|
|
3049
|
+
!l.value || ((I = l.value) == null ? void 0 : I.length) === 0 ? n.value = [] : n.value = (k = u(l.value)) == null ? void 0 : k.filter((f) => (f == null ? void 0 : f.comp) !== "methodButton"), r.value = n.value, p.value = (N = u(r.value)) == null ? void 0 : N.map((f, d) => ({
|
|
3050
|
+
id: d,
|
|
3051
|
+
content: !1
|
|
3052
|
+
}));
|
|
3053
|
+
},
|
|
3054
|
+
{ deep: !0, immediate: !0 }
|
|
3055
|
+
);
|
|
3056
|
+
const g = (I) => vl(I), T = (I, k, N) => {
|
|
3057
|
+
var d, y;
|
|
3058
|
+
if (!I) return;
|
|
3059
|
+
let f = u(l.value);
|
|
3060
|
+
f = (d = f == null ? void 0 : f.map((o, c) => (c === N && (o.compData = I), o))) == null ? void 0 : d.filter((o) => (o == null ? void 0 : o.comp) !== "methodButton"), p.value = (y = u(f)) == null ? void 0 : y.map((o, c) => ({
|
|
3061
|
+
id: c,
|
|
3062
|
+
content: !1
|
|
3063
|
+
})), s.setOriginalData(f), s.setItemData(f);
|
|
3064
|
+
}, $ = (I) => {
|
|
3065
|
+
We.confirm("是否确认要删除", "", {
|
|
3066
|
+
confirmButtonText: "确认",
|
|
3067
|
+
cancelButtonText: "取消",
|
|
3068
|
+
type: "warning"
|
|
3069
|
+
}).then(() => {
|
|
3070
|
+
const k = u(l.value), N = k == null ? void 0 : k.filter((f, d) => d !== I);
|
|
3071
|
+
s.setOriginalData(N), s.setItemData(N), Ve({
|
|
3072
|
+
type: "success",
|
|
3073
|
+
message: "删除成功"
|
|
3074
|
+
});
|
|
3075
|
+
}).catch(() => {
|
|
3076
|
+
});
|
|
3077
|
+
};
|
|
3078
|
+
return (I, k) => {
|
|
3079
|
+
const N = be("svg-icon");
|
|
3080
|
+
return P(), z("div", Es, [
|
|
3081
|
+
k[1] || (k[1] = x("div", { class: "fill-operate" }, q("操作栏"), -1)),
|
|
3082
|
+
x("div", Os, [
|
|
3083
|
+
V(ba, {
|
|
3084
|
+
class: "collapse-content",
|
|
3085
|
+
collapseContents: n.value
|
|
3086
|
+
}, {
|
|
3087
|
+
title: ne(({ item: f, index: d }) => {
|
|
3088
|
+
var y, o, c, t, b, S, j, R, se, oe;
|
|
3089
|
+
return [
|
|
3090
|
+
x("div", Bs, [
|
|
3091
|
+
x("div", Fs, [
|
|
3092
|
+
(o = (y = p.value) == null ? void 0 : y.find((h) => h.id === d)) != null && o.content ? Se("", !0) : (P(), z("div", {
|
|
3093
|
+
key: 0,
|
|
3094
|
+
class: "collapse-title",
|
|
3095
|
+
style: ua({ marginRight: f.name && f.name !== "" ? "8px" : "0px" })
|
|
3096
|
+
}, q(f.name), 5)),
|
|
3097
|
+
(t = (c = p.value) == null ? void 0 : c.find((h) => h.id === d)) != null && t.content ? (P(), z("div", Ns, [
|
|
3098
|
+
V(fa, {
|
|
3099
|
+
modelValue: f.name,
|
|
3100
|
+
"onUpdate:modelValue": (h) => f.name = h,
|
|
3101
|
+
onClick: k[0] || (k[0] = Ke(() => {
|
|
3102
|
+
}, ["stop"]))
|
|
3103
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3104
|
+
])) : Se("", !0),
|
|
3105
|
+
(S = (b = p.value) == null ? void 0 : b.find((h) => h.id === d)) != null && S.content ? Se("", !0) : (P(), z("div", {
|
|
3106
|
+
key: 2,
|
|
3107
|
+
onClick: Ke((h) => i(d), ["stop"]),
|
|
3108
|
+
class: "icon-content"
|
|
3109
|
+
}, [
|
|
3110
|
+
V(N, {
|
|
3111
|
+
name: "Edit",
|
|
3112
|
+
style: { width: "16px", height: "16px" }
|
|
3113
|
+
})
|
|
3114
|
+
], 8, Ss))
|
|
3115
|
+
]),
|
|
3116
|
+
x("div", Ls, [
|
|
3117
|
+
(R = (j = p.value) == null ? void 0 : j.find((h) => h.id === d)) != null && R.content ? (P(), z("div", js, [
|
|
3118
|
+
V(N, {
|
|
3119
|
+
name: "Cancel",
|
|
3120
|
+
style: { width: "16px", height: "16px" },
|
|
3121
|
+
class: "icon-content",
|
|
3122
|
+
onClick: Ke((h) => _(d), ["stop"])
|
|
3123
|
+
}, null, 8, ["onClick"]),
|
|
3124
|
+
V(N, {
|
|
3125
|
+
name: "Save",
|
|
3126
|
+
onClick: Ke((h) => v(d, f.name), ["stop"]),
|
|
3127
|
+
style: { width: "16px", height: "16px", fill: "var(--ssComponent-primary-color)" },
|
|
3128
|
+
class: "icon-content"
|
|
3129
|
+
}, null, 8, ["onClick"])
|
|
3130
|
+
])) : Se("", !0),
|
|
3131
|
+
(oe = (se = p.value) == null ? void 0 : se.find((h) => h.id === d)) != null && oe.content ? Se("", !0) : (P(), z("div", {
|
|
3132
|
+
key: 1,
|
|
3133
|
+
onClick: Ke((h) => $(d), ["stop"]),
|
|
3134
|
+
class: "icon-content"
|
|
3135
|
+
}, [
|
|
3136
|
+
V(N, {
|
|
3137
|
+
name: "Delete",
|
|
3138
|
+
style: { width: "16px", height: "16px" }
|
|
3139
|
+
})
|
|
3140
|
+
], 8, Us))
|
|
3141
|
+
])
|
|
3142
|
+
])
|
|
3143
|
+
];
|
|
3144
|
+
}),
|
|
3145
|
+
content: ne(({ item: f, index: d }) => {
|
|
3146
|
+
var y, o;
|
|
3147
|
+
return [
|
|
3148
|
+
x("div", Ps, [
|
|
3149
|
+
(P(), ve(Xe(g(f.comp + "Operate")), {
|
|
3150
|
+
itemContents: f == null ? void 0 : f.compData,
|
|
3151
|
+
originalItemContents: (o = (y = r.value) == null ? void 0 : y.find((c, t) => t === d)) == null ? void 0 : o.compData,
|
|
3152
|
+
onChange: (c) => T(c, f, d)
|
|
3153
|
+
}, null, 40, ["itemContents", "originalItemContents", "onChange"]))
|
|
3154
|
+
])
|
|
3155
|
+
];
|
|
3156
|
+
}),
|
|
3157
|
+
_: 1
|
|
3158
|
+
}, 8, ["collapseContents"])
|
|
3159
|
+
])
|
|
3160
|
+
]);
|
|
3161
|
+
};
|
|
3162
|
+
}
|
|
3163
|
+
}, Js = /* @__PURE__ */ Ce(Rs, [["__scopeId", "data-v-49a5b97a"]]), Vs = {
|
|
3164
|
+
key: 0,
|
|
3165
|
+
class: "show-content"
|
|
3166
|
+
}, Ws = { style: { display: "flex" } }, zs = {
|
|
3167
|
+
__name: "modelShow",
|
|
3168
|
+
setup(a) {
|
|
3169
|
+
const s = tl(Ge), { itemData: l } = Ze(s), e = U([]);
|
|
3170
|
+
we(
|
|
3171
|
+
() => l.value,
|
|
3172
|
+
() => {
|
|
3173
|
+
var r;
|
|
3174
|
+
!l.value || ((r = l.value) == null ? void 0 : r.length) === 0 ? e.value = [] : e.value = u(l.value);
|
|
3175
|
+
},
|
|
3176
|
+
{ deep: !0, immediate: !0 }
|
|
3177
|
+
);
|
|
3178
|
+
const n = (r) => vl(r);
|
|
3179
|
+
return (r, p) => {
|
|
3180
|
+
var i;
|
|
3181
|
+
return ((i = e.value) == null ? void 0 : i.length) > 0 ? (P(), z("div", Vs, [
|
|
3182
|
+
(P(!0), z(he, null, ge(e.value, (_, v) => (P(), z("div", {
|
|
3183
|
+
class: "item-content",
|
|
3184
|
+
key: v
|
|
3185
|
+
}, [
|
|
3186
|
+
x("div", Ws, q(_.name), 1),
|
|
3187
|
+
(P(), ve(Xe(n(_.comp)), {
|
|
3188
|
+
itemData: _ == null ? void 0 : _.compData,
|
|
3189
|
+
childItemData: _ == null ? void 0 : _.itemChildData,
|
|
3190
|
+
key: v
|
|
3191
|
+
}, null, 8, ["itemData", "childItemData"]))
|
|
3192
|
+
]))), 128))
|
|
3193
|
+
])) : Se("", !0);
|
|
3194
|
+
};
|
|
3195
|
+
}
|
|
3196
|
+
}, Gs = /* @__PURE__ */ Ce(zs, [["__scopeId", "data-v-a59b819d"]]), Ms = { class: "tabs-header" }, Zs = { class: "tabs-list" }, Hs = { class: "tab-name" }, Ks = { class: "tab-actions" }, qs = ["onClick"], Qs = ["onClick"], Xs = { class: "model-operate" }, Ys = { class: "model-select" }, eo = { class: "model-fill" }, lo = {
|
|
3197
|
+
__name: "operate",
|
|
3198
|
+
props: {
|
|
3199
|
+
itemContents: {
|
|
3200
|
+
type: Array,
|
|
3201
|
+
default: () => []
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
emits: ["change"],
|
|
3205
|
+
setup(a, { emit: s }) {
|
|
3206
|
+
const l = a, e = s, n = U([]), r = U(!1), p = U(""), i = U({ title: "" }), _ = U(-1), v = U(!1), g = () => {
|
|
3207
|
+
p.value = "新增标签页", i.value.title = "", _.value = -1, r.value = !0;
|
|
3208
|
+
}, T = (d) => {
|
|
3209
|
+
p.value = "修改标签页", i.value.title = n.value[d].title, _.value = d, r.value = !0;
|
|
3210
|
+
}, $ = (d) => {
|
|
3211
|
+
n.value.splice(d, 1), f();
|
|
3212
|
+
}, I = () => {
|
|
3213
|
+
i.value.title.trim() && (_.value === -1 ? n.value.push({
|
|
3214
|
+
title: i.value.title,
|
|
3215
|
+
value: i.value.title,
|
|
3216
|
+
label: i.value.title,
|
|
3217
|
+
children: []
|
|
3218
|
+
}) : (n.value[_.value].title = i.value.title, n.value[_.value].value = i.value.title, n.value[_.value].label = i.value.title), r.value = !1, f());
|
|
3219
|
+
}, k = () => {
|
|
3220
|
+
v.value = !0;
|
|
3221
|
+
}, N = () => {
|
|
3222
|
+
const d = tl(Ge), { itemData: y } = Ze(d);
|
|
3223
|
+
console.log(y.value), v.value = !1;
|
|
3224
|
+
}, f = () => {
|
|
3225
|
+
const d = [
|
|
3226
|
+
{
|
|
3227
|
+
key: "stepList",
|
|
3228
|
+
contents: n.value
|
|
3229
|
+
}
|
|
3230
|
+
];
|
|
3231
|
+
e("change", d);
|
|
3232
|
+
};
|
|
3233
|
+
return we(
|
|
3234
|
+
() => l.itemContents,
|
|
3235
|
+
(d) => {
|
|
3236
|
+
if (d && d.length > 0) {
|
|
3237
|
+
const y = d.find((o) => o.key === "stepList");
|
|
3238
|
+
y && y.contents && (n.value = y.contents.map((o) => ({
|
|
3239
|
+
title: o.title || "",
|
|
3240
|
+
value: o.value || o.title || "",
|
|
3241
|
+
label: o.label || o.title || "",
|
|
3242
|
+
children: o.children || []
|
|
3243
|
+
})));
|
|
3244
|
+
}
|
|
3245
|
+
},
|
|
3246
|
+
{ immediate: !0 }
|
|
3247
|
+
), (d, y) => {
|
|
3248
|
+
const o = be("svg-icon"), c = be("el-input"), t = be("el-form-item"), b = be("el-form");
|
|
3249
|
+
return P(), z("div", null, [
|
|
3250
|
+
x("div", Ms, [
|
|
3251
|
+
y[8] || (y[8] = x("h4", null, "标签页管理", -1)),
|
|
3252
|
+
x("button", { onClick: g }, [
|
|
3253
|
+
V(o, {
|
|
3254
|
+
name: "Plus",
|
|
3255
|
+
style: { width: "14px", height: "14px", "margin-right": "4px" }
|
|
3256
|
+
}),
|
|
3257
|
+
y[7] || (y[7] = ze(" 新增标签页 "))
|
|
3258
|
+
])
|
|
3259
|
+
]),
|
|
3260
|
+
x("div", Zs, [
|
|
3261
|
+
(P(!0), z(he, null, ge(n.value, (S, j) => (P(), z("div", {
|
|
3262
|
+
class: "tab-item",
|
|
3263
|
+
key: j
|
|
3264
|
+
}, [
|
|
3265
|
+
x("span", Hs, q(S.title), 1),
|
|
3266
|
+
x("div", Ks, [
|
|
3267
|
+
x("button", {
|
|
3268
|
+
onClick: (R) => T(j)
|
|
3269
|
+
}, "修改标题", 8, qs),
|
|
3270
|
+
x("button", { onClick: k }, "布局调整"),
|
|
3271
|
+
x("button", {
|
|
3272
|
+
onClick: (R) => $(j)
|
|
3273
|
+
}, "删除", 8, Qs)
|
|
3274
|
+
])
|
|
3275
|
+
]))), 128))
|
|
3276
|
+
]),
|
|
3277
|
+
V(Ie, {
|
|
3278
|
+
modelValue: r.value,
|
|
3279
|
+
"onUpdate:modelValue": y[2] || (y[2] = (S) => r.value = S),
|
|
3280
|
+
title: p.value,
|
|
3281
|
+
onBeforeDestroy: y[3] || (y[3] = (S) => r.value = !1)
|
|
3282
|
+
}, {
|
|
3283
|
+
footer: ne(() => [
|
|
3284
|
+
x("button", {
|
|
3285
|
+
onClick: y[1] || (y[1] = (S) => r.value = !1)
|
|
3286
|
+
}, "取消"),
|
|
3287
|
+
x("button", {
|
|
3288
|
+
type: "primary",
|
|
3289
|
+
onClick: I
|
|
3290
|
+
}, "确定")
|
|
3291
|
+
]),
|
|
3292
|
+
default: ne(() => [
|
|
3293
|
+
V(b, {
|
|
3294
|
+
model: i.value,
|
|
3295
|
+
"label-width": "80px"
|
|
3296
|
+
}, {
|
|
3297
|
+
default: ne(() => [
|
|
3298
|
+
V(t, {
|
|
3299
|
+
label: "标签名称",
|
|
3300
|
+
required: ""
|
|
3301
|
+
}, {
|
|
3302
|
+
default: ne(() => [
|
|
3303
|
+
V(c, {
|
|
3304
|
+
modelValue: i.value.title,
|
|
3305
|
+
"onUpdate:modelValue": y[0] || (y[0] = (S) => i.value.title = S),
|
|
3306
|
+
placeholder: "请输入标签页名称"
|
|
3307
|
+
}, null, 8, ["modelValue"])
|
|
3308
|
+
]),
|
|
3309
|
+
_: 1
|
|
3310
|
+
})
|
|
3311
|
+
]),
|
|
3312
|
+
_: 1
|
|
3313
|
+
}, 8, ["model"])
|
|
3314
|
+
]),
|
|
3315
|
+
_: 1
|
|
3316
|
+
}, 8, ["modelValue", "title"]),
|
|
3317
|
+
V(Ie, {
|
|
3318
|
+
modelValue: v.value,
|
|
3319
|
+
"onUpdate:modelValue": y[5] || (y[5] = (S) => v.value = S),
|
|
3320
|
+
title: "布局调整",
|
|
3321
|
+
fullScreen: "",
|
|
3322
|
+
onBeforeDestroy: y[6] || (y[6] = (S) => v.value = !1)
|
|
3323
|
+
}, {
|
|
3324
|
+
footer: ne(() => [
|
|
3325
|
+
x("button", {
|
|
3326
|
+
onClick: y[4] || (y[4] = (S) => v.value = !1)
|
|
3327
|
+
}, "取消"),
|
|
3328
|
+
x("button", { onClick: N }, "确定")
|
|
3329
|
+
]),
|
|
3330
|
+
default: ne(() => [
|
|
3331
|
+
x("div", Xs, [
|
|
3332
|
+
x("div", Ys, [
|
|
3333
|
+
V(Ds)
|
|
3334
|
+
]),
|
|
3335
|
+
(P(), z("div", {
|
|
3336
|
+
class: "model-show",
|
|
3337
|
+
key: d.innerWidth
|
|
3338
|
+
}, [
|
|
3339
|
+
V(Gs)
|
|
3340
|
+
])),
|
|
3341
|
+
x("div", eo, [
|
|
3342
|
+
V(Js)
|
|
3343
|
+
])
|
|
3344
|
+
])
|
|
3345
|
+
]),
|
|
3346
|
+
_: 1
|
|
3347
|
+
}, 8, ["modelValue"])
|
|
3348
|
+
]);
|
|
3349
|
+
};
|
|
3350
|
+
}
|
|
3351
|
+
}, ao = /* @__PURE__ */ Ce(lo, [["__scopeId", "data-v-d3a1a68e"]]), no = U([
|
|
3352
|
+
{
|
|
3353
|
+
name: "表格",
|
|
3354
|
+
type: "table",
|
|
3355
|
+
comp: "Table",
|
|
3356
|
+
icon: "Table"
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
name: "表单",
|
|
3360
|
+
type: "form",
|
|
3361
|
+
comp: "Form",
|
|
3362
|
+
icon: "Form"
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
name: "折叠",
|
|
3366
|
+
type: "fold",
|
|
3367
|
+
comp: "Fold",
|
|
3368
|
+
icon: "Fold"
|
|
3369
|
+
},
|
|
3370
|
+
{
|
|
3371
|
+
name: "头像",
|
|
3372
|
+
type: "avatar",
|
|
3373
|
+
comp: "AvatarUpload",
|
|
3374
|
+
icon: "Avatar"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
name: "签名",
|
|
3378
|
+
type: "signature",
|
|
3379
|
+
comp: "Signature",
|
|
3380
|
+
icon: "Signature"
|
|
3381
|
+
},
|
|
3382
|
+
{
|
|
3383
|
+
name: "步骤条",
|
|
3384
|
+
type: "step",
|
|
3385
|
+
comp: "Step",
|
|
3386
|
+
icon: "Step"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
name: "时间线",
|
|
3390
|
+
type: "timeLine",
|
|
3391
|
+
comp: "TimeLine",
|
|
3392
|
+
icon: "TimeLine"
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
name: "标签页",
|
|
3396
|
+
type: "tabs",
|
|
3397
|
+
comp: "Tabs",
|
|
3398
|
+
icon: "Tabs"
|
|
3399
|
+
}
|
|
3400
|
+
]), so = {
|
|
3401
|
+
TABLE: oa,
|
|
3402
|
+
FORM: $l,
|
|
3403
|
+
TABLEOPERATE: gn,
|
|
3404
|
+
FORMOPERATE: xl,
|
|
3405
|
+
FOLD: Hn,
|
|
3406
|
+
CALCULATOR: Yn,
|
|
3407
|
+
METHODBUTTON: ns,
|
|
3408
|
+
AVATARUPLOAD: ya,
|
|
3409
|
+
SIGNATURE: va,
|
|
3410
|
+
FORMTOP: $l,
|
|
3411
|
+
STEP: ms,
|
|
3412
|
+
STEPOPERATE: Pn,
|
|
3413
|
+
TIMELINE: Cs,
|
|
3414
|
+
TIMELINEOPERATE: Gn,
|
|
3415
|
+
FORMTOPOPERATE: xl,
|
|
3416
|
+
SIGNATUREOPERATE: ds,
|
|
3417
|
+
AVATARUPLOADOPERATE: rs,
|
|
3418
|
+
TABS: xs,
|
|
3419
|
+
TABSOPERATE: ao
|
|
3420
|
+
// 添加其他组件...
|
|
3421
|
+
};
|
|
3422
|
+
function vl(a) {
|
|
3423
|
+
return so[a == null ? void 0 : a.toUpperCase()] || null;
|
|
3424
|
+
}
|
|
3425
|
+
const pe = [
|
|
3426
|
+
{
|
|
3427
|
+
key: "FormName",
|
|
3428
|
+
value: "Form"
|
|
3429
|
+
},
|
|
3430
|
+
{
|
|
3431
|
+
key: "TableName",
|
|
3432
|
+
value: "Table"
|
|
3433
|
+
},
|
|
3434
|
+
{
|
|
3435
|
+
key: "MenuName",
|
|
3436
|
+
value: "Menu"
|
|
3437
|
+
},
|
|
3438
|
+
{
|
|
3439
|
+
key: "GroupName",
|
|
3440
|
+
value: "Group"
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
key: "SystemKey",
|
|
3444
|
+
value: "System"
|
|
3445
|
+
}
|
|
3446
|
+
], ce = [
|
|
3447
|
+
{
|
|
3448
|
+
key: "FormDirect",
|
|
3449
|
+
value: "formFlex"
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
key: "Form",
|
|
3453
|
+
value: "formContent"
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
key: "FormButton",
|
|
3457
|
+
value: "formButton"
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
key: "FormFlex",
|
|
3461
|
+
value: "formWrap"
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
key: "TableColumns",
|
|
3465
|
+
value: "header"
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
key: "TableButton",
|
|
3469
|
+
value: "extraButton"
|
|
3470
|
+
},
|
|
3471
|
+
{
|
|
3472
|
+
key: "TableLineButton",
|
|
3473
|
+
value: "rowButton"
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
key: "Table",
|
|
3477
|
+
value: "tableContents"
|
|
3478
|
+
},
|
|
3479
|
+
{
|
|
3480
|
+
key: "TableIndex",
|
|
3481
|
+
value: "tableIndex"
|
|
3482
|
+
},
|
|
3483
|
+
{
|
|
3484
|
+
key: "Menus",
|
|
3485
|
+
value: "menuContents"
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
key: "GroupContents",
|
|
3489
|
+
value: "groupContents"
|
|
3490
|
+
}
|
|
3491
|
+
], He = U(0), oo = (a) => {
|
|
3492
|
+
const [s, l] = a.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), n = l.replace(/^['"]|['"]$/g, "");
|
|
3493
|
+
return { key: e, value: n };
|
|
3494
|
+
}, nl = (a) => {
|
|
3495
|
+
try {
|
|
3496
|
+
return JSON.parse(a), !0;
|
|
3497
|
+
} catch {
|
|
3498
|
+
return !1;
|
|
3499
|
+
}
|
|
3500
|
+
}, ro = (a) => a.includes("$") && a.trim().endsWith("(") ? a + ")" : a, to = (a) => {
|
|
3501
|
+
let s = a;
|
|
3502
|
+
const l = [];
|
|
3503
|
+
let e = "";
|
|
3504
|
+
for (const n of s)
|
|
3505
|
+
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());
|
|
3506
|
+
return l == null ? void 0 : l.filter((n) => n.includes("{"));
|
|
3507
|
+
}, io = (a) => {
|
|
3508
|
+
var l;
|
|
3509
|
+
let s = [];
|
|
3510
|
+
return (l = to(a.slice(1, -1))) == null || l.forEach((e) => {
|
|
3511
|
+
var r, p, i, _;
|
|
3512
|
+
let n = ((p = (r = e.slice(1, -1)) == null ? void 0 : r.split(",")) == null ? void 0 : p.length) ?? 1;
|
|
3513
|
+
(_ = (i = e.slice(1, -1)) == null ? void 0 : i.split(",")) == null || _.forEach((v) => {
|
|
3514
|
+
var I, k, N, f, d, y, o, c, t, b, S, j, R;
|
|
3515
|
+
let g = v == null ? void 0 : v.split(":"), T = g != null && g[0] ? (g == null ? void 0 : g[1].split("$").length) - 1 === 1 ? ((I = g == null ? void 0 : g[0]) == null ? void 0 : I.replace(/^"(.*)"$/, "$1")) + ((k = g == null ? void 0 : g[1]) == null ? void 0 : k.replace(/^"(.*)"$/, "$1")) : Array.isArray((f = (N = g == null ? void 0 : g[1]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1")) == null ? void 0 : f.split("(")) && ((o = (y = (d = g == null ? void 0 : g[1]) == null ? void 0 : d.replace(/^"(.*)"$/, "$1")) == null ? void 0 : y.split("(")) == null ? void 0 : o.length) > 1 ? ((c = g == null ? void 0 : g[0]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) + ((S = (b = (t = g == null ? void 0 : g[1]) == null ? void 0 : t.replace(/^"(.*)"$/, "$1")) == null ? void 0 : b.split("(")) == null ? void 0 : S[0]) + "()" : (j = g == null ? void 0 : g[0]) == null ? void 0 : j.replace(/^"(.*)"$/, "$1") : "", $ = (g == null ? void 0 : g[1].split("$").length) - 1 === 0 ? (R = g == null ? void 0 : g[1]) == null ? void 0 : R.replace(/^"(.*)"$/, "$1") : "";
|
|
3516
|
+
He.value++, s.push({
|
|
3517
|
+
id: He.value,
|
|
3518
|
+
key: T,
|
|
3519
|
+
value: $,
|
|
3520
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
3521
|
+
width: n,
|
|
3522
|
+
extraContent: g == null ? void 0 : g[1]
|
|
3523
|
+
});
|
|
3524
|
+
});
|
|
3525
|
+
}), s;
|
|
3526
|
+
}, Vl = (a) => {
|
|
3527
|
+
var s, l;
|
|
3528
|
+
try {
|
|
3529
|
+
const e = a.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
3530
|
+
if (u(e).split("{").length - 1 > 1) {
|
|
3531
|
+
let n = u(e).replace(/^\{(.*)\}$/, "[$1]");
|
|
3532
|
+
if (nl(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), nl(n)) {
|
|
3533
|
+
const r = JSON.parse(n);
|
|
3534
|
+
let p = [];
|
|
3535
|
+
return r == null || r.forEach((i) => {
|
|
3536
|
+
var _;
|
|
3537
|
+
(_ = Object.entries(u(i))) == null || _.forEach((v) => {
|
|
3538
|
+
He.value++, p.push({
|
|
3539
|
+
id: He.value,
|
|
3540
|
+
key: (v == null ? void 0 : v[0]) ?? "",
|
|
3541
|
+
value: (v == null ? void 0 : v[1]) === "" ? "" : v == null ? void 0 : v[1],
|
|
3542
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
3543
|
+
width: Object.keys(u(i)).length
|
|
3544
|
+
});
|
|
3545
|
+
});
|
|
3546
|
+
}), p;
|
|
3547
|
+
} else
|
|
3548
|
+
return e.trim().startsWith("{{") ? io(e.trim()) : pl(n);
|
|
3549
|
+
} else if (nl(e)) {
|
|
3550
|
+
const n = JSON.parse(e);
|
|
3551
|
+
return Object.entries(n).map(([r, p]) => (He.value++, {
|
|
3552
|
+
id: He.value,
|
|
3553
|
+
key: r,
|
|
3554
|
+
value: p === "" ? "" : p,
|
|
3555
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
3556
|
+
width: 1
|
|
3557
|
+
}));
|
|
3558
|
+
} else
|
|
3559
|
+
return ((s = pl(e)) == null ? void 0 : s.length) === 0 ? e : (l = pl(e)) == null ? void 0 : l.map((n) => ({
|
|
3560
|
+
label: n.label,
|
|
3561
|
+
method: ro(n.method)
|
|
3562
|
+
}));
|
|
3563
|
+
} catch (e) {
|
|
3564
|
+
return console.error("转换失败:", e), [];
|
|
3565
|
+
}
|
|
3566
|
+
}, pl = (a) => {
|
|
3567
|
+
a = a.trim().replace(/^\{|\}$/g, "").trim();
|
|
3568
|
+
const s = [];
|
|
3569
|
+
let l = 0;
|
|
3570
|
+
for (; l < a.length; ) {
|
|
3571
|
+
const e = a.slice(l).match(/^\s*"([^"]+)"\s*:\s*/);
|
|
3572
|
+
if (!e) break;
|
|
3573
|
+
const n = e[1];
|
|
3574
|
+
l += e[0].length;
|
|
3575
|
+
let r = "", p = 0, i = !1, _ = "";
|
|
3576
|
+
for (let v = l; v < a.length; v++) {
|
|
3577
|
+
const g = a[v];
|
|
3578
|
+
if ((g === '"' || g === "'") && !i ? (i = !0, _ = g) : g === _ && i && (i = !1, _ = ""), !i && ((g === "{" || g === "(" || g === "[") && p++, (g === "}" || g === ")" || g === "]") && p--, g === "," && p === 0 || v === a.length - 1)) {
|
|
3579
|
+
r = a.slice(l, v + 1).trim(), l = v + 1;
|
|
3580
|
+
break;
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
s.push({
|
|
3584
|
+
label: n,
|
|
3585
|
+
method: r
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
return s;
|
|
3589
|
+
}, uo = (a, s) => {
|
|
3590
|
+
try {
|
|
3591
|
+
if (pe != null && pe.find((l) => (l == null ? void 0 : l.key) === s))
|
|
3592
|
+
return a.replace(/['"]/g, "").trim();
|
|
3593
|
+
if (u(a).split("[").length - 1 > 1) {
|
|
3594
|
+
const l = u(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
3595
|
+
return JSON.parse(l);
|
|
3596
|
+
} else {
|
|
3597
|
+
const l = u(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
3598
|
+
if (nl(l)) {
|
|
3599
|
+
const e = JSON.parse(l);
|
|
3600
|
+
return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
|
|
3601
|
+
} else
|
|
3602
|
+
return Vl(u(a));
|
|
3603
|
+
}
|
|
3604
|
+
} catch (l) {
|
|
3605
|
+
return console.error("解析失败:", l), a;
|
|
3606
|
+
}
|
|
3607
|
+
}, co = (a) => ({ [a == null ? void 0 : a.key]: uo(a == null ? void 0 : a.value, a == null ? void 0 : a.key) }), po = (a) => {
|
|
3608
|
+
try {
|
|
3609
|
+
if (u(a).split("[").length - 1 > 1) {
|
|
3610
|
+
const s = u(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
3611
|
+
return JSON.parse(s);
|
|
3612
|
+
} else
|
|
3613
|
+
return JSON.parse(u(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
|
|
3614
|
+
} catch (s) {
|
|
3615
|
+
return console.error("解析失败:", s), a;
|
|
3616
|
+
}
|
|
3617
|
+
}, fo = (a) => {
|
|
3618
|
+
const s = a.match(/\(([^)]+)\)/);
|
|
3619
|
+
return s ? s[1] : "";
|
|
3620
|
+
}, ho = (a) => {
|
|
3621
|
+
const s = a.match(/^([^(]+)\s*\(/);
|
|
3622
|
+
return s ? s[1].trim() : a;
|
|
3623
|
+
}, wl = (a) => a.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((s) => s.trim()).filter((s) => s).join("/"), mo = (a) => {
|
|
3624
|
+
var p, i;
|
|
3625
|
+
let s = [], l = [];
|
|
3626
|
+
const e = (p = u(a)) == null ? void 0 : p.map((_) => _ == null ? void 0 : _.key), n = [...new Set((i = u(e)) == null ? void 0 : i.map((_) => fo(_)))];
|
|
3627
|
+
n == null || n.forEach((_) => {
|
|
3628
|
+
let v = a == null ? void 0 : a.filter(($) => $.key.includes(_));
|
|
3629
|
+
v == null || v.forEach(($) => {
|
|
3630
|
+
$ != null && $.key.includes("Menus") && (s.push({
|
|
3631
|
+
key: "GroupName",
|
|
3632
|
+
value: wl($ == null ? void 0 : $.value)
|
|
3633
|
+
}), l.push(wl($ == null ? void 0 : $.value)));
|
|
3634
|
+
});
|
|
3635
|
+
let g = a == null ? void 0 : a.filter(($) => $.key.includes(_) && !($ != null && $.key.includes("Menus")));
|
|
3636
|
+
g = g == null ? void 0 : g.map(($) => ($.key = ho($.key), $));
|
|
3637
|
+
const T = {
|
|
3638
|
+
key: "GroupContents",
|
|
3639
|
+
value: g
|
|
3640
|
+
};
|
|
3641
|
+
s.push(T);
|
|
3642
|
+
});
|
|
3643
|
+
const r = {
|
|
3644
|
+
key: "Menus",
|
|
3645
|
+
value: l
|
|
3646
|
+
};
|
|
3647
|
+
return s.unshift(r), s;
|
|
3648
|
+
}, Wl = (a) => {
|
|
3649
|
+
var s, l;
|
|
3650
|
+
if (Array.isArray(Object.keys(a)) && ((s = Object.keys(a)) == null ? void 0 : s.length) > 0) {
|
|
3651
|
+
let e = [];
|
|
3652
|
+
return (l = Object.entries(a)) == null || l.forEach(([n, r]) => {
|
|
3653
|
+
var i, _;
|
|
3654
|
+
let p = [];
|
|
3655
|
+
if (p.push(n), ((i = Object.keys(r)) == null ? void 0 : i.length) > 0) {
|
|
3656
|
+
let v = [];
|
|
3657
|
+
(_ = Wl(r)) == null || _.forEach((g) => {
|
|
3658
|
+
v.push(g);
|
|
3659
|
+
}), v == null || v.forEach((g) => {
|
|
3660
|
+
p.push(g);
|
|
3661
|
+
});
|
|
3662
|
+
}
|
|
3663
|
+
e.push(p);
|
|
3664
|
+
}), e;
|
|
3665
|
+
}
|
|
3666
|
+
}, vo = (a, s) => {
|
|
3667
|
+
var e;
|
|
3668
|
+
let l = s;
|
|
3669
|
+
return Array.isArray(Object.keys(a)) && ((e = Object.entries(a)) == null || e.forEach(([n, r]) => {
|
|
3670
|
+
let p = [n];
|
|
3671
|
+
if (typeof r == "object" && r !== null) {
|
|
3672
|
+
let i = Wl(r);
|
|
3673
|
+
i == null || i.forEach((_) => {
|
|
3674
|
+
p.push(_);
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
l.push(p);
|
|
3678
|
+
})), l;
|
|
3679
|
+
}, yo = (a) => {
|
|
3680
|
+
const s = {};
|
|
3681
|
+
return a.forEach((e) => {
|
|
3682
|
+
const n = e.split("/");
|
|
3683
|
+
let r = s;
|
|
3684
|
+
n.forEach((p) => {
|
|
3685
|
+
r[p] || (r[p] = {}), r = r[p];
|
|
3686
|
+
});
|
|
3687
|
+
}), vo(s, []);
|
|
3688
|
+
}, zl = (a) => yo(a), or = (a) => {
|
|
3689
|
+
var s, l, e, n, r, p, i, _;
|
|
3690
|
+
try {
|
|
3691
|
+
const v = bl((l = (s = u(a)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), g = (n = (e = u(v)) == null ? void 0 : e.filter((k) => !k.includes("/*"))) == null ? void 0 : n.map((k) => oo(k)), T = mo(g), $ = [];
|
|
3692
|
+
if (((r = T == null ? void 0 : T.find((k) => (k == null ? void 0 : k.key) === "Menus")) == null ? void 0 : r.value.length) === 0)
|
|
3693
|
+
return !1;
|
|
3694
|
+
(p = u(T)) == null || p.forEach((k) => {
|
|
3695
|
+
var N, f, d, y, o;
|
|
3696
|
+
pe != null && pe.find((c) => {
|
|
3697
|
+
var t, b;
|
|
3698
|
+
return ((t = c == null ? void 0 : c.key) == null ? void 0 : t.toUpperCase()) === ((b = k == null ? void 0 : k.key) == null ? void 0 : b.toUpperCase());
|
|
3699
|
+
}) ? $.push({
|
|
3700
|
+
comp: ((N = pe == null ? void 0 : pe.find((c) => {
|
|
3701
|
+
var t, b;
|
|
3702
|
+
return ((t = c == null ? void 0 : c.key) == null ? void 0 : t.toUpperCase()) === ((b = k == null ? void 0 : k.key) == null ? void 0 : b.toUpperCase());
|
|
3703
|
+
})) == null ? void 0 : N.value) ?? "",
|
|
3704
|
+
name: (f = k == null ? void 0 : k.value) == null ? void 0 : f.replace(/[’]|[‘]|[']/g, ""),
|
|
3705
|
+
compData: []
|
|
3706
|
+
}) : ce != null && ce.find((c) => {
|
|
3707
|
+
var t, b;
|
|
3708
|
+
return ((t = c == null ? void 0 : c.key) == null ? void 0 : t.toUpperCase()) === ((b = k == null ? void 0 : k.key) == null ? void 0 : b.toUpperCase());
|
|
3709
|
+
}) && (($ == null ? void 0 : $.length) === 0 && (d = k.key) != null && d.includes("Menus") && $.push({
|
|
3710
|
+
comp: "Menu",
|
|
3711
|
+
name: "",
|
|
3712
|
+
compData: []
|
|
3713
|
+
}), (y = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && y.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
|
|
3714
|
+
key: (o = ce == null ? void 0 : ce.find((c) => {
|
|
3715
|
+
var t, b;
|
|
3716
|
+
return ((t = c == null ? void 0 : c.key) == null ? void 0 : t.toUpperCase()) === ((b = k == null ? void 0 : k.key) == null ? void 0 : b.toUpperCase());
|
|
3717
|
+
})) == null ? void 0 : o.value,
|
|
3718
|
+
contents: k == null ? void 0 : k.value
|
|
3719
|
+
}));
|
|
3720
|
+
});
|
|
3721
|
+
let I = (i = u($)) == null ? void 0 : i.map((k) => {
|
|
3722
|
+
var N;
|
|
3723
|
+
return k != null && k.compData && (k.compData = (N = k == null ? void 0 : k.compData) == null ? void 0 : N.map((f) => {
|
|
3724
|
+
var d, y, o, c, t, b, S, j, R, se, oe;
|
|
3725
|
+
if ((f == null ? void 0 : f.key) === "formFlex")
|
|
3726
|
+
f.contents = ((y = (d = f.contents) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : y.toUpperCase()) !== "Vertical".toUpperCase();
|
|
3727
|
+
else if ((f == null ? void 0 : f.key) === "groupContents")
|
|
3728
|
+
f.contents = (o = u(f.contents)) == null ? void 0 : o.map((h) => co(u(h)));
|
|
3729
|
+
else if (Array.isArray(f == null ? void 0 : f.contents))
|
|
3730
|
+
f.contents = zl(f.contents);
|
|
3731
|
+
else if (((t = (c = f == null ? void 0 : f.contents) == null ? void 0 : c.trim()) != null && t.startsWith("[") || (S = (b = f.contents) == null ? void 0 : b.trim()) != null && S.startsWith("【")) && ((R = (j = f.contents) == null ? void 0 : j.trim()) != null && R.endsWith("]") || (oe = (se = f.contents) == null ? void 0 : se.trim()) != null && oe.endsWith("】")))
|
|
3732
|
+
f.contents = po(u(f.contents));
|
|
3733
|
+
else {
|
|
3734
|
+
if (!f.contents) return;
|
|
3735
|
+
f.contents = Vl(u(f.contents));
|
|
3736
|
+
}
|
|
3737
|
+
return f;
|
|
3738
|
+
})), k;
|
|
3739
|
+
});
|
|
3740
|
+
return I = (_ = u(I)) == null ? void 0 : _.map((k) => {
|
|
3741
|
+
var N;
|
|
3742
|
+
return (k == null ? void 0 : k.comp) === "Group" && (k.compData = (N = k.compData) == null ? void 0 : N.map((f) => {
|
|
3743
|
+
var y;
|
|
3744
|
+
let d = [];
|
|
3745
|
+
return (y = f.contents) == null || y.forEach((o) => {
|
|
3746
|
+
var c, t, b, S, j, R, se, oe, h, w, O, m;
|
|
3747
|
+
if (pe != null && pe.find((F) => {
|
|
3748
|
+
var G, X, D;
|
|
3749
|
+
return ((G = F == null ? void 0 : F.key) == null ? void 0 : G.toUpperCase()) === ((D = (X = Object.keys(o)) == null ? void 0 : X[0]) == null ? void 0 : D.toUpperCase());
|
|
3750
|
+
}))
|
|
3751
|
+
d.push({
|
|
3752
|
+
comp: (c = pe == null ? void 0 : pe.find((F) => {
|
|
3753
|
+
var G, X, D;
|
|
3754
|
+
return ((G = F == null ? void 0 : F.key) == null ? void 0 : G.toUpperCase()) === ((D = (X = Object.keys(o)) == null ? void 0 : X[0]) == null ? void 0 : D.toUpperCase());
|
|
3755
|
+
})) == null ? void 0 : c.value,
|
|
3756
|
+
name: (b = (t = Object.values(o)) == null ? void 0 : t[0]) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
|
|
3757
|
+
compData: []
|
|
3758
|
+
});
|
|
3759
|
+
else if (ce != null && ce.find((F) => {
|
|
3760
|
+
var G, X, D;
|
|
3761
|
+
return ((G = F == null ? void 0 : F.key) == null ? void 0 : G.toUpperCase()) === ((D = (X = Object.keys(o)) == null ? void 0 : X[0]) == null ? void 0 : D.toUpperCase());
|
|
3762
|
+
})) {
|
|
3763
|
+
if ((d == null ? void 0 : d.length) === 0) return;
|
|
3764
|
+
(S = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && S.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
3765
|
+
key: (j = ce == null ? void 0 : ce.find((F) => {
|
|
3766
|
+
var G, X, D;
|
|
3767
|
+
return ((G = F == null ? void 0 : F.key) == null ? void 0 : G.toUpperCase()) === ((D = (X = Object.keys(o)) == null ? void 0 : X[0]) == null ? void 0 : D.toUpperCase());
|
|
3768
|
+
})) == null ? void 0 : j.value,
|
|
3769
|
+
contents: (R = Object.values(o)) == null ? void 0 : R[0]
|
|
3770
|
+
});
|
|
3771
|
+
} else if ((oe = (se = Object.keys(o)) == null ? void 0 : se[0]) != null && oe.includes("$")) {
|
|
3772
|
+
const F = (w = (h = Object.keys(u(o))) == null ? void 0 : h[0]) == null ? void 0 : w.split("$");
|
|
3773
|
+
d[(d == null ? void 0 : d.length) - 1].compData.push({
|
|
3774
|
+
key: (O = ce == null ? void 0 : ce.find((G) => {
|
|
3775
|
+
var X, D;
|
|
3776
|
+
return ((X = G == null ? void 0 : G.key) == null ? void 0 : X.toUpperCase()) === ((D = F == null ? void 0 : F[0]) == null ? void 0 : D.toUpperCase());
|
|
3777
|
+
})) == null ? void 0 : O.value,
|
|
3778
|
+
contents: (m = Object.values(o)) == null ? void 0 : m[0],
|
|
3779
|
+
selectLabel: F == null ? void 0 : F[1]
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3782
|
+
return o;
|
|
3783
|
+
}), f.contents = d, f;
|
|
3784
|
+
})), k;
|
|
3785
|
+
}), I;
|
|
3786
|
+
} catch {
|
|
3787
|
+
return !1;
|
|
3788
|
+
}
|
|
3789
|
+
}, Al = U(0), Gl = (a) => {
|
|
3790
|
+
const s = [];
|
|
3791
|
+
let l = null;
|
|
3792
|
+
for (let e = 0; e < a.length; e++) {
|
|
3793
|
+
const n = a[e];
|
|
3794
|
+
if (Array.isArray(n))
|
|
3795
|
+
l && (l.children = Gl(n));
|
|
3796
|
+
else {
|
|
3797
|
+
const r = { label: n };
|
|
3798
|
+
s.push(r), l = r;
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
return s;
|
|
3802
|
+
}, Ml = (a) => {
|
|
3803
|
+
let s = 0;
|
|
3804
|
+
for (const l of a)
|
|
3805
|
+
s++, l.children && (s += Ml(l.children));
|
|
3806
|
+
return s;
|
|
3807
|
+
}, Zl = (a, s, l = []) => {
|
|
3808
|
+
let e = 0;
|
|
3809
|
+
for (const n of s) {
|
|
3810
|
+
if (e >= a.length) break;
|
|
3811
|
+
const r = [...a[e]];
|
|
3812
|
+
if (l.push(r), e++, n.children && n.children.length > 0) {
|
|
3813
|
+
const p = [];
|
|
3814
|
+
Zl(
|
|
3815
|
+
a.slice(e),
|
|
3816
|
+
n.children,
|
|
3817
|
+
p
|
|
3818
|
+
), p.length > 0 && (r.push(p), e += Ml(n.children));
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3821
|
+
return l;
|
|
3822
|
+
}, bo = (a, s) => {
|
|
3823
|
+
let l = [];
|
|
3824
|
+
return a == null || a.forEach((n) => {
|
|
3825
|
+
n.some((r) => Array.isArray(r)) ? l.push(...n) : l.push(n);
|
|
3826
|
+
}), Zl(l, s);
|
|
3827
|
+
}, hl = (a) => {
|
|
3828
|
+
const s = { label: a[0].trim() };
|
|
3829
|
+
if (a.length > 1) {
|
|
3830
|
+
const l = a.slice(1);
|
|
3831
|
+
l.length === 1 && Array.isArray(l[0]) ? s.children = l[0].map(
|
|
3832
|
+
(e) => Array.isArray(e) ? hl(e) : { label: e.trim() }
|
|
3833
|
+
) : s.children = l.map(
|
|
3834
|
+
(e) => Array.isArray(e) ? hl(e) : { label: e.trim() }
|
|
3835
|
+
);
|
|
3836
|
+
}
|
|
3837
|
+
return s;
|
|
3838
|
+
}, Tl = (a) => {
|
|
3839
|
+
let s = a.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
|
|
3840
|
+
return s = s.replace(/:}(?=,|]|}|$)/g, ':""}'), s = s.replace(/:,(?=\s*")/g, ':"",'), s = s.replace(
|
|
3841
|
+
/(https?|HTTPS?):"\/\/([^"]+)"/gi,
|
|
3842
|
+
(l, e, n) => `"${e}://${n}"`
|
|
3843
|
+
), s = s.replace(
|
|
3844
|
+
/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
|
|
3845
|
+
'$1"$2"$3'
|
|
3846
|
+
), s;
|
|
3847
|
+
}, go = (a) => {
|
|
3848
|
+
var l;
|
|
3849
|
+
return a.some((e) => !Array.isArray(e)) ? a : (l = u(a)) == null ? void 0 : l.map((e) => {
|
|
3850
|
+
let n = [];
|
|
3851
|
+
return e.some((r) => Array.isArray(r)) ? e == null || e.forEach((r) => {
|
|
3852
|
+
Array.isArray(r) && n.push(hl(r));
|
|
3853
|
+
}) : e.some((r) => r.includes("[")) ? n.push(e) : n = e.map((r) => ({ label: r.trim() })), n;
|
|
3854
|
+
});
|
|
3855
|
+
}, Hl = (a, s, l) => {
|
|
3856
|
+
let e = a, n = l, r = s;
|
|
3857
|
+
return r.children && (Array.isArray(n[n.length - 1]) ? n[n.length - 1].push(e[0]) : n.push(e[0]), e.shift(), r = r.children), Array.isArray(r) && r.forEach((p) => {
|
|
3858
|
+
if (p.children) {
|
|
3859
|
+
const i = Hl(e, p, n);
|
|
3860
|
+
n = i[0], e = i[1];
|
|
3861
|
+
}
|
|
3862
|
+
}), [n, e];
|
|
3863
|
+
}, ko = (a, s) => {
|
|
3864
|
+
let l = a, e = [];
|
|
3865
|
+
return s.length > 0 ? s == null || s.forEach((n) => {
|
|
3866
|
+
let r = l == null ? void 0 : l[0];
|
|
3867
|
+
l.shift();
|
|
3868
|
+
const p = Hl(u(l), n, r);
|
|
3869
|
+
r = p[0], l = p[1], e.push(r);
|
|
3870
|
+
}) : e = l, e;
|
|
3871
|
+
}, yl = (a, s) => {
|
|
3872
|
+
const l = go(u(a));
|
|
3873
|
+
return ko(l, s);
|
|
3874
|
+
}, Co = (a) => {
|
|
3875
|
+
const s = [];
|
|
3876
|
+
let l = 0;
|
|
3877
|
+
const e = a.length;
|
|
3878
|
+
for (; l < e; ) {
|
|
3879
|
+
const n = a[l];
|
|
3880
|
+
n.key === "tableColumns" && l + 1 < e && a[l + 1].key === "tableContents" ? (s.push({
|
|
3881
|
+
comp: "Table",
|
|
3882
|
+
compData: [n, a[l + 1]],
|
|
3883
|
+
name: ""
|
|
3884
|
+
}), l += 2) : (s.push(n), l += 1);
|
|
3885
|
+
}
|
|
3886
|
+
return s;
|
|
3887
|
+
}, Kl = (a) => yl([a], []), rl = (a) => {
|
|
3888
|
+
const s = [];
|
|
3889
|
+
return a == null || a.forEach((l) => l == null ? void 0 : l.forEach((n) => {
|
|
3890
|
+
var r, p;
|
|
3891
|
+
Al.value++, s.push({
|
|
3892
|
+
id: Al.value,
|
|
3893
|
+
key: (r = Object.keys(n)) == null ? void 0 : r[0],
|
|
3894
|
+
value: (p = Object.values(n)) == null ? void 0 : p[0],
|
|
3895
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
3896
|
+
width: l.length
|
|
3897
|
+
});
|
|
3898
|
+
})), s;
|
|
3899
|
+
}, Il = (a) => {
|
|
3900
|
+
let s = Co(a);
|
|
3901
|
+
return s = s == null ? void 0 : s.map((l) => {
|
|
3902
|
+
var e, n, r, p;
|
|
3903
|
+
if (l.comp === "Table")
|
|
3904
|
+
(e = l.compData) != null && e.find((i) => (i == null ? void 0 : i.key) === "header") || (l.compData = (n = l.compData) == null ? void 0 : n.map((i) => (i.key === "tableColumns" ? i = {
|
|
3905
|
+
key: "header",
|
|
3906
|
+
contents: yl(i.value, [])
|
|
3907
|
+
} : i = {
|
|
3908
|
+
key: i.key,
|
|
3909
|
+
contents: i.value
|
|
3910
|
+
}, i)), l.compData.push({
|
|
3911
|
+
key: "extraButton",
|
|
3912
|
+
contents: [{ label: "新增" }]
|
|
3913
|
+
}), l.compData.push({
|
|
3914
|
+
key: "rowButton",
|
|
3915
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
3916
|
+
}));
|
|
3917
|
+
else if (l.key === "form") {
|
|
3918
|
+
const i = (r = l == null ? void 0 : l.value) == null ? void 0 : r.map((_) => (Array.isArray(_) || (_ = [_]), _));
|
|
3919
|
+
l = {
|
|
3920
|
+
comp: "Form",
|
|
3921
|
+
compData: [
|
|
3922
|
+
{
|
|
3923
|
+
key: "formFlex",
|
|
3924
|
+
contents: ""
|
|
3925
|
+
},
|
|
3926
|
+
{
|
|
3927
|
+
key: "formContent",
|
|
3928
|
+
contents: rl(i)
|
|
3929
|
+
}
|
|
3930
|
+
],
|
|
3931
|
+
name: ""
|
|
3932
|
+
};
|
|
3933
|
+
} else if (l.key === "formTop") {
|
|
3934
|
+
const i = (p = l == null ? void 0 : l.value) == null ? void 0 : p.map((_) => (Array.isArray(_) || (_ = [_]), _));
|
|
3935
|
+
l = {
|
|
3936
|
+
comp: "FormTop",
|
|
3937
|
+
compData: [
|
|
3938
|
+
{
|
|
3939
|
+
key: "formFlex",
|
|
3940
|
+
contents: ""
|
|
3941
|
+
},
|
|
3942
|
+
{
|
|
3943
|
+
key: "formContent",
|
|
3944
|
+
contents: rl(i)
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
key: "enableWrap",
|
|
3948
|
+
contents: !0
|
|
3949
|
+
},
|
|
3950
|
+
{
|
|
3951
|
+
key: "formButton",
|
|
3952
|
+
contents: [{
|
|
3953
|
+
label: "查询"
|
|
3954
|
+
}, {
|
|
3955
|
+
label: "重置"
|
|
3956
|
+
}]
|
|
3957
|
+
}
|
|
3958
|
+
],
|
|
3959
|
+
name: ""
|
|
3960
|
+
};
|
|
3961
|
+
}
|
|
3962
|
+
return l;
|
|
3963
|
+
}), s;
|
|
3964
|
+
}, _o = (a, s) => {
|
|
3965
|
+
var i, _, v, g, T, $;
|
|
3966
|
+
const l = [], e = Gl((_ = (i = a == null ? void 0 : a.find((I) => I.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : _[0]);
|
|
3967
|
+
l.push({
|
|
3968
|
+
key: "tableIndexColumn",
|
|
3969
|
+
contents: s
|
|
3970
|
+
}), l.push({
|
|
3971
|
+
key: "tableIndex",
|
|
3972
|
+
contents: e
|
|
3973
|
+
});
|
|
3974
|
+
let n = [];
|
|
3975
|
+
const r = (v = a == null ? void 0 : a.find((I) => I.key === "tableColumns")) == null ? void 0 : v.value;
|
|
3976
|
+
r.length === 1 && !(r != null && r[0].some((I) => Array.isArray(I))) ? n = (g = r == null ? void 0 : r[0]) == null ? void 0 : g.map((I) => ({ label: I })) : n = yl((T = a == null ? void 0 : a.find((I) => I.key === "tableColumns")) == null ? void 0 : T.value, e), l.push({
|
|
3977
|
+
key: "header",
|
|
3978
|
+
contents: n
|
|
3979
|
+
});
|
|
3980
|
+
const p = bo(($ = a == null ? void 0 : a.find((I) => I.key === "tableContents")) == null ? void 0 : $.value, e);
|
|
3981
|
+
return l.push({
|
|
3982
|
+
key: "tableContents",
|
|
3983
|
+
contents: p
|
|
3984
|
+
}), l.push({
|
|
3985
|
+
key: "extraButton",
|
|
3986
|
+
contents: [{ label: "新增" }]
|
|
3987
|
+
}), l.push({
|
|
3988
|
+
key: "rowButton",
|
|
3989
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
3990
|
+
}), l;
|
|
3991
|
+
}, ql = (a) => a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (s, l, e) => {
|
|
3992
|
+
const n = ql(e);
|
|
3993
|
+
return `"${l}",${n}`;
|
|
3994
|
+
}), el = (a) => {
|
|
3995
|
+
const s = a.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
|
|
3996
|
+
return ql(s).replace(/^"(.*)"$/, "$1");
|
|
3997
|
+
}, $o = (a) => {
|
|
3998
|
+
const s = /* @__PURE__ */ new Set();
|
|
3999
|
+
return a.filter((l) => {
|
|
4000
|
+
const e = JSON.stringify(l);
|
|
4001
|
+
return s.has(e) ? !1 : s.add(e);
|
|
4002
|
+
});
|
|
4003
|
+
}, Dl = (a) => {
|
|
4004
|
+
var l;
|
|
4005
|
+
let s = [];
|
|
4006
|
+
return (l = u(a)) == null || l.forEach((e) => {
|
|
4007
|
+
var n;
|
|
4008
|
+
(n = e.contents) == null || n.forEach((r) => {
|
|
4009
|
+
s.push(r);
|
|
4010
|
+
});
|
|
4011
|
+
}), s = $o(s), s.push({
|
|
4012
|
+
label: "操作"
|
|
4013
|
+
}), [s];
|
|
4014
|
+
}, xo = (a, s) => a.reduce((l, e, n) => {
|
|
4015
|
+
const r = Math.floor(n / s);
|
|
4016
|
+
return l[r] || (l[r] = []), l[r].push(e), l;
|
|
4017
|
+
}, []), Ql = (a) => a.reduce((s, l) => l.children && l.children.length > 0 ? s + Ql(l.children) : s + 1, 0), wo = (a, s) => {
|
|
4018
|
+
var e;
|
|
4019
|
+
let l = [];
|
|
4020
|
+
return (e = xo(a, Ql(s == null ? void 0 : s[0]) - 1)) == null || e.forEach((n) => {
|
|
4021
|
+
let r = [];
|
|
4022
|
+
n.forEach((p) => {
|
|
4023
|
+
var i;
|
|
4024
|
+
Array.isArray(p.contents) ? (i = p.contents) == null || i.forEach((_) => {
|
|
4025
|
+
r.push(_);
|
|
4026
|
+
}) : r.push(p.contents);
|
|
4027
|
+
}), l.push(r);
|
|
4028
|
+
}), [l];
|
|
4029
|
+
}, Ao = ["方法体", "输入", "输出"], El = U(1), bl = (a) => {
|
|
4030
|
+
let s;
|
|
4031
|
+
a.replaceAll(" ", `\r
|
|
4032
|
+
`).includes(`\r
|
|
4033
|
+
`) ? s = a.replaceAll(" ", `\r
|
|
4034
|
+
`).split(`\r
|
|
4035
|
+
`).filter((n) => n.trim() !== "") : s = a.replaceAll(" ", `\r
|
|
4036
|
+
`).split(`
|
|
4037
|
+
`).filter((n) => n.trim() !== "");
|
|
4038
|
+
const l = [];
|
|
4039
|
+
let e = "";
|
|
4040
|
+
for (const n of s)
|
|
4041
|
+
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, ""));
|
|
4042
|
+
return l;
|
|
4043
|
+
}, To = (a) => {
|
|
4044
|
+
const [s, l] = a.split(/=(.+)/), e = s.replace(/['"]/g, "").trim(), n = l.replace(/^['"]|['"]$/g, "");
|
|
4045
|
+
return { key: e, value: n };
|
|
4046
|
+
}, il = (a) => {
|
|
4047
|
+
let s;
|
|
4048
|
+
a != null && a.includes(":") ? s = a.split(":").filter((n) => n.trim() !== "") : s = a == null ? void 0 : a.split(":").filter((n) => n.trim() !== "");
|
|
4049
|
+
const l = [];
|
|
4050
|
+
let e = "";
|
|
4051
|
+
for (const n of s)
|
|
4052
|
+
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, ""));
|
|
4053
|
+
return l;
|
|
4054
|
+
}, Io = (a) => /^[\x00-\x7F]*$/.test(a), Do = (a) => {
|
|
4055
|
+
var n, r;
|
|
4056
|
+
const s = (n = a.map((p) => {
|
|
4057
|
+
var _, v;
|
|
4058
|
+
let i = (v = (_ = p.key.split("(")) == null ? void 0 : _[1]) == null ? void 0 : v.trim();
|
|
4059
|
+
return i == null ? void 0 : i.slice(0, i.length - 1);
|
|
4060
|
+
})) == null ? void 0 : n.filter((p) => p), l = s == null ? void 0 : s.map((p) => {
|
|
4061
|
+
var _;
|
|
4062
|
+
return (_ = il(p)) == null ? void 0 : _.map((v) => {
|
|
4063
|
+
var g;
|
|
4064
|
+
if (v.includes("{")) {
|
|
4065
|
+
let T = (g = v.split(":")) == null ? void 0 : g[0];
|
|
4066
|
+
v = T.slice(1, T.length);
|
|
4067
|
+
}
|
|
4068
|
+
return v;
|
|
4069
|
+
});
|
|
4070
|
+
}).filter((p) => p.length !== 0), e = (r = l == null ? void 0 : l.filter((p) => p.length !== 0)) == null ? void 0 : r.map((p) => {
|
|
4071
|
+
let i = "";
|
|
4072
|
+
return p.forEach((_) => {
|
|
4073
|
+
_.includes("{") || (i = i === "" ? i + u(_) : i + "/" + u(_));
|
|
4074
|
+
}), i;
|
|
4075
|
+
});
|
|
4076
|
+
return zl([...new Set(e)]);
|
|
4077
|
+
}, Xl = (a) => {
|
|
4078
|
+
var l, e, n, r, p, i, _, v;
|
|
4079
|
+
const s = (e = (l = a.split("(")) == null ? void 0 : l[1]) == null ? void 0 : e.trim();
|
|
4080
|
+
return ((n = il(s.slice(0, s.length - 1))) == null ? void 0 : n.length) > 0 ? s.slice(0, s.length - 1) : (v = (_ = (i = (p = (r = a.split("(")) == null ? void 0 : r[1]) == null ? void 0 : p.trim()) == null ? void 0 : i.split(")")) == null ? void 0 : _[0]) == null ? void 0 : v.trim();
|
|
4081
|
+
}, Eo = (a) => {
|
|
4082
|
+
var n;
|
|
4083
|
+
if (!a) return;
|
|
4084
|
+
const s = Xl(a), l = (n = il(s)) == null ? void 0 : n.map((r) => {
|
|
4085
|
+
var p;
|
|
4086
|
+
if (r.includes("{")) {
|
|
4087
|
+
let i = (p = r.split(":")) == null ? void 0 : p[0];
|
|
4088
|
+
r = i.slice(1, i.length);
|
|
4089
|
+
}
|
|
4090
|
+
return r;
|
|
4091
|
+
});
|
|
4092
|
+
let e = "";
|
|
4093
|
+
return l.forEach((r) => {
|
|
4094
|
+
r.includes("{") || (e = e === "" ? e + u(r) : e + "/" + u(r));
|
|
4095
|
+
}), e;
|
|
4096
|
+
}, Oo = (a) => {
|
|
4097
|
+
const s = a.match(/\[(.*)\]/s);
|
|
4098
|
+
if (s) {
|
|
4099
|
+
const l = `[${s[1]}]`;
|
|
4100
|
+
try {
|
|
4101
|
+
const e = l.replace(/([^\[\],\s]+)/g, '"$1"');
|
|
4102
|
+
return JSON.parse(e);
|
|
4103
|
+
} catch {
|
|
4104
|
+
return JSON.parse(l.replace(/\[(\s*)(,|])/g, '[""$2').replace(/([^\[\],\s]+)/g, '"$1"').replace(/""/g, '"'));
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
}, Bo = (a) => {
|
|
4108
|
+
var r;
|
|
4109
|
+
if (!a) return;
|
|
4110
|
+
const s = Xl(a);
|
|
4111
|
+
let l = [], e = [], n = [];
|
|
4112
|
+
return (r = il(s)) == null || r.forEach((p) => {
|
|
4113
|
+
var i;
|
|
4114
|
+
p.includes("[") ? l.push(Oo(p)) : p.includes("{") && (Io((i = p.slice(1, p.length - 1).split(":")) == null ? void 0 : i[0]) ? n.push(JSON.parse(p.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : Ue(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("$"));
|
|
4115
|
+
}), [l, e, n];
|
|
4116
|
+
}, Fo = (a) => {
|
|
4117
|
+
const s = [];
|
|
4118
|
+
let l = "";
|
|
4119
|
+
for (const e of a)
|
|
4120
|
+
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 && (s.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : s.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
4121
|
+
return s;
|
|
4122
|
+
}, Ol = (a) => {
|
|
4123
|
+
var p, i;
|
|
4124
|
+
const s = [], l = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, e = a.match(l);
|
|
4125
|
+
if (e) {
|
|
4126
|
+
const _ = e[1] || e[3], v = e[2] || e[4];
|
|
4127
|
+
if (_ && v) {
|
|
4128
|
+
const g = `${_}/${v}`;
|
|
4129
|
+
s.push(g);
|
|
4130
|
+
}
|
|
4131
|
+
}
|
|
4132
|
+
const n = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, r = a.match(n);
|
|
4133
|
+
return r ? s.push(r[0].replace(/\)+$/, "")) : (a == null ? void 0 : a.split(",").length) === 2 && s.push((i = (p = a == null ? void 0 : a.split(",")) == null ? void 0 : p[1]) == null ? void 0 : i.trim()), s;
|
|
4134
|
+
}, dl = (a) => {
|
|
4135
|
+
let s = a.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
|
|
4136
|
+
return s = s.replace(/\[\s*,/g, '[{"": ""},'), s = s.replace(/,\s*,/g, ', {"": ""},'), s = s.replace(/,\s*\]/g, ', {"": ""}]'), s = s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (l, e, n, r, p) => n.includes("'") ? `:${e}${n}${r}${p}` : `:${e}"${n}"${r}${p}`), s = s.replace(/:\s*([,\]}])/g, ': ""$1'), s;
|
|
4137
|
+
}, No = (a) => !/\[[^\]]*\{[^\]]*\]/.test(a), So = (a) => {
|
|
4138
|
+
const s = u(a).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), l = s ? `${s[2]}/${s[3]}` : null, e = a.match(/\[\{([^}]+)\}\]/), n = e == null ? void 0 : e[1].replaceAll(":", "").replaceAll("'", '"').trim();
|
|
4139
|
+
let r = null;
|
|
4140
|
+
if (n)
|
|
4141
|
+
try {
|
|
4142
|
+
r = JSON.parse(n);
|
|
4143
|
+
} catch (p) {
|
|
4144
|
+
console.error("解析数组失败:", p);
|
|
4145
|
+
}
|
|
4146
|
+
return [l, r];
|
|
4147
|
+
}, Lo = (a) => {
|
|
4148
|
+
var i, _, v, g, T, $, I, k, N, f, d;
|
|
4149
|
+
let s = [], l = [], e = {}, n = [], r = a.trim(), p = [];
|
|
4150
|
+
if (r.trim().includes("输入") && r.trim().includes("输出")) {
|
|
4151
|
+
let y = [], o = a.trim();
|
|
4152
|
+
o = u(o).slice(1, u(o).length - 1);
|
|
4153
|
+
const c = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
|
|
4154
|
+
(k = o.match(c)) == null || k.forEach((t, b) => {
|
|
4155
|
+
var R;
|
|
4156
|
+
const S = t;
|
|
4157
|
+
let j = [];
|
|
4158
|
+
(R = S.slice(1, S.length - 1).replace(":", "$:").split("$:")) == null || R.forEach((se) => {
|
|
4159
|
+
var oe, h, w;
|
|
4160
|
+
if (Ao.find((O) => se.includes(O)))
|
|
4161
|
+
if (!se.includes("=="))
|
|
4162
|
+
j.push({ key: "tableIndexColumn", contents: se.replaceAll("'", "") });
|
|
4163
|
+
else {
|
|
4164
|
+
let O = [];
|
|
4165
|
+
const m = se.replaceAll("'", "").split("==");
|
|
4166
|
+
O.push(m == null ? void 0 : m[0]), m != null && m[1].includes("[") ? O.push(m == null ? void 0 : m[1].trim().slice(1, (m == null ? void 0 : m[1].length) - 1).split(",")) : O.push([m == null ? void 0 : m[1]]), j.push({ key: "header", contents: [(h = (oe = Kl([O])) == null ? void 0 : oe[0]) == null ? void 0 : h[0]] });
|
|
4167
|
+
}
|
|
4168
|
+
else {
|
|
4169
|
+
let O = se.trim().replaceAll(",", ",").replaceAll("'", '"');
|
|
4170
|
+
if (b % 3 === 0)
|
|
4171
|
+
O.slice(1, O.length - 1).includes("[") ? y.push({
|
|
4172
|
+
key: "tableIndex",
|
|
4173
|
+
contents: [{ label: O }]
|
|
4174
|
+
}) : y.push({
|
|
4175
|
+
key: "tableIndex",
|
|
4176
|
+
contents: [{ label: O.slice(1, O.length - 1) }]
|
|
4177
|
+
});
|
|
4178
|
+
else if ((O == null ? void 0 : O[0]) === "{") {
|
|
4179
|
+
let m = [];
|
|
4180
|
+
const F = O.slice(1, O.length - 1).split(":");
|
|
4181
|
+
if (F.every((G) => Ue(G.trim()))) {
|
|
4182
|
+
m.push({ key: "tableContentName", contents: "详情" });
|
|
4183
|
+
let G = [];
|
|
4184
|
+
F.forEach((X, D) => {
|
|
4185
|
+
if (D === 0) {
|
|
4186
|
+
const Y = JSON.parse(X).map((M) => ({ label: M }));
|
|
4187
|
+
Y.push({
|
|
4188
|
+
label: "操作"
|
|
4189
|
+
}), G.push({
|
|
4190
|
+
key: "header",
|
|
4191
|
+
contents: Y
|
|
4192
|
+
});
|
|
4193
|
+
} else
|
|
4194
|
+
G.push({
|
|
4195
|
+
key: "tableContents",
|
|
4196
|
+
contents: JSON.parse(X)
|
|
4197
|
+
});
|
|
4198
|
+
}), G.push({
|
|
4199
|
+
key: "extraButton",
|
|
4200
|
+
contents: [{ label: "新增" }]
|
|
4201
|
+
}), G.push({
|
|
4202
|
+
key: "rowButton",
|
|
4203
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
4204
|
+
}), m.push({
|
|
4205
|
+
comp: "Table",
|
|
4206
|
+
compData: G,
|
|
4207
|
+
name: ""
|
|
4208
|
+
}), y.push({
|
|
4209
|
+
key: "tableContents",
|
|
4210
|
+
contents: [m]
|
|
4211
|
+
});
|
|
4212
|
+
}
|
|
4213
|
+
} else {
|
|
4214
|
+
let m = O;
|
|
4215
|
+
m.slice(1, m.length - 1).includes("[") || m.slice(1, m.length - 1).includes("{") ? Ue(Tl(m.replace(/\s+/g, ""))) && ((w = JSON.parse(Tl(m.replace(/\s+/g, "")))) == null || w.map((F) => {
|
|
4216
|
+
if (Array.isArray(F == null ? void 0 : F[0])) {
|
|
4217
|
+
const G = [];
|
|
4218
|
+
G.push({ key: "tableContentName", contents: "详情" });
|
|
4219
|
+
let X = [];
|
|
4220
|
+
F.forEach((D) => {
|
|
4221
|
+
D.forEach((Y) => {
|
|
4222
|
+
var M, te;
|
|
4223
|
+
El.value++, X.push({
|
|
4224
|
+
id: El.value,
|
|
4225
|
+
key: (M = Object.keys(Y)) == null ? void 0 : M[0],
|
|
4226
|
+
value: (te = Object.values(Y)) == null ? void 0 : te[0],
|
|
4227
|
+
width: D.length
|
|
4228
|
+
});
|
|
4229
|
+
});
|
|
4230
|
+
}), G.push({
|
|
4231
|
+
comp: "Form",
|
|
4232
|
+
compData: [{
|
|
4233
|
+
key: "formFlex",
|
|
4234
|
+
contents: ""
|
|
4235
|
+
}, {
|
|
4236
|
+
key: "formContent",
|
|
4237
|
+
contents: X
|
|
4238
|
+
}],
|
|
4239
|
+
name: ""
|
|
4240
|
+
}), y.push({
|
|
4241
|
+
key: "tableContents",
|
|
4242
|
+
contents: [G]
|
|
4243
|
+
});
|
|
4244
|
+
} else
|
|
4245
|
+
y.push({
|
|
4246
|
+
key: "tableContents",
|
|
4247
|
+
contents: F == null ? void 0 : F[0]
|
|
4248
|
+
});
|
|
4249
|
+
})) : y.push({
|
|
4250
|
+
key: "tableContents",
|
|
4251
|
+
contents: m.trim().slice(1, m.length - 1)
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
}
|
|
4255
|
+
}), y.push(j == null ? void 0 : j[0]);
|
|
4256
|
+
}), p.push({
|
|
4257
|
+
key: "tableIndex",
|
|
4258
|
+
contents: (N = y == null ? void 0 : y.filter((t) => (t == null ? void 0 : t.key) === "tableIndex")) == null ? void 0 : N.map((t) => {
|
|
4259
|
+
var b;
|
|
4260
|
+
return (b = t.contents) == null ? void 0 : b[0];
|
|
4261
|
+
})
|
|
4262
|
+
}), p.push({
|
|
4263
|
+
key: "extraButton",
|
|
4264
|
+
contents: [{ label: "新增" }]
|
|
4265
|
+
}), p.push({
|
|
4266
|
+
key: "rowButton",
|
|
4267
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
4268
|
+
}), p.push({
|
|
4269
|
+
key: "tableIndexColumn",
|
|
4270
|
+
contents: (d = (f = y == null ? void 0 : y.filter((t) => (t == null ? void 0 : t.key) === "tableIndexColumn")) == null ? void 0 : f[0]) == null ? void 0 : d.contents
|
|
4271
|
+
}), p.push({
|
|
4272
|
+
key: "header",
|
|
4273
|
+
contents: Dl(y == null ? void 0 : y.filter((t) => (t == null ? void 0 : t.key) === "header"))
|
|
4274
|
+
}), p.push({
|
|
4275
|
+
key: "tableContents",
|
|
4276
|
+
contents: wo(y == null ? void 0 : y.filter((t) => (t == null ? void 0 : t.key) === "tableContents"), Dl(y == null ? void 0 : y.filter((t) => (t == null ? void 0 : t.key) === "header")))
|
|
4277
|
+
});
|
|
4278
|
+
} else {
|
|
4279
|
+
const y = (i = r.trim().split(",$")) == null ? void 0 : i[0];
|
|
4280
|
+
y[0] === "[" ? r = y.slice(1, y.length - 1) : r.includes(",$") && (r = (_ = r.trim().split(",$")) == null ? void 0 : _[0]);
|
|
4281
|
+
let o;
|
|
4282
|
+
if (r.includes("$")) {
|
|
4283
|
+
r = u(r), e.method = (g = (v = u(r).trim()) == null ? void 0 : v.slice(1, r.length).split("(")) == null ? void 0 : g[0];
|
|
4284
|
+
let c;
|
|
4285
|
+
Ol(r.slice(1, r.length - 2)).length > 1 ? c = Ol(r.slice(1, r.length - 2)) : c = So(r), e.value = c;
|
|
4286
|
+
} else
|
|
4287
|
+
Ue("[" + dl(r).replaceAll("'", '"') + "]") && !No(dl(r).replaceAll("'", '"')) ? (r = JSON.parse("[" + dl(r).replaceAll("'", '"') + "]"), n = r) : o = ($ = (T = u(r).split("}")) == null ? void 0 : T.filter((c) => c !== "")) == null ? void 0 : $.map((c) => {
|
|
4288
|
+
let t = c;
|
|
4289
|
+
return t[0] === "," ? t = t.slice(2, t.length) : t = t.slice(1, t.length), t;
|
|
4290
|
+
});
|
|
4291
|
+
(I = u(o)) == null || I.forEach((c) => {
|
|
4292
|
+
var t, b, S, j, R, se, oe, h, w, O, m, F, G, X, D;
|
|
4293
|
+
if (c.includes("==")) {
|
|
4294
|
+
const Y = (F = c == null ? void 0 : c.split(":")) == null ? void 0 : F[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), M = (G = c == null ? void 0 : c.split(":")) == null ? void 0 : G[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
|
|
4295
|
+
if (Ue(M.trim()) ? l.push(JSON.parse(M.trim())) : l.push(JSON.parse(M.replaceAll("'", '"').trim())), Y[0] !== "[") {
|
|
4296
|
+
let te = [];
|
|
4297
|
+
Ue("[" + el(Y) + "]") ? te.push(JSON.parse("[" + el(Y) + "]")) : Ue("[" + el(Y).replaceAll("==", ",") + "]") && te.push(JSON.parse("[" + el(Y).replaceAll("==", ",") + "]"));
|
|
4298
|
+
const me = u(te);
|
|
4299
|
+
me.push(["操作"]), s.push(me);
|
|
4300
|
+
} else {
|
|
4301
|
+
const te = (X = Y.slice(1, Y.length - 1).replaceAll(",", ",|")) == null ? void 0 : X.split("|"), me = (D = Fo(te)) == null ? void 0 : D.map((ae) => ((ae == null ? void 0 : ae[ae.length - 1]) === "," && (ae = ae.slice(0, ae.length - 1)), ae));
|
|
4302
|
+
let _e = [];
|
|
4303
|
+
me == null || me.forEach((ae) => {
|
|
4304
|
+
var ue, $e, fe, ye;
|
|
4305
|
+
let H = [];
|
|
4306
|
+
H.push((ue = ae.split("==")) == null ? void 0 : ue[0].trim().replace(/^"|"$/g, "")), (($e = ae.split("==")) == null ? void 0 : $e[1].trim()[0]) === "[" ? H.push(JSON.parse((fe = ae.split("==")) == null ? void 0 : fe[1].trim())) : H.push([JSON.parse((ye = ae.split("==")) == null ? void 0 : ye[1].trim())]), _e.push(H);
|
|
4307
|
+
});
|
|
4308
|
+
const J = u(_e);
|
|
4309
|
+
J.push(["操作"]), s.push(J);
|
|
4310
|
+
}
|
|
4311
|
+
} else {
|
|
4312
|
+
if (Ue((t = c == null ? void 0 : c.split(":")) == null ? void 0 : t[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
|
|
4313
|
+
let Y = JSON.parse((b = c == null ? void 0 : c.split(":")) == null ? void 0 : b[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
|
|
4314
|
+
Array.isArray(Y) || (Y = [Y]), Y.push("操作"), s.push(Y);
|
|
4315
|
+
}
|
|
4316
|
+
Ue((R = (j = (S = c == null ? void 0 : c.split(":")) == null ? void 0 : S[1]) == null ? void 0 : j.replace(/^"|"$/g, "'")) == null ? void 0 : R.replace(/'([^']+)'/g, '"$1"')) ? l.push(JSON.parse((se = c == null ? void 0 : c.split(":")) == null ? void 0 : se[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : Ue((O = (w = (h = (oe = c == null ? void 0 : c.split(":")) == null ? void 0 : oe[1]) == null ? void 0 : h.replace(/^"|"$/g, "'")) == null ? void 0 : w.replaceAll("'", '"')) == null ? void 0 : O.replace(/'([^']+)'/g, '"$1"')) && l.push(JSON.parse((m = c == null ? void 0 : c.split(":")) == null ? void 0 : m[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
|
|
4317
|
+
}
|
|
4318
|
+
});
|
|
4319
|
+
}
|
|
4320
|
+
return [s, l, p, e, n];
|
|
4321
|
+
}, jo = (a) => {
|
|
4322
|
+
const s = [], l = Eo(a == null ? void 0 : a.key), e = Bo(a == null ? void 0 : a.key), n = Lo(a == null ? void 0 : a.value), r = e == null ? void 0 : e[0], p = n == null ? void 0 : n[4], i = e == null ? void 0 : e[1], _ = e == null ? void 0 : e[2], v = n == null ? void 0 : n[0], g = n == null ? void 0 : n[1], T = n == null ? void 0 : n[2], $ = n == null ? void 0 : n[3];
|
|
4323
|
+
return l && s.push({
|
|
4324
|
+
key: "contentPath",
|
|
4325
|
+
value: l
|
|
4326
|
+
}), (r == null ? void 0 : r.length) > 0 && s.push({
|
|
4327
|
+
key: "tableIndex",
|
|
4328
|
+
value: r
|
|
4329
|
+
}), $ && s.push({
|
|
4330
|
+
key: "extraButton",
|
|
4331
|
+
value: $
|
|
4332
|
+
}), (p == null ? void 0 : p.length) > 0 && s.push({
|
|
4333
|
+
key: "form",
|
|
4334
|
+
value: p
|
|
4335
|
+
}), (i == null ? void 0 : i.length) > 0 && s.push({
|
|
4336
|
+
key: "formTop",
|
|
4337
|
+
value: i
|
|
4338
|
+
}), (_ == null ? void 0 : _.length) > 0 && s.push({
|
|
4339
|
+
key: "extra",
|
|
4340
|
+
value: _
|
|
4341
|
+
}), (T == null ? void 0 : T.length) > 0 && s.push({
|
|
4342
|
+
comp: "Table",
|
|
4343
|
+
compData: T,
|
|
4344
|
+
name: ""
|
|
4345
|
+
}), (v == null ? void 0 : v.length) > 0 && s.push({
|
|
4346
|
+
key: "tableColumns",
|
|
4347
|
+
value: v
|
|
4348
|
+
}), (g == null ? void 0 : g.length) > 0 && s.push({
|
|
4349
|
+
key: "tableContents",
|
|
4350
|
+
value: g
|
|
4351
|
+
}), s;
|
|
4352
|
+
}, Uo = (a) => {
|
|
4353
|
+
let s = [], l = [];
|
|
4354
|
+
a == null || a.forEach((n) => {
|
|
4355
|
+
Array.isArray(n) && (n == null || n.forEach((r) => {
|
|
4356
|
+
var p;
|
|
4357
|
+
r.comp === "FormTop" && ((p = r.compData) == null || p.forEach((i) => {
|
|
4358
|
+
(i == null ? void 0 : i.key) === "formContent" && (l = [...l, ...i.contents]);
|
|
4359
|
+
}));
|
|
4360
|
+
}));
|
|
4361
|
+
});
|
|
4362
|
+
const e = l.reduce((n, r) => n.find((i) => (i == null ? void 0 : i.key) === (r == null ? void 0 : r.key)) ? n : n.concat([r]), []);
|
|
4363
|
+
return e.length !== 0 && s.push([{
|
|
4364
|
+
comp: "FormTop",
|
|
4365
|
+
compData: [{
|
|
4366
|
+
key: "formFlex",
|
|
4367
|
+
contents: ""
|
|
4368
|
+
}, {
|
|
4369
|
+
key: "formContent",
|
|
4370
|
+
contents: e
|
|
4371
|
+
}, {
|
|
4372
|
+
key: "enableWrap",
|
|
4373
|
+
contents: !0
|
|
4374
|
+
}, {
|
|
4375
|
+
key: "formButton",
|
|
4376
|
+
contents: [{
|
|
4377
|
+
label: "查询"
|
|
4378
|
+
}, {
|
|
4379
|
+
label: "重置"
|
|
4380
|
+
}]
|
|
4381
|
+
}]
|
|
4382
|
+
}]), a == null || a.forEach((n) => {
|
|
4383
|
+
if (Array.isArray(n)) {
|
|
4384
|
+
const r = n.filter((p) => p.comp !== "FormTop");
|
|
4385
|
+
s.push(r);
|
|
4386
|
+
} else
|
|
4387
|
+
n.comp !== "FormTop" && s.push(n);
|
|
4388
|
+
}), s;
|
|
4389
|
+
}, Po = (a, s) => {
|
|
4390
|
+
const l = s.split("/");
|
|
4391
|
+
let e = [];
|
|
4392
|
+
return a == null || a.forEach((n) => {
|
|
4393
|
+
var i, _, v, g, T, $, I, k, N, f, d;
|
|
4394
|
+
const r = [], p = (_ = (i = n.find((y) => y.key === "tableIndex")) == null ? void 0 : i.value) == null ? void 0 : _[0];
|
|
4395
|
+
if (p && !p.some((y) => Array.isArray(y))) {
|
|
4396
|
+
const y = (g = (v = n.find((o) => o.key === "tableColumns")) == null ? void 0 : v.value) == null ? void 0 : g[0];
|
|
4397
|
+
r.push({
|
|
4398
|
+
key: "tableIndexColumn",
|
|
4399
|
+
contents: l[l.length - 1]
|
|
4400
|
+
}), r.push({
|
|
4401
|
+
key: "tableIndex",
|
|
4402
|
+
contents: p == null ? void 0 : p.map((o) => ({ label: o }))
|
|
4403
|
+
}), r.push({
|
|
4404
|
+
key: "extraButton",
|
|
4405
|
+
contents: [{ label: "新增" }]
|
|
4406
|
+
}), r.push({
|
|
4407
|
+
key: "rowButton",
|
|
4408
|
+
contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
|
|
4409
|
+
}), Array.isArray(y) && y.some((o) => Array.isArray(o)) ? r.push({
|
|
4410
|
+
key: "header",
|
|
4411
|
+
contents: Kl(y)
|
|
4412
|
+
}) : r.push({
|
|
4413
|
+
key: "header",
|
|
4414
|
+
contents: Array.isArray(y) ? y == null ? void 0 : y.map((o) => ({ label: o })) : [y].map((o) => ({ label: o }))
|
|
4415
|
+
}), r.push({
|
|
4416
|
+
key: "tableContents",
|
|
4417
|
+
contents: Array.isArray(y) ? ($ = (T = n.find((o) => o.key === "tableContents")) == null ? void 0 : T.value) == null ? void 0 : $[0] : (N = (k = (I = n.find((o) => o.key === "tableContents")) == null ? void 0 : I.value) == null ? void 0 : k[0]) == null ? void 0 : N.map((o) => [o])
|
|
4418
|
+
}), e.push({
|
|
4419
|
+
comp: "Table",
|
|
4420
|
+
name: "",
|
|
4421
|
+
compData: r
|
|
4422
|
+
}), n != null && n.find((o) => (o == null ? void 0 : o.key) === "formTop") && e.push({
|
|
4423
|
+
comp: "FormTop",
|
|
4424
|
+
compData: [
|
|
4425
|
+
{
|
|
4426
|
+
key: "formFlex",
|
|
4427
|
+
contents: ""
|
|
4428
|
+
},
|
|
4429
|
+
{
|
|
4430
|
+
key: "formContent",
|
|
4431
|
+
contents: rl([(f = n == null ? void 0 : n.find((o) => (o == null ? void 0 : o.key) === "formTop")) == null ? void 0 : f.value])
|
|
4432
|
+
},
|
|
4433
|
+
{
|
|
4434
|
+
key: "enableWrap",
|
|
4435
|
+
contents: !0
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
key: "formButton",
|
|
4439
|
+
contents: [{
|
|
4440
|
+
label: "查询"
|
|
4441
|
+
}, {
|
|
4442
|
+
label: "重置"
|
|
4443
|
+
}]
|
|
4444
|
+
}
|
|
4445
|
+
],
|
|
4446
|
+
name: ""
|
|
4447
|
+
});
|
|
4448
|
+
} else p ? (e.push({
|
|
4449
|
+
comp: "Table",
|
|
4450
|
+
name: "",
|
|
4451
|
+
compData: _o(n, l[l.length - 1])
|
|
4452
|
+
}), n != null && n.find((y) => (y == null ? void 0 : y.key) === "formTop") && e.push({
|
|
4453
|
+
comp: "FormTop",
|
|
4454
|
+
compData: [
|
|
4455
|
+
{
|
|
4456
|
+
key: "formFlex",
|
|
4457
|
+
contents: ""
|
|
4458
|
+
},
|
|
4459
|
+
{
|
|
4460
|
+
key: "formContent",
|
|
4461
|
+
contents: rl([(d = n == null ? void 0 : n.find((y) => (y == null ? void 0 : y.key) === "formTop")) == null ? void 0 : d.value])
|
|
4462
|
+
},
|
|
4463
|
+
{
|
|
4464
|
+
key: "enableWrap",
|
|
4465
|
+
contents: !0
|
|
4466
|
+
},
|
|
4467
|
+
{
|
|
4468
|
+
key: "formButton",
|
|
4469
|
+
contents: [{
|
|
4470
|
+
label: "查询"
|
|
4471
|
+
}, {
|
|
4472
|
+
label: "重置"
|
|
4473
|
+
}]
|
|
4474
|
+
}
|
|
4475
|
+
],
|
|
4476
|
+
name: ""
|
|
4477
|
+
})) : n.some((y) => y.key === "extra") ? e.push({
|
|
4478
|
+
comp: "calculator",
|
|
4479
|
+
name: "",
|
|
4480
|
+
compData: Il(n)
|
|
4481
|
+
}) : e.push(Il(n));
|
|
4482
|
+
}), Uo(e);
|
|
4483
|
+
}, Ro = (a, s) => {
|
|
4484
|
+
var n, r;
|
|
4485
|
+
const l = a.map((p) => p.filter((i) => i.key !== "contentPath"));
|
|
4486
|
+
return {
|
|
4487
|
+
comp: "Group",
|
|
4488
|
+
compData: [{
|
|
4489
|
+
contents: Po(l, s),
|
|
4490
|
+
key: "groupContents"
|
|
4491
|
+
}],
|
|
4492
|
+
name: (r = (n = a[0]) == null ? void 0 : n.find((p) => p.key === "contentPath")) == null ? void 0 : r.value
|
|
4493
|
+
};
|
|
4494
|
+
}, Jo = (a) => {
|
|
4495
|
+
var n;
|
|
4496
|
+
const s = [], l = u(a).map((r) => {
|
|
4497
|
+
var p;
|
|
4498
|
+
if (r != null && r.find((i) => (i == null ? void 0 : i.key) === "contentPath"))
|
|
4499
|
+
return (p = r == null ? void 0 : r.find((i) => (i == null ? void 0 : i.key) === "contentPath")) == null ? void 0 : p.value;
|
|
4500
|
+
}).filter((r) => r !== ""), e = [...new Set(l)];
|
|
4501
|
+
return (n = e == null ? void 0 : e.filter((r) => r)) == null || n.forEach((r) => {
|
|
4502
|
+
var p;
|
|
4503
|
+
s.push(Ro((p = u(a)) == null ? void 0 : p.filter((i) => i.find((_) => _.key === "contentPath" && _.value === r)), r));
|
|
4504
|
+
}), s;
|
|
4505
|
+
}, Vo = (a) => {
|
|
4506
|
+
let s = [];
|
|
4507
|
+
s.push({
|
|
4508
|
+
comp: "Menu",
|
|
4509
|
+
compData: [{
|
|
4510
|
+
contents: Do(u(a)),
|
|
4511
|
+
key: "menuContents"
|
|
4512
|
+
}],
|
|
4513
|
+
name: ""
|
|
4514
|
+
});
|
|
4515
|
+
const l = a.map((e) => jo(e)).filter((e) => e.length !== 0);
|
|
4516
|
+
return s = [...s, ...Jo(l)], s;
|
|
4517
|
+
}, rr = (a) => {
|
|
4518
|
+
var s, l, e, n, r;
|
|
4519
|
+
try {
|
|
4520
|
+
const p = (e = bl((l = (s = u(a)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : l.replace(")", ")"))) == null ? void 0 : e.filter((v) => v !== ""), i = (r = (n = u(p)) == null ? void 0 : n.filter((v) => !v.includes("/*"))) == null ? void 0 : r.map((v) => To(v));
|
|
4521
|
+
return Vo(i);
|
|
4522
|
+
} catch {
|
|
4523
|
+
return !1;
|
|
4524
|
+
}
|
|
4525
|
+
}, ll = U(0), fl = U(0), Wo = (a) => {
|
|
4526
|
+
const s = a.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 = {};
|
|
4527
|
+
let n;
|
|
4528
|
+
for (; (n = l.exec(s)) !== null; ) {
|
|
4529
|
+
const r = n[1];
|
|
4530
|
+
let p = n[2].trim();
|
|
4531
|
+
(p.match(/\[/g) || []).length !== (p.match(/\]/g) || []).length && (p = p == null ? void 0 : p.replace(/]$/, "")), e[r] ? (e[r + fl.value] && fl.value++, e[r + fl.value] = r + "=" + p) : e[r] = r + "=" + p;
|
|
4532
|
+
}
|
|
4533
|
+
return e;
|
|
4534
|
+
}, Yl = (a) => {
|
|
4535
|
+
const [s, l] = a.split("=").map((r) => r.trim()), e = s.replace(/['"]/g, ""), n = l.replace(/^['"]|['"]$/g, "");
|
|
4536
|
+
return { key: e, value: n };
|
|
4537
|
+
}, zo = (a) => {
|
|
4538
|
+
var p;
|
|
4539
|
+
let s = [];
|
|
4540
|
+
const [l, e] = a.split(/=(.+)/), n = l.replace(/['"]/g, "").trim(), r = e.replace(/^['"]|['"]$/g, "");
|
|
4541
|
+
return (p = Object.values(Wo(r))) == null || p.forEach((i) => {
|
|
4542
|
+
s.push(Yl(i));
|
|
4543
|
+
}), { key: n, value: s };
|
|
4544
|
+
}, sl = (a) => {
|
|
4545
|
+
try {
|
|
4546
|
+
return JSON.parse(a), !0;
|
|
4547
|
+
} catch {
|
|
4548
|
+
return !1;
|
|
4549
|
+
}
|
|
4550
|
+
}, ea = (a) => {
|
|
4551
|
+
try {
|
|
4552
|
+
const s = a.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
4553
|
+
if (u(s).split("{").length - 1 > 1) {
|
|
4554
|
+
let l = u(s).replace(/^\{(.*)\}$/, "[$1]");
|
|
4555
|
+
if (sl(l) && !l.includes("$") || (l = l.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), sl(l)) {
|
|
4556
|
+
const e = JSON.parse(l);
|
|
4557
|
+
let n = [];
|
|
4558
|
+
return e == null || e.forEach((r) => {
|
|
4559
|
+
var p;
|
|
4560
|
+
(p = Object.entries(u(r))) == null || p.forEach((i) => {
|
|
4561
|
+
ll.value++, n.push({
|
|
4562
|
+
id: ll.value,
|
|
4563
|
+
key: (i == null ? void 0 : i[0]) ?? "",
|
|
4564
|
+
value: (i == null ? void 0 : i[1]) === "" ? "" : i == null ? void 0 : i[1],
|
|
4565
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
4566
|
+
width: Object.keys(u(r)).length
|
|
4567
|
+
});
|
|
4568
|
+
});
|
|
4569
|
+
}), n;
|
|
4570
|
+
} else
|
|
4571
|
+
return console.error("转换类型不正确:"), [];
|
|
4572
|
+
} else if (sl(s)) {
|
|
4573
|
+
const l = JSON.parse(s);
|
|
4574
|
+
return Object.entries(l).map(([e, n]) => (ll.value++, {
|
|
4575
|
+
id: ll.value,
|
|
4576
|
+
key: e,
|
|
4577
|
+
value: n === "" ? "" : n,
|
|
4578
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
4579
|
+
width: 1
|
|
4580
|
+
}));
|
|
4581
|
+
} else
|
|
4582
|
+
return s;
|
|
4583
|
+
} catch (s) {
|
|
4584
|
+
return console.error("转换失败:", s), [];
|
|
4585
|
+
}
|
|
4586
|
+
}, Go = (a, s) => {
|
|
4587
|
+
try {
|
|
4588
|
+
if (pe != null && pe.find((l) => (l == null ? void 0 : l.key) === s))
|
|
4589
|
+
return JSON.parse(a.replace(/[’]|[‘]|[']/g, '"'));
|
|
4590
|
+
if (u(a).split("[").length - 1 > 1) {
|
|
4591
|
+
const l = u(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
4592
|
+
return JSON.parse(l);
|
|
4593
|
+
} else {
|
|
4594
|
+
const l = u(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
4595
|
+
if (sl(l)) {
|
|
4596
|
+
const e = JSON.parse(l);
|
|
4597
|
+
return Array.isArray(e) ? e.map((n) => ({ label: n })) : e;
|
|
4598
|
+
} else
|
|
4599
|
+
return ea(u(a));
|
|
4600
|
+
}
|
|
4601
|
+
} catch (l) {
|
|
4602
|
+
return console.error("解析失败:", l), a;
|
|
4603
|
+
}
|
|
4604
|
+
}, Mo = (a) => ({ [a == null ? void 0 : a.key]: Go(a == null ? void 0 : a.value, a == null ? void 0 : a.key) }), Zo = (a) => {
|
|
4605
|
+
try {
|
|
4606
|
+
if (u(a).split("[").length - 1 > 1) {
|
|
4607
|
+
const s = u(a).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
4608
|
+
return JSON.parse(s);
|
|
4609
|
+
} else
|
|
4610
|
+
return JSON.parse(u(a).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
|
|
4611
|
+
} catch (s) {
|
|
4612
|
+
return console.error("解析失败:", s), a;
|
|
4613
|
+
}
|
|
4614
|
+
}, la = (a) => {
|
|
4615
|
+
var s, l, e, n, r, p;
|
|
4616
|
+
try {
|
|
4617
|
+
const i = bl((l = (s = u(a)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), _ = (e = u(i)) == null ? void 0 : e.map((T) => {
|
|
4618
|
+
var I, k;
|
|
4619
|
+
let $ = (k = (I = u(T)) == null ? void 0 : I.split("=")) == null ? void 0 : k[0];
|
|
4620
|
+
return $ != null && $.includes("GroupContents") ? zo(T) : Yl(T);
|
|
4621
|
+
}), v = [];
|
|
4622
|
+
(n = u(_)) == null || n.forEach((T) => {
|
|
4623
|
+
var $, I, k, N, f;
|
|
4624
|
+
pe != null && pe.find((d) => {
|
|
4625
|
+
var y, o;
|
|
4626
|
+
return ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase()) === ((o = T == null ? void 0 : T.key) == null ? void 0 : o.toUpperCase());
|
|
4627
|
+
}) ? v.push({
|
|
4628
|
+
comp: (($ = pe == null ? void 0 : pe.find((d) => {
|
|
4629
|
+
var y, o;
|
|
4630
|
+
return ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase()) === ((o = T == null ? void 0 : T.key) == null ? void 0 : o.toUpperCase());
|
|
4631
|
+
})) == null ? void 0 : $.value) ?? "",
|
|
4632
|
+
name: (I = T == null ? void 0 : T.value) == null ? void 0 : I.replace(/[’]|[‘]|[']/g, ""),
|
|
4633
|
+
compData: []
|
|
4634
|
+
}) : ce != null && ce.find((d) => {
|
|
4635
|
+
var y, o;
|
|
4636
|
+
return ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase()) === ((o = T == null ? void 0 : T.key) == null ? void 0 : o.toUpperCase());
|
|
4637
|
+
}) && ((v == null ? void 0 : v.length) === 0 && (k = T.key) != null && k.includes("Menus") && v.push({
|
|
4638
|
+
comp: "Menu",
|
|
4639
|
+
name: "",
|
|
4640
|
+
compData: []
|
|
4641
|
+
}), (N = v == null ? void 0 : v[(v == null ? void 0 : v.length) - 1]) != null && N.compData && v[(v == null ? void 0 : v.length) - 1].compData.push({
|
|
4642
|
+
key: (f = ce == null ? void 0 : ce.find((d) => {
|
|
4643
|
+
var y, o;
|
|
4644
|
+
return ((y = d == null ? void 0 : d.key) == null ? void 0 : y.toUpperCase()) === ((o = T == null ? void 0 : T.key) == null ? void 0 : o.toUpperCase());
|
|
4645
|
+
})) == null ? void 0 : f.value,
|
|
4646
|
+
contents: T == null ? void 0 : T.value
|
|
4647
|
+
}));
|
|
4648
|
+
}), console.log("newContents", v);
|
|
4649
|
+
let g = (r = u(v)) == null ? void 0 : r.map((T) => {
|
|
4650
|
+
var $;
|
|
4651
|
+
return T != null && T.compData && (T.compData = ($ = T == null ? void 0 : T.compData) == null ? void 0 : $.map((I) => {
|
|
4652
|
+
var k, N, f, d, y, o, c, t, b, S, j;
|
|
4653
|
+
if ((I == null ? void 0 : I.key) === "formFlex")
|
|
4654
|
+
I.contents = ((N = (k = I.contents) == null ? void 0 : k.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : N.toUpperCase()) !== "Vertical".toUpperCase();
|
|
4655
|
+
else if ((I == null ? void 0 : I.key) === "groupContents")
|
|
4656
|
+
I.contents = (f = u(I.contents)) == null ? void 0 : f.map((R) => Mo(u(R)));
|
|
4657
|
+
else if (((y = (d = I.contents) == null ? void 0 : d.trim()) != null && y.startsWith("[") || (c = (o = I.contents) == null ? void 0 : o.trim()) != null && c.startsWith("【")) && ((b = (t = I.contents) == null ? void 0 : t.trim()) != null && b.endsWith("]") || (j = (S = I.contents) == null ? void 0 : S.trim()) != null && j.endsWith("】")))
|
|
4658
|
+
I.contents = Zo(u(I.contents));
|
|
4659
|
+
else {
|
|
4660
|
+
if (!I.contents) return;
|
|
4661
|
+
I.contents = ea(u(I.contents));
|
|
4662
|
+
}
|
|
4663
|
+
return I;
|
|
4664
|
+
})), T;
|
|
4665
|
+
});
|
|
4666
|
+
return g = (p = u(g)) == null ? void 0 : p.map((T) => {
|
|
4667
|
+
var $;
|
|
4668
|
+
return (T == null ? void 0 : T.comp) === "Group" && (T.compData = ($ = T.compData) == null ? void 0 : $.map((I) => {
|
|
4669
|
+
var N;
|
|
4670
|
+
let k = [];
|
|
4671
|
+
return (N = I.contents) == null || N.forEach((f) => {
|
|
4672
|
+
var d, y, o, c, t, b, S, j, R, se, oe, h;
|
|
4673
|
+
if (pe != null && pe.find((w) => {
|
|
4674
|
+
var O, m, F;
|
|
4675
|
+
return ((O = w == null ? void 0 : w.key) == null ? void 0 : O.toUpperCase()) === ((F = (m = Object.keys(f)) == null ? void 0 : m[0]) == null ? void 0 : F.toUpperCase());
|
|
4676
|
+
}))
|
|
4677
|
+
k.push({
|
|
4678
|
+
comp: (d = pe == null ? void 0 : pe.find((w) => {
|
|
4679
|
+
var O, m, F;
|
|
4680
|
+
return ((O = w == null ? void 0 : w.key) == null ? void 0 : O.toUpperCase()) === ((F = (m = Object.keys(f)) == null ? void 0 : m[0]) == null ? void 0 : F.toUpperCase());
|
|
4681
|
+
})) == null ? void 0 : d.value,
|
|
4682
|
+
name: (o = (y = Object.values(f)) == null ? void 0 : y[0]) == null ? void 0 : o.replace(/[’]|[‘]|[']/g, ""),
|
|
4683
|
+
compData: []
|
|
4684
|
+
});
|
|
4685
|
+
else if (ce != null && ce.find((w) => {
|
|
4686
|
+
var O, m, F;
|
|
4687
|
+
return ((O = w == null ? void 0 : w.key) == null ? void 0 : O.toUpperCase()) === ((F = (m = Object.keys(f)) == null ? void 0 : m[0]) == null ? void 0 : F.toUpperCase());
|
|
4688
|
+
})) {
|
|
4689
|
+
if ((k == null ? void 0 : k.length) === 0) return;
|
|
4690
|
+
(c = k == null ? void 0 : k[(k == null ? void 0 : k.length) - 1]) != null && c.compData && k[(k == null ? void 0 : k.length) - 1].compData.push({
|
|
4691
|
+
key: (t = ce == null ? void 0 : ce.find((w) => {
|
|
4692
|
+
var O, m, F;
|
|
4693
|
+
return ((O = w == null ? void 0 : w.key) == null ? void 0 : O.toUpperCase()) === ((F = (m = Object.keys(f)) == null ? void 0 : m[0]) == null ? void 0 : F.toUpperCase());
|
|
4694
|
+
})) == null ? void 0 : t.value,
|
|
4695
|
+
contents: (b = Object.values(f)) == null ? void 0 : b[0]
|
|
4696
|
+
});
|
|
4697
|
+
} else if ((j = (S = Object.keys(f)) == null ? void 0 : S[0]) != null && j.includes("$")) {
|
|
4698
|
+
const w = (se = (R = Object.keys(u(f))) == null ? void 0 : R[0]) == null ? void 0 : se.split("$");
|
|
4699
|
+
k[(k == null ? void 0 : k.length) - 1].compData.push({
|
|
4700
|
+
key: (oe = ce == null ? void 0 : ce.find((O) => {
|
|
4701
|
+
var m, F;
|
|
4702
|
+
return ((m = O == null ? void 0 : O.key) == null ? void 0 : m.toUpperCase()) === ((F = w == null ? void 0 : w[0]) == null ? void 0 : F.toUpperCase());
|
|
4703
|
+
})) == null ? void 0 : oe.value,
|
|
4704
|
+
contents: (h = Object.values(f)) == null ? void 0 : h[0],
|
|
4705
|
+
selectLabel: w == null ? void 0 : w[1]
|
|
4706
|
+
});
|
|
4707
|
+
}
|
|
4708
|
+
return f;
|
|
4709
|
+
}), I.contents = k, I;
|
|
4710
|
+
})), T;
|
|
4711
|
+
}), g;
|
|
4712
|
+
} catch {
|
|
4713
|
+
return !1;
|
|
4714
|
+
}
|
|
4715
|
+
}, tr = (a) => la(a), ir = (a) => !!la(a), Qe = U(0), ur = (a) => a.reduce((l, e) => {
|
|
4716
|
+
var r, p;
|
|
4717
|
+
const n = Object.values(l);
|
|
4718
|
+
return (((r = Object.keys(l)) == null ? void 0 : r.length) === 0 || n[n.length - 1].length >= (e == null ? void 0 : e.width)) && (l[Qe.value] = [], Qe.value++), l[Qe.value - 1].push(e), ((p = Object.keys(l)) == null ? void 0 : p.length) === (e == null ? void 0 : e.width) && (l[Qe.value] = [], Qe.value++), l;
|
|
4719
|
+
}, {});
|
|
4720
|
+
export {
|
|
4721
|
+
ur as a,
|
|
4722
|
+
or as b,
|
|
4723
|
+
rr as c,
|
|
4724
|
+
bl as d,
|
|
4725
|
+
tr as e,
|
|
4726
|
+
Xl as f,
|
|
4727
|
+
vl as g,
|
|
4728
|
+
ir as i,
|
|
4729
|
+
zl as m,
|
|
4730
|
+
To as p,
|
|
4731
|
+
no as s
|
|
4732
|
+
};
|