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