ss-component-new 1.1.428 → 1.1.430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/{array-C4Es3IJl.cjs → array-BE8kxwbF.cjs} +1 -1
  2. package/dist/{array-CfYKb4Nd.js → array-CmTW1wXQ.js} +1 -1
  3. package/dist/icons/svg/EyeFill.svg +1 -0
  4. package/dist/{index-jteGdz9o.js → index-B3sv--5l.js} +9 -9
  5. package/dist/{index-DGftdu10.cjs → index-B8ONEgpW.cjs} +1 -1
  6. package/dist/{index-CRfrrpPf.cjs → index-BCFtIIf_.cjs} +1 -1
  7. package/dist/{index-B5T_VqYF.js → index-BWHERznY.js} +4 -4
  8. package/dist/{index-CTvJr4hu.cjs → index-BZkQ29Tz.cjs} +1 -1
  9. package/dist/{index-EYlNG37M.cjs → index-B_AUqKy_.cjs} +1 -1
  10. package/dist/{index-CkZ55Trw.cjs → index-Bb7GoIJp.cjs} +1 -1
  11. package/dist/{index-CjSdK9n3.js → index-BiuhwvlL.js} +9 -9
  12. package/dist/{index-AELMbDVd.js → index-BnlhM9YS.js} +7 -7
  13. package/dist/{index-Bp9OCGp9.js → index-BwhVhBYj.js} +5 -5
  14. package/dist/index-C-jjWrUl.cjs +1 -0
  15. package/dist/{index-l4f4Ksrs.js → index-CMBrDaM5.js} +1 -1
  16. package/dist/{index-BNZtQgpp.cjs → index-CNpklHzK.cjs} +1 -1
  17. package/dist/{index-UZsDwc9I.cjs → index-CONyMR2I.cjs} +1 -1
  18. package/dist/{index-Ct43M3Ia.js → index-CSj1osh5.js} +6 -6
  19. package/dist/{index-Dxporpi3.js → index-CYOSbBn4.js} +212 -219
  20. package/dist/{index-C76WZoJF.cjs → index-CjlMUufz.cjs} +1 -1
  21. package/dist/{index-BTQXT09h.cjs → index-Clor83sA.cjs} +1 -1
  22. package/dist/{index-HOLtxrWE.cjs → index-CqaFuVhy.cjs} +1 -1
  23. package/dist/{index-UiIVwT0x.js → index-Cqd4dRu7.js} +4 -4
  24. package/dist/{index-DdlG0SsL.js → index-CrtuDvMe.js} +1 -1
  25. package/dist/{index-6I-wNfSX.cjs → index-CsHPoVQL.cjs} +1 -1
  26. package/dist/{index-Ct6CbWll.js → index-CzfGrSpV.js} +1 -1
  27. package/dist/{index-B0jpwR-h.cjs → index-D2aIlMCu.cjs} +1 -1
  28. package/dist/{index-CMYViTL8.cjs → index-D3ah-UXX.cjs} +1 -1
  29. package/dist/{index-BN5V2XDK.cjs → index-D5JRjtWD.cjs} +1 -1
  30. package/dist/{index-B1B8QwCz.cjs → index-D6iTzH06.cjs} +1 -1
  31. package/dist/{index-DNxPzGNN.js → index-DDoTCY3C.js} +5 -5
  32. package/dist/{index-BJ4skhum.js → index-DFilfUFX.js} +3 -3
  33. package/dist/{index-CjUuYXN_.cjs → index-DIxSv5u4.cjs} +1 -1
  34. package/dist/{index-C6jLxi8v.cjs → index-DOm1fXtU.cjs} +1 -1
  35. package/dist/{index-BqXldRGs.js → index-DQq3rsff.js} +5 -5
  36. package/dist/{index-DxH1id_m.cjs → index-DUPkZILz.cjs} +1 -1
  37. package/dist/{index-BBCbfygK.js → index-DXtXtduX.js} +4 -4
  38. package/dist/{index-B4PppAMz.cjs → index-D_j7_Hn_.cjs} +1 -1
  39. package/dist/index-Daqdy9e9.js +20924 -0
  40. package/dist/{index-DnL48cUW.js → index-DeXnZk4X.js} +6 -6
  41. package/dist/{index-DN77Gqf7.js → index-Di1ajNKI.js} +4 -4
  42. package/dist/{index-Ds17eX5X.js → index-DkiBGvqU.js} +1 -1
  43. package/dist/{index-DMQYdu7x.js → index-DxCiQhlC.js} +2 -2
  44. package/dist/{index-BshhtCGw.cjs → index-DxNyBY1w.cjs} +1 -1
  45. package/dist/{index-C8hk7atl.cjs → index-DygfoHkC.cjs} +1 -1
  46. package/dist/{index-CYd3fvF0.js → index-EzZiR3ly.js} +4 -4
  47. package/dist/{index-D7yRWMe9.js → index-LoH8EwXA.js} +3 -3
  48. package/dist/{index-CiC0L55k.cjs → index-N9Y_z5k_.cjs} +1 -1
  49. package/dist/{index-Dn-Jaifm.cjs → index-PdwN7EaB.cjs} +1 -1
  50. package/dist/{index-CHHBmFWf.js → index-eH2F0oMQ.js} +3 -3
  51. package/dist/index-gXA0eS6O.cjs +15 -0
  52. package/dist/{index-B8_cYT3O.cjs → index-o5dof3CA.cjs} +1 -1
  53. package/dist/{index-BSQfr-21.js → index-pvjM6t0d.js} +6 -6
  54. package/dist/{index-Lr-jM5BD.js → index-qEFkFDy8.js} +7 -7
  55. package/dist/{index-CiiImREt.js → index-uatggqnf.js} +5 -5
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-3lAQFpGt.cjs → index.vue_vue_type_script_setup_true_lang-EaaJleWP.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-AQDB--lA.js → index.vue_vue_type_script_setup_true_lang-YlUeUQJ4.js} +3 -3
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C2oFMwa6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bw_ydbnW.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-XVUNtATu.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CClJxB6F.js} +2 -2
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-DuQ2lr1u.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2duMdZT.cjs} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CPssMJ2M.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CcYfjXoA.js} +8 -8
  62. package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-TQjM60R4.js +1947 -0
  63. package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Z8fBYrL9.cjs +1 -0
  64. package/dist/{login-CcYUrJ0A.js → login-B520hsEu.js} +1 -1
  65. package/dist/{login-Cf3T6tgq.cjs → login-BMAi9yYX.cjs} +1 -1
  66. package/dist/{main-B3iC_GFY.js → main-Dpbg9Pxc.js} +6 -6
  67. package/dist/{main-3IJiaVcX.cjs → main-yzKa6bxy.cjs} +1 -1
  68. package/dist/{menu-DBX0QxSF.cjs → menu-BAEUpxbd.cjs} +1 -1
  69. package/dist/{menu-DBnQNYlq.js → menu-qAL8FiSW.js} +1 -1
  70. package/dist/ss-component.cjs +1 -1
  71. package/dist/ss-component.css +2 -2
  72. package/dist/ss-component.js +10 -10
  73. package/dist/ss-component3.cjs +1 -1
  74. package/dist/ss-component3.js +1 -1
  75. package/dist/{threeModel-BJTtjg6F.js → threeModel-ClGUp5fG.js} +639 -763
  76. package/dist/threeModel-CxKWxMlL.cjs +1 -0
  77. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-C3w6_nGz.cjs → threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-BOT5Tivd.cjs} +181 -181
  78. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-bdUv7Wu8.js → threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-DYhzYEGg.js} +4567 -5349
  79. package/package.json +5 -1
  80. package/public/icons/svg/EyeFill.svg +1 -0
  81. package/dist/index-Cz3Bar44.cjs +0 -1
  82. package/dist/index-D55Us6td.js +0 -2782
  83. package/dist/index-W-mzocaB.cjs +0 -4
  84. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-D684C3wt.cjs +0 -1
  85. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-iXOYIk8v.js +0 -1929
  86. package/dist/threeModel-nm_sKExW.cjs +0 -1
@@ -1,1929 +0,0 @@
1
- import { a as Ma, s as Pa, d as Ia, e as Na, f as ja, g as xa } from "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CPssMJ2M.js";
2
- import { ref as ue, reactive as La, defineComponent as ya, h as Ae, Transition as Ta, withCtx as Ba, withDirectives as Oa, createVNode as _a, vShow as ma, createApp as Ua, toRefs as Ca, nextTick as da, isRef as Ra, defineProps as $a, computed as Re, onMounted as Ja, watch as be } from "vue";
3
- import { c as _e, g as ne, d as Ee, e as Ga, f as Ce, u as Ye, h as ha, p as Pe, s as ke, E as he } from "./menu-DBnQNYlq.js";
4
- import { useRouter as Ha } from "vue-router";
5
- import { u as ga } from "./login-CcYUrJ0A.js";
6
- import { g as za } from "./index-D55Us6td.js";
7
- import { g as qa, t as va, b as ye, c as Xe, d as He, e as Ze, f as we, u as Ya, h as Wa, i as Xa, j as Za, k as Qa, I as pe } from "./index-CiiImREt.js";
8
- import { c as d, a as xe, J as Va } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-XVUNtATu.js";
9
- import { g as Fa, d as Qe } from "./crypto-BRyGpjGR.js";
10
- import { t as es, g as Ve } from "./index-Ct43M3Ia.js";
11
- import { t as as, u as ss } from "./index-B5T_VqYF.js";
12
- import { t as ls } from "./index-D7yRWMe9.js";
13
- import { t as rs } from "./index-CHHBmFWf.js";
14
- import { u as ka } from "./threeModel.vue_vue_type_style_index_0_scoped_e7dd7d83_lang-bdUv7Wu8.js";
15
- import { a as ts, b as me, i as ns, c as Aa, g as Se, d as Fe, e as Sa, h as os } from "./index-jteGdz9o.js";
16
- import { g as cs } from "./index-AELMbDVd.js";
17
- import { v as is } from "./index-DMQYdu7x.js";
18
- import { c as us, m as fs, g as ps, b as ys, p as ds } from "./array-CfYKb4Nd.js";
19
- function hs(e, a) {
20
- let s;
21
- const r = ue(!1), l = La({
22
- ...e,
23
- originalPosition: "",
24
- originalOverflow: "",
25
- visible: !1
26
- });
27
- function n(y) {
28
- l.text = y;
29
- }
30
- function c() {
31
- const y = l.parent, E = v.ns;
32
- if (!y.vLoadingAddClassList) {
33
- let k = y.getAttribute("loading-number");
34
- k = Number.parseInt(k) - 1, k ? y.setAttribute("loading-number", k.toString()) : (me(y, E.bm("parent", "relative")), y.removeAttribute("loading-number")), me(y, E.bm("parent", "hidden"));
35
- }
36
- p(), i.unmount();
37
- }
38
- function p() {
39
- var y, E;
40
- (E = (y = v.$el) == null ? void 0 : y.parentNode) == null || E.removeChild(v.$el);
41
- }
42
- function u() {
43
- var y;
44
- e.beforeClose && !e.beforeClose() || (r.value = !0, clearTimeout(s), s = setTimeout(t, 400), l.visible = !1, (y = e.closed) == null || y.call(e));
45
- }
46
- function t() {
47
- if (!r.value)
48
- return;
49
- const y = l.parent;
50
- r.value = !1, y.vLoadingAddClassList = void 0, c();
51
- }
52
- const o = ya({
53
- name: "ElLoading",
54
- setup(y, { expose: E }) {
55
- const { ns: k, zIndex: A } = ts("loading");
56
- return E({
57
- ns: k,
58
- zIndex: A
59
- }), () => {
60
- const K = l.spinner || l.svg, S = Ae("svg", {
61
- class: "circular",
62
- viewBox: l.svgViewBox ? l.svgViewBox : "0 0 50 50",
63
- ...K ? { innerHTML: K } : {}
64
- }, [
65
- Ae("circle", {
66
- class: "path",
67
- cx: "25",
68
- cy: "25",
69
- r: "20",
70
- fill: "none"
71
- })
72
- ]), O = l.text ? Ae("p", { class: k.b("text") }, [l.text]) : void 0;
73
- return Ae(Ta, {
74
- name: k.b("fade"),
75
- onAfterLeave: t
76
- }, {
77
- default: Ba(() => [
78
- Oa(_a("div", {
79
- style: {
80
- backgroundColor: l.background || ""
81
- },
82
- class: [
83
- k.b("mask"),
84
- l.customClass,
85
- l.fullscreen ? "is-fullscreen" : ""
86
- ]
87
- }, [
88
- Ae("div", {
89
- class: k.b("spinner")
90
- }, [S, O])
91
- ]), [[ma, l.visible]])
92
- ])
93
- });
94
- };
95
- }
96
- }), i = Ua(o);
97
- Object.assign(i._context, a ?? {});
98
- const v = i.mount(document.createElement("div"));
99
- return {
100
- ...Ca(l),
101
- setText: n,
102
- removeElLoadingChild: p,
103
- close: u,
104
- handleAfterLeave: t,
105
- vm: v,
106
- get $el() {
107
- return v.$el;
108
- }
109
- };
110
- }
111
- let Le;
112
- const ve = function(e = {}) {
113
- if (!ns)
114
- return;
115
- const a = gs(e);
116
- if (a.fullscreen && Le)
117
- return Le;
118
- const s = hs({
119
- ...a,
120
- closed: () => {
121
- var l;
122
- (l = a.closed) == null || l.call(a), a.fullscreen && (Le = void 0);
123
- }
124
- }, ve._context);
125
- vs(a, a.parent, s), ea(a, a.parent, s), a.parent.vLoadingAddClassList = () => ea(a, a.parent, s);
126
- let r = a.parent.getAttribute("loading-number");
127
- return r ? r = `${Number.parseInt(r) + 1}` : r = "1", a.parent.setAttribute("loading-number", r), a.parent.appendChild(s.$el), da(() => s.visible.value = a.visible), a.fullscreen && (Le = s), s;
128
- }, gs = (e) => {
129
- var a, s, r, l;
130
- let n;
131
- return Aa(e.target) ? n = (a = document.querySelector(e.target)) != null ? a : document.body : n = e.target || document.body, {
132
- parent: n === document.body || e.body ? document.body : n,
133
- background: e.background || "",
134
- svg: e.svg || "",
135
- svgViewBox: e.svgViewBox || "",
136
- spinner: e.spinner || !1,
137
- text: e.text || "",
138
- fullscreen: n === document.body && ((s = e.fullscreen) != null ? s : !0),
139
- lock: (r = e.lock) != null ? r : !1,
140
- customClass: e.customClass || "",
141
- visible: (l = e.visible) != null ? l : !0,
142
- beforeClose: e.beforeClose,
143
- closed: e.closed,
144
- target: n
145
- };
146
- }, vs = async (e, a, s) => {
147
- const { nextZIndex: r } = s.vm.zIndex || s.vm._.exposed.zIndex, l = {};
148
- if (e.fullscreen)
149
- s.originalPosition.value = Se(document.body, "position"), s.originalOverflow.value = Se(document.body, "overflow"), l.zIndex = r();
150
- else if (e.parent === document.body) {
151
- s.originalPosition.value = Se(document.body, "position"), await da();
152
- for (const n of ["top", "left"]) {
153
- const c = n === "top" ? "scrollTop" : "scrollLeft";
154
- l[n] = `${e.target.getBoundingClientRect()[n] + document.body[c] + document.documentElement[c] - Number.parseInt(Se(document.body, `margin-${n}`), 10)}px`;
155
- }
156
- for (const n of ["height", "width"])
157
- l[n] = `${e.target.getBoundingClientRect()[n]}px`;
158
- } else
159
- s.originalPosition.value = Se(a, "position");
160
- for (const [n, c] of Object.entries(l))
161
- s.$el.style[n] = c;
162
- }, ea = (e, a, s) => {
163
- const r = s.vm.ns || s.vm._.exposed.ns;
164
- ["absolute", "fixed", "sticky"].includes(s.originalPosition.value) ? me(a, r.bm("parent", "relative")) : Fe(a, r.bm("parent", "relative")), e.fullscreen && e.lock ? Fe(a, r.bm("parent", "hidden")) : me(a, r.bm("parent", "hidden"));
165
- };
166
- ve._context = null;
167
- const Be = Symbol("ElLoading"), aa = (e, a) => {
168
- var s, r, l, n;
169
- const c = a.instance, p = (y) => Sa(a.value) ? a.value[y] : void 0, u = (y) => {
170
- const E = Aa(y) && (c == null ? void 0 : c[y]) || y;
171
- return E && ue(E);
172
- }, t = (y) => u(p(y) || e.getAttribute(`element-loading-${os(y)}`)), o = (s = p("fullscreen")) != null ? s : a.modifiers.fullscreen, i = {
173
- text: t("text"),
174
- svg: t("svg"),
175
- svgViewBox: t("svgViewBox"),
176
- spinner: t("spinner"),
177
- background: t("background"),
178
- customClass: t("customClass"),
179
- fullscreen: o,
180
- target: (r = p("target")) != null ? r : o ? void 0 : e,
181
- body: (l = p("body")) != null ? l : a.modifiers.body,
182
- lock: (n = p("lock")) != null ? n : a.modifiers.lock
183
- }, v = ve(i);
184
- v._context = Ke._context, e[Be] = {
185
- options: i,
186
- instance: v
187
- };
188
- }, ks = (e, a) => {
189
- for (const s of Object.keys(a))
190
- Ra(a[s]) && (a[s].value = e[s]);
191
- }, Ke = {
192
- mounted(e, a) {
193
- a.value && aa(e, a);
194
- },
195
- updated(e, a) {
196
- const s = e[Be];
197
- a.oldValue !== a.value && (a.value && !a.oldValue ? aa(e, a) : a.value && a.oldValue ? Sa(a.value) && ks(a.value, s.options) : s == null || s.instance.close());
198
- },
199
- unmounted(e) {
200
- var a;
201
- (a = e[Be]) == null || a.instance.close(), e[Be] = null;
202
- }
203
- };
204
- Ke._context = null;
205
- const As = {
206
- install(e) {
207
- ve._context = e._context, Ke._context = e._context, e.directive("loading", Ke), e.config.globalProperties.$loading = ve;
208
- },
209
- directive: Ke,
210
- service: ve
211
- }, Ss = (e, a) => {
212
- var r;
213
- return (r = va(d(e))) == null ? void 0 : r.map((l) => {
214
- var n, c, p, u;
215
- if (e.comp === "Table")
216
- return {
217
- key: {
218
- systemKey: sessionStorage.getItem("systemKey"),
219
- pageKey: a.name,
220
- type: "structure",
221
- version: 1,
222
- parentTable: (l == null ? void 0 : l.parentTableContents) ?? ""
223
- },
224
- value: {
225
- pageData: {
226
- comp: (n = ye(d(l))) == null ? void 0 : n.comp,
227
- compData: (c = ye(d(l))) == null ? void 0 : c.compData,
228
- name: (p = ye(d(l))) == null ? void 0 : p.name
229
- }
230
- }
231
- };
232
- if ((l == null ? void 0 : l.key) === "extraButton") {
233
- if (((u = Object.values(l == null ? void 0 : l.value)) == null ? void 0 : u.length) !== 0)
234
- return {
235
- key: {
236
- systemKey: sessionStorage.getItem("systemKey"),
237
- pageKey: a.name,
238
- type: "structureMethod",
239
- version: 1
240
- },
241
- value: {
242
- pageData: l.value
243
- }
244
- };
245
- } else
246
- return {
247
- key: {
248
- systemKey: sessionStorage.getItem("systemKey"),
249
- pageKey: a.name,
250
- type: "structure",
251
- version: 1,
252
- parentTable: (l == null ? void 0 : l.parentTableContents) ?? ""
253
- },
254
- value: {
255
- pageData: l
256
- }
257
- };
258
- });
259
- }, Ds = async (e) => {
260
- let a = [], s = [];
261
- e == null || e.map(async (r) => {
262
- var l;
263
- await ((l = r.compData) == null ? void 0 : l.forEach(async (n) => {
264
- var p, u, t;
265
- const c = (p = d(n == null ? void 0 : n.contents)) == null ? void 0 : p.map((o) => {
266
- if (!Array.isArray(o)) {
267
- const i = Ss(d(o), r);
268
- return i == null ? void 0 : i[0];
269
- }
270
- });
271
- if (s.push({
272
- parentKey: qa((u = d(r)) == null ? void 0 : u.name),
273
- content: c
274
- }), (c == null ? void 0 : c.length) > 0) {
275
- const o = await _e({
276
- dataList: c
277
- });
278
- a.push(o);
279
- }
280
- (t = n.contents) == null || t.map(async (o) => {
281
- var i;
282
- Array.isArray(o) || (i = va(d(o))) == null || i.forEach(async (v) => {
283
- var y, E, k, A, K, S, O;
284
- if (o.comp === "Table") {
285
- const R = (K = (A = (await ne({
286
- key: {
287
- systemKey: sessionStorage.getItem("systemKey"),
288
- pageKey: r.name,
289
- type: "structure",
290
- version: 1,
291
- parentTable: (v == null ? void 0 : v.parentTableContents) ?? ""
292
- },
293
- value: {
294
- pageData: {
295
- comp: (y = ye(d(v))) == null ? void 0 : y.comp,
296
- compData: (E = ye(d(v))) == null ? void 0 : E.compData,
297
- name: (k = ye(d(v))) == null ? void 0 : k.name
298
- }
299
- }
300
- })).data.result) == null ? void 0 : A[0]) == null ? void 0 : K.id, J = (S = Xe(d(v))) == null ? void 0 : S.map((x) => {
301
- var j, g, L, _;
302
- if ((x == null ? void 0 : x.length) !== 0)
303
- return {
304
- key: {
305
- systemKey: sessionStorage.getItem("systemKey"),
306
- pageKey: r.name,
307
- type: "data",
308
- tableId: R
309
- },
310
- value: {
311
- tableData: He(x, (_ = Ze((L = (g = (j = ye(d(v))) == null ? void 0 : j.compData) == null ? void 0 : g.find((m) => (m == null ? void 0 : m.key) === "header")) == null ? void 0 : L.contents)) == null ? void 0 : _.filter((m) => m !== "操作"))
312
- }
313
- };
314
- }), z = await _e({
315
- dataList: J
316
- });
317
- a.push(z);
318
- const C = await ((O = Xe(d(v))) == null ? void 0 : O.map(async (x) => {
319
- var _, m, G, I, Y;
320
- let j;
321
- return (x == null ? void 0 : x.length) !== 0 && (j = await ne({
322
- key: {
323
- systemKey: sessionStorage.getItem("systemKey"),
324
- pageKey: r.name,
325
- type: "data",
326
- tableId: R
327
- },
328
- value: {
329
- tableData: He(x, (I = Ze((G = (m = (_ = ye(d(v))) == null ? void 0 : _.compData) == null ? void 0 : m.find((q) => (q == null ? void 0 : q.key) === "header")) == null ? void 0 : G.contents)) == null ? void 0 : I.filter((q) => q !== "操作"))
330
- }
331
- })), await ((Y = (await ne({
332
- key: {
333
- parentTable: x,
334
- systemKey: sessionStorage.getItem("systemKey"),
335
- pageKey: r.name,
336
- type: "structure"
337
- }
338
- })).data.result) == null ? void 0 : Y.map(async (q) => {
339
- var F, re;
340
- return await Ee({
341
- id: q.id,
342
- key: {
343
- systemKey: q.key.systemKey,
344
- pageKey: q.key.pageKey,
345
- type: q.key.type,
346
- version: q.key.version,
347
- parentTable: q.key.parentTable === "" ? "" : (re = (F = j.data.result) == null ? void 0 : F[0]) == null ? void 0 : re.id
348
- }
349
- });
350
- }));
351
- }));
352
- a.push(C);
353
- }
354
- });
355
- });
356
- }));
357
- }), await Promise.all(a);
358
- }, De = (e) => {
359
- var r;
360
- let a = "", s = [];
361
- return (r = d(e).split("/")) == null || r.forEach((l, n) => {
362
- n !== d(e).split("/").length - 1 && s.push(l);
363
- }), s == null || s.forEach((l) => {
364
- a = a === "" ? a + l : a + "/" + l;
365
- }), a;
366
- }, sa = (e, a) => {
367
- var l;
368
- let s = (l = e == null ? void 0 : e.filter((n) => (n == null ? void 0 : n.label) !== "操作")) == null ? void 0 : l.map((n) => n == null ? void 0 : n.label);
369
- return a == null ? void 0 : a.map((n) => He(n, s));
370
- }, la = (e, a) => {
371
- var s, r, l, n, c, p, u, t;
372
- return ((r = (s = e == null ? void 0 : e.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : s.contents) == null ? void 0 : r.length) === 0 ? sa((c = (n = (l = a == null ? void 0 : a.value) == null ? void 0 : l.compData) == null ? void 0 : n.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : c.contents, (p = e == null ? void 0 : e.find((o) => (o == null ? void 0 : o.key) === "tableContents")) == null ? void 0 : p.contents) : sa((u = e == null ? void 0 : e.find((o) => (o == null ? void 0 : o.key) === "header")) == null ? void 0 : u.contents, (t = e == null ? void 0 : e.find((o) => (o == null ? void 0 : o.key) === "tableContents")) == null ? void 0 : t.contents);
373
- }, ra = (e, a) => {
374
- var r;
375
- let s = d(e);
376
- return s.compData = (r = d(s.compData)) == null ? void 0 : r.map((l) => ((l == null ? void 0 : l.key) === "formContent" && (l.contents = a == null ? void 0 : a.map((n) => {
377
- var c, p;
378
- return n.value = ((p = (c = l.contents) == null ? void 0 : c.find((u) => u.key === n.key)) == null ? void 0 : p.value) ?? "", n;
379
- })), l)), s;
380
- }, bs = async (e) => {
381
- var c, p, u;
382
- let a = (c = d(e)) == null ? void 0 : c.map((t) => t == null ? void 0 : t.path);
383
- const s = await ne({
384
- key: {
385
- systemKey: sessionStorage.getItem("systemKey"),
386
- type: "structure"
387
- }
388
- });
389
- if (s.data.code !== 200) return;
390
- let r = /* @__PURE__ */ new Map();
391
- (p = s.data.result) == null || p.forEach((t) => {
392
- var i, v, y, E;
393
- let o = [{
394
- key: t == null ? void 0 : t.id,
395
- name: ((v = (i = t == null ? void 0 : t.value) == null ? void 0 : i.pageData) == null ? void 0 : v.name) ?? "",
396
- value: (y = t == null ? void 0 : t.value) == null ? void 0 : y.pageData
397
- }];
398
- r[t.key.pageKey] = ((E = r[t.key.pageKey]) == null ? void 0 : E.length) > 0 ? [...r[t.key.pageKey], ...o] : o;
399
- });
400
- let l = /* @__PURE__ */ new Map();
401
- a == null || a.forEach((t) => {
402
- r[t] && (l[t] = r[t]);
403
- });
404
- let n = d(e);
405
- n = (u = d(n)) == null ? void 0 : u.map((t) => {
406
- var i, v, y, E;
407
- let o = (i = d(t)) == null ? void 0 : i.key;
408
- return o.tableId = (y = (v = l[t == null ? void 0 : t.path]) == null ? void 0 : v.find((k) => {
409
- var A;
410
- return (k == null ? void 0 : k.name) === ((A = d(t)) == null ? void 0 : A.name);
411
- })) == null ? void 0 : y.key, t = {
412
- key: o,
413
- value: (E = d(t)) == null ? void 0 : E.value
414
- }, t;
415
- }), n.length !== 0 && await _e({
416
- dataList: n
417
- });
418
- }, Te = (e, a) => {
419
- var s, r, l, n, c, p, u, t, o, i, v, y, E, k, A;
420
- if (((r = (s = d(e)) == null ? void 0 : s.filter((K) => {
421
- var S;
422
- return (K == null ? void 0 : K.name) === ((S = d(a)) == null ? void 0 : S.name);
423
- })) == null ? void 0 : r.length) === 1)
424
- return {
425
- contents: (u = (p = (c = (n = (l = d(e)) == null ? void 0 : l.find((K) => {
426
- var S;
427
- return (K == null ? void 0 : K.name) === ((S = d(a)) == null ? void 0 : S.name);
428
- })) == null ? void 0 : n.value) == null ? void 0 : c.compData) == null ? void 0 : p.find((K) => (K == null ? void 0 : K.key) === "formContent")) == null ? void 0 : u.contents,
429
- key: (o = (t = d(e)) == null ? void 0 : t.find((K) => {
430
- var S;
431
- return (K == null ? void 0 : K.name) === ((S = d(a)) == null ? void 0 : S.name);
432
- })) == null ? void 0 : o.key
433
- };
434
- {
435
- let K, S, O = (E = (y = (v = (i = d(a)) == null ? void 0 : i.compData) == null ? void 0 : v.find((P) => (P == null ? void 0 : P.key) === "formContent")) == null ? void 0 : y.contents) == null ? void 0 : E.map((P) => P == null ? void 0 : P.key);
436
- return (A = (k = d(e)) == null ? void 0 : k.filter((P) => {
437
- var R;
438
- return (P == null ? void 0 : P.name) === ((R = d(a)) == null ? void 0 : R.name);
439
- })) == null || A.forEach((P) => {
440
- var J, z, C, x, j, g, L, _;
441
- let R = (j = (x = (C = (z = (J = d(P)) == null ? void 0 : J.value) == null ? void 0 : z.compData) == null ? void 0 : C.find((m) => (m == null ? void 0 : m.key) === "formContent")) == null ? void 0 : x.contents) == null ? void 0 : j.map((m) => m == null ? void 0 : m.key);
442
- O.every((m) => R.includes(m)) && (K = (_ = (L = (g = P == null ? void 0 : P.value) == null ? void 0 : g.compData) == null ? void 0 : L.find((m) => (m == null ? void 0 : m.key) === "formContent")) == null ? void 0 : _.contents, S = P == null ? void 0 : P.key);
443
- }), {
444
- contents: K,
445
- key: S
446
- };
447
- }
448
- }, Ks = async (e) => {
449
- var u, t, o;
450
- let a = [];
451
- (u = d(e)) == null || u.forEach((i) => {
452
- a.push(i.name);
453
- let v = De(d(i.name));
454
- v !== "" && a.push(v);
455
- }), a = [...new Set(a)];
456
- const s = await ne({
457
- key: {
458
- systemKey: sessionStorage.getItem("systemKey"),
459
- type: "structure"
460
- }
461
- });
462
- if (s.data.code !== 200) return;
463
- let r = /* @__PURE__ */ new Map();
464
- (t = s.data.result) == null || t.forEach((i) => {
465
- var y, E, k, A;
466
- let v = [{
467
- key: i == null ? void 0 : i.id,
468
- name: ((E = (y = i == null ? void 0 : i.value) == null ? void 0 : y.pageData) == null ? void 0 : E.name) ?? "",
469
- value: (k = i == null ? void 0 : i.value) == null ? void 0 : k.pageData
470
- }];
471
- r[i.key.pageKey] = ((A = r[i.key.pageKey]) == null ? void 0 : A.length) > 0 ? [...r[i.key.pageKey], ...v] : v;
472
- });
473
- let l = /* @__PURE__ */ new Map();
474
- for (let i in r)
475
- a != null && a.find((v) => v === i) && (l[i] = r[i]);
476
- let n = [], c = [], p = [];
477
- (o = d(e)) == null || o.forEach((i) => {
478
- var v, y;
479
- l != null && l[i.name] ? (v = i == null ? void 0 : i.compData) == null || v.forEach((E) => {
480
- var k;
481
- (k = E == null ? void 0 : E.contents) == null || k.forEach((A) => {
482
- var K, S, O, P, R, J, z;
483
- if ((A == null ? void 0 : A.comp) === "Table") {
484
- let C = la((K = d(A)) == null ? void 0 : K.compData, (S = d(l == null ? void 0 : l[i.name])) == null ? void 0 : S.find((x) => (x == null ? void 0 : x.name) === (A == null ? void 0 : A.name)));
485
- C == null || C.forEach((x) => {
486
- var j, g;
487
- c.push({
488
- key: {
489
- type: "data",
490
- pageKey: i == null ? void 0 : i.name,
491
- tableId: (g = (j = l == null ? void 0 : l[i.name]) == null ? void 0 : j.find((L) => (L == null ? void 0 : L.name) === (A == null ? void 0 : A.name))) == null ? void 0 : g.key,
492
- systemKey: sessionStorage.getItem("systemKey")
493
- },
494
- value: {
495
- tableData: x
496
- }
497
- });
498
- });
499
- } else if ((P = Te((O = d(l)) == null ? void 0 : O[i.name], d(A))) != null && P.contents) {
500
- let C = ra(d(A), (R = Te(l == null ? void 0 : l[i.name], d(A))) == null ? void 0 : R.contents);
501
- n != null && n.find((x) => {
502
- var j, g;
503
- return (x == null ? void 0 : x.id) === ((g = Te((j = d(l)) == null ? void 0 : j[i.name], d(A))) == null ? void 0 : g.key);
504
- }) || n.push({
505
- id: (z = Te((J = d(l)) == null ? void 0 : J[i.name], d(A))) == null ? void 0 : z.key,
506
- value: {
507
- pageData: C
508
- }
509
- });
510
- }
511
- });
512
- }) : l != null && l[De(i.name)] && ((y = i == null ? void 0 : i.compData) == null || y.forEach((E) => {
513
- var k;
514
- (k = E == null ? void 0 : E.contents) == null || k.forEach((A) => {
515
- var K, S, O, P, R, J, z, C, x;
516
- if ((A == null ? void 0 : A.comp) === "Table") {
517
- let j = (S = (K = l == null ? void 0 : l[De(i.name)]) == null ? void 0 : K.find((L) => (L == null ? void 0 : L.name) === (A == null ? void 0 : A.name))) == null ? void 0 : S.value;
518
- c.push({
519
- key: {
520
- type: "structure",
521
- pageKey: i == null ? void 0 : i.name,
522
- parentTable: "",
523
- systemKey: sessionStorage.getItem("systemKey"),
524
- version: 1
525
- },
526
- value: {
527
- pageData: j
528
- }
529
- });
530
- let g = la((O = d(A)) == null ? void 0 : O.compData, (P = d(l == null ? void 0 : l[De(i.name)])) == null ? void 0 : P.find((L) => (L == null ? void 0 : L.name) === (A == null ? void 0 : A.name)));
531
- g == null || g.forEach((L) => {
532
- p.push({
533
- name: A.name,
534
- path: i.name,
535
- key: {
536
- type: "data",
537
- pageKey: i == null ? void 0 : i.name,
538
- tableId: "",
539
- systemKey: sessionStorage.getItem("systemKey")
540
- },
541
- value: {
542
- tableData: L
543
- }
544
- });
545
- });
546
- } else {
547
- let j = ra(d(A), (x = (C = (z = (J = (R = d(l == null ? void 0 : l[De(i.name)])) == null ? void 0 : R.find((g) => (g == null ? void 0 : g.name) === (A == null ? void 0 : A.name))) == null ? void 0 : J.value) == null ? void 0 : z.compData) == null ? void 0 : C.find((g) => (g == null ? void 0 : g.key) === "formContent")) == null ? void 0 : x.contents);
548
- c.push({
549
- key: {
550
- type: "structure",
551
- pageKey: i == null ? void 0 : i.name,
552
- parentTable: "",
553
- systemKey: sessionStorage.getItem("systemKey"),
554
- version: 1
555
- },
556
- value: {
557
- pageData: j
558
- }
559
- });
560
- }
561
- });
562
- }));
563
- }), c.length !== 0 && (await _e({
564
- dataList: c
565
- }), p.length !== 0 && await bs(p), n.length !== 0 && await Ga({
566
- dataList: n
567
- }));
568
- }, Da = Ye(), ze = (e) => e == null ? void 0 : e.map((a) => (a.contents && (a.contents = a.contents.filter((s) => {
569
- var r;
570
- return ((r = s.comp) == null ? void 0 : r.toUpperCase()) !== "CALCULATOR";
571
- })), a.compData && (a.compData = ze(a.compData)), a)), Es = async (e) => {
572
- var s, r, l, n, c, p, u, t, o, i, v, y, E, k, A, K, S, O, P, R, J, z, C;
573
- const a = await ne({
574
- key: {
575
- systemKey: sessionStorage.getItem("systemKey"),
576
- layer: "superAdmin"
577
- }
578
- });
579
- if ((e == null ? void 0 : e.length) === 0) {
580
- if (((s = a == null ? void 0 : a.data) == null ? void 0 : s.code) === 200 && (n = (l = (r = a == null ? void 0 : a.data) == null ? void 0 : r.result) == null ? void 0 : l[0]) != null && n.id) {
581
- const x = (p = (c = a == null ? void 0 : a.data) == null ? void 0 : c.result) == null ? void 0 : p[0], j = (o = (t = (u = a == null ? void 0 : a.data) == null ? void 0 : u.result) == null ? void 0 : t[0]) == null ? void 0 : o.key;
582
- j.systemType = "管理系统", await Ee({
583
- id: x == null ? void 0 : x.id,
584
- key: j
585
- });
586
- }
587
- return;
588
- }
589
- try {
590
- if (((i = a == null ? void 0 : a.data) == null ? void 0 : i.code) === 200 && (E = (y = (v = a == null ? void 0 : a.data) == null ? void 0 : v.result) == null ? void 0 : y[0]) != null && E.id) {
591
- const x = (A = (k = a == null ? void 0 : a.data) == null ? void 0 : k.result) == null ? void 0 : A[0], j = (O = (S = (K = a == null ? void 0 : a.data) == null ? void 0 : K.result) == null ? void 0 : S[0]) == null ? void 0 : O.key, g = (P = d(e)) == null ? void 0 : P.map((L) => {
592
- var _;
593
- return (_ = L.compData) == null ? void 0 : _[0];
594
- });
595
- j.systemType = (J = (R = g == null ? void 0 : g.find((L) => (L == null ? void 0 : L.key) === "type")) == null ? void 0 : R.contents) == null ? void 0 : J[0], j.name = (C = (z = g == null ? void 0 : g.find((L) => (L == null ? void 0 : L.key) === "name")) == null ? void 0 : z.contents) == null ? void 0 : C[0], await Ee({
596
- id: x == null ? void 0 : x.id,
597
- key: j
598
- });
599
- }
600
- } catch (x) {
601
- return Promise.reject(x);
602
- }
603
- }, ta = async (e) => {
604
- var a, s, r, l;
605
- try {
606
- const n = await Ce({
607
- key: {
608
- systemKey: sessionStorage.getItem("systemKey"),
609
- pageKey: "menu",
610
- type: "structure"
611
- },
612
- value: {
613
- pageData: e
614
- }
615
- });
616
- if (((a = n == null ? void 0 : n.data) == null ? void 0 : a.code) === 200) {
617
- const c = (r = (s = e == null ? void 0 : e.compData) == null ? void 0 : s[0]) == null ? void 0 : r.contents;
618
- Da.setRawMenus(c ?? []);
619
- }
620
- return (l = n == null ? void 0 : n.data) == null ? void 0 : l.code;
621
- } catch (n) {
622
- return Promise.reject(n);
623
- }
624
- }, ws = async () => {
625
- var e, a, s, r, l, n, c, p;
626
- try {
627
- const u = await ne({
628
- key: {
629
- systemKey: sessionStorage.getItem("systemKey"),
630
- pageKey: "menu",
631
- type: "structure"
632
- }
633
- });
634
- return ((e = u == null ? void 0 : u.data) == null ? void 0 : e.code) === 200 && ((r = (s = (a = u == null ? void 0 : u.data) == null ? void 0 : a.result) == null ? void 0 : s[0]) != null && r.id) && await ha({
635
- id: (c = (n = (l = u == null ? void 0 : u.data) == null ? void 0 : l.result) == null ? void 0 : n[0]) == null ? void 0 : c.id
636
- }), (p = u == null ? void 0 : u.data) == null ? void 0 : p.code;
637
- } catch (u) {
638
- return Promise.reject(u);
639
- }
640
- }, Ms = async (e, a) => {
641
- var s, r, l, n;
642
- try {
643
- const c = await Ee({
644
- id: e,
645
- value: {
646
- pageData: a
647
- }
648
- });
649
- if (((s = c == null ? void 0 : c.data) == null ? void 0 : s.code) === 200) {
650
- const p = (l = (r = a == null ? void 0 : a.compData) == null ? void 0 : r[0]) == null ? void 0 : l.contents;
651
- Da.setRawMenus(p ?? []);
652
- }
653
- return (n = c == null ? void 0 : c.data) == null ? void 0 : n.code;
654
- } catch (c) {
655
- return Promise.reject(c);
656
- }
657
- }, Ps = async () => {
658
- var e;
659
- try {
660
- const a = Fa(), s = await Ce({
661
- key: {
662
- systemKey: sessionStorage.getItem("systemKey"),
663
- pageKey: "secret",
664
- type: "system"
665
- },
666
- value: {
667
- cryptoInfo: {
668
- publicKey: a.publicKey,
669
- privateKey: a.privateKey
670
- }
671
- }
672
- });
673
- return ((e = s == null ? void 0 : s.data) == null ? void 0 : e.code) === 200;
674
- } catch (a) {
675
- throw a;
676
- }
677
- }, Is = async () => {
678
- var a, s, r;
679
- const e = await ne({
680
- key: {
681
- type: "structure",
682
- pageKey: "menu",
683
- systemKey: sessionStorage.getItem("systemKey")
684
- }
685
- });
686
- return !(((a = e == null ? void 0 : e.data) == null ? void 0 : a.code) === 200 && ((r = (s = e == null ? void 0 : e.data) == null ? void 0 : s.result) == null ? void 0 : r.length) > 0);
687
- }, Ns = async () => {
688
- var a, s, r;
689
- const e = await ne({
690
- key: {
691
- type: "structure",
692
- pageKey: "secret",
693
- systemKey: sessionStorage.getItem("systemKey")
694
- }
695
- });
696
- return !(((a = e == null ? void 0 : e.data) == null ? void 0 : a.code) === 200 && ((r = (s = e == null ? void 0 : e.data) == null ? void 0 : s.result) == null ? void 0 : r.length) > 0);
697
- }, bl = async (e) => {
698
- var s, r;
699
- let a = d(e);
700
- if (a = [...a, es, as, ls, rs], sessionStorage.getItem("systemKey"))
701
- if (e != null && e.find((l) => (l == null ? void 0 : l.comp) === "MenuTop")) {
702
- const l = a == null ? void 0 : a.find((t) => t.comp === "Menu"), n = a == null ? void 0 : a.filter((t) => t.comp === "System"), c = await Is(), p = await Ns();
703
- c && await ta(l), await Es(n), p && Ps();
704
- const u = (s = ze(d(a))) == null ? void 0 : s.filter((t) => {
705
- var o, i, v;
706
- return ((o = t == null ? void 0 : t.comp) == null ? void 0 : o.toUpperCase()) !== "MENU" && ((i = t == null ? void 0 : t.comp) == null ? void 0 : i.toUpperCase()) !== "MENUTOP" && ((v = t == null ? void 0 : t.comp) == null ? void 0 : v.toUpperCase()) !== "SYSTEM";
707
- });
708
- await Ds(u);
709
- } else {
710
- const l = a == null ? void 0 : a.find((c) => c.comp === "Menu");
711
- await ws(), await ta(l);
712
- const n = (r = ze(d(a))) == null ? void 0 : r.filter((c) => {
713
- var p, u, t;
714
- return ((p = c == null ? void 0 : c.comp) == null ? void 0 : p.toUpperCase()) !== "MENU" && ((u = c == null ? void 0 : c.comp) == null ? void 0 : u.toUpperCase()) !== "MENUTOP" && ((t = c == null ? void 0 : c.comp) == null ? void 0 : t.toUpperCase()) !== "SYSTEM";
715
- });
716
- await Ks(n);
717
- }
718
- }, Kl = ya({
719
- name: "menu",
720
- components: {
721
- ssMenu: Pa,
722
- DynamicIcon: Ma
723
- },
724
- setup() {
725
- const e = $a({
726
- mode: {
727
- type: String,
728
- default: "vertical"
729
- }
730
- }), a = ue("sub-menu-more"), s = Ye(), r = ka(Pe), l = ue(0), n = Ha(), {
731
- rawMenus: c,
732
- activeTopMenuPath: p,
733
- isRefreshMenus: u,
734
- menuTriggerType: t,
735
- permissionSideMenus: o,
736
- platform: i,
737
- cacheInputMenu: v,
738
- activeMainMenu: y
739
- } = ke(s), E = ga(), { structureData: k } = ke(E), A = ue([]), K = ue([]), S = Re(() => e == null ? void 0 : e.mode), O = (f) => {
740
- const h = As.service({
741
- lock: !0,
742
- text: "Loading",
743
- background: "rgba(0, 0, 0, 0.7)"
744
- });
745
- f || h.close();
746
- }, P = (f) => {
747
- let h = [], b = [];
748
- return f == null || f.forEach((D) => {
749
- h = R(D, b);
750
- }), h;
751
- }, R = (f, h) => {
752
- const b = h, D = [];
753
- f == null || f.forEach((M) => {
754
- Array.isArray(M) ? D.push({ children: R(M, []) }) : D.push({ title: M });
755
- });
756
- let w = D.reduce((M, H) => (Object.entries(H).forEach(([N, B]) => {
757
- M[N] === void 0 ? B != null && B.title ? M[N] = [B] : M[N] = B : (Array.isArray(M[N]) || (M[N] = [{ title: M[N] }]), B != null && B.title || Array.isArray(B) ? M[N].push(B) : M[N].push({ title: B }));
758
- }), M), {});
759
- return w = J(d(w)), b.push(w), Array.isArray(b) && (b == null ? void 0 : b.length) > 1 ? b : b == null ? void 0 : b[0];
760
- }, J = (f) => {
761
- var h, b, D;
762
- return Array.isArray(f == null ? void 0 : f.title) && ((h = f == null ? void 0 : f.title) == null ? void 0 : h.length) === ((D = (b = f == null ? void 0 : f.title) == null ? void 0 : b.filter((w) => w.title)) == null ? void 0 : D.length) ? f == null ? void 0 : f.title : Array.isArray(f == null ? void 0 : f.children) ? z(f) : f;
763
- }, z = (f) => {
764
- var b;
765
- const h = f;
766
- return h.children = (b = h.children) == null ? void 0 : b.map((D) => {
767
- var w;
768
- return (w = D == null ? void 0 : D.title) != null && w.children ? D == null ? void 0 : D.title : D;
769
- }), h;
770
- }, C = ue({}), x = (f) => f == null ? void 0 : f.map((h) => h.children && h.children.length > 0 ? {
771
- ...h,
772
- // 水平菜单仅显示一层
773
- children: h.level === 0 ? [] : h.children ?? [],
774
- childMenus: x(h.children)
775
- } : h), j = (f, h) => {
776
- var b, D;
777
- return h === 0 ? ((D = (b = K.value) == null ? void 0 : b.find((w) => {
778
- var M;
779
- return (M = f.title) == null ? void 0 : M.includes(w.value);
780
- })) == null ? void 0 : D.value) ?? "wenjianjia" : h === 1 ? "wenjianjia" : "wenjian";
781
- }, g = (f) => {
782
- var h, b;
783
- return (b = (h = K.value) == null ? void 0 : h.find((D) => {
784
- var w;
785
- return (w = f.title) == null ? void 0 : w.includes(D.value);
786
- })) == null ? void 0 : b.value;
787
- }, L = (f, h = "", b = 0) => {
788
- var H;
789
- let D, w = d(f);
790
- const M = (H = k.value) == null ? void 0 : H.map((N) => {
791
- var B;
792
- return (B = N == null ? void 0 : N.key) == null ? void 0 : B.pageKey;
793
- });
794
- return Array.isArray(w) || (w = [w]), D = w == null ? void 0 : w.map((N) => {
795
- const B = h ? `${h}/${N.title}` : N.title, Z = {
796
- ...N,
797
- path: B,
798
- level: b,
799
- show: !0,
800
- // icon: Icon[`${level}`],
801
- icon: i.value === "client" ? j(N, b) : g(N),
802
- carryData: M == null ? void 0 : M.includes(B),
803
- //便于角色授权菜单那里给叶子节点添加按钮节点
804
- isPenultimate: !N.children,
805
- // 便于自定义新增菜单
806
- children: [],
807
- childMenus: []
808
- };
809
- return N.children && N.children.length > 0 && (Z.children = L(N.children, B, b + 1)), Z;
810
- }), D;
811
- }, _ = Re(() => {
812
- let f = d(A.value);
813
- if (f = [...f, ...o.value], (f == null ? void 0 : f.length) === 0)
814
- return n.push("/"), [];
815
- const h = T(f, fe.value);
816
- h.isFlag || (f = h == null ? void 0 : h.data);
817
- const b = x(f);
818
- return s.setMenus(b), b;
819
- }), m = async (f) => {
820
- var w, M, H;
821
- let h, b;
822
- (f == null ? void 0 : f.level) === 0 ? b = {
823
- key: {
824
- type: "menuConfigData",
825
- systemKey: sessionStorage.getItem("systemKey"),
826
- rootNodePath: f == null ? void 0 : f.path,
827
- tableId: ""
828
- }
829
- } : b = {
830
- key: {
831
- type: "menuConfigData",
832
- systemKey: sessionStorage.getItem("systemKey"),
833
- pageKey: "/平台管理/菜单管理/" + (f == null ? void 0 : f.path),
834
- tableId: ""
835
- }
836
- };
837
- const D = await ne(b);
838
- return ((w = D == null ? void 0 : D.data) == null ? void 0 : w.code) === 200 && (h = (H = (M = D.data) == null ? void 0 : M.result) == null ? void 0 : H.map((N) => {
839
- var B;
840
- return {
841
- id: N == null ? void 0 : N.id,
842
- ...(B = N == null ? void 0 : N.value) == null ? void 0 : B.tableData
843
- };
844
- }), (f == null ? void 0 : f.level) === 0 && (C.value = d(h), console.log(77782, C.value))), (h == null ? void 0 : h.length) > 0 ? h : null;
845
- }, G = async (f, h) => {
846
- var b, D;
847
- if (!Array.isArray(h)) return f;
848
- for (const w of h) {
849
- let M = (w == null ? void 0 : w.path) === f.path;
850
- if (console.log("findMatchingMenu", w, f), M)
851
- return {
852
- ...f,
853
- config: await m(f),
854
- icon: (D = (b = w == null ? void 0 : w.data) == null ? void 0 : b.menuConfig) == null ? void 0 : D.menuIcon
855
- };
856
- }
857
- return f;
858
- }, I = ue(null), Y = async (f, h = null) => await Promise.all(
859
- f == null ? void 0 : f.map(async (b) => {
860
- var M;
861
- let D = await G(b, C.value);
862
- console.log("recurseFormatAsideMenus", D, C.value);
863
- const w = (D == null ? void 0 : D.config) ?? ((M = h == null ? void 0 : h.filter((H) => H.allowInherit)) == null ? void 0 : M.map((H) => {
864
- var N, B;
865
- return {
866
- ...H,
867
- structureIds: (B = (N = h == null ? void 0 : h.find((Z) => {
868
- var $;
869
- return (($ = Z == null ? void 0 : Z.structureIds) == null ? void 0 : $.length) > 0;
870
- })) == null ? void 0 : N.structureIds) == null ? void 0 : B.filter((Z) => (Z == null ? void 0 : Z.key) === "contentConfig")
871
- };
872
- }));
873
- return D != null && D.childMenus && (D == null ? void 0 : D.childMenus.length) > 0 && (D = {
874
- ...D,
875
- config: w,
876
- children: await Y(b == null ? void 0 : b.childMenus, w),
877
- childMenus: await Y(b == null ? void 0 : b.childMenus, w)
878
- }), {
879
- ...D,
880
- config: w
881
- };
882
- })
883
- ), q = async (f) => {
884
- var b;
885
- const h = await ne({
886
- key: {
887
- systemKey: sessionStorage.getItem("systemKey"),
888
- // pageKey: '平台管理/菜单管理/' + menu?.path,
889
- type: "structure",
890
- rootNodePath: f == null ? void 0 : f.path,
891
- structureBelong: "dialogConfig",
892
- parentTable: "",
893
- version: 1
894
- }
895
- });
896
- if (((b = h == null ? void 0 : h.data) == null ? void 0 : b.code) === 200) {
897
- I.value = null;
898
- const D = d(h.data.result);
899
- return (D == null ? void 0 : D.length) === 0 ? D : await Y(f.childMenus);
900
- }
901
- }, ae = async (f) => {
902
- var h, b, D;
903
- if (s.setMenuTriggerType("click"), r.setRouteToChildPath(""), s.setActiveTopMenuPath(f == null ? void 0 : f.path), s.setActiveMainMenu(f), await m(f), I.value = null, f != null && f.childMenus && ((h = f == null ? void 0 : f.childMenus) == null ? void 0 : h.length) > 0) {
904
- const w = (D = (b = f == null ? void 0 : f.childMenus) == null ? void 0 : b[0]) == null ? void 0 : D.path;
905
- s.setActiveMenuPath(w);
906
- const M = await q(f);
907
- console.log(666, M);
908
- const H = (M == null ? void 0 : M.length) === 0 ? f == null ? void 0 : f.childMenus : M;
909
- s.setAsideMenus(H);
910
- } else
911
- s.setAsideMenus([]);
912
- f.isRouter ? n.push(f.path) : n.push("/");
913
- }, F = (f) => {
914
- r.setRouteToChildPath(""), t.value === "click" ? l.value === 1 ? s.setActiveMenuPath(sessionStorage.getItem("pageKey")) : f !== a.value && s.setActiveMenuPath(f) : s.setMenuTriggerType("click"), f != null && f.startsWith("/") ? n.push(f) : n.push("/"), l.value++;
915
- }, re = (f) => {
916
- f !== a.value && s.setActiveMenuPath(f);
917
- }, se = (f) => {
918
- const h = document.documentElement;
919
- f == null || f.forEach((b) => {
920
- h.style.setProperty(b.name, b.value);
921
- });
922
- };
923
- Ja(() => {
924
- l.value = 1, K.value = za();
925
- });
926
- const fe = Re(() => {
927
- const f = sessionStorage.getItem("authority");
928
- return f ? JSON.parse(f) : [];
929
- });
930
- be(() => i.value, (f) => {
931
- f === "browser" ? (se(Ia), se(Na)) : f === "client" && (se(ja), se(xa));
932
- }, { immediate: !0 }), be(() => c.value, (f) => {
933
- if (f) {
934
- const h = f;
935
- A.value = L(P(h));
936
- } else
937
- s.setActiveMenuPath("");
938
- }, {
939
- immediate: !0
940
- });
941
- const U = (f, h) => {
942
- function b(D) {
943
- D == null || D.forEach((w) => {
944
- w.show = h == null ? void 0 : h.some((M) => M == null ? void 0 : M.includes(w.path)), w.children && b(w.children);
945
- });
946
- }
947
- return b(f), f;
948
- }, T = (f, h) => {
949
- if (Array.isArray(h)) {
950
- const b = Array.from(new Set(h == null ? void 0 : h.map((D) => D.substring(0, D.lastIndexOf("/")))));
951
- return {
952
- data: U(f, b),
953
- isFlag: !1
954
- };
955
- } else
956
- return {
957
- isFlag: (h == null ? void 0 : h.toUpperCase()) === "SUPERADMIN"
958
- };
959
- }, W = (f) => {
960
- var b;
961
- const h = [f == null ? void 0 : f.title];
962
- if (f != null && f.children && ((b = f == null ? void 0 : f.children) == null ? void 0 : b.length) > 0) {
963
- const D = f.children.map((w) => W(w));
964
- h.push(...D);
965
- }
966
- return h;
967
- }, te = (f, h, b, D) => f.map((w) => {
968
- var M, H;
969
- if (w.path === b) {
970
- const N = { ...w };
971
- return console.log(7771, N, D), D === "create" ? N.children.push(h) : D === "update" ? N.children = (M = N.children) == null ? void 0 : M.map((B) => (B == null ? void 0 : B.path) === (h == null ? void 0 : h.path) ? h : B) : D === "delete" && (N.children = (H = N.children) == null ? void 0 : H.filter((B) => (B == null ? void 0 : B.path) !== (h == null ? void 0 : h.path))), N;
972
- } else
973
- return {
974
- ...w,
975
- children: te(w.children, h, b, D)
976
- // 递归更新子节点
977
- };
978
- }), X = async (f) => {
979
- var b, D, w, M, H, N;
980
- const h = (b = k.value) == null ? void 0 : b.find((B) => {
981
- var Z;
982
- return ((Z = B == null ? void 0 : B.key) == null ? void 0 : Z.pageKey) === "menu";
983
- });
984
- if (h) {
985
- const B = {
986
- ...(D = h.value) == null ? void 0 : D.pageData,
987
- compData: (H = (M = (w = h.value) == null ? void 0 : w.pageData) == null ? void 0 : M.compData) == null ? void 0 : H.map(($) => $.key === "menuContents" ? {
988
- ...$,
989
- contents: f
990
- } : $)
991
- };
992
- await Ms(h == null ? void 0 : h.id, B);
993
- const Z = (N = _.value) == null ? void 0 : N.find(($) => ($ == null ? void 0 : $.path) === p.value);
994
- await ae(Z), O(!1), he.success("响应成功");
995
- }
996
- }, oe = async (f) => {
997
- var D, w, M, H, N;
998
- const h = await ne({
999
- id: f
1000
- });
1001
- let b;
1002
- return ((D = h == null ? void 0 : h.data) == null ? void 0 : D.code) === 200 && (b = (N = (H = (M = (w = h == null ? void 0 : h.data) == null ? void 0 : w.result) == null ? void 0 : M[0]) == null ? void 0 : H.value) == null ? void 0 : N.pageData, console.log(1829, h)), b;
1003
- }, V = async (f) => {
1004
- var N, B, Z;
1005
- const h = (Z = (B = (N = f == null ? void 0 : f.config) == null ? void 0 : N.find(($) => ($ == null ? void 0 : $.operateType) === "新增")) == null ? void 0 : B.structureIds) == null ? void 0 : Z.filter(($) => ($ == null ? void 0 : $.key) === "contentConfig"), b = h == null ? void 0 : h.map(($) => $ == null ? void 0 : $.id);
1006
- let D = [], w = [];
1007
- b == null || b.forEach(($) => {
1008
- $ && D.push(oe($));
1009
- });
1010
- const M = await Promise.all(D);
1011
- M == null || M.forEach(($) => {
1012
- $ && w.push(Ce({
1013
- key: {
1014
- pageKey: f == null ? void 0 : f.path,
1015
- systemKey: sessionStorage.getItem("systemKey"),
1016
- parentTable: "",
1017
- version: 1
1018
- },
1019
- value: {
1020
- pageData: $
1021
- }
1022
- }));
1023
- });
1024
- const H = await Promise.all(w);
1025
- console.log("handleStoreNewMenuStructure-0", M, H, f, b);
1026
- };
1027
- return be(() => u.value, async (f) => {
1028
- var h, b, D, w, M, H, N, B, Z;
1029
- if (f)
1030
- try {
1031
- const $ = (D = (b = (h = v.value) == null ? void 0 : h.data) == null ? void 0 : b.path) == null ? void 0 : D.split("/").slice(0, -1).join("/"), Ie = te(A.value, (w = v.value) == null ? void 0 : w.data, $, (M = v.value) == null ? void 0 : M.type), We = (H = Ie == null ? void 0 : Ie.filter((je) => je.path !== "系统管理" && je.path !== "平台管理")) == null ? void 0 : H.map((je) => W(je));
1032
- console.log(777, Ie, We, (N = v.value) == null ? void 0 : N.data), await V((B = v.value) == null ? void 0 : B.data), O(!0), await X(We);
1033
- const Ne = await q(y.value), wa = (Ne == null ? void 0 : Ne.length) === 0 ? (Z = y.value) == null ? void 0 : Z.childMenus : Ne;
1034
- s.setAsideMenus(wa);
1035
- } catch ($) {
1036
- throw he.error($), new Error($);
1037
- }
1038
- }, { immediate: !0 }), {
1039
- mode: S,
1040
- renderMenuList: _,
1041
- clickMenu: ae,
1042
- openMenu: F,
1043
- closeMenu: re,
1044
- changeMenuStyle: se
1045
- };
1046
- }
1047
- });
1048
- var Oe = { exports: {} }, js = Oe.exports, na;
1049
- function xs() {
1050
- return na || (na = 1, function(e, a) {
1051
- (function(s, r) {
1052
- r();
1053
- })(js, function() {
1054
- function s(t, o) {
1055
- return typeof o > "u" ? o = { autoBom: !1 } : typeof o != "object" && (console.warn("Deprecated: Expected third argument to be a object"), o = { autoBom: !o }), o.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob(["\uFEFF", t], { type: t.type }) : t;
1056
- }
1057
- function r(t, o, i) {
1058
- var v = new XMLHttpRequest();
1059
- v.open("GET", t), v.responseType = "blob", v.onload = function() {
1060
- u(v.response, o, i);
1061
- }, v.onerror = function() {
1062
- console.error("could not download file");
1063
- }, v.send();
1064
- }
1065
- function l(t) {
1066
- var o = new XMLHttpRequest();
1067
- o.open("HEAD", t, !1);
1068
- try {
1069
- o.send();
1070
- } catch {
1071
- }
1072
- return 200 <= o.status && 299 >= o.status;
1073
- }
1074
- function n(t) {
1075
- try {
1076
- t.dispatchEvent(new MouseEvent("click"));
1077
- } catch {
1078
- var o = document.createEvent("MouseEvents");
1079
- o.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(o);
1080
- }
1081
- }
1082
- var c = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof xe == "object" && xe.global === xe ? xe : void 0, p = c.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), u = c.saveAs || (typeof window != "object" || window !== c ? function() {
1083
- } : "download" in HTMLAnchorElement.prototype && !p ? function(t, o, i) {
1084
- var v = c.URL || c.webkitURL, y = document.createElement("a");
1085
- o = o || t.name || "download", y.download = o, y.rel = "noopener", typeof t == "string" ? (y.href = t, y.origin === location.origin ? n(y) : l(y.href) ? r(t, o, i) : n(y, y.target = "_blank")) : (y.href = v.createObjectURL(t), setTimeout(function() {
1086
- v.revokeObjectURL(y.href);
1087
- }, 4e4), setTimeout(function() {
1088
- n(y);
1089
- }, 0));
1090
- } : "msSaveOrOpenBlob" in navigator ? function(t, o, i) {
1091
- if (o = o || t.name || "download", typeof t != "string") navigator.msSaveOrOpenBlob(s(t, i), o);
1092
- else if (l(t)) r(t, o, i);
1093
- else {
1094
- var v = document.createElement("a");
1095
- v.href = t, v.target = "_blank", setTimeout(function() {
1096
- n(v);
1097
- });
1098
- }
1099
- } : function(t, o, i, v) {
1100
- if (v = v || open("", "_blank"), v && (v.document.title = v.document.body.innerText = "downloading..."), typeof t == "string") return r(t, o, i);
1101
- var y = t.type === "application/octet-stream", E = /constructor/i.test(c.HTMLElement) || c.safari, k = /CriOS\/[\d]+/.test(navigator.userAgent);
1102
- if ((k || y && E || p) && typeof FileReader < "u") {
1103
- var A = new FileReader();
1104
- A.onloadend = function() {
1105
- var O = A.result;
1106
- O = k ? O : O.replace(/^data:[^;]*;/, "data:attachment/file;"), v ? v.location.href = O : location = O, v = null;
1107
- }, A.readAsDataURL(t);
1108
- } else {
1109
- var K = c.URL || c.webkitURL, S = K.createObjectURL(t);
1110
- v ? v.location = S : location.href = S, v = null, setTimeout(function() {
1111
- K.revokeObjectURL(S);
1112
- }, 4e4);
1113
- }
1114
- });
1115
- c.saveAs = u.saveAs = u, e.exports = u;
1116
- });
1117
- }(Oe)), Oe.exports;
1118
- }
1119
- var Ls = xs();
1120
- const Ts = ga(), { loginUserInfo: oa, cryptoInfo: ge } = ke(Ts), Q = ka(Pe), {
1121
- itemData: Bs,
1122
- curStructureCompIds: ca,
1123
- isSubmitCurStructure: Os,
1124
- isRefreshCurStructure: _s,
1125
- freshContent: ia
1126
- } = ke(Q), ba = Ye(Pe), { activeMenuPath: ce, platform: ua, buttonTriggerType: ms } = ke(ba), ie = Ya(Pe), { selectTitle: de } = ke(ie);
1127
- ss(Pe);
1128
- const Us = (e, a) => {
1129
- const s = new Va();
1130
- e.forEach((r) => {
1131
- s.file(r.name, r.content);
1132
- }), s.generateAsync({ type: "blob" }).then((r) => {
1133
- Ls.saveAs(r, `${a}.zip`);
1134
- });
1135
- }, El = () => {
1136
- const e = [
1137
- { name: ua.value === "browser" ? "insoftest-SSIP.exe" : "insofrobot-TubeBending.exe", content: "欢迎使用" }
1138
- ], a = ua.value === "browser" ? "insoftest-SSIP" : "insofrobot-TubeBending";
1139
- Us(e, a);
1140
- }, wl = () => {
1141
- Q.setIsEdit("edit"), Q.setSubmitCurStructure(ce.value !== "/平台管理/菜单管理");
1142
- }, Ml = () => {
1143
- Q.setIsEdit("view"), Q.setRefreshCurStructure(!0);
1144
- }, Pl = async (e) => {
1145
- var a;
1146
- if ((e == null ? void 0 : e.key) === "main" || de.value.length === 1)
1147
- ee.value = await we(ce.value, sessionStorage.getItem("systemKey")), ie.setSelectIndex(""), ie.setSelectMenu(""), ie.setSelectTitle([]);
1148
- else {
1149
- const s = [], r = (e == null ? void 0 : e.key) === "" || !(e != null && e.key) ? "" : parseInt(e == null ? void 0 : e.key);
1150
- ee.value = await we(ce.value, sessionStorage.getItem("systemKey"), r);
1151
- let l = -1;
1152
- (a = de.value) == null || a.forEach((n, c) => {
1153
- (n == null ? void 0 : n.key) === (e == null ? void 0 : e.key) && (l = c), (l === -1 || l >= c) && s.push(n);
1154
- }), ie.setSelectTitle(s), r !== "" ? ie.setSelectMenu(e == null ? void 0 : e.key) : (ie.setSelectIndex(""), ie.setSelectMenu(""));
1155
- }
1156
- Q.setItemData(ee.value), Q.setOriginalData(ee.value);
1157
- }, $e = async (e, a, s, r = "contentConfig") => {
1158
- var l, n, c;
1159
- try {
1160
- let p, u;
1161
- a === "create" ? (p = {
1162
- key: {
1163
- systemKey: sessionStorage.getItem("systemKey"),
1164
- pageKey: s,
1165
- type: "structure",
1166
- structureBelong: r,
1167
- parentTable: "",
1168
- version: 1
1169
- },
1170
- value: {
1171
- pageData: {
1172
- ...e,
1173
- compData: (l = e == null ? void 0 : e.compData) == null ? void 0 : l.filter((o) => (o == null ? void 0 : o.key) !== "tableContents")
1174
- }
1175
- }
1176
- }, u = Ce) : a === "update" ? (p = {
1177
- id: e == null ? void 0 : e.id,
1178
- key: {
1179
- systemKey: sessionStorage.getItem("systemKey"),
1180
- pageKey: s,
1181
- type: "structure",
1182
- structureBelong: r,
1183
- parentTable: "",
1184
- version: 1
1185
- },
1186
- value: {
1187
- pageData: {
1188
- ...e,
1189
- compData: (n = e == null ? void 0 : e.compData) == null ? void 0 : n.filter((o) => (o == null ? void 0 : o.key) !== "tableContents")
1190
- }
1191
- }
1192
- }, u = Ee) : a === "delete" && (p = {
1193
- id: e,
1194
- key: {
1195
- systemKey: sessionStorage.getItem("systemKey"),
1196
- pageKey: s,
1197
- type: "structure",
1198
- structureBelong: r,
1199
- parentTable: "",
1200
- version: 1
1201
- }
1202
- }, u = ha);
1203
- const t = await u(p);
1204
- if (((c = t == null ? void 0 : t.data) == null ? void 0 : c.code) === 200)
1205
- return t.data.result;
1206
- throw he.error("保存响应失败"), new Error("保存响应失败");
1207
- } catch {
1208
- he.error("保存响应失败");
1209
- }
1210
- }, Il = async (e) => {
1211
- var t;
1212
- const a = JSON.parse(d(JSON.stringify(Bs.value)));
1213
- if (!Os.value)
1214
- return ba.setCacheStructures({
1215
- key: ms.value,
1216
- data: a
1217
- }), he.success("已暂存");
1218
- const s = a == null ? void 0 : a.map((o) => o.id), r = s.filter((o) => {
1219
- var i;
1220
- return !((i = ca.value) != null && i.includes(o));
1221
- }), l = (t = ca.value) == null ? void 0 : t.filter((o) => !s.includes(o)), n = [...r, ...l], c = a == null ? void 0 : a.filter((o) => !o.id), p = a == null ? void 0 : a.filter((o) => o.id);
1222
- let u = [];
1223
- n && (n == null ? void 0 : n.length) > 0 && (n == null || n.forEach((o) => {
1224
- o && u.push($e(o, "delete", e));
1225
- })), c && (c == null ? void 0 : c.length) > 0 && (c == null || c.forEach((o) => {
1226
- o && u.push($e(o, "create", e));
1227
- })), p && (p == null ? void 0 : p.length) > 0 && (p == null || p.forEach((o) => {
1228
- s != null && s.includes(o.id) && (console.log("clickSavePage5", "包含"), o && u.push($e(o, "update", e)));
1229
- })), Promise.all(u).then(() => {
1230
- he.success("保存成功"), Q.setRefreshCurStructure(!0);
1231
- }).catch((o) => {
1232
- he.success(o);
1233
- });
1234
- }, Nl = (e) => cs(e), ee = ue([]), jl = async (e, a = "data") => {
1235
- var r, l, n, c, p, u;
1236
- if ((e == null ? void 0 : e.type) === "delete")
1237
- await Xa((r = e == null ? void 0 : e.singleContent) == null ? void 0 : r.id);
1238
- else if ((e == null ? void 0 : e.buttonName) === "新增") {
1239
- let t = {};
1240
- for (let o in e == null ? void 0 : e.singleContent)
1241
- o !== "id" && o !== "index" && (t[o] = e == null ? void 0 : e.singleContent[o]);
1242
- await Za(
1243
- a,
1244
- ce.value,
1245
- e == null ? void 0 : e.index,
1246
- sessionStorage.getItem("systemKey"),
1247
- Object.values(t),
1248
- e == null ? void 0 : e.column,
1249
- e
1250
- );
1251
- } else if ((e == null ? void 0 : e.buttonName) === "编辑") {
1252
- let t = {}, o = (l = e == null ? void 0 : e.singleContent) == null ? void 0 : l.id;
1253
- for (let i in e == null ? void 0 : e.singleContent)
1254
- i !== "id" && i !== "index" && (t[i] = e == null ? void 0 : e.singleContent[i]);
1255
- await Qa(
1256
- a,
1257
- ce.value,
1258
- e == null ? void 0 : e.index,
1259
- o,
1260
- sessionStorage.getItem("systemKey"),
1261
- Object.values(t),
1262
- e == null ? void 0 : e.column
1263
- );
1264
- }
1265
- let s = (c = (n = de.value) == null ? void 0 : n[de.value.length - 1]) != null && c.key ? parseInt((u = (p = de.value) == null ? void 0 : p[de.value.length - 1]) == null ? void 0 : u.key) : "";
1266
- ee.value = await we(ce.value, sessionStorage.getItem("systemKey"), s), Q.setItemData(ee.value), Q.setOriginalData(ee.value);
1267
- }, Cs = async (e) => {
1268
- var s, r, l, n, c;
1269
- const a = await ne({
1270
- id: e
1271
- });
1272
- return (c = (n = (l = (r = (s = a == null ? void 0 : a.data) == null ? void 0 : s.result) == null ? void 0 : r[0]) == null ? void 0 : l.value) == null ? void 0 : n.pageData) == null ? void 0 : c.name;
1273
- }, xl = async (e) => {
1274
- var r, l;
1275
- const a = await Cs(e == null ? void 0 : e.index);
1276
- await Wa(e == null ? void 0 : e.index, {
1277
- comp: "Form",
1278
- compData: (r = d(e == null ? void 0 : e.contents)) == null ? void 0 : r.filter((n) => n.contents),
1279
- name: a
1280
- });
1281
- const s = (l = d(ee.value)) == null ? void 0 : l.map((n) => ((n == null ? void 0 : n.id) === (e == null ? void 0 : e.index) && (n.compData = e == null ? void 0 : e.contents), n));
1282
- Q.setItemData(s), Q.setOriginalData(s);
1283
- }, Ll = (e) => {
1284
- ee.value = e, Q.setItemData(ee.value), Q.setOriginalData(ee.value);
1285
- }, fa = (e) => {
1286
- var a, s, r;
1287
- return ((s = (a = oa.value) == null ? void 0 : a.layer) == null ? void 0 : s.toUpperCase()) === "SUPERADMIN" ? !0 : ((r = oa.value) == null ? void 0 : r.account) === (e == null ? void 0 : e.account);
1288
- }, pa = async (e, a, s) => {
1289
- const r = Ve("/系统管理/角色管理"), l = Ve("/系统管理/部门管理");
1290
- return await Promise.all([r, l]).then((c) => {
1291
- var t, o;
1292
- const p = (t = c == null ? void 0 : c[0]) == null ? void 0 : t.map((i) => ({
1293
- label: i == null ? void 0 : i.roleName,
1294
- value: i == null ? void 0 : i.roleName
1295
- })), u = (o = c == null ? void 0 : c[1]) == null ? void 0 : o.map((i) => ({
1296
- label: i == null ? void 0 : i.deptName,
1297
- value: i == null ? void 0 : i.deptName
1298
- }));
1299
- return s ? e == null ? void 0 : e.map((i) => {
1300
- var v;
1301
- return {
1302
- ...i,
1303
- compData: (v = i == null ? void 0 : i.compData) == null ? void 0 : v.map((y) => {
1304
- var E, k;
1305
- return (y == null ? void 0 : y.key) === "header" ? {
1306
- ...y,
1307
- contents: (E = y == null ? void 0 : y.contents) == null ? void 0 : E.map((A) => A.prop === "userDept" ? {
1308
- ...A,
1309
- options: u
1310
- } : A.prop === "userRoles" ? {
1311
- ...A,
1312
- options: p
1313
- } : A)
1314
- } : (y == null ? void 0 : y.key) === "tableContents" ? {
1315
- ...y,
1316
- contents: (k = y == null ? void 0 : y.contents) == null ? void 0 : k.map((A) => {
1317
- var K;
1318
- return {
1319
- ...A,
1320
- password: fa(A) ? Qe(A == null ? void 0 : A.password, (K = ge == null ? void 0 : ge.value) == null ? void 0 : K.privateKey) : A == null ? void 0 : A.password
1321
- };
1322
- })
1323
- } : y;
1324
- })
1325
- };
1326
- }) : e == null ? void 0 : e.map((i) => {
1327
- var v;
1328
- return {
1329
- ...i,
1330
- compData: (v = i == null ? void 0 : i.compData) == null ? void 0 : v.map((y) => {
1331
- var E, k, A;
1332
- return (y == null ? void 0 : y.key) === "rowButton" || (y == null ? void 0 : y.key) === "extraButton" ? {
1333
- ...y,
1334
- contents: (E = y == null ? void 0 : y.contents) == null ? void 0 : E.filter((K) => a == null ? void 0 : a.includes(K == null ? void 0 : K.label))
1335
- } : (y == null ? void 0 : y.key) === "header" ? {
1336
- ...y,
1337
- contents: (k = y == null ? void 0 : y.contents) == null ? void 0 : k.map((K) => K.prop === "userDept" ? {
1338
- ...K,
1339
- options: u
1340
- } : K.prop === "userRoles" ? {
1341
- ...K,
1342
- options: p
1343
- } : K)
1344
- } : (y == null ? void 0 : y.key) === "tableContents" ? {
1345
- ...y,
1346
- contents: (A = y == null ? void 0 : y.contents) == null ? void 0 : A.map((K) => {
1347
- var S;
1348
- return {
1349
- ...K,
1350
- password: fa(K) ? Qe(K == null ? void 0 : K.password, (S = ge == null ? void 0 : ge.value) == null ? void 0 : S.privateKey) : K == null ? void 0 : K.password
1351
- };
1352
- })
1353
- } : y;
1354
- })
1355
- };
1356
- });
1357
- });
1358
- }, Rs = async (e, a) => {
1359
- const s = sessionStorage.getItem("authority"), r = JSON.parse(s || "");
1360
- if (console.log("点击菜单获取页面结构:", e, a, r), Array.isArray(r)) {
1361
- const l = Array.isArray(r) && (r == null ? void 0 : r.filter((p) => p == null ? void 0 : p.includes(e))), n = l == null ? void 0 : l.map((p) => {
1362
- var u;
1363
- return ((u = p == null ? void 0 : p.split("/")) == null ? void 0 : u.pop()) || "";
1364
- });
1365
- return e === "/系统管理/用户管理" ? await pa(a, n, !1) : a == null ? void 0 : a.map((p) => {
1366
- var u;
1367
- return {
1368
- ...p,
1369
- compData: (u = p == null ? void 0 : p.compData) == null ? void 0 : u.map((t) => {
1370
- var o;
1371
- return (t == null ? void 0 : t.key) === "rowButton" || (t == null ? void 0 : t.key) === "extraButton" ? {
1372
- ...t,
1373
- contents: (o = t == null ? void 0 : t.contents) == null ? void 0 : o.filter((i) => n == null ? void 0 : n.includes(i == null ? void 0 : i.label))
1374
- } : t;
1375
- })
1376
- };
1377
- });
1378
- } else return typeof r == "string" && (r == null ? void 0 : r.toUpperCase()) === "SUPERADMIN" ? e === "/系统管理/用户管理" ? await pa(a, null, !0) : a : [];
1379
- };
1380
- be(
1381
- () => [ce.value, _s.value],
1382
- async (e) => {
1383
- var r, l;
1384
- const a = e == null ? void 0 : e[0], s = e == null ? void 0 : e[1];
1385
- if (a || s) {
1386
- await is(), sessionStorage.setItem("pageKey", ce.value);
1387
- const n = await we(a, sessionStorage.getItem("systemKey"), "", ce.value);
1388
- Q.setExtraContents([]), ee.value = await Rs(a, n), ie.setSelectTitle([]), ie.setSelectIndex(""), ie.setSelectMenu(""), Q.setItemData(ee.value), Q.setOriginalData(ee.value), Q.setCurStructureCompIds((r = ee.value) == null ? void 0 : r.map((c) => c == null ? void 0 : c.id)), Q.setRefreshCurStructure(!1), de.value = (l = ce.value) == null ? void 0 : l.split("/").filter((c) => c !== "").map((c) => ({ value: c.trim() }));
1389
- }
1390
- },
1391
- {
1392
- immediate: !0
1393
- }
1394
- );
1395
- be(
1396
- () => ia.value,
1397
- async () => {
1398
- ia.value && (ee.value = await we(ce.value, sessionStorage.getItem("systemKey"), "", ce.value), Q.setFreshContent(!1));
1399
- },
1400
- { deep: !0 }
1401
- );
1402
- const $s = (e) => {
1403
- var l, n, c;
1404
- const a = (l = e.map((p) => {
1405
- var t, o;
1406
- let u = (o = (t = p.key.split("(")) == null ? void 0 : t[1]) == null ? void 0 : o.trim();
1407
- return u == null ? void 0 : u.slice(0, u.length - 1);
1408
- })) == null ? void 0 : l.filter((p) => p), s = [];
1409
- a == null || a.forEach((p) => {
1410
- var t, o;
1411
- const u = [];
1412
- if ((t = us(p)) == null || t.forEach((i) => {
1413
- var v, y, E, k, A, K, S, O, P, R, J, z, C, x;
1414
- if (i.includes("{") && i.includes("[")) {
1415
- let j = d(i).split(":");
1416
- i = (K = (y = (v = d(j)) == null ? void 0 : v[0]) == null ? void 0 : y.split("{")) == null ? void 0 : K[((A = (k = (E = d(j)) == null ? void 0 : E[0]) == null ? void 0 : k.split("{")) == null ? void 0 : A.length) - 1].replaceAll("'", ""), u.push(i);
1417
- let g = (P = (O = (S = j == null ? void 0 : j[(j == null ? void 0 : j.length) - 1]) == null ? void 0 : S.split("}")) == null ? void 0 : O[0]) == null ? void 0 : P.replaceAll("'", '"'), L = [];
1418
- (J = (R = g.slice(1, g.length - 1)) == null ? void 0 : R.split(",")) == null || J.forEach((_) => {
1419
- L.push(_);
1420
- }), u.push(L);
1421
- } else if (i.includes("{")) {
1422
- let j = (z = i.split(":")) == null ? void 0 : z[0];
1423
- i = (x = j == null ? void 0 : j.split("{")) == null ? void 0 : x[((C = j == null ? void 0 : j.split("{")) == null ? void 0 : C.length) - 1].replaceAll("'", ""), u.push(i);
1424
- } else
1425
- u.push(i);
1426
- }), !u.some((i) => Array.isArray(i)))
1427
- s.push(u);
1428
- else {
1429
- let i = [];
1430
- u == null || u.forEach((v, y) => {
1431
- y !== u.length - 1 && i.push(v);
1432
- }), (o = u == null ? void 0 : u[(u == null ? void 0 : u.length) - 1]) == null || o.forEach((v) => {
1433
- let y = d(i);
1434
- y.push(v), s.push(y);
1435
- });
1436
- }
1437
- });
1438
- const r = (c = (n = s.filter((p) => p.length !== 0)) == null ? void 0 : n.filter((p) => p.length !== 0)) == null ? void 0 : c.map((p) => {
1439
- let u = "";
1440
- return p.forEach((t) => {
1441
- t.includes("{") || (u = u === "" ? u + d(t) : u + "/" + d(t));
1442
- }), u;
1443
- });
1444
- return fs([...new Set(r)]);
1445
- }, Js = (e) => ({
1446
- comp: "Menu",
1447
- compData: [{
1448
- contents: $s(d(e)),
1449
- key: "menuContents"
1450
- }],
1451
- name: ""
1452
- }), Gs = (e) => ({
1453
- comp: "MenuTop",
1454
- compData: [
1455
- {
1456
- key: "menuContents",
1457
- contents: JSON.parse(e == null ? void 0 : e.value.trim().replaceAll("'", '"'))
1458
- }
1459
- ],
1460
- name: ""
1461
- }), Hs = (e) => {
1462
- const a = e == null ? void 0 : e.filter((r) => {
1463
- var l;
1464
- return !((l = r == null ? void 0 : r.key) != null && l.includes("("));
1465
- }), s = a == null ? void 0 : a.find((r) => {
1466
- var l;
1467
- return pe(r.value.replaceAll("'", '"')) && ((l = JSON.parse(r.value.replaceAll("'", '"'))) == null ? void 0 : l.every((n) => typeof n == "string"));
1468
- });
1469
- if (s)
1470
- return Gs(s);
1471
- }, zs = (e) => {
1472
- var l;
1473
- let a = [];
1474
- const s = e == null ? void 0 : e.filter((n) => {
1475
- var c;
1476
- return !((c = n == null ? void 0 : n.key) != null && c.includes("("));
1477
- }), r = s == null ? void 0 : s.find((n) => {
1478
- var c;
1479
- return pe(n.value.replaceAll("'", '"')) && !((c = JSON.parse(n.value.replaceAll("'", '"'))) != null && c.every((p) => typeof p == "string"));
1480
- });
1481
- if (r)
1482
- return (l = JSON.parse(r.value.replaceAll("'", '"'))) == null || l.forEach((n) => {
1483
- var c, p, u, t;
1484
- ((c = Object.keys(n)) == null ? void 0 : c[0]) === "类型" ? a.push({
1485
- comp: "System",
1486
- compData: [
1487
- {
1488
- key: "type",
1489
- contents: [(p = Object.values(n)) == null ? void 0 : p[0]]
1490
- }
1491
- ]
1492
- }) : ((u = Object.keys(n)) == null ? void 0 : u[0]) === "名称" && a.push({
1493
- comp: "System",
1494
- compData: [
1495
- {
1496
- key: "name",
1497
- contents: [(t = Object.values(n)) == null ? void 0 : t[0]]
1498
- }
1499
- ]
1500
- });
1501
- }), a;
1502
- }, Ka = (e) => {
1503
- const a = [];
1504
- let s = !1;
1505
- return e.forEach((r) => {
1506
- Array.isArray(r) && (s = !0, r.forEach((l) => {
1507
- const n = e.map((c) => c === r ? l : c);
1508
- a.push(...Ka(n));
1509
- }));
1510
- }), s ? a : [e];
1511
- }, qs = (e) => {
1512
- var c, p;
1513
- if (!e) return;
1514
- let a = [];
1515
- const s = ps(e), r = d(s).replaceAll("{", "").replaceAll("}", "").trim();
1516
- let l = [];
1517
- return r.split(":").forEach((u) => {
1518
- var t;
1519
- if (u.includes("[")) {
1520
- const o = (t = u.slice(1, u.length - 1)) == null ? void 0 : t.split(",");
1521
- l.push(o);
1522
- } else
1523
- l.push(u);
1524
- }), (c = Ka(l)) == null || c.forEach((u) => {
1525
- a.push(u);
1526
- }), (p = a == null ? void 0 : a.filter((u) => u.length !== 0)) == null ? void 0 : p.map((u) => {
1527
- let t = "";
1528
- return u.forEach((o) => {
1529
- o.includes("{") || (t = t === "" ? t + d(o).trim() : t + "/" + d(o).trim());
1530
- }), t;
1531
- });
1532
- }, Je = (e) => {
1533
- var p, u, t, o, i, v, y, E, k, A, K, S, O, P, R, J, z, C, x, j, g, L, _, m;
1534
- const a = qe(e) ? (p = Me(d(e))) == null ? void 0 : p[0] : "[]", s = qe(e) ? "[" + ((u = Me(d(e))) == null ? void 0 : u[2]) + "]" : "[" + e + "]";
1535
- let r = [], l = [], n = "";
1536
- const c = (o = (t = s == null ? void 0 : s.trim()) == null ? void 0 : t.slice(1, (s == null ? void 0 : s.trim().length) - 1)) == null ? void 0 : o.replaceAll("'", '"');
1537
- if (pe(c) ? r = JSON.parse(c) : pe((y = (v = (i = c == null ? void 0 : c.split("}")) == null ? void 0 : i[0]) == null ? void 0 : v.replace(":", "")) == null ? void 0 : y.replaceAll("\\", "\\\\")) && (r = JSON.parse((A = (k = (E = c == null ? void 0 : c.split("}")) == null ? void 0 : E[0]) == null ? void 0 : k.replace(":", "")) == null ? void 0 : A.replaceAll("\\", "\\\\"))), r = r != null && r.every((G) => Array.isArray(G) && G.every((I) => Array.isArray(I))) ? r == null ? void 0 : r[0] : r, !(a != null && a.includes("(")))
1538
- !a.includes("{") && pe(a == null ? void 0 : a.replaceAll("'", '"')) ? l = JSON.parse(a == null ? void 0 : a.replaceAll("'", '"')) : pe((S = (K = a == null ? void 0 : a.split("{")) == null ? void 0 : K[1]) == null ? void 0 : S.replaceAll("'", '"')) && (l = JSON.parse((P = (O = a == null ? void 0 : a.split("{")) == null ? void 0 : O[1]) == null ? void 0 : P.replaceAll("'", '"')));
1539
- else {
1540
- let G = [];
1541
- if (((J = (R = a == null ? void 0 : a.slice(1, (a == null ? void 0 : a.length) - 1)) == null ? void 0 : R.split(",")) == null ? void 0 : J.length) > 1)
1542
- (C = (z = a == null ? void 0 : a.slice(1, (a == null ? void 0 : a.length) - 1)) == null ? void 0 : z.split(",")) == null || C.forEach((I) => {
1543
- var Y, q, ae, F, re, se, fe, U, T, W, te, X, oe, V, f, h, b, D;
1544
- if (!(I != null && I.includes("(")))
1545
- G.push(I == null ? void 0 : I.replaceAll("'", ""));
1546
- else if (I != null && I.includes("[")) {
1547
- let w = (V = (oe = (X = (te = I == null ? void 0 : I.split("[")) == null ? void 0 : te[((W = I == null ? void 0 : I.split("[")) == null ? void 0 : W.length) - 1]) == null ? void 0 : X.split("]")) == null ? void 0 : oe[0]) == null ? void 0 : V.replaceAll("'", "");
1548
- w = w + "[" + ((D = (b = (h = I == null ? void 0 : I.split("(")) == null ? void 0 : h[((f = I == null ? void 0 : I.split("(")) == null ? void 0 : f.length) - 1]) == null ? void 0 : b.split(")")) == null ? void 0 : D[0].replaceAll(":", "/").replaceAll("'", "")) + "]()", G.push(w);
1549
- } else {
1550
- let w = (re = (F = (ae = (q = I == null ? void 0 : I.split(":")) == null ? void 0 : q[((Y = I == null ? void 0 : I.split(":")) == null ? void 0 : Y.length) - 1]) == null ? void 0 : ae.split(")")) == null ? void 0 : F[0]) == null ? void 0 : re.replaceAll("'", "");
1551
- w = w + "[" + ((T = (U = (fe = I == null ? void 0 : I.split("(")) == null ? void 0 : fe[((se = I == null ? void 0 : I.split("(")) == null ? void 0 : se.length) - 1]) == null ? void 0 : U.split(")")) == null ? void 0 : T[0].replaceAll(":", "/").replaceAll("'", "")) + "]", G.push(w);
1552
- }
1553
- }), l = G;
1554
- else {
1555
- const I = ((L = (g = (j = (x = a == null ? void 0 : a.slice(1, a == null ? void 0 : a.length)) == null ? void 0 : x.split("(")) == null ? void 0 : j[1]) == null ? void 0 : g.split(")")) == null ? void 0 : L[0]).replaceAll("{", "").replaceAll("}", "").replaceAll(":", "/").replaceAll("'", "");
1556
- n = n + I + "[" + ((m = (_ = a == null ? void 0 : a.slice(1, (a == null ? void 0 : a.length) - 1)) == null ? void 0 : _.split("[")) == null ? void 0 : m[1]);
1557
- }
1558
- }
1559
- return {
1560
- tableColumns: l,
1561
- tableContents: r != null && r.every((G) => Array.isArray(G)) ? r : [r],
1562
- tablePath: n
1563
- };
1564
- };
1565
- let le = "$R";
1566
- const Ys = (e) => /^'[^']+':\{.*\}$/.exec(d(e)), Ws = (e) => /^'([^']+)':.*$/.exec(d(e)), Me = (e) => {
1567
- let a = e;
1568
- const s = [];
1569
- let r = "";
1570
- for (const l of a)
1571
- l.includes("{") || r.includes("{") || l.includes("[") || r.includes("[") || l.includes("【") || r.includes("【") || l.includes("(") || r.includes("(") || l.includes("(") || r.includes("(") || l.includes("/*") || r.includes("/*") ? (r += l.trim(), d(r).split("{").length - 1 === d(r).split("}").length - 1 && d(r).split("【").length - 1 === d(r).split("】").length - 1 && d(r).split("[").length - 1 === d(r).split("]").length - 1 && d(r).split("(").length - 1 === d(r).split(")").length - 1 && d(r).split("(").length - 1 === d(r).split(")").length - 1 && d(r).split("/*").length - 1 === d(r).split("*/").length - 1 && r[r.length - 1] !== "," && (s.push(r.replace(/\/\*[\s\S]*?\*\//g, "")), r = "")) : s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1572
- return s;
1573
- }, qe = (e) => /^\[.*?\]:\[.*?\]$/.exec(d(e)), Xs = (e) => {
1574
- var a, s, r, l, n, c, p, u, t, o, i, v, y, E, k, A, K;
1575
- if (Ws(e)) {
1576
- let S = {}, O = (r = (s = (a = e == null ? void 0 : e.replace(":", le)) == null ? void 0 : a.split(le)) == null ? void 0 : s[0]) == null ? void 0 : r.replaceAll("'", ""), P = "";
1577
- return P = P + ((p = (c = (n = (l = e == null ? void 0 : e.split("{")) == null ? void 0 : l[1]) == null ? void 0 : n.split("}")) == null ? void 0 : c[0]) == null ? void 0 : p.replace(":", "/").replaceAll("'", "")) + "[", P = P + ((o = (t = (u = e == null ? void 0 : e.split("[")) == null ? void 0 : u[1]) == null ? void 0 : t.split("]")) == null ? void 0 : o[0]) + "]", S[O] = P, {
1578
- groupName: "",
1579
- formContents: [[S]]
1580
- };
1581
- } else {
1582
- let S = {}, O = "", P = (y = (v = (i = e == null ? void 0 : e.split("]")) == null ? void 0 : i[0]) == null ? void 0 : v.split("[")) == null ? void 0 : y[1];
1583
- (E = P == null ? void 0 : P.split(":")) == null || E.forEach((J, z) => {
1584
- var C;
1585
- ((C = P == null ? void 0 : P.split(":")) == null ? void 0 : C.length) - 1 === z && (O = J == null ? void 0 : J.replaceAll("'", ""));
1586
- });
1587
- let R = "";
1588
- return R = (K = (A = (k = e == null ? void 0 : e.split("]")) == null ? void 0 : k[1]) == null ? void 0 : A.replace(":", le).split(le)) == null ? void 0 : K[1].replaceAll("'", ""), S[O] = R, {
1589
- groupName: "",
1590
- formContents: [[S]]
1591
- };
1592
- }
1593
- }, Zs = (e) => (e == null ? void 0 : e[0]) === "[" && (e == null ? void 0 : e[e.length - 1]) === "]" && !(e != null && e.includes("{")), Ea = (e) => {
1594
- var r, l, n, c, p, u, t, o, i, v, y, E, k, A, K, S, O, P, R, J, z, C, x, j, g, L, _, m, G, I, Y, q, ae, F, re, se, fe;
1595
- let a = "";
1596
- e = e.replace(/:([^=]*)==/g, ":");
1597
- let s = e;
1598
- if (Ys(d(e)) !== null && (a = (l = (r = d(e).replace(":", le).split(le)) == null ? void 0 : r[0]) == null ? void 0 : l.replaceAll("'", ""), s = (n = d(e).replace(":", le).split(le)) == null ? void 0 : n[1]), qe(d(s).slice(1, ((c = d(s)) == null ? void 0 : c.length) - 1)) || Zs(d(s).slice(1, ((p = d(s)) == null ? void 0 : p.length) - 1)))
1599
- if (((t = d(s).slice(1, ((u = d(s)) == null ? void 0 : u.length) - 1)) == null ? void 0 : t[1]) !== "[") {
1600
- const U = Je(d(s).slice(1, ((o = d(s)) == null ? void 0 : o.length) - 1));
1601
- return {
1602
- groupName: a,
1603
- tableColumn: U == null ? void 0 : U.tableColumns,
1604
- tableContents: U == null ? void 0 : U.tableContents,
1605
- tableColumnPath: U == null ? void 0 : U.tablePath
1606
- };
1607
- } else if (d(s).slice(1, ((i = d(s)) == null ? void 0 : i.length) - 1).includes("{")) {
1608
- let U = d(s).slice(1, ((v = d(s)) == null ? void 0 : v.length) - 1), T = U.indexOf("{"), W = U.slice(T, (U == null ? void 0 : U.length) - T);
1609
- return (E = (y = Me(W)) == null ? void 0 : y.filter((X) => X == null ? void 0 : X.includes("{"))) == null ? void 0 : E.map((X, oe) => {
1610
- var f;
1611
- let V = Je(d(X).slice(1, ((f = d(X)) == null ? void 0 : f.length) - 1));
1612
- return {
1613
- groupName: oe === 0 ? a : "",
1614
- tableColumn: V == null ? void 0 : V.tableColumns,
1615
- tableContents: V == null ? void 0 : V.tableContents,
1616
- tableColumnPath: V == null ? void 0 : V.tablePath
1617
- };
1618
- });
1619
- } else {
1620
- const U = Je(d(s).slice(1, ((k = d(s)) == null ? void 0 : k.length) - 1));
1621
- return {
1622
- groupName: a,
1623
- tableColumn: U == null ? void 0 : U.tableColumns,
1624
- tableContents: U == null ? void 0 : U.tableContents,
1625
- tableColumnPath: U == null ? void 0 : U.tablePath
1626
- };
1627
- }
1628
- else {
1629
- let U = [];
1630
- if (pe((A = s.slice(1, (s == null ? void 0 : s.length) - 1)) == null ? void 0 : A.replaceAll("'", '"')))
1631
- U = JSON.parse((K = s.slice(1, (s == null ? void 0 : s.length) - 1)) == null ? void 0 : K.replaceAll("'", '"'));
1632
- else if (s.includes("(")) {
1633
- if ((s == null ? void 0 : s[0]) !== "{") {
1634
- let T = (_ = (L = (g = s == null ? void 0 : s.split("]")) == null ? void 0 : g[0]) == null ? void 0 : L.split("[")) == null ? void 0 : _[1], W = "", X = ((q = (Y = (I = (G = (m = s == null ? void 0 : s.split(")")) == null ? void 0 : m[0]) == null ? void 0 : G.split("(")) == null ? void 0 : I[1]) == null ? void 0 : Y.replaceAll("[", "")) == null ? void 0 : q.replaceAll("]", "")).replaceAll("'", "").replaceAll(":", "/");
1635
- return (ae = X == null ? void 0 : X.split("/")) == null || ae.forEach((oe, V) => {
1636
- var f;
1637
- V !== ((f = X == null ? void 0 : X.split("/")) == null ? void 0 : f.length) - 1 && (W = W === "" ? W + oe : W + "/" + oe);
1638
- }), {
1639
- groupName: "",
1640
- extraButton: (re = T == null ? void 0 : T.split(":")) == null ? void 0 : re[((F = T == null ? void 0 : T.split(":")) == null ? void 0 : F.length) - 1].replaceAll("'", ""),
1641
- extraPath: W
1642
- };
1643
- } else if (s = s.slice(1, (s == null ? void 0 : s.length) - 1), (s == null ? void 0 : s[0]) !== "[") {
1644
- let T = Xs(s);
1645
- return {
1646
- groupName: T == null ? void 0 : T.groupName,
1647
- formContents: T == null ? void 0 : T.formContents
1648
- };
1649
- } else if ((s == null ? void 0 : s[0]) === "[" && (s == null ? void 0 : s[1]) === "[") {
1650
- s = s.slice(1, (s == null ? void 0 : s.length) - 1);
1651
- let T = [];
1652
- return (fe = (se = Me(s)) == null ? void 0 : se.filter((W) => W !== ",")) == null || fe.forEach((W) => {
1653
- var te;
1654
- Array.isArray(Ue(W)) || T.push((te = Ue(W)) == null ? void 0 : te.formContents);
1655
- }), {
1656
- groupName: a,
1657
- formContents: T
1658
- };
1659
- }
1660
- } else if (s = "[[" + s + "]]", pe((S = s.slice(1, (s == null ? void 0 : s.length) - 1)) == null ? void 0 : S.replaceAll("'", '"')))
1661
- U = JSON.parse((O = s.slice(1, (s == null ? void 0 : s.length) - 1)) == null ? void 0 : O.replaceAll("'", '"'));
1662
- else if (s = s.slice(2, s.length - 2), ((J = (R = (P = s == null ? void 0 : s.replace(":", le)) == null ? void 0 : P.split(le)) == null ? void 0 : R[1]) == null ? void 0 : J[0]) !== "{") {
1663
- s = ((C = (z = s == null ? void 0 : s.replace(":", le)) == null ? void 0 : z.split(le)) == null ? void 0 : C[0]) + ":{[" + ((j = (x = s == null ? void 0 : s.replace(":", le)) == null ? void 0 : x.split(le)) == null ? void 0 : j[1]) + "]}";
1664
- const T = Ea(s);
1665
- return T != null && T.tableColumn ? {
1666
- groupName: T == null ? void 0 : T.groupName,
1667
- tableColumn: T == null ? void 0 : T.tableColumn,
1668
- tableContents: T == null ? void 0 : T.tableContents
1669
- } : {
1670
- groupName: T == null ? void 0 : T.groupName,
1671
- formContents: T == null ? void 0 : T.formContents
1672
- };
1673
- }
1674
- return {
1675
- groupName: a,
1676
- formContents: U
1677
- };
1678
- }
1679
- }, Ue = (e) => Ea(d(e).slice(1, d(e).length - 1)), Qs = (e) => {
1680
- var s;
1681
- let a = [];
1682
- if (!((e == null ? void 0 : e[0]) === "[" && (e == null ? void 0 : e[1]) === "[")) {
1683
- let r = (s = Me(e)) == null ? void 0 : s.filter((l) => l !== ",");
1684
- r == null || r.forEach((l) => {
1685
- a.push(Ue(l));
1686
- });
1687
- }
1688
- return a;
1689
- };
1690
- ue(0);
1691
- const Vs = (e) => {
1692
- const a = [];
1693
- let s = [];
1694
- return e == null || e.forEach((r, l) => {
1695
- var n;
1696
- (s == null ? void 0 : s.length) === 0 ? s.push(r) : (s.push(r), ((n = e[l + 1]) == null ? void 0 : n.key) === "groupName" && (a.push(s), s = []));
1697
- }), a.push(s), a;
1698
- }, Ge = ue(0), Fs = (e, a) => {
1699
- var l;
1700
- let s = [], r = a == null ? void 0 : a.length;
1701
- return (l = d(a)) == null || l.forEach((n, c) => {
1702
- let p = [];
1703
- n == null || n.forEach((u) => {
1704
- var t, o, i, v, y, E;
1705
- if (p.push(d(u)), pe(d(e).replaceAll("'", '"')) && ((t = JSON.parse(d(e).replaceAll("'", '"'))) != null && t.every((k) => typeof k == "string")))
1706
- (o = JSON.parse(d(e).replaceAll("'", '"'))) == null || o.forEach((k) => {
1707
- var A, K;
1708
- s.push([{
1709
- key: (A = d(u)) == null ? void 0 : A.key,
1710
- value: ((K = d(u)) == null ? void 0 : K.value) + "/" + k
1711
- }]);
1712
- });
1713
- else {
1714
- let k = [];
1715
- if (((i = d(e)) == null ? void 0 : i[0]) === "[" && ((v = d(e)) == null ? void 0 : v[1]) === "[") {
1716
- let A = e.slice(1, (e == null ? void 0 : e.length) - 1);
1717
- const K = Qs(A.trim());
1718
- K == null || K.forEach((S) => {
1719
- var O;
1720
- S != null && S.tableColumn ? (p.push({
1721
- key: "groupName",
1722
- value: S == null ? void 0 : S.groupName
1723
- }), p.push({
1724
- key: "tableColumn",
1725
- value: S == null ? void 0 : S.tableColumn
1726
- }), p.push({
1727
- key: "tableContents",
1728
- value: S == null ? void 0 : S.tableContents
1729
- }), p.push({
1730
- key: "tablePath",
1731
- value: (S == null ? void 0 : S.tableColumnPath) ?? ""
1732
- })) : S != null && S.extraButton ? (p.push({
1733
- key: "groupName",
1734
- value: S == null ? void 0 : S.groupName
1735
- }), p.push({
1736
- key: "extraButton",
1737
- value: S == null ? void 0 : S.extraButton,
1738
- path: S == null ? void 0 : S.extraPath
1739
- })) : (p.push({
1740
- key: "groupName",
1741
- value: S == null ? void 0 : S.groupName
1742
- }), p.push({
1743
- key: "formContent",
1744
- value: r === 1 ? S == null ? void 0 : S.formContents : (O = S == null ? void 0 : S.formContents) == null ? void 0 : O[c]
1745
- }));
1746
- });
1747
- } else
1748
- k = Ue(d(e.trim())), k != null && k.tableColumn ? (p.push({
1749
- key: "groupName",
1750
- value: k == null ? void 0 : k.groupName
1751
- }), p.push({
1752
- key: "tableColumn",
1753
- value: k == null ? void 0 : k.tableColumn
1754
- }), p.push({
1755
- key: "tableContents",
1756
- value: r !== 1 ? [(y = k == null ? void 0 : k.tableContents) == null ? void 0 : y[c]] : k == null ? void 0 : k.tableContents
1757
- })) : (p.push({
1758
- key: "groupName",
1759
- value: k == null ? void 0 : k.groupName
1760
- }), p.push({
1761
- key: "formContent",
1762
- value: r !== 1 ? [(E = k == null ? void 0 : k.formContents) == null ? void 0 : E[c]] : k == null ? void 0 : k.formContents
1763
- }));
1764
- }
1765
- }), s.push(p);
1766
- }), s;
1767
- }, el = (e) => {
1768
- var l, n;
1769
- const a = [], s = qs((l = d(e)) == null ? void 0 : l.key);
1770
- return s && (s == null ? void 0 : s.length) > 0 && (s == null || s.forEach((c) => {
1771
- a.push([{
1772
- key: "contentPath",
1773
- value: c
1774
- }]);
1775
- })), Fs((n = d(e)) == null ? void 0 : n.value, a);
1776
- }, al = (e) => e.length === 1 && (e == null ? void 0 : e[0]) === void 0 ? [] : e, sl = (e) => {
1777
- var s, r;
1778
- return (r = (s = d(e)) == null ? void 0 : s.map((l) => {
1779
- var c, p;
1780
- let n = [];
1781
- if ((c = Vs(l == null ? void 0 : l.filter((u) => (u == null ? void 0 : u.key) !== "contentPath"))) == null || c.forEach((u) => {
1782
- var i, v, y, E, k, A, K, S, O, P, R, J, z, C, x, j;
1783
- let t = [];
1784
- if (u.length === 0)
1785
- return;
1786
- let o = (v = (i = u.find((g) => (g == null ? void 0 : g.key) === "tableColumn")) == null ? void 0 : i.value) == null ? void 0 : v.map((g) => ({
1787
- label: g
1788
- }));
1789
- if (Array.isArray(o) && ((y = u == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "tablePath")) != null && y.value && ((E = u == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "tablePath")) == null ? void 0 : E.value) !== "" && o.push({
1790
- columnPath: (k = u == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "tablePath")) == null ? void 0 : k.value
1791
- }), o = (A = d(o)) == null ? void 0 : A.map((g) => {
1792
- var L, _, m, G, I, Y, q, ae, F;
1793
- return g != null && g.label && !((L = g == null ? void 0 : g.label) != null && L.includes("[")) ? g : {
1794
- label: (m = (_ = d(g == null ? void 0 : g.label)) == null ? void 0 : _.split("[")) == null ? void 0 : m[0],
1795
- formMenuSelect: (ae = (q = (Y = (I = (G = d(g == null ? void 0 : g.label)) == null ? void 0 : G.split("[")) == null ? void 0 : I[1]) == null ? void 0 : Y.split("]")) == null ? void 0 : q[0]) == null ? void 0 : ae.split("/"),
1796
- columnPath: (g == null ? void 0 : g.columnPath) ?? "",
1797
- isRoute: (F = g == null ? void 0 : g.label) == null ? void 0 : F.includes("(")
1798
- };
1799
- }), o.length !== 0 && o.push({
1800
- label: "操作"
1801
- })), u != null && u.find((g) => (g == null ? void 0 : g.key) === "formContent")) {
1802
- const g = (K = u.find((_) => (_ == null ? void 0 : _.key) === "formContent")) == null ? void 0 : K.value;
1803
- let L = [];
1804
- Array.isArray(g) && g.forEach((_) => {
1805
- let m = 1;
1806
- Array.isArray(_) && (_ != null && _.every((G) => !Array.isArray(G))) && (m = _.length), _ && (Array.isArray(_) || (_ = [_]), _.forEach((G) => {
1807
- Array.isArray(G) || (G = [G]);
1808
- let I = [];
1809
- G == null || G.forEach((Y) => {
1810
- var q, ae, F, re, se, fe, U, T, W, te, X, oe, V, f, h, b;
1811
- if (Ge.value++, !((ae = (q = Object.values(Y)) == null ? void 0 : q[0]) != null && ae.includes("/") && ((re = (F = Object.values(Y)) == null ? void 0 : F[0]) != null && re.includes("["))))
1812
- I.push({
1813
- id: Ge.value,
1814
- key: (se = Object.keys(Y)) == null ? void 0 : se[0],
1815
- value: (fe = Object.values(Y)) == null ? void 0 : fe[0],
1816
- width: Math.max(m, G.length)
1817
- });
1818
- else {
1819
- let D = (te = (W = (T = (U = Object.values(Y)) == null ? void 0 : U[0]) == null ? void 0 : T.split("[")) == null ? void 0 : W[0]) == null ? void 0 : te.split("/"), w = (V = (oe = (X = Object.values(Y)) == null ? void 0 : X[0]) == null ? void 0 : oe.split("[")) == null ? void 0 : V[1], M = (h = (f = w == null ? void 0 : w.slice(0, w.length - 1)) == null ? void 0 : f.split(":")) == null ? void 0 : h.map((N) => N.replaceAll("'", "")), H = M;
1820
- (M == null ? void 0 : M.length) === 1 && H.unshift(""), I.push({
1821
- id: Ge.value,
1822
- key: (b = Object.keys(Y)) == null ? void 0 : b[0],
1823
- value: "",
1824
- width: Math.max(m, G.length),
1825
- type: "Select",
1826
- optionUrl: {
1827
- type: "Select",
1828
- selectRelateType: "关联绑定列",
1829
- menuSelect: D,
1830
- groupSelect: H
1831
- }
1832
- });
1833
- }
1834
- }), I == null || I.forEach((Y) => {
1835
- L.push(Y);
1836
- });
1837
- }));
1838
- }), t.push({
1839
- key: "formFlex",
1840
- contents: ""
1841
- }), t.push({
1842
- key: "formContent",
1843
- contents: L
1844
- }), n.push({
1845
- comp: "Form",
1846
- compData: d(t),
1847
- name: (O = (S = u.find((_) => (_ == null ? void 0 : _.key) === "groupName")) == null ? void 0 : S.value) == null ? void 0 : O.replaceAll("'", "")
1848
- });
1849
- } else u != null && u.find((g) => (g == null ? void 0 : g.key) === "extraButton") ? n.push({
1850
- key: "extraButton",
1851
- value: {
1852
- method: (P = u == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "extraButton")) == null ? void 0 : P.value,
1853
- value: [],
1854
- path: (R = u == null ? void 0 : u.find((g) => (g == null ? void 0 : g.key) === "extraButton")) == null ? void 0 : R.path
1855
- }
1856
- }) : ((o == null ? void 0 : o.length) !== 0 || ((z = (J = u.find((g) => (g == null ? void 0 : g.key) === "tableContents")) == null ? void 0 : J.value) == null ? void 0 : z.length) > 0) && (t.push({
1857
- key: "header",
1858
- contents: o
1859
- }), t.push({
1860
- key: "tableContents",
1861
- contents: al((C = u.find((g) => (g == null ? void 0 : g.key) === "tableContents")) == null ? void 0 : C.value)
1862
- }), t.push({
1863
- key: "extraButton",
1864
- contents: [{ label: "新增" }]
1865
- }), t.push({
1866
- key: "rowButton",
1867
- contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1868
- }), n.push({
1869
- comp: "Table",
1870
- compData: t,
1871
- name: (j = (x = u.find((g) => (g == null ? void 0 : g.key) === "groupName")) == null ? void 0 : x.value) == null ? void 0 : j.replaceAll("'", "")
1872
- }));
1873
- }), (n == null ? void 0 : n.length) > 0)
1874
- return {
1875
- comp: "Group",
1876
- compData: [{
1877
- key: "groupContents",
1878
- contents: n
1879
- }],
1880
- name: (p = l == null ? void 0 : l.find((t) => (t == null ? void 0 : t.key) === "contentPath")) == null ? void 0 : p.value
1881
- };
1882
- })) == null ? void 0 : r.filter((l) => l);
1883
- }, ll = (e) => {
1884
- var p, u;
1885
- let a = [];
1886
- const s = Js(d(e));
1887
- a.push(s);
1888
- const r = Hs(d(e));
1889
- r && a.push(r);
1890
- const l = zs(d(e));
1891
- l && ((p = d(l)) == null || p.forEach((t) => {
1892
- a.push(t);
1893
- }));
1894
- const n = (u = d(e)) == null ? void 0 : u.filter((t) => {
1895
- var o;
1896
- return (o = t == null ? void 0 : t.key) == null ? void 0 : o.includes("(");
1897
- }).map((t) => el(t)).filter((t) => (t == null ? void 0 : t.length) !== 0);
1898
- let c = [];
1899
- return n == null || n.forEach((t) => {
1900
- t == null || t.forEach((o) => {
1901
- c != null && c.find((i) => {
1902
- var v, y;
1903
- return ((v = i == null ? void 0 : i.find((E) => (E == null ? void 0 : E.key) === "contentPath")) == null ? void 0 : v.value) === ((y = o == null ? void 0 : o.find((E) => (E == null ? void 0 : E.key) === "contentPath")) == null ? void 0 : y.value);
1904
- }) ? c = c == null ? void 0 : c.map((i) => {
1905
- var y, E;
1906
- return ((y = i == null ? void 0 : i.find((k) => (k == null ? void 0 : k.key) === "contentPath")) == null ? void 0 : y.value) === ((E = o == null ? void 0 : o.find((k) => (k == null ? void 0 : k.key) === "contentPath")) == null ? void 0 : E.value) && (i = [...i, ...o.filter((k) => (k == null ? void 0 : k.key) !== "contentPath")]), i;
1907
- }) : c.push(o);
1908
- });
1909
- }), a = [...a, ...sl(c)], a;
1910
- }, Tl = (e) => {
1911
- var l, n, c;
1912
- const a = (n = (l = ys(d(e))) == null ? void 0 : l.filter((p) => p !== "")) == null ? void 0 : n.map((p) => p.replaceAll("<", "[").replaceAll(">", "]")), s = (c = a == null ? void 0 : a.filter((p) => !p.includes("/*"))) == null ? void 0 : c.map((p) => ds(p));
1913
- return ll(s);
1914
- };
1915
- export {
1916
- Kl as _,
1917
- Pl as a,
1918
- El as b,
1919
- Il as c,
1920
- wl as d,
1921
- Ll as e,
1922
- xl as f,
1923
- Nl as g,
1924
- jl as h,
1925
- Tl as i,
1926
- bl as j,
1927
- Ml as o,
1928
- ee as s
1929
- };