ss-component-new 1.1.641 → 1.1.643

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