ss-component-new 1.1.642 → 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 (91) hide show
  1. package/dist/{array-NXwPkThl.js → array-B8lWuPWk.js} +1 -1
  2. package/dist/{array-Dbtz7Lsx.cjs → array-B_wsE8_t.cjs} +1 -1
  3. package/dist/{crypto-CRbcEKIz.cjs → crypto-DNSUM6-T.cjs} +11 -11
  4. package/dist/{crypto-BRyGpjGR.js → crypto-v3jAna0Y.js} +510 -383
  5. package/dist/index-B1zrlvmA.cjs +1 -0
  6. package/dist/{index-CXDZKHRU.cjs → index-B3Uwh6Xf.cjs} +1 -1
  7. package/dist/{index-OB3uYOtP.js → index-B3z_K4tN.js} +6 -6
  8. package/dist/{index-BBsDHAWZ.js → index-B98K3NQ_.js} +5 -5
  9. package/dist/{index-BfIfrYPE.cjs → index-BGU26U8N.cjs} +1 -1
  10. package/dist/index-BJOfcIfK.cjs +1 -0
  11. package/dist/{index-BdsY472L.cjs → index-BV7GMSHu.cjs} +1 -1
  12. package/dist/{index-PzEQ4jp4.js → index-BXkdOTkd.js} +6 -6
  13. package/dist/index-BdSJGJAj.cjs +1 -0
  14. package/dist/index-BgOWcpJo.cjs +1 -0
  15. package/dist/index-BgjQ12lw.cjs +1 -0
  16. package/dist/index-Bjsc84L1.js +1357 -0
  17. package/dist/index-BtbXPos3.cjs +1 -0
  18. package/dist/index-C0YmHmRc.js +3295 -0
  19. package/dist/{index-8NfsR09b.js → index-C90tv0Xl.js} +9 -10
  20. package/dist/index-CHDQYj9k.cjs +7 -0
  21. package/dist/{index-DRB19GKh.cjs → index-CUE8dRo3.cjs} +1 -1
  22. package/dist/{index-XG0z6OM7.js → index-Ce6cmWoK.js} +1 -1
  23. package/dist/{index-_BlT7Ow2.cjs → index-CeD_uFzd.cjs} +1 -1
  24. package/dist/{index-CbHQmeu4.js → index-Cf8HSIB7.js} +9 -9
  25. package/dist/{index-DUfwkFTo.js → index-CoO_L719.js} +1 -1
  26. package/dist/{index-BFyVCuzZ.cjs → index-Cq5FEQ8T.cjs} +1 -1
  27. package/dist/{index-B5AuRSn8.js → index-CstZeLoO.js} +4 -4
  28. package/dist/{index-D3bky2oL.js → index-CzRn17aQ.js} +3 -3
  29. package/dist/{index-fCS9CCui.js → index-D9rKJ22p.js} +24 -25
  30. package/dist/{index-COWiy84S.cjs → index-DDZUeSoG.cjs} +1 -1
  31. package/dist/{index-BfbJ_xue.js → index-DJq9wJbj.js} +6 -6
  32. package/dist/index-DYLTl0bA.cjs +4207 -0
  33. package/dist/{index-BRpBkjfg.js → index-DZOOs3JX.js} +5 -5
  34. package/dist/{index-FtXwh152.js → index-DaCmhrZN.js} +5 -5
  35. package/dist/{index-CuFcNSKa.cjs → index-DamR6g_M.cjs} +1 -1
  36. package/dist/{index-BHB6W84v.js → index-Dc9ujwGk.js} +1 -1
  37. package/dist/{index-BSyIQ0ln.js → index-DkuHB0rR.js} +6 -6
  38. package/dist/{index-Cm7s-8-S.js → index-DnROsSAu.js} +1 -1
  39. package/dist/{index-Cj7sq5xh.js → index-Dv0m3N6o.js} +13692 -8590
  40. package/dist/{index-QwyTcfjk.cjs → index-H7RfjeN4.cjs} +1 -1
  41. package/dist/{index-BozQhsge.js → index-S9mHFIiJ.js} +5 -6
  42. package/dist/{index-g_s98rtP.js → index-TImrSuqA.js} +7 -7
  43. package/dist/{index-C2O6ydu6.cjs → index-Wq7SUf3w.cjs} +1 -1
  44. package/dist/{index-CiK2h9lS.cjs → index-XoLdZvmA.cjs} +1 -1
  45. package/dist/{index-JEgbxSMc.cjs → index-j-6MQx0k.cjs} +1 -1
  46. package/dist/{index-BvQteht-.js → index-j_-9sdsj.js} +5 -5
  47. package/dist/{index-DXpOifO9.cjs → index-ugVCM2_1.cjs} +1 -1
  48. package/dist/{index-BCyIiXbM.cjs → index-yP9dxTXr.cjs} +1 -1
  49. package/dist/{index.vue_vue_type_script_setup_true_lang-lCLxGhnK.cjs → index.vue_vue_type_script_setup_true_lang-DPRs_TEM.cjs} +1 -1
  50. package/dist/{index.vue_vue_type_script_setup_true_lang-D4rJaOHU.js → index.vue_vue_type_script_setup_true_lang-DmZ8M3M2.js} +7 -7
  51. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CjJ2Qs6C.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CLRx6Pr7.js} +7343 -7331
  52. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D2JWjXd5.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-G9Ly6LrV.cjs} +103 -103
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_248ffa0f_lang-DjSMcKjY.js → index.vue_vue_type_style_index_0_scoped_248ffa0f_lang-Bx59UssX.js} +10202 -10565
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_248ffa0f_lang-Be3edD9f.cjs → index.vue_vue_type_style_index_0_scoped_248ffa0f_lang-Cx257lrG.cjs} +13 -13
  55. package/dist/index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-BxhCfpJ1.cjs +1 -0
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-NJi92cYh.js → index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-DnzbmtTR.js} +8 -8
  57. package/dist/{main-CAYpf8hk.js → main-B3z7cAFc.js} +5 -5
  58. package/dist/{main-C-_H5AZI.cjs → main-Bytk3eJi.cjs} +1 -1
  59. package/dist/{menu-nedhfMQM.cjs → menu-CcabvNj6.cjs} +10 -10
  60. package/dist/{menu-Cl42pSjw.js → menu-EkyEcRhA.js} +1172 -1173
  61. package/dist/{modelComp-DWx0hNJL.js → modelComp-DocJQ-pY.js} +1 -1
  62. package/dist/{modelComp-VVOVTdqN.cjs → modelComp-MsmKaqKZ.cjs} +1 -1
  63. package/dist/ss-component.cjs +1 -1
  64. package/dist/ss-component.css +1 -1
  65. package/dist/ss-component.js +9 -9
  66. package/dist/ss-component2.cjs +1 -1
  67. package/dist/ss-component2.js +9 -9
  68. package/dist/{threeModel-BaOJ31_z.js → threeModel-8fmYfsGI.js} +62 -62
  69. package/dist/{threeModel-BfyOiv9g.cjs → threeModel-DUi0i12h.cjs} +1 -1
  70. package/package.json +1 -1
  71. package/dist/index-BA-DDxOT.js +0 -1366
  72. package/dist/index-BNE-s1A4.cjs +0 -1
  73. package/dist/index-BWiGVums.js +0 -791
  74. package/dist/index-BoGRYAgn.cjs +0 -1
  75. package/dist/index-CDbi4x81.js +0 -4700
  76. package/dist/index-Cm3eta0a.cjs +0 -1
  77. package/dist/index-CnDYddiq.js +0 -2511
  78. package/dist/index-D38SAb4m.cjs +0 -4207
  79. package/dist/index-DCZ8V-jk.cjs +0 -1
  80. package/dist/index-DVWuaRpd.cjs +0 -1
  81. package/dist/index-Dn4IDzs-.cjs +0 -1
  82. package/dist/index-DrNkh98f.cjs +0 -1
  83. package/dist/index-ZCzNjeSn.cjs +0 -7
  84. package/dist/index-pbwJ9I4L.cjs +0 -1
  85. package/dist/index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-DwhMhaPJ.cjs +0 -1
  86. package/dist/login-BiEodQd9.js +0 -129
  87. package/dist/login-zGHoUey-.cjs +0 -1
  88. package/dist/obj/model.mtl +0 -42
  89. package/dist/obj/model.obj +0 -26110
  90. package/public/obj/model.mtl +0 -42
  91. package/public/obj/model.obj +0 -26110
@@ -1,4700 +0,0 @@
1
- import { b as Qa, a as Ra, s as Xa } from "./index-Cj7sq5xh.js";
2
- import { ref as Z, 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 Xe, g as bl, bN as ja, u as Na, bO as Ea, bM as $a } from "./menu-Cl42pSjw.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-CbHQmeu4.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-CjJ2Qs6C.js";
6
- import { u as na } from "./login-BiEodQd9.js";
7
- import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { E as dl } from "./index-CnDYddiq.js";
9
- import { u as oa } from "./modelComp-DWx0hNJL.js";
10
- import { s as ys, a as bs } from "./index-BvQteht-.js";
11
- import gs from "./index-CZtXRS3l.js";
12
- const ks = (u) => u.match(/\((.*)\)/)[1], _s = Ua("formComp", {
13
- state: () => ({
14
- objUrl: [],
15
- blobUrls: []
16
- }),
17
- actions: {
18
- setObjUrl(u) {
19
- this.objUrl = u;
20
- },
21
- setBlobUrls(u) {
22
- this.blobUrls = u;
23
- }
24
- }
25
- }), Cs = async (u) => {
26
- var O, N, C, U, Q, T, ie;
27
- let m = (N = (O = l(u)) == 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, ee, D;
34
- (q == null ? void 0 : q.name) === (((D = (ee = (se = (pe = l(u)) == null ? void 0 : pe.optionUrl) == null ? void 0 : se.groupSelect) == null ? void 0 : ee[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((ee) => (ee == null ? void 0 : ee.key) === "header")) == null ? void 0 : U.contents) == null ? void 0 : Q.map((ee) => ee == null ? void 0 : ee.label), se = (ie = (T = q == null ? void 0 : q.find((ee) => (ee == null ? void 0 : ee.key) === "tableContents")) == null ? void 0 : T.contents) == null ? void 0 : ie.map((ee) => (ee = ee == null ? void 0 : ee.filter((D) => !(D != null && D.id)), ee));
38
- se == null || se.forEach((ee) => {
39
- a.push(os(ee, 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(u, { emit: m }) {
59
- const a = u, s = m, c = Z([]), O = Z(!1), N = Z(!1), C = Z([]), U = Z(), Q = Qa(Me), T = _s(Me), ie = Z(!1), q = Z(), pe = na(Me), { loginUserInfo: se } = He(pe), ee = Z(), D = Z(!0), $ = (r, d) => {
60
- ee.value === d ? D.value = !1 : D.value = !0, ee.value = d == null ? void 0 : d.changeProp;
61
- }, te = async (r) => {
62
- var A, K, fe, re, ne, i, I, E, v, Y;
63
- let d = [];
64
- if ((A = r == null ? void 0 : r.toString()) != null && A.includes(".stl") || (K = r == null ? void 0 : r.toString()) != null && K.includes(".STL") || (fe = r == null ? void 0 : r.toString()) != null && fe.includes(".obj") || (re = r == null ? void 0 : r.toString()) != null && re.includes(".mtl") || (ne = r == null ? void 0 : r.toString()) != null && ne.includes(".urdf")) {
65
- let P, W = [], o = {};
66
- if (Array.isArray(r) ? P = r : P = r == null ? void 0 : r.split(","), P == null || P.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 = r == null ? void 0 : r.split("/")) == null || E.forEach((de, oe) => {
76
- var z;
77
- oe === ((z = r == null ? void 0 : r.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 P = await Ml.get(r, {
85
- responseType: "blob",
86
- headers: {
87
- "Content-Type": "application/json"
88
- }
89
- }), W = new Blob([P.data], {
90
- type: "application/octet-stream;charset=UTF-8"
91
- });
92
- let o = URL.createObjectURL(W), y = "";
93
- (Y = r == null ? void 0 : r.split("/")) == null || Y.forEach((F, H) => {
94
- var de;
95
- H === ((de = r == null ? void 0 : r.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 = (r) => {
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(r.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: r == null ? void 0 : r.buttonName
115
- };
116
- s("change", fe);
117
- }, b = async (r) => {
118
- var E, v, Y, P, W, o, y, F, H, de, oe, z;
119
- if (!r) 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, R, ue, ve, M, e, n, f, k, _, J, X, V, G, ke;
124
- return g.type = g != null && g.type ? g.type : (R = (_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 && R[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(r)) == 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 = (P = (Y = l(A)) == null ? void 0 : Y.find((S) => (S == null ? void 0 : S.key) === "formContent")) == null ? void 0 : P.contents) == null ? void 0 : W.find((S, w) => {
145
- var g, x;
146
- return (S == null ? void 0 : S.label) === ee.value || w.toString() === ((x = (g = ee.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, R, 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]) && ((R = (_e = (L = ne == null ? void 0 : ne.optionUrl) == null ? void 0 : L.groupSelect) == null ? void 0 : _e[1]) != null && R.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, R, ue, ve, M, e;
160
- return (w != null && w[x == null ? void 0 : x.label] || w != null && w[(R = (_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 : R.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((R) => {
183
- var ue;
184
- return (R == null ? void 0 : R.name) === (w == null ? void 0 : w.name) && ((ue = R == null ? void 0 : R.url) == null ? void 0 : ue.includes(".mtl"));
185
- })) == null ? void 0 : x.map((R) => R == null ? void 0 : R.url);
186
- i.push({
187
- objUrl: w == null ? void 0 : w.url,
188
- mtlUrls: ((t = I == null ? void 0 : I.filter((R) => {
189
- var ue;
190
- return (R == null ? void 0 : R.name) === (w == null ? void 0 : w.name) && ((ue = R == null ? void 0 : R.url) == null ? void 0 : ue.includes(".mtl"));
191
- })) == null ? void 0 : t.length) === 1 ? (_e = (L = I == null ? void 0 : I.filter((R) => {
192
- var ue;
193
- return (R == null ? void 0 : R.name) === (w == null ? void 0 : w.name) && ((ue = R == null ? void 0 : R.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, Y, P, W, o, y, F, H, de;
203
- const r = (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, ((Y = r == null ? void 0 : r.contents) == null ? void 0 : Y.length) > 0 && Array.isArray(r == null ? void 0 : r.contents)) {
205
- const oe = await ((P = r == null ? void 0 : r.contents) == null ? void 0 : P.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) ?? "", R = (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
- R = ((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 || R === "" ? "Input" : R,
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 R;
243
- return (R = _e == null ? void 0 : _e.url) == null ? void 0 : R.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 R, ue, ve, M;
252
- const _e = (R = 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 : R.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, R, 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 = (R = t == null ? void 0 : t.value) == null ? void 0 : R.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
- ), (r, d) => (ce(), ye("div", ws, [
294
- ae(ze, {
295
- rowContents: c.value,
296
- formRules: u.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 = Z(0), Ka = (u) => {
314
- var m;
315
- return !u || (u == null ? void 0 : u.length) === 0 ? [] : (m = l(u)) == 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 = (u) => {
330
- var a;
331
- return (a = l(u)) == 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 = (u, m) => {
346
- var a;
347
- return u != null && u.find((s) => (s == null ? void 0 : s.id) === m) ? (a = l(u)) == null ? void 0 : a.filter((c) => (c == null ? void 0 : c.id) !== m) : (u = u == null ? void 0 : u.map((s) => (s.children = Wa(s == null ? void 0 : s.children, m), s)), u);
348
- }, za = (u, m) => {
349
- var a;
350
- return u != null && u.find((s) => (s == null ? void 0 : s.id) === (m == null ? void 0 : m.id)) ? (a = l(u)) == null ? void 0 : a.map((c) => ((c == null ? void 0 : c.id) === (m == null ? void 0 : m.id) && (c = m), c)) : (u = u == null ? void 0 : u.map((s) => (s.children = za(s == null ? void 0 : s.children, m), s)), u);
351
- }, Ma = (u, m) => {
352
- var a;
353
- return u != null && u.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(u)) == 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
- }) : (u = u == null ? void 0 : u.map((s) => (s.children = Ma(s == null ? void 0 : s.children, m), s)), u);
360
- }, Ja = (u, m) => {
361
- var a;
362
- return u != null && u.find((s) => (s == null ? void 0 : s.id) === (m == null ? void 0 : m.id)) ? (a = l(u)) == 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)) : (u = u == null ? void 0 : u.map((s) => (s.children = Ja(s == null ? void 0 : s.children, m), s)), u);
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(u, { emit: m }) {
471
- const a = u, s = m, c = Z(!1), O = Z(""), N = Ra(Me), { tableIndex: C } = He(N);
472
- Z(0);
473
- const U = Z(""), Q = Z([]), T = Z([]), ie = (p) => {
474
- var b;
475
- c.value = !0;
476
- let h = [];
477
- Ae == null || Ae.forEach((r) => {
478
- let d = l(C.value) + 1;
479
- N.setTableIndex(d), h.push({
480
- label: r == null ? void 0 : r.label,
481
- name: r == null ? void 0 : r.label,
482
- type: r.type,
483
- value: p[r.key],
484
- id: C.value,
485
- contents: r == null ? void 0 : r.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 r = l(C.value) + 1;
500
- N.setTableIndex(r), 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
- }, ee = (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((r) => {
518
- const d = Ae == null ? void 0 : Ae.find((A) => (A == null ? void 0 : A.label) === (r == null ? void 0 : r.label));
519
- d ? p[d.key] = r.value : r != null && r.children && r.children.length > 0 && (p.children = r.children);
520
- }), c.value = !1, s("fixChange", {
521
- contents: l(p),
522
- id: O.value,
523
- type: "fix"
524
- });
525
- else {
526
- let r = l(C.value) + 1;
527
- N.setTableIndex(r), 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), Xe({
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, (r, d) => (ce(), ye("div", $s, [
558
- B("div", Bs, [
559
- B("div", Ts, we(r.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(r)
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(r)
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(r)
578
- }, null, 8, ["onClick"])
579
- ])
580
- ]),
581
- r != null && r.children && r.children.length > 0 ? (ce(), ye("div", Fs, [
582
- ae(Ga, {
583
- tableChildContents: r == null ? void 0 : r.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: ee
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(u, { emit: m }) {
628
- const a = u, s = m, c = Z(!1), O = Z(""), N = Ra(Me), { tableIndex: C } = He(N), U = Z(""), Q = Z([]), T = Z([]), 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((r) => {
635
- let d = l(C.value) + 1;
636
- N.setTableIndex(d), h.push({
637
- label: r == null ? void 0 : r.label,
638
- name: r == null ? void 0 : r.label,
639
- type: r.type,
640
- value: p[r.key],
641
- id: C.value,
642
- contents: r == null ? void 0 : r.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 r = l(C.value) + 1;
653
- N.setTableIndex(r), 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
- }, ee = () => {
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((r) => {
671
- const d = Ae == null ? void 0 : Ae.find((A) => (A == null ? void 0 : A.label) === (r == null ? void 0 : r.label));
672
- d ? p[d.key] = r.value : r != null && r.children && r.children.length > 0 && (p.children = r.children);
673
- }), c.value = !1, s("fixChange", {
674
- contents: l(p),
675
- id: O.value,
676
- type: "fix"
677
- });
678
- else {
679
- let r = l(C.value) + 1;
680
- N.setTableIndex(r), 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), Xe({
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"), r = 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(r, {
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(r, {
773
- class: "ok-button button",
774
- onClick: ee,
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(u, { emit: m }) {
804
- const a = u, s = m, c = Z([]), O = Z(!1), N = Z(!1), C = Z([]), U = Z(!1), Q = Z([]), T = Z(!1), ie = Z([]), q = Z(""), pe = Z(""), se = Z([]), ee = Z([]), D = Z([]), $ = Z([]), te = Z(!1), p = Z([]), h = Z([]), b = Z(0), r = Z([]), d = Z([]), A = Z([]), 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
- }), r.value = e, d.value = e;
831
- }, re = (e) => {
832
- e || (r.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)), r.value = await il(l(le));
851
- } else {
852
- let le = l(r.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), r.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, r.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))), Xe({
889
- type: "success",
890
- message: "删除成功"
891
- });
892
- }
893
- ).catch(() => {
894
- });
895
- }, v = () => {
896
- N.value = !1, r.value = [], q.value = "";
897
- }, Y = async () => {
898
- var k, _, J, X, V, G, ke, me, Ie, ge;
899
- r.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 = r.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 = r.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 = r.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
- }, P = (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
- ee.value = (n = l(ee.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 = ee.value), k))), Xe({
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 = ee.value) != null && k.find((V) => V.id === e.id))
973
- ee.value = (_ = ee.value) == null ? void 0 : _.map((V) => (V.id === e.id && (V = e), V));
974
- else {
975
- let V = l(ee.value) ?? [];
976
- V.push(e), ee.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 = ee.value), V)) : n.push({
981
- key: "extraButton",
982
- contents: ee.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))), Xe({
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
- }, R = (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
- })), Xe({
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, ee.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
- }), ee.value = (xe = ee.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(ee.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) => P(_)
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: R
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: r.value,
1535
- key: r.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: Y,
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(u, { emit: m }) {
1588
- const a = u, s = m, c = Z(!1), O = Z([]), N = Z([]), C = Z(!1), U = Z([]), Q = Z([]), T = Z(""), ie = Z(!1), q = Z(0), pe = Z([]), se = Z([]), ee = (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, Y, P, W, o, y;
1590
- c.value = !0;
1591
- let I = [];
1592
- const E = await ((P = (Y = (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 : Y.value) == null ? void 0 : P.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: ee(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, Y, P, 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 = (Y = U.value) == null ? void 0 : Y.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
- (P = l(a.originalItemContents)) != null && P.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))), Xe({
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))), Xe({
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
- }, r = () => {
1701
- var I, E, v;
1702
- c.value = !0;
1703
- let i = [];
1704
- (v = (E = (I = Ve) == null ? void 0 : I.find((Y) => (Y == null ? void 0 : Y.key) === "Input")) == null ? void 0 : E.value) == null || v.forEach((Y) => {
1705
- q.value++, i.push({
1706
- label: Y == null ? void 0 : Y.label,
1707
- name: Y == null ? void 0 : Y.label,
1708
- type: Y.type,
1709
- value: (Y == null ? void 0 : Y.label) === "类型" ? "Input" : "",
1710
- id: q.value,
1711
- contents: Y == null ? void 0 : Y.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, Y, P, 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 ((P = (Y = (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 : Y.value) == null ? void 0 : P.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, Y, P, W, o, y, F, H, de, oe, z, S;
1752
- O.value = N.value;
1753
- let i = {};
1754
- i.width = ((Y = (v = O.value) == null ? void 0 : v[0]) == null ? void 0 : Y.width) ?? 1, T.value !== "" ? i.id = T.value : (q.value++, i.id = "id" + q.value);
1755
- let I = await ((o = (W = (P = Ve) == null ? void 0 : P.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, Y, P, 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 ? !((Y = i == null ? void 0 : i.find((o) => (o == null ? void 0 : o.key) === "enableWrap")) != null && Y.contents) : !0, Q.value = (P = l(Q.value)) == null ? void 0 : P.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: r
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, (Y, P) => (ce(), ye("div", { key: P }, [
1824
- B("div", Ti, [
1825
- B("div", null, we(Y.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(Y)
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(Y)
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, (Y, P) => (ce(), ye("div", { key: P }, [
1865
- B("div", Li, [
1866
- B("div", null, we(Y.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) => $(Y)
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(Y)
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] = (Y) => ie.value = Y)
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(u, { emit: m }) {
1986
- const a = u, s = m, c = Z([
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 = Z([
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 = Z([
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 = Z("create"), Q = Z({}), T = Z([]), 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
- }), ee = () => {
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: (r) => 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: (r) => 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: ee,
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(u, { emit: m }) {
2247
- const a = u, s = m, c = Z("create"), O = Z({}), N = Z([]), C = Z([
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 = Z([
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 = Z([
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((r) => {
2404
- b[r] === "" && delete b[r];
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((r) => r.index === (b == null ? void 0 : b.index) ? {
2414
- ...r,
2415
- content: b == null ? void 0 : b.content,
2416
- timestamp: b == null ? void 0 : b.timestamp
2417
- } : r);
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
- }), ee = () => {
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: (r) => 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: (r) => 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: ee,
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(u, 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(u, { emit: m }) {
2553
- const a = u, s = Z(0), c = Z(), O = Z(), N = m, C = Z(!1), U = Z({}), Q = Z({}), T = Z();
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 r;
2561
- if (b.key === "extra") {
2562
- let d = [];
2563
- (r = b.value) == null || r.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, r) => {
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 = r.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"), r = 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 Y, P;
2583
- return (v == null ? void 0 : v.key) === "tableContents" && (v.contents = (P = (Y = p.content) == null ? void 0 : Y.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 : P.map((W) => Object.values(W))), v;
2589
- })), i;
2590
- });
2591
- r.unshift(h == null ? void 0 : h[0]);
2592
- let d = l(U.value), A = {};
2593
- for (let i in d)
2594
- A[i] = r;
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"), r = b == null ? void 0 : b.map((i, I) => (I === p.index && (i.compData = p.contents), i));
2601
- r.unshift(h == null ? void 0 : h[0]);
2602
- let d = l(U.value), A = {};
2603
- for (let i in d)
2604
- A[i] = r;
2605
- U.value = A;
2606
- }, ee = () => {
2607
- var h, b;
2608
- let p = {};
2609
- for (let r in Q.value)
2610
- r === ((h = Object.keys(U.value)) == null ? void 0 : h[0]) ? p[r] = (b = Object.values(U.value)) == null ? void 0 : b[0] : p[r] = Q.value[r];
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, (r, d) => (ce(), ye("div", { key: s.value }, [
2625
- (r == null ? void 0 : r.key) === "extra" ? (ce(), ye("div", nn)) : (ce(), ye("div", on, [
2626
- (ce(), Fe(Kl(te(r.comp)), {
2627
- itemData: r == null ? void 0 : r.compData,
2628
- childItemData: r == null ? void 0 : r.itemChildData,
2629
- key: d,
2630
- index: (r == null ? void 0 : r.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, (r, d) => (ce(), ye("div", {
2642
- key: d,
2643
- class: "extra-dialog"
2644
- }, [
2645
- (ce(), Fe(Kl(te(r.comp)), {
2646
- itemData: r == null ? void 0 : r.compData,
2647
- onChange: q,
2648
- childItemData: r == null ? void 0 : r.itemChildData,
2649
- key: d,
2650
- onContentChange: se,
2651
- index: (r == null ? void 0 : r.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: ee,
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 = (u) => {
2688
- var C, U, Q, T, ie, q, pe, se, ee, D, $, te, p, h, b, r, d, A, K, fe, re, ne, i, I;
2689
- const m = la(u) ? (C = ol(l(u))) == null ? void 0 : C[0] : "[]", a = la(u) ? "[" + ((U = ol(l(u))) == null ? void 0 : U[2]) + "]" : "[" + u + "]";
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 = (ee = (se = N == null ? void 0 : N.split("}")) == null ? void 0 : se[0]) == null ? void 0 : ee.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 (((r = (b = m == null ? void 0 : m.slice(1, (m == null ? void 0 : m.length) - 1)) == null ? void 0 : b.split(",")) == null ? void 0 : r.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 Y, P, W, o, y, F, H, de, oe, z, S, w, g, x, t, L, _e, R, 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("#") && (_ = ((R = (_e = v == null ? void 0 : v.split("#")) == null ? void 0 : _e[0]) == null ? void 0 : R.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 = (P = v == null ? void 0 : v.split(":")) == null ? void 0 : P[((Y = v == null ? void 0 : v.split(":")) == null ? void 0 : Y.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 = (u) => /^'[^']+':\{.*\}$/.exec(l(u)), dn = (u) => /^'[^']+':\[\[.*\]\]$/.exec(l(u)), pn = (u) => /^'([^']+)':.*$/.exec(l(u)), ol = (u) => {
2725
- let m = u;
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 = (u, m) => {
2732
- let a = u;
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 === (u == null ? void 0 : u.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 = (u) => /^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(l(u)), fn = (u) => {
2739
- var m, a, s, c, O, N, C, U, Q, T, ie, q, pe, se, ee, D, $, te, p, h, b, r, d, A, K, fe, re, ne, i, I, E, v, Y, P, W, o, y, F, H, de, oe, z, S, w, g, x, t, L, _e;
2740
- if (pn(u)) {
2741
- let R = {}, ue = (s = (a = (m = u == null ? void 0 : u.replace(":", De)) == null ? void 0 : m.split(De)) == null ? void 0 : a[0]) == null ? void 0 : s.replaceAll("'", ""), ve = "", M = (O = (c = u == null ? void 0 : u.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 = (ee = (se = M == null ? void 0 : M.replace("[", De)) == null ? void 0 : se.split(De)) == null ? void 0 : ee[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 = ($ = u == null ? void 0 : u.replace(":", De)) == null ? void 0 : $.split(De)) == null ? void 0 : te[1]) == null ? void 0 : p.replaceAll("'", "");
2748
- return R[ue] = ve, {
2749
- groupName: "",
2750
- formContents: [[R]]
2751
- };
2752
- } else {
2753
- let R = {}, ue = "", ve = "";
2754
- if (u.includes("#")) {
2755
- ue = (b = (h = u == null ? void 0 : u.split("#")) == null ? void 0 : h[0]) == null ? void 0 : b.replaceAll("'", "");
2756
- let M = (d = (r = u == null ? void 0 : u.split("#")) == null ? void 0 : r[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 + ((P = (Y = (v = M == null ? void 0 : M.split("[")) == null ? void 0 : v[1]) == null ? void 0 : Y.split("]")) == null ? void 0 : P[0]) + "]";
2758
- } else {
2759
- let M = (y = (o = (W = u == null ? void 0 : u.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
- }), !(u != null && u.includes("[")))
2764
- ve = ((z = (oe = (de = (H = u == null ? void 0 : u.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(u)) == 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 R[ue] = ve, {
2773
- groupName: "",
2774
- formContents: [[R]]
2775
- };
2776
- }
2777
- }, hn = (u) => (u == null ? void 0 : u[0]) === "[" && (u == null ? void 0 : u[u.length - 1]) === "]" && !(u != null && u.includes("{")), vn = (u, m) => {
2778
- let a = u.length;
2779
- for (; a--; )
2780
- if (u[a] === ")")
2781
- return u.substring(0, a) + m + u.substring(a + 1);
2782
- return u;
2783
- }, mn = (u) => {
2784
- var O, N, C, U, Q;
2785
- let m = u.slice(1, u.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, ee, D, $, te, p, h, b, r, d, A, K, fe, re, ne, i, I, E, v, Y, P, 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 = (ee = l(ie)) == null ? void 0 : ee[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((r = l(ie)) == null ? void 0 : r[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("'", ""), R;
2804
- (n = L == null ? void 0 : L[1]) != null && n.includes("(") ? (R = (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("[") && (R = l(R) + "[" + ((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("'", "")) + "]")) : R = (f = L == null ? void 0 : L[1]) == null ? void 0 : f.replaceAll("'", ""), t[_e] = R, c.push(t);
2805
- });
2806
- }
2807
- } else {
2808
- if (!((v = (E = l(ie)) == null ? void 0 : E[1]) != null && v.includes("[")) && !((P = (Y = l(ie)) == null ? void 0 : Y[1]) != null && P.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, Ye, ul, rl, We, fl, Ze;
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("'", ""), R;
2817
- if (!((n = L == null ? void 0 : L[1]) != null && n.includes("(")))
2818
- R = (f = L == null ? void 0 : L[1]) == null ? void 0 : f.replaceAll("'", "");
2819
- else if (R = (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], R = (me = (ke = vn(l(R), De)) == null ? void 0 : ke.split(De)) == null ? void 0 : me[0], !(R != null && R.includes("(")))
2820
- R = (Ie = l(R)) == null ? void 0 : Ie.replaceAll(":", "/").replaceAll("'", ""), (le = (ge = l(L)) == null ? void 0 : ge[1]) != null && le.includes("[") && (R = l(R) + "[" + ((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 el = "";
2823
- (Be = ea(R, ":")) == 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
- el = el === "" ? el + ((Dl = Je == null ? void 0 : Je.replaceAll(":", "")) == null ? void 0 : Dl.replaceAll("'", "")) : el + "/" + ((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("'", "")) + "]", el = el === "" ? el + "[" + yl + "]" : el + "/[" + yl + "]";
2830
- }
2831
- }), R = el + "[" + ((Ze = (fl = (We = (rl = (pl = (Oe = l(L)) == null ? void 0 : Oe[1]) == null ? void 0 : pl.split("[")) == null ? void 0 : rl[((ul = (Ye = (ml = l(L)) == null ? void 0 : ml[1]) == null ? void 0 : Ye.split("[")) == null ? void 0 : ul.length) - 1]) == null ? void 0 : We.split("]")) == null ? void 0 : fl[0]) == null ? void 0 : Ze.replaceAll("'", "")) + "]";
2832
- }
2833
- t[_e] = R, s.push(t);
2834
- });
2835
- }
2836
- }
2837
- }), {
2838
- output: s,
2839
- input: c
2840
- };
2841
- }, Ha = (u) => {
2842
- var s, c, O, N, C, U, Q, T, ie, q, pe, se, ee, D, $, te, p, h, b, r, d, A, K, fe, re, ne, i, I, E, v, Y, P, W, o, y, F, H, de, oe, z, S, w, g, x, t, L, _e, R, ue, ve;
2843
- let m = "";
2844
- u = u.replace(/:([^=]*)==/g, ":");
2845
- let a = u;
2846
- if ((tn(l(u)) !== null || dn(l(u)) !== null) && (m = (c = (s = l(u).replace(":", De).split(De)) == null ? void 0 : s[0]) == null ? void 0 : c.replaceAll("'", ""), a = (O = l(u).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, ((ee = l(a)) == null ? void 0 : ee.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 = (P = (Y = (v = (E = l(a)) == null ? void 0 : E.split(")")) == null ? void 0 : v[0]) == null ? void 0 : Y.split("(")) == null ? void 0 : P[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: (R = n == null ? void 0 : n[0]) == null ? void 0 : R.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), ((r = (b = (h = a == null ? void 0 : a.replace(":", De)) == null ? void 0 : h.split(De)) == null ? void 0 : b[1]) == null ? void 0 : r[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 = (u) => Ha(l(u).slice(1, l(u).length - 1)), zo = (u) => {
2948
- var a;
2949
- let m = [];
2950
- if (!((u == null ? void 0 : u[0]) === "[" && (u == null ? void 0 : u[1]) === "[")) {
2951
- let s = (a = ol(u)) == 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, ee, D, $, te, p, h, b, r, d, A, K, fe, re, ne, i, I;
2959
- let u = "";
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 && (u = (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${(ee = Pa.value) == null ? void 0 : ee.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 = (r = (b = (h = a == null ? void 0 : a.data) == null ? void 0 : h.result) == null ? void 0 : b[0]) == null ? void 0 : r.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) => {
2977
- var Y, P;
2978
- return (v == null ? void 0 : v.key) === u || ((P = (Y = v == null ? void 0 : v.optionUrl) == null ? void 0 : Y.groupSelect) == null ? void 0 : P[1]) === u;
2979
- })) == null ? void 0 : ne.value;
2980
- if ((I = (i = a == null ? void 0 : a.data) == null ? void 0 : i.result) == null || I.forEach((v) => {
2981
- var P;
2982
- let Y = (P = l(v)) == null ? void 0 : P.key;
2983
- Y.pageKey = l(Zl).value + "/" + E, s.push({
2984
- id: v == null ? void 0 : v.id,
2985
- key: Y
2986
- });
2987
- }), E === "") {
2988
- Xe.error(`保存失败,${u}的必填字段没有填写`);
2989
- return;
2990
- }
2991
- await ja({
2992
- dataList: s
2993
- }), Xe.success("保存成功");
2994
- }
2995
- }, _n = { class: "method-content" }, Cn = {
2996
- __name: "index",
2997
- props: {
2998
- itemData: {
2999
- type: Array,
3000
- default: () => []
3001
- },
3002
- childItemData: {
3003
- type: Array,
3004
- default: () => []
3005
- },
3006
- index: Number,
3007
- changedContent: {
3008
- type: Object,
3009
- default: () => {
3010
- }
3011
- }
3012
- },
3013
- setup(u) {
3014
- const m = Z([]), a = u, s = oa(Me), c = Z(!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 = Z(!1), se = (d, A) => {
3015
- const K = A;
3016
- return d == null ? void 0 : d.map((fe) => {
3017
- var re;
3018
- return fe = (re = fe == null ? void 0 : fe.map((ne, i) => {
3019
- var I;
3020
- return {
3021
- key: (I = K[i]) == null ? void 0 : I.label,
3022
- value: ne
3023
- };
3024
- })) == null ? void 0 : re.filter((ne) => ne.key !== "操作"), fe;
3025
- });
3026
- }, ee = async () => {
3027
- await kn();
3028
- };
3029
- Ke(
3030
- () => C.value,
3031
- async () => {
3032
- U.value === "view" && !pe.value && await r(l(a.itemData)), pe.value = !1;
3033
- },
3034
- { deep: !0 }
3035
- );
3036
- const D = async (d, A) => {
3037
- var K;
3038
- if (Sa(d == null ? void 0 : d.name, A)) {
3039
- let fe = Sa(d == null ? void 0 : d.name, A);
3040
- d == null || d.id, d.compData = await Promise.all(
3041
- (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))
3042
- );
3043
- } else
3044
- d = ms(d, A);
3045
- return d;
3046
- }, $ = (d, A) => {
3047
- var fe, re, ne, i, I, E, v, Y;
3048
- let K = (fe = l(A)) == null ? void 0 : fe.filter((P) => (P == null ? void 0 : P.comp) !== "methodButton");
3049
- if (d != null && d.includes("[")) {
3050
- let P = (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 = "";
3051
- if (P != null && P[0]) {
3052
- let o = (v = K == null ? void 0 : K.find((y) => (y == null ? void 0 : y.name) === (P == null ? void 0 : P[0]))) == null ? void 0 : v.compData;
3053
- o == null || o.forEach((y) => {
3054
- var F;
3055
- (y == null ? void 0 : y.key) === "formContent" && ((F = y == null ? void 0 : y.contents) == null || F.forEach((H) => {
3056
- (H == null ? void 0 : H.key) === (P == null ? void 0 : P[1]) && (W = H == null ? void 0 : H.value);
3057
- }));
3058
- });
3059
- }
3060
- return W;
3061
- } else if (d != null && d.includes("/")) {
3062
- let P = {};
3063
- return (Y = l(K)) == null || Y.forEach((W, o) => {
3064
- var y, F, H, de, oe, z, S, w, g, x, t, L, _e, R, ue, ve, M, e, n;
3065
- if ((W == null ? void 0 : W.comp) === "Table") {
3066
- 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 = (R = (_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 : R[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;
3067
- if (f)
3068
- (f == null ? void 0 : f.length) === 0 ? P[W.name] = se(k, J) : P[_] = se(k, J);
3069
- else {
3070
- const X = [];
3071
- J = J.slice(1, J.length - 1), J == null || J.forEach((V, G) => {
3072
- k == null || k.forEach((ke) => {
3073
- X.push({
3074
- key: V.label + ke[0],
3075
- value: ke[G + 1]
3076
- });
3077
- });
3078
- }), P["form" + o] = X;
3079
- }
3080
- } else {
3081
- const f = (n = (e = W.compData) == null ? void 0 : e.find((_) => (_ == null ? void 0 : _.key) === "formContent")) == null ? void 0 : n.contents;
3082
- P != null && P.form || (P.form = []);
3083
- const k = [];
3084
- f == null || f.forEach((_) => {
3085
- _.key !== "" && (_ = {
3086
- key: (_ == null ? void 0 : _.key) ?? (_ == null ? void 0 : _.label),
3087
- value: _ == null ? void 0 : _.value
3088
- }, k.push(_));
3089
- }), P.form = [...k, ...l(P == null ? void 0 : P.form)];
3090
- }
3091
- }), P;
3092
- } else
3093
- return d;
3094
- }, te = async (d, A, K) => {
3095
- var ne;
3096
- 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]));
3097
- if (re && (re == null ? void 0 : re.comp) === "Table") {
3098
- let i = {};
3099
- for (let o in l(d))
3100
- l(d)[o] !== "loginUser" ? i[o] = l(d)[o] : i[o] = (ne = q.value) == null ? void 0 : ne.account;
3101
- let I = [], E = i;
3102
- Array.isArray(d) || (E = [i]), E == null || E.forEach((o) => {
3103
- I.push({
3104
- [o[K[1]]]: o
3105
- });
3106
- });
3107
- let v = [], Y = I == null ? void 0 : I.map((o) => {
3108
- var y;
3109
- return (y = Object.keys(o)) == null ? void 0 : y[0];
3110
- });
3111
- fe == null || fe.forEach((o) => {
3112
- var y;
3113
- (o == null ? void 0 : o.name) === (K == null ? void 0 : K[0]) && ((y = o == null ? void 0 : o.compData) == null || y.forEach((F) => {
3114
- var H;
3115
- (F == null ? void 0 : F.key) === "tableContents" && ((H = F == null ? void 0 : F.contents) == null || H.forEach((de) => {
3116
- de != null && de.some((oe) => Y.includes(oe)) && v.push({
3117
- [de.find((oe) => oe.id).id]: de.find((oe) => Y.includes(oe))
3118
- });
3119
- }));
3120
- }));
3121
- });
3122
- let P = v == null ? void 0 : v.map((o) => {
3123
- var y;
3124
- return (y = Object.keys(o)) == null ? void 0 : y[0];
3125
- }), W = [];
3126
- P == null || P.forEach((o) => {
3127
- var H;
3128
- let y = (H = v == null ? void 0 : v.find((de) => {
3129
- var oe;
3130
- return ((oe = Object.keys(de)) == null ? void 0 : oe[0].toString()) === o.toString();
3131
- })) == null ? void 0 : H[o], F = I == null ? void 0 : I.find((de) => {
3132
- var oe;
3133
- return ((oe = Object.keys(de)) == null ? void 0 : oe[0]) === y;
3134
- });
3135
- W.push({
3136
- id: parseInt(o),
3137
- value: {
3138
- tableData: F[y]
3139
- }
3140
- });
3141
- }), (W == null ? void 0 : W.length) > 0 && await ja({
3142
- dataList: W
3143
- });
3144
- }
3145
- }, p = async (d, A, K) => {
3146
- var ne, i, I, E, v, Y, P, W, o;
3147
- 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]));
3148
- if (re) {
3149
- if ((re == null ? void 0 : re.comp) === "Table") {
3150
- let y = {};
3151
- for (let F in l(d))
3152
- l(d)[F] !== "loginUser" ? y[F] = l(d)[F] : y[F] = (ne = q.value) == null ? void 0 : ne.account;
3153
- await Ea({
3154
- key: {
3155
- type: "data",
3156
- pageKey: A,
3157
- tableId: re == null ? void 0 : re.id,
3158
- systemKey: sessionStorage.getItem("systemKey")
3159
- },
3160
- value: {
3161
- tableData: y
3162
- }
3163
- });
3164
- } else if ((re == null ? void 0 : re.comp) === "Form") {
3165
- let y = l(re), F = Object.keys(d), H = "";
3166
- (I = (i = l(y)) == null ? void 0 : i.compData) == null || I.forEach((g) => {
3167
- var x, t;
3168
- (g == null ? void 0 : g.key) === "formContent" && ((t = (x = l(g)) == null ? void 0 : x.contents) == null || t.forEach((L) => {
3169
- var _e;
3170
- 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);
3171
- }));
3172
- });
3173
- let de = [];
3174
- (E = Object.values(d[H])) == null || E.forEach((g) => {
3175
- g != null && g.includes("(") && de.push(g);
3176
- }), de = [...new Set(de)];
3177
- const oe = de == null ? void 0 : de.map(async (g) => {
3178
- var R, ue, ve, M, e, n, f, k, _, J, X, V;
3179
- let x = "";
3180
- (n = (e = (M = (ve = (ue = (R = l(g)) == null ? void 0 : R.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) => {
3181
- x = x === "" ? x + G.replaceAll("'", "") : x + "/" + G.replaceAll("'", "");
3182
- });
3183
- let t = [];
3184
- (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) => {
3185
- t.push(G.replaceAll("'", ""));
3186
- });
3187
- const L = await vl(x, sessionStorage.getItem("systemKey"), "");
3188
- let _e = "";
3189
- return L == null || L.forEach((G) => {
3190
- var ke;
3191
- G.name === (t == null ? void 0 : t[0]) && ((ke = G == null ? void 0 : G.compData) == null || ke.forEach((me) => {
3192
- var Ie;
3193
- (me == null ? void 0 : me.key) === "formContent" && ((Ie = me.contents) == null || Ie.forEach((ge) => {
3194
- (ge == null ? void 0 : ge.key) === (t == null ? void 0 : t[1]) && (_e = ge == null ? void 0 : ge.value);
3195
- }));
3196
- }));
3197
- }), {
3198
- [g]: _e
3199
- };
3200
- }), z = await Promise.all(oe);
3201
- y.compData = (Y = (v = l(y)) == null ? void 0 : v.compData) == null ? void 0 : Y.map((g) => {
3202
- var x, t;
3203
- 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) => {
3204
- var _e, R, ue, ve;
3205
- return (_e = d[H]) != null && _e[L == null ? void 0 : L.key] && (d[H][L == null ? void 0 : L.key].includes("(") ? L.value = (R = z == null ? void 0 : z.find((M) => {
3206
- var e;
3207
- return ((e = Object.keys(M)) == null ? void 0 : e[0]) === d[H][L == null ? void 0 : L.key];
3208
- })) == null ? void 0 : R[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;
3209
- })), g;
3210
- });
3211
- const S = await bl({
3212
- key: {
3213
- type: "structure",
3214
- pageKey: A,
3215
- systemKey: sessionStorage.getItem("systemKey")
3216
- }
3217
- });
3218
- let w = "";
3219
- ((P = S == null ? void 0 : S.data) == null ? void 0 : P.type) === "success" && ((o = (W = S == null ? void 0 : S.data) == null ? void 0 : W.result) == null || o.forEach((g) => {
3220
- var x, t;
3221
- ((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);
3222
- }), await $a({
3223
- id: w,
3224
- value: {
3225
- pageData: y
3226
- }
3227
- }));
3228
- }
3229
- }
3230
- }, h = async (d, A, K) => {
3231
- var ne, i, I, E, v, Y;
3232
- let fe = await vl(A, sessionStorage.getItem("systemKey"), ""), re = fe == null ? void 0 : fe.find((P) => (P == null ? void 0 : P.name) === (K == null ? void 0 : K[0]));
3233
- if (re) {
3234
- if (!(K != null && K[1]) && (re == null ? void 0 : re.comp) === "Table") {
3235
- let P = {};
3236
- for (let W in l(d))
3237
- l(d)[W] !== "loginUser" ? P[W] = l(d)[W] : P[W] = (ne = q.value) == null ? void 0 : ne.account;
3238
- await Ea({
3239
- key: {
3240
- type: "data",
3241
- pageKey: A,
3242
- tableId: re == null ? void 0 : re.id,
3243
- systemKey: sessionStorage.getItem("systemKey")
3244
- },
3245
- value: {
3246
- tableData: P
3247
- }
3248
- });
3249
- } else if (!(K != null && K[1]) && (re == null ? void 0 : re.comp) === "Form") {
3250
- let P = l(re);
3251
- P.compData = (I = (i = l(P)) == null ? void 0 : i.compData) == null ? void 0 : I.map((y) => {
3252
- var F, H;
3253
- 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) => {
3254
- var oe, z;
3255
- 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;
3256
- })), y;
3257
- });
3258
- const W = await bl({
3259
- key: {
3260
- type: "structure",
3261
- pageKey: A,
3262
- systemKey: sessionStorage.getItem("systemKey")
3263
- }
3264
- });
3265
- let o = "";
3266
- ((E = W == null ? void 0 : W.data) == null ? void 0 : E.type) === "success" && ((Y = (v = W == null ? void 0 : W.data) == null ? void 0 : v.result) == null || Y.forEach((y) => {
3267
- var F, H;
3268
- ((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);
3269
- }), await $a({
3270
- id: o,
3271
- value: {
3272
- pageData: P
3273
- }
3274
- }));
3275
- }
3276
- }
3277
- }, b = async (d) => {
3278
- var K, fe, re, ne, i, I, E, v, Y, P, W, o, y, F, H, de, oe, z;
3279
- let A = {};
3280
- if (ie.value !== "browser") {
3281
- const S = [];
3282
- A.form = {}, (K = l(d.content)) == null || K.forEach((g, x) => {
3283
- var t, L, _e, R, ue, ve, M, e, n, f, k, _, J, X;
3284
- if ((g == null ? void 0 : g.comp) === "Table") {
3285
- (L = (t = g == null ? void 0 : g.compData) == null ? void 0 : t.find((me) => (me == null ? void 0 : me.key) === "header")) == null || L.contents;
3286
- let V = (ue = (R = (_e = g == null ? void 0 : g.compData) == null ? void 0 : _e.find((me) => (me == null ? void 0 : me.key) === "tableContents")) == null ? void 0 : R.contents) == null ? void 0 : ue.map((me) => me.slice(1));
3287
- (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;
3288
- 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 = [];
3289
- V == null || V.forEach((me) => {
3290
- let Ie = [];
3291
- me == null || me.forEach((ge, le) => {
3292
- var be;
3293
- let Ce = {};
3294
- ((be = G[le]) == null ? void 0 : be.label) !== "操作" && (Ce[G[le].label] = ge, Ie.push(Ce));
3295
- }), ke.push(Ie);
3296
- }), A[g.name] = ke;
3297
- } else {
3298
- const V = (X = (J = g.compData) == null ? void 0 : J.find((G) => (G == null ? void 0 : G.key) === "formContent")) == null ? void 0 : X.contents;
3299
- V == null || V.forEach((G) => {
3300
- var ke;
3301
- G.key !== "" && (G = {
3302
- key: (G == null ? void 0 : G.key) ?? (G == null ? void 0 : G.label),
3303
- value: (ke = G == null ? void 0 : G.value) == null ? void 0 : ke.toString()
3304
- }, S.push(G));
3305
- });
3306
- }
3307
- }), A.form = ts(S);
3308
- let w = A.form;
3309
- for (let g in A)
3310
- g !== "form" && (w[g] = ds(A[g]));
3311
- if (d.api) {
3312
- try {
3313
- c.value = !0;
3314
- const g = await Ml.post(
3315
- d.api,
3316
- w,
3317
- {
3318
- headers: {
3319
- "Content-Type": "application/json"
3320
- }
3321
- }
3322
- );
3323
- 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) {
3324
- let x = await ((ne = g == null ? void 0 : g.data) == null ? void 0 : ne.data);
3325
- const t = (i = l(C.value)) == null ? void 0 : i.filter((ue) => (ue == null ? void 0 : ue.comp) !== "methodButton"), L = await Promise.all(
3326
- t.map((ue) => D(ue, x))
3327
- );
3328
- await Promise.all(L);
3329
- const _e = (I = l(C.value)) == null ? void 0 : I.filter((ue) => (ue == null ? void 0 : ue.comp) === "methodButton");
3330
- let R = [...L, ..._e];
3331
- await ps(R), c.value = !1;
3332
- } else
3333
- Xe.error("方法调用失败:" + ((E = g == null ? void 0 : g.data) == null ? void 0 : E.errors)), c.value = !1;
3334
- } catch {
3335
- Xe.error("方法调用失败"), c.value = !1;
3336
- }
3337
- s.setFreshContent(!0);
3338
- }
3339
- } else if (d.api) {
3340
- let S = await vl(T.value, sessionStorage.getItem("systemKey"), ""), w = {};
3341
- (Y = (v = d == null ? void 0 : d.extraValues) == null ? void 0 : v.input) == null || Y.forEach((R) => {
3342
- var ue;
3343
- w[Object.keys(R)[0]] = $((ue = Object.values(R)) == null ? void 0 : ue[0], S);
3344
- });
3345
- let g = !1;
3346
- (W = (P = d == null ? void 0 : d.extraValues) == null ? void 0 : P.output) == null || W.forEach((R) => {
3347
- var ue, ve;
3348
- (ve = (ue = Object.values(R)) == null ? void 0 : ue[0]) != null && ve.includes(".doc") && (g = !0);
3349
- });
3350
- let x;
3351
- g ? x = await Ml.post(d.api, w, {
3352
- responseType: "blob",
3353
- // 必须设置
3354
- headers: {
3355
- "Content-Type": "application/json"
3356
- }
3357
- }) : x = await Ml.post(d.api, w, {
3358
- headers: {
3359
- "Content-Type": "application/json"
3360
- }
3361
- });
3362
- let t = (H = (F = (y = (o = l(d)) == null ? void 0 : o.extraValues) == null ? void 0 : y.output) == null ? void 0 : F.map((R) => {
3363
- var ue, ve, M, e, n, f, k, _, J, X, V, G, ke, me, Ie;
3364
- if (!((ve = (ue = Object.values(R)) == null ? void 0 : ue[0]) != null && ve.includes(".doc"))) {
3365
- let ge = (X = (J = (_ = (e = l((M = Object.values(R)) == null ? void 0 : M[0])) == null ? void 0 : e.split("[")) == null ? void 0 : _[((k = (f = l((n = Object.values(R)) == 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];
3366
- ge == null || ge.split(":");
3367
- let le = l((V = Object.values(R)) == null ? void 0 : V[0]).substring(0, l((G = Object.values(R)) == null ? void 0 : G[0]).lastIndexOf("["));
3368
- if (le = (me = l(le)) == null ? void 0 : me.slice(0, ((ke = l(le)) == null ? void 0 : ke.length) - 1), le != null && le.includes("[")) {
3369
- let Ce = "";
3370
- if ((Ie = ea(le, "/")) == null || Ie.forEach((be) => {
3371
- var xe, Ne, je, j, Be, Oe, pl;
3372
- if (!(be != null && be.includes("[")))
3373
- Ce = Ce === "" ? Ce + be.replaceAll("/", "") : Ce + "/" + be.replaceAll("/", "");
3374
- else {
3375
- let ml = l(be).slice(1, ((xe = l(be)) == null ? void 0 : xe.length) - 1), Ye = (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) === (Ye == null ? void 0 : Ye[0]))) == null ? void 0 : pl.compData;
3376
- rl == null || rl.forEach((We) => {
3377
- var fl;
3378
- (We == null ? void 0 : We.key) === "formContent" && ((fl = We == null ? void 0 : We.contents) == null || fl.forEach((Ze) => {
3379
- (Ze == null ? void 0 : Ze.key) === (Ye == null ? void 0 : Ye[1]) && (ul = Ze == null ? void 0 : Ze.value);
3380
- }));
3381
- }), Ce = Ce === "" ? Ce + ul.replaceAll("/", "") : Ce + "/" + ul.replaceAll("/", "");
3382
- }
3383
- }), le = Ce, le[(le == null ? void 0 : le.length) - 1] !== "/")
3384
- return le;
3385
- }
3386
- }
3387
- })) == null ? void 0 : H.filter((R) => R);
3388
- t = [...new Set(l(t))];
3389
- let L = t == null ? void 0 : t.map(async (R) => {
3390
- let ue = await vl(R, sessionStorage.getItem("systemKey"), "");
3391
- if ((ue == null ? void 0 : ue.length) === 0)
3392
- return await fs(R);
3393
- });
3394
- await Promise.all(L);
3395
- let _e = (z = (oe = (de = l(d)) == null ? void 0 : de.extraValues) == null ? void 0 : oe.output) == null ? void 0 : z.map(async (R) => {
3396
- var J, X, V, G, ke, me, Ie, ge, le, Ce, be, xe, Ne, je, j, Be, Oe, pl, ml, Ye, ul, rl, We, fl, Ze, el, 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;
3397
- if ((X = (J = Object.values(R)) == null ? void 0 : J[0]) != null && X.includes(".doc")) {
3398
- var ue = new Blob([x.data], {
3399
- type: "application/octet-stream;charset=UTF-8"
3400
- }), 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;
3401
- 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);
3402
- } else {
3403
- let Hl = (je = (Ne = (xe = (ge = l((Ie = Object.values(R)) == null ? void 0 : Ie[0])) == null ? void 0 : ge.split("[")) == null ? void 0 : xe[((be = (Ce = l((le = Object.values(R)) == 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(R)) == null ? void 0 : j[0]).substring(0, l((Be = Object.values(R)) == null ? void 0 : Be[0]).lastIndexOf("["));
3404
- 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("[")) {
3405
- let Le = "";
3406
- (ml = ea(al, "/")) == null || ml.forEach((Re) => {
3407
- var jl, qe, ll, hl, Nl, Aa, Ia;
3408
- if (!(Re != null && Re.includes("[")))
3409
- Le = Le === "" ? Le + Re.replaceAll("/", "") : Le + "/" + Re.replaceAll("/", "");
3410
- else {
3411
- let qa = l(Re).slice(1, ((jl = l(Re)) == null ? void 0 : jl.length) - 1), _l = (Aa = (Nl = (hl = (ll = (qe = l(qa)) == null ? void 0 : qe.split("[")) == null ? void 0 : ll[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;
3412
- Ql == null || Ql.forEach((sl) => {
3413
- var xa;
3414
- (sl == null ? void 0 : sl.key) === "formContent" && ((xa = sl == null ? void 0 : sl.contents) == null || xa.forEach((Cl) => {
3415
- (Cl == null ? void 0 : Cl.key) === (_l == null ? void 0 : _l[1]) && (ql = Cl == null ? void 0 : Cl.value);
3416
- }));
3417
- }), Le = Le === "" ? Le + ql.replaceAll("/", "") : Le + "/" + ql.replaceAll("/", "");
3418
- }
3419
- }), al = Le;
3420
- }
3421
- if (((Ye = x == null ? void 0 : x.data) == null ? void 0 : Ye.statusCode) === 200) {
3422
- 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)
3423
- 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);
3424
- if ((el = (Ze = x == null ? void 0 : x.data) == null ? void 0 : Ze.data) != null && el[Ee == null ? void 0 : Ee[0]])
3425
- 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);
3426
- if ((Ee == null ? void 0 : Ee.length) === 1) {
3427
- 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;
3428
- let Re = "";
3429
- (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((ll) => {
3430
- var hl, Nl;
3431
- Re = Re === "" ? Re + ((hl = ll == null ? void 0 : ll.replaceAll("'", "")) == null ? void 0 : hl.trim()) : Re + "/" + ((Nl = ll == null ? void 0 : ll.replaceAll("'", "")) == null ? void 0 : Nl.trim());
3432
- });
3433
- 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;
3434
- 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;
3435
- } else {
3436
- 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;
3437
- let Re = "";
3438
- 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) => {
3439
- var ll, hl;
3440
- Re = Re === "" ? Re + ((ll = qe == null ? void 0 : qe.replaceAll("'", "")) == null ? void 0 : ll.trim()) : Re + "/" + ((hl = qe == null ? void 0 : qe.replaceAll("'", "")) == null ? void 0 : hl.trim());
3441
- }), 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);
3442
- }
3443
- }
3444
- }
3445
- });
3446
- await Promise.all(_e);
3447
- }
3448
- pe.value = !0;
3449
- }, r = async (d) => {
3450
- var ne, i, I;
3451
- const A = l(d);
3452
- let K;
3453
- d != null && d[0].path && (K = await (A == null ? void 0 : A.map(async (E, v) => {
3454
- var y, F, H, de, oe, z, S, w, g, x;
3455
- const P = (await bl({
3456
- key: {
3457
- systemKey: sessionStorage.getItem("systemKey"),
3458
- type: "data",
3459
- pageKey: (y = d == null ? void 0 : d[0]) == null ? void 0 : y.path
3460
- }
3461
- })).data.result;
3462
- let W = "";
3463
- const o = await vl(T.value, sessionStorage.getItem("systemKey"), "");
3464
- return P == null || P.forEach((t) => {
3465
- var L, _e, R, ue, ve;
3466
- ((_e = (L = t == null ? void 0 : t.value) == null ? void 0 : L.tableData) == null ? void 0 : _e.算法名称) === ((R = A == null ? void 0 : A[v]) == null ? void 0 : R.method) && (W = (ve = (ue = t == null ? void 0 : t.value) == null ? void 0 : ue.tableData) == null ? void 0 : ve.算法体);
3467
- }), {
3468
- buttonName: ((F = A == null ? void 0 : A[v]) == null ? void 0 : F.method) ?? ((oe = (de = (H = P == null ? void 0 : P[0]) == null ? void 0 : H.value) == null ? void 0 : de.tableData) == null ? void 0 : oe.算法名称),
3469
- api: W === "" ? (w = (S = (z = P == null ? void 0 : P[0]) == null ? void 0 : z.value) == null ? void 0 : S.tableData) == null ? void 0 : w.算法体 : W,
3470
- content: o == null ? void 0 : o.filter((t) => t.comp !== "methodButton"),
3471
- extraContent: (g = l(E.value)) == null ? void 0 : g.slice(1),
3472
- methodName: (E == null ? void 0 : E.path) ?? "",
3473
- extraValues: (x = A == null ? void 0 : A[v]) == null ? void 0 : x.data
3474
- };
3475
- })));
3476
- const fe = A == null ? void 0 : A.map(async (E) => {
3477
- var y, F, H, de, oe, z;
3478
- const Y = (y = (await bl({
3479
- key: {
3480
- systemKey: sessionStorage.getItem("systemKey"),
3481
- parentTable: "",
3482
- type: "method",
3483
- methodName: E.method
3484
- }
3485
- })).data.result) == null ? void 0 : y[0], P = await bl({
3486
- key: {
3487
- systemKey: sessionStorage.getItem("systemKey"),
3488
- type: "methodData",
3489
- tableId: Y == null ? void 0 : Y.id
3490
- }
3491
- }), W = await vl(T.value, sessionStorage.getItem("systemKey"), ""), o = (F = P.data.result) == null ? void 0 : F[0];
3492
- return {
3493
- buttonName: (H = Y == null ? void 0 : Y.key) == null ? void 0 : H.methodKey,
3494
- api: (oe = (de = o == null ? void 0 : o.value) == null ? void 0 : de.tableData) == null ? void 0 : oe[0],
3495
- content: W == null ? void 0 : W.filter((S) => S.comp !== "methodButton"),
3496
- extraContent: (z = l(E.value)) == null ? void 0 : z.slice(1),
3497
- methodName: (E == null ? void 0 : E.method) ?? ""
3498
- };
3499
- }), 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);
3500
- m.value = re == null ? void 0 : re.filter((E) => E == null ? void 0 : E.extraContent), (I = m.value) == null || I.forEach((E) => {
3501
- var v;
3502
- E.api === "" && ((v = E.content) == null || v.forEach((Y) => {
3503
- var P;
3504
- Y.comp == "Table" && s.setExtraContents(cs(Y.compData, (P = E.extraContent) == null ? void 0 : P[0]));
3505
- }));
3506
- });
3507
- };
3508
- return Ke(
3509
- () => a.itemData,
3510
- async () => {
3511
- U.value == "view" && !pe.value && await r(l(a.itemData)), pe.value = !1;
3512
- },
3513
- { immediate: !0, deep: !0 }
3514
- ), (d, A) => (ce(), ye("div", _n, [
3515
- (ce(!0), ye(Se, null, Pe(m.value, (K) => (ce(), ye("div", null, [
3516
- K.api !== "" ? (ce(), Fe(Wl(Ba), {
3517
- key: 0,
3518
- class: "calculator-content",
3519
- modelValue: K.buttonName,
3520
- onClickTrigger: (fe) => b(K),
3521
- loading: c.value
3522
- }, null, 8, ["modelValue", "onClickTrigger", "loading"])) : Qe("", !0)
3523
- ]))), 256)),
3524
- Wl(Q) !== "" ? (ce(), Fe(Wl(Ba), {
3525
- key: 0,
3526
- class: "calculator-content",
3527
- onClickTrigger: ee,
3528
- modelValue: "保存"
3529
- })) : Qe("", !0)
3530
- ]));
3531
- }
3532
- }, wn = /* @__PURE__ */ Ue(Cn, [["__scopeId", "data-v-5faf81a1"]]), Dn = {};
3533
- function An(u, m) {
3534
- return " 567 ";
3535
- }
3536
- 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({
3537
- __name: "operate",
3538
- props: {
3539
- itemContents: {
3540
- type: Array,
3541
- default: () => []
3542
- },
3543
- originalItemContents: {
3544
- type: Array,
3545
- default: () => []
3546
- }
3547
- },
3548
- emits: ["change"],
3549
- setup(u, { emit: m }) {
3550
- const a = u, s = m, c = sa({
3551
- visible: !1,
3552
- width: "40%",
3553
- title: "签名配置"
3554
- }), O = Z("create"), N = Z([
3555
- {
3556
- label: "取消",
3557
- background: "#c0c4cc"
3558
- },
3559
- {
3560
- label: "确认",
3561
- background: "#436aaf"
3562
- }
3563
- ]), C = Z([
3564
- {
3565
- label: "宽度(%):",
3566
- prop: "signPadWidth",
3567
- type: "number",
3568
- value: "30"
3569
- },
3570
- {
3571
- label: "弹窗名称:",
3572
- prop: "dialogTitle",
3573
- type: "input",
3574
- value: ""
3575
- },
3576
- {
3577
- label: "弹窗宽度(%):",
3578
- prop: "dialogWidth",
3579
- type: "number",
3580
- value: "30"
3581
- },
3582
- {
3583
- label: "弹窗显示:",
3584
- prop: "dialogShow",
3585
- type: "radio",
3586
- contents: [
3587
- {
3588
- label: "显示",
3589
- value: !0
3590
- },
3591
- {
3592
- label: "隐藏",
3593
- value: !1
3594
- }
3595
- ],
3596
- value: !1,
3597
- isFormColHidden: !0
3598
- },
3599
- {
3600
- label: "路径:",
3601
- prop: "url",
3602
- type: "input",
3603
- value: "",
3604
- isFormColHidden: !0
3605
- }
3606
- ]), U = ia(() => [
3607
- {
3608
- label: "",
3609
- prop: "index",
3610
- type: "input",
3611
- value: "",
3612
- isFormColHidden: !0
3613
- },
3614
- {
3615
- label: "类型:",
3616
- prop: "label",
3617
- type: "select",
3618
- contents: [
3619
- {
3620
- label: "电子签名",
3621
- value: "电子签名"
3622
- },
3623
- {
3624
- label: "签字版",
3625
- value: "签字版"
3626
- },
3627
- {
3628
- label: "上传签名",
3629
- value: "上传签名"
3630
- }
3631
- ],
3632
- value: ""
3633
- },
3634
- {
3635
- label: "图标",
3636
- prop: "icon",
3637
- type: "inputPopover",
3638
- value: ""
3639
- }
3640
- // {
3641
- // label: '是否禁用',
3642
- // prop: 'disabled',
3643
- // type: 'radio',
3644
- // contents: [
3645
- // {
3646
- // label: '是',
3647
- // value: true,
3648
- // },
3649
- // {
3650
- // label: '否',
3651
- // value: false,
3652
- // }
3653
- // ],
3654
- // value: false
3655
- // },
3656
- ]), Q = Z({}), T = Z([]), ie = () => ({
3657
- comp: "Signature",
3658
- compData: [
3659
- {
3660
- key: "signTypeList",
3661
- contents: T.value
3662
- },
3663
- {
3664
- key: "signConfig",
3665
- contents: Q.value
3666
- }
3667
- ]
3668
- }), q = (D) => {
3669
- var $;
3670
- Q.value = l(D), s("change", ($ = ie()) == null ? void 0 : $.compData);
3671
- }, pe = (D) => {
3672
- var $, te;
3673
- if ((D == null ? void 0 : D.buttonName) === "确认") {
3674
- const p = l(D == null ? void 0 : D.content);
3675
- switch (O.value) {
3676
- case "create":
3677
- T.value.push({
3678
- ...p,
3679
- index: (($ = T.value) == null ? void 0 : $.length) + 1
3680
- });
3681
- break;
3682
- }
3683
- s("change", (te = ie()) == null ? void 0 : te.compData), c.visible = !1;
3684
- } else
3685
- c.visible = !1;
3686
- }, se = (D, $) => {
3687
- var te, p;
3688
- switch (D) {
3689
- case "create":
3690
- (te = U.value) == null || te.forEach((h) => {
3691
- h.value = "";
3692
- }), O.value = "create", c.visible = !0;
3693
- break;
3694
- case "update":
3695
- (p = U.value) == null || p.forEach((h) => {
3696
- h.value = $[h == null ? void 0 : h.prop];
3697
- }), O.value = "update", c.visible = !0;
3698
- break;
3699
- case "delete":
3700
- T.value.splice($, 1), O.value = "delete";
3701
- break;
3702
- }
3703
- }, ee = () => {
3704
- c.visible = !1;
3705
- };
3706
- return Ke(() => a == null ? void 0 : a.itemContents, (D) => {
3707
- var $, te;
3708
- 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) ?? []);
3709
- }, { immediate: !0 }), (D, $) => {
3710
- const te = Te("svg-icon"), p = Te("el-button");
3711
- return ce(), ye(Se, null, [
3712
- B("div", null, [
3713
- B("div", xn, [
3714
- $[2] || ($[2] = B("h4", { class: "module-title" }, "签名类型", -1)),
3715
- ae(p, {
3716
- class: "module-icon",
3717
- id: "themeButton",
3718
- onClick: $[0] || ($[0] = (h) => se("create"))
3719
- }, {
3720
- icon: he(() => [
3721
- ae(te, {
3722
- name: "Plus",
3723
- class: "icon-size"
3724
- })
3725
- ]),
3726
- default: he(() => [
3727
- $[1] || ($[1] = $e(" 新增 "))
3728
- ]),
3729
- _: 1,
3730
- __: [1]
3731
- })
3732
- ]),
3733
- B("div", En, [
3734
- (ce(!0), ye(Se, null, Pe(T.value, (h, b) => (ce(), ye("div", {
3735
- class: "module-data-item",
3736
- key: b
3737
- }, [
3738
- B("span", null, we(h == null ? void 0 : h.label), 1),
3739
- B("div", null, [
3740
- ae(p, {
3741
- type: "primary",
3742
- size: "small",
3743
- onClick: (r) => se("update", { ...h, index: b + 1 })
3744
- }, {
3745
- default: he(() => $[3] || ($[3] = [
3746
- $e("修改")
3747
- ])),
3748
- _: 2,
3749
- __: [3]
3750
- }, 1032, ["onClick"]),
3751
- ae(p, {
3752
- type: "danger",
3753
- size: "small",
3754
- onClick: (r) => se("delete", b)
3755
- }, {
3756
- default: he(() => $[4] || ($[4] = [
3757
- $e("删除")
3758
- ])),
3759
- _: 2,
3760
- __: [4]
3761
- }, 1032, ["onClick"])
3762
- ])
3763
- ]))), 128))
3764
- ]),
3765
- B("div", $n, [
3766
- ae(ze, {
3767
- rowContents: C.value,
3768
- onChange: q
3769
- }, null, 8, ["rowContents"])
3770
- ])
3771
- ]),
3772
- ae(Ge, {
3773
- visible: c.visible,
3774
- title: c.title,
3775
- onBeforeDestroy: ee,
3776
- width: c.width
3777
- }, {
3778
- default: he(() => [
3779
- B("div", Bn, [
3780
- (ce(), Fe(ze, {
3781
- rowContents: U.value,
3782
- key: U.value,
3783
- isEnableWrap: !1,
3784
- isButtonRow: !1,
3785
- isStartJustify: !1,
3786
- buttonValue: N.value,
3787
- onOnButtonClick: pe
3788
- }, null, 8, ["rowContents", "buttonValue"]))
3789
- ])
3790
- ]),
3791
- _: 1
3792
- }, 8, ["visible", "title", "width"])
3793
- ], 64);
3794
- };
3795
- }
3796
- }), Sn = /* @__PURE__ */ Ue(Tn, [["__scopeId", "data-v-487e0536"]]), Fn = /* @__PURE__ */ kl({
3797
- __name: "index",
3798
- props: {
3799
- stepConfig: {
3800
- type: Object,
3801
- default: {}
3802
- },
3803
- stepList: {
3804
- type: Array,
3805
- default: () => []
3806
- }
3807
- },
3808
- emits: ["clickStep", "clickTrigger", "changeTrigger"],
3809
- setup(u, { emit: m }) {
3810
- const a = u, s = m, c = Z(1), O = ia(() => {
3811
- var ie, q;
3812
- 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;
3813
- }), N = (ie, q) => {
3814
- c.value = q, s("clickStep", ie, q);
3815
- }, C = (ie) => as(ie), U = () => {
3816
- var q;
3817
- const ie = (q = a == null ? void 0 : a.stepList) == null ? void 0 : q.find((pe, se) => se + 1 === O.value);
3818
- return console.log("findStep", ie), ie ? ie == null ? void 0 : ie.children : [];
3819
- }, Q = (ie) => {
3820
- s("clickTrigger", ie);
3821
- }, T = (ie) => {
3822
- s("changeTrigger", ie);
3823
- };
3824
- return (ie, q) => {
3825
- var ee, D, $, te, p;
3826
- const pe = Te("el-step"), se = Te("el-steps");
3827
- return ce(), ye(Se, null, [
3828
- ae(se, {
3829
- direction: (ee = u.stepConfig) == null ? void 0 : ee.direction,
3830
- active: O.value,
3831
- "finish-status": "success",
3832
- simple: (D = u.stepConfig) == null ? void 0 : D.simple,
3833
- "align-center": (($ = u.stepConfig) == null ? void 0 : $.alignCenter) ?? !0
3834
- }, {
3835
- default: he(() => [
3836
- (ce(!0), ye(Se, null, Pe(u.stepList, (h, b) => (ce(), Fe(pe, {
3837
- key: b,
3838
- class: "step-item",
3839
- onClick: (r) => N(h, b + 1)
3840
- }, {
3841
- title: he(() => [
3842
- zl(ie.$slots, "title", {
3843
- title: h == null ? void 0 : h.title
3844
- }, void 0, !0)
3845
- ]),
3846
- description: he(() => [
3847
- zl(ie.$slots, "description", {
3848
- description: h == null ? void 0 : h.description
3849
- }, void 0, !0)
3850
- ]),
3851
- _: 2
3852
- }, 1032, ["onClick"]))), 128))
3853
- ]),
3854
- _: 3
3855
- }, 8, ["direction", "active", "simple", "align-center"]),
3856
- (te = u.stepConfig) != null && te.allowTrigger && ((p = u.stepConfig) != null && p.active) ? (ce(!0), ye(Se, { key: 0 }, Pe(U(), (h, b) => (ce(), ye("div", {
3857
- key: b,
3858
- class: "step-cont-wrap"
3859
- }, [
3860
- (ce(), Fe(Kl(C(h == null ? void 0 : h.type)), {
3861
- modelValue: h.value,
3862
- "onUpdate:modelValue": (r) => h.value = r,
3863
- onClickTrigger: Q,
3864
- onChangeTrigger: T,
3865
- content: h == null ? void 0 : h.content
3866
- }, Ya({ _: 2 }, [
3867
- Pe(ie.$slots, (r, d) => ({
3868
- name: d,
3869
- fn: he((A) => [
3870
- zl(ie.$slots, d, Za({ ref_for: !0 }, A || {}), void 0, !0)
3871
- ])
3872
- }))
3873
- ]), 1064, ["modelValue", "onUpdate:modelValue", "content"]))
3874
- ]))), 128)) : Qe("", !0)
3875
- ], 64);
3876
- };
3877
- }
3878
- }), On = /* @__PURE__ */ Ue(Fn, [["__scopeId", "data-v-d7c99969"]]), Ln = /* @__PURE__ */ kl({
3879
- __name: "index",
3880
- props: {
3881
- itemData: {
3882
- type: Array,
3883
- default: () => []
3884
- },
3885
- childItemData: {
3886
- type: Array,
3887
- default: () => []
3888
- }
3889
- },
3890
- emits: ["clickStep"],
3891
- setup(u, { emit: m }) {
3892
- const a = u, s = m, c = Z({}), O = Z([]), N = (C, U) => {
3893
- s("clickStep", C, U);
3894
- };
3895
- return Ke(() => a == null ? void 0 : a.itemData, (C) => {
3896
- var U, Q;
3897
- 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;
3898
- }, {
3899
- immediate: !0
3900
- }), (C, U) => {
3901
- const Q = Te("svg-icon");
3902
- return ce(), Fe(On, {
3903
- stepConfig: c.value,
3904
- stepList: O.value,
3905
- onClickStep: N
3906
- }, {
3907
- icon: he(() => [
3908
- ae(Q, { name: "import" })
3909
- ]),
3910
- title: he(({ title: T }) => [
3911
- $e(we(T), 1)
3912
- ]),
3913
- description: he(({ description: T }) => [
3914
- $e(we(T), 1)
3915
- ]),
3916
- _: 1
3917
- }, 8, ["stepConfig", "stepList"]);
3918
- };
3919
- }
3920
- }), Pn = /* @__PURE__ */ kl({
3921
- __name: "index",
3922
- props: {
3923
- activities: {
3924
- type: Array,
3925
- default: () => []
3926
- },
3927
- timeLineConfig: {
3928
- type: Object,
3929
- default: () => {
3930
- }
3931
- }
3932
- },
3933
- setup(u) {
3934
- return (m, a) => {
3935
- const s = Te("el-timeline-item"), c = Te("el-timeline");
3936
- return ce(), Fe(c, null, {
3937
- default: he(() => [
3938
- (ce(!0), ye(Se, null, Pe(u.activities, (O, N) => (ce(), Fe(s, {
3939
- key: N,
3940
- timestamp: O.timestamp,
3941
- placement: u.timeLineConfig.placement,
3942
- center: u.timeLineConfig.isCenter,
3943
- "hide-timestamp": !0,
3944
- type: u.timeLineConfig.type,
3945
- color: u.timeLineConfig.color,
3946
- size: u.timeLineConfig.size,
3947
- icon: u.timeLineConfig.icon,
3948
- hollow: u.timeLineConfig.isHollow
3949
- }, {
3950
- default: he(() => [
3951
- zl(m.$slots, "content", {
3952
- content: O == null ? void 0 : O.content,
3953
- timestamp: O == null ? void 0 : O.timestamp
3954
- }, void 0, !0)
3955
- ]),
3956
- _: 2
3957
- }, 1032, ["timestamp", "placement", "center", "type", "color", "size", "icon", "hollow"]))), 128))
3958
- ]),
3959
- _: 3
3960
- });
3961
- };
3962
- }
3963
- }), Rn = /* @__PURE__ */ Ue(Pn, [["__scopeId", "data-v-4172a886"]]), Un = { class: "line-content" }, jn = { class: "line-time" }, Nn = /* @__PURE__ */ kl({
3964
- __name: "index",
3965
- props: {
3966
- itemData: {
3967
- type: Array,
3968
- default: () => []
3969
- }
3970
- },
3971
- setup(u) {
3972
- const m = u, a = Z({}), s = Z([]);
3973
- return Ke(() => m == null ? void 0 : m.itemData, (c) => {
3974
- var O, N;
3975
- 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;
3976
- }, {
3977
- immediate: !0
3978
- }), (c, O) => (ce(), Fe(Rn, {
3979
- activities: s.value,
3980
- timeLineConfig: a.value
3981
- }, {
3982
- content: he(({ content: N, timestamp: C }) => [
3983
- B("span", Un, we(N), 1),
3984
- B("span", jn, we(C), 1)
3985
- ]),
3986
- _: 1
3987
- }, 8, ["activities", "timeLineConfig"]));
3988
- }
3989
- }), Vn = /* @__PURE__ */ Ue(Nn, [["__scopeId", "data-v-b4d9deed"]]), Kn = { class: "tabs-content" }, Wn = {
3990
- __name: "index",
3991
- props: {
3992
- itemData: {
3993
- type: Array,
3994
- default: () => []
3995
- },
3996
- childItemData: {
3997
- type: Array,
3998
- default: () => []
3999
- },
4000
- index: Number
4001
- },
4002
- setup(u) {
4003
- const m = u, a = Z([]);
4004
- return Ke(
4005
- () => m == null ? void 0 : m.itemData,
4006
- (s) => {
4007
- const c = s.find((O) => (O == null ? void 0 : O.key) == "stepList");
4008
- c && (a.value = c.contents.map((O) => ({
4009
- value: O.value || O.title,
4010
- label: O.label || O.title,
4011
- children: O.children || []
4012
- // 关键:传递子内容
4013
- })));
4014
- },
4015
- { immediate: !0, deep: !0 }
4016
- ), (s, c) => (ce(), ye("div", Kn, [
4017
- ae(ss, { tabsContents: a.value }, null, 8, ["tabsContents"])
4018
- ]));
4019
- }
4020
- }, zn = /* @__PURE__ */ Ue(Wn, [["__scopeId", "data-v-d3bb10b7"]]), Gl = Ua("tabComp", {
4021
- state: () => ({
4022
- itemData: [],
4023
- originalData: [],
4024
- extraContents: [],
4025
- nodeDev: "",
4026
- isEdit: "view",
4027
- isRefreshCurStructure: !1,
4028
- isSubmitCurStructure: !1,
4029
- curStructureCompIds: []
4030
- }),
4031
- actions: {
4032
- setItemData(u) {
4033
- this.itemData = u;
4034
- },
4035
- setCurStructureCompIds(u) {
4036
- this.curStructureCompIds = u;
4037
- },
4038
- setRefreshCurStructure(u) {
4039
- this.isRefreshCurStructure = u;
4040
- },
4041
- setOriginalData(u) {
4042
- this.originalData = u;
4043
- },
4044
- setExtraContents(u) {
4045
- this.extraContents = u;
4046
- },
4047
- setNodeDev(u) {
4048
- this.nodeDev = u;
4049
- },
4050
- setIsEdit(u) {
4051
- this.isEdit = u;
4052
- }
4053
- }
4054
- }), Mn = { class: "type-select" }, Jn = ["onClick"], Gn = { class: "list-icon" }, Hn = {
4055
- __name: "modelSelect",
4056
- setup(u) {
4057
- const m = Gl(Me), { itemData: a } = He(m), s = (c) => {
4058
- const O = l(a.value);
4059
- O.push({
4060
- comp: c.comp,
4061
- name: c.name,
4062
- compData: []
4063
- }), m.setItemData(O);
4064
- };
4065
- return (c, O) => {
4066
- const N = Te("svg-icon");
4067
- return ce(), ye("div", Mn, [
4068
- (ce(!0), ye(Se, null, Pe(Wl(To), (C, U) => (ce(), ye("div", {
4069
- class: "type-list",
4070
- key: U
4071
- }, [
4072
- B("div", {
4073
- class: "list-content",
4074
- onClick: (Q) => s(C)
4075
- }, [
4076
- B("div", Gn, [
4077
- ae(N, {
4078
- name: C.icon
4079
- }, null, 8, ["name"])
4080
- ]),
4081
- B("div", null, we(C.name), 1)
4082
- ], 8, Jn)
4083
- ]))), 128))
4084
- ]);
4085
- };
4086
- }
4087
- }, 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 = {
4088
- key: 0,
4089
- class: "edit-content"
4090
- }, io = ["onClick"], no = { class: "comp-child" }, oo = {
4091
- __name: "modelFill",
4092
- setup(u) {
4093
- const m = Gl(Me), { itemData: a, originalData: s } = He(m), c = Z([]);
4094
- Z([]);
4095
- const O = Z([]), N = Z([]), C = (pe) => {
4096
- var ee;
4097
- let se = (ee = l(N.value)) == null ? void 0 : ee.map((D, $) => (pe === $ && (D.content = !0), D));
4098
- N.value = se;
4099
- }, U = (pe) => {
4100
- var ee;
4101
- let se = (ee = l(N.value)) == null ? void 0 : ee.map((D, $) => (pe === $ && (D.content = !1), D));
4102
- N.value = se, c.value = l(a.value);
4103
- }, Q = (pe, se) => {
4104
- var te;
4105
- let ee = (te = l(N.value)) == null ? void 0 : te.map((p, h) => (pe === h && (p.content = !1), p));
4106
- N.value = ee;
4107
- const D = l(a.value), $ = D == null ? void 0 : D.filter((p, h) => (h === pe && (p.name = se), p));
4108
- m.setOriginalData($), m.setItemData($);
4109
- };
4110
- Ke(
4111
- () => a.value,
4112
- () => {
4113
- var pe, se, ee;
4114
- !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 = (ee = l(O.value)) == null ? void 0 : ee.map((D, $) => ({
4115
- id: $,
4116
- content: !1
4117
- }));
4118
- },
4119
- { deep: !0, immediate: !0 }
4120
- );
4121
- const T = (pe) => ua(pe), ie = (pe, se, ee) => {
4122
- var $, te;
4123
- if (!pe) return;
4124
- let D = l(a.value);
4125
- D = ($ = D == null ? void 0 : D.map((p, h) => (h === ee && (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) => ({
4126
- id: h,
4127
- content: !1
4128
- })), m.setOriginalData(D), m.setItemData(D);
4129
- }, q = (pe) => {
4130
- dl.confirm("是否确认要删除", "", {
4131
- confirmButtonText: "确认",
4132
- cancelButtonText: "取消",
4133
- type: "warning"
4134
- }).then(() => {
4135
- const se = l(a.value), ee = se == null ? void 0 : se.filter((D, $) => $ !== pe);
4136
- m.setOriginalData(ee), m.setItemData(ee), Xe({
4137
- type: "success",
4138
- message: "删除成功"
4139
- });
4140
- }).catch(() => {
4141
- });
4142
- };
4143
- return (pe, se) => {
4144
- const ee = Te("svg-icon");
4145
- return ce(), ye("div", Qn, [
4146
- se[1] || (se[1] = B("div", { class: "fill-operate" }, we("操作栏"), -1)),
4147
- B("div", Xn, [
4148
- ae(gs, {
4149
- class: "collapse-content",
4150
- collapseContents: c.value
4151
- }, {
4152
- title: he(({ item: D, index: $ }) => {
4153
- var te, p, h, b, r, d, A, K, fe, re;
4154
- return [
4155
- B("div", Yn, [
4156
- B("div", Zn, [
4157
- (p = (te = N.value) == null ? void 0 : te.find((ne) => ne.id === $)) != null && p.content ? Qe("", !0) : (ce(), ye("div", {
4158
- key: 0,
4159
- class: "collapse-title",
4160
- style: es({ marginRight: D.name && D.name !== "" ? "8px" : "0px" })
4161
- }, we(D.name), 5)),
4162
- (b = (h = N.value) == null ? void 0 : h.find((ne) => ne.id === $)) != null && b.content ? (ce(), ye("div", eo, [
4163
- ae(is, {
4164
- modelValue: D.name,
4165
- "onUpdate:modelValue": (ne) => D.name = ne,
4166
- onClick: se[0] || (se[0] = Vl(() => {
4167
- }, ["stop"]))
4168
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
4169
- ])) : Qe("", !0),
4170
- (d = (r = N.value) == null ? void 0 : r.find((ne) => ne.id === $)) != null && d.content ? Qe("", !0) : (ce(), ye("div", {
4171
- key: 2,
4172
- onClick: Vl((ne) => C($), ["stop"]),
4173
- class: "icon-content"
4174
- }, [
4175
- ae(ee, {
4176
- name: "Edit",
4177
- style: { width: "16px", height: "16px" }
4178
- })
4179
- ], 8, lo))
4180
- ]),
4181
- B("div", ao, [
4182
- (K = (A = N.value) == null ? void 0 : A.find((ne) => ne.id === $)) != null && K.content ? (ce(), ye("div", so, [
4183
- ae(ee, {
4184
- name: "Cancel",
4185
- style: { width: "16px", height: "16px" },
4186
- class: "icon-content",
4187
- onClick: Vl((ne) => U($), ["stop"])
4188
- }, null, 8, ["onClick"]),
4189
- ae(ee, {
4190
- name: "Save",
4191
- onClick: Vl((ne) => Q($, D.name), ["stop"]),
4192
- style: { width: "16px", height: "16px", fill: "var(--ssComponent-primary-color)" },
4193
- class: "icon-content"
4194
- }, null, 8, ["onClick"])
4195
- ])) : Qe("", !0),
4196
- (re = (fe = N.value) == null ? void 0 : fe.find((ne) => ne.id === $)) != null && re.content ? Qe("", !0) : (ce(), ye("div", {
4197
- key: 1,
4198
- onClick: Vl((ne) => q($), ["stop"]),
4199
- class: "icon-content"
4200
- }, [
4201
- ae(ee, {
4202
- name: "Delete",
4203
- style: { width: "16px", height: "16px" }
4204
- })
4205
- ], 8, io))
4206
- ])
4207
- ])
4208
- ];
4209
- }),
4210
- content: he(({ item: D, index: $ }) => {
4211
- var te, p;
4212
- return [
4213
- B("div", no, [
4214
- (ce(), Fe(Kl(T(D.comp + "Operate")), {
4215
- itemContents: D == null ? void 0 : D.compData,
4216
- originalItemContents: (p = (te = O.value) == null ? void 0 : te.find((h, b) => b === $)) == null ? void 0 : p.compData,
4217
- onChange: (h) => ie(h, D, $)
4218
- }, null, 40, ["itemContents", "originalItemContents", "onChange"]))
4219
- ])
4220
- ];
4221
- }),
4222
- _: 1
4223
- }, 8, ["collapseContents"])
4224
- ])
4225
- ]);
4226
- };
4227
- }
4228
- }, uo = /* @__PURE__ */ Ue(oo, [["__scopeId", "data-v-78d7fc46"]]), ro = {
4229
- key: 0,
4230
- class: "show-content"
4231
- }, co = { style: { display: "flex" } }, to = {
4232
- __name: "modelShow",
4233
- setup(u) {
4234
- const m = Gl(Me), { itemData: a } = He(m), s = Z([]);
4235
- Ke(
4236
- () => a.value,
4237
- () => {
4238
- var O;
4239
- !a.value || ((O = a.value) == null ? void 0 : O.length) === 0 ? s.value = [] : s.value = l(a.value);
4240
- },
4241
- { deep: !0, immediate: !0 }
4242
- );
4243
- const c = (O) => ua(O);
4244
- return (O, N) => {
4245
- var C;
4246
- return ((C = s.value) == null ? void 0 : C.length) > 0 ? (ce(), ye("div", ro, [
4247
- (ce(!0), ye(Se, null, Pe(s.value, (U, Q) => (ce(), ye("div", {
4248
- class: "item-content",
4249
- key: Q
4250
- }, [
4251
- B("div", co, we(U.name), 1),
4252
- (ce(), Fe(Kl(c(U.comp)), {
4253
- itemData: U == null ? void 0 : U.compData,
4254
- childItemData: U == null ? void 0 : U.itemChildData,
4255
- key: Q
4256
- }, null, 8, ["itemData", "childItemData"]))
4257
- ]))), 128))
4258
- ])) : Qe("", !0);
4259
- };
4260
- }
4261
- }, 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 = {
4262
- class: "model-select",
4263
- style: { display: "unset" }
4264
- }, 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 = {
4265
- __name: "operate",
4266
- props: {
4267
- itemContents: {
4268
- type: Array,
4269
- default: () => []
4270
- }
4271
- },
4272
- emits: ["change"],
4273
- setup(u, { emit: m }) {
4274
- const a = u, s = m, c = Z([]), O = Z(!1), N = Z(""), C = Z({ title: "" }), U = Z(-1), Q = Z(!1), T = Z(-1), ie = Z(/* @__PURE__ */ new Map()), q = Z(null), pe = Gl(Me), { itemData: se } = He(pe), ee = () => {
4275
- N.value = "新增标签页", C.value.title = "", U.value = -1, O.value = !0;
4276
- }, D = (o) => {
4277
- N.value = "修改标签页", C.value.title = c.value[o].title, U.value = o, O.value = !0;
4278
- }, $ = (o) => {
4279
- const y = h(o);
4280
- ie.value.delete(y), c.value.splice(o, 1), W();
4281
- }, te = () => {
4282
- if (C.value.title.trim()) {
4283
- if (U.value === -1) {
4284
- const o = {
4285
- title: C.value.title,
4286
- value: C.value.title,
4287
- label: C.value.title,
4288
- children: [],
4289
- id: p()
4290
- };
4291
- c.value.push(o);
4292
- } else
4293
- c.value[U.value].title = C.value.title, c.value[U.value].value = C.value.title, c.value[U.value].label = C.value.title;
4294
- O.value = !1, W();
4295
- }
4296
- }, p = () => `tab_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, h = (o) => {
4297
- const y = c.value[o];
4298
- return y.id || (y.id = p()), y.id;
4299
- }, b = (o) => {
4300
- var H;
4301
- T.value = o;
4302
- const y = h(o);
4303
- q.value = l(se.value);
4304
- let F = ie.value.get(y);
4305
- !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;
4306
- }, r = ia(() => {
4307
- const o = oa(Me), y = He(o).itemData.value;
4308
- return console.log("可用组件数据", y), !y || !Array.isArray(y) ? [] : y.filter((F) => {
4309
- var H;
4310
- if (F.comp === "Tabs" && T.value >= 0) {
4311
- const de = h(T.value);
4312
- if ((H = F.compData) == null ? void 0 : H.some(
4313
- (z) => {
4314
- var S;
4315
- return z.key === "stepList" && ((S = z.contents) == null ? void 0 : S.some((w) => w.id === de));
4316
- }
4317
- )) return !1;
4318
- }
4319
- return !0;
4320
- });
4321
- }), d = (o) => ({
4322
- Table: "表格",
4323
- Form: "表单",
4324
- Tabs: "标签页",
4325
- Chart: "图表",
4326
- Card: "卡片"
4327
- })[o] || o, A = (o) => {
4328
- var y;
4329
- try {
4330
- const F = l(o);
4331
- F.id = Date.now() + Math.random(), F.comp === "Tabs" && ((y = F.compData) == null || y.forEach((de) => {
4332
- de.key === "stepList" && de.contents && de.contents.forEach((oe) => {
4333
- oe.id = p();
4334
- });
4335
- }));
4336
- const H = l(se.value);
4337
- H.push(F), pe.setItemData(H);
4338
- } catch (F) {
4339
- console.error("添加组件失败:", F);
4340
- }
4341
- }, K = (o) => o.map((y) => {
4342
- var F;
4343
- switch (y.type) {
4344
- case "form":
4345
- return {
4346
- comp: "Form",
4347
- name: y.value || "表单",
4348
- compData: fe(y.content)
4349
- };
4350
- case "table":
4351
- return {
4352
- comp: "Table",
4353
- name: y.value || "表格",
4354
- compData: re(y.content)
4355
- };
4356
- default:
4357
- return {
4358
- comp: "Unknown",
4359
- name: y.value || "",
4360
- compData: ((F = y.content) == null ? void 0 : F.originalData) || []
4361
- };
4362
- }
4363
- }), fe = (o) => {
4364
- if (!o) return [];
4365
- const y = [];
4366
- return o.rowContents && y.push({
4367
- key: "formContent",
4368
- contents: o.rowContents
4369
- }), o.buttonValue && y.push({
4370
- key: "formButton",
4371
- contents: o.buttonValue
4372
- }), typeof o.isEnableWrap < "u" && y.push({
4373
- key: "enableWrap",
4374
- contents: o.isEnableWrap
4375
- }), y;
4376
- }, re = (o) => [], ne = () => {
4377
- if (T.value >= 0 && T.value < c.value.length) {
4378
- const o = h(T.value);
4379
- ie.value.set(o, l(se.value)), c.value[T.value].children = E(se.value), console.log("保存后的数据", E(se.value));
4380
- }
4381
- Q.value = !1, T.value = -1, q.value = null, W();
4382
- }, i = () => {
4383
- q.value && pe.setItemData(l(q.value)), Q.value = !1, T.value = -1, q.value = null;
4384
- }, I = () => {
4385
- Q.value && i();
4386
- }, E = (o) => {
4387
- if (!Array.isArray(o))
4388
- throw new Error("sourceData must be an array");
4389
- return o.map((y, F) => {
4390
- if (!y || typeof y != "object")
4391
- return y;
4392
- const { comp: H, name: de, compData: oe } = y;
4393
- switch (H) {
4394
- case "Form":
4395
- return {
4396
- type: "form",
4397
- content: v(oe || []),
4398
- value: "表单"
4399
- };
4400
- case "Table":
4401
- return {
4402
- type: "table",
4403
- content: Y(oe || []),
4404
- value: "表格"
4405
- };
4406
- default:
4407
- return {
4408
- type: "xxx",
4409
- content: P(oe || []),
4410
- value: ""
4411
- };
4412
- }
4413
- });
4414
- }, v = (o) => {
4415
- const y = {
4416
- formRules: {},
4417
- rowContents: [],
4418
- buttonValue: [],
4419
- rowValues: [],
4420
- isEnableWrap: !0,
4421
- isRowFlex: !0,
4422
- isButtonRow: !0,
4423
- isEdit: !0,
4424
- isStartJustify: !0
4425
- }, F = {
4426
- formContent: "rowContents",
4427
- enableWrap: "isEnableWrap",
4428
- formButton: "buttonValue"
4429
- };
4430
- return o.forEach((H, de) => {
4431
- if (!H || typeof H != "object") {
4432
- console.warn(`Invalid config at index ${de}:`, H);
4433
- return;
4434
- }
4435
- const { key: oe, contents: z } = H, S = F[oe];
4436
- if (!S) {
4437
- console.warn(`Unknown Form config key: ${oe}`);
4438
- return;
4439
- }
4440
- oe === "enableWrap" ? y[S] = !!z : y[S] = Array.isArray(z) ? z : [];
4441
- }), y;
4442
- }, Y = (o) => {
4443
- const y = {
4444
- columns: [],
4445
- tableData: [],
4446
- extraButton: [],
4447
- rowButton: [],
4448
- currentPage: 0,
4449
- total: 0,
4450
- pageSize: 0,
4451
- isShowPagination: !0,
4452
- isShowEdit: !0,
4453
- isMoveColumn: !0,
4454
- isShowDelete: !0
4455
- }, F = {
4456
- header: "columns",
4457
- tableContents: "tableData"
4458
- };
4459
- return o.forEach((H, de) => {
4460
- if (!H || typeof H != "object") {
4461
- console.warn(`Invalid config at index ${de}:`, H);
4462
- return;
4463
- }
4464
- const { key: oe, contents: z } = H, S = F[oe];
4465
- if (!S) {
4466
- console.warn(`Unknown Table config key: ${oe}`);
4467
- return;
4468
- }
4469
- y[S] = Array.isArray(z) ? z : [];
4470
- }), y;
4471
- }, P = (o) => (console.log("Default conversion logic - to be implemented"), {
4472
- originalData: o,
4473
- processed: !1,
4474
- componentType: "unknown"
4475
- }), W = () => {
4476
- const o = [
4477
- {
4478
- key: "stepList",
4479
- contents: c.value
4480
- }
4481
- ];
4482
- s("change", o);
4483
- };
4484
- return Ke(
4485
- () => a.itemContents,
4486
- (o) => {
4487
- if (o && o.length > 0) {
4488
- const y = o.find((F) => F.key === "stepList");
4489
- y && y.contents && (c.value = y.contents.map((F) => ({
4490
- title: F.title || "",
4491
- value: F.value || F.title || "",
4492
- label: F.label || F.title || "",
4493
- children: F.children || [],
4494
- id: F.id || p()
4495
- })));
4496
- }
4497
- },
4498
- { immediate: !0, deep: !0 }
4499
- ), (o, y) => {
4500
- const F = Te("svg-icon"), H = Te("el-input"), de = Te("el-form-item"), oe = Te("el-form");
4501
- return ce(), ye("div", null, [
4502
- B("div", fo, [
4503
- y[6] || (y[6] = B("h4", null, "标签页管理", -1)),
4504
- B("button", { onClick: ee }, [
4505
- ae(F, {
4506
- name: "Plus",
4507
- style: { width: "14px", height: "14px", "margin-right": "4px" }
4508
- }),
4509
- y[5] || (y[5] = $e(" 新增标签页 "))
4510
- ])
4511
- ]),
4512
- B("div", ho, [
4513
- (ce(!0), ye(Se, null, Pe(c.value, (z, S) => (ce(), ye("div", {
4514
- class: "tab-item",
4515
- key: S
4516
- }, [
4517
- B("span", vo, we(z.title), 1),
4518
- B("div", mo, [
4519
- B("button", {
4520
- onClick: (w) => D(S)
4521
- }, "修改标题", 8, yo),
4522
- B("button", {
4523
- onClick: (w) => b(S)
4524
- }, "布局调整", 8, bo),
4525
- B("button", {
4526
- onClick: (w) => $(S)
4527
- }, "删除", 8, go)
4528
- ])
4529
- ]))), 128))
4530
- ]),
4531
- ae(Ge, {
4532
- modelValue: O.value,
4533
- "onUpdate:modelValue": y[2] || (y[2] = (z) => O.value = z),
4534
- title: N.value,
4535
- onBeforeDestroy: y[3] || (y[3] = (z) => O.value = !1)
4536
- }, {
4537
- footer: he(() => [
4538
- B("button", {
4539
- onClick: y[1] || (y[1] = (z) => O.value = !1)
4540
- }, "取消"),
4541
- B("button", {
4542
- type: "primary",
4543
- onClick: te
4544
- }, "确定")
4545
- ]),
4546
- default: he(() => [
4547
- ae(oe, {
4548
- model: C.value,
4549
- "label-width": "80px"
4550
- }, {
4551
- default: he(() => [
4552
- ae(de, {
4553
- label: "标签名称",
4554
- required: ""
4555
- }, {
4556
- default: he(() => [
4557
- ae(H, {
4558
- modelValue: C.value.title,
4559
- "onUpdate:modelValue": y[0] || (y[0] = (z) => C.value.title = z),
4560
- placeholder: "请输入标签页名称"
4561
- }, null, 8, ["modelValue"])
4562
- ]),
4563
- _: 1
4564
- })
4565
- ]),
4566
- _: 1
4567
- }, 8, ["model"])
4568
- ]),
4569
- _: 1
4570
- }, 8, ["modelValue", "title"]),
4571
- ae(Ge, {
4572
- modelValue: Q.value,
4573
- "onUpdate:modelValue": y[4] || (y[4] = (z) => Q.value = z),
4574
- title: "布局调整",
4575
- fullScreen: "",
4576
- onBeforeDestroy: I
4577
- }, {
4578
- footer: he(() => [
4579
- B("button", { onClick: i }, "取消"),
4580
- B("button", { onClick: ne }, "确定")
4581
- ]),
4582
- default: he(() => [
4583
- B("div", ko, [
4584
- B("div", _o, [
4585
- ae(qn),
4586
- B("div", Co, [
4587
- y[8] || (y[8] = B("h5", null, "添加已有组件", -1)),
4588
- B("div", wo, [
4589
- (ce(!0), ye(Se, null, Pe(r.value, (z) => (ce(), ye("div", {
4590
- key: z.id,
4591
- class: "component-item",
4592
- onClick: (S) => A(z)
4593
- }, [
4594
- B("div", Ao, [
4595
- B("span", Io, we(d(z.comp)), 1),
4596
- B("span", xo, we(z.name), 1)
4597
- ]),
4598
- y[7] || (y[7] = B("button", { class: "add-btn" }, "添加", -1))
4599
- ], 8, Do))), 128))
4600
- ])
4601
- ])
4602
- ]),
4603
- (ce(), ye("div", {
4604
- class: "model-show",
4605
- key: o.innerWidth
4606
- }, [
4607
- ae(po)
4608
- ])),
4609
- B("div", Eo, [
4610
- ae(uo)
4611
- ])
4612
- ])
4613
- ]),
4614
- _: 1
4615
- }, 8, ["modelValue"])
4616
- ]);
4617
- };
4618
- }
4619
- }, Bo = /* @__PURE__ */ Ue($o, [["__scopeId", "data-v-151936e8"]]), To = Z([
4620
- {
4621
- name: "表格",
4622
- type: "table",
4623
- comp: "Table",
4624
- icon: "Table"
4625
- },
4626
- {
4627
- name: "表单",
4628
- type: "form",
4629
- comp: "Form",
4630
- icon: "Form"
4631
- },
4632
- {
4633
- name: "折叠",
4634
- type: "fold",
4635
- comp: "Fold",
4636
- icon: "Fold"
4637
- },
4638
- {
4639
- name: "头像",
4640
- type: "avatar",
4641
- comp: "AvatarUpload",
4642
- icon: "Avatar"
4643
- },
4644
- {
4645
- name: "签名",
4646
- type: "signature",
4647
- comp: "Signature",
4648
- icon: "Signature"
4649
- },
4650
- {
4651
- name: "步骤条",
4652
- type: "step",
4653
- comp: "Step",
4654
- icon: "Step"
4655
- },
4656
- {
4657
- name: "时间线",
4658
- type: "timeLine",
4659
- comp: "TimeLine",
4660
- icon: "TimeLine"
4661
- },
4662
- {
4663
- name: "标签页",
4664
- type: "tabs",
4665
- comp: "Tabs",
4666
- icon: "Tabs"
4667
- }
4668
- ]), So = {
4669
- TABLE: Xa,
4670
- FORM: Fa,
4671
- TABLEOPERATE: Ii,
4672
- FORMOPERATE: Oa,
4673
- FOLD: an,
4674
- CALCULATOR: cn,
4675
- METHODBUTTON: wn,
4676
- AVATARUPLOAD: bs,
4677
- SIGNATURE: ys,
4678
- FORMTOP: Fa,
4679
- STEP: Ln,
4680
- STEPOPERATE: Gi,
4681
- TIMELINE: Vn,
4682
- TIMELINEOPERATE: Zi,
4683
- FORMTOPOPERATE: Oa,
4684
- SIGNATUREOPERATE: Sn,
4685
- AVATARUPLOADOPERATE: In,
4686
- TABS: zn,
4687
- TABSOPERATE: Bo
4688
- // 添加其他组件...
4689
- };
4690
- function ua(u) {
4691
- return So[u == null ? void 0 : u.toUpperCase()] || null;
4692
- }
4693
- export {
4694
- zo as a,
4695
- aa as b,
4696
- ua as g,
4697
- kn as o,
4698
- To as s,
4699
- _s as u
4700
- };