ss-component-new 1.1.270 → 1.1.271
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-DmpPM-Xx.js → array-BfnpXiM-.js} +2 -2
- package/dist/{array-Db10KHto.cjs → array-CAAZj70g.cjs} +1 -1
- package/dist/{cloneDeep-DkeOgjCh.cjs → cloneDeep-CHtsEohg.cjs} +1 -1
- package/dist/{cloneDeep-B4MHj5FZ.js → cloneDeep-SOoqD36w.js} +1 -1
- package/dist/{index-BZJLq_fH.cjs → index--1AcPtxr.cjs} +1 -1
- package/dist/{index-CDIPdZ_Y.js → index--Lkq8v3T.js} +8 -8
- package/dist/{index-zj0Hrw7t.js → index-2QYqjej5.js} +4 -4
- package/dist/{index-CMq96f-O.js → index-5LDLWHIy.js} +6 -6
- package/dist/{index-DIuZqFBZ.cjs → index-B1Chq5ou.cjs} +1 -1
- package/dist/{index-lp_G1uue.js → index-B6JYEmYH.js} +1 -1
- package/dist/{index-BkMiLEFK.cjs → index-B6UxWPf2.cjs} +1 -1
- package/dist/{index-Bb5x8AbH.cjs → index-B9MjTDBR.cjs} +3 -3
- package/dist/{index-BaElqGTx.js → index-BLUdgcs7.js} +4 -4
- package/dist/{index-55xYKcwl.js → index-BU_jy_oC.js} +4 -4
- package/dist/{index-CL1YKeuq.js → index-BZL2gPxk.js} +4 -4
- package/dist/{index-Cy8RHv5K.cjs → index-B_IOZlFF.cjs} +1 -1
- package/dist/{index-znOvK_AO.js → index-BiSiEi_V.js} +3 -3
- package/dist/{index-B6nT5wYe.js → index-BlraVBSm.js} +23 -17
- package/dist/{index-DaQZy16M.js → index-BrpCYKbJ.js} +3 -3
- package/dist/{index-PoQf0dIg.js → index-Bs_7jqc_.js} +4 -4
- package/dist/{index-C_iJIvVg.cjs → index-BtJs7zPy.cjs} +1 -1
- package/dist/{index-BvDfxOOy.js → index-Bv6C9j_1.js} +521 -519
- package/dist/{index-BYYo3eOD.js → index-CCG2WirR.js} +1 -1
- package/dist/{index-D79v5m65.js → index-CKr4swuH.js} +9 -9
- package/dist/{index-Bx1fzqvj.js → index-CMWo86wg.js} +6 -6
- package/dist/index-CT3w9uTX.cjs +1 -0
- package/dist/{index-BuichhBb.js → index-CTszrMtm.js} +1 -1
- package/dist/{index-PTS5PKTF.js → index-CV7IzaaJ.js} +1 -1
- package/dist/{index-PArL7spP.cjs → index-CWaLFgqI.cjs} +1 -1
- package/dist/{index-CXKFe21P.js → index-CY2ru0Sv.js} +6 -6
- package/dist/index-Ce42bIEI.cjs +1 -0
- package/dist/index-Cfo509W-.js +3699 -0
- package/dist/{index-DfL2avGj.js → index-Cfpx04I5.js} +5 -5
- package/dist/{index-YtcerPFO.js → index-Cn49cw0q.js} +3 -3
- package/dist/{index-DpS537wP.js → index-Ctv9BG9O.js} +5 -5
- package/dist/{index-Bd7gfI2v.js → index-D1gy0J05.js} +3 -3
- package/dist/index-D4VrAzy3.cjs +1 -0
- package/dist/{index-CBX-QmpE.cjs → index-D5DKfZge.cjs} +1 -1
- package/dist/{index-D_A6Fc0g.js → index-D8QUeWKa.js} +1 -1
- package/dist/{index-CFq1umIl.js → index-DD_rYKjc.js} +8 -8
- package/dist/{index-D66XoONa.cjs → index-DEBg_dvX.cjs} +1 -1
- package/dist/{index-BijggyAn.cjs → index-DGr6my-U.cjs} +1 -1
- package/dist/{index-D9PYtasT.cjs → index-DK3M5DNe.cjs} +1 -1
- package/dist/{index-Bw7gQ5uU.cjs → index-DPLoeqeZ.cjs} +1 -1
- package/dist/{index-e8O5n_hi.cjs → index-DRb5FND5.cjs} +1 -1
- package/dist/index-DVFD8nf7.js +720 -0
- package/dist/{index-BRrSmgDK.cjs → index-DVW3KqV7.cjs} +1 -1
- package/dist/{index-D-o0jcw9.cjs → index-DZiAN8C7.cjs} +1 -1
- package/dist/{index-PyfD9lQ8.cjs → index-DfsnGXGA.cjs} +1 -1
- package/dist/{index-lebc06DS.cjs → index-DpP0IpCV.cjs} +1 -1
- package/dist/{index-D4DsMBX6.cjs → index-Dp_b_DSL.cjs} +1 -1
- package/dist/{index-Cd702xPf.cjs → index-Dwsro7ML.cjs} +1 -1
- package/dist/{index-DnUm8SW3.js → index-H5uD67Jw.js} +8 -8
- package/dist/{index-CA-UQstP.cjs → index-KLWVgTQ4.cjs} +1 -1
- package/dist/{index-hTI4i8Pv.cjs → index-LVzE8vfl.cjs} +1 -1
- package/dist/{index-ClKqfaLg.js → index-UhoWjM51.js} +5 -5
- package/dist/{index-P_CmFusE.cjs → index-Uhv08fCW.cjs} +1 -1
- package/dist/{index-Bo8ScQ4u.cjs → index-cDR84dKn.cjs} +1 -1
- package/dist/{index-BRK6jNLF.cjs → index-uETWWPW0.cjs} +1 -1
- package/dist/{index-ChRZzUOg.cjs → index-y8UDVF_A.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-XBnvjf7F.js → index.vue_vue_type_script_setup_true_lang-5qTUg_kH.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-enez9t9L.cjs → index.vue_vue_type_script_setup_true_lang-rzTbe237.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b9c1c43_lang-CRIFPWMG.js → index.vue_vue_type_style_index_0_scoped_0b9c1c43_lang-CJo8jVD1.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b9c1c43_lang-BCmVnMkH.cjs → index.vue_vue_type_style_index_0_scoped_0b9c1c43_lang-CQLr1-WM.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_486b9e58_lang-D6l2J4zq.js → index.vue_vue_type_style_index_0_scoped_486b9e58_lang-DXhNv58U.js} +11 -11
- package/dist/{index.vue_vue_type_style_index_0_scoped_486b9e58_lang-I5TP4GD0.cjs → index.vue_vue_type_style_index_0_scoped_486b9e58_lang-fRjw_tf5.cjs} +1 -1
- package/dist/{login-BNsCdkNe.js → login-DHpGcqep.js} +2 -2
- package/dist/{login-Icl_CIYY.cjs → login-l_owbUQv.cjs} +1 -1
- package/dist/{main-BnGJ5061.js → main-B9XdzVwC.js} +7 -7
- package/dist/{main-CYWteBtf.cjs → main-D7g6IJOQ.cjs} +1 -1
- package/dist/{menu-BSnQCYha.js → menu-Ba_aVwCo.js} +1 -1
- package/dist/{menu-GGU1ld5H.cjs → menu-DHduXY8b.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/dist/index-4hO2HiRD.js +0 -3661
- package/dist/index-CMAqeGeT.cjs +0 -1
- package/dist/index-D4gX4eTX.js +0 -709
- package/dist/index-QSeosYrd.cjs +0 -1
- package/dist/index-sPXZdMVR.cjs +0 -1
|
@@ -0,0 +1,3699 @@
|
|
|
1
|
+
import { a as Cl, u as cl, g as gl, m as kl, s as _l } from "./index-CMWo86wg.js";
|
|
2
|
+
import { ref as B, watch as ke, createElementBlock as J, openBlock as A, createVNode as z, resolveComponent as me, Fragment as fe, renderList as he, createElementVNode as u, createCommentVNode as Ae, toDisplayString as Y, withCtx as ne, createBlock as ye, defineComponent as je, reactive as el, createTextVNode as Pe, resolveDynamicComponent as Ge, computed as ll, renderSlot as He, createSlots as wl, mergeProps as xl, unref as Dl, normalizeStyle as Il, withModifiers as Ke } from "vue";
|
|
3
|
+
import { p as Se } from "./index-D8QUeWKa.js";
|
|
4
|
+
import { F as il, a as xe, s as De, g as $l, b as dl, c as ge, f as qe, m as Ye, d as Je, e as Ze, h as Tl, i as El, _ as Bl } from "./index-Bv6C9j_1.js";
|
|
5
|
+
import { f as al, s as Ue, E as Re, g as ul, h as Fl } from "./menu-Ba_aVwCo.js";
|
|
6
|
+
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import { c as h } from "./cloneDeep-SOoqD36w.js";
|
|
8
|
+
import { E as Ne } from "./index-BiSiEi_V.js";
|
|
9
|
+
import { s as Al, a as Ll } from "./index-BZL2gPxk.js";
|
|
10
|
+
import Sl from "./index-CZtXRS3l.js";
|
|
11
|
+
const Vl = (C) => C.match(/\((.*)\)/)[1], Ol = al("formComp", {
|
|
12
|
+
state: () => ({
|
|
13
|
+
objUrl: []
|
|
14
|
+
}),
|
|
15
|
+
actions: {
|
|
16
|
+
setObjUrl(C) {
|
|
17
|
+
this.objUrl = C;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}), Rl = { class: "form-content" }, Nl = {
|
|
21
|
+
__name: "index",
|
|
22
|
+
props: {
|
|
23
|
+
formRules: Object,
|
|
24
|
+
itemData: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
childItemData: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
},
|
|
32
|
+
index: Number
|
|
33
|
+
},
|
|
34
|
+
emits: ["change", "contentChange"],
|
|
35
|
+
setup(C, { emit: L }) {
|
|
36
|
+
const v = C, l = L, y = B([]), D = B(!1), N = B([]), m = Cl(Se), E = Ol(Se), I = B(!1), x = B(), G = (R) => {
|
|
37
|
+
var P, n, i, e;
|
|
38
|
+
const T = (n = (P = h(v.itemData)) == null ? void 0 : P.find((s) => (s == null ? void 0 : s.key) === "formContent")) == null ? void 0 : n.contents, S = h(R.content);
|
|
39
|
+
let d = {};
|
|
40
|
+
S && ((i = Object.values(S)) == null ? void 0 : i.length) > 0 && ((e = Object.values(S)) == null || e.forEach((s, w) => {
|
|
41
|
+
d[T[w].key] = s;
|
|
42
|
+
}));
|
|
43
|
+
const t = {
|
|
44
|
+
content: d,
|
|
45
|
+
index: v == null ? void 0 : v.index,
|
|
46
|
+
buttonName: R == null ? void 0 : R.buttonName
|
|
47
|
+
};
|
|
48
|
+
l("change", t);
|
|
49
|
+
}, O = (R) => {
|
|
50
|
+
var P, n, i;
|
|
51
|
+
if (!R) return;
|
|
52
|
+
const T = h(v.itemData), S = T == null ? void 0 : T.map((e) => {
|
|
53
|
+
var s;
|
|
54
|
+
return (e == null ? void 0 : e.key) === "formContent" && ((s = e.contents) == null || s.map((w, W) => {
|
|
55
|
+
var Q, de, re, a, k, U, _, j, se, te, b, r, p, M, ae, ue, V;
|
|
56
|
+
return w.type = w != null && w.type ? w.type : (a = (re = (de = (Q = w == null ? void 0 : w.key) == null ? void 0 : Q.split("$")) == null ? void 0 : de[1]) == null ? void 0 : re.split("(")) != null && a[0] ? (U = (k = il) == null ? void 0 : k.find((q) => {
|
|
57
|
+
var F, oe, _e, pe;
|
|
58
|
+
return (q == null ? void 0 : q.key) === ((pe = (_e = (oe = (F = w == null ? void 0 : w.key) == null ? void 0 : F.split("$")) == null ? void 0 : oe[1]) == null ? void 0 : _e.split("(")) == null ? void 0 : pe[0]);
|
|
59
|
+
})) == null ? void 0 : U.value : "Input", w.options = w != null && w.options ? w.options : ((se = (j = (_ = w == null ? void 0 : w.key) == null ? void 0 : _.split("$")) == null ? void 0 : j[1]) == null ? void 0 : se.length) > 0 ? (p = (r = Vl((b = (te = w == null ? void 0 : w.key) == null ? void 0 : te.split("$")) == null ? void 0 : b[1])) == null ? void 0 : r.split(",")) == null ? void 0 : p.map((q) => ({
|
|
60
|
+
label: q,
|
|
61
|
+
value: q
|
|
62
|
+
})) : [], (M = w == null ? void 0 : w.key) != null && M.includes("$") && (w.key = (ue = (ae = w == null ? void 0 : w.key) == null ? void 0 : ae.split("$")) == null ? void 0 : ue[0]), w.value = (V = Object.values(R)) == null ? void 0 : V[W], w;
|
|
63
|
+
})), e;
|
|
64
|
+
});
|
|
65
|
+
let d = [], t = [];
|
|
66
|
+
if ((n = h((P = S == null ? void 0 : S.find((e) => (e == null ? void 0 : e.key) === "formContent")) == null ? void 0 : P.contents)) == null || n.forEach((e) => {
|
|
67
|
+
var s;
|
|
68
|
+
Array.isArray(e == null ? void 0 : e.value) && ((s = e == null ? void 0 : e.value) != null && s.find((w) => {
|
|
69
|
+
var W;
|
|
70
|
+
return (W = w == null ? void 0 : w.url) == null ? void 0 : W.includes(".obj");
|
|
71
|
+
})) && (t = e == null ? void 0 : e.value);
|
|
72
|
+
}), (t == null ? void 0 : t.length) > 0) {
|
|
73
|
+
const e = (i = h(t)) == null ? void 0 : i.filter((s) => {
|
|
74
|
+
var w;
|
|
75
|
+
return (w = s == null ? void 0 : s.url) == null ? void 0 : w.includes(".obj");
|
|
76
|
+
});
|
|
77
|
+
e == null || e.forEach((s) => {
|
|
78
|
+
var W, Q, de, re;
|
|
79
|
+
const w = (W = t == null ? void 0 : t.filter((a) => {
|
|
80
|
+
var k;
|
|
81
|
+
return (a == null ? void 0 : a.name) === (s == null ? void 0 : s.name) && ((k = a == null ? void 0 : a.url) == null ? void 0 : k.includes(".mtl"));
|
|
82
|
+
})) == null ? void 0 : W.map((a) => a == null ? void 0 : a.url);
|
|
83
|
+
d.push({
|
|
84
|
+
objUrl: s == null ? void 0 : s.url,
|
|
85
|
+
mtlUrls: ((Q = t == null ? void 0 : t.filter((a) => {
|
|
86
|
+
var k;
|
|
87
|
+
return (a == null ? void 0 : a.name) === (s == null ? void 0 : s.name) && ((k = a == null ? void 0 : a.url) == null ? void 0 : k.includes(".mtl"));
|
|
88
|
+
})) == null ? void 0 : Q.length) === 1 ? (re = (de = t == null ? void 0 : t.filter((a) => {
|
|
89
|
+
var k;
|
|
90
|
+
return (a == null ? void 0 : a.name) === (s == null ? void 0 : s.name) && ((k = a == null ? void 0 : a.url) == null ? void 0 : k.includes(".mtl"));
|
|
91
|
+
})) == null ? void 0 : de[0]) == null ? void 0 : re.url : w
|
|
92
|
+
});
|
|
93
|
+
}), E.setObjUrl(d);
|
|
94
|
+
}
|
|
95
|
+
l("contentChange", {
|
|
96
|
+
contents: S,
|
|
97
|
+
index: v.index
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
return ke(
|
|
101
|
+
() => v.itemData,
|
|
102
|
+
async () => {
|
|
103
|
+
var P, n, i, e, s, w, W, Q, de, re, a, k, U;
|
|
104
|
+
const R = (P = h(v.itemData)) == null ? void 0 : P.find((_) => (_ == null ? void 0 : _.key) === "formContent"), T = (n = h(v.itemData)) == null ? void 0 : n.find((_) => (_ == null ? void 0 : _.key) === "formButton"), S = (i = h(v.itemData)) == null ? void 0 : i.find((_) => (_ == null ? void 0 : _.key) === "formFlex"), d = (e = h(v.itemData)) == null ? void 0 : e.find((_) => (_ == null ? void 0 : _.key) === "formWrap"), t = (s = h(v.itemData)) == null ? void 0 : s.find((_) => (_ == null ? void 0 : _.key) === "enableWrap");
|
|
105
|
+
if ((d == null ? void 0 : d.contents) === "纵向" ? D.value = !1 : D.value = !0, I.value = (t == null ? void 0 : t.contents) === void 0 ? !1 : t == null ? void 0 : t.contents, x.value = typeof (S == null ? void 0 : S.contents) != "boolean" ? !(!(S != null && S.contents) === "" || ((w = S == null ? void 0 : S.contents) == null ? void 0 : w.toUpperCase()) === "VERTICAL") : S == null ? void 0 : S.contents, ((W = R == null ? void 0 : R.contents) == null ? void 0 : W.length) > 0 && Array.isArray(R == null ? void 0 : R.contents)) {
|
|
106
|
+
const _ = [];
|
|
107
|
+
await ((Q = R == null ? void 0 : R.contents) == null ? void 0 : Q.forEach(async (r, p) => {
|
|
108
|
+
var M, ae, ue, V, q, F, oe, _e, pe, Ee, ce, ze;
|
|
109
|
+
if ((r == null ? void 0 : r.label) !== "") {
|
|
110
|
+
let Me = (r == null ? void 0 : r.label) ?? (r == null ? void 0 : r.key) ?? "", We = (r == null ? void 0 : r.type) ?? "", o = (r == null ? void 0 : r.options) ?? [];
|
|
111
|
+
if ((M = r == null ? void 0 : r.key) != null && M.includes("$") && (Me = (ae = h(r == null ? void 0 : r.key).split("$")) == null ? void 0 : ae[0], ((V = (ue = h(r == null ? void 0 : r.key).split("$")) == null ? void 0 : ue[1]) == null ? void 0 : V.length) > 0)) {
|
|
112
|
+
const [g, f] = (F = (q = h(r == null ? void 0 : r.key).split("$")) == null ? void 0 : q[1]) == null ? void 0 : F.split(/[()]/);
|
|
113
|
+
We = ((oe = il.find((H) => (H == null ? void 0 : H.key) === g)) == null ? void 0 : oe.value) ?? "", ((_e = f == null ? void 0 : f.split(",")) == null ? void 0 : _e.length) > 0 && (o = (pe = f == null ? void 0 : f.split(",")) == null ? void 0 : pe.map((H) => ({
|
|
114
|
+
label: H,
|
|
115
|
+
value: H
|
|
116
|
+
})));
|
|
117
|
+
}
|
|
118
|
+
let c = [];
|
|
119
|
+
r != null && r.contents && !Array.isArray(r == null ? void 0 : r.contents) && (c = (ce = (Ee = r == null ? void 0 : r.contents) == null ? void 0 : Ee.split(",")) == null ? void 0 : ce.map((g) => ({
|
|
120
|
+
label: g,
|
|
121
|
+
value: g
|
|
122
|
+
}))), _.push({
|
|
123
|
+
label: Me ?? "",
|
|
124
|
+
name: "t" + p,
|
|
125
|
+
type: We === "" ? "Input" : We,
|
|
126
|
+
value: r != null && r.originalContent && (r == null ? void 0 : r.originalContent) !== "" ? r.originalContent : r != null && r.value ? r.value : (o == null ? void 0 : o.length) > 0 ? (ze = o == null ? void 0 : o[0]) == null ? void 0 : ze.value : (r == null ? void 0 : r.value) ?? "",
|
|
127
|
+
id: (r == null ? void 0 : r.id) ?? p,
|
|
128
|
+
contents: (c == null ? void 0 : c.length) > 0 ? c : o ?? [],
|
|
129
|
+
width: (r == null ? void 0 : r.width) ?? 1,
|
|
130
|
+
config: r == null ? void 0 : r.config,
|
|
131
|
+
optionUrl: r
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
const j = (de = h(_)) == null ? void 0 : de.map((r) => r.value);
|
|
136
|
+
let se = "";
|
|
137
|
+
j == null || j.forEach((r) => {
|
|
138
|
+
r !== "" && r !== void 0 && (se = se === "" ? r : se + "/" + r);
|
|
139
|
+
}), m.setSelectArray(j), m.setSelectString(se), y.value = _;
|
|
140
|
+
let te = [], b = [];
|
|
141
|
+
if ((re = h(y.value)) == null || re.forEach((r) => {
|
|
142
|
+
var p;
|
|
143
|
+
Array.isArray(r == null ? void 0 : r.value) && ((p = r == null ? void 0 : r.value) != null && p.find((M) => {
|
|
144
|
+
var ae;
|
|
145
|
+
return (ae = M == null ? void 0 : M.url) == null ? void 0 : ae.includes(".obj");
|
|
146
|
+
})) && (b = r == null ? void 0 : r.value);
|
|
147
|
+
}), (b == null ? void 0 : b.length) > 0) {
|
|
148
|
+
const r = (a = h(b)) == null ? void 0 : a.filter((p) => {
|
|
149
|
+
var M;
|
|
150
|
+
return (M = p == null ? void 0 : p.url) == null ? void 0 : M.includes(".obj");
|
|
151
|
+
});
|
|
152
|
+
r == null || r.forEach((p) => {
|
|
153
|
+
var ae, ue, V, q;
|
|
154
|
+
const M = (ae = b == null ? void 0 : b.filter((F) => {
|
|
155
|
+
var oe;
|
|
156
|
+
return (F == null ? void 0 : F.name) === (p == null ? void 0 : p.name) && ((oe = F == null ? void 0 : F.url) == null ? void 0 : oe.includes(".mtl"));
|
|
157
|
+
})) == null ? void 0 : ae.map((F) => F == null ? void 0 : F.url);
|
|
158
|
+
te.push({
|
|
159
|
+
objUrl: p == null ? void 0 : p.url,
|
|
160
|
+
mtlUrls: ((ue = b == null ? void 0 : b.filter((F) => {
|
|
161
|
+
var oe;
|
|
162
|
+
return (F == null ? void 0 : F.name) === (p == null ? void 0 : p.name) && ((oe = F == null ? void 0 : F.url) == null ? void 0 : oe.includes(".mtl"));
|
|
163
|
+
})) == null ? void 0 : ue.length) === 1 ? (q = (V = b == null ? void 0 : b.filter((F) => {
|
|
164
|
+
var oe;
|
|
165
|
+
return (F == null ? void 0 : F.name) === (p == null ? void 0 : p.name) && ((oe = F == null ? void 0 : F.url) == null ? void 0 : oe.includes(".mtl"));
|
|
166
|
+
})) == null ? void 0 : V[0]) == null ? void 0 : q.url : M
|
|
167
|
+
});
|
|
168
|
+
}), E.setObjUrl(te);
|
|
169
|
+
}
|
|
170
|
+
} else
|
|
171
|
+
y.value = [];
|
|
172
|
+
if (((k = T == null ? void 0 : T.contents) == null ? void 0 : k.length) > 0) {
|
|
173
|
+
const _ = [];
|
|
174
|
+
(U = T == null ? void 0 : T.contents) == null || U.forEach((j, se) => {
|
|
175
|
+
(j == null ? void 0 : j.label) !== "" && _.push({
|
|
176
|
+
label: (j == null ? void 0 : j.label) ?? "",
|
|
177
|
+
id: (j == null ? void 0 : j.id) ?? se,
|
|
178
|
+
type: (j == null ? void 0 : j.type) ?? "",
|
|
179
|
+
background: j == null ? void 0 : j.background
|
|
180
|
+
});
|
|
181
|
+
}), N.value = _;
|
|
182
|
+
} else
|
|
183
|
+
N.value = [];
|
|
184
|
+
},
|
|
185
|
+
{ deep: !0, immediate: !0 }
|
|
186
|
+
), (R, T) => (A(), J("div", Rl, [
|
|
187
|
+
z(xe, {
|
|
188
|
+
rowContents: y.value,
|
|
189
|
+
formRules: C.formRules,
|
|
190
|
+
buttonValue: N.value,
|
|
191
|
+
isRowFlex: x.value,
|
|
192
|
+
isEnableWrap: I.value,
|
|
193
|
+
onOnButtonClick: G,
|
|
194
|
+
onChange: O,
|
|
195
|
+
isButtonRow: D.value
|
|
196
|
+
}, null, 8, ["rowContents", "formRules", "buttonValue", "isRowFlex", "isEnableWrap", "isButtonRow"])
|
|
197
|
+
]));
|
|
198
|
+
}
|
|
199
|
+
}, rl = /* @__PURE__ */ Ce(Nl, [["__scopeId", "data-v-65451d9d"]]), Qe = B(0), vl = (C) => {
|
|
200
|
+
var L;
|
|
201
|
+
return !C || (C == null ? void 0 : C.length) === 0 ? [] : (L = h(C)) == null ? void 0 : L.map((l) => (Qe.value++, l = {
|
|
202
|
+
label: (l == null ? void 0 : l.label) ?? "",
|
|
203
|
+
prop: (l == null ? void 0 : l.label) === "操作" ? "operate" : l == null ? void 0 : l.prop,
|
|
204
|
+
width: l != null && l.width ? parseInt(l.width) : "",
|
|
205
|
+
fixed: (l == null ? void 0 : l.fixed) ?? void 0,
|
|
206
|
+
sortable: (l == null ? void 0 : l.sortable) ?? !1,
|
|
207
|
+
align: (l == null ? void 0 : l.align) ?? "center",
|
|
208
|
+
showOverflowTooltip: (l == null ? void 0 : l.showOverflowTooltip) ?? !0,
|
|
209
|
+
isNotDrag: (l == null ? void 0 : l.isNotDrag) ?? !1,
|
|
210
|
+
isEditCol: (l == null ? void 0 : l.isEditCol) ?? !1,
|
|
211
|
+
isOperate: (l == null ? void 0 : l.isOperate) ?? !1,
|
|
212
|
+
id: (l == null ? void 0 : l.id) ?? Qe.value,
|
|
213
|
+
children: vl(l == null ? void 0 : l.children)
|
|
214
|
+
}, l));
|
|
215
|
+
}, Pl = (C) => {
|
|
216
|
+
var v;
|
|
217
|
+
return (v = h(C)) == null ? void 0 : v.map((l) => (Qe.value++, l = {
|
|
218
|
+
label: (l == null ? void 0 : l.label) ?? "",
|
|
219
|
+
prop: (l == null ? void 0 : l.label) === "操作" ? "operate" : l == null ? void 0 : l.prop,
|
|
220
|
+
width: l != null && l.width ? parseInt(l.width) : "",
|
|
221
|
+
fixed: (l == null ? void 0 : l.fixed) ?? void 0,
|
|
222
|
+
sortable: (l == null ? void 0 : l.sortable) ?? !1,
|
|
223
|
+
align: (l == null ? void 0 : l.align) ?? "center",
|
|
224
|
+
showOverflowTooltip: (l == null ? void 0 : l.showOverflowTooltip) ?? !0,
|
|
225
|
+
isNotDrag: (l == null ? void 0 : l.isNotDrag) ?? !1,
|
|
226
|
+
isEditCol: (l == null ? void 0 : l.isEditCol) ?? !1,
|
|
227
|
+
isOperate: (l == null ? void 0 : l.isOperate) ?? !1,
|
|
228
|
+
id: (l == null ? void 0 : l.id) ?? Qe.value,
|
|
229
|
+
children: vl(l == null ? void 0 : l.children)
|
|
230
|
+
}, l));
|
|
231
|
+
}, pl = (C, L) => {
|
|
232
|
+
var v;
|
|
233
|
+
return C != null && C.find((l) => (l == null ? void 0 : l.id) === L) ? (v = h(C)) == null ? void 0 : v.filter((y) => (y == null ? void 0 : y.id) !== L) : (C = C == null ? void 0 : C.map((l) => (l.children = pl(l == null ? void 0 : l.children, L), l)), C);
|
|
234
|
+
}, fl = (C, L) => {
|
|
235
|
+
var v;
|
|
236
|
+
return C != null && C.find((l) => (l == null ? void 0 : l.id) === (L == null ? void 0 : L.id)) ? (v = h(C)) == null ? void 0 : v.map((y) => ((y == null ? void 0 : y.id) === (L == null ? void 0 : L.id) && (y = L), y)) : (C = C == null ? void 0 : C.map((l) => (l.children = fl(l == null ? void 0 : l.children, L), l)), C);
|
|
237
|
+
}, hl = (C, L) => {
|
|
238
|
+
var v;
|
|
239
|
+
return C != null && C.find((l) => {
|
|
240
|
+
var y;
|
|
241
|
+
return (l == null ? void 0 : l.id) === ((y = L == null ? void 0 : L.contents) == null ? void 0 : y.id);
|
|
242
|
+
}) ? (v = h(C)) == null ? void 0 : v.map((y) => {
|
|
243
|
+
var D;
|
|
244
|
+
return (y == null ? void 0 : y.id) === ((D = L == null ? void 0 : L.contents) == null ? void 0 : D.id) && (y = L == null ? void 0 : L.contents), y;
|
|
245
|
+
}) : (C = C == null ? void 0 : C.map((l) => (l.children = hl(l == null ? void 0 : l.children, L), l)), C);
|
|
246
|
+
}, ml = (C, L) => {
|
|
247
|
+
var v;
|
|
248
|
+
return C != null && C.find((l) => (l == null ? void 0 : l.id) === (L == null ? void 0 : L.id)) ? (v = h(C)) == null ? void 0 : v.map((y) => ((y == null ? void 0 : y.id) === (L == null ? void 0 : L.id) && (y != null && y.children || (y.children = []), y.children.push(L.contents)), y)) : (C = C == null ? void 0 : C.map((l) => (l.children = ml(l == null ? void 0 : l.children, L), l)), C);
|
|
249
|
+
}, ie = [
|
|
250
|
+
{
|
|
251
|
+
key: "label",
|
|
252
|
+
label: "标签名",
|
|
253
|
+
type: "Input"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
key: "prop",
|
|
257
|
+
label: "属性名",
|
|
258
|
+
type: "Input"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
key: "width",
|
|
262
|
+
label: "宽度",
|
|
263
|
+
type: "Input"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
key: "sortable",
|
|
267
|
+
label: "是否支持排序",
|
|
268
|
+
type: "Switch"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: "align",
|
|
272
|
+
label: "文本所在位置",
|
|
273
|
+
type: "Radio",
|
|
274
|
+
options: [
|
|
275
|
+
{
|
|
276
|
+
label: "left",
|
|
277
|
+
value: "左"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
label: "center",
|
|
281
|
+
value: "中"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
label: "right",
|
|
285
|
+
value: "右"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
key: "fixed",
|
|
291
|
+
label: "是否固定列",
|
|
292
|
+
type: "Switch"
|
|
293
|
+
}
|
|
294
|
+
], Wl = [
|
|
295
|
+
{
|
|
296
|
+
label: "查看",
|
|
297
|
+
value: "view"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
label: "修改",
|
|
301
|
+
value: "fix"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
label: "删除",
|
|
305
|
+
value: "delete"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
label: "三维算例",
|
|
309
|
+
value: "modelExample"
|
|
310
|
+
}
|
|
311
|
+
], Ul = [
|
|
312
|
+
{
|
|
313
|
+
label: "新增",
|
|
314
|
+
value: "add"
|
|
315
|
+
}
|
|
316
|
+
], Ve = [
|
|
317
|
+
{
|
|
318
|
+
key: "label",
|
|
319
|
+
label: "按钮名",
|
|
320
|
+
type: "Input"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
key: "type",
|
|
324
|
+
label: "类型",
|
|
325
|
+
type: "Select",
|
|
326
|
+
options: Ul
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
key: "background",
|
|
330
|
+
label: "按钮背景色",
|
|
331
|
+
type: "Color"
|
|
332
|
+
}
|
|
333
|
+
], Oe = [
|
|
334
|
+
{
|
|
335
|
+
key: "label",
|
|
336
|
+
label: "按钮名",
|
|
337
|
+
type: "Input"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
key: "type",
|
|
341
|
+
label: "类型",
|
|
342
|
+
type: "Select",
|
|
343
|
+
options: Wl
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
key: "textColor",
|
|
347
|
+
label: "按钮颜色",
|
|
348
|
+
type: "Color"
|
|
349
|
+
}
|
|
350
|
+
], yl = al("modelTableComp", {
|
|
351
|
+
state: () => ({
|
|
352
|
+
tableIndex: 0
|
|
353
|
+
}),
|
|
354
|
+
actions: {
|
|
355
|
+
setTableIndex(C) {
|
|
356
|
+
this.tableIndex = C;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}), zl = { class: "table-header-child" }, jl = { class: "table-header-child-main" }, Ml = { class: "table-header-child-content" }, Kl = { class: "table-header-child-content-item" }, Jl = { class: "fix-button" }, Gl = { key: 0 }, ql = { class: "form-content" }, Hl = {
|
|
360
|
+
__name: "tableNewChild",
|
|
361
|
+
props: {
|
|
362
|
+
tableChildContents: Array
|
|
363
|
+
},
|
|
364
|
+
emits: ["fixChange", "deleteChange"],
|
|
365
|
+
setup(C, { emit: L }) {
|
|
366
|
+
const v = C, l = L, y = B(!1), D = B(""), N = yl(Se), { tableIndex: m } = Ue(N);
|
|
367
|
+
B(0);
|
|
368
|
+
const E = B(""), I = B([]), x = B([]), G = (n) => {
|
|
369
|
+
var e;
|
|
370
|
+
y.value = !0;
|
|
371
|
+
let i = [];
|
|
372
|
+
ie == null || ie.forEach((s) => {
|
|
373
|
+
let w = h(m.value) + 1;
|
|
374
|
+
N.setTableIndex(w), i.push({
|
|
375
|
+
label: s == null ? void 0 : s.label,
|
|
376
|
+
name: s == null ? void 0 : s.label,
|
|
377
|
+
type: s.type,
|
|
378
|
+
value: n[s.key],
|
|
379
|
+
id: m.value,
|
|
380
|
+
contents: s == null ? void 0 : s.options
|
|
381
|
+
});
|
|
382
|
+
}), n != null && n.children && ((e = n == null ? void 0 : n.children) == null ? void 0 : e.length) > 0 && i.push({
|
|
383
|
+
children: n == null ? void 0 : n.children,
|
|
384
|
+
isFormColHidden: !0
|
|
385
|
+
}), E.value = n == null ? void 0 : n.id, I.value = i, x.value = i;
|
|
386
|
+
}, O = (n) => {
|
|
387
|
+
l("fixChange", h(n));
|
|
388
|
+
}, R = (n) => {
|
|
389
|
+
l("deleteChange", h(n));
|
|
390
|
+
}, T = (n) => {
|
|
391
|
+
y.value = !0;
|
|
392
|
+
let i = [];
|
|
393
|
+
ie == null || ie.forEach((e) => {
|
|
394
|
+
let s = h(m.value) + 1;
|
|
395
|
+
N.setTableIndex(s), i.push({
|
|
396
|
+
label: e == null ? void 0 : e.label,
|
|
397
|
+
name: e == null ? void 0 : e.label,
|
|
398
|
+
type: e.type,
|
|
399
|
+
value: "",
|
|
400
|
+
id: m.value,
|
|
401
|
+
contents: e == null ? void 0 : e.options
|
|
402
|
+
});
|
|
403
|
+
}), D.value = n == null ? void 0 : n.id, I.value = i, x.value = i;
|
|
404
|
+
}, S = (n) => {
|
|
405
|
+
let i = h(x.value);
|
|
406
|
+
i = i == null ? void 0 : i.map((e) => (e.children || (e.value = n == null ? void 0 : n[e.name]), e)), x.value = i;
|
|
407
|
+
}, d = () => {
|
|
408
|
+
var i, e;
|
|
409
|
+
I.value = x.value;
|
|
410
|
+
let n = {};
|
|
411
|
+
if (E.value !== "")
|
|
412
|
+
n.id = E.value, (i = I.value) == null || i.forEach((s) => {
|
|
413
|
+
const w = ie == null ? void 0 : ie.find((W) => (W == null ? void 0 : W.label) === (s == null ? void 0 : s.label));
|
|
414
|
+
w ? n[w.key] = s.value : s != null && s.children && s.children.length > 0 && (n.children = s.children);
|
|
415
|
+
}), y.value = !1, l("fixChange", {
|
|
416
|
+
contents: h(n),
|
|
417
|
+
id: D.value,
|
|
418
|
+
type: "fix"
|
|
419
|
+
});
|
|
420
|
+
else {
|
|
421
|
+
let s = h(m.value) + 1;
|
|
422
|
+
N.setTableIndex(s), n.id = "id" + m.value, (e = I.value) == null || e.forEach((w) => {
|
|
423
|
+
const W = ie == null ? void 0 : ie.find((Q) => (Q == null ? void 0 : Q.label) === (w == null ? void 0 : w.label));
|
|
424
|
+
W ? n[W.key] = w.value : w != null && w.children && w.children.length > 0 && (n.children = w.children);
|
|
425
|
+
}), y.value = !1, l("fixChange", {
|
|
426
|
+
contents: h(n),
|
|
427
|
+
id: D.value,
|
|
428
|
+
type: "add"
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
E.value = "", I.value = [], x.value = [];
|
|
432
|
+
}, t = () => {
|
|
433
|
+
y.value = !1, E.value = "", D.value = "", I.value = [], x.value = [];
|
|
434
|
+
}, P = (n) => {
|
|
435
|
+
Ne.confirm("是否确认要删除", "", {
|
|
436
|
+
confirmButtonText: "确认",
|
|
437
|
+
cancelButtonText: "取消",
|
|
438
|
+
type: "warning"
|
|
439
|
+
}).then(
|
|
440
|
+
() => {
|
|
441
|
+
l("deleteChange", n), Re({
|
|
442
|
+
type: "success",
|
|
443
|
+
message: "删除成功"
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
).catch(() => {
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
return (n, i) => {
|
|
450
|
+
const e = me("svg-icon");
|
|
451
|
+
return A(), J("div", zl, [
|
|
452
|
+
(A(!0), J(fe, null, he(v == null ? void 0 : v.tableChildContents, (s, w) => (A(), J("div", jl, [
|
|
453
|
+
u("div", Ml, [
|
|
454
|
+
u("div", Kl, Y(s.label), 1),
|
|
455
|
+
u("div", Jl, [
|
|
456
|
+
z(e, {
|
|
457
|
+
name: "ChildAdd",
|
|
458
|
+
class: "svg-icon-content",
|
|
459
|
+
style: { width: "24px", height: "24px" },
|
|
460
|
+
onClick: (W) => T(s)
|
|
461
|
+
}, null, 8, ["onClick"]),
|
|
462
|
+
z(e, {
|
|
463
|
+
name: "ChildFix",
|
|
464
|
+
class: "svg-icon-content",
|
|
465
|
+
style: { width: "24px", height: "24px" },
|
|
466
|
+
onClick: (W) => G(s)
|
|
467
|
+
}, null, 8, ["onClick"]),
|
|
468
|
+
z(e, {
|
|
469
|
+
name: "ChildDelete",
|
|
470
|
+
class: "svg-icon-content",
|
|
471
|
+
style: { width: "24px", height: "24px" },
|
|
472
|
+
onClick: (W) => P(s)
|
|
473
|
+
}, null, 8, ["onClick"])
|
|
474
|
+
])
|
|
475
|
+
]),
|
|
476
|
+
s != null && s.children && s.children.length > 0 ? (A(), J("div", Gl, [
|
|
477
|
+
z(bl, {
|
|
478
|
+
tableChildContents: s == null ? void 0 : s.children,
|
|
479
|
+
onDeleteChange: R,
|
|
480
|
+
onFixChange: O
|
|
481
|
+
}, null, 8, ["tableChildContents"])
|
|
482
|
+
])) : Ae("", !0)
|
|
483
|
+
]))), 256)),
|
|
484
|
+
z(De, {
|
|
485
|
+
visible: y.value,
|
|
486
|
+
onBeforeDestroy: t,
|
|
487
|
+
width: 840
|
|
488
|
+
}, {
|
|
489
|
+
default: ne(() => [
|
|
490
|
+
u("div", ql, [
|
|
491
|
+
(A(), ye(xe, {
|
|
492
|
+
rowContents: I.value,
|
|
493
|
+
key: I.value,
|
|
494
|
+
isEnableWrap: !0,
|
|
495
|
+
onChange: S
|
|
496
|
+
}, null, 8, ["rowContents"]))
|
|
497
|
+
])
|
|
498
|
+
]),
|
|
499
|
+
footer: ne(() => [
|
|
500
|
+
u("div", { class: "dialog-footer" }, [
|
|
501
|
+
u("div", {
|
|
502
|
+
onClick: t,
|
|
503
|
+
class: "cancel-button button"
|
|
504
|
+
}, Y("取消")),
|
|
505
|
+
u("div", {
|
|
506
|
+
class: "ok-button button",
|
|
507
|
+
onClick: d
|
|
508
|
+
}, Y("确认"))
|
|
509
|
+
])
|
|
510
|
+
]),
|
|
511
|
+
_: 1
|
|
512
|
+
}, 8, ["visible"])
|
|
513
|
+
]);
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
}, Ql = /* @__PURE__ */ Ce(Hl, [["__scopeId", "data-v-e0fef72d"]]), Xl = { class: "table-header-child" }, Yl = { class: "table-header-child-main" }, Zl = { class: "table-header-child-content" }, ea = { class: "table-header-child-content-item" }, la = { class: "fix-button" }, aa = { key: 0 }, na = { class: "form-content" }, oa = {
|
|
517
|
+
__name: "tableChildren",
|
|
518
|
+
props: {
|
|
519
|
+
tableChildContents: Array
|
|
520
|
+
},
|
|
521
|
+
emits: ["fixChange", "deleteChange"],
|
|
522
|
+
setup(C, { emit: L }) {
|
|
523
|
+
const v = C, l = L, y = B(!1), D = B(""), N = yl(Se), { tableIndex: m } = Ue(N), E = B(""), I = B([]), x = B([]), G = (n) => {
|
|
524
|
+
l("fixChange", h(n));
|
|
525
|
+
}, O = (n) => {
|
|
526
|
+
var e;
|
|
527
|
+
y.value = !0;
|
|
528
|
+
let i = [];
|
|
529
|
+
ie == null || ie.forEach((s) => {
|
|
530
|
+
let w = h(m.value) + 1;
|
|
531
|
+
N.setTableIndex(w), i.push({
|
|
532
|
+
label: s == null ? void 0 : s.label,
|
|
533
|
+
name: s == null ? void 0 : s.label,
|
|
534
|
+
type: s.type,
|
|
535
|
+
value: n[s.key],
|
|
536
|
+
id: m.value,
|
|
537
|
+
contents: s == null ? void 0 : s.options
|
|
538
|
+
});
|
|
539
|
+
}), n != null && n.children && ((e = n == null ? void 0 : n.children) == null ? void 0 : e.length) > 0 && i.push({
|
|
540
|
+
children: n == null ? void 0 : n.children,
|
|
541
|
+
isFormColHidden: !0
|
|
542
|
+
}), E.value = n == null ? void 0 : n.id, I.value = i, x.value = i;
|
|
543
|
+
}, R = (n) => {
|
|
544
|
+
y.value = !0;
|
|
545
|
+
let i = [];
|
|
546
|
+
ie == null || ie.forEach((e) => {
|
|
547
|
+
let s = h(m.value) + 1;
|
|
548
|
+
N.setTableIndex(s), i.push({
|
|
549
|
+
label: e == null ? void 0 : e.label,
|
|
550
|
+
name: e == null ? void 0 : e.label,
|
|
551
|
+
type: e.type,
|
|
552
|
+
value: "",
|
|
553
|
+
id: m.value,
|
|
554
|
+
contents: e == null ? void 0 : e.options
|
|
555
|
+
});
|
|
556
|
+
}), D.value = n == null ? void 0 : n.id, I.value = i, x.value = i;
|
|
557
|
+
}, T = (n) => {
|
|
558
|
+
let i = h(x.value);
|
|
559
|
+
i = i == null ? void 0 : i.map((e) => (e.children || (e.value = n == null ? void 0 : n[e.name]), e)), x.value = i;
|
|
560
|
+
}, S = () => {
|
|
561
|
+
var i, e;
|
|
562
|
+
I.value = x.value;
|
|
563
|
+
let n = {};
|
|
564
|
+
if (E.value !== "")
|
|
565
|
+
n.id = E.value, (i = I.value) == null || i.forEach((s) => {
|
|
566
|
+
const w = ie == null ? void 0 : ie.find((W) => (W == null ? void 0 : W.label) === (s == null ? void 0 : s.label));
|
|
567
|
+
w ? n[w.key] = s.value : s != null && s.children && s.children.length > 0 && (n.children = s.children);
|
|
568
|
+
}), y.value = !1, l("fixChange", {
|
|
569
|
+
contents: h(n),
|
|
570
|
+
id: D.value,
|
|
571
|
+
type: "fix"
|
|
572
|
+
});
|
|
573
|
+
else {
|
|
574
|
+
let s = h(m.value) + 1;
|
|
575
|
+
N.setTableIndex(s), n.id = "idChild" + m.value, (e = I.value) == null || e.forEach((w) => {
|
|
576
|
+
const W = ie == null ? void 0 : ie.find((Q) => (Q == null ? void 0 : Q.label) === (w == null ? void 0 : w.label));
|
|
577
|
+
W ? n[W.key] = w.value : w != null && w.children && w.children.length > 0 && (n.children = w.children);
|
|
578
|
+
}), y.value = !1, l("fixChange", {
|
|
579
|
+
contents: h(n),
|
|
580
|
+
id: D.value,
|
|
581
|
+
type: "add"
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
E.value = "", I.value = [], x.value = [];
|
|
585
|
+
}, d = () => {
|
|
586
|
+
y.value = !1, E.value = "", D.value = "", I.value = [], x.value = [];
|
|
587
|
+
}, t = (n) => {
|
|
588
|
+
Ne.confirm("是否确认要删除", "", {
|
|
589
|
+
confirmButtonText: "确认",
|
|
590
|
+
cancelButtonText: "取消",
|
|
591
|
+
type: "warning"
|
|
592
|
+
}).then(
|
|
593
|
+
() => {
|
|
594
|
+
l("deleteChange", n), Re({
|
|
595
|
+
type: "success",
|
|
596
|
+
message: "删除成功"
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
).catch(() => {
|
|
600
|
+
});
|
|
601
|
+
}, P = (n) => {
|
|
602
|
+
l("deleteChange", n);
|
|
603
|
+
};
|
|
604
|
+
return (n, i) => {
|
|
605
|
+
const e = me("svg-icon");
|
|
606
|
+
return A(), J("div", Xl, [
|
|
607
|
+
(A(!0), J(fe, null, he(v == null ? void 0 : v.tableChildContents, (s, w) => (A(), J("div", Yl, [
|
|
608
|
+
u("div", Zl, [
|
|
609
|
+
u("div", ea, Y(s.label), 1),
|
|
610
|
+
u("div", la, [
|
|
611
|
+
z(e, {
|
|
612
|
+
name: "ChildAdd",
|
|
613
|
+
class: "svg-icon-content",
|
|
614
|
+
style: { width: "24px", height: "24px" },
|
|
615
|
+
onClick: (W) => R(s)
|
|
616
|
+
}, null, 8, ["onClick"]),
|
|
617
|
+
z(e, {
|
|
618
|
+
name: "ChildFix",
|
|
619
|
+
class: "svg-icon-content",
|
|
620
|
+
style: { width: "24px", height: "24px" },
|
|
621
|
+
onClick: (W) => O(s)
|
|
622
|
+
}, null, 8, ["onClick"]),
|
|
623
|
+
z(e, {
|
|
624
|
+
name: "ChildDelete",
|
|
625
|
+
class: "svg-icon-content",
|
|
626
|
+
style: { width: "24px", height: "24px" },
|
|
627
|
+
onClick: (W) => t(s)
|
|
628
|
+
}, null, 8, ["onClick"])
|
|
629
|
+
])
|
|
630
|
+
]),
|
|
631
|
+
s != null && s.children && s.children.length > 0 ? (A(), J("div", aa, [
|
|
632
|
+
z(Ql, {
|
|
633
|
+
tableChildContents: s == null ? void 0 : s.children,
|
|
634
|
+
onDeleteChange: P,
|
|
635
|
+
onFixChange: G
|
|
636
|
+
}, null, 8, ["tableChildContents"])
|
|
637
|
+
])) : Ae("", !0)
|
|
638
|
+
]))), 256)),
|
|
639
|
+
z(De, {
|
|
640
|
+
visible: y.value,
|
|
641
|
+
onBeforeDestroy: d,
|
|
642
|
+
width: 840
|
|
643
|
+
}, {
|
|
644
|
+
default: ne(() => [
|
|
645
|
+
u("div", na, [
|
|
646
|
+
(A(), ye(xe, {
|
|
647
|
+
rowContents: I.value,
|
|
648
|
+
key: I.value,
|
|
649
|
+
isEnableWrap: !0,
|
|
650
|
+
onChange: T
|
|
651
|
+
}, null, 8, ["rowContents"]))
|
|
652
|
+
])
|
|
653
|
+
]),
|
|
654
|
+
footer: ne(() => [
|
|
655
|
+
u("div", { class: "dialog-footer" }, [
|
|
656
|
+
u("div", {
|
|
657
|
+
onClick: d,
|
|
658
|
+
class: "cancel-button button"
|
|
659
|
+
}, Y("取消")),
|
|
660
|
+
u("div", {
|
|
661
|
+
class: "ok-button button",
|
|
662
|
+
onClick: S
|
|
663
|
+
}, Y("确认"))
|
|
664
|
+
])
|
|
665
|
+
]),
|
|
666
|
+
_: 1
|
|
667
|
+
}, 8, ["visible"])
|
|
668
|
+
]);
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
}, bl = /* @__PURE__ */ Ce(oa, [["__scopeId", "data-v-cc311a5f"]]), sa = { class: "table-operate-content" }, ia = { class: "table-operate-item" }, ua = { class: "operate-title" }, ra = { class: "operate-content" }, ta = { class: "fix-content" }, ca = { class: "fix-content-label" }, da = { class: "fix-button" }, va = { key: 0 }, pa = { class: "operate-title" }, fa = { class: "operate-content" }, ha = { class: "fix-content" }, ma = { class: "fix-content-label" }, ya = { class: "fix-button" }, ba = { class: "operate-title" }, Ca = { class: "operate-content" }, ga = { class: "fix-content" }, ka = { class: "fix-content-label" }, _a = { class: "fix-button" }, wa = { class: "operate-title" }, xa = { class: "operate-content" }, Da = { class: "fix-content" }, Ia = { class: "fix-content-label" }, $a = { class: "fix-button" }, Ta = { class: "operate-content" }, Ea = { style: { display: "flex", "justify-content": "space-between" } }, Ba = { class: "form-content" }, Fa = { class: "form-content" }, Aa = { class: "form-content" }, La = { class: "form-content" }, Sa = {
|
|
672
|
+
__name: "operate",
|
|
673
|
+
props: {
|
|
674
|
+
itemContents: {
|
|
675
|
+
type: Array,
|
|
676
|
+
default: () => []
|
|
677
|
+
},
|
|
678
|
+
originalItemContents: {
|
|
679
|
+
type: Array,
|
|
680
|
+
default: () => []
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
emits: ["change"],
|
|
684
|
+
setup(C, { emit: L }) {
|
|
685
|
+
const v = C, l = L, y = B([]), D = B(!1), N = B(!1), m = B([]), E = B(!1), I = B([]), x = B(!1), G = B([]), O = B(""), R = B(""), T = B([]), S = B([]), d = B([]), t = B([]), P = B(!1), n = B([]), i = B([]), e = B(0), s = B([]), w = B([]), W = B([]), Q = () => {
|
|
686
|
+
P.value = !0;
|
|
687
|
+
let o = [];
|
|
688
|
+
Ve == null || Ve.forEach((c) => {
|
|
689
|
+
e.value++, o.push({
|
|
690
|
+
label: c == null ? void 0 : c.label,
|
|
691
|
+
name: c == null ? void 0 : c.label,
|
|
692
|
+
type: c.type,
|
|
693
|
+
value: (c == null ? void 0 : c.key) === "background" ? "var(--ssComponent-primary-color)" : "",
|
|
694
|
+
id: e.value,
|
|
695
|
+
contents: c == null ? void 0 : c.options
|
|
696
|
+
});
|
|
697
|
+
}), n.value = o, i.value = o;
|
|
698
|
+
}, de = () => {
|
|
699
|
+
var c, g, f;
|
|
700
|
+
N.value = !0;
|
|
701
|
+
let o = [];
|
|
702
|
+
(f = (g = (c = ge) == null ? void 0 : c.find((H) => (H == null ? void 0 : H.key) === "Input")) == null ? void 0 : g.value) == null || f.forEach((H) => {
|
|
703
|
+
e.value++, o.push({
|
|
704
|
+
label: H == null ? void 0 : H.label,
|
|
705
|
+
name: H == null ? void 0 : H.label,
|
|
706
|
+
type: H.type,
|
|
707
|
+
value: (H == null ? void 0 : H.label) === "类型" ? "Input" : "",
|
|
708
|
+
id: e.value,
|
|
709
|
+
contents: H == null ? void 0 : H.options
|
|
710
|
+
});
|
|
711
|
+
}), s.value = o, w.value = o;
|
|
712
|
+
}, re = async (o) => {
|
|
713
|
+
var c, g, f, H, ee, be, K, Z, ve, we;
|
|
714
|
+
if ((o == null ? void 0 : o.类型) !== ((g = (c = w.value) == null ? void 0 : c.find((le) => (le == null ? void 0 : le.label) === "类型")) == null ? void 0 : g.value)) {
|
|
715
|
+
let le = [], Ie = await ((ee = (H = (f = ge) == null ? void 0 : f.find((X) => (X == null ? void 0 : X.key) === ((o == null ? void 0 : o.类型) === "" ? "Input" : o == null ? void 0 : o.类型))) == null ? void 0 : H.value) == null ? void 0 : ee.value) ? await ((we = (ve = (Z = ge) == null ? void 0 : Z.find((X) => (X == null ? void 0 : X.key) === ((o == null ? void 0 : o.类型) === "" ? "Input" : o == null ? void 0 : o.类型))) == null ? void 0 : ve.value) == null ? void 0 : we.value) : (K = (be = ge) == null ? void 0 : be.find((X) => (X == null ? void 0 : X.key) === ((o == null ? void 0 : o.类型) === "" ? "Input" : o == null ? void 0 : o.类型))) == null ? void 0 : K.value;
|
|
716
|
+
Ie == null || Ie.forEach((X) => {
|
|
717
|
+
e.value++, le.push({
|
|
718
|
+
label: X == null ? void 0 : X.label,
|
|
719
|
+
name: X == null ? void 0 : X.label,
|
|
720
|
+
type: X.type,
|
|
721
|
+
value: (o == null ? void 0 : o[X.label]) ?? "",
|
|
722
|
+
id: e.value,
|
|
723
|
+
contents: X == null ? void 0 : X.options
|
|
724
|
+
});
|
|
725
|
+
}), w.value = le, s.value = le;
|
|
726
|
+
} else {
|
|
727
|
+
let le = h(s.value);
|
|
728
|
+
le = le == null ? void 0 : le.map((Ie) => (Ie.value = o == null ? void 0 : o[Ie.name], Ie)), w.value = le;
|
|
729
|
+
}
|
|
730
|
+
}, a = async (o) => {
|
|
731
|
+
var f, H, ee, be, K, Z, ve, we;
|
|
732
|
+
N.value = !0;
|
|
733
|
+
let c = [];
|
|
734
|
+
const g = await ((ee = (H = (f = ge) == null ? void 0 : f.find((le) => (le == null ? void 0 : le.key) === ((o == null ? void 0 : o.type) === "" ? "Input" : o == null ? void 0 : o.type))) == null ? void 0 : H.value) == null ? void 0 : ee.value) ? await ((we = (ve = (Z = ge) == null ? void 0 : Z.find((le) => (le == null ? void 0 : le.key) === ((o == null ? void 0 : o.type) === "" ? "Input" : o == null ? void 0 : o.type))) == null ? void 0 : ve.value) == null ? void 0 : we.value) : (K = (be = ge) == null ? void 0 : be.find((le) => (le == null ? void 0 : le.key) === ((o == null ? void 0 : o.type) === "" ? "Input" : o == null ? void 0 : o.type))) == null ? void 0 : K.value;
|
|
735
|
+
g == null || g.forEach((le) => {
|
|
736
|
+
e.value++, c.push({
|
|
737
|
+
label: le == null ? void 0 : le.label,
|
|
738
|
+
name: le == null ? void 0 : le.label,
|
|
739
|
+
type: le.type,
|
|
740
|
+
value: (le == null ? void 0 : le.label) === "类型" && o[le.key] === "" ? "Input" : o[le.key],
|
|
741
|
+
id: e.value,
|
|
742
|
+
contents: le == null ? void 0 : le.options
|
|
743
|
+
});
|
|
744
|
+
}), O.value = o == null ? void 0 : o.id, s.value = c, w.value = c;
|
|
745
|
+
}, k = (o) => {
|
|
746
|
+
Ne.confirm("是否确认要删除", "", {
|
|
747
|
+
confirmButtonText: "确认",
|
|
748
|
+
cancelButtonText: "取消",
|
|
749
|
+
type: "warning"
|
|
750
|
+
}).then(
|
|
751
|
+
() => {
|
|
752
|
+
var c, g;
|
|
753
|
+
W.value = (c = h(W.value)) == null ? void 0 : c.filter((f) => (f == null ? void 0 : f.id) !== (o == null ? void 0 : o.id)), l("change", (g = h(v.originalItemContents)) == null ? void 0 : g.map((f) => ((f == null ? void 0 : f.key) === "tableToForm" && (f.contents = W.value), f))), Re({
|
|
754
|
+
type: "success",
|
|
755
|
+
message: "删除成功"
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
).catch(() => {
|
|
759
|
+
});
|
|
760
|
+
}, U = () => {
|
|
761
|
+
N.value = !1, s.value = [], O.value = "";
|
|
762
|
+
}, _ = async () => {
|
|
763
|
+
var f, H, ee, be, K, Z, ve, we, le, Ie;
|
|
764
|
+
s.value = w.value;
|
|
765
|
+
let o = {};
|
|
766
|
+
O.value !== "" ? o.id = O.value : (e.value++, o.id = "id" + e.value);
|
|
767
|
+
let c = await ((ee = (H = (f = ge) == null ? void 0 : f.find((X) => {
|
|
768
|
+
var $e, Be;
|
|
769
|
+
return (X == null ? void 0 : X.key) === (((Be = ($e = s.value) == null ? void 0 : $e.find((Le) => (Le == null ? void 0 : Le.label) === "类型")) == null ? void 0 : Be.value) ?? "label");
|
|
770
|
+
})) == null ? void 0 : H.value) == null ? void 0 : ee.value) ?? ((K = (be = ge) == null ? void 0 : be.find((X) => {
|
|
771
|
+
var $e, Be;
|
|
772
|
+
return (X == null ? void 0 : X.key) === (((Be = ($e = s.value) == null ? void 0 : $e.find((Le) => (Le == null ? void 0 : Le.label) === "类型")) == null ? void 0 : Be.value) ?? "label");
|
|
773
|
+
})) == null ? void 0 : K.value);
|
|
774
|
+
if ((Z = s.value) == null || Z.forEach((X) => {
|
|
775
|
+
const $e = c == null ? void 0 : c.find((Be) => (Be == null ? void 0 : Be.label) === (X == null ? void 0 : X.label));
|
|
776
|
+
$e && (o[$e.key] = X.value);
|
|
777
|
+
}), o.name = o.label, (ve = W.value) != null && ve.find((X) => X.id === o.id))
|
|
778
|
+
W.value = (we = W.value) == null ? void 0 : we.map((X) => (X.id === o.id && (X = o), X));
|
|
779
|
+
else {
|
|
780
|
+
let X = h(W.value);
|
|
781
|
+
W.value || (W.value = []), X.push(o), W.value = X;
|
|
782
|
+
}
|
|
783
|
+
W.value = W.value.map(({ id: X, ...$e }) => $e), N.value = !1, O.value = "";
|
|
784
|
+
let g = h(v.originalItemContents);
|
|
785
|
+
(le = h(v.originalItemContents)) != null && le.find((X) => (X == null ? void 0 : X.key) === "tableToForm") ? g = (Ie = h(v.originalItemContents)) == null ? void 0 : Ie.map((X) => ((X == null ? void 0 : X.key) === "tableToForm" && (X.contents = W.value), X)) : g.push({
|
|
786
|
+
key: "tableToForm",
|
|
787
|
+
contents: W.value
|
|
788
|
+
}), l("change", g);
|
|
789
|
+
}, j = (o) => {
|
|
790
|
+
P.value = !0;
|
|
791
|
+
let c = [];
|
|
792
|
+
Ve == null || Ve.forEach((g) => {
|
|
793
|
+
e.value++, c.push({
|
|
794
|
+
label: g == null ? void 0 : g.label,
|
|
795
|
+
name: g == null ? void 0 : g.label,
|
|
796
|
+
type: g.type,
|
|
797
|
+
value: o[g.key],
|
|
798
|
+
id: e.value,
|
|
799
|
+
contents: g == null ? void 0 : g.options
|
|
800
|
+
});
|
|
801
|
+
}), O.value = o == null ? void 0 : o.id, n.value = c, i.value = c;
|
|
802
|
+
};
|
|
803
|
+
ke(
|
|
804
|
+
() => x.value,
|
|
805
|
+
() => {
|
|
806
|
+
var c, g;
|
|
807
|
+
let o = h(v.originalItemContents);
|
|
808
|
+
(c = h(v.originalItemContents)) != null && c.find((f) => (f == null ? void 0 : f.key) === "page") ? o = (g = h(v.originalItemContents)) == null ? void 0 : g.map((f) => ((f == null ? void 0 : f.key) === "page" && (f.contents = x.value), f)) : o.push({
|
|
809
|
+
key: "page",
|
|
810
|
+
contents: x.value
|
|
811
|
+
}), l("change", o);
|
|
812
|
+
},
|
|
813
|
+
{ deep: !0 }
|
|
814
|
+
);
|
|
815
|
+
const se = (o) => {
|
|
816
|
+
Ne.confirm("是否确认要删除", "", {
|
|
817
|
+
confirmButtonText: "确认",
|
|
818
|
+
cancelButtonText: "取消",
|
|
819
|
+
type: "warning"
|
|
820
|
+
}).then(
|
|
821
|
+
() => {
|
|
822
|
+
var c, g;
|
|
823
|
+
S.value = (c = h(S.value)) == null ? void 0 : c.filter((f) => (f == null ? void 0 : f.id) !== (o == null ? void 0 : o.id)), l("change", (g = h(v.originalItemContents)) == null ? void 0 : g.map((f) => ((f == null ? void 0 : f.key) === "extraButton" && (f.contents = S.value), f))), Re({
|
|
824
|
+
type: "success",
|
|
825
|
+
message: "删除成功"
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
).catch(() => {
|
|
829
|
+
});
|
|
830
|
+
}, te = () => {
|
|
831
|
+
var g, f, H, ee, be;
|
|
832
|
+
n.value = i.value;
|
|
833
|
+
let o = {};
|
|
834
|
+
if (O.value !== "" ? o.id = O.value : (e.value++, o.id = "id" + e.value), (g = n.value) == null || g.forEach((K) => {
|
|
835
|
+
const Z = Ve == null ? void 0 : Ve.find((ve) => (ve == null ? void 0 : ve.label) === (K == null ? void 0 : K.label));
|
|
836
|
+
Z ? o[Z.key] = K.value : K != null && K.children && K.children.length > 0 && (o.children = K.children);
|
|
837
|
+
}), (f = S.value) != null && f.find((K) => K.id === o.id))
|
|
838
|
+
S.value = (H = S.value) == null ? void 0 : H.map((K) => (K.id === o.id && (K = o), K));
|
|
839
|
+
else {
|
|
840
|
+
let K = h(S.value) ?? [];
|
|
841
|
+
K.push(o), S.value = K;
|
|
842
|
+
}
|
|
843
|
+
P.value = !1, O.value = "";
|
|
844
|
+
let c = h(v.originalItemContents);
|
|
845
|
+
(ee = h(v.originalItemContents)) != null && ee.find((K) => (K == null ? void 0 : K.key) === "extraButton") ? c = (be = h(v.originalItemContents)) == null ? void 0 : be.map((K) => ((K == null ? void 0 : K.key) === "extraButton" && (K.contents = S.value), K)) : c.push({
|
|
846
|
+
key: "extraButton",
|
|
847
|
+
contents: S.value
|
|
848
|
+
}), l("change", c);
|
|
849
|
+
}, b = (o) => {
|
|
850
|
+
let c = h(i.value);
|
|
851
|
+
c = c == null ? void 0 : c.map((g) => (g.children || (g.value = o == null ? void 0 : o[g.name]), g)), i.value = c;
|
|
852
|
+
}, r = () => {
|
|
853
|
+
P.value = !1, n.value = [], O.value = "";
|
|
854
|
+
}, p = (o) => {
|
|
855
|
+
E.value = !0;
|
|
856
|
+
let c = [];
|
|
857
|
+
Oe == null || Oe.forEach((g) => {
|
|
858
|
+
e.value++, c.push({
|
|
859
|
+
label: g == null ? void 0 : g.label,
|
|
860
|
+
name: g == null ? void 0 : g.label,
|
|
861
|
+
type: g.type,
|
|
862
|
+
value: o[g.key],
|
|
863
|
+
id: e.value,
|
|
864
|
+
contents: g == null ? void 0 : g.options
|
|
865
|
+
});
|
|
866
|
+
}), O.value = o == null ? void 0 : o.id, d.value = c, t.value = c;
|
|
867
|
+
}, M = (o) => {
|
|
868
|
+
Ne.confirm("是否确认要删除", "", {
|
|
869
|
+
confirmButtonText: "确认",
|
|
870
|
+
cancelButtonText: "取消",
|
|
871
|
+
type: "warning"
|
|
872
|
+
}).then(
|
|
873
|
+
() => {
|
|
874
|
+
var c, g;
|
|
875
|
+
T.value = (c = h(T.value)) == null ? void 0 : c.filter((f) => (f == null ? void 0 : f.id) !== (o == null ? void 0 : o.id)), l("change", (g = h(v.originalItemContents)) == null ? void 0 : g.map((f) => ((f == null ? void 0 : f.key) === "rowButton" && (f.contents = T.value), f))), Re({
|
|
876
|
+
type: "success",
|
|
877
|
+
message: "删除成功"
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
).catch(() => {
|
|
881
|
+
});
|
|
882
|
+
}, ae = () => {
|
|
883
|
+
D.value = !0;
|
|
884
|
+
let o = [];
|
|
885
|
+
ie == null || ie.forEach((c) => {
|
|
886
|
+
e.value++, o.push({
|
|
887
|
+
label: c == null ? void 0 : c.label,
|
|
888
|
+
name: c == null ? void 0 : c.label,
|
|
889
|
+
type: c.type,
|
|
890
|
+
value: "",
|
|
891
|
+
id: e.value,
|
|
892
|
+
contents: c == null ? void 0 : c.options
|
|
893
|
+
});
|
|
894
|
+
}), I.value = o, G.value = o;
|
|
895
|
+
}, ue = () => {
|
|
896
|
+
E.value = !0;
|
|
897
|
+
let o = [];
|
|
898
|
+
Oe == null || Oe.forEach((c) => {
|
|
899
|
+
e.value++, o.push({
|
|
900
|
+
label: c == null ? void 0 : c.label,
|
|
901
|
+
name: c == null ? void 0 : c.label,
|
|
902
|
+
type: c.type,
|
|
903
|
+
value: "",
|
|
904
|
+
id: e.value,
|
|
905
|
+
contents: c == null ? void 0 : c.options
|
|
906
|
+
});
|
|
907
|
+
}), d.value = o, t.value = o;
|
|
908
|
+
}, V = (o) => {
|
|
909
|
+
let c = h(t.value);
|
|
910
|
+
c = c == null ? void 0 : c.map((g) => (g.children || (g.value = o == null ? void 0 : o[g.name]), g)), t.value = c;
|
|
911
|
+
}, q = () => {
|
|
912
|
+
var g, f, H, ee, be;
|
|
913
|
+
d.value = t.value;
|
|
914
|
+
let o = {};
|
|
915
|
+
if (O.value !== "" ? o.id = O.value : (e.value++, o.id = "id" + e.value), (g = d.value) == null || g.forEach((K) => {
|
|
916
|
+
const Z = Oe == null ? void 0 : Oe.find((ve) => (ve == null ? void 0 : ve.label) === (K == null ? void 0 : K.label));
|
|
917
|
+
Z ? o[Z.key] = K.value : K != null && K.children && K.children.length > 0 && (o.children = K.children);
|
|
918
|
+
}), (f = T.value) != null && f.find((K) => K.id === o.id))
|
|
919
|
+
T.value = (H = T.value) == null ? void 0 : H.map((K) => (K.id === o.id && (K = o), K));
|
|
920
|
+
else {
|
|
921
|
+
let K = h(T.value);
|
|
922
|
+
K.push(o), T.value = K;
|
|
923
|
+
}
|
|
924
|
+
E.value = !1, O.value = "";
|
|
925
|
+
let c = h(v.originalItemContents);
|
|
926
|
+
(ee = h(v.originalItemContents)) != null && ee.find((K) => (K == null ? void 0 : K.key) === "rowButton") ? c = (be = h(v.originalItemContents)) == null ? void 0 : be.map((K) => ((K == null ? void 0 : K.key) === "rowButton" && (K.contents = T.value), K)) : c.push({
|
|
927
|
+
key: "rowButton",
|
|
928
|
+
contents: T.value
|
|
929
|
+
}), l("change", c);
|
|
930
|
+
}, F = () => {
|
|
931
|
+
E.value = !1, O.value = "", t.value = [], d.value = [];
|
|
932
|
+
}, oe = (o) => {
|
|
933
|
+
D.value = !0;
|
|
934
|
+
let c = [];
|
|
935
|
+
ie == null || ie.forEach((g) => {
|
|
936
|
+
e.value++, c.push({
|
|
937
|
+
label: g == null ? void 0 : g.label,
|
|
938
|
+
name: g == null ? void 0 : g.label,
|
|
939
|
+
type: g.type,
|
|
940
|
+
value: "",
|
|
941
|
+
id: e.value,
|
|
942
|
+
contents: g == null ? void 0 : g.options
|
|
943
|
+
});
|
|
944
|
+
}), I.value = c, R.value = o == null ? void 0 : o.id, G.value = c;
|
|
945
|
+
}, _e = (o) => {
|
|
946
|
+
var c;
|
|
947
|
+
m.value = pl(h(m.value), o == null ? void 0 : o.id), l("change", (c = h(v.originalItemContents)) == null ? void 0 : c.map((g) => {
|
|
948
|
+
var f;
|
|
949
|
+
return (g == null ? void 0 : g.key) === "header" && (g.contents = (f = m.value) != null && f.some((H) => H == null ? void 0 : H.children) ? [m.value] : m.value), g;
|
|
950
|
+
}));
|
|
951
|
+
}, pe = (o) => {
|
|
952
|
+
var g, f, H;
|
|
953
|
+
o.type === "fix" ? o.id !== "" ? m.value = hl(m.value, o) : m.value = fl(m.value, o == null ? void 0 : o.contents) : m.value = ml(m.value, o), m.value = (g = m.value) != null && g.some((ee) => ee == null ? void 0 : ee.children) ? [m.value] : m.value, O.value = "";
|
|
954
|
+
let c = h(v.originalItemContents);
|
|
955
|
+
(f = h(v.originalItemContents)) != null && f.find((ee) => (ee == null ? void 0 : ee.key) === "header") ? c = (H = h(v.originalItemContents)) == null ? void 0 : H.map((ee) => ((ee == null ? void 0 : ee.key) === "header" && (ee.contents = m.value), ee)) : c.push({
|
|
956
|
+
key: "header",
|
|
957
|
+
contents: m.value
|
|
958
|
+
}), l("change", c);
|
|
959
|
+
}, Ee = (o) => {
|
|
960
|
+
var g;
|
|
961
|
+
D.value = !0;
|
|
962
|
+
let c = [];
|
|
963
|
+
ie == null || ie.forEach((f) => {
|
|
964
|
+
e.value++, c.push({
|
|
965
|
+
label: f == null ? void 0 : f.label,
|
|
966
|
+
name: f == null ? void 0 : f.label,
|
|
967
|
+
type: f.type,
|
|
968
|
+
value: o[f.key],
|
|
969
|
+
id: e.value,
|
|
970
|
+
contents: f == null ? void 0 : f.options
|
|
971
|
+
});
|
|
972
|
+
}), o != null && o.children && ((g = o == null ? void 0 : o.children) == null ? void 0 : g.length) > 0 && c.push({
|
|
973
|
+
children: o == null ? void 0 : o.children,
|
|
974
|
+
isFormColHidden: !0
|
|
975
|
+
}), O.value = o == null ? void 0 : o.id, R.value = "", I.value = c, G.value = c;
|
|
976
|
+
}, ce = (o) => {
|
|
977
|
+
let c = h(G.value);
|
|
978
|
+
c = c == null ? void 0 : c.map((g) => (g.children || (g.value = o == null ? void 0 : o[g.name]), g)), G.value = c;
|
|
979
|
+
}, ze = () => {
|
|
980
|
+
D.value = !1, O.value = "", R.value = "", G.value = [];
|
|
981
|
+
}, Me = () => {
|
|
982
|
+
var g, f, H, ee, be, K;
|
|
983
|
+
I.value = G.value;
|
|
984
|
+
let o = {};
|
|
985
|
+
if (O.value !== "" ? o.id = O.value : (e.value++, o.id = "id" + e.value), (g = I.value) == null || g.forEach((Z) => {
|
|
986
|
+
const ve = ie == null ? void 0 : ie.find((we) => (we == null ? void 0 : we.label) === (Z == null ? void 0 : Z.label));
|
|
987
|
+
ve ? o[ve.key] = Z.value : Z != null && Z.children && Z.children.length > 0 && (o.children = Z.children);
|
|
988
|
+
}), (f = m.value) != null && f.find((Z) => Z.id === o.id))
|
|
989
|
+
m.value = (H = m.value) == null ? void 0 : H.map((Z) => (Z.id === o.id && (Z = o), Z));
|
|
990
|
+
else {
|
|
991
|
+
let Z = h(m.value) ?? [];
|
|
992
|
+
R.value === "" ? Z.push(o) : Z = Z == null ? void 0 : Z.map((ve) => (ve.id === R.value && (ve.children || (ve.children = []), ve.children.push(o)), ve)), m.value = Z;
|
|
993
|
+
}
|
|
994
|
+
m.value = (ee = m.value) != null && ee.some((Z) => Z == null ? void 0 : Z.children) ? [m.value] : m.value, D.value = !1, O.value = "", R.value = "";
|
|
995
|
+
let c = h(v.originalItemContents);
|
|
996
|
+
(be = h(v.originalItemContents)) != null && be.find((Z) => (Z == null ? void 0 : Z.key) === "header") ? c = (K = h(v.originalItemContents)) == null ? void 0 : K.map((Z) => ((Z == null ? void 0 : Z.key) === "header" && (Z.contents = m.value), Z)) : c.push({
|
|
997
|
+
key: "header",
|
|
998
|
+
contents: m.value
|
|
999
|
+
}), l("change", c);
|
|
1000
|
+
}, We = (o) => {
|
|
1001
|
+
Ne.confirm("是否确认要删除", "", {
|
|
1002
|
+
confirmButtonText: "确认",
|
|
1003
|
+
cancelButtonText: "取消",
|
|
1004
|
+
type: "warning"
|
|
1005
|
+
}).then(
|
|
1006
|
+
() => {
|
|
1007
|
+
var c, g;
|
|
1008
|
+
m.value = (c = h(m.value)) == null ? void 0 : c.filter((f) => (f == null ? void 0 : f.id) !== (o == null ? void 0 : o.id)), l("change", (g = h(v.originalItemContents)) == null ? void 0 : g.map((f) => {
|
|
1009
|
+
var H;
|
|
1010
|
+
return (f == null ? void 0 : f.key) === "header" && (f.contents = (H = m.value) != null && H.some((ee) => ee == null ? void 0 : ee.children) ? [m.value] : m.value), f;
|
|
1011
|
+
})), Re({
|
|
1012
|
+
type: "success",
|
|
1013
|
+
message: "删除成功"
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
).catch(() => {
|
|
1017
|
+
});
|
|
1018
|
+
};
|
|
1019
|
+
return ke(
|
|
1020
|
+
() => v.originalItemContents,
|
|
1021
|
+
() => {
|
|
1022
|
+
var o, c, g, f, H, ee, be, K, Z, ve, we, le, Ie, X, $e, Be, Le, ol, sl;
|
|
1023
|
+
if (!(!v.originalItemContents || v.originalItemContents.length === 0))
|
|
1024
|
+
if (y.value = h(v.originalItemContents), m.value = (c = (o = y.value) == null ? void 0 : o.find(($) => ($ == null ? void 0 : $.key) === "header")) == null ? void 0 : c.contents, T.value = (f = (g = y.value) == null ? void 0 : g.find(($) => ($ == null ? void 0 : $.key) === "rowButton")) == null ? void 0 : f.contents, S.value = (ee = (H = y.value) == null ? void 0 : H.find(($) => ($ == null ? void 0 : $.key) === "extraButton")) == null ? void 0 : ee.contents, x.value = (K = (be = y.value) == null ? void 0 : be.find(($) => ($ == null ? void 0 : $.key) === "page")) != null && K.contents ? !!((ve = (Z = y.value) == null ? void 0 : Z.find(($) => ($ == null ? void 0 : $.key) === "page")) != null && ve.contents) : !1, W.value = (le = (we = y.value) == null ? void 0 : we.find(($) => ($ == null ? void 0 : $.key) === "tableToForm")) == null ? void 0 : le.contents, m.value = (Ie = m.value) == null ? void 0 : Ie.map(($, Fe) => (Array.isArray($) ? $ = Pl($) : $ = {
|
|
1025
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
1026
|
+
prop: ($ == null ? void 0 : $.label) === "操作" ? "operate" : $ == null ? void 0 : $.prop,
|
|
1027
|
+
width: $ != null && $.width ? parseInt($.width) : "",
|
|
1028
|
+
fixed: ($ == null ? void 0 : $.fixed) ?? void 0,
|
|
1029
|
+
sortable: ($ == null ? void 0 : $.sortable) ?? !1,
|
|
1030
|
+
align: ($ == null ? void 0 : $.align) ?? "center",
|
|
1031
|
+
showOverflowTooltip: ($ == null ? void 0 : $.showOverflowTooltip) ?? !0,
|
|
1032
|
+
isNotDrag: ($ == null ? void 0 : $.isNotDrag) ?? !1,
|
|
1033
|
+
isEditCol: ($ == null ? void 0 : $.isEditCol) ?? !1,
|
|
1034
|
+
isOperate: ($ == null ? void 0 : $.isOperate) ?? !1,
|
|
1035
|
+
id: ($ == null ? void 0 : $.id) ?? Fe
|
|
1036
|
+
}, $)), m.value = (X = m.value) != null && X.every(($) => Array.isArray($)) ? ($e = m.value) == null ? void 0 : $e[0] : m.value, T.value = (Be = T.value) == null ? void 0 : Be.map(($, Fe) => $ = {
|
|
1037
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
1038
|
+
type: ($ == null ? void 0 : $.type) ?? "",
|
|
1039
|
+
textColor: ($ == null ? void 0 : $.textColor) ?? "#000000",
|
|
1040
|
+
id: ($ == null ? void 0 : $.id) ?? Fe
|
|
1041
|
+
}), S.value = (Le = S.value) == null ? void 0 : Le.map(($, Fe) => $ = {
|
|
1042
|
+
label: ($ == null ? void 0 : $.label) ?? "",
|
|
1043
|
+
type: ($ == null ? void 0 : $.type) ?? "",
|
|
1044
|
+
background: ($ == null ? void 0 : $.background) ?? "var(--ssComponent-primary-color)",
|
|
1045
|
+
id: ($ == null ? void 0 : $.id) ?? Fe
|
|
1046
|
+
}), W.value)
|
|
1047
|
+
W.value = (sl = W.value) == null ? void 0 : sl.map(($) => {
|
|
1048
|
+
e.value++;
|
|
1049
|
+
let Fe = $;
|
|
1050
|
+
return Fe.id = e.value, Fe;
|
|
1051
|
+
});
|
|
1052
|
+
else {
|
|
1053
|
+
let $ = [];
|
|
1054
|
+
const Fe = (ol = $l(h(m.value))) == null ? void 0 : ol.filter((Te) => (Te == null ? void 0 : Te.prop) !== "operate");
|
|
1055
|
+
Fe == null || Fe.forEach((Te) => {
|
|
1056
|
+
e.value++, $.push({
|
|
1057
|
+
label: Te == null ? void 0 : Te.label,
|
|
1058
|
+
name: Te == null ? void 0 : Te.label,
|
|
1059
|
+
type: "Input",
|
|
1060
|
+
value: "",
|
|
1061
|
+
id: e.value,
|
|
1062
|
+
contents: Te == null ? void 0 : Te.options
|
|
1063
|
+
});
|
|
1064
|
+
}), W.value = $;
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
{ deep: !0, immediate: !0 }
|
|
1068
|
+
), (o, c) => {
|
|
1069
|
+
const g = me("svg-icon");
|
|
1070
|
+
return A(), J("div", sa, [
|
|
1071
|
+
u("div", ia, [
|
|
1072
|
+
u("div", ua, [
|
|
1073
|
+
c[2] || (c[2] = u("div", null, Y("表头"), -1)),
|
|
1074
|
+
u("div", {
|
|
1075
|
+
class: "icon-content",
|
|
1076
|
+
onClick: ae
|
|
1077
|
+
}, [
|
|
1078
|
+
z(g, {
|
|
1079
|
+
name: "Plus",
|
|
1080
|
+
class: "icon-size"
|
|
1081
|
+
}),
|
|
1082
|
+
c[1] || (c[1] = u("div", null, Y("新增"), -1))
|
|
1083
|
+
])
|
|
1084
|
+
]),
|
|
1085
|
+
u("div", ra, [
|
|
1086
|
+
(A(!0), J(fe, null, he(m.value, (f, H) => (A(), J("div", { key: H }, [
|
|
1087
|
+
u("div", ta, [
|
|
1088
|
+
u("div", ca, Y(f == null ? void 0 : f.label), 1),
|
|
1089
|
+
u("div", da, [
|
|
1090
|
+
z(g, {
|
|
1091
|
+
name: "ChildAdd",
|
|
1092
|
+
class: "svg-icon-content",
|
|
1093
|
+
style: { width: "24px", height: "24px" },
|
|
1094
|
+
onClick: (ee) => oe(f)
|
|
1095
|
+
}, null, 8, ["onClick"]),
|
|
1096
|
+
z(g, {
|
|
1097
|
+
name: "ChildFix",
|
|
1098
|
+
class: "svg-icon-content",
|
|
1099
|
+
style: { width: "24px", height: "24px" },
|
|
1100
|
+
onClick: (ee) => Ee(f)
|
|
1101
|
+
}, null, 8, ["onClick"]),
|
|
1102
|
+
z(g, {
|
|
1103
|
+
name: "ChildDelete",
|
|
1104
|
+
class: "svg-icon-content",
|
|
1105
|
+
style: { width: "24px", height: "24px" },
|
|
1106
|
+
onClick: (ee) => We(f)
|
|
1107
|
+
}, null, 8, ["onClick"])
|
|
1108
|
+
])
|
|
1109
|
+
]),
|
|
1110
|
+
f != null && f.children && f.children.length > 0 ? (A(), J("div", va, [
|
|
1111
|
+
z(bl, {
|
|
1112
|
+
tableChildContents: f == null ? void 0 : f.children,
|
|
1113
|
+
onDeleteChange: _e,
|
|
1114
|
+
onFixChange: pe
|
|
1115
|
+
}, null, 8, ["tableChildContents"])
|
|
1116
|
+
])) : Ae("", !0)
|
|
1117
|
+
]))), 128))
|
|
1118
|
+
]),
|
|
1119
|
+
u("div", pa, [
|
|
1120
|
+
c[4] || (c[4] = u("div", null, Y("行内按钮"), -1)),
|
|
1121
|
+
u("div", {
|
|
1122
|
+
class: "icon-content",
|
|
1123
|
+
onClick: ue
|
|
1124
|
+
}, [
|
|
1125
|
+
z(g, {
|
|
1126
|
+
name: "Plus",
|
|
1127
|
+
class: "icon-size"
|
|
1128
|
+
}),
|
|
1129
|
+
c[3] || (c[3] = u("div", null, Y("新增"), -1))
|
|
1130
|
+
])
|
|
1131
|
+
]),
|
|
1132
|
+
u("div", fa, [
|
|
1133
|
+
(A(!0), J(fe, null, he(T.value, (f, H) => (A(), J("div", { key: H }, [
|
|
1134
|
+
u("div", ha, [
|
|
1135
|
+
u("div", ma, Y(f == null ? void 0 : f.label), 1),
|
|
1136
|
+
u("div", ya, [
|
|
1137
|
+
z(g, {
|
|
1138
|
+
name: "ChildFix",
|
|
1139
|
+
style: { width: "24px", height: "24px" },
|
|
1140
|
+
class: "svg-icon-content",
|
|
1141
|
+
onClick: (ee) => p(f)
|
|
1142
|
+
}, null, 8, ["onClick"]),
|
|
1143
|
+
z(g, {
|
|
1144
|
+
name: "ChildDelete",
|
|
1145
|
+
class: "svg-icon-content",
|
|
1146
|
+
style: { width: "24px", height: "24px" },
|
|
1147
|
+
onClick: (ee) => M(f)
|
|
1148
|
+
}, null, 8, ["onClick"])
|
|
1149
|
+
])
|
|
1150
|
+
])
|
|
1151
|
+
]))), 128))
|
|
1152
|
+
]),
|
|
1153
|
+
u("div", ba, [
|
|
1154
|
+
c[6] || (c[6] = u("div", null, Y("表外按钮"), -1)),
|
|
1155
|
+
u("div", {
|
|
1156
|
+
class: "icon-content",
|
|
1157
|
+
onClick: Q
|
|
1158
|
+
}, [
|
|
1159
|
+
z(g, {
|
|
1160
|
+
name: "Plus",
|
|
1161
|
+
class: "icon-size"
|
|
1162
|
+
}),
|
|
1163
|
+
c[5] || (c[5] = u("div", null, Y("新增"), -1))
|
|
1164
|
+
])
|
|
1165
|
+
]),
|
|
1166
|
+
u("div", Ca, [
|
|
1167
|
+
(A(!0), J(fe, null, he(S.value, (f, H) => (A(), J("div", { key: H }, [
|
|
1168
|
+
u("div", ga, [
|
|
1169
|
+
u("div", ka, Y(f == null ? void 0 : f.label), 1),
|
|
1170
|
+
u("div", _a, [
|
|
1171
|
+
z(g, {
|
|
1172
|
+
name: "ChildFix",
|
|
1173
|
+
style: { width: "24px", height: "24px" },
|
|
1174
|
+
class: "svg-icon-content",
|
|
1175
|
+
onClick: (ee) => j(f)
|
|
1176
|
+
}, null, 8, ["onClick"]),
|
|
1177
|
+
z(g, {
|
|
1178
|
+
name: "ChildDelete",
|
|
1179
|
+
class: "svg-icon-content",
|
|
1180
|
+
style: { width: "24px", height: "24px" },
|
|
1181
|
+
onClick: (ee) => se(f)
|
|
1182
|
+
}, null, 8, ["onClick"])
|
|
1183
|
+
])
|
|
1184
|
+
])
|
|
1185
|
+
]))), 128))
|
|
1186
|
+
]),
|
|
1187
|
+
u("div", wa, [
|
|
1188
|
+
c[8] || (c[8] = u("div", null, Y("表格弹框字段设置"), -1)),
|
|
1189
|
+
u("div", {
|
|
1190
|
+
class: "icon-content",
|
|
1191
|
+
onClick: de
|
|
1192
|
+
}, [
|
|
1193
|
+
z(g, {
|
|
1194
|
+
name: "Plus",
|
|
1195
|
+
class: "icon-size"
|
|
1196
|
+
}),
|
|
1197
|
+
c[7] || (c[7] = u("div", null, Y("新增"), -1))
|
|
1198
|
+
])
|
|
1199
|
+
]),
|
|
1200
|
+
u("div", xa, [
|
|
1201
|
+
(A(!0), J(fe, null, he(W.value, (f, H) => (A(), J("div", { key: H }, [
|
|
1202
|
+
u("div", Da, [
|
|
1203
|
+
u("div", Ia, Y(f == null ? void 0 : f.label), 1),
|
|
1204
|
+
u("div", $a, [
|
|
1205
|
+
z(g, {
|
|
1206
|
+
name: "ChildFix",
|
|
1207
|
+
style: { width: "24px", height: "24px" },
|
|
1208
|
+
class: "svg-icon-content",
|
|
1209
|
+
onClick: (ee) => a(f)
|
|
1210
|
+
}, null, 8, ["onClick"]),
|
|
1211
|
+
z(g, {
|
|
1212
|
+
name: "ChildDelete",
|
|
1213
|
+
class: "svg-icon-content",
|
|
1214
|
+
style: { width: "24px", height: "24px" },
|
|
1215
|
+
onClick: (ee) => k(f)
|
|
1216
|
+
}, null, 8, ["onClick"])
|
|
1217
|
+
])
|
|
1218
|
+
])
|
|
1219
|
+
]))), 128))
|
|
1220
|
+
]),
|
|
1221
|
+
c[10] || (c[10] = u("div", { class: "operate-title" }, [
|
|
1222
|
+
u("div", null, Y("分页"))
|
|
1223
|
+
], -1)),
|
|
1224
|
+
u("div", Ta, [
|
|
1225
|
+
u("div", Ea, [
|
|
1226
|
+
c[9] || (c[9] = u("div", { class: "operate-center-content" }, Y("是否分页"), -1)),
|
|
1227
|
+
z(dl, {
|
|
1228
|
+
modelValue: x.value,
|
|
1229
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => x.value = f)
|
|
1230
|
+
}, null, 8, ["modelValue"])
|
|
1231
|
+
])
|
|
1232
|
+
])
|
|
1233
|
+
]),
|
|
1234
|
+
z(De, {
|
|
1235
|
+
visible: D.value,
|
|
1236
|
+
onBeforeDestroy: ze,
|
|
1237
|
+
width: 840
|
|
1238
|
+
}, {
|
|
1239
|
+
default: ne(() => [
|
|
1240
|
+
u("div", Ba, [
|
|
1241
|
+
(A(), ye(xe, {
|
|
1242
|
+
rowContents: I.value,
|
|
1243
|
+
key: I.value,
|
|
1244
|
+
isEnableWrap: !0,
|
|
1245
|
+
onChange: ce
|
|
1246
|
+
}, null, 8, ["rowContents"]))
|
|
1247
|
+
])
|
|
1248
|
+
]),
|
|
1249
|
+
footer: ne(() => [
|
|
1250
|
+
u("div", { class: "dialog-footer" }, [
|
|
1251
|
+
u("div", {
|
|
1252
|
+
onClick: ze,
|
|
1253
|
+
class: "cancel-button button"
|
|
1254
|
+
}, Y("取消")),
|
|
1255
|
+
u("div", {
|
|
1256
|
+
class: "ok-button button",
|
|
1257
|
+
onClick: Me
|
|
1258
|
+
}, Y("确认"))
|
|
1259
|
+
])
|
|
1260
|
+
]),
|
|
1261
|
+
_: 1
|
|
1262
|
+
}, 8, ["visible"]),
|
|
1263
|
+
z(De, {
|
|
1264
|
+
visible: E.value,
|
|
1265
|
+
onBeforeDestroy: F,
|
|
1266
|
+
width: 840
|
|
1267
|
+
}, {
|
|
1268
|
+
default: ne(() => [
|
|
1269
|
+
u("div", Fa, [
|
|
1270
|
+
(A(), ye(xe, {
|
|
1271
|
+
rowContents: d.value,
|
|
1272
|
+
key: d.value,
|
|
1273
|
+
isEnableWrap: !0,
|
|
1274
|
+
onChange: V
|
|
1275
|
+
}, null, 8, ["rowContents"]))
|
|
1276
|
+
])
|
|
1277
|
+
]),
|
|
1278
|
+
footer: ne(() => [
|
|
1279
|
+
u("div", { class: "dialog-footer" }, [
|
|
1280
|
+
u("div", {
|
|
1281
|
+
onClick: F,
|
|
1282
|
+
class: "cancel-button button"
|
|
1283
|
+
}, Y("取消")),
|
|
1284
|
+
u("div", {
|
|
1285
|
+
class: "ok-button button",
|
|
1286
|
+
onClick: q
|
|
1287
|
+
}, Y("确认"))
|
|
1288
|
+
])
|
|
1289
|
+
]),
|
|
1290
|
+
_: 1
|
|
1291
|
+
}, 8, ["visible"]),
|
|
1292
|
+
z(De, {
|
|
1293
|
+
visible: P.value,
|
|
1294
|
+
onBeforeDestroy: r,
|
|
1295
|
+
width: 840
|
|
1296
|
+
}, {
|
|
1297
|
+
default: ne(() => [
|
|
1298
|
+
u("div", Aa, [
|
|
1299
|
+
(A(), ye(xe, {
|
|
1300
|
+
rowContents: n.value,
|
|
1301
|
+
key: n.value,
|
|
1302
|
+
isEnableWrap: !0,
|
|
1303
|
+
onChange: b
|
|
1304
|
+
}, null, 8, ["rowContents"]))
|
|
1305
|
+
])
|
|
1306
|
+
]),
|
|
1307
|
+
footer: ne(() => [
|
|
1308
|
+
u("div", { class: "dialog-footer" }, [
|
|
1309
|
+
u("div", {
|
|
1310
|
+
onClick: r,
|
|
1311
|
+
class: "cancel-button button"
|
|
1312
|
+
}, Y("取消")),
|
|
1313
|
+
u("div", {
|
|
1314
|
+
class: "ok-button button",
|
|
1315
|
+
onClick: te
|
|
1316
|
+
}, Y("确认"))
|
|
1317
|
+
])
|
|
1318
|
+
]),
|
|
1319
|
+
_: 1
|
|
1320
|
+
}, 8, ["visible"]),
|
|
1321
|
+
z(De, {
|
|
1322
|
+
visible: N.value,
|
|
1323
|
+
onBeforeDestroy: U,
|
|
1324
|
+
width: 840
|
|
1325
|
+
}, {
|
|
1326
|
+
default: ne(() => [
|
|
1327
|
+
u("div", La, [
|
|
1328
|
+
(A(), ye(xe, {
|
|
1329
|
+
rowContents: s.value,
|
|
1330
|
+
key: s.value,
|
|
1331
|
+
isEnableWrap: !0,
|
|
1332
|
+
onChange: re
|
|
1333
|
+
}, null, 8, ["rowContents"]))
|
|
1334
|
+
])
|
|
1335
|
+
]),
|
|
1336
|
+
footer: ne(() => [
|
|
1337
|
+
u("div", { class: "dialog-footer" }, [
|
|
1338
|
+
u("div", {
|
|
1339
|
+
onClick: U,
|
|
1340
|
+
class: "cancel-button button"
|
|
1341
|
+
}, Y("取消")),
|
|
1342
|
+
u("div", {
|
|
1343
|
+
class: "ok-button button",
|
|
1344
|
+
onClick: _
|
|
1345
|
+
}, Y("确认"))
|
|
1346
|
+
])
|
|
1347
|
+
]),
|
|
1348
|
+
_: 1
|
|
1349
|
+
}, 8, ["visible"])
|
|
1350
|
+
]);
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
}, Va = /* @__PURE__ */ Ce(Sa, [["__scopeId", "data-v-6a6da0be"]]), Oa = { class: "form-operate-content" }, Ra = { class: "form-operate-item" }, Na = { class: "operate-title" }, Pa = { class: "operate-content" }, Wa = { class: "fix-content" }, Ua = { class: "fix-button" }, za = { class: "operate-title" }, ja = { class: "operate-content" }, Ma = { class: "fix-content" }, Ka = { class: "fix-button" }, Ja = { style: { display: "flex", "justify-content": "space-between" } }, Ga = { class: "form-content" }, qa = { class: "form-content" }, Ha = {
|
|
1354
|
+
__name: "operate",
|
|
1355
|
+
props: {
|
|
1356
|
+
itemContents: {
|
|
1357
|
+
type: Array,
|
|
1358
|
+
default: () => []
|
|
1359
|
+
},
|
|
1360
|
+
originalItemContents: {
|
|
1361
|
+
type: Array,
|
|
1362
|
+
default: () => []
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
emits: ["change"],
|
|
1366
|
+
setup(C, { emit: L }) {
|
|
1367
|
+
const v = C, l = L, y = B(!1), D = B([]), N = B([]), m = B(!1), E = B([]), I = B([]), x = B(""), G = B(!1), O = B(0), R = B([]), T = B([]), S = async (a) => {
|
|
1368
|
+
var _, j, se, te, b, r;
|
|
1369
|
+
y.value = !0;
|
|
1370
|
+
let k = [];
|
|
1371
|
+
const U = await ((se = (j = (_ = ge) == null ? void 0 : _.find((p) => (p == null ? void 0 : p.key) === ((a == null ? void 0 : a.type) === "" ? "Input" : a == null ? void 0 : a.type))) == null ? void 0 : j.value) == null ? void 0 : se.value) ?? ((b = (te = ge) == null ? void 0 : te.find((p) => (p == null ? void 0 : p.key) === ((a == null ? void 0 : a.type) === "" ? "Input" : a == null ? void 0 : a.type))) == null ? void 0 : b.value);
|
|
1372
|
+
if (U == null || U.forEach((p) => {
|
|
1373
|
+
O.value++, k.push({
|
|
1374
|
+
label: p == null ? void 0 : p.label,
|
|
1375
|
+
name: p == null ? void 0 : p.label,
|
|
1376
|
+
type: p.type,
|
|
1377
|
+
value: (p == null ? void 0 : p.label) === "类型" && a[p.key] === "" ? "Input" : a[p.key],
|
|
1378
|
+
id: O.value,
|
|
1379
|
+
contents: p == null ? void 0 : p.options
|
|
1380
|
+
});
|
|
1381
|
+
}), a != null && a.menuSelect && ((r = a == null ? void 0 : a.menuSelect) == null ? void 0 : r.length) > 0) {
|
|
1382
|
+
const p = await Ye(a == null ? void 0 : a.menuSelect);
|
|
1383
|
+
k = k == null ? void 0 : k.map((M) => ((M == null ? void 0 : M.name) === "组信息选项" && (M.contents = p), M));
|
|
1384
|
+
}
|
|
1385
|
+
x.value = a == null ? void 0 : a.id, D.value = await Je(qe(k)), N.value = await Je(qe(k));
|
|
1386
|
+
}, d = (a) => {
|
|
1387
|
+
var U;
|
|
1388
|
+
m.value = !0;
|
|
1389
|
+
let k = [];
|
|
1390
|
+
(U = Ze) == null || U.forEach((_) => {
|
|
1391
|
+
O.value++, k.push({
|
|
1392
|
+
label: _ == null ? void 0 : _.label,
|
|
1393
|
+
name: _ == null ? void 0 : _.label,
|
|
1394
|
+
type: _.type,
|
|
1395
|
+
value: (_ == null ? void 0 : _.label) === "类型" && a[_.key] === "" ? "normal" : a[_.key],
|
|
1396
|
+
id: O.value,
|
|
1397
|
+
contents: _ == null ? void 0 : _.options
|
|
1398
|
+
});
|
|
1399
|
+
}), R.value = k, T.value = k, x.value = a == null ? void 0 : a.id;
|
|
1400
|
+
};
|
|
1401
|
+
ke(
|
|
1402
|
+
() => G.value,
|
|
1403
|
+
() => {
|
|
1404
|
+
var k, U;
|
|
1405
|
+
let a = h(v.originalItemContents);
|
|
1406
|
+
(k = h(v.originalItemContents)) != null && k.find((_) => (_ == null ? void 0 : _.key) === "enableWrap") ? a = (U = h(v.originalItemContents)) == null ? void 0 : U.map((_) => ((_ == null ? void 0 : _.key) === "enableWrap" && (_.contents = !G.value), _)) : a.push({
|
|
1407
|
+
key: "enableWrap",
|
|
1408
|
+
contents: !G.value
|
|
1409
|
+
}), l("change", a);
|
|
1410
|
+
},
|
|
1411
|
+
{ deep: !0 }
|
|
1412
|
+
);
|
|
1413
|
+
const t = () => {
|
|
1414
|
+
var U, _, j, se, te;
|
|
1415
|
+
R.value = T.value;
|
|
1416
|
+
let a = {};
|
|
1417
|
+
if (x.value !== "" ? a.id = x.value : (O.value++, a.id = "id" + O.value), (U = R.value) == null || U.forEach((b) => {
|
|
1418
|
+
var p;
|
|
1419
|
+
const r = (p = Ze) == null ? void 0 : p.find((M) => (M == null ? void 0 : M.label) === (b == null ? void 0 : b.label));
|
|
1420
|
+
r && (a[r.key] = b.value);
|
|
1421
|
+
}), (_ = E.value) != null && _.find((b) => b.id === a.id))
|
|
1422
|
+
E.value = (j = E.value) == null ? void 0 : j.map((b) => (b.id === a.id && (b = a), b));
|
|
1423
|
+
else {
|
|
1424
|
+
let b = h(E.value);
|
|
1425
|
+
E.value || (E.value = []), b.push(a), E.value = b;
|
|
1426
|
+
}
|
|
1427
|
+
m.value = !1, x.value = "";
|
|
1428
|
+
let k = h(v.originalItemContents);
|
|
1429
|
+
(se = h(v.originalItemContents)) != null && se.find((b) => (b == null ? void 0 : b.key) === "formButton") ? k = (te = h(v.originalItemContents)) == null ? void 0 : te.map((b) => ((b == null ? void 0 : b.key) === "formButton" && (b.contents = E.value), b)) : k.push({
|
|
1430
|
+
key: "formButton",
|
|
1431
|
+
contents: E.value
|
|
1432
|
+
}), l("change", k);
|
|
1433
|
+
}, P = (a) => {
|
|
1434
|
+
Ne.confirm("是否确认要删除", "", {
|
|
1435
|
+
confirmButtonText: "确认",
|
|
1436
|
+
cancelButtonText: "取消",
|
|
1437
|
+
type: "warning"
|
|
1438
|
+
}).then(
|
|
1439
|
+
() => {
|
|
1440
|
+
var k, U;
|
|
1441
|
+
I.value = (k = h(I.value)) == null ? void 0 : k.filter((_) => (_ == null ? void 0 : _.id) !== (a == null ? void 0 : a.id)), l("change", (U = h(v.originalItemContents)) == null ? void 0 : U.map((_) => ((_ == null ? void 0 : _.key) === "formContent" && (_.contents = I.value), _))), Re({
|
|
1442
|
+
type: "success",
|
|
1443
|
+
message: "删除成功"
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
).catch(() => {
|
|
1447
|
+
});
|
|
1448
|
+
}, n = (a) => {
|
|
1449
|
+
Ne.confirm("是否确认要删除", "", {
|
|
1450
|
+
confirmButtonText: "确认",
|
|
1451
|
+
cancelButtonText: "取消",
|
|
1452
|
+
type: "warning"
|
|
1453
|
+
}).then(
|
|
1454
|
+
() => {
|
|
1455
|
+
var k, U;
|
|
1456
|
+
E.value = (k = h(E.value)) == null ? void 0 : k.filter((_) => (_ == null ? void 0 : _.id) !== (a == null ? void 0 : a.id)), l("change", (U = h(v.originalItemContents)) == null ? void 0 : U.map((_) => ((_ == null ? void 0 : _.key) === "formButton" && (_.contents = E.value), _))), Re({
|
|
1457
|
+
type: "success",
|
|
1458
|
+
message: "删除成功"
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
).catch(() => {
|
|
1462
|
+
});
|
|
1463
|
+
}, i = () => {
|
|
1464
|
+
var k;
|
|
1465
|
+
m.value = !0;
|
|
1466
|
+
let a = [];
|
|
1467
|
+
(k = Ze) == null || k.forEach((U) => {
|
|
1468
|
+
O.value++, a.push({
|
|
1469
|
+
label: U == null ? void 0 : U.label,
|
|
1470
|
+
name: U == null ? void 0 : U.label,
|
|
1471
|
+
type: U.type,
|
|
1472
|
+
value: (U == null ? void 0 : U.label) === "类型" ? "normal" : "",
|
|
1473
|
+
id: O.value,
|
|
1474
|
+
contents: U == null ? void 0 : U.options
|
|
1475
|
+
});
|
|
1476
|
+
}), R.value = a, T.value = a;
|
|
1477
|
+
}, e = () => {
|
|
1478
|
+
var k, U, _;
|
|
1479
|
+
y.value = !0;
|
|
1480
|
+
let a = [];
|
|
1481
|
+
(_ = (U = (k = ge) == null ? void 0 : k.find((j) => (j == null ? void 0 : j.key) === "Input")) == null ? void 0 : U.value) == null || _.forEach((j) => {
|
|
1482
|
+
O.value++, a.push({
|
|
1483
|
+
label: j == null ? void 0 : j.label,
|
|
1484
|
+
name: j == null ? void 0 : j.label,
|
|
1485
|
+
type: j.type,
|
|
1486
|
+
value: (j == null ? void 0 : j.label) === "类型" ? "Input" : "",
|
|
1487
|
+
id: O.value,
|
|
1488
|
+
contents: j == null ? void 0 : j.options
|
|
1489
|
+
});
|
|
1490
|
+
}), D.value = a, N.value = a;
|
|
1491
|
+
}, s = (a) => {
|
|
1492
|
+
let k = h(T.value);
|
|
1493
|
+
k = k == null ? void 0 : k.map((U) => (U.value = a == null ? void 0 : a[U.name], U)), T.value = k;
|
|
1494
|
+
}, w = async (a) => {
|
|
1495
|
+
var k, U, _, j, se, te, b, r, p, M, ae, ue;
|
|
1496
|
+
if ((a == null ? void 0 : a.类型) !== ((U = (k = N.value) == null ? void 0 : k.find((V) => (V == null ? void 0 : V.label) === "类型")) == null ? void 0 : U.value)) {
|
|
1497
|
+
let V = [];
|
|
1498
|
+
const q = await ((se = (j = (_ = ge) == null ? void 0 : _.find((F) => (F == null ? void 0 : F.key) === ((a == null ? void 0 : a.类型) === "" ? "Input" : a == null ? void 0 : a.类型))) == null ? void 0 : j.value) == null ? void 0 : se.value) ? await ((M = (p = (r = ge) == null ? void 0 : r.find((F) => (F == null ? void 0 : F.key) === ((a == null ? void 0 : a.类型) === "" ? "Input" : a == null ? void 0 : a.类型))) == null ? void 0 : p.value) == null ? void 0 : M.value) : (b = (te = ge) == null ? void 0 : te.find((F) => (F == null ? void 0 : F.key) === ((a == null ? void 0 : a.类型) === "" ? "Input" : a == null ? void 0 : a.类型))) == null ? void 0 : b.value;
|
|
1499
|
+
if (q == null || q.forEach((F) => {
|
|
1500
|
+
O.value++, V.push({
|
|
1501
|
+
label: F == null ? void 0 : F.label,
|
|
1502
|
+
name: F == null ? void 0 : F.label,
|
|
1503
|
+
type: F.type,
|
|
1504
|
+
value: (a == null ? void 0 : a[F.label]) ?? "",
|
|
1505
|
+
id: O.value,
|
|
1506
|
+
contents: F == null ? void 0 : F.options
|
|
1507
|
+
});
|
|
1508
|
+
}), a != null && a.菜单选项 && ((ae = a == null ? void 0 : a.菜单选项) == null ? void 0 : ae.length) > 0) {
|
|
1509
|
+
const F = await Ye(a == null ? void 0 : a.菜单选项);
|
|
1510
|
+
V = V == null ? void 0 : V.map((oe) => ((oe == null ? void 0 : oe.name) === "组信息选项" && (oe.contents = F), oe));
|
|
1511
|
+
}
|
|
1512
|
+
N.value = await Je(h(V)), D.value = await Je(h(V));
|
|
1513
|
+
} else {
|
|
1514
|
+
let V = h(N.value);
|
|
1515
|
+
if (V = V == null ? void 0 : V.map((q) => (q.value = a == null ? void 0 : a[q.name], q)), a != null && a.菜单选项 && ((ue = a == null ? void 0 : a.菜单选项) == null ? void 0 : ue.length) > 0) {
|
|
1516
|
+
const q = await Ye(a == null ? void 0 : a.菜单选项);
|
|
1517
|
+
V = V == null ? void 0 : V.map((F) => ((F == null ? void 0 : F.name) === "组信息选项" && (F.contents = q), F));
|
|
1518
|
+
}
|
|
1519
|
+
V = qe(V), N.value = await Je(h(V));
|
|
1520
|
+
}
|
|
1521
|
+
}, W = (a) => {
|
|
1522
|
+
a || (D.value = N.value);
|
|
1523
|
+
}, Q = async (a) => {
|
|
1524
|
+
await w(a), D.value = N.value;
|
|
1525
|
+
}, de = async () => {
|
|
1526
|
+
var _, j, se, te, b, r, p, M, ae, ue;
|
|
1527
|
+
D.value = N.value;
|
|
1528
|
+
let a = {};
|
|
1529
|
+
x.value !== "" ? a.id = x.value : (O.value++, a.id = "id" + O.value);
|
|
1530
|
+
let k = await ((se = (j = (_ = ge) == null ? void 0 : _.find((V) => {
|
|
1531
|
+
var q, F;
|
|
1532
|
+
return (V == null ? void 0 : V.key) === (((F = (q = D.value) == null ? void 0 : q.find((oe) => (oe == null ? void 0 : oe.label) === "类型")) == null ? void 0 : F.value) ?? "label");
|
|
1533
|
+
})) == null ? void 0 : j.value) == null ? void 0 : se.value) ?? ((b = (te = ge) == null ? void 0 : te.find((V) => {
|
|
1534
|
+
var q, F;
|
|
1535
|
+
return (V == null ? void 0 : V.key) === (((F = (q = D.value) == null ? void 0 : q.find((oe) => (oe == null ? void 0 : oe.label) === "类型")) == null ? void 0 : F.value) ?? "label");
|
|
1536
|
+
})) == null ? void 0 : b.value);
|
|
1537
|
+
if ((r = D.value) == null || r.forEach((V) => {
|
|
1538
|
+
const q = k == null ? void 0 : k.find((F) => (F == null ? void 0 : F.label) === (V == null ? void 0 : V.label));
|
|
1539
|
+
q && (a[q.key] = V.value);
|
|
1540
|
+
}), a.width = 1, a.key = a == null ? void 0 : a.label, (p = I.value) != null && p.find((V) => V.id === a.id))
|
|
1541
|
+
I.value = (M = I.value) == null ? void 0 : M.map((V) => (V.id === a.id && (V = a), V));
|
|
1542
|
+
else {
|
|
1543
|
+
let V = h(I.value);
|
|
1544
|
+
V.push(a), I.value = V;
|
|
1545
|
+
}
|
|
1546
|
+
I.value = I.value.map(({ id: V, ...q }) => q), y.value = !1, x.value = "";
|
|
1547
|
+
let U = h(v.originalItemContents);
|
|
1548
|
+
(ae = h(v.originalItemContents)) != null && ae.find((V) => (V == null ? void 0 : V.key) === "formContent") ? U = (ue = h(v.originalItemContents)) == null ? void 0 : ue.map((V) => ((V == null ? void 0 : V.key) === "formContent" && (V.contents = I.value), V)) : U.push({
|
|
1549
|
+
key: "formContent",
|
|
1550
|
+
contents: I.value
|
|
1551
|
+
}), l("change", U);
|
|
1552
|
+
}, re = () => {
|
|
1553
|
+
y.value = !1, m.value = !1, x.value = "", N.value = [], T.value = [];
|
|
1554
|
+
};
|
|
1555
|
+
return ke(
|
|
1556
|
+
() => v.originalItemContents,
|
|
1557
|
+
() => {
|
|
1558
|
+
var k, U, _, j, se, te;
|
|
1559
|
+
if (!v.originalItemContents || v.originalItemContents.length === 0) return;
|
|
1560
|
+
const a = h(v.originalItemContents);
|
|
1561
|
+
I.value = ((k = a == null ? void 0 : a.find((b) => (b == null ? void 0 : b.key) === "formContent")) == null ? void 0 : k.contents) ?? [], E.value = ((U = a == null ? void 0 : a.find((b) => (b == null ? void 0 : b.key) === "formButton")) == null ? void 0 : U.contents) ?? [], G.value = (_ = a == null ? void 0 : a.find((b) => (b == null ? void 0 : b.key) === "enableWrap")) != null && _.contents ? !((j = a == null ? void 0 : a.find((b) => (b == null ? void 0 : b.key) === "enableWrap")) != null && j.contents) : !0, I.value = (se = h(I.value)) == null ? void 0 : se.map((b, r) => {
|
|
1562
|
+
var M;
|
|
1563
|
+
let p = b;
|
|
1564
|
+
return p.id = (b == null ? void 0 : b.id) ?? r, b != null && b.label || (b.label = (b == null ? void 0 : b.key) ?? (b == null ? void 0 : b.label) ?? ""), b != null && b.type || (b.type = (b == null ? void 0 : b.type) ?? ""), b.contents = ((M = b == null ? void 0 : b.options) == null ? void 0 : M.length) === 0 ? (b == null ? void 0 : b.contents) ?? "" : b == null ? void 0 : b.options, p;
|
|
1565
|
+
}), I.value = qe(I.value), E.value = (te = E.value) == null ? void 0 : te.map((b, r) => b = {
|
|
1566
|
+
label: (b == null ? void 0 : b.label) ?? "",
|
|
1567
|
+
type: (b == null ? void 0 : b.type) ?? "",
|
|
1568
|
+
background: (b == null ? void 0 : b.background) ?? "var(--ssComponent-primary-color)",
|
|
1569
|
+
id: r
|
|
1570
|
+
});
|
|
1571
|
+
},
|
|
1572
|
+
{ deep: !0, immediate: !0 }
|
|
1573
|
+
), (a, k) => {
|
|
1574
|
+
const U = me("svg-icon");
|
|
1575
|
+
return A(), J("div", Oa, [
|
|
1576
|
+
u("div", Ra, [
|
|
1577
|
+
u("div", Na, [
|
|
1578
|
+
k[2] || (k[2] = u("div", null, Y("表单内容"), -1)),
|
|
1579
|
+
u("div", {
|
|
1580
|
+
class: "icon-content",
|
|
1581
|
+
onClick: e
|
|
1582
|
+
}, [
|
|
1583
|
+
z(U, {
|
|
1584
|
+
name: "Plus",
|
|
1585
|
+
class: "icon-size"
|
|
1586
|
+
}),
|
|
1587
|
+
k[1] || (k[1] = u("div", null, Y("新增"), -1))
|
|
1588
|
+
])
|
|
1589
|
+
]),
|
|
1590
|
+
u("div", Pa, [
|
|
1591
|
+
(A(!0), J(fe, null, he(I.value, (_, j) => (A(), J("div", { key: j }, [
|
|
1592
|
+
u("div", Wa, [
|
|
1593
|
+
u("div", null, Y(_.label), 1),
|
|
1594
|
+
u("div", Ua, [
|
|
1595
|
+
z(U, {
|
|
1596
|
+
name: "ChildFix",
|
|
1597
|
+
class: "svg-icon-content",
|
|
1598
|
+
style: { width: "24px", height: "24px" },
|
|
1599
|
+
onClick: (se) => S(_)
|
|
1600
|
+
}, null, 8, ["onClick"]),
|
|
1601
|
+
z(U, {
|
|
1602
|
+
name: "ChildDelete",
|
|
1603
|
+
class: "svg-icon-content",
|
|
1604
|
+
style: { width: "24px", height: "24px" },
|
|
1605
|
+
onClick: (se) => P(_)
|
|
1606
|
+
}, null, 8, ["onClick"])
|
|
1607
|
+
])
|
|
1608
|
+
])
|
|
1609
|
+
]))), 128))
|
|
1610
|
+
]),
|
|
1611
|
+
u("div", za, [
|
|
1612
|
+
k[4] || (k[4] = u("div", null, Y("表单按钮"), -1)),
|
|
1613
|
+
u("div", {
|
|
1614
|
+
class: "icon-content",
|
|
1615
|
+
onClick: i
|
|
1616
|
+
}, [
|
|
1617
|
+
z(U, {
|
|
1618
|
+
name: "Plus",
|
|
1619
|
+
class: "icon-size"
|
|
1620
|
+
}),
|
|
1621
|
+
k[3] || (k[3] = u("div", null, Y("新增"), -1))
|
|
1622
|
+
])
|
|
1623
|
+
]),
|
|
1624
|
+
u("div", ja, [
|
|
1625
|
+
(A(!0), J(fe, null, he(E.value, (_, j) => (A(), J("div", { key: j }, [
|
|
1626
|
+
u("div", Ma, [
|
|
1627
|
+
u("div", null, Y(_.label), 1),
|
|
1628
|
+
u("div", Ka, [
|
|
1629
|
+
z(U, {
|
|
1630
|
+
name: "ChildFix",
|
|
1631
|
+
class: "svg-icon-content",
|
|
1632
|
+
style: { width: "24px", height: "24px" },
|
|
1633
|
+
onClick: (se) => d(_)
|
|
1634
|
+
}, null, 8, ["onClick"]),
|
|
1635
|
+
z(U, {
|
|
1636
|
+
name: "ChildDelete",
|
|
1637
|
+
class: "svg-icon-content",
|
|
1638
|
+
style: { width: "24px", height: "24px" },
|
|
1639
|
+
onClick: (se) => n(_)
|
|
1640
|
+
}, null, 8, ["onClick"])
|
|
1641
|
+
])
|
|
1642
|
+
])
|
|
1643
|
+
]))), 128))
|
|
1644
|
+
]),
|
|
1645
|
+
k[6] || (k[6] = u("div", { class: "operate-title" }, [
|
|
1646
|
+
u("div", null, Y("表单布局"))
|
|
1647
|
+
], -1)),
|
|
1648
|
+
u("div", Ja, [
|
|
1649
|
+
k[5] || (k[5] = u("div", { class: "operate-center-content" }, Y("是否自动撑宽"), -1)),
|
|
1650
|
+
z(dl, {
|
|
1651
|
+
modelValue: G.value,
|
|
1652
|
+
"onUpdate:modelValue": k[0] || (k[0] = (_) => G.value = _)
|
|
1653
|
+
}, null, 8, ["modelValue"])
|
|
1654
|
+
])
|
|
1655
|
+
]),
|
|
1656
|
+
z(De, {
|
|
1657
|
+
visible: y.value,
|
|
1658
|
+
onBeforeDestroy: re,
|
|
1659
|
+
width: 840
|
|
1660
|
+
}, {
|
|
1661
|
+
default: ne(() => [
|
|
1662
|
+
u("div", Ga, [
|
|
1663
|
+
(A(), ye(xe, {
|
|
1664
|
+
rowContents: D.value,
|
|
1665
|
+
key: D.value,
|
|
1666
|
+
isEnableWrap: !0,
|
|
1667
|
+
onChange: w,
|
|
1668
|
+
onChangeVisible: W,
|
|
1669
|
+
onBlurChange: Q
|
|
1670
|
+
}, null, 8, ["rowContents"]))
|
|
1671
|
+
])
|
|
1672
|
+
]),
|
|
1673
|
+
footer: ne(() => [
|
|
1674
|
+
u("div", { class: "dialog-footer" }, [
|
|
1675
|
+
u("div", {
|
|
1676
|
+
onClick: re,
|
|
1677
|
+
class: "cancel-button button"
|
|
1678
|
+
}, Y("取消")),
|
|
1679
|
+
u("div", {
|
|
1680
|
+
class: "ok-button button",
|
|
1681
|
+
onClick: de
|
|
1682
|
+
}, Y("确认"))
|
|
1683
|
+
])
|
|
1684
|
+
]),
|
|
1685
|
+
_: 1
|
|
1686
|
+
}, 8, ["visible"]),
|
|
1687
|
+
z(De, {
|
|
1688
|
+
visible: m.value,
|
|
1689
|
+
onBeforeDestroy: re,
|
|
1690
|
+
width: 840
|
|
1691
|
+
}, {
|
|
1692
|
+
default: ne(() => [
|
|
1693
|
+
u("div", qa, [
|
|
1694
|
+
(A(), ye(xe, {
|
|
1695
|
+
rowContents: R.value,
|
|
1696
|
+
key: R.value,
|
|
1697
|
+
isEnableWrap: !0,
|
|
1698
|
+
onChange: s
|
|
1699
|
+
}, null, 8, ["rowContents"]))
|
|
1700
|
+
])
|
|
1701
|
+
]),
|
|
1702
|
+
footer: ne(() => [
|
|
1703
|
+
u("div", { class: "dialog-footer" }, [
|
|
1704
|
+
u("div", {
|
|
1705
|
+
onClick: re,
|
|
1706
|
+
class: "cancel-button button"
|
|
1707
|
+
}, Y("取消")),
|
|
1708
|
+
u("div", {
|
|
1709
|
+
class: "ok-button button",
|
|
1710
|
+
onClick: t
|
|
1711
|
+
}, Y("确认"))
|
|
1712
|
+
])
|
|
1713
|
+
]),
|
|
1714
|
+
_: 1
|
|
1715
|
+
}, 8, ["visible"])
|
|
1716
|
+
]);
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
}, tl = /* @__PURE__ */ Ce(Ha, [["__scopeId", "data-v-773c09d5"]]), Qa = { class: "step-module content" }, Xa = { class: "module-data" }, Ya = { class: "step-module layout" }, Za = { class: "form-content" }, en = /* @__PURE__ */ je({
|
|
1720
|
+
__name: "operate",
|
|
1721
|
+
props: {
|
|
1722
|
+
itemContents: {
|
|
1723
|
+
type: Array,
|
|
1724
|
+
default: () => []
|
|
1725
|
+
},
|
|
1726
|
+
originalItemContents: {
|
|
1727
|
+
type: Array,
|
|
1728
|
+
default: () => []
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
emits: ["change"],
|
|
1732
|
+
setup(C, { emit: L }) {
|
|
1733
|
+
const v = C, l = L, y = B([
|
|
1734
|
+
{
|
|
1735
|
+
label: "方向:",
|
|
1736
|
+
prop: "direction",
|
|
1737
|
+
type: "RADIO",
|
|
1738
|
+
contents: [
|
|
1739
|
+
{
|
|
1740
|
+
label: "水平",
|
|
1741
|
+
value: "horizontal"
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
label: "垂直",
|
|
1745
|
+
value: "vertical"
|
|
1746
|
+
}
|
|
1747
|
+
],
|
|
1748
|
+
value: "horizontal"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
label: "是否居中:",
|
|
1752
|
+
prop: "alignCenter",
|
|
1753
|
+
type: "RADIO",
|
|
1754
|
+
contents: [
|
|
1755
|
+
{
|
|
1756
|
+
label: "是",
|
|
1757
|
+
value: !0
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
label: "否",
|
|
1761
|
+
value: !1
|
|
1762
|
+
}
|
|
1763
|
+
],
|
|
1764
|
+
value: !0
|
|
1765
|
+
},
|
|
1766
|
+
// {
|
|
1767
|
+
// label: '是否交互',
|
|
1768
|
+
// prop: 'allowTrigger',
|
|
1769
|
+
// type: 'RADIO',
|
|
1770
|
+
// contents: [
|
|
1771
|
+
// {
|
|
1772
|
+
// label: '是',
|
|
1773
|
+
// value: true,
|
|
1774
|
+
// }, {
|
|
1775
|
+
// label: '否',
|
|
1776
|
+
// value: false,
|
|
1777
|
+
// },
|
|
1778
|
+
// ],
|
|
1779
|
+
// value: 'horizontal'
|
|
1780
|
+
// },
|
|
1781
|
+
{
|
|
1782
|
+
label: "应用简洁风格",
|
|
1783
|
+
prop: "simple",
|
|
1784
|
+
type: "RADIO",
|
|
1785
|
+
contents: [
|
|
1786
|
+
{
|
|
1787
|
+
label: "是",
|
|
1788
|
+
value: !0
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
label: "否",
|
|
1792
|
+
value: !1
|
|
1793
|
+
}
|
|
1794
|
+
],
|
|
1795
|
+
value: !1
|
|
1796
|
+
}
|
|
1797
|
+
]), D = B([
|
|
1798
|
+
{
|
|
1799
|
+
label: "",
|
|
1800
|
+
prop: "index",
|
|
1801
|
+
type: "input",
|
|
1802
|
+
value: "",
|
|
1803
|
+
isFormColHidden: !0
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
label: "标题",
|
|
1807
|
+
prop: "title",
|
|
1808
|
+
type: "input",
|
|
1809
|
+
value: ""
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
label: "描述",
|
|
1813
|
+
prop: "description",
|
|
1814
|
+
type: "input",
|
|
1815
|
+
value: ""
|
|
1816
|
+
}
|
|
1817
|
+
]), N = B([
|
|
1818
|
+
{
|
|
1819
|
+
label: "取消",
|
|
1820
|
+
background: "#c0c4cc"
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
label: "确认",
|
|
1824
|
+
background: "#436aaf"
|
|
1825
|
+
}
|
|
1826
|
+
]), m = el({
|
|
1827
|
+
visible: !1,
|
|
1828
|
+
width: "40%",
|
|
1829
|
+
title: "步骤条"
|
|
1830
|
+
}), E = B("create"), I = B({}), x = B([]), G = (d) => {
|
|
1831
|
+
var t;
|
|
1832
|
+
I.value = d, l("change", (t = T()) == null ? void 0 : t.compData);
|
|
1833
|
+
}, O = (d, t) => {
|
|
1834
|
+
var P, n;
|
|
1835
|
+
switch (d) {
|
|
1836
|
+
case "create":
|
|
1837
|
+
(P = D.value) == null || P.forEach((i) => {
|
|
1838
|
+
i.value = "";
|
|
1839
|
+
}), E.value = "create", m.visible = !0;
|
|
1840
|
+
break;
|
|
1841
|
+
case "update":
|
|
1842
|
+
(n = D.value) == null || n.forEach((i) => {
|
|
1843
|
+
i.value = t[i == null ? void 0 : i.prop];
|
|
1844
|
+
}), E.value = "update", m.visible = !0;
|
|
1845
|
+
break;
|
|
1846
|
+
case "delete":
|
|
1847
|
+
x.value.splice(t, 1), E.value = "delete";
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
}, R = (d) => {
|
|
1851
|
+
var t, P, n;
|
|
1852
|
+
if ((d == null ? void 0 : d.buttonName) === "确认") {
|
|
1853
|
+
const i = h(d == null ? void 0 : d.content);
|
|
1854
|
+
switch (Object.keys(i).forEach((e) => {
|
|
1855
|
+
i[e] === "" && delete i[e];
|
|
1856
|
+
}), E.value) {
|
|
1857
|
+
case "create":
|
|
1858
|
+
x.value.push({
|
|
1859
|
+
...i,
|
|
1860
|
+
index: ((t = x.value) == null ? void 0 : t.length) + 1
|
|
1861
|
+
});
|
|
1862
|
+
break;
|
|
1863
|
+
case "update":
|
|
1864
|
+
x.value = (P = x.value) == null ? void 0 : P.map((e) => e.index === (i == null ? void 0 : i.index) ? {
|
|
1865
|
+
...e,
|
|
1866
|
+
title: i == null ? void 0 : i.title,
|
|
1867
|
+
description: i == null ? void 0 : i.description
|
|
1868
|
+
} : e);
|
|
1869
|
+
break;
|
|
1870
|
+
}
|
|
1871
|
+
l("change", (n = T()) == null ? void 0 : n.compData), m.visible = !1;
|
|
1872
|
+
} else
|
|
1873
|
+
m.visible = !1;
|
|
1874
|
+
}, T = () => ({
|
|
1875
|
+
comp: "Step",
|
|
1876
|
+
compData: [
|
|
1877
|
+
{
|
|
1878
|
+
key: "stepList",
|
|
1879
|
+
contents: x.value
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
key: "stepConfig",
|
|
1883
|
+
contents: I.value
|
|
1884
|
+
}
|
|
1885
|
+
]
|
|
1886
|
+
}), S = () => {
|
|
1887
|
+
m.visible = !1;
|
|
1888
|
+
};
|
|
1889
|
+
return ke(() => v == null ? void 0 : v.itemContents, (d) => {
|
|
1890
|
+
var t, P;
|
|
1891
|
+
d && (I.value = ((t = d == null ? void 0 : d.find((n) => n.key === "stepConfig")) == null ? void 0 : t.contents) ?? {}, x.value = ((P = d == null ? void 0 : d.find((n) => n.key === "stepList")) == null ? void 0 : P.contents) ?? []);
|
|
1892
|
+
}, { immediate: !0 }), (d, t) => {
|
|
1893
|
+
const P = me("svg-icon"), n = me("el-button");
|
|
1894
|
+
return A(), J(fe, null, [
|
|
1895
|
+
u("div", null, [
|
|
1896
|
+
u("div", Qa, [
|
|
1897
|
+
t[2] || (t[2] = u("h4", { class: "module-title" }, "内容", -1)),
|
|
1898
|
+
u("div", {
|
|
1899
|
+
class: "module-icon",
|
|
1900
|
+
onClick: t[0] || (t[0] = (i) => O("create"))
|
|
1901
|
+
}, [
|
|
1902
|
+
z(P, {
|
|
1903
|
+
name: "Plus",
|
|
1904
|
+
class: "icon-size"
|
|
1905
|
+
}),
|
|
1906
|
+
t[1] || (t[1] = u("div", null, "新增", -1))
|
|
1907
|
+
])
|
|
1908
|
+
]),
|
|
1909
|
+
u("div", Xa, [
|
|
1910
|
+
(A(!0), J(fe, null, he(x.value, (i, e) => (A(), J("div", {
|
|
1911
|
+
class: "module-data-item",
|
|
1912
|
+
key: e
|
|
1913
|
+
}, [
|
|
1914
|
+
u("span", null, Y(i == null ? void 0 : i.title), 1),
|
|
1915
|
+
u("div", null, [
|
|
1916
|
+
z(n, {
|
|
1917
|
+
type: "primary",
|
|
1918
|
+
size: "small",
|
|
1919
|
+
onClick: (s) => O("update", { ...i, index: e + 1 })
|
|
1920
|
+
}, {
|
|
1921
|
+
default: ne(() => t[3] || (t[3] = [
|
|
1922
|
+
Pe("修改")
|
|
1923
|
+
])),
|
|
1924
|
+
_: 2,
|
|
1925
|
+
__: [3]
|
|
1926
|
+
}, 1032, ["onClick"]),
|
|
1927
|
+
z(n, {
|
|
1928
|
+
type: "danger",
|
|
1929
|
+
size: "small",
|
|
1930
|
+
onClick: (s) => O("delete", e)
|
|
1931
|
+
}, {
|
|
1932
|
+
default: ne(() => t[4] || (t[4] = [
|
|
1933
|
+
Pe("删除")
|
|
1934
|
+
])),
|
|
1935
|
+
_: 2,
|
|
1936
|
+
__: [4]
|
|
1937
|
+
}, 1032, ["onClick"])
|
|
1938
|
+
])
|
|
1939
|
+
]))), 128))
|
|
1940
|
+
]),
|
|
1941
|
+
u("div", Ya, [
|
|
1942
|
+
t[5] || (t[5] = u("div", { class: "module-title" }, "布局", -1)),
|
|
1943
|
+
z(xe, {
|
|
1944
|
+
rowContents: y.value,
|
|
1945
|
+
onChange: G
|
|
1946
|
+
}, null, 8, ["rowContents"])
|
|
1947
|
+
])
|
|
1948
|
+
]),
|
|
1949
|
+
z(De, {
|
|
1950
|
+
visible: m.visible,
|
|
1951
|
+
title: m.title,
|
|
1952
|
+
onBeforeDestroy: S,
|
|
1953
|
+
width: m.width
|
|
1954
|
+
}, {
|
|
1955
|
+
default: ne(() => [
|
|
1956
|
+
u("div", Za, [
|
|
1957
|
+
(A(), ye(xe, {
|
|
1958
|
+
rowContents: D.value,
|
|
1959
|
+
key: D.value,
|
|
1960
|
+
isEnableWrap: !1,
|
|
1961
|
+
isButtonRow: !1,
|
|
1962
|
+
isStartJustify: !1,
|
|
1963
|
+
buttonValue: N.value,
|
|
1964
|
+
onOnButtonClick: R
|
|
1965
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
1966
|
+
])
|
|
1967
|
+
]),
|
|
1968
|
+
_: 1
|
|
1969
|
+
}, 8, ["visible", "title", "width"])
|
|
1970
|
+
], 64);
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
}), ln = /* @__PURE__ */ Ce(en, [["__scopeId", "data-v-47438605"]]), an = { class: "step-module content" }, nn = { class: "module-data" }, on = { class: "step-module layout" }, sn = { class: "form-content" }, un = /* @__PURE__ */ je({
|
|
1974
|
+
__name: "operate",
|
|
1975
|
+
props: {
|
|
1976
|
+
itemContents: {
|
|
1977
|
+
type: Array,
|
|
1978
|
+
default: () => []
|
|
1979
|
+
},
|
|
1980
|
+
originalItemContents: {
|
|
1981
|
+
type: Array,
|
|
1982
|
+
default: () => []
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
emits: ["change"],
|
|
1986
|
+
setup(C, { emit: L }) {
|
|
1987
|
+
const v = C, l = L, y = B("create"), D = B({}), N = B([]), m = B([
|
|
1988
|
+
{
|
|
1989
|
+
label: "方向:",
|
|
1990
|
+
prop: "placement",
|
|
1991
|
+
type: "radio",
|
|
1992
|
+
contents: [
|
|
1993
|
+
{
|
|
1994
|
+
label: "底部",
|
|
1995
|
+
value: "bottom"
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
label: "顶部",
|
|
1999
|
+
value: "top"
|
|
2000
|
+
}
|
|
2001
|
+
],
|
|
2002
|
+
value: "bottom"
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
label: "节点类型:",
|
|
2006
|
+
prop: "type",
|
|
2007
|
+
type: "select",
|
|
2008
|
+
contents: [
|
|
2009
|
+
{
|
|
2010
|
+
label: "primary",
|
|
2011
|
+
value: "primary"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
label: "success",
|
|
2015
|
+
value: "success"
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
label: "warning",
|
|
2019
|
+
value: "warning"
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
label: "danger",
|
|
2023
|
+
value: "danger"
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
label: "info",
|
|
2027
|
+
value: "info"
|
|
2028
|
+
}
|
|
2029
|
+
],
|
|
2030
|
+
value: "primary"
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
label: "颜色:",
|
|
2034
|
+
prop: "color",
|
|
2035
|
+
type: "color",
|
|
2036
|
+
value: ""
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
label: "尺寸:",
|
|
2040
|
+
prop: "size",
|
|
2041
|
+
type: "radio",
|
|
2042
|
+
contents: [
|
|
2043
|
+
{
|
|
2044
|
+
label: "normal",
|
|
2045
|
+
value: "normal"
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
label: "large",
|
|
2049
|
+
value: "large"
|
|
2050
|
+
}
|
|
2051
|
+
],
|
|
2052
|
+
value: "normal"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
label: "是否空心",
|
|
2056
|
+
prop: "isHollow",
|
|
2057
|
+
type: "RADIO",
|
|
2058
|
+
contents: [
|
|
2059
|
+
{
|
|
2060
|
+
label: "是",
|
|
2061
|
+
value: !0
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
label: "否",
|
|
2065
|
+
value: !1
|
|
2066
|
+
}
|
|
2067
|
+
],
|
|
2068
|
+
value: !0
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
label: "是否居中",
|
|
2072
|
+
prop: "isCenter",
|
|
2073
|
+
type: "RADIO",
|
|
2074
|
+
contents: [
|
|
2075
|
+
{
|
|
2076
|
+
label: "是",
|
|
2077
|
+
value: !0
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
label: "否",
|
|
2081
|
+
value: !1
|
|
2082
|
+
}
|
|
2083
|
+
],
|
|
2084
|
+
value: !0
|
|
2085
|
+
}
|
|
2086
|
+
]), E = B([
|
|
2087
|
+
{
|
|
2088
|
+
label: "",
|
|
2089
|
+
prop: "index",
|
|
2090
|
+
type: "input",
|
|
2091
|
+
value: "",
|
|
2092
|
+
isFormColHidden: !0
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
label: "内容",
|
|
2096
|
+
prop: "content",
|
|
2097
|
+
type: "input",
|
|
2098
|
+
value: ""
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
label: "时间戳",
|
|
2102
|
+
prop: "timestamp",
|
|
2103
|
+
type: "datetime",
|
|
2104
|
+
value: ""
|
|
2105
|
+
}
|
|
2106
|
+
]), I = B([
|
|
2107
|
+
{
|
|
2108
|
+
label: "取消",
|
|
2109
|
+
background: "#c0c4cc"
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
label: "确认",
|
|
2113
|
+
background: "#436aaf"
|
|
2114
|
+
}
|
|
2115
|
+
]), x = el({
|
|
2116
|
+
visible: !1,
|
|
2117
|
+
width: "40%",
|
|
2118
|
+
title: "时间线"
|
|
2119
|
+
}), G = (d) => {
|
|
2120
|
+
var t;
|
|
2121
|
+
D.value = d, console.log(1212, d), l("change", (t = T()) == null ? void 0 : t.compData);
|
|
2122
|
+
}, O = (d, t) => {
|
|
2123
|
+
var P, n;
|
|
2124
|
+
switch (d) {
|
|
2125
|
+
case "create":
|
|
2126
|
+
(P = E.value) == null || P.forEach((i) => {
|
|
2127
|
+
i.value = "";
|
|
2128
|
+
}), y.value = "create", x.visible = !0;
|
|
2129
|
+
break;
|
|
2130
|
+
case "update":
|
|
2131
|
+
(n = E.value) == null || n.forEach((i) => {
|
|
2132
|
+
i.value = t[i == null ? void 0 : i.prop];
|
|
2133
|
+
}), y.value = "update", x.visible = !0;
|
|
2134
|
+
break;
|
|
2135
|
+
case "delete":
|
|
2136
|
+
N.value.splice(t, 1), y.value = "delete";
|
|
2137
|
+
break;
|
|
2138
|
+
}
|
|
2139
|
+
}, R = (d) => {
|
|
2140
|
+
var t, P, n, i;
|
|
2141
|
+
if ((d == null ? void 0 : d.buttonName) === "确认") {
|
|
2142
|
+
const e = h(d == null ? void 0 : d.content);
|
|
2143
|
+
switch (Object.keys(e).forEach((s) => {
|
|
2144
|
+
e[s] === "" && delete e[s];
|
|
2145
|
+
}), y.value) {
|
|
2146
|
+
case "create":
|
|
2147
|
+
console.log(1335, N.value, e), (P = N.value) == null || P.push({
|
|
2148
|
+
...e,
|
|
2149
|
+
index: ((t = N.value) == null ? void 0 : t.length) + 1
|
|
2150
|
+
});
|
|
2151
|
+
break;
|
|
2152
|
+
case "update":
|
|
2153
|
+
N.value = (n = N.value) == null ? void 0 : n.map((s) => s.index === (e == null ? void 0 : e.index) ? {
|
|
2154
|
+
...s,
|
|
2155
|
+
content: e == null ? void 0 : e.content,
|
|
2156
|
+
timestamp: e == null ? void 0 : e.timestamp
|
|
2157
|
+
} : s);
|
|
2158
|
+
break;
|
|
2159
|
+
}
|
|
2160
|
+
l("change", (i = T()) == null ? void 0 : i.compData), x.visible = !1;
|
|
2161
|
+
} else
|
|
2162
|
+
x.visible = !1;
|
|
2163
|
+
}, T = () => ({
|
|
2164
|
+
comp: "TimeLine",
|
|
2165
|
+
compData: [
|
|
2166
|
+
{
|
|
2167
|
+
key: "timeLineList",
|
|
2168
|
+
contents: N.value
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
key: "timeLineConfig",
|
|
2172
|
+
contents: D.value
|
|
2173
|
+
}
|
|
2174
|
+
]
|
|
2175
|
+
}), S = () => {
|
|
2176
|
+
x.visible = !1;
|
|
2177
|
+
};
|
|
2178
|
+
return ke(() => v == null ? void 0 : v.itemContents, (d) => {
|
|
2179
|
+
var t, P;
|
|
2180
|
+
d && (D.value = ((t = d == null ? void 0 : d.find((n) => n.key === "timeLineConfig")) == null ? void 0 : t.contents) ?? {}, N.value = ((P = d == null ? void 0 : d.find((n) => n.key === "timeLineList")) == null ? void 0 : P.contents) ?? []);
|
|
2181
|
+
}, { immediate: !0 }), (d, t) => {
|
|
2182
|
+
const P = me("svg-icon"), n = me("el-button");
|
|
2183
|
+
return A(), J(fe, null, [
|
|
2184
|
+
u("div", null, [
|
|
2185
|
+
u("div", an, [
|
|
2186
|
+
t[2] || (t[2] = u("h4", { class: "module-title" }, "内容", -1)),
|
|
2187
|
+
u("div", {
|
|
2188
|
+
class: "module-icon",
|
|
2189
|
+
onClick: t[0] || (t[0] = (i) => O("create"))
|
|
2190
|
+
}, [
|
|
2191
|
+
z(P, {
|
|
2192
|
+
name: "Plus",
|
|
2193
|
+
class: "icon-size"
|
|
2194
|
+
}),
|
|
2195
|
+
t[1] || (t[1] = u("div", null, "新增", -1))
|
|
2196
|
+
])
|
|
2197
|
+
]),
|
|
2198
|
+
u("div", nn, [
|
|
2199
|
+
(A(!0), J(fe, null, he(N.value, (i, e) => (A(), J("div", {
|
|
2200
|
+
class: "module-data-item",
|
|
2201
|
+
key: e
|
|
2202
|
+
}, [
|
|
2203
|
+
u("span", null, Y(i == null ? void 0 : i.content), 1),
|
|
2204
|
+
u("div", null, [
|
|
2205
|
+
z(n, {
|
|
2206
|
+
type: "primary",
|
|
2207
|
+
size: "small",
|
|
2208
|
+
onClick: (s) => O("update", { ...i, index: e + 1 })
|
|
2209
|
+
}, {
|
|
2210
|
+
default: ne(() => t[3] || (t[3] = [
|
|
2211
|
+
Pe("修改")
|
|
2212
|
+
])),
|
|
2213
|
+
_: 2,
|
|
2214
|
+
__: [3]
|
|
2215
|
+
}, 1032, ["onClick"]),
|
|
2216
|
+
z(n, {
|
|
2217
|
+
type: "danger",
|
|
2218
|
+
size: "small",
|
|
2219
|
+
onClick: (s) => O("delete", e)
|
|
2220
|
+
}, {
|
|
2221
|
+
default: ne(() => t[4] || (t[4] = [
|
|
2222
|
+
Pe("删除")
|
|
2223
|
+
])),
|
|
2224
|
+
_: 2,
|
|
2225
|
+
__: [4]
|
|
2226
|
+
}, 1032, ["onClick"])
|
|
2227
|
+
])
|
|
2228
|
+
]))), 128))
|
|
2229
|
+
]),
|
|
2230
|
+
u("div", on, [
|
|
2231
|
+
t[5] || (t[5] = u("div", { class: "module-title" }, "布局", -1)),
|
|
2232
|
+
z(xe, {
|
|
2233
|
+
rowContents: m.value,
|
|
2234
|
+
onChange: G
|
|
2235
|
+
}, null, 8, ["rowContents"])
|
|
2236
|
+
])
|
|
2237
|
+
]),
|
|
2238
|
+
z(De, {
|
|
2239
|
+
visible: x.visible,
|
|
2240
|
+
title: x.title,
|
|
2241
|
+
onBeforeDestroy: S,
|
|
2242
|
+
width: x.width
|
|
2243
|
+
}, {
|
|
2244
|
+
default: ne(() => [
|
|
2245
|
+
u("div", sn, [
|
|
2246
|
+
(A(), ye(xe, {
|
|
2247
|
+
rowContents: E.value,
|
|
2248
|
+
key: E.value,
|
|
2249
|
+
isEnableWrap: !1,
|
|
2250
|
+
isButtonRow: !1,
|
|
2251
|
+
isStartJustify: !1,
|
|
2252
|
+
buttonValue: I.value,
|
|
2253
|
+
onOnButtonClick: R
|
|
2254
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
2255
|
+
])
|
|
2256
|
+
]),
|
|
2257
|
+
_: 1
|
|
2258
|
+
}, 8, ["visible", "title", "width"])
|
|
2259
|
+
], 64);
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
}), rn = /* @__PURE__ */ Ce(un, [["__scopeId", "data-v-40aea043"]]), tn = {};
|
|
2263
|
+
function cn(C, L) {
|
|
2264
|
+
return A(), J("div");
|
|
2265
|
+
}
|
|
2266
|
+
const dn = /* @__PURE__ */ Ce(tn, [["render", cn]]), vn = { class: "extra-content" }, pn = { key: 0 }, fn = { key: 1 }, hn = {
|
|
2267
|
+
__name: "index",
|
|
2268
|
+
props: {
|
|
2269
|
+
itemData: {
|
|
2270
|
+
type: Array,
|
|
2271
|
+
default: () => []
|
|
2272
|
+
},
|
|
2273
|
+
childItemData: {
|
|
2274
|
+
type: Array,
|
|
2275
|
+
default: () => []
|
|
2276
|
+
},
|
|
2277
|
+
index: Number,
|
|
2278
|
+
changedContent: {
|
|
2279
|
+
type: Object,
|
|
2280
|
+
default: () => {
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
},
|
|
2284
|
+
emits: ["change"],
|
|
2285
|
+
setup(C, { emit: L }) {
|
|
2286
|
+
const v = C, l = B(0), y = B(), D = B(), N = L, m = B(!1), E = B({}), I = B({}), x = B();
|
|
2287
|
+
ke(
|
|
2288
|
+
() => [v.itemData],
|
|
2289
|
+
() => {
|
|
2290
|
+
var i;
|
|
2291
|
+
const n = h(v.itemData);
|
|
2292
|
+
y.value = (i = h(n)) == null ? void 0 : i.map((e) => {
|
|
2293
|
+
var s;
|
|
2294
|
+
if (e.key === "extra") {
|
|
2295
|
+
let w = [];
|
|
2296
|
+
(s = e.value) == null || s.forEach((W) => {
|
|
2297
|
+
var Q;
|
|
2298
|
+
w.push((Q = Object.values(W)) == null ? void 0 : Q[0]);
|
|
2299
|
+
}), e.value = w;
|
|
2300
|
+
}
|
|
2301
|
+
return e;
|
|
2302
|
+
});
|
|
2303
|
+
},
|
|
2304
|
+
{ deep: !0, immediate: !0 }
|
|
2305
|
+
);
|
|
2306
|
+
const G = (n, i, e, s) => {
|
|
2307
|
+
var W;
|
|
2308
|
+
let w = {};
|
|
2309
|
+
((W = n == null ? void 0 : n[0]) == null ? void 0 : W.contents) === "详情" && (m.value = !0, w[i] = n, D.value = n == null ? void 0 : n.filter((Q) => (Q == null ? void 0 : Q.key) !== "tableContentName"), E.value = w, I.value = e, x.value = s.id);
|
|
2310
|
+
}, O = (n) => {
|
|
2311
|
+
var Q, de, re, a;
|
|
2312
|
+
const i = (de = (Q = Object.values(h(E.value))) == null ? void 0 : Q[0]) == null ? void 0 : de.filter((k) => (k == null ? void 0 : k.key) === "tableContentName"), e = (a = (re = Object.values(h(E.value))) == null ? void 0 : re[0]) == null ? void 0 : a.filter((k) => (k == null ? void 0 : k.key) !== "tableContentName"), s = e == null ? void 0 : e.map((k, U) => {
|
|
2313
|
+
var _;
|
|
2314
|
+
return U === n.index && (k == null ? void 0 : k.comp) === "Table" && (k.compData = (_ = k.compData) == null ? void 0 : _.map((j) => {
|
|
2315
|
+
var se, te;
|
|
2316
|
+
return (j == null ? void 0 : j.key) === "tableContents" && (j.contents = (te = (se = n.content) == null ? void 0 : se.map((b) => {
|
|
2317
|
+
let r = {};
|
|
2318
|
+
for (let p in b)
|
|
2319
|
+
p !== "id" && (r[p] = b[p]);
|
|
2320
|
+
return r;
|
|
2321
|
+
})) == null ? void 0 : te.map((b) => Object.values(b))), j;
|
|
2322
|
+
})), k;
|
|
2323
|
+
});
|
|
2324
|
+
s.unshift(i == null ? void 0 : i[0]);
|
|
2325
|
+
let w = h(E.value), W = {};
|
|
2326
|
+
for (let k in w)
|
|
2327
|
+
W[k] = s;
|
|
2328
|
+
E.value = W;
|
|
2329
|
+
}, R = () => {
|
|
2330
|
+
m.value = !1, E.value = {}, I.value = {}, x.value = void 0, l.value++;
|
|
2331
|
+
}, T = (n) => {
|
|
2332
|
+
var Q, de, re, a;
|
|
2333
|
+
const i = (de = (Q = Object.values(h(E.value))) == null ? void 0 : Q[0]) == null ? void 0 : de.filter((k) => (k == null ? void 0 : k.key) === "tableContentName"), e = (a = (re = Object.values(h(E.value))) == null ? void 0 : re[0]) == null ? void 0 : a.filter((k) => (k == null ? void 0 : k.key) !== "tableContentName"), s = e == null ? void 0 : e.map((k, U) => (U === n.index && (k.compData = n.contents), k));
|
|
2334
|
+
s.unshift(i == null ? void 0 : i[0]);
|
|
2335
|
+
let w = h(E.value), W = {};
|
|
2336
|
+
for (let k in w)
|
|
2337
|
+
W[k] = s;
|
|
2338
|
+
E.value = W;
|
|
2339
|
+
}, S = () => {
|
|
2340
|
+
var i, e;
|
|
2341
|
+
let n = {};
|
|
2342
|
+
for (let s in I.value)
|
|
2343
|
+
s === ((i = Object.keys(E.value)) == null ? void 0 : i[0]) ? n[s] = (e = Object.values(E.value)) == null ? void 0 : e[0] : n[s] = I.value[s];
|
|
2344
|
+
N("change", {
|
|
2345
|
+
buttonName: "编辑",
|
|
2346
|
+
index: x.value,
|
|
2347
|
+
singleContent: n
|
|
2348
|
+
}, "methodData"), m.value = !1, E.value = {}, I.value = {}, x.value = void 0;
|
|
2349
|
+
}, d = () => {
|
|
2350
|
+
m.value = !1, E.value = {}, I.value = {}, x.value = void 0;
|
|
2351
|
+
}, t = (n) => {
|
|
2352
|
+
N("change", n, "methodData");
|
|
2353
|
+
}, P = (n) => nl(n);
|
|
2354
|
+
return (n, i) => (A(), J("div", vn, [
|
|
2355
|
+
(A(!0), J(fe, null, he(y.value, (e, s) => (A(), J("div", { key: l.value }, [
|
|
2356
|
+
(e == null ? void 0 : e.key) === "extra" ? (A(), J("div", pn)) : (A(), J("div", fn, [
|
|
2357
|
+
(A(), ye(Ge(P(e.comp)), {
|
|
2358
|
+
itemData: e == null ? void 0 : e.compData,
|
|
2359
|
+
childItemData: e == null ? void 0 : e.itemChildData,
|
|
2360
|
+
key: s,
|
|
2361
|
+
index: (e == null ? void 0 : e.id) ?? s,
|
|
2362
|
+
onContentClick: G,
|
|
2363
|
+
onChange: t
|
|
2364
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
2365
|
+
]))
|
|
2366
|
+
]))), 128)),
|
|
2367
|
+
z(De, {
|
|
2368
|
+
visible: m.value,
|
|
2369
|
+
onBeforeDestroy: d
|
|
2370
|
+
}, {
|
|
2371
|
+
default: ne(() => [
|
|
2372
|
+
(A(!0), J(fe, null, he(D.value, (e, s) => (A(), J("div", {
|
|
2373
|
+
key: s,
|
|
2374
|
+
class: "extra-dialog"
|
|
2375
|
+
}, [
|
|
2376
|
+
(A(), ye(Ge(P(e.comp)), {
|
|
2377
|
+
itemData: e == null ? void 0 : e.compData,
|
|
2378
|
+
onChange: O,
|
|
2379
|
+
childItemData: e == null ? void 0 : e.itemChildData,
|
|
2380
|
+
key: s,
|
|
2381
|
+
onContentChange: T,
|
|
2382
|
+
index: (e == null ? void 0 : e.id) ?? s,
|
|
2383
|
+
class: "extra-component"
|
|
2384
|
+
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
2385
|
+
]))), 128))
|
|
2386
|
+
]),
|
|
2387
|
+
footer: ne(() => [
|
|
2388
|
+
u("div", { class: "dialog-footer" }, [
|
|
2389
|
+
u("div", {
|
|
2390
|
+
class: "cancel-button footer-button",
|
|
2391
|
+
onClick: R
|
|
2392
|
+
}, Y("取消")),
|
|
2393
|
+
u("div", {
|
|
2394
|
+
class: "confirm-button footer-button",
|
|
2395
|
+
onClick: S
|
|
2396
|
+
}, Y("确认"))
|
|
2397
|
+
])
|
|
2398
|
+
]),
|
|
2399
|
+
_: 1
|
|
2400
|
+
}, 8, ["visible"])
|
|
2401
|
+
]));
|
|
2402
|
+
}
|
|
2403
|
+
}, mn = /* @__PURE__ */ Ce(hn, [["__scopeId", "data-v-b0b2f71f"]]), yn = { class: "method-content" }, bn = ["onClick"], Cn = {
|
|
2404
|
+
__name: "index",
|
|
2405
|
+
props: {
|
|
2406
|
+
itemData: {
|
|
2407
|
+
type: Array,
|
|
2408
|
+
default: () => []
|
|
2409
|
+
},
|
|
2410
|
+
childItemData: {
|
|
2411
|
+
type: Array,
|
|
2412
|
+
default: () => []
|
|
2413
|
+
},
|
|
2414
|
+
index: Number,
|
|
2415
|
+
changedContent: {
|
|
2416
|
+
type: Object,
|
|
2417
|
+
default: () => {
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
},
|
|
2421
|
+
setup(C) {
|
|
2422
|
+
const L = B([]), v = C, l = cl(Se), { itemData: y, isEdit: D } = Ue(l), N = (I, x) => {
|
|
2423
|
+
var O;
|
|
2424
|
+
const G = (O = x == null ? void 0 : x[0]) == null ? void 0 : O.children;
|
|
2425
|
+
return I == null ? void 0 : I.map((R) => {
|
|
2426
|
+
var T;
|
|
2427
|
+
return R = (T = R == null ? void 0 : R.map((S, d) => {
|
|
2428
|
+
var t;
|
|
2429
|
+
return {
|
|
2430
|
+
key: (t = G[d]) == null ? void 0 : t.label,
|
|
2431
|
+
value: S
|
|
2432
|
+
};
|
|
2433
|
+
})) == null ? void 0 : T.filter((S) => S.key), R;
|
|
2434
|
+
});
|
|
2435
|
+
};
|
|
2436
|
+
ke(
|
|
2437
|
+
() => y.value,
|
|
2438
|
+
async () => {
|
|
2439
|
+
D.value == "view" && await E(h(v.itemData));
|
|
2440
|
+
},
|
|
2441
|
+
{ deep: !0 }
|
|
2442
|
+
);
|
|
2443
|
+
const m = async (I) => {
|
|
2444
|
+
var n, i, e, s, w, W;
|
|
2445
|
+
let x = {};
|
|
2446
|
+
if ((n = h(I.content)) == null || n.forEach((Q, de) => {
|
|
2447
|
+
var re, a, k, U, _, j, se, te, b, r, p, M, ae, ue, V, q, F;
|
|
2448
|
+
if ((Q == null ? void 0 : Q.comp) === "Table") {
|
|
2449
|
+
let oe = (U = (k = (a = (re = Q == null ? void 0 : Q.compData) == null ? void 0 : re.find((ce) => (ce == null ? void 0 : ce.key) === "header")) == null ? void 0 : a.contents) == null ? void 0 : k[0]) == null ? void 0 : U.some((ce) => ce == null ? void 0 : ce.children), _e = (se = (j = (_ = Q == null ? void 0 : Q.compData) == null ? void 0 : _.find((ce) => (ce == null ? void 0 : ce.key) === "tableContents")) == null ? void 0 : j.contents) == null ? void 0 : se.map((ce) => ce.slice(1)), pe = (M = (p = (r = (b = (te = Q == null ? void 0 : Q.compData) == null ? void 0 : te.find((ce) => (ce == null ? void 0 : ce.key) === "header")) == null ? void 0 : b.contents) == null ? void 0 : r[0]) == null ? void 0 : p[0]) == null ? void 0 : M.label, Ee = (V = (ue = (ae = Q == null ? void 0 : Q.compData) == null ? void 0 : ae.find((ce) => (ce == null ? void 0 : ce.key) === "header")) == null ? void 0 : ue.contents) == null ? void 0 : V[0];
|
|
2450
|
+
if (oe)
|
|
2451
|
+
x[pe] = N(_e, Ee);
|
|
2452
|
+
else {
|
|
2453
|
+
const ce = [];
|
|
2454
|
+
Ee = Ee.slice(1, Ee.length - 1), Ee == null || Ee.forEach((ze, Me) => {
|
|
2455
|
+
_e == null || _e.forEach((We) => {
|
|
2456
|
+
ce.push({
|
|
2457
|
+
key: ze.label + We[0],
|
|
2458
|
+
value: We[Me + 1]
|
|
2459
|
+
});
|
|
2460
|
+
});
|
|
2461
|
+
}), x["form" + de] = ce;
|
|
2462
|
+
}
|
|
2463
|
+
} else {
|
|
2464
|
+
const oe = (F = (q = Q.compData) == null ? void 0 : q.find((pe) => (pe == null ? void 0 : pe.key) === "formContent")) == null ? void 0 : F.contents;
|
|
2465
|
+
x.form = {};
|
|
2466
|
+
const _e = [];
|
|
2467
|
+
oe == null || oe.forEach((pe) => {
|
|
2468
|
+
pe.key !== "" && (pe = {
|
|
2469
|
+
key: (pe == null ? void 0 : pe.key) ?? (pe == null ? void 0 : pe.label),
|
|
2470
|
+
value: pe == null ? void 0 : pe.value
|
|
2471
|
+
}, _e.push(pe));
|
|
2472
|
+
}), x.form = _e;
|
|
2473
|
+
}
|
|
2474
|
+
}), I.api) {
|
|
2475
|
+
const Q = await Fl.post(I.api, {
|
|
2476
|
+
data: x,
|
|
2477
|
+
templateFileName: (i = I == null ? void 0 : I.extraContent) == null ? void 0 : i[0]
|
|
2478
|
+
}, {
|
|
2479
|
+
responseType: "blob",
|
|
2480
|
+
// 必须设置
|
|
2481
|
+
headers: {
|
|
2482
|
+
"Content-Type": "application/json"
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
var G = new Blob([Q.data], {
|
|
2486
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
2487
|
+
}), O = Q.headers["content-disposition"], R = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), T = R.exec(O), S = ((w = (s = (e = I == null ? void 0 : I.extraContent) == null ? void 0 : e[0]) == null ? void 0 : s.split(".")) == null ? void 0 : w[0]) + "." + ((W = T[1].split(".")) == null ? void 0 : W[1]), d = document.createElement("a"), t = window.URL.createObjectURL(G), P = /^["](.*)["]$/g;
|
|
2488
|
+
d.style.display = "none", d.href = t, d.download = decodeURI(S.replace(P, "$1")), document.body.appendChild(d), d.click(), document.body.removeChild(d), window.URL.revokeObjectURL(t);
|
|
2489
|
+
}
|
|
2490
|
+
}, E = async (I) => {
|
|
2491
|
+
var R;
|
|
2492
|
+
const x = h(I), G = x == null ? void 0 : x.map(async (T) => {
|
|
2493
|
+
var i, e, s, w, W, Q, de;
|
|
2494
|
+
const d = (i = (await ul({
|
|
2495
|
+
key: {
|
|
2496
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
2497
|
+
parentTable: "",
|
|
2498
|
+
type: "method",
|
|
2499
|
+
methodName: T.method
|
|
2500
|
+
}
|
|
2501
|
+
})).data.result) == null ? void 0 : i[0], t = await ul({
|
|
2502
|
+
key: {
|
|
2503
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
2504
|
+
type: "methodData",
|
|
2505
|
+
tableId: d == null ? void 0 : d.id
|
|
2506
|
+
}
|
|
2507
|
+
}), P = await gl((e = T == null ? void 0 : T.value) == null ? void 0 : e[0], sessionStorage.getItem("systemKey"), ""), n = (s = t.data.result) == null ? void 0 : s[0];
|
|
2508
|
+
return {
|
|
2509
|
+
buttonName: (w = d == null ? void 0 : d.key) == null ? void 0 : w.methodKey,
|
|
2510
|
+
api: (Q = (W = n == null ? void 0 : n.value) == null ? void 0 : W.tableData) == null ? void 0 : Q[0],
|
|
2511
|
+
content: P == null ? void 0 : P.filter((re) => re.comp !== "methodButton"),
|
|
2512
|
+
extraContent: (de = h(T.value)) == null ? void 0 : de.slice(1)
|
|
2513
|
+
};
|
|
2514
|
+
}), O = await Promise.all(G);
|
|
2515
|
+
L.value = O == null ? void 0 : O.filter((T) => T == null ? void 0 : T.extraContent), (R = L.value) == null || R.forEach((T) => {
|
|
2516
|
+
var S;
|
|
2517
|
+
T.api === "" && ((S = T.content) == null || S.forEach((d) => {
|
|
2518
|
+
var t;
|
|
2519
|
+
d.comp == "Table" && l.setExtraContents(kl(d.compData, (t = T.extraContent) == null ? void 0 : t[0]));
|
|
2520
|
+
}));
|
|
2521
|
+
});
|
|
2522
|
+
};
|
|
2523
|
+
return ke(
|
|
2524
|
+
() => v.itemData,
|
|
2525
|
+
async () => {
|
|
2526
|
+
D.value == "view" && await E(h(v.itemData));
|
|
2527
|
+
},
|
|
2528
|
+
{ immediate: !0, deep: !0 }
|
|
2529
|
+
), (I, x) => (A(), J("div", yn, [
|
|
2530
|
+
(A(!0), J(fe, null, he(L.value, (G) => (A(), J("div", null, [
|
|
2531
|
+
G.api !== "" ? (A(), J("div", {
|
|
2532
|
+
key: 0,
|
|
2533
|
+
onClick: (O) => m(G),
|
|
2534
|
+
class: "method-buttons"
|
|
2535
|
+
}, Y(G.buttonName), 9, bn)) : Ae("", !0)
|
|
2536
|
+
]))), 256))
|
|
2537
|
+
]));
|
|
2538
|
+
}
|
|
2539
|
+
}, gn = /* @__PURE__ */ Ce(Cn, [["__scopeId", "data-v-0c52611a"]]), kn = {};
|
|
2540
|
+
function _n(C, L) {
|
|
2541
|
+
return " 567 ";
|
|
2542
|
+
}
|
|
2543
|
+
const wn = /* @__PURE__ */ Ce(kn, [["render", _n]]), xn = { class: "module content" }, Dn = { class: "module data" }, In = { class: "module layout" }, $n = { class: "form-content" }, Tn = /* @__PURE__ */ je({
|
|
2544
|
+
__name: "operate",
|
|
2545
|
+
props: {
|
|
2546
|
+
itemContents: {
|
|
2547
|
+
type: Array,
|
|
2548
|
+
default: () => []
|
|
2549
|
+
},
|
|
2550
|
+
originalItemContents: {
|
|
2551
|
+
type: Array,
|
|
2552
|
+
default: () => []
|
|
2553
|
+
}
|
|
2554
|
+
},
|
|
2555
|
+
emits: ["change"],
|
|
2556
|
+
setup(C, { emit: L }) {
|
|
2557
|
+
const v = C, l = L, y = el({
|
|
2558
|
+
visible: !1,
|
|
2559
|
+
width: "40%",
|
|
2560
|
+
title: "签名配置"
|
|
2561
|
+
}), D = B("create"), N = B([
|
|
2562
|
+
{
|
|
2563
|
+
label: "取消",
|
|
2564
|
+
background: "#c0c4cc"
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
label: "确认",
|
|
2568
|
+
background: "#436aaf"
|
|
2569
|
+
}
|
|
2570
|
+
]), m = B([
|
|
2571
|
+
{
|
|
2572
|
+
label: "宽度(%):",
|
|
2573
|
+
prop: "signPadWidth",
|
|
2574
|
+
type: "number",
|
|
2575
|
+
value: "30"
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
label: "弹窗名称:",
|
|
2579
|
+
prop: "dialogTitle",
|
|
2580
|
+
type: "input",
|
|
2581
|
+
value: ""
|
|
2582
|
+
},
|
|
2583
|
+
{
|
|
2584
|
+
label: "弹窗宽度(%):",
|
|
2585
|
+
prop: "dialogWidth",
|
|
2586
|
+
type: "number",
|
|
2587
|
+
value: "30"
|
|
2588
|
+
},
|
|
2589
|
+
{
|
|
2590
|
+
label: "弹窗显示:",
|
|
2591
|
+
prop: "dialogShow",
|
|
2592
|
+
type: "radio",
|
|
2593
|
+
contents: [
|
|
2594
|
+
{
|
|
2595
|
+
label: "显示",
|
|
2596
|
+
value: !0
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
label: "隐藏",
|
|
2600
|
+
value: !1
|
|
2601
|
+
}
|
|
2602
|
+
],
|
|
2603
|
+
value: !1,
|
|
2604
|
+
isFormColHidden: !0
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
label: "路径:",
|
|
2608
|
+
prop: "url",
|
|
2609
|
+
type: "input",
|
|
2610
|
+
value: "",
|
|
2611
|
+
isFormColHidden: !0
|
|
2612
|
+
}
|
|
2613
|
+
]), E = ll(() => [
|
|
2614
|
+
{
|
|
2615
|
+
label: "",
|
|
2616
|
+
prop: "index",
|
|
2617
|
+
type: "input",
|
|
2618
|
+
value: "",
|
|
2619
|
+
isFormColHidden: !0
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
label: "类型:",
|
|
2623
|
+
prop: "label",
|
|
2624
|
+
type: "select",
|
|
2625
|
+
contents: [
|
|
2626
|
+
{
|
|
2627
|
+
label: "电子签名",
|
|
2628
|
+
value: "电子签名"
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
label: "签字版",
|
|
2632
|
+
value: "签字版"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
label: "上传签名",
|
|
2636
|
+
value: "上传签名"
|
|
2637
|
+
}
|
|
2638
|
+
],
|
|
2639
|
+
value: ""
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
label: "图标",
|
|
2643
|
+
prop: "icon",
|
|
2644
|
+
type: "inputPopover",
|
|
2645
|
+
value: ""
|
|
2646
|
+
}
|
|
2647
|
+
// {
|
|
2648
|
+
// label: '是否禁用',
|
|
2649
|
+
// prop: 'disabled',
|
|
2650
|
+
// type: 'radio',
|
|
2651
|
+
// contents: [
|
|
2652
|
+
// {
|
|
2653
|
+
// label: '是',
|
|
2654
|
+
// value: true,
|
|
2655
|
+
// },
|
|
2656
|
+
// {
|
|
2657
|
+
// label: '否',
|
|
2658
|
+
// value: false,
|
|
2659
|
+
// }
|
|
2660
|
+
// ],
|
|
2661
|
+
// value: false
|
|
2662
|
+
// },
|
|
2663
|
+
]), I = B({}), x = B([]), G = () => ({
|
|
2664
|
+
comp: "Signature",
|
|
2665
|
+
compData: [
|
|
2666
|
+
{
|
|
2667
|
+
key: "signTypeList",
|
|
2668
|
+
contents: x.value
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
key: "signConfig",
|
|
2672
|
+
contents: I.value
|
|
2673
|
+
}
|
|
2674
|
+
]
|
|
2675
|
+
}), O = (d) => {
|
|
2676
|
+
var t;
|
|
2677
|
+
I.value = h(d), l("change", (t = G()) == null ? void 0 : t.compData);
|
|
2678
|
+
}, R = (d) => {
|
|
2679
|
+
var t, P;
|
|
2680
|
+
if ((d == null ? void 0 : d.buttonName) === "确认") {
|
|
2681
|
+
const n = h(d == null ? void 0 : d.content);
|
|
2682
|
+
switch (D.value) {
|
|
2683
|
+
case "create":
|
|
2684
|
+
x.value.push({
|
|
2685
|
+
...n,
|
|
2686
|
+
index: ((t = x.value) == null ? void 0 : t.length) + 1
|
|
2687
|
+
});
|
|
2688
|
+
break;
|
|
2689
|
+
}
|
|
2690
|
+
l("change", (P = G()) == null ? void 0 : P.compData), y.visible = !1;
|
|
2691
|
+
} else
|
|
2692
|
+
y.visible = !1;
|
|
2693
|
+
}, T = (d, t) => {
|
|
2694
|
+
var P, n;
|
|
2695
|
+
switch (d) {
|
|
2696
|
+
case "create":
|
|
2697
|
+
(P = E.value) == null || P.forEach((i) => {
|
|
2698
|
+
i.value = "";
|
|
2699
|
+
}), D.value = "create", y.visible = !0;
|
|
2700
|
+
break;
|
|
2701
|
+
case "update":
|
|
2702
|
+
(n = E.value) == null || n.forEach((i) => {
|
|
2703
|
+
i.value = t[i == null ? void 0 : i.prop];
|
|
2704
|
+
}), D.value = "update", y.visible = !0;
|
|
2705
|
+
break;
|
|
2706
|
+
case "delete":
|
|
2707
|
+
x.value.splice(t, 1), D.value = "delete";
|
|
2708
|
+
break;
|
|
2709
|
+
}
|
|
2710
|
+
}, S = () => {
|
|
2711
|
+
y.visible = !1;
|
|
2712
|
+
};
|
|
2713
|
+
return ke(() => v == null ? void 0 : v.itemContents, (d) => {
|
|
2714
|
+
var t, P;
|
|
2715
|
+
d && (I.value = ((t = d == null ? void 0 : d.find((n) => n.key === "signConfig")) == null ? void 0 : t.contents) ?? {}, x.value = ((P = d == null ? void 0 : d.find((n) => n.key === "signTypeList")) == null ? void 0 : P.contents) ?? []);
|
|
2716
|
+
}, { immediate: !0 }), (d, t) => {
|
|
2717
|
+
const P = me("svg-icon"), n = me("el-button");
|
|
2718
|
+
return A(), J(fe, null, [
|
|
2719
|
+
u("div", null, [
|
|
2720
|
+
u("div", xn, [
|
|
2721
|
+
t[2] || (t[2] = u("h4", { class: "module-title" }, "签名类型", -1)),
|
|
2722
|
+
u("div", {
|
|
2723
|
+
class: "module-icon",
|
|
2724
|
+
onClick: t[0] || (t[0] = (i) => T("create"))
|
|
2725
|
+
}, [
|
|
2726
|
+
u("div", null, [
|
|
2727
|
+
z(P, {
|
|
2728
|
+
name: "Plus",
|
|
2729
|
+
class: "icon-size"
|
|
2730
|
+
}),
|
|
2731
|
+
t[1] || (t[1] = u("span", null, "新增", -1))
|
|
2732
|
+
])
|
|
2733
|
+
])
|
|
2734
|
+
]),
|
|
2735
|
+
u("div", Dn, [
|
|
2736
|
+
(A(!0), J(fe, null, he(x.value, (i, e) => (A(), J("div", {
|
|
2737
|
+
class: "module-data-item",
|
|
2738
|
+
key: e
|
|
2739
|
+
}, [
|
|
2740
|
+
u("span", null, Y(i == null ? void 0 : i.label), 1),
|
|
2741
|
+
u("div", null, [
|
|
2742
|
+
z(n, {
|
|
2743
|
+
type: "primary",
|
|
2744
|
+
size: "small",
|
|
2745
|
+
onClick: (s) => T("update", { ...i, index: e + 1 })
|
|
2746
|
+
}, {
|
|
2747
|
+
default: ne(() => t[3] || (t[3] = [
|
|
2748
|
+
Pe("修改")
|
|
2749
|
+
])),
|
|
2750
|
+
_: 2,
|
|
2751
|
+
__: [3]
|
|
2752
|
+
}, 1032, ["onClick"]),
|
|
2753
|
+
z(n, {
|
|
2754
|
+
type: "danger",
|
|
2755
|
+
size: "small",
|
|
2756
|
+
onClick: (s) => T("delete", e)
|
|
2757
|
+
}, {
|
|
2758
|
+
default: ne(() => t[4] || (t[4] = [
|
|
2759
|
+
Pe("删除")
|
|
2760
|
+
])),
|
|
2761
|
+
_: 2,
|
|
2762
|
+
__: [4]
|
|
2763
|
+
}, 1032, ["onClick"])
|
|
2764
|
+
])
|
|
2765
|
+
]))), 128))
|
|
2766
|
+
]),
|
|
2767
|
+
u("div", In, [
|
|
2768
|
+
z(xe, {
|
|
2769
|
+
rowContents: m.value,
|
|
2770
|
+
onChange: O
|
|
2771
|
+
}, null, 8, ["rowContents"])
|
|
2772
|
+
])
|
|
2773
|
+
]),
|
|
2774
|
+
z(De, {
|
|
2775
|
+
visible: y.visible,
|
|
2776
|
+
title: y.title,
|
|
2777
|
+
onBeforeDestroy: S,
|
|
2778
|
+
width: y.width
|
|
2779
|
+
}, {
|
|
2780
|
+
default: ne(() => [
|
|
2781
|
+
u("div", $n, [
|
|
2782
|
+
(A(), ye(xe, {
|
|
2783
|
+
rowContents: E.value,
|
|
2784
|
+
key: E.value,
|
|
2785
|
+
isEnableWrap: !1,
|
|
2786
|
+
isButtonRow: !1,
|
|
2787
|
+
isStartJustify: !1,
|
|
2788
|
+
buttonValue: N.value,
|
|
2789
|
+
onOnButtonClick: R
|
|
2790
|
+
}, null, 8, ["rowContents", "buttonValue"]))
|
|
2791
|
+
])
|
|
2792
|
+
]),
|
|
2793
|
+
_: 1
|
|
2794
|
+
}, 8, ["visible", "title", "width"])
|
|
2795
|
+
], 64);
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
}), En = /* @__PURE__ */ Ce(Tn, [["__scopeId", "data-v-1a2b7867"]]), Bn = /* @__PURE__ */ je({
|
|
2799
|
+
__name: "index",
|
|
2800
|
+
props: {
|
|
2801
|
+
stepConfig: {
|
|
2802
|
+
type: Object,
|
|
2803
|
+
default: {}
|
|
2804
|
+
},
|
|
2805
|
+
stepList: {
|
|
2806
|
+
type: Array,
|
|
2807
|
+
default: () => []
|
|
2808
|
+
}
|
|
2809
|
+
},
|
|
2810
|
+
emits: ["clickStep", "clickTrigger", "changeTrigger"],
|
|
2811
|
+
setup(C, { emit: L }) {
|
|
2812
|
+
const v = C, l = L, y = B(1), D = ll(() => {
|
|
2813
|
+
var G, O;
|
|
2814
|
+
return (G = v == null ? void 0 : v.stepConfig) != null && G.allowTrigger ? y.value : (O = v == null ? void 0 : v.stepConfig) == null ? void 0 : O.active;
|
|
2815
|
+
}), N = (G, O) => {
|
|
2816
|
+
y.value = O, l("clickStep", G, O);
|
|
2817
|
+
}, m = (G) => Tl(G), E = () => {
|
|
2818
|
+
var O;
|
|
2819
|
+
const G = (O = v == null ? void 0 : v.stepList) == null ? void 0 : O.find((R, T) => T + 1 === D.value);
|
|
2820
|
+
return console.log("findStep", G), G ? G == null ? void 0 : G.children : [];
|
|
2821
|
+
}, I = (G) => {
|
|
2822
|
+
l("clickTrigger", G);
|
|
2823
|
+
}, x = (G) => {
|
|
2824
|
+
l("changeTrigger", G);
|
|
2825
|
+
};
|
|
2826
|
+
return (G, O) => {
|
|
2827
|
+
var S, d, t, P, n;
|
|
2828
|
+
const R = me("el-step"), T = me("el-steps");
|
|
2829
|
+
return A(), J(fe, null, [
|
|
2830
|
+
z(T, {
|
|
2831
|
+
direction: (S = C.stepConfig) == null ? void 0 : S.direction,
|
|
2832
|
+
active: D.value,
|
|
2833
|
+
"finish-status": "success",
|
|
2834
|
+
simple: (d = C.stepConfig) == null ? void 0 : d.simple,
|
|
2835
|
+
"align-center": ((t = C.stepConfig) == null ? void 0 : t.alignCenter) ?? !0
|
|
2836
|
+
}, {
|
|
2837
|
+
default: ne(() => [
|
|
2838
|
+
(A(!0), J(fe, null, he(C.stepList, (i, e) => (A(), ye(R, {
|
|
2839
|
+
key: e,
|
|
2840
|
+
class: "step-item",
|
|
2841
|
+
onClick: (s) => N(i, e + 1)
|
|
2842
|
+
}, {
|
|
2843
|
+
title: ne(() => [
|
|
2844
|
+
He(G.$slots, "title", {
|
|
2845
|
+
title: i == null ? void 0 : i.title
|
|
2846
|
+
}, void 0, !0)
|
|
2847
|
+
]),
|
|
2848
|
+
description: ne(() => [
|
|
2849
|
+
He(G.$slots, "description", {
|
|
2850
|
+
description: i == null ? void 0 : i.description
|
|
2851
|
+
}, void 0, !0)
|
|
2852
|
+
]),
|
|
2853
|
+
_: 2
|
|
2854
|
+
}, 1032, ["onClick"]))), 128))
|
|
2855
|
+
]),
|
|
2856
|
+
_: 3
|
|
2857
|
+
}, 8, ["direction", "active", "simple", "align-center"]),
|
|
2858
|
+
(P = C.stepConfig) != null && P.allowTrigger && ((n = C.stepConfig) != null && n.active) ? (A(!0), J(fe, { key: 0 }, he(E(), (i, e) => (A(), J("div", {
|
|
2859
|
+
key: e,
|
|
2860
|
+
class: "step-cont-wrap"
|
|
2861
|
+
}, [
|
|
2862
|
+
(A(), ye(Ge(m(i == null ? void 0 : i.type)), {
|
|
2863
|
+
modelValue: i.value,
|
|
2864
|
+
"onUpdate:modelValue": (s) => i.value = s,
|
|
2865
|
+
onClickTrigger: I,
|
|
2866
|
+
onChangeTrigger: x,
|
|
2867
|
+
content: i == null ? void 0 : i.content
|
|
2868
|
+
}, wl({ _: 2 }, [
|
|
2869
|
+
he(G.$slots, (s, w) => ({
|
|
2870
|
+
name: w,
|
|
2871
|
+
fn: ne((W) => [
|
|
2872
|
+
He(G.$slots, w, xl({ ref_for: !0 }, W || {}), void 0, !0)
|
|
2873
|
+
])
|
|
2874
|
+
}))
|
|
2875
|
+
]), 1064, ["modelValue", "onUpdate:modelValue", "content"]))
|
|
2876
|
+
]))), 128)) : Ae("", !0)
|
|
2877
|
+
], 64);
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2880
|
+
}), Fn = /* @__PURE__ */ Ce(Bn, [["__scopeId", "data-v-d7c99969"]]), An = /* @__PURE__ */ je({
|
|
2881
|
+
__name: "index",
|
|
2882
|
+
props: {
|
|
2883
|
+
itemData: {
|
|
2884
|
+
type: Array,
|
|
2885
|
+
default: () => []
|
|
2886
|
+
},
|
|
2887
|
+
childItemData: {
|
|
2888
|
+
type: Array,
|
|
2889
|
+
default: () => []
|
|
2890
|
+
}
|
|
2891
|
+
},
|
|
2892
|
+
emits: ["clickStep"],
|
|
2893
|
+
setup(C, { emit: L }) {
|
|
2894
|
+
const v = C, l = L, y = B({}), D = B([]), N = (m, E) => {
|
|
2895
|
+
l("clickStep", m, E);
|
|
2896
|
+
};
|
|
2897
|
+
return ke(() => v == null ? void 0 : v.itemData, (m) => {
|
|
2898
|
+
var E, I;
|
|
2899
|
+
D.value = (E = m == null ? void 0 : m.find((x) => (x == null ? void 0 : x.key) === "stepList")) == null ? void 0 : E.contents, y.value = (I = m == null ? void 0 : m.find((x) => (x == null ? void 0 : x.key) === "stepConfig")) == null ? void 0 : I.contents;
|
|
2900
|
+
}, {
|
|
2901
|
+
immediate: !0
|
|
2902
|
+
}), (m, E) => {
|
|
2903
|
+
const I = me("svg-icon");
|
|
2904
|
+
return A(), ye(Fn, {
|
|
2905
|
+
stepConfig: y.value,
|
|
2906
|
+
stepList: D.value,
|
|
2907
|
+
onClickStep: N
|
|
2908
|
+
}, {
|
|
2909
|
+
icon: ne(() => [
|
|
2910
|
+
z(I, { name: "import" })
|
|
2911
|
+
]),
|
|
2912
|
+
title: ne(({ title: x }) => [
|
|
2913
|
+
Pe(Y(x), 1)
|
|
2914
|
+
]),
|
|
2915
|
+
description: ne(({ description: x }) => [
|
|
2916
|
+
Pe(Y(x), 1)
|
|
2917
|
+
]),
|
|
2918
|
+
_: 1
|
|
2919
|
+
}, 8, ["stepConfig", "stepList"]);
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
}), Ln = /* @__PURE__ */ je({
|
|
2923
|
+
__name: "index",
|
|
2924
|
+
props: {
|
|
2925
|
+
activities: {
|
|
2926
|
+
type: Array,
|
|
2927
|
+
default: () => []
|
|
2928
|
+
},
|
|
2929
|
+
timeLineConfig: {
|
|
2930
|
+
type: Object,
|
|
2931
|
+
default: () => {
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
},
|
|
2935
|
+
setup(C) {
|
|
2936
|
+
return (L, v) => {
|
|
2937
|
+
const l = me("el-timeline-item"), y = me("el-timeline");
|
|
2938
|
+
return A(), ye(y, null, {
|
|
2939
|
+
default: ne(() => [
|
|
2940
|
+
(A(!0), J(fe, null, he(C.activities, (D, N) => (A(), ye(l, {
|
|
2941
|
+
key: N,
|
|
2942
|
+
timestamp: D.timestamp,
|
|
2943
|
+
placement: C.timeLineConfig.placement,
|
|
2944
|
+
center: C.timeLineConfig.isCenter,
|
|
2945
|
+
"hide-timestamp": !0,
|
|
2946
|
+
type: C.timeLineConfig.type,
|
|
2947
|
+
color: C.timeLineConfig.color,
|
|
2948
|
+
size: C.timeLineConfig.size,
|
|
2949
|
+
icon: C.timeLineConfig.icon,
|
|
2950
|
+
hollow: C.timeLineConfig.isHollow
|
|
2951
|
+
}, {
|
|
2952
|
+
default: ne(() => [
|
|
2953
|
+
He(L.$slots, "content", {
|
|
2954
|
+
content: D == null ? void 0 : D.content,
|
|
2955
|
+
timestamp: D == null ? void 0 : D.timestamp
|
|
2956
|
+
}, void 0, !0)
|
|
2957
|
+
]),
|
|
2958
|
+
_: 2
|
|
2959
|
+
}, 1032, ["timestamp", "placement", "center", "type", "color", "size", "icon", "hollow"]))), 128))
|
|
2960
|
+
]),
|
|
2961
|
+
_: 3
|
|
2962
|
+
});
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
}), Sn = /* @__PURE__ */ Ce(Ln, [["__scopeId", "data-v-4172a886"]]), Vn = { class: "line-content" }, On = { class: "line-time" }, Rn = /* @__PURE__ */ je({
|
|
2966
|
+
__name: "index",
|
|
2967
|
+
props: {
|
|
2968
|
+
itemData: {
|
|
2969
|
+
type: Array,
|
|
2970
|
+
default: () => []
|
|
2971
|
+
}
|
|
2972
|
+
},
|
|
2973
|
+
setup(C) {
|
|
2974
|
+
const L = C, v = B({}), l = B([]);
|
|
2975
|
+
return ke(() => L == null ? void 0 : L.itemData, (y) => {
|
|
2976
|
+
var D, N;
|
|
2977
|
+
l.value = (D = y == null ? void 0 : y.find((m) => (m == null ? void 0 : m.key) === "timeLineList")) == null ? void 0 : D.contents, v.value = (N = y == null ? void 0 : y.find((m) => (m == null ? void 0 : m.key) === "timeLineConfig")) == null ? void 0 : N.contents;
|
|
2978
|
+
}, {
|
|
2979
|
+
immediate: !0
|
|
2980
|
+
}), (y, D) => (A(), ye(Sn, {
|
|
2981
|
+
activities: l.value,
|
|
2982
|
+
timeLineConfig: v.value
|
|
2983
|
+
}, {
|
|
2984
|
+
content: ne(({ content: N, timestamp: m }) => [
|
|
2985
|
+
u("span", Vn, Y(N), 1),
|
|
2986
|
+
u("span", On, Y(m), 1)
|
|
2987
|
+
]),
|
|
2988
|
+
_: 1
|
|
2989
|
+
}, 8, ["activities", "timeLineConfig"]));
|
|
2990
|
+
}
|
|
2991
|
+
}), Nn = /* @__PURE__ */ Ce(Rn, [["__scopeId", "data-v-b4d9deed"]]), Pn = { class: "tabs-content" }, Wn = {
|
|
2992
|
+
__name: "index",
|
|
2993
|
+
props: {
|
|
2994
|
+
itemData: {
|
|
2995
|
+
type: Array,
|
|
2996
|
+
default: () => []
|
|
2997
|
+
},
|
|
2998
|
+
childItemData: {
|
|
2999
|
+
type: Array,
|
|
3000
|
+
default: () => []
|
|
3001
|
+
},
|
|
3002
|
+
index: Number
|
|
3003
|
+
},
|
|
3004
|
+
setup(C) {
|
|
3005
|
+
const L = C, v = B([]);
|
|
3006
|
+
return ke(
|
|
3007
|
+
() => L == null ? void 0 : L.itemData,
|
|
3008
|
+
(l) => {
|
|
3009
|
+
const y = l.find((D) => (D == null ? void 0 : D.key) == "stepList");
|
|
3010
|
+
y && (v.value = y.contents.map((D) => ({
|
|
3011
|
+
value: D.value || D.title,
|
|
3012
|
+
label: D.label || D.title,
|
|
3013
|
+
children: D.children || []
|
|
3014
|
+
// 关键:传递子内容
|
|
3015
|
+
})));
|
|
3016
|
+
},
|
|
3017
|
+
{ immediate: !0, deep: !0 }
|
|
3018
|
+
), (l, y) => (A(), J("div", Pn, [
|
|
3019
|
+
z(El, { tabsContents: v.value }, null, 8, ["tabsContents"])
|
|
3020
|
+
]));
|
|
3021
|
+
}
|
|
3022
|
+
}, Un = /* @__PURE__ */ Ce(Wn, [["__scopeId", "data-v-d3bb10b7"]]), Xe = al("tabComp", {
|
|
3023
|
+
state: () => ({
|
|
3024
|
+
itemData: [],
|
|
3025
|
+
originalData: [],
|
|
3026
|
+
extraContents: [],
|
|
3027
|
+
nodeDev: "",
|
|
3028
|
+
isEdit: "view",
|
|
3029
|
+
isRefreshCurStructure: !1,
|
|
3030
|
+
isSubmitCurStructure: !1,
|
|
3031
|
+
curStructureCompIds: []
|
|
3032
|
+
}),
|
|
3033
|
+
actions: {
|
|
3034
|
+
setItemData(C) {
|
|
3035
|
+
this.itemData = C;
|
|
3036
|
+
},
|
|
3037
|
+
setCurStructureCompIds(C) {
|
|
3038
|
+
this.curStructureCompIds = C;
|
|
3039
|
+
},
|
|
3040
|
+
setRefreshCurStructure(C) {
|
|
3041
|
+
this.isRefreshCurStructure = C;
|
|
3042
|
+
},
|
|
3043
|
+
setOriginalData(C) {
|
|
3044
|
+
this.originalData = C;
|
|
3045
|
+
},
|
|
3046
|
+
setExtraContents(C) {
|
|
3047
|
+
this.extraContents = C;
|
|
3048
|
+
},
|
|
3049
|
+
setNodeDev(C) {
|
|
3050
|
+
this.nodeDev = C;
|
|
3051
|
+
},
|
|
3052
|
+
setIsEdit(C) {
|
|
3053
|
+
this.isEdit = C;
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
}), zn = { class: "type-select" }, jn = ["onClick"], Mn = { class: "list-icon" }, Kn = {
|
|
3057
|
+
__name: "modelSelect",
|
|
3058
|
+
setup(C) {
|
|
3059
|
+
const L = Xe(Se), { itemData: v } = Ue(L), l = (y) => {
|
|
3060
|
+
const D = h(v.value);
|
|
3061
|
+
D.push({
|
|
3062
|
+
comp: y.comp,
|
|
3063
|
+
name: y.name,
|
|
3064
|
+
compData: []
|
|
3065
|
+
}), L.setItemData(D);
|
|
3066
|
+
};
|
|
3067
|
+
return (y, D) => {
|
|
3068
|
+
const N = me("svg-icon");
|
|
3069
|
+
return A(), J("div", zn, [
|
|
3070
|
+
(A(!0), J(fe, null, he(Dl(To), (m, E) => (A(), J("div", {
|
|
3071
|
+
class: "type-list",
|
|
3072
|
+
key: E
|
|
3073
|
+
}, [
|
|
3074
|
+
u("div", {
|
|
3075
|
+
class: "list-content",
|
|
3076
|
+
onClick: (I) => l(m)
|
|
3077
|
+
}, [
|
|
3078
|
+
u("div", Mn, [
|
|
3079
|
+
z(N, {
|
|
3080
|
+
name: m.icon
|
|
3081
|
+
}, null, 8, ["name"])
|
|
3082
|
+
]),
|
|
3083
|
+
u("div", null, Y(m.name), 1)
|
|
3084
|
+
], 8, jn)
|
|
3085
|
+
]))), 128))
|
|
3086
|
+
]);
|
|
3087
|
+
};
|
|
3088
|
+
}
|
|
3089
|
+
}, Jn = /* @__PURE__ */ Ce(Kn, [["__scopeId", "data-v-91799bf8"]]), Gn = { class: "fill-content" }, qn = { class: "operate-content" }, Hn = { class: "collapse-title-content" }, Qn = { class: "collapse-title-item" }, Xn = { key: 1 }, Yn = ["onClick"], Zn = { class: "icon-content" }, eo = {
|
|
3090
|
+
key: 0,
|
|
3091
|
+
class: "edit-content"
|
|
3092
|
+
}, lo = ["onClick"], ao = { class: "comp-child" }, no = {
|
|
3093
|
+
__name: "modelFill",
|
|
3094
|
+
setup(C) {
|
|
3095
|
+
const L = Xe(Se), { itemData: v, originalData: l } = Ue(L), y = B([]);
|
|
3096
|
+
B([]);
|
|
3097
|
+
const D = B([]), N = B([]), m = (R) => {
|
|
3098
|
+
var S;
|
|
3099
|
+
let T = (S = h(N.value)) == null ? void 0 : S.map((d, t) => (R === t && (d.content = !0), d));
|
|
3100
|
+
N.value = T;
|
|
3101
|
+
}, E = (R) => {
|
|
3102
|
+
var S;
|
|
3103
|
+
let T = (S = h(N.value)) == null ? void 0 : S.map((d, t) => (R === t && (d.content = !1), d));
|
|
3104
|
+
N.value = T, y.value = h(v.value);
|
|
3105
|
+
}, I = (R, T) => {
|
|
3106
|
+
var P;
|
|
3107
|
+
let S = (P = h(N.value)) == null ? void 0 : P.map((n, i) => (R === i && (n.content = !1), n));
|
|
3108
|
+
N.value = S;
|
|
3109
|
+
const d = h(v.value), t = d == null ? void 0 : d.filter((n, i) => (i === R && (n.name = T), n));
|
|
3110
|
+
L.setOriginalData(t), L.setItemData(t);
|
|
3111
|
+
};
|
|
3112
|
+
ke(
|
|
3113
|
+
() => v.value,
|
|
3114
|
+
() => {
|
|
3115
|
+
var R, T, S;
|
|
3116
|
+
!v.value || ((R = v.value) == null ? void 0 : R.length) === 0 ? y.value = [] : y.value = (T = h(v.value)) == null ? void 0 : T.filter((d) => (d == null ? void 0 : d.comp) !== "methodButton"), D.value = y.value, N.value = (S = h(D.value)) == null ? void 0 : S.map((d, t) => ({
|
|
3117
|
+
id: t,
|
|
3118
|
+
content: !1
|
|
3119
|
+
}));
|
|
3120
|
+
},
|
|
3121
|
+
{ deep: !0, immediate: !0 }
|
|
3122
|
+
);
|
|
3123
|
+
const x = (R) => nl(R), G = (R, T, S) => {
|
|
3124
|
+
var t, P;
|
|
3125
|
+
if (!R) return;
|
|
3126
|
+
let d = h(v.value);
|
|
3127
|
+
d = (t = d == null ? void 0 : d.map((n, i) => (i === S && (n.compData = R), n))) == null ? void 0 : t.filter((n) => (n == null ? void 0 : n.comp) !== "methodButton"), N.value = (P = h(d)) == null ? void 0 : P.map((n, i) => ({
|
|
3128
|
+
id: i,
|
|
3129
|
+
content: !1
|
|
3130
|
+
})), L.setOriginalData(d), L.setItemData(d);
|
|
3131
|
+
}, O = (R) => {
|
|
3132
|
+
Ne.confirm("是否确认要删除", "", {
|
|
3133
|
+
confirmButtonText: "确认",
|
|
3134
|
+
cancelButtonText: "取消",
|
|
3135
|
+
type: "warning"
|
|
3136
|
+
}).then(() => {
|
|
3137
|
+
const T = h(v.value), S = T == null ? void 0 : T.filter((d, t) => t !== R);
|
|
3138
|
+
L.setOriginalData(S), L.setItemData(S), Re({
|
|
3139
|
+
type: "success",
|
|
3140
|
+
message: "删除成功"
|
|
3141
|
+
});
|
|
3142
|
+
}).catch(() => {
|
|
3143
|
+
});
|
|
3144
|
+
};
|
|
3145
|
+
return (R, T) => {
|
|
3146
|
+
const S = me("svg-icon");
|
|
3147
|
+
return A(), J("div", Gn, [
|
|
3148
|
+
T[1] || (T[1] = u("div", { class: "fill-operate" }, Y("操作栏"), -1)),
|
|
3149
|
+
u("div", qn, [
|
|
3150
|
+
z(Sl, {
|
|
3151
|
+
class: "collapse-content",
|
|
3152
|
+
collapseContents: y.value
|
|
3153
|
+
}, {
|
|
3154
|
+
title: ne(({ item: d, index: t }) => {
|
|
3155
|
+
var P, n, i, e, s, w, W, Q, de, re;
|
|
3156
|
+
return [
|
|
3157
|
+
u("div", Hn, [
|
|
3158
|
+
u("div", Qn, [
|
|
3159
|
+
(n = (P = N.value) == null ? void 0 : P.find((a) => a.id === t)) != null && n.content ? Ae("", !0) : (A(), J("div", {
|
|
3160
|
+
key: 0,
|
|
3161
|
+
class: "collapse-title",
|
|
3162
|
+
style: Il({ marginRight: d.name && d.name !== "" ? "8px" : "0px" })
|
|
3163
|
+
}, Y(d.name), 5)),
|
|
3164
|
+
(e = (i = N.value) == null ? void 0 : i.find((a) => a.id === t)) != null && e.content ? (A(), J("div", Xn, [
|
|
3165
|
+
z(Bl, {
|
|
3166
|
+
modelValue: d.name,
|
|
3167
|
+
"onUpdate:modelValue": (a) => d.name = a,
|
|
3168
|
+
onClick: T[0] || (T[0] = Ke(() => {
|
|
3169
|
+
}, ["stop"]))
|
|
3170
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3171
|
+
])) : Ae("", !0),
|
|
3172
|
+
(w = (s = N.value) == null ? void 0 : s.find((a) => a.id === t)) != null && w.content ? Ae("", !0) : (A(), J("div", {
|
|
3173
|
+
key: 2,
|
|
3174
|
+
onClick: Ke((a) => m(t), ["stop"]),
|
|
3175
|
+
class: "icon-content"
|
|
3176
|
+
}, [
|
|
3177
|
+
z(S, {
|
|
3178
|
+
name: "Edit",
|
|
3179
|
+
style: { width: "16px", height: "16px" }
|
|
3180
|
+
})
|
|
3181
|
+
], 8, Yn))
|
|
3182
|
+
]),
|
|
3183
|
+
u("div", Zn, [
|
|
3184
|
+
(Q = (W = N.value) == null ? void 0 : W.find((a) => a.id === t)) != null && Q.content ? (A(), J("div", eo, [
|
|
3185
|
+
z(S, {
|
|
3186
|
+
name: "Cancel",
|
|
3187
|
+
style: { width: "16px", height: "16px" },
|
|
3188
|
+
class: "icon-content",
|
|
3189
|
+
onClick: Ke((a) => E(t), ["stop"])
|
|
3190
|
+
}, null, 8, ["onClick"]),
|
|
3191
|
+
z(S, {
|
|
3192
|
+
name: "Save",
|
|
3193
|
+
onClick: Ke((a) => I(t, d.name), ["stop"]),
|
|
3194
|
+
style: { width: "16px", height: "16px", fill: "var(--ssComponent-primary-color)" },
|
|
3195
|
+
class: "icon-content"
|
|
3196
|
+
}, null, 8, ["onClick"])
|
|
3197
|
+
])) : Ae("", !0),
|
|
3198
|
+
(re = (de = N.value) == null ? void 0 : de.find((a) => a.id === t)) != null && re.content ? Ae("", !0) : (A(), J("div", {
|
|
3199
|
+
key: 1,
|
|
3200
|
+
onClick: Ke((a) => O(t), ["stop"]),
|
|
3201
|
+
class: "icon-content"
|
|
3202
|
+
}, [
|
|
3203
|
+
z(S, {
|
|
3204
|
+
name: "Delete",
|
|
3205
|
+
style: { width: "16px", height: "16px" }
|
|
3206
|
+
})
|
|
3207
|
+
], 8, lo))
|
|
3208
|
+
])
|
|
3209
|
+
])
|
|
3210
|
+
];
|
|
3211
|
+
}),
|
|
3212
|
+
content: ne(({ item: d, index: t }) => {
|
|
3213
|
+
var P, n;
|
|
3214
|
+
return [
|
|
3215
|
+
u("div", ao, [
|
|
3216
|
+
(A(), ye(Ge(x(d.comp + "Operate")), {
|
|
3217
|
+
itemContents: d == null ? void 0 : d.compData,
|
|
3218
|
+
originalItemContents: (n = (P = D.value) == null ? void 0 : P.find((i, e) => e === t)) == null ? void 0 : n.compData,
|
|
3219
|
+
onChange: (i) => G(i, d, t)
|
|
3220
|
+
}, null, 40, ["itemContents", "originalItemContents", "onChange"]))
|
|
3221
|
+
])
|
|
3222
|
+
];
|
|
3223
|
+
}),
|
|
3224
|
+
_: 1
|
|
3225
|
+
}, 8, ["collapseContents"])
|
|
3226
|
+
])
|
|
3227
|
+
]);
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
}, oo = /* @__PURE__ */ Ce(no, [["__scopeId", "data-v-78d7fc46"]]), so = {
|
|
3231
|
+
key: 0,
|
|
3232
|
+
class: "show-content"
|
|
3233
|
+
}, io = { style: { display: "flex" } }, uo = {
|
|
3234
|
+
__name: "modelShow",
|
|
3235
|
+
setup(C) {
|
|
3236
|
+
const L = Xe(Se), { itemData: v } = Ue(L), l = B([]);
|
|
3237
|
+
ke(
|
|
3238
|
+
() => v.value,
|
|
3239
|
+
() => {
|
|
3240
|
+
var D;
|
|
3241
|
+
!v.value || ((D = v.value) == null ? void 0 : D.length) === 0 ? l.value = [] : l.value = h(v.value);
|
|
3242
|
+
},
|
|
3243
|
+
{ deep: !0, immediate: !0 }
|
|
3244
|
+
);
|
|
3245
|
+
const y = (D) => nl(D);
|
|
3246
|
+
return (D, N) => {
|
|
3247
|
+
var m;
|
|
3248
|
+
return ((m = l.value) == null ? void 0 : m.length) > 0 ? (A(), J("div", so, [
|
|
3249
|
+
(A(!0), J(fe, null, he(l.value, (E, I) => (A(), J("div", {
|
|
3250
|
+
class: "item-content",
|
|
3251
|
+
key: I
|
|
3252
|
+
}, [
|
|
3253
|
+
u("div", io, Y(E.name), 1),
|
|
3254
|
+
(A(), ye(Ge(y(E.comp)), {
|
|
3255
|
+
itemData: E == null ? void 0 : E.compData,
|
|
3256
|
+
childItemData: E == null ? void 0 : E.itemChildData,
|
|
3257
|
+
key: I
|
|
3258
|
+
}, null, 8, ["itemData", "childItemData"]))
|
|
3259
|
+
]))), 128))
|
|
3260
|
+
])) : Ae("", !0);
|
|
3261
|
+
};
|
|
3262
|
+
}
|
|
3263
|
+
}, ro = /* @__PURE__ */ Ce(uo, [["__scopeId", "data-v-3f3e863e"]]), to = { class: "tabs-header" }, co = { class: "tabs-list" }, vo = { class: "tab-name" }, po = { class: "tab-actions" }, fo = ["onClick"], ho = ["onClick"], mo = ["onClick"], yo = { class: "model-operate" }, bo = {
|
|
3264
|
+
class: "model-select",
|
|
3265
|
+
style: { display: "unset" }
|
|
3266
|
+
}, Co = { class: "existing-components" }, go = { class: "component-list" }, ko = ["onClick"], _o = { class: "component-info" }, wo = { class: "component-type" }, xo = { class: "component-name" }, Do = { class: "model-fill" }, Io = {
|
|
3267
|
+
__name: "operate",
|
|
3268
|
+
props: {
|
|
3269
|
+
itemContents: {
|
|
3270
|
+
type: Array,
|
|
3271
|
+
default: () => []
|
|
3272
|
+
}
|
|
3273
|
+
},
|
|
3274
|
+
emits: ["change"],
|
|
3275
|
+
setup(C, { emit: L }) {
|
|
3276
|
+
const v = C, l = L, y = B([]), D = B(!1), N = B(""), m = B({ title: "" }), E = B(-1), I = B(!1), x = B(-1), G = B(/* @__PURE__ */ new Map()), O = B(null), R = Xe(Se), { itemData: T } = Ue(R), S = () => {
|
|
3277
|
+
N.value = "新增标签页", m.value.title = "", E.value = -1, D.value = !0;
|
|
3278
|
+
}, d = (r) => {
|
|
3279
|
+
N.value = "修改标签页", m.value.title = y.value[r].title, E.value = r, D.value = !0;
|
|
3280
|
+
}, t = (r) => {
|
|
3281
|
+
const p = i(r);
|
|
3282
|
+
G.value.delete(p), y.value.splice(r, 1), b();
|
|
3283
|
+
}, P = () => {
|
|
3284
|
+
if (m.value.title.trim()) {
|
|
3285
|
+
if (E.value === -1) {
|
|
3286
|
+
const r = {
|
|
3287
|
+
title: m.value.title,
|
|
3288
|
+
value: m.value.title,
|
|
3289
|
+
label: m.value.title,
|
|
3290
|
+
children: [],
|
|
3291
|
+
id: n()
|
|
3292
|
+
};
|
|
3293
|
+
y.value.push(r);
|
|
3294
|
+
} else
|
|
3295
|
+
y.value[E.value].title = m.value.title, y.value[E.value].value = m.value.title, y.value[E.value].label = m.value.title;
|
|
3296
|
+
D.value = !1, b();
|
|
3297
|
+
}
|
|
3298
|
+
}, n = () => `tab_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, i = (r) => {
|
|
3299
|
+
const p = y.value[r];
|
|
3300
|
+
return p.id || (p.id = n()), p.id;
|
|
3301
|
+
}, e = (r) => {
|
|
3302
|
+
var ae;
|
|
3303
|
+
x.value = r;
|
|
3304
|
+
const p = i(r);
|
|
3305
|
+
O.value = h(T.value);
|
|
3306
|
+
let M = G.value.get(p);
|
|
3307
|
+
!M && ((ae = y.value[r].children) == null ? void 0 : ae.length) > 0 && (M = Q(y.value[r].children)), M ? R.setItemData(h(M)) : R.setItemData([]), I.value = !0;
|
|
3308
|
+
}, s = ll(() => {
|
|
3309
|
+
const r = cl(Se), p = Ue(r).itemData.value;
|
|
3310
|
+
return console.log("可用组件数据", p), !p || !Array.isArray(p) ? [] : p.filter((M) => {
|
|
3311
|
+
var ae;
|
|
3312
|
+
if (M.comp === "Tabs" && x.value >= 0) {
|
|
3313
|
+
const ue = i(x.value);
|
|
3314
|
+
if ((ae = M.compData) == null ? void 0 : ae.some(
|
|
3315
|
+
(q) => {
|
|
3316
|
+
var F;
|
|
3317
|
+
return q.key === "stepList" && ((F = q.contents) == null ? void 0 : F.some((oe) => oe.id === ue));
|
|
3318
|
+
}
|
|
3319
|
+
)) return !1;
|
|
3320
|
+
}
|
|
3321
|
+
return !0;
|
|
3322
|
+
});
|
|
3323
|
+
}), w = (r) => ({
|
|
3324
|
+
Table: "表格",
|
|
3325
|
+
Form: "表单",
|
|
3326
|
+
Tabs: "标签页",
|
|
3327
|
+
Chart: "图表",
|
|
3328
|
+
Card: "卡片"
|
|
3329
|
+
})[r] || r, W = (r) => {
|
|
3330
|
+
var p;
|
|
3331
|
+
try {
|
|
3332
|
+
const M = h(r);
|
|
3333
|
+
M.id = Date.now() + Math.random(), M.comp === "Tabs" && ((p = M.compData) == null || p.forEach((ue) => {
|
|
3334
|
+
ue.key === "stepList" && ue.contents && ue.contents.forEach((V) => {
|
|
3335
|
+
V.id = n();
|
|
3336
|
+
});
|
|
3337
|
+
}));
|
|
3338
|
+
const ae = h(T.value);
|
|
3339
|
+
ae.push(M), R.setItemData(ae);
|
|
3340
|
+
} catch (M) {
|
|
3341
|
+
console.error("添加组件失败:", M);
|
|
3342
|
+
}
|
|
3343
|
+
}, Q = (r) => r.map((p) => {
|
|
3344
|
+
var M;
|
|
3345
|
+
switch (p.type) {
|
|
3346
|
+
case "form":
|
|
3347
|
+
return {
|
|
3348
|
+
comp: "Form",
|
|
3349
|
+
name: p.value || "表单",
|
|
3350
|
+
compData: de(p.content)
|
|
3351
|
+
};
|
|
3352
|
+
case "table":
|
|
3353
|
+
return {
|
|
3354
|
+
comp: "Table",
|
|
3355
|
+
name: p.value || "表格",
|
|
3356
|
+
compData: re(p.content)
|
|
3357
|
+
};
|
|
3358
|
+
default:
|
|
3359
|
+
return {
|
|
3360
|
+
comp: "Unknown",
|
|
3361
|
+
name: p.value || "",
|
|
3362
|
+
compData: ((M = p.content) == null ? void 0 : M.originalData) || []
|
|
3363
|
+
};
|
|
3364
|
+
}
|
|
3365
|
+
}), de = (r) => {
|
|
3366
|
+
if (!r) return [];
|
|
3367
|
+
const p = [];
|
|
3368
|
+
return r.rowContents && p.push({
|
|
3369
|
+
key: "formContent",
|
|
3370
|
+
contents: r.rowContents
|
|
3371
|
+
}), r.buttonValue && p.push({
|
|
3372
|
+
key: "formButton",
|
|
3373
|
+
contents: r.buttonValue
|
|
3374
|
+
}), typeof r.isEnableWrap < "u" && p.push({
|
|
3375
|
+
key: "enableWrap",
|
|
3376
|
+
contents: r.isEnableWrap
|
|
3377
|
+
}), p;
|
|
3378
|
+
}, re = (r) => [], a = () => {
|
|
3379
|
+
if (x.value >= 0 && x.value < y.value.length) {
|
|
3380
|
+
const r = i(x.value);
|
|
3381
|
+
G.value.set(r, h(T.value)), y.value[x.value].children = _(T.value), console.log("保存后的数据", _(T.value));
|
|
3382
|
+
}
|
|
3383
|
+
I.value = !1, x.value = -1, O.value = null, b();
|
|
3384
|
+
}, k = () => {
|
|
3385
|
+
O.value && R.setItemData(h(O.value)), I.value = !1, x.value = -1, O.value = null;
|
|
3386
|
+
}, U = () => {
|
|
3387
|
+
I.value && k();
|
|
3388
|
+
}, _ = (r) => {
|
|
3389
|
+
if (!Array.isArray(r))
|
|
3390
|
+
throw new Error("sourceData must be an array");
|
|
3391
|
+
return r.map((p, M) => {
|
|
3392
|
+
if (!p || typeof p != "object")
|
|
3393
|
+
return p;
|
|
3394
|
+
const { comp: ae, name: ue, compData: V } = p;
|
|
3395
|
+
switch (ae) {
|
|
3396
|
+
case "Form":
|
|
3397
|
+
return {
|
|
3398
|
+
type: "form",
|
|
3399
|
+
content: j(V || []),
|
|
3400
|
+
value: "表单"
|
|
3401
|
+
};
|
|
3402
|
+
case "Table":
|
|
3403
|
+
return {
|
|
3404
|
+
type: "table",
|
|
3405
|
+
content: se(V || []),
|
|
3406
|
+
value: "表格"
|
|
3407
|
+
};
|
|
3408
|
+
default:
|
|
3409
|
+
return {
|
|
3410
|
+
type: "xxx",
|
|
3411
|
+
content: te(V || []),
|
|
3412
|
+
value: ""
|
|
3413
|
+
};
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
3416
|
+
}, j = (r) => {
|
|
3417
|
+
const p = {
|
|
3418
|
+
formRules: {},
|
|
3419
|
+
rowContents: [],
|
|
3420
|
+
buttonValue: [],
|
|
3421
|
+
rowValues: [],
|
|
3422
|
+
isEnableWrap: !0,
|
|
3423
|
+
isRowFlex: !0,
|
|
3424
|
+
isButtonRow: !0,
|
|
3425
|
+
isEdit: !0,
|
|
3426
|
+
isStartJustify: !0
|
|
3427
|
+
}, M = {
|
|
3428
|
+
formContent: "rowContents",
|
|
3429
|
+
enableWrap: "isEnableWrap",
|
|
3430
|
+
formButton: "buttonValue"
|
|
3431
|
+
};
|
|
3432
|
+
return r.forEach((ae, ue) => {
|
|
3433
|
+
if (!ae || typeof ae != "object") {
|
|
3434
|
+
console.warn(`Invalid config at index ${ue}:`, ae);
|
|
3435
|
+
return;
|
|
3436
|
+
}
|
|
3437
|
+
const { key: V, contents: q } = ae, F = M[V];
|
|
3438
|
+
if (!F) {
|
|
3439
|
+
console.warn(`Unknown Form config key: ${V}`);
|
|
3440
|
+
return;
|
|
3441
|
+
}
|
|
3442
|
+
V === "enableWrap" ? p[F] = !!q : p[F] = Array.isArray(q) ? q : [];
|
|
3443
|
+
}), p;
|
|
3444
|
+
}, se = (r) => {
|
|
3445
|
+
const p = {
|
|
3446
|
+
columns: [],
|
|
3447
|
+
tableData: [],
|
|
3448
|
+
extraButton: [],
|
|
3449
|
+
rowButton: [],
|
|
3450
|
+
currentPage: 0,
|
|
3451
|
+
total: 0,
|
|
3452
|
+
pageSize: 0,
|
|
3453
|
+
isShowPagination: !0,
|
|
3454
|
+
isShowEdit: !0,
|
|
3455
|
+
isMoveColumn: !0,
|
|
3456
|
+
isShowDelete: !0
|
|
3457
|
+
}, M = {
|
|
3458
|
+
header: "columns",
|
|
3459
|
+
tableContents: "tableData"
|
|
3460
|
+
};
|
|
3461
|
+
return r.forEach((ae, ue) => {
|
|
3462
|
+
if (!ae || typeof ae != "object") {
|
|
3463
|
+
console.warn(`Invalid config at index ${ue}:`, ae);
|
|
3464
|
+
return;
|
|
3465
|
+
}
|
|
3466
|
+
const { key: V, contents: q } = ae, F = M[V];
|
|
3467
|
+
if (!F) {
|
|
3468
|
+
console.warn(`Unknown Table config key: ${V}`);
|
|
3469
|
+
return;
|
|
3470
|
+
}
|
|
3471
|
+
p[F] = Array.isArray(q) ? q : [];
|
|
3472
|
+
}), p;
|
|
3473
|
+
}, te = (r) => (console.log("Default conversion logic - to be implemented"), {
|
|
3474
|
+
originalData: r,
|
|
3475
|
+
processed: !1,
|
|
3476
|
+
componentType: "unknown"
|
|
3477
|
+
}), b = () => {
|
|
3478
|
+
const r = [
|
|
3479
|
+
{
|
|
3480
|
+
key: "stepList",
|
|
3481
|
+
contents: y.value
|
|
3482
|
+
}
|
|
3483
|
+
];
|
|
3484
|
+
l("change", r);
|
|
3485
|
+
};
|
|
3486
|
+
return ke(
|
|
3487
|
+
() => v.itemContents,
|
|
3488
|
+
(r) => {
|
|
3489
|
+
if (r && r.length > 0) {
|
|
3490
|
+
const p = r.find((M) => M.key === "stepList");
|
|
3491
|
+
p && p.contents && (y.value = p.contents.map((M) => ({
|
|
3492
|
+
title: M.title || "",
|
|
3493
|
+
value: M.value || M.title || "",
|
|
3494
|
+
label: M.label || M.title || "",
|
|
3495
|
+
children: M.children || [],
|
|
3496
|
+
id: M.id || n()
|
|
3497
|
+
})));
|
|
3498
|
+
}
|
|
3499
|
+
},
|
|
3500
|
+
{ immediate: !0, deep: !0 }
|
|
3501
|
+
), (r, p) => {
|
|
3502
|
+
const M = me("svg-icon"), ae = me("el-input"), ue = me("el-form-item"), V = me("el-form");
|
|
3503
|
+
return A(), J("div", null, [
|
|
3504
|
+
u("div", to, [
|
|
3505
|
+
p[6] || (p[6] = u("h4", null, "标签页管理", -1)),
|
|
3506
|
+
u("button", { onClick: S }, [
|
|
3507
|
+
z(M, {
|
|
3508
|
+
name: "Plus",
|
|
3509
|
+
style: { width: "14px", height: "14px", "margin-right": "4px" }
|
|
3510
|
+
}),
|
|
3511
|
+
p[5] || (p[5] = Pe(" 新增标签页 "))
|
|
3512
|
+
])
|
|
3513
|
+
]),
|
|
3514
|
+
u("div", co, [
|
|
3515
|
+
(A(!0), J(fe, null, he(y.value, (q, F) => (A(), J("div", {
|
|
3516
|
+
class: "tab-item",
|
|
3517
|
+
key: F
|
|
3518
|
+
}, [
|
|
3519
|
+
u("span", vo, Y(q.title), 1),
|
|
3520
|
+
u("div", po, [
|
|
3521
|
+
u("button", {
|
|
3522
|
+
onClick: (oe) => d(F)
|
|
3523
|
+
}, "修改标题", 8, fo),
|
|
3524
|
+
u("button", {
|
|
3525
|
+
onClick: (oe) => e(F)
|
|
3526
|
+
}, "布局调整", 8, ho),
|
|
3527
|
+
u("button", {
|
|
3528
|
+
onClick: (oe) => t(F)
|
|
3529
|
+
}, "删除", 8, mo)
|
|
3530
|
+
])
|
|
3531
|
+
]))), 128))
|
|
3532
|
+
]),
|
|
3533
|
+
z(De, {
|
|
3534
|
+
modelValue: D.value,
|
|
3535
|
+
"onUpdate:modelValue": p[2] || (p[2] = (q) => D.value = q),
|
|
3536
|
+
title: N.value,
|
|
3537
|
+
onBeforeDestroy: p[3] || (p[3] = (q) => D.value = !1)
|
|
3538
|
+
}, {
|
|
3539
|
+
footer: ne(() => [
|
|
3540
|
+
u("button", {
|
|
3541
|
+
onClick: p[1] || (p[1] = (q) => D.value = !1)
|
|
3542
|
+
}, "取消"),
|
|
3543
|
+
u("button", {
|
|
3544
|
+
type: "primary",
|
|
3545
|
+
onClick: P
|
|
3546
|
+
}, "确定")
|
|
3547
|
+
]),
|
|
3548
|
+
default: ne(() => [
|
|
3549
|
+
z(V, {
|
|
3550
|
+
model: m.value,
|
|
3551
|
+
"label-width": "80px"
|
|
3552
|
+
}, {
|
|
3553
|
+
default: ne(() => [
|
|
3554
|
+
z(ue, {
|
|
3555
|
+
label: "标签名称",
|
|
3556
|
+
required: ""
|
|
3557
|
+
}, {
|
|
3558
|
+
default: ne(() => [
|
|
3559
|
+
z(ae, {
|
|
3560
|
+
modelValue: m.value.title,
|
|
3561
|
+
"onUpdate:modelValue": p[0] || (p[0] = (q) => m.value.title = q),
|
|
3562
|
+
placeholder: "请输入标签页名称"
|
|
3563
|
+
}, null, 8, ["modelValue"])
|
|
3564
|
+
]),
|
|
3565
|
+
_: 1
|
|
3566
|
+
})
|
|
3567
|
+
]),
|
|
3568
|
+
_: 1
|
|
3569
|
+
}, 8, ["model"])
|
|
3570
|
+
]),
|
|
3571
|
+
_: 1
|
|
3572
|
+
}, 8, ["modelValue", "title"]),
|
|
3573
|
+
z(De, {
|
|
3574
|
+
modelValue: I.value,
|
|
3575
|
+
"onUpdate:modelValue": p[4] || (p[4] = (q) => I.value = q),
|
|
3576
|
+
title: "布局调整",
|
|
3577
|
+
fullScreen: "",
|
|
3578
|
+
onBeforeDestroy: U
|
|
3579
|
+
}, {
|
|
3580
|
+
footer: ne(() => [
|
|
3581
|
+
u("button", { onClick: k }, "取消"),
|
|
3582
|
+
u("button", { onClick: a }, "确定")
|
|
3583
|
+
]),
|
|
3584
|
+
default: ne(() => [
|
|
3585
|
+
u("div", yo, [
|
|
3586
|
+
u("div", bo, [
|
|
3587
|
+
z(Jn),
|
|
3588
|
+
u("div", Co, [
|
|
3589
|
+
p[8] || (p[8] = u("h5", null, "添加已有组件", -1)),
|
|
3590
|
+
u("div", go, [
|
|
3591
|
+
(A(!0), J(fe, null, he(s.value, (q) => (A(), J("div", {
|
|
3592
|
+
key: q.id,
|
|
3593
|
+
class: "component-item",
|
|
3594
|
+
onClick: (F) => W(q)
|
|
3595
|
+
}, [
|
|
3596
|
+
u("div", _o, [
|
|
3597
|
+
u("span", wo, Y(w(q.comp)), 1),
|
|
3598
|
+
u("span", xo, Y(q.name), 1)
|
|
3599
|
+
]),
|
|
3600
|
+
p[7] || (p[7] = u("button", { class: "add-btn" }, "添加", -1))
|
|
3601
|
+
], 8, ko))), 128))
|
|
3602
|
+
])
|
|
3603
|
+
])
|
|
3604
|
+
]),
|
|
3605
|
+
(A(), J("div", {
|
|
3606
|
+
class: "model-show",
|
|
3607
|
+
key: r.innerWidth
|
|
3608
|
+
}, [
|
|
3609
|
+
z(ro)
|
|
3610
|
+
])),
|
|
3611
|
+
u("div", Do, [
|
|
3612
|
+
z(oo)
|
|
3613
|
+
])
|
|
3614
|
+
])
|
|
3615
|
+
]),
|
|
3616
|
+
_: 1
|
|
3617
|
+
}, 8, ["modelValue"])
|
|
3618
|
+
]);
|
|
3619
|
+
};
|
|
3620
|
+
}
|
|
3621
|
+
}, $o = /* @__PURE__ */ Ce(Io, [["__scopeId", "data-v-151936e8"]]), To = B([
|
|
3622
|
+
{
|
|
3623
|
+
name: "表格",
|
|
3624
|
+
type: "table",
|
|
3625
|
+
comp: "Table",
|
|
3626
|
+
icon: "Table"
|
|
3627
|
+
},
|
|
3628
|
+
{
|
|
3629
|
+
name: "表单",
|
|
3630
|
+
type: "form",
|
|
3631
|
+
comp: "Form",
|
|
3632
|
+
icon: "Form"
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
name: "折叠",
|
|
3636
|
+
type: "fold",
|
|
3637
|
+
comp: "Fold",
|
|
3638
|
+
icon: "Fold"
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
name: "头像",
|
|
3642
|
+
type: "avatar",
|
|
3643
|
+
comp: "AvatarUpload",
|
|
3644
|
+
icon: "Avatar"
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
name: "签名",
|
|
3648
|
+
type: "signature",
|
|
3649
|
+
comp: "Signature",
|
|
3650
|
+
icon: "Signature"
|
|
3651
|
+
},
|
|
3652
|
+
{
|
|
3653
|
+
name: "步骤条",
|
|
3654
|
+
type: "step",
|
|
3655
|
+
comp: "Step",
|
|
3656
|
+
icon: "Step"
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
name: "时间线",
|
|
3660
|
+
type: "timeLine",
|
|
3661
|
+
comp: "TimeLine",
|
|
3662
|
+
icon: "TimeLine"
|
|
3663
|
+
},
|
|
3664
|
+
{
|
|
3665
|
+
name: "标签页",
|
|
3666
|
+
type: "tabs",
|
|
3667
|
+
comp: "Tabs",
|
|
3668
|
+
icon: "Tabs"
|
|
3669
|
+
}
|
|
3670
|
+
]), Eo = {
|
|
3671
|
+
TABLE: _l,
|
|
3672
|
+
FORM: rl,
|
|
3673
|
+
TABLEOPERATE: Va,
|
|
3674
|
+
FORMOPERATE: tl,
|
|
3675
|
+
FOLD: dn,
|
|
3676
|
+
CALCULATOR: mn,
|
|
3677
|
+
METHODBUTTON: gn,
|
|
3678
|
+
AVATARUPLOAD: Ll,
|
|
3679
|
+
SIGNATURE: Al,
|
|
3680
|
+
FORMTOP: rl,
|
|
3681
|
+
STEP: An,
|
|
3682
|
+
STEPOPERATE: ln,
|
|
3683
|
+
TIMELINE: Nn,
|
|
3684
|
+
TIMELINEOPERATE: rn,
|
|
3685
|
+
FORMTOPOPERATE: tl,
|
|
3686
|
+
SIGNATUREOPERATE: En,
|
|
3687
|
+
AVATARUPLOADOPERATE: wn,
|
|
3688
|
+
TABS: Un,
|
|
3689
|
+
TABSOPERATE: $o
|
|
3690
|
+
// 添加其他组件...
|
|
3691
|
+
};
|
|
3692
|
+
function nl(C) {
|
|
3693
|
+
return Eo[C == null ? void 0 : C.toUpperCase()] || null;
|
|
3694
|
+
}
|
|
3695
|
+
export {
|
|
3696
|
+
nl as g,
|
|
3697
|
+
To as s,
|
|
3698
|
+
Ol as u
|
|
3699
|
+
};
|