ss-component-new 1.1.259 → 1.1.261

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