ss-component-new 1.1.708 → 1.1.711

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