ss-component-new 1.1.239 → 1.1.252
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.
- package/dist/array-BhjrAPhE.js +4734 -0
- package/dist/array-DsZXIcD2.cjs +7 -0
- package/dist/{cloneDeep-kbsGGN_Q.cjs → cloneDeep-B135w891.cjs} +1 -1
- package/dist/{cloneDeep-BcK4cO7a.js → cloneDeep-BllTpMX-.js} +1 -1
- package/dist/icons/img/insofworkslogo.ico +0 -0
- package/dist/{index-NdocPiqA.js → index-13kbVn0I.js} +9 -9
- package/dist/{index-FX9zIOBz.cjs → index-B3IqlUYG.cjs} +1 -1
- package/dist/{index-DRcuI2gm.js → index-B56weiCa.js} +4 -4
- package/dist/{index-Be4n2ecn.js → index-B5d1OhV0.js} +185 -186
- package/dist/index-B7kLv-oH.js +3757 -0
- package/dist/{index-BUga6nNK.cjs → index-B8vD15H0.cjs} +1 -1
- package/dist/{index-FaQ9vBep.js → index-B9rOZR1k.js} +4 -4
- package/dist/index-BK5w6uMd.js +461 -0
- package/dist/{index-C7Y_BQCw.js → index-BM97Nh7v.js} +102 -97
- package/dist/{index-BoA0FuEi.js → index-BOXue8CC.js} +7 -7
- package/dist/index-BV-R8PQn.cjs +1 -0
- package/dist/index-BWTusWqR.js +224 -0
- package/dist/index-BYqzfeul.cjs +1 -0
- package/dist/{index-CQ0bJWFx.cjs → index-Bg0BoMyK.cjs} +1 -1
- package/dist/{index-V9D4K_Sf.cjs → index-Bhbral-D.cjs} +1 -1
- package/dist/{index-BOzSvFJA.cjs → index-BlWV5dab.cjs} +1 -1
- package/dist/index-BsUoHS_0.cjs +9 -0
- package/dist/{index-D0FNjq6G.cjs → index-Bsm0oDd2.cjs} +1 -1
- package/dist/{index-CWsALJ8f.cjs → index-BtHcbXIL.cjs} +1 -1
- package/dist/{index-3g7rW5vQ.js → index-BubJ_6uh.js} +1 -1
- package/dist/{index-CgxSbKBz.js → index-C6QcbKBS.js} +4 -4
- package/dist/{index-B66Qf5rw.js → index-CCTPQ2Og.js} +6 -6
- package/dist/{index-Du-s_IGe.js → index-CKdmCGWv.js} +1 -1
- package/dist/{index-DX3jtjLG.js → index-CM3SjbuE.js} +3 -3
- package/dist/{index-CrSVdnus.cjs → index-COjok9zl.cjs} +1 -1
- package/dist/{index-CiTgFX9o.js → index-CSuijRgr.js} +80 -80
- package/dist/{index-Cbj_oJPC.cjs → index-CXQfynOD.cjs} +1 -1
- package/dist/{index-GlyYi8eO.cjs → index-CgKEpk2a.cjs} +1 -1
- package/dist/{index-CrdlZPHq.js → index-CgZhftQO.js} +4 -4
- package/dist/{index-CG01yKU1.js → index-Cm5IxLo3.js} +2893 -2892
- package/dist/{index-Gc1epwAE.cjs → index-CmW94cTp.cjs} +1 -1
- package/dist/{index-C3UTqVyv.cjs → index-D-SMmlK-.cjs} +33 -33
- package/dist/{index-BMrHnCTf.js → index-D1-U0vrH.js} +75 -66
- package/dist/{index-CoH0G-uS.cjs → index-D6VayVA6.cjs} +1 -1
- package/dist/{index-BAWROpdj.js → index-DMLGnO0b.js} +1 -1
- package/dist/{index-DcymGmWj.js → index-DRxZt4Wv.js} +1 -1
- package/dist/{index-8hwiS85r.js → index-DVjTXK6S.js} +5 -5
- package/dist/index-D_29gkCH.cjs +1 -0
- package/dist/{index-B_VMMfxb.js → index-DowLTE1s.js} +1 -1
- package/dist/{index-DreX5xyP.js → index-LgF7m5cd.js} +5 -5
- package/dist/{index-BdiQsOpb.cjs → index-MCv8h_HT.cjs} +1 -1
- package/dist/{index-DqLOgQsT.cjs → index-PKHQ7Nyl.cjs} +1 -1
- package/dist/{index-DxzvUr7M.cjs → index-RVlvIJC4.cjs} +1 -1
- package/dist/{index-BhOckTgC.cjs → index-RusK-dxZ.cjs} +1 -1
- package/dist/{index-5JXCiHw3.cjs → index-Ub-DS2ga.cjs} +1 -1
- package/dist/{index-C8nLtJQB.js → index-VN54J5oj.js} +6 -6
- package/dist/{index-D-auhS5f.js → index-X7YNR_bm.js} +3 -3
- package/dist/{index-B2KK3HzA.cjs → index-_vDsdUJi.cjs} +1 -1
- package/dist/{index-CK7nt4bL.cjs → index-g5lygwSm.cjs} +1 -1
- package/dist/{index-P_6AmAJ6.js → index-nNNsd9if.js} +1 -1
- package/dist/index-vFYm7SIH.cjs +1 -0
- package/dist/index-xOEFDxna.cjs +1 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DVmAEsPP.js → index.vue_vue_type_script_setup_true_lang-T9gGbni6.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-7hOFb1P0.cjs → index.vue_vue_type_script_setup_true_lang-TGwej3z-.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-BrZ1zhys.js +612 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-CREMevxh.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Rrc8X2Wa.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Bz3v6Nn0.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DI887Xui.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DHAxO4Cg.cjs} +1 -1
- package/dist/{login-CbLjVnvi.js → login-BSiDyISU.js} +2 -2
- package/dist/{login-C0pHH-1V.cjs → login-DSB9dWl3.cjs} +1 -1
- package/dist/{main-wtI2yJ--.cjs → main-B6B8EHeL.cjs} +1 -1
- package/dist/{main-DLdZKJUK.js → main-CNLqlWam.js} +6 -6
- package/dist/{menu-CAlO6ojx.js → menu-BsDSnWTk.js} +97 -78
- package/dist/{menu-LlBjM6b8.cjs → menu-CVJXAhG-.cjs} +4 -4
- package/dist/{modelComp-Af3CYJjb.cjs → modelComp-BE3B5jke.cjs} +1 -1
- package/dist/{modelComp-D9gZ6ZkE.js → modelComp-O0eO-YTR.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/public/icons/img/insofworkslogo.ico +0 -0
- package/dist/array-D-J_e91G.cjs +0 -7
- package/dist/array-DAwa7XAV.js +0 -4476
- package/dist/index-B9K0EIpS.js +0 -461
- package/dist/index-BFPZALXc.cjs +0 -1
- package/dist/index-BZHxtM--.cjs +0 -1
- package/dist/index-Bkc0R0j5.js +0 -3551
- package/dist/index-D0hUHQHn.cjs +0 -1
- package/dist/index-VVRul53o.cjs +0 -1
- package/dist/index-bC_377mt.cjs +0 -9
- package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-CMvvh_Fa.js +0 -612
- package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-Df3FKHF1.cjs +0 -1
|
@@ -1,612 +0,0 @@
|
|
|
1
|
-
import { ref as G, watch as ee, defineComponent as we, defineProps as Me, computed as Q, onMounted as Ce } from "vue";
|
|
2
|
-
import { c as V, g as R, u as Y, d as Se, p as se } from "./index-Du-s_IGe.js";
|
|
3
|
-
import { b as ke, c as X, d as Ae, e as le, g as z, a as Ie, f as Ee, h as Te, i as Pe, j as be } from "./index-CG01yKU1.js";
|
|
4
|
-
import { u as te, s as L, E as H } from "./menu-CAlO6ojx.js";
|
|
5
|
-
import { c as O } from "./cloneDeep-BcK4cO7a.js";
|
|
6
|
-
import { g as Ue, d as ne } from "./crypto-BRyGpjGR.js";
|
|
7
|
-
import { t as Oe, g as oe } from "./index-BoA0FuEi.js";
|
|
8
|
-
import { t as Ne } from "./index-DreX5xyP.js";
|
|
9
|
-
import { t as xe } from "./index-FaQ9vBep.js";
|
|
10
|
-
import { t as je } from "./index-DRcuI2gm.js";
|
|
11
|
-
import { u as ve } from "./modelComp-D9gZ6ZkE.js";
|
|
12
|
-
import { g as Fe } from "./array-DAwa7XAV.js";
|
|
13
|
-
import { v as Be } from "./index-DX3jtjLG.js";
|
|
14
|
-
import { u as De } from "./login-CbLjVnvi.js";
|
|
15
|
-
import { a as Le, s as $e, b as Re, c as _e, d as Je } from "./index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Rrc8X2Wa.js";
|
|
16
|
-
import { useRouter as Ve } from "vue-router";
|
|
17
|
-
G([]);
|
|
18
|
-
const ue = async (e) => {
|
|
19
|
-
let a = [];
|
|
20
|
-
e == null || e.forEach((o) => {
|
|
21
|
-
var n;
|
|
22
|
-
(n = o.compData) == null || n.forEach((t) => {
|
|
23
|
-
var y;
|
|
24
|
-
(y = t.contents) == null || y.forEach((u) => {
|
|
25
|
-
var w, l, D, i;
|
|
26
|
-
const c = (l = (w = u == null ? void 0 : u.compData) == null ? void 0 : w.find((C) => (C == null ? void 0 : C.key) === "extra")) == null ? void 0 : l.value;
|
|
27
|
-
(i = (D = u.compData) == null ? void 0 : D.filter((C) => (C == null ? void 0 : C.key) !== "extra")) == null || i.forEach((C) => {
|
|
28
|
-
var r;
|
|
29
|
-
(r = ke(O(C))) == null || r.forEach(async (k) => {
|
|
30
|
-
var g, v, h, f, b, F, d, N;
|
|
31
|
-
if (k.comp === "Table") {
|
|
32
|
-
const U = await V({
|
|
33
|
-
key: {
|
|
34
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
35
|
-
pageKey: o.name,
|
|
36
|
-
type: "method",
|
|
37
|
-
version: 1,
|
|
38
|
-
methodName: (h = (g = o.name) == null ? void 0 : g.split("/")) == null ? void 0 : h[((v = o.name) == null ? void 0 : v.split("/").length) - 1],
|
|
39
|
-
methodKey: (f = Object.values(c[0])) == null ? void 0 : f[0],
|
|
40
|
-
parentTable: (k == null ? void 0 : k.parentTableContents) ?? ""
|
|
41
|
-
},
|
|
42
|
-
value: {
|
|
43
|
-
pageData: {
|
|
44
|
-
comp: (b = X(O(k))) == null ? void 0 : b.comp,
|
|
45
|
-
compData: (F = X(O(k))) == null ? void 0 : F.compData,
|
|
46
|
-
name: (d = X(O(k))) == null ? void 0 : d.name
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}), W = U.data.result, q = await ((N = Ae(O(k))) == null ? void 0 : N.map(async (_) => {
|
|
50
|
-
var K, A;
|
|
51
|
-
let s;
|
|
52
|
-
_.length !== 0 && (s = await V({
|
|
53
|
-
key: {
|
|
54
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
55
|
-
pageKey: o.name,
|
|
56
|
-
type: "methodData",
|
|
57
|
-
methodKey: (K = Object.values(c[0])) == null ? void 0 : K[0],
|
|
58
|
-
tableId: W
|
|
59
|
-
},
|
|
60
|
-
value: {
|
|
61
|
-
tableData: _
|
|
62
|
-
}
|
|
63
|
-
}));
|
|
64
|
-
const S = (A = (await R({
|
|
65
|
-
key: {
|
|
66
|
-
parentTable: _,
|
|
67
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
68
|
-
pageKey: o.name,
|
|
69
|
-
type: "method"
|
|
70
|
-
}
|
|
71
|
-
})).data.result) == null ? void 0 : A.map(async (M) => await Y({
|
|
72
|
-
id: M.id,
|
|
73
|
-
key: {
|
|
74
|
-
systemKey: M.key.systemKey,
|
|
75
|
-
pageKey: M.key.pageKey,
|
|
76
|
-
type: M.key.type,
|
|
77
|
-
methodKey: M.key.methodKey,
|
|
78
|
-
parentTable: s.data.result
|
|
79
|
-
}
|
|
80
|
-
}));
|
|
81
|
-
return a.push(S), s;
|
|
82
|
-
}));
|
|
83
|
-
a.push(U), a.push(q);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}), await Promise.all(a);
|
|
90
|
-
}, Ge = te(), ae = (e) => e == null ? void 0 : e.map((a) => (a.contents && (a.contents = a.contents.filter((o) => {
|
|
91
|
-
var n;
|
|
92
|
-
return ((n = o.comp) == null ? void 0 : n.toUpperCase()) !== "CALCULATOR";
|
|
93
|
-
})), a.compData && (a.compData = ae(a.compData)), a)), ie = async (e) => {
|
|
94
|
-
var a, o, n, t, y, u, c, w, l, D, i, C, r, k, g, v, h, f, b, F;
|
|
95
|
-
if (!e) {
|
|
96
|
-
const d = await R({
|
|
97
|
-
key: {
|
|
98
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
99
|
-
layer: "superAdmin"
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
if (((a = d == null ? void 0 : d.data) == null ? void 0 : a.code) === 200 && (t = (n = (o = d == null ? void 0 : d.data) == null ? void 0 : o.result) == null ? void 0 : n[0]) != null && t.id) {
|
|
103
|
-
const N = (u = (y = d == null ? void 0 : d.data) == null ? void 0 : y.result) == null ? void 0 : u[0], U = (l = (w = (c = d == null ? void 0 : d.data) == null ? void 0 : c.result) == null ? void 0 : w[0]) == null ? void 0 : l.key;
|
|
104
|
-
U.type = "管理系统", await Y({
|
|
105
|
-
id: N == null ? void 0 : N.id,
|
|
106
|
-
key: U
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
try {
|
|
112
|
-
const d = await R({
|
|
113
|
-
key: {
|
|
114
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
115
|
-
layer: "superAdmin"
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
if (((D = d == null ? void 0 : d.data) == null ? void 0 : D.code) === 200 && (r = (C = (i = d == null ? void 0 : d.data) == null ? void 0 : i.result) == null ? void 0 : C[0]) != null && r.id) {
|
|
119
|
-
const N = (g = (k = d == null ? void 0 : d.data) == null ? void 0 : k.result) == null ? void 0 : g[0], U = (f = (h = (v = d == null ? void 0 : d.data) == null ? void 0 : v.result) == null ? void 0 : h[0]) == null ? void 0 : f.key;
|
|
120
|
-
U.type = (F = (b = e == null ? void 0 : e[0]) == null ? void 0 : b.contents) == null ? void 0 : F[0], await Y({
|
|
121
|
-
id: N == null ? void 0 : N.id,
|
|
122
|
-
key: U
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
} catch (d) {
|
|
126
|
-
return Promise.reject(d);
|
|
127
|
-
}
|
|
128
|
-
}, Ke = (e) => e == null ? void 0 : e.map((a) => (a.contents && (a.contents = a.contents.filter((o) => {
|
|
129
|
-
var n;
|
|
130
|
-
return ((n = o.comp) == null ? void 0 : n.toUpperCase()) === "CALCULATOR";
|
|
131
|
-
})), a.compData && (a.compData = Ke(a.compData)), a)), ye = (e) => {
|
|
132
|
-
const a = Ke(e);
|
|
133
|
-
let o = [];
|
|
134
|
-
return a == null || a.forEach((n) => {
|
|
135
|
-
var t;
|
|
136
|
-
(t = n.compData) != null && t.find((y) => {
|
|
137
|
-
var u;
|
|
138
|
-
return (u = y == null ? void 0 : y.contents) == null ? void 0 : u.find((c) => (c == null ? void 0 : c.comp) === "calculator");
|
|
139
|
-
}) && o.push(n);
|
|
140
|
-
}), o;
|
|
141
|
-
}, ce = async (e) => {
|
|
142
|
-
var a, o, n, t;
|
|
143
|
-
try {
|
|
144
|
-
const y = await V({
|
|
145
|
-
key: {
|
|
146
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
147
|
-
pageKey: "menu",
|
|
148
|
-
type: "structure"
|
|
149
|
-
},
|
|
150
|
-
value: {
|
|
151
|
-
pageData: e
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
if (((a = y == null ? void 0 : y.data) == null ? void 0 : a.code) === 200) {
|
|
155
|
-
const u = (n = (o = e == null ? void 0 : e.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents;
|
|
156
|
-
Ge.setRawMenus(u ?? []);
|
|
157
|
-
}
|
|
158
|
-
return (t = y == null ? void 0 : y.data) == null ? void 0 : t.code;
|
|
159
|
-
} catch (y) {
|
|
160
|
-
return Promise.reject(y);
|
|
161
|
-
}
|
|
162
|
-
}, Ye = async () => {
|
|
163
|
-
var y, u, c, w, l, D;
|
|
164
|
-
const e = R({
|
|
165
|
-
key: {
|
|
166
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
167
|
-
pageKey: "menu"
|
|
168
|
-
}
|
|
169
|
-
}), a = R({
|
|
170
|
-
key: {
|
|
171
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
172
|
-
type: "structure"
|
|
173
|
-
}
|
|
174
|
-
}), o = await Promise.all([e, a]), n = o == null ? void 0 : o[0], t = o == null ? void 0 : o[1];
|
|
175
|
-
return {
|
|
176
|
-
menuExist: ((y = n == null ? void 0 : n.data) == null ? void 0 : y.result) && ((c = (u = n == null ? void 0 : n.data) == null ? void 0 : u.result) == null ? void 0 : c.length) > 0,
|
|
177
|
-
structureExist: ((w = t == null ? void 0 : t.data) == null ? void 0 : w.result) && ((D = (l = t == null ? void 0 : t.data) == null ? void 0 : l.result) == null ? void 0 : D.length) > 0
|
|
178
|
-
};
|
|
179
|
-
}, fe = async () => {
|
|
180
|
-
var e;
|
|
181
|
-
try {
|
|
182
|
-
const a = Ue(), o = await V({
|
|
183
|
-
key: {
|
|
184
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
185
|
-
pageKey: "secret",
|
|
186
|
-
type: "system"
|
|
187
|
-
},
|
|
188
|
-
value: {
|
|
189
|
-
cryptoInfo: {
|
|
190
|
-
publicKey: a.publicKey,
|
|
191
|
-
privateKey: a.privateKey
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
return ((e = o == null ? void 0 : o.data) == null ? void 0 : e.code) === 200;
|
|
196
|
-
} catch (a) {
|
|
197
|
-
throw a;
|
|
198
|
-
}
|
|
199
|
-
}, ca = async (e) => {
|
|
200
|
-
var t, y, u, c, w, l, D, i;
|
|
201
|
-
let a = O(e);
|
|
202
|
-
a = [...a, Oe, Ne, xe, je];
|
|
203
|
-
const { menuExist: o, structureExist: n } = await Ye();
|
|
204
|
-
if (sessionStorage.getItem("systemKey") && !o && !n) {
|
|
205
|
-
const C = (t = ae(a)) == null ? void 0 : t.filter((g) => {
|
|
206
|
-
var v, h, f;
|
|
207
|
-
return ((v = g == null ? void 0 : g.comp) == null ? void 0 : v.toUpperCase()) !== "MENU" && ((h = g == null ? void 0 : g.comp) == null ? void 0 : h.toUpperCase()) !== "MENUTOP" && ((f = g == null ? void 0 : g.comp) == null ? void 0 : f.toUpperCase()) !== "SYSTEM";
|
|
208
|
-
}), r = a == null ? void 0 : a.find((g) => g.comp === "Menu"), k = (y = a == null ? void 0 : a.find((g) => g.comp === "System")) == null ? void 0 : y.compData;
|
|
209
|
-
await ce(r), await ie(k), fe(), await le(C), await ue((u = ye(O(e))) == null ? void 0 : u.filter((g) => {
|
|
210
|
-
var v;
|
|
211
|
-
return ((v = g == null ? void 0 : g.comp) == null ? void 0 : v.toUpperCase()) !== "MENU";
|
|
212
|
-
}));
|
|
213
|
-
} else {
|
|
214
|
-
const r = (w = (c = (await R({
|
|
215
|
-
key: {
|
|
216
|
-
systemKey: sessionStorage.getItem("systemKey")
|
|
217
|
-
}
|
|
218
|
-
})).data.result) == null ? void 0 : c.filter((f) => {
|
|
219
|
-
var b;
|
|
220
|
-
return ((b = f == null ? void 0 : f.key) == null ? void 0 : b.layer) !== "superAdmin";
|
|
221
|
-
})) == null ? void 0 : w.map((f) => f.id), k = r == null ? void 0 : r.map(async (f) => await Se({
|
|
222
|
-
id: f
|
|
223
|
-
}));
|
|
224
|
-
await Promise.all(k);
|
|
225
|
-
const g = (l = ae(a)) == null ? void 0 : l.filter((f) => {
|
|
226
|
-
var b, F, d;
|
|
227
|
-
return ((b = f == null ? void 0 : f.comp) == null ? void 0 : b.toUpperCase()) !== "MENU" && ((F = f == null ? void 0 : f.comp) == null ? void 0 : F.toUpperCase()) !== "MENUTOP" && ((d = f == null ? void 0 : f.comp) == null ? void 0 : d.toUpperCase()) !== "SYSTEM";
|
|
228
|
-
}), v = a == null ? void 0 : a.find((f) => f.comp === "Menu"), h = (D = a == null ? void 0 : a.find((f) => f.comp === "System")) == null ? void 0 : D.compData;
|
|
229
|
-
await ce(v), await ie(h), fe(), await le(g), await ue((i = ye(O(e))) == null ? void 0 : i.filter((f) => {
|
|
230
|
-
var b;
|
|
231
|
-
return ((b = f == null ? void 0 : f.comp) == null ? void 0 : b.toUpperCase()) !== "MENU";
|
|
232
|
-
}));
|
|
233
|
-
}
|
|
234
|
-
}, ze = De(), { loginUserInfo: pe, cryptoInfo: $ } = L(ze), T = ve(se), { itemData: de, curStructureCompIds: Z, isRefreshCurStructure: He } = L(T), We = te(se), { activeMenuPath: x } = L(We), j = Ie(se), { selectIndex: fa, selectTitle: B } = L(j), pa = () => {
|
|
235
|
-
T.setIsEdit("edit");
|
|
236
|
-
}, da = () => {
|
|
237
|
-
T.setIsEdit("view"), T.setRefreshCurStructure(!0);
|
|
238
|
-
}, ga = async (e) => {
|
|
239
|
-
var a;
|
|
240
|
-
if ((e == null ? void 0 : e.key) === "main" || B.value.length === 1)
|
|
241
|
-
P.value = await z(x.value, sessionStorage.getItem("systemKey")), j.setSelectIndex(""), j.setSelectMenu(""), j.setSelectTitle([]);
|
|
242
|
-
else {
|
|
243
|
-
const o = [], n = (e == null ? void 0 : e.key) === "" || !(e != null && e.key) ? "" : parseInt(e == null ? void 0 : e.key);
|
|
244
|
-
P.value = await z(x.value, sessionStorage.getItem("systemKey"), n);
|
|
245
|
-
let t = -1;
|
|
246
|
-
(a = B.value) == null || a.forEach((y, u) => {
|
|
247
|
-
(y == null ? void 0 : y.key) === (e == null ? void 0 : e.key) && (t = u), (t === -1 || t >= u) && o.push(y);
|
|
248
|
-
}), j.setSelectTitle(o), n !== "" ? j.setSelectMenu(e == null ? void 0 : e.key) : (j.setSelectIndex(""), j.setSelectMenu(""));
|
|
249
|
-
}
|
|
250
|
-
T.setItemData(P.value), T.setOriginalData(P.value);
|
|
251
|
-
}, m = async (e, a) => {
|
|
252
|
-
var o;
|
|
253
|
-
try {
|
|
254
|
-
let n, t;
|
|
255
|
-
a === "create" ? (n = {
|
|
256
|
-
key: {
|
|
257
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
258
|
-
pageKey: x.value,
|
|
259
|
-
type: "structure",
|
|
260
|
-
parentTable: "",
|
|
261
|
-
version: 1
|
|
262
|
-
},
|
|
263
|
-
value: {
|
|
264
|
-
pageData: e
|
|
265
|
-
}
|
|
266
|
-
}, t = V) : a === "update" ? (n = {
|
|
267
|
-
id: e == null ? void 0 : e.id,
|
|
268
|
-
key: {
|
|
269
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
270
|
-
pageKey: x.value,
|
|
271
|
-
type: "structure",
|
|
272
|
-
parentTable: "",
|
|
273
|
-
version: 1
|
|
274
|
-
},
|
|
275
|
-
value: {
|
|
276
|
-
pageData: e
|
|
277
|
-
}
|
|
278
|
-
}, t = Y) : a === "delete" && (n = {
|
|
279
|
-
id: e,
|
|
280
|
-
key: {
|
|
281
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
282
|
-
pageKey: x.value,
|
|
283
|
-
type: "structure",
|
|
284
|
-
parentTable: "",
|
|
285
|
-
version: 1
|
|
286
|
-
}
|
|
287
|
-
}, t = Se);
|
|
288
|
-
const y = await t(n);
|
|
289
|
-
return ((o = y == null ? void 0 : y.data) == null ? void 0 : o.code) === 200 ? y.data.result : (H.success("保存响应失败"), []);
|
|
290
|
-
} catch {
|
|
291
|
-
H.success("保存响应失败");
|
|
292
|
-
}
|
|
293
|
-
}, ha = async () => {
|
|
294
|
-
var w;
|
|
295
|
-
const e = JSON.parse(O(JSON.stringify(de.value))), a = e == null ? void 0 : e.map((l) => l.id), o = a.filter((l) => {
|
|
296
|
-
var D;
|
|
297
|
-
return !((D = Z.value) != null && D.includes(l));
|
|
298
|
-
}), n = (w = Z.value) == null ? void 0 : w.filter((l) => !a.includes(l)), t = [...o, ...n], y = e == null ? void 0 : e.filter((l) => !l.id), u = e == null ? void 0 : e.filter((l) => l.id);
|
|
299
|
-
console.log("clickSavePage0", a, Z.value, t), console.log("clickSavePage1", e, de.value), console.log("clickSavePage2", e), console.log("clickSavePage3", y), console.log("clickSavePage4", u);
|
|
300
|
-
let c = [];
|
|
301
|
-
t && (t == null ? void 0 : t.length) > 0 && (t == null || t.forEach((l) => {
|
|
302
|
-
l && c.push(m(l, "delete"));
|
|
303
|
-
})), y && (y == null ? void 0 : y.length) > 0 && (y == null || y.forEach((l) => {
|
|
304
|
-
l && c.push(m(l, "create"));
|
|
305
|
-
})), u && (u == null ? void 0 : u.length) > 0 && (u == null || u.forEach((l) => {
|
|
306
|
-
a != null && a.includes(l.id) && (console.log("clickSavePage5", "包含"), l && c.push(m(l, "update")));
|
|
307
|
-
})), Promise.all(c).then(() => {
|
|
308
|
-
H.success("保存成功"), T.setRefreshCurStructure(!0);
|
|
309
|
-
}).catch((l) => {
|
|
310
|
-
H.success(l);
|
|
311
|
-
});
|
|
312
|
-
}, Sa = (e) => Fe(e), P = G([]), va = async (e, a = "data") => {
|
|
313
|
-
var n, t, y, u, c, w;
|
|
314
|
-
if ((e == null ? void 0 : e.type) === "delete")
|
|
315
|
-
await Te((n = e == null ? void 0 : e.singleContent) == null ? void 0 : n.id);
|
|
316
|
-
else if ((e == null ? void 0 : e.buttonName) === "新增") {
|
|
317
|
-
let l = {};
|
|
318
|
-
for (let D in e == null ? void 0 : e.singleContent)
|
|
319
|
-
D !== "id" && D !== "index" && (l[D] = e == null ? void 0 : e.singleContent[D]);
|
|
320
|
-
await Pe(
|
|
321
|
-
a,
|
|
322
|
-
x.value,
|
|
323
|
-
e == null ? void 0 : e.index,
|
|
324
|
-
sessionStorage.getItem("systemKey"),
|
|
325
|
-
Object.values(l),
|
|
326
|
-
e == null ? void 0 : e.column
|
|
327
|
-
);
|
|
328
|
-
} else if ((e == null ? void 0 : e.buttonName) === "编辑") {
|
|
329
|
-
let l = {}, D = (t = e == null ? void 0 : e.singleContent) == null ? void 0 : t.id;
|
|
330
|
-
for (let i in e == null ? void 0 : e.singleContent)
|
|
331
|
-
i !== "id" && i !== "index" && (l[i] = e == null ? void 0 : e.singleContent[i]);
|
|
332
|
-
await be(
|
|
333
|
-
a,
|
|
334
|
-
x.value,
|
|
335
|
-
e == null ? void 0 : e.index,
|
|
336
|
-
D,
|
|
337
|
-
sessionStorage.getItem("systemKey"),
|
|
338
|
-
Object.values(l),
|
|
339
|
-
e == null ? void 0 : e.column
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
let o = (u = (y = B.value) == null ? void 0 : y[B.value.length - 1]) != null && u.key ? parseInt((w = (c = B.value) == null ? void 0 : c[B.value.length - 1]) == null ? void 0 : w.key) : "";
|
|
343
|
-
P.value = await z(x.value, sessionStorage.getItem("systemKey"), o), T.setItemData(P.value), T.setOriginalData(P.value);
|
|
344
|
-
}, Da = async (e) => {
|
|
345
|
-
var o, n;
|
|
346
|
-
await Ee(e == null ? void 0 : e.index, {
|
|
347
|
-
comp: "Form",
|
|
348
|
-
compData: (o = O(e == null ? void 0 : e.contents)) == null ? void 0 : o.filter((t) => t.contents),
|
|
349
|
-
name: ""
|
|
350
|
-
});
|
|
351
|
-
const a = (n = O(P.value)) == null ? void 0 : n.map((t) => ((t == null ? void 0 : t.id) === (e == null ? void 0 : e.index) && (t.compData = e == null ? void 0 : e.contents), t));
|
|
352
|
-
T.setItemData(a), T.setOriginalData(a);
|
|
353
|
-
}, Ka = (e) => {
|
|
354
|
-
P.value = e, T.setItemData(P.value), T.setOriginalData(P.value);
|
|
355
|
-
}, ge = (e) => {
|
|
356
|
-
var a, o, n;
|
|
357
|
-
return ((o = (a = pe.value) == null ? void 0 : a.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" || ((n = pe.value) == null ? void 0 : n.account) === (e == null ? void 0 : e.account);
|
|
358
|
-
}, he = async (e, a, o) => {
|
|
359
|
-
const n = oe("/系统管理/角色管理"), t = oe("/系统管理/部门管理");
|
|
360
|
-
return await Promise.all([n, t]).then((u) => {
|
|
361
|
-
var l, D;
|
|
362
|
-
const c = (l = u == null ? void 0 : u[0]) == null ? void 0 : l.map((i) => ({
|
|
363
|
-
label: i == null ? void 0 : i.roleName,
|
|
364
|
-
value: i == null ? void 0 : i.roleName
|
|
365
|
-
})), w = (D = u == null ? void 0 : u[1]) == null ? void 0 : D.map((i) => ({
|
|
366
|
-
label: i == null ? void 0 : i.deptName,
|
|
367
|
-
value: i == null ? void 0 : i.deptName
|
|
368
|
-
}));
|
|
369
|
-
return o ? e == null ? void 0 : e.map((i) => {
|
|
370
|
-
var C;
|
|
371
|
-
return {
|
|
372
|
-
...i,
|
|
373
|
-
compData: (C = i == null ? void 0 : i.compData) == null ? void 0 : C.map((r) => {
|
|
374
|
-
var k, g;
|
|
375
|
-
return (r == null ? void 0 : r.key) === "header" ? {
|
|
376
|
-
...r,
|
|
377
|
-
contents: (k = r == null ? void 0 : r.contents) == null ? void 0 : k.map((v) => v.prop === "userDept" ? {
|
|
378
|
-
...v,
|
|
379
|
-
options: w
|
|
380
|
-
} : v.prop === "userRoles" ? {
|
|
381
|
-
...v,
|
|
382
|
-
options: c
|
|
383
|
-
} : v)
|
|
384
|
-
} : (r == null ? void 0 : r.key) === "tableContents" ? {
|
|
385
|
-
...r,
|
|
386
|
-
contents: (g = r == null ? void 0 : r.contents) == null ? void 0 : g.map((v) => {
|
|
387
|
-
var h;
|
|
388
|
-
return {
|
|
389
|
-
...v,
|
|
390
|
-
password: ge(v) ? ne(v == null ? void 0 : v.password, (h = $ == null ? void 0 : $.value) == null ? void 0 : h.privateKey) : v == null ? void 0 : v.password
|
|
391
|
-
};
|
|
392
|
-
})
|
|
393
|
-
} : r;
|
|
394
|
-
})
|
|
395
|
-
};
|
|
396
|
-
}) : e == null ? void 0 : e.map((i) => {
|
|
397
|
-
var C;
|
|
398
|
-
return {
|
|
399
|
-
...i,
|
|
400
|
-
compData: (C = i == null ? void 0 : i.compData) == null ? void 0 : C.map((r) => {
|
|
401
|
-
var k, g, v;
|
|
402
|
-
return (r == null ? void 0 : r.key) === "rowButton" || (r == null ? void 0 : r.key) === "extraButton" ? {
|
|
403
|
-
...r,
|
|
404
|
-
contents: (k = r == null ? void 0 : r.contents) == null ? void 0 : k.filter((h) => a == null ? void 0 : a.includes(h == null ? void 0 : h.label))
|
|
405
|
-
} : (r == null ? void 0 : r.key) === "header" ? {
|
|
406
|
-
...r,
|
|
407
|
-
contents: (g = r == null ? void 0 : r.contents) == null ? void 0 : g.map((h) => h.prop === "userDept" ? {
|
|
408
|
-
...h,
|
|
409
|
-
options: w
|
|
410
|
-
} : h.prop === "userRoles" ? {
|
|
411
|
-
...h,
|
|
412
|
-
options: c
|
|
413
|
-
} : h)
|
|
414
|
-
} : (r == null ? void 0 : r.key) === "tableContents" ? {
|
|
415
|
-
...r,
|
|
416
|
-
contents: (v = r == null ? void 0 : r.contents) == null ? void 0 : v.map((h) => {
|
|
417
|
-
var f;
|
|
418
|
-
return {
|
|
419
|
-
...h,
|
|
420
|
-
password: ge(h) ? ne(h == null ? void 0 : h.password, (f = $ == null ? void 0 : $.value) == null ? void 0 : f.privateKey) : h == null ? void 0 : h.password
|
|
421
|
-
};
|
|
422
|
-
})
|
|
423
|
-
} : r;
|
|
424
|
-
})
|
|
425
|
-
};
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
};
|
|
429
|
-
ee(
|
|
430
|
-
() => [x.value, He.value],
|
|
431
|
-
async (e) => {
|
|
432
|
-
var n;
|
|
433
|
-
const a = e == null ? void 0 : e[0], o = e == null ? void 0 : e[1];
|
|
434
|
-
if (a || o) {
|
|
435
|
-
Be(), sessionStorage.setItem("pageKey", x.value);
|
|
436
|
-
const t = await z(a, sessionStorage.getItem("systemKey"), "", x.value);
|
|
437
|
-
T.setExtraContents([]);
|
|
438
|
-
const y = sessionStorage.getItem("authority"), u = JSON.parse(y || "");
|
|
439
|
-
if (Array.isArray(u)) {
|
|
440
|
-
const c = Array.isArray(u) && (u == null ? void 0 : u.filter((l) => l == null ? void 0 : l.includes(a))), w = c == null ? void 0 : c.map((l) => {
|
|
441
|
-
var D;
|
|
442
|
-
return ((D = l == null ? void 0 : l.split("/")) == null ? void 0 : D.pop()) || "";
|
|
443
|
-
});
|
|
444
|
-
P.value = a === "/系统管理/用户管理" ? await he(t, w, !1) : t == null ? void 0 : t.map((l) => {
|
|
445
|
-
var D;
|
|
446
|
-
return {
|
|
447
|
-
...l,
|
|
448
|
-
compData: (D = l == null ? void 0 : l.compData) == null ? void 0 : D.map((i) => {
|
|
449
|
-
var C;
|
|
450
|
-
return (i == null ? void 0 : i.key) === "rowButton" || (i == null ? void 0 : i.key) === "extraButton" ? {
|
|
451
|
-
...i,
|
|
452
|
-
contents: (C = i == null ? void 0 : i.contents) == null ? void 0 : C.filter((r) => w == null ? void 0 : w.includes(r == null ? void 0 : r.label))
|
|
453
|
-
} : i;
|
|
454
|
-
})
|
|
455
|
-
};
|
|
456
|
-
});
|
|
457
|
-
} else typeof u == "string" && (u == null ? void 0 : u.toUpperCase()) === "SUPERADMIN" ? P.value = a === "/系统管理/用户管理" ? await he(t, null, !0) : t : P.value = [];
|
|
458
|
-
j.setSelectTitle([]), j.setSelectIndex(""), j.setSelectMenu(""), T.setItemData(P.value), T.setOriginalData(P.value), T.setCurStructureCompIds((n = P.value) == null ? void 0 : n.map((c) => c == null ? void 0 : c.id)), T.setRefreshCurStructure(!1), B.value = x.value.split("/").filter((c) => c !== "").map((c) => ({ value: c.trim() }));
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
immediate: !0
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
const wa = we({
|
|
466
|
-
name: "menu",
|
|
467
|
-
components: {
|
|
468
|
-
ssMenu: $e,
|
|
469
|
-
DynamicIcon: Le
|
|
470
|
-
},
|
|
471
|
-
setup() {
|
|
472
|
-
const e = Me({
|
|
473
|
-
mode: {
|
|
474
|
-
type: String,
|
|
475
|
-
default: "vertical"
|
|
476
|
-
}
|
|
477
|
-
}), a = te(), o = ve(), n = G(0), t = Ve(), { rawMenus: y, menuTriggerType: u, permissionSideMenus: c, platform: w } = L(a);
|
|
478
|
-
L(o);
|
|
479
|
-
const l = De(), { structureData: D } = L(l), i = G([]), C = Q(() => e == null ? void 0 : e.mode);
|
|
480
|
-
let r;
|
|
481
|
-
((s) => {
|
|
482
|
-
s[s.Menu = 0] = "Menu", s[s.FolderOpened = 1] = "FolderOpened";
|
|
483
|
-
})(r || (r = {}));
|
|
484
|
-
const k = (s) => {
|
|
485
|
-
let p = [], S = [];
|
|
486
|
-
return s == null || s.forEach((K) => {
|
|
487
|
-
p = g(K, S);
|
|
488
|
-
}), p;
|
|
489
|
-
}, g = (s, p) => {
|
|
490
|
-
const S = p, K = [];
|
|
491
|
-
s == null || s.forEach((M) => {
|
|
492
|
-
Array.isArray(M) ? K.push({ children: g(M, []) }) : K.push({ title: M });
|
|
493
|
-
});
|
|
494
|
-
let A = K.reduce((M, J) => (Object.entries(J).forEach(([I, E]) => {
|
|
495
|
-
M[I] === void 0 ? E != null && E.title ? M[I] = [E] : M[I] = E : (Array.isArray(M[I]) || (M[I] = [{ title: M[I] }]), E != null && E.title || Array.isArray(E) ? M[I].push(E) : M[I].push({ title: E }));
|
|
496
|
-
}), M), {});
|
|
497
|
-
return A = v(O(A)), S.push(A), Array.isArray(S) && (S == null ? void 0 : S.length) > 1 ? S : S == null ? void 0 : S[0];
|
|
498
|
-
}, v = (s) => {
|
|
499
|
-
var p, S, K;
|
|
500
|
-
return Array.isArray(s == null ? void 0 : s.title) && ((p = s == null ? void 0 : s.title) == null ? void 0 : p.length) === ((K = (S = s == null ? void 0 : s.title) == null ? void 0 : S.filter((A) => A.title)) == null ? void 0 : K.length) ? s == null ? void 0 : s.title : Array.isArray(s == null ? void 0 : s.children) ? h(s) : s;
|
|
501
|
-
}, h = (s) => {
|
|
502
|
-
var S;
|
|
503
|
-
const p = s;
|
|
504
|
-
return p.children = (S = p.children) == null ? void 0 : S.map((K) => {
|
|
505
|
-
var A;
|
|
506
|
-
return (A = K == null ? void 0 : K.title) != null && A.children ? K == null ? void 0 : K.title : K;
|
|
507
|
-
}), p;
|
|
508
|
-
}, f = (s, p = "", S = 0) => {
|
|
509
|
-
var J;
|
|
510
|
-
let K, A = O(s);
|
|
511
|
-
const M = (J = D.value) == null ? void 0 : J.map((I) => {
|
|
512
|
-
var E;
|
|
513
|
-
return (E = I == null ? void 0 : I.key) == null ? void 0 : E.pageKey;
|
|
514
|
-
});
|
|
515
|
-
return Array.isArray(A) || (A = [A]), K = A == null ? void 0 : A.map((I) => {
|
|
516
|
-
const E = p ? `${p}/${I.title}` : I.title, re = {
|
|
517
|
-
...I,
|
|
518
|
-
path: E,
|
|
519
|
-
level: S,
|
|
520
|
-
show: !0,
|
|
521
|
-
icon: r[`${S}`],
|
|
522
|
-
carryData: M == null ? void 0 : M.includes(E),
|
|
523
|
-
// carryData: true,
|
|
524
|
-
isPenultimate: !I.children
|
|
525
|
-
//便于角色授权菜单那里给叶子节点添加按钮节点
|
|
526
|
-
};
|
|
527
|
-
return I.children && I.children.length > 0 && (re.children = f(I.children, E, S + 1)), re;
|
|
528
|
-
}), K;
|
|
529
|
-
}, b = Q(() => {
|
|
530
|
-
let s = f(i.value);
|
|
531
|
-
if (s = [...s, ...c.value], (s == null ? void 0 : s.length) === 0)
|
|
532
|
-
return t.push("/"), [];
|
|
533
|
-
const p = _(s, W.value);
|
|
534
|
-
p.isFlag || (s = p == null ? void 0 : p.data);
|
|
535
|
-
const S = s == null ? void 0 : s.map((K) => ({
|
|
536
|
-
...K,
|
|
537
|
-
children: [],
|
|
538
|
-
childMenus: K.children
|
|
539
|
-
}));
|
|
540
|
-
return w.value === "client" ? (a.setMenus(S), S) : s;
|
|
541
|
-
}), F = (s) => {
|
|
542
|
-
a.setMenuTriggerType("click"), a.setActiveMenuPath(s == null ? void 0 : s.path), w.value === "client" && (s != null && s.childMenus) && a.setAsideMenus([...s.childMenus]), s.isRouter ? t.push(s.path) : t.push("/");
|
|
543
|
-
}, d = (s) => {
|
|
544
|
-
u.value === "click" ? n.value === 1 ? a.setActiveMenuPath(sessionStorage.getItem("pageKey")) : a.setActiveMenuPath(s) : a.setMenuTriggerType("click"), s != null && s.startsWith("/") ? t.push(s) : t.push("/"), n.value++;
|
|
545
|
-
}, N = (s) => {
|
|
546
|
-
a.setActiveMenuPath(s);
|
|
547
|
-
}, U = (s) => {
|
|
548
|
-
const p = document.documentElement;
|
|
549
|
-
s == null || s.forEach((S) => {
|
|
550
|
-
p.style.setProperty(S.name, S.value);
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
Ce(() => {
|
|
554
|
-
n.value = 1;
|
|
555
|
-
});
|
|
556
|
-
const W = Q(() => {
|
|
557
|
-
const s = sessionStorage.getItem("authority");
|
|
558
|
-
return s ? JSON.parse(s) : [];
|
|
559
|
-
});
|
|
560
|
-
ee(() => w.value, (s) => {
|
|
561
|
-
s === "browser" ? U(Re) : s === "client" && (U(_e), U(Je));
|
|
562
|
-
}, { immediate: !0 }), ee(() => y.value, (s) => {
|
|
563
|
-
if (s) {
|
|
564
|
-
const p = s;
|
|
565
|
-
i.value = k(p);
|
|
566
|
-
} else
|
|
567
|
-
a.setActiveMenuPath("");
|
|
568
|
-
}, {
|
|
569
|
-
immediate: !0
|
|
570
|
-
});
|
|
571
|
-
const q = (s, p) => {
|
|
572
|
-
function S(K) {
|
|
573
|
-
K == null || K.forEach((A) => {
|
|
574
|
-
A.show = p == null ? void 0 : p.some((M) => M == null ? void 0 : M.includes(A.path)), A.children && S(A.children);
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
return S(s), s;
|
|
578
|
-
}, _ = (s, p) => {
|
|
579
|
-
if (Array.isArray(p)) {
|
|
580
|
-
const S = Array.from(new Set(p == null ? void 0 : p.map((K) => K.substring(0, K.lastIndexOf("/")))));
|
|
581
|
-
return {
|
|
582
|
-
data: q(s, S),
|
|
583
|
-
isFlag: !1
|
|
584
|
-
};
|
|
585
|
-
} else
|
|
586
|
-
return {
|
|
587
|
-
isFlag: (p == null ? void 0 : p.toUpperCase()) === "SUPERADMIN"
|
|
588
|
-
};
|
|
589
|
-
};
|
|
590
|
-
return {
|
|
591
|
-
mode: C,
|
|
592
|
-
renderMenuList: b,
|
|
593
|
-
clickMenu: F,
|
|
594
|
-
openMenu: d,
|
|
595
|
-
closeMenu: N,
|
|
596
|
-
changeMenuStyle: U
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
export {
|
|
601
|
-
wa as _,
|
|
602
|
-
ga as a,
|
|
603
|
-
pa as b,
|
|
604
|
-
ha as c,
|
|
605
|
-
Ka as d,
|
|
606
|
-
Da as e,
|
|
607
|
-
va as f,
|
|
608
|
-
Sa as g,
|
|
609
|
-
ca as h,
|
|
610
|
-
da as o,
|
|
611
|
-
P as s
|
|
612
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const q=require("vue"),T=require("./index-CrSVdnus.cjs"),x=require("./index-C3UTqVyv.cjs"),O=require("./menu-LlBjM6b8.cjs"),_=require("./cloneDeep-kbsGGN_Q.cjs"),Q=require("./crypto-CRbcEKIz.cjs"),X=require("./index-Gc1epwAE.cjs"),pe=require("./index-Cbj_oJPC.cjs"),fe=require("./index-FX9zIOBz.cjs"),ge=require("./index-V9D4K_Sf.cjs"),ie=require("./modelComp-Af3CYJjb.cjs"),de=require("./array-D-J_e91G.cjs"),De=require("./index-CK7nt4bL.cjs"),ce=require("./login-C0pHH-1V.cjs"),G=require("./index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DI887Xui.cjs"),he=require("vue-router");q.ref([]);const ee=async e=>{let a=[];e==null||e.forEach(o=>{var n;(n=o.compData)==null||n.forEach(t=>{var c;(c=t.contents)==null||c.forEach(u=>{var w,l,v,i;const y=(l=(w=u==null?void 0:u.compData)==null?void 0:w.find(M=>(M==null?void 0:M.key)==="extra"))==null?void 0:l.value;(i=(v=u.compData)==null?void 0:v.filter(M=>(M==null?void 0:M.key)!=="extra"))==null||i.forEach(M=>{var r;(r=x.tableEveryContents(_.cloneDeep(M)))==null||r.forEach(async A=>{var d,S,D,p,U,j,g,R;if(A.comp==="Table"){const N=await T.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:o.name,type:"method",version:1,methodName:(D=(d=o.name)==null?void 0:d.split("/"))==null?void 0:D[((S=o.name)==null?void 0:S.split("/").length)-1],methodKey:(p=Object.values(y[0]))==null?void 0:p[0],parentTable:(A==null?void 0:A.parentTableContents)??""},value:{pageData:{comp:(U=x.tableToStruct(_.cloneDeep(A)))==null?void 0:U.comp,compData:(j=x.tableToStruct(_.cloneDeep(A)))==null?void 0:j.compData,name:(g=x.tableToStruct(_.cloneDeep(A)))==null?void 0:g.name}}}),Y=N.data.result,z=await((R=x.tableToContents(_.cloneDeep(A)))==null?void 0:R.map(async J=>{var K,I;let s;J.length!==0&&(s=await T.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:o.name,type:"methodData",methodKey:(K=Object.values(y[0]))==null?void 0:K[0],tableId:Y},value:{tableData:J}}));const h=(I=(await T.getInsofDataApi({key:{parentTable:J,systemKey:sessionStorage.getItem("systemKey"),pageKey:o.name,type:"method"}})).data.result)==null?void 0:I.map(async C=>await T.updateInsofDataApi({id:C.id,key:{systemKey:C.key.systemKey,pageKey:C.key.pageKey,type:C.key.type,methodKey:C.key.methodKey,parentTable:s.data.result}}));return a.push(h),s}));a.push(N),a.push(z)}})})})})}),await Promise.all(a)},Se=O.useMenuState(),Z=e=>e==null?void 0:e.map(a=>(a.contents&&(a.contents=a.contents.filter(o=>{var n;return((n=o.comp)==null?void 0:n.toUpperCase())!=="CALCULATOR"})),a.compData&&(a.compData=Z(a.compData)),a)),ae=async e=>{var a,o,n,t,c,u,y,w,l,v,i,M,r,A,d,S,D,p,U,j;if(!e){const g=await T.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((a=g==null?void 0:g.data)==null?void 0:a.code)===200&&(t=(n=(o=g==null?void 0:g.data)==null?void 0:o.result)==null?void 0:n[0])!=null&&t.id){const R=(u=(c=g==null?void 0:g.data)==null?void 0:c.result)==null?void 0:u[0],N=(l=(w=(y=g==null?void 0:g.data)==null?void 0:y.result)==null?void 0:w[0])==null?void 0:l.key;N.type="管理系统",await T.updateInsofDataApi({id:R==null?void 0:R.id,key:N})}return}try{const g=await T.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((v=g==null?void 0:g.data)==null?void 0:v.code)===200&&(r=(M=(i=g==null?void 0:g.data)==null?void 0:i.result)==null?void 0:M[0])!=null&&r.id){const R=(d=(A=g==null?void 0:g.data)==null?void 0:A.result)==null?void 0:d[0],N=(p=(D=(S=g==null?void 0:g.data)==null?void 0:S.result)==null?void 0:D[0])==null?void 0:p.key;N.type=(j=(U=e==null?void 0:e[0])==null?void 0:U.contents)==null?void 0:j[0],await T.updateInsofDataApi({id:R==null?void 0:R.id,key:N})}}catch(g){return Promise.reject(g)}},ye=e=>e==null?void 0:e.map(a=>(a.contents&&(a.contents=a.contents.filter(o=>{var n;return((n=o.comp)==null?void 0:n.toUpperCase())==="CALCULATOR"})),a.compData&&(a.compData=ye(a.compData)),a)),se=e=>{const a=ye(e);let o=[];return a==null||a.forEach(n=>{var t;(t=n.compData)!=null&&t.find(c=>{var u;return(u=c==null?void 0:c.contents)==null?void 0:u.find(y=>(y==null?void 0:y.comp)==="calculator")})&&o.push(n)}),o},te=async e=>{var a,o,n,t;try{const c=await T.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu",type:"structure"},value:{pageData:e}});if(((a=c==null?void 0:c.data)==null?void 0:a.code)===200){const u=(n=(o=e==null?void 0:e.compData)==null?void 0:o[0])==null?void 0:n.contents;Se.setRawMenus(u??[])}return(t=c==null?void 0:c.data)==null?void 0:t.code}catch(c){return Promise.reject(c)}},ve=async()=>{var c,u,y,w,l,v;const e=T.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),a=T.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),o=await Promise.all([e,a]),n=o==null?void 0:o[0],t=o==null?void 0:o[1];return{menuExist:((c=n==null?void 0:n.data)==null?void 0:c.result)&&((y=(u=n==null?void 0:n.data)==null?void 0:u.result)==null?void 0:y.length)>0,structureExist:((w=t==null?void 0:t.data)==null?void 0:w.result)&&((v=(l=t==null?void 0:t.data)==null?void 0:l.result)==null?void 0:v.length)>0}},re=async()=>{var e;try{const a=Q.generateKeyPair(),o=await T.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"},value:{cryptoInfo:{publicKey:a.publicKey,privateKey:a.privateKey}}});return((e=o==null?void 0:o.data)==null?void 0:e.code)===200}catch(a){throw a}},Ke=async e=>{var t,c,u,y,w,l,v,i;let a=_.cloneDeep(e);a=[...a,X.tempUserPageData,pe.tempRolePageData,fe.tempDeptPageData,ge.tempPostPageData];const{menuExist:o,structureExist:n}=await ve();if(sessionStorage.getItem("systemKey")&&!o&&!n){const M=(t=Z(a))==null?void 0:t.filter(d=>{var S,D,p;return((S=d==null?void 0:d.comp)==null?void 0:S.toUpperCase())!=="MENU"&&((D=d==null?void 0:d.comp)==null?void 0:D.toUpperCase())!=="MENUTOP"&&((p=d==null?void 0:d.comp)==null?void 0:p.toUpperCase())!=="SYSTEM"}),r=a==null?void 0:a.find(d=>d.comp==="Menu"),A=(c=a==null?void 0:a.find(d=>d.comp==="System"))==null?void 0:c.compData;await te(r),await ae(A),re(),await x.conStructContents(M),await ee((u=se(_.cloneDeep(e)))==null?void 0:u.filter(d=>{var S;return((S=d==null?void 0:d.comp)==null?void 0:S.toUpperCase())!=="MENU"}))}else{const r=(w=(y=(await T.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}})).data.result)==null?void 0:y.filter(p=>{var U;return((U=p==null?void 0:p.key)==null?void 0:U.layer)!=="superAdmin"}))==null?void 0:w.map(p=>p.id),A=r==null?void 0:r.map(async p=>await T.deleteInsofDataApi({id:p}));await Promise.all(A);const d=(l=Z(a))==null?void 0:l.filter(p=>{var U,j,g;return((U=p==null?void 0:p.comp)==null?void 0:U.toUpperCase())!=="MENU"&&((j=p==null?void 0:p.comp)==null?void 0:j.toUpperCase())!=="MENUTOP"&&((g=p==null?void 0:p.comp)==null?void 0:g.toUpperCase())!=="SYSTEM"}),S=a==null?void 0:a.find(p=>p.comp==="Menu"),D=(v=a==null?void 0:a.find(p=>p.comp==="System"))==null?void 0:v.compData;await te(S),await ae(D),re(),await x.conStructContents(d),await ee((i=se(_.cloneDeep(e)))==null?void 0:i.filter(p=>{var U;return((U=p==null?void 0:p.comp)==null?void 0:U.toUpperCase())!=="MENU"}))}},we=ce.useLoginState(),{loginUserInfo:le,cryptoInfo:L}=O.storeToRefs(we),b=ie.useModelComp(T.pinia),{itemData:ne,curStructureCompIds:H,isRefreshCurStructure:Ce}=O.storeToRefs(b),Me=O.useMenuState(T.pinia),{activeMenuPath:$}=O.storeToRefs(Me),F=x.useUnit(T.pinia),{selectIndex:Oe,selectTitle:B}=O.storeToRefs(F),Ae=()=>{b.setIsEdit("edit")},Ie=()=>{b.setIsEdit("view"),b.setRefreshCurStructure(!0)},ke=async e=>{var a;if((e==null?void 0:e.key)==="main"||B.value.length===1)P.value=await x.getItemData($.value,sessionStorage.getItem("systemKey")),F.setSelectIndex(""),F.setSelectMenu(""),F.setSelectTitle([]);else{const o=[],n=(e==null?void 0:e.key)===""||!(e!=null&&e.key)?"":parseInt(e==null?void 0:e.key);P.value=await x.getItemData($.value,sessionStorage.getItem("systemKey"),n);let t=-1;(a=B.value)==null||a.forEach((c,u)=>{(c==null?void 0:c.key)===(e==null?void 0:e.key)&&(t=u),(t===-1||t>=u)&&o.push(c)}),F.setSelectTitle(o),n!==""?F.setSelectMenu(e==null?void 0:e.key):(F.setSelectIndex(""),F.setSelectMenu(""))}b.setItemData(P.value),b.setOriginalData(P.value)},W=async(e,a)=>{var o;try{let n,t;a==="create"?(n={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value,type:"structure",parentTable:"",version:1},value:{pageData:e}},t=T.createInsofDataApi):a==="update"?(n={id:e==null?void 0:e.id,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value,type:"structure",parentTable:"",version:1},value:{pageData:e}},t=T.updateInsofDataApi):a==="delete"&&(n={id:e,key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value,type:"structure",parentTable:"",version:1}},t=T.deleteInsofDataApi);const c=await t(n);return((o=c==null?void 0:c.data)==null?void 0:o.code)===200?c.data.result:(O.ElMessage.success("保存响应失败"),[])}catch{O.ElMessage.success("保存响应失败")}},Te=async()=>{var w;const e=JSON.parse(_.cloneDeep(JSON.stringify(ne.value))),a=e==null?void 0:e.map(l=>l.id),o=a.filter(l=>{var v;return!((v=H.value)!=null&&v.includes(l))}),n=(w=H.value)==null?void 0:w.filter(l=>!a.includes(l)),t=[...o,...n],c=e==null?void 0:e.filter(l=>!l.id),u=e==null?void 0:e.filter(l=>l.id);console.log("clickSavePage0",a,H.value,t),console.log("clickSavePage1",e,ne.value),console.log("clickSavePage2",e),console.log("clickSavePage3",c),console.log("clickSavePage4",u);let y=[];t&&(t==null?void 0:t.length)>0&&(t==null||t.forEach(l=>{l&&y.push(W(l,"delete"))})),c&&(c==null?void 0:c.length)>0&&(c==null||c.forEach(l=>{l&&y.push(W(l,"create"))})),u&&(u==null?void 0:u.length)>0&&(u==null||u.forEach(l=>{a!=null&&a.includes(l.id)&&(console.log("clickSavePage5","包含"),l&&y.push(W(l,"update")))})),Promise.all(y).then(()=>{O.ElMessage.success("保存成功"),b.setRefreshCurStructure(!0)}).catch(l=>{O.ElMessage.success(l)})},Ee=e=>de.getComponent(e),P=q.ref([]),Pe=async(e,a="data")=>{var n,t,c,u,y,w;if((e==null?void 0:e.type)==="delete")await x.deleteTableContents((n=e==null?void 0:e.singleContent)==null?void 0:n.id);else if((e==null?void 0:e.buttonName)==="新增"){let l={};for(let v in e==null?void 0:e.singleContent)v!=="id"&&v!=="index"&&(l[v]=e==null?void 0:e.singleContent[v]);await x.addTableContents(a,$.value,e==null?void 0:e.index,sessionStorage.getItem("systemKey"),Object.values(l),e==null?void 0:e.column)}else if((e==null?void 0:e.buttonName)==="编辑"){let l={},v=(t=e==null?void 0:e.singleContent)==null?void 0:t.id;for(let i in e==null?void 0:e.singleContent)i!=="id"&&i!=="index"&&(l[i]=e==null?void 0:e.singleContent[i]);await x.fixTableContents(a,$.value,e==null?void 0:e.index,v,sessionStorage.getItem("systemKey"),Object.values(l),e==null?void 0:e.column)}let o=(u=(c=B.value)==null?void 0:c[B.value.length-1])!=null&&u.key?parseInt((w=(y=B.value)==null?void 0:y[B.value.length-1])==null?void 0:w.key):"";P.value=await x.getItemData($.value,sessionStorage.getItem("systemKey"),o),b.setItemData(P.value),b.setOriginalData(P.value)},be=async e=>{var o,n;await x.fixFormContents(e==null?void 0:e.index,{comp:"Form",compData:(o=_.cloneDeep(e==null?void 0:e.contents))==null?void 0:o.filter(t=>t.contents),name:""});const a=(n=_.cloneDeep(P.value))==null?void 0:n.map(t=>((t==null?void 0:t.id)===(e==null?void 0:e.index)&&(t.compData=e==null?void 0:e.contents),t));b.setItemData(a),b.setOriginalData(a)},Ue=e=>{P.value=e,b.setItemData(P.value),b.setOriginalData(P.value)},oe=e=>{var a,o,n;return((o=(a=le.value)==null?void 0:a.layer)==null?void 0:o.toUpperCase())==="SUPERADMIN"||((n=le.value)==null?void 0:n.account)===(e==null?void 0:e.account)},ue=async(e,a,o)=>{const n=X.getPageDataAsync("/系统管理/角色管理"),t=X.getPageDataAsync("/系统管理/部门管理");return await Promise.all([n,t]).then(u=>{var l,v;const y=(l=u==null?void 0:u[0])==null?void 0:l.map(i=>({label:i==null?void 0:i.roleName,value:i==null?void 0:i.roleName})),w=(v=u==null?void 0:u[1])==null?void 0:v.map(i=>({label:i==null?void 0:i.deptName,value:i==null?void 0:i.deptName}));return o?e==null?void 0:e.map(i=>{var M;return{...i,compData:(M=i==null?void 0:i.compData)==null?void 0:M.map(r=>{var A,d;return(r==null?void 0:r.key)==="header"?{...r,contents:(A=r==null?void 0:r.contents)==null?void 0:A.map(S=>S.prop==="userDept"?{...S,options:w}:S.prop==="userRoles"?{...S,options:y}:S)}:(r==null?void 0:r.key)==="tableContents"?{...r,contents:(d=r==null?void 0:r.contents)==null?void 0:d.map(S=>{var D;return{...S,password:oe(S)?Q.decryptData(S==null?void 0:S.password,(D=L==null?void 0:L.value)==null?void 0:D.privateKey):S==null?void 0:S.password}})}:r})}}):e==null?void 0:e.map(i=>{var M;return{...i,compData:(M=i==null?void 0:i.compData)==null?void 0:M.map(r=>{var A,d,S;return(r==null?void 0:r.key)==="rowButton"||(r==null?void 0:r.key)==="extraButton"?{...r,contents:(A=r==null?void 0:r.contents)==null?void 0:A.filter(D=>a==null?void 0:a.includes(D==null?void 0:D.label))}:(r==null?void 0:r.key)==="header"?{...r,contents:(d=r==null?void 0:r.contents)==null?void 0:d.map(D=>D.prop==="userDept"?{...D,options:w}:D.prop==="userRoles"?{...D,options:y}:D)}:(r==null?void 0:r.key)==="tableContents"?{...r,contents:(S=r==null?void 0:r.contents)==null?void 0:S.map(D=>{var p;return{...D,password:oe(D)?Q.decryptData(D==null?void 0:D.password,(p=L==null?void 0:L.value)==null?void 0:p.privateKey):D==null?void 0:D.password}})}:r})}})})};q.watch(()=>[$.value,Ce.value],async e=>{var n;const a=e==null?void 0:e[0],o=e==null?void 0:e[1];if(a||o){De.verifyStructureDataToStore(),sessionStorage.setItem("pageKey",$.value);const t=await x.getItemData(a,sessionStorage.getItem("systemKey"),"",$.value);b.setExtraContents([]);const c=sessionStorage.getItem("authority"),u=JSON.parse(c||"");if(Array.isArray(u)){const y=Array.isArray(u)&&(u==null?void 0:u.filter(l=>l==null?void 0:l.includes(a))),w=y==null?void 0:y.map(l=>{var v;return((v=l==null?void 0:l.split("/"))==null?void 0:v.pop())||""});P.value=a==="/系统管理/用户管理"?await ue(t,w,!1):t==null?void 0:t.map(l=>{var v;return{...l,compData:(v=l==null?void 0:l.compData)==null?void 0:v.map(i=>{var M;return(i==null?void 0:i.key)==="rowButton"||(i==null?void 0:i.key)==="extraButton"?{...i,contents:(M=i==null?void 0:i.contents)==null?void 0:M.filter(r=>w==null?void 0:w.includes(r==null?void 0:r.label))}:i})}})}else typeof u=="string"&&(u==null?void 0:u.toUpperCase())==="SUPERADMIN"?P.value=a==="/系统管理/用户管理"?await ue(t,null,!0):t:P.value=[];F.setSelectTitle([]),F.setSelectIndex(""),F.setSelectMenu(""),b.setItemData(P.value),b.setOriginalData(P.value),b.setCurStructureCompIds((n=P.value)==null?void 0:n.map(y=>y==null?void 0:y.id)),b.setRefreshCurStructure(!1),B.value=$.value.split("/").filter(y=>y!=="").map(y=>({value:y.trim()}))}},{immediate:!0});const xe=q.defineComponent({name:"menu",components:{ssMenu:G.ssMenu,DynamicIcon:G._sfc_main$1},setup(){const e=q.defineProps({mode:{type:String,default:"vertical"}}),a=O.useMenuState(),o=ie.useModelComp(),n=q.ref(0),t=he.useRouter(),{rawMenus:c,menuTriggerType:u,permissionSideMenus:y,platform:w}=O.storeToRefs(a);O.storeToRefs(o);const l=ce.useLoginState(),{structureData:v}=O.storeToRefs(l),i=q.ref([]),M=q.computed(()=>e==null?void 0:e.mode);let r;(s=>{s[s.Menu=0]="Menu",s[s.FolderOpened=1]="FolderOpened"})(r||(r={}));const A=s=>{let f=[],h=[];return s==null||s.forEach(K=>{f=d(K,h)}),f},d=(s,f)=>{const h=f,K=[];s==null||s.forEach(C=>{Array.isArray(C)?K.push({children:d(C,[])}):K.push({title:C})});let I=K.reduce((C,V)=>(Object.entries(V).forEach(([k,E])=>{C[k]===void 0?E!=null&&E.title?C[k]=[E]:C[k]=E:(Array.isArray(C[k])||(C[k]=[{title:C[k]}]),E!=null&&E.title||Array.isArray(E)?C[k].push(E):C[k].push({title:E}))}),C),{});return I=S(_.cloneDeep(I)),h.push(I),Array.isArray(h)&&(h==null?void 0:h.length)>1?h:h==null?void 0:h[0]},S=s=>{var f,h,K;return Array.isArray(s==null?void 0:s.title)&&((f=s==null?void 0:s.title)==null?void 0:f.length)===((K=(h=s==null?void 0:s.title)==null?void 0:h.filter(I=>I.title))==null?void 0:K.length)?s==null?void 0:s.title:Array.isArray(s==null?void 0:s.children)?D(s):s},D=s=>{var h;const f=s;return f.children=(h=f.children)==null?void 0:h.map(K=>{var I;return(I=K==null?void 0:K.title)!=null&&I.children?K==null?void 0:K.title:K}),f},p=(s,f="",h=0)=>{var V;let K,I=_.cloneDeep(s);const C=(V=v.value)==null?void 0:V.map(k=>{var E;return(E=k==null?void 0:k.key)==null?void 0:E.pageKey});return Array.isArray(I)||(I=[I]),K=I==null?void 0:I.map(k=>{const E=f?`${f}/${k.title}`:k.title,m={...k,path:E,level:h,show:!0,icon:r[`${h}`],carryData:C==null?void 0:C.includes(E),isPenultimate:!k.children};return k.children&&k.children.length>0&&(m.children=p(k.children,E,h+1)),m}),K},U=q.computed(()=>{let s=p(i.value);if(s=[...s,...y.value],(s==null?void 0:s.length)===0)return t.push("/"),[];const f=J(s,Y.value);f.isFlag||(s=f==null?void 0:f.data);const h=s==null?void 0:s.map(K=>({...K,children:[],childMenus:K.children}));return w.value==="client"?(a.setMenus(h),h):s}),j=s=>{a.setMenuTriggerType("click"),a.setActiveMenuPath(s==null?void 0:s.path),w.value==="client"&&(s!=null&&s.childMenus)&&a.setAsideMenus([...s.childMenus]),s.isRouter?t.push(s.path):t.push("/")},g=s=>{u.value==="click"?n.value===1?a.setActiveMenuPath(sessionStorage.getItem("pageKey")):a.setActiveMenuPath(s):a.setMenuTriggerType("click"),s!=null&&s.startsWith("/")?t.push(s):t.push("/"),n.value++},R=s=>{a.setActiveMenuPath(s)},N=s=>{const f=document.documentElement;s==null||s.forEach(h=>{f.style.setProperty(h.name,h.value)})};q.onMounted(()=>{n.value=1});const Y=q.computed(()=>{const s=sessionStorage.getItem("authority");return s?JSON.parse(s):[]});q.watch(()=>w.value,s=>{s==="browser"?N(G.browserVerticalMenuClasses):s==="client"&&(N(G.clientHorizontalMenuClasses),N(G.clientVerticalMenuClasses))},{immediate:!0}),q.watch(()=>c.value,s=>{if(s){const f=s;i.value=A(f)}else a.setActiveMenuPath("")},{immediate:!0});const z=(s,f)=>{function h(K){K==null||K.forEach(I=>{I.show=f==null?void 0:f.some(C=>C==null?void 0:C.includes(I.path)),I.children&&h(I.children)})}return h(s),s},J=(s,f)=>{if(Array.isArray(f)){const h=Array.from(new Set(f==null?void 0:f.map(K=>K.substring(0,K.lastIndexOf("/")))));return{data:z(s,h),isFlag:!1}}else return{isFlag:(f==null?void 0:f.toUpperCase())==="SUPERADMIN"}};return{mode:M,renderMenuList:U,clickMenu:j,openMenu:g,closeMenu:R,changeMenuStyle:N}}});exports._sfc_main=xe;exports.clickSavePage=Te;exports.getComponents=Ee;exports.onBack=Ie;exports.onChange=Pe;exports.onClick=ke;exports.onContentChange=be;exports.onPageChange=Ue;exports.onSelectFixContent=Ae;exports.savePageDataAsync=Ke;exports.showItems=P;
|