ss-component-new 1.1.237 → 1.1.239

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 (82) hide show
  1. package/dist/{array-DI6hm2O5.cjs → array-D-J_e91G.cjs} +1 -1
  2. package/dist/{array-XiW93OPp.js → array-DAwa7XAV.js} +8 -8
  3. package/dist/{cloneDeep-DD6IIacv.js → cloneDeep-BcK4cO7a.js} +1 -1
  4. package/dist/{cloneDeep-CJYxvbkp.cjs → cloneDeep-kbsGGN_Q.cjs} +1 -1
  5. package/dist/{index-BfFcoIcW.js → index-3g7rW5vQ.js} +1 -1
  6. package/dist/{index-ItBGckSL.cjs → index-5JXCiHw3.cjs} +1 -1
  7. package/dist/{index-BxOh6BEJ.js → index-8hwiS85r.js} +5 -5
  8. package/dist/{index-Ya4rFbSY.cjs → index-B2KK3HzA.cjs} +1 -1
  9. package/dist/{index-DRxCMsAf.js → index-B66Qf5rw.js} +6 -6
  10. package/dist/{index-C0dpqsuW.js → index-B9K0EIpS.js} +5 -5
  11. package/dist/{index-DkotFjz2.js → index-BAWROpdj.js} +1 -1
  12. package/dist/{index-C4DMm-9q.cjs → index-BFPZALXc.cjs} +1 -1
  13. package/dist/{index-DhHo9ub3.js → index-BMrHnCTf.js} +4 -4
  14. package/dist/{index-Bs4dpkna.cjs → index-BOzSvFJA.cjs} +1 -1
  15. package/dist/{index-BYxKXFVW.cjs → index-BUga6nNK.cjs} +1 -1
  16. package/dist/{index-D5HzgxVF.cjs → index-BZHxtM--.cjs} +1 -1
  17. package/dist/{index-DIBaD8Dz.js → index-B_VMMfxb.js} +3 -3
  18. package/dist/{index-D0S1Fwnn.cjs → index-BdiQsOpb.cjs} +1 -1
  19. package/dist/index-Be4n2ecn.js +906 -0
  20. package/dist/{index-CnbFplgw.cjs → index-BhOckTgC.cjs} +1 -1
  21. package/dist/{index-BOcg5OyD.js → index-Bkc0R0j5.js} +89 -93
  22. package/dist/{index-CbTnDm6Y.js → index-BoA0FuEi.js} +7 -7
  23. package/dist/{index-xzKwlwN1.cjs → index-C3UTqVyv.cjs} +11 -11
  24. package/dist/{index-BoGW0rHI.js → index-C7Y_BQCw.js} +7 -7
  25. package/dist/{index-DrDjMudp.js → index-C8nLtJQB.js} +6 -6
  26. package/dist/{index-C6r0D7bs.js → index-CG01yKU1.js} +367 -353
  27. package/dist/{index-lSUKeup-.cjs → index-CK7nt4bL.cjs} +1 -1
  28. package/dist/{index-CJCpFXP6.cjs → index-CQ0bJWFx.cjs} +1 -1
  29. package/dist/{index-DSx-_9X6.cjs → index-CWsALJ8f.cjs} +1 -1
  30. package/dist/{index-BaXDQtLf.cjs → index-Cbj_oJPC.cjs} +1 -1
  31. package/dist/{index-Qvf8lEEi.js → index-CgxSbKBz.js} +4 -4
  32. package/dist/{index-C2Yo86eF.js → index-CiTgFX9o.js} +7 -7
  33. package/dist/{index-Dzd-BSIy.cjs → index-CoH0G-uS.cjs} +1 -1
  34. package/dist/{index-BvPVHCZ9.cjs → index-CrSVdnus.cjs} +1 -1
  35. package/dist/{index-CRFv3mU8.js → index-CrdlZPHq.js} +4 -4
  36. package/dist/{index-Cu4Nrk6I.js → index-D-auhS5f.js} +3 -3
  37. package/dist/{index-CqvUtrx4.cjs → index-D0FNjq6G.cjs} +1 -1
  38. package/dist/{index-XfC1YU_R.cjs → index-D0hUHQHn.cjs} +1 -1
  39. package/dist/{index-BjgJwjU0.js → index-DRcuI2gm.js} +4 -4
  40. package/dist/{index-BP6-wpOt.js → index-DX3jtjLG.js} +3 -3
  41. package/dist/{index-4oU6C2JI.js → index-DcymGmWj.js} +1 -1
  42. package/dist/{index-pdOAGERi.cjs → index-DqLOgQsT.cjs} +1 -1
  43. package/dist/{index-BRtYsist.js → index-DreX5xyP.js} +5 -5
  44. package/dist/{index-Gd5o0mO3.js → index-Du-s_IGe.js} +1 -1
  45. package/dist/{index-DBbaEqVU.cjs → index-DxzvUr7M.cjs} +1 -1
  46. package/dist/{index-Bg25SwqX.cjs → index-FX9zIOBz.cjs} +1 -1
  47. package/dist/{index-BR4fdQ1R.js → index-FaQ9vBep.js} +4 -4
  48. package/dist/{index-rKrFVhox.cjs → index-Gc1epwAE.cjs} +1 -1
  49. package/dist/{index-CCJsj4V5.cjs → index-GlyYi8eO.cjs} +1 -1
  50. package/dist/{index-DI7LyQuc.js → index-NdocPiqA.js} +9 -9
  51. package/dist/{index-DMKQK1ps.js → index-P_6AmAJ6.js} +1 -1
  52. package/dist/{index-_PQG-wQ3.cjs → index-V9D4K_Sf.cjs} +1 -1
  53. package/dist/index-VVRul53o.cjs +1 -0
  54. package/dist/{index-BTwMwAiQ.cjs → index-bC_377mt.cjs} +2 -2
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-DUR36an7.cjs → index.vue_vue_type_script_setup_true_lang-7hOFb1P0.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-CRHsd8hz.js → index.vue_vue_type_script_setup_true_lang-DVmAEsPP.js} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_11cfc8a8_lang-DawuGbvY.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DI887Xui.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_11cfc8a8_lang-CND-nizm.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Rrc8X2Wa.js} +6 -6
  59. package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-CMvvh_Fa.js +612 -0
  60. package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-Df3FKHF1.cjs +1 -0
  61. package/dist/{login-5hYAfzY7.cjs → login-C0pHH-1V.cjs} +1 -1
  62. package/dist/{login-C8oHBbmr.js → login-CbLjVnvi.js} +2 -2
  63. package/dist/{main-B6KpGooi.js → main-DLdZKJUK.js} +6 -6
  64. package/dist/{main-BrPLM7nL.cjs → main-wtI2yJ--.cjs} +1 -1
  65. package/dist/{menu-G9lGQLbm.js → menu-CAlO6ojx.js} +4 -4
  66. package/dist/{menu-BCqnRbPI.cjs → menu-LlBjM6b8.cjs} +3 -3
  67. package/dist/{modelComp-DWhwoJ78.cjs → modelComp-Af3CYJjb.cjs} +1 -1
  68. package/dist/{modelComp-CYG_7mmb.js → modelComp-D9gZ6ZkE.js} +1 -1
  69. package/dist/obj/model.mtl +42 -0
  70. package/dist/obj/model.obj +26110 -0
  71. package/dist/ss-component.cjs +1 -1
  72. package/dist/ss-component.css +2 -2
  73. package/dist/ss-component.js +7 -7
  74. package/dist/ss-component3.cjs +1 -1
  75. package/dist/ss-component3.js +1 -1
  76. package/package.json +1 -1
  77. package/public/obj/model.mtl +42 -0
  78. package/public/obj/model.obj +26110 -0
  79. package/dist/index-BeiMmjtu.js +0 -913
  80. package/dist/index-Ctlqzbp7.cjs +0 -1
  81. package/dist/index.vue_vue_type_style_index_0_scoped_4d31b674_lang-C0YpKhME.cjs +0 -1
  82. package/dist/index.vue_vue_type_style_index_0_scoped_4d31b674_lang-C6BHHnmI.js +0 -563
@@ -1,563 +0,0 @@
1
- import { ref as J, watch as Y, defineComponent as Ke, defineProps as we, computed as W, onMounted as Me } from "vue";
2
- import { c as j, g as V, u as pe, d as de, p as ee } from "./index-Gd5o0mO3.js";
3
- import { b as Ce, c as q, d as Ae, e as te, f as ke, h as Ee, i as Pe, j as Ie, g as he, a as be } from "./index-C6r0D7bs.js";
4
- import { u as ae, s as O, E as G } from "./menu-G9lGQLbm.js";
5
- import { c as I } from "./cloneDeep-DD6IIacv.js";
6
- import { g as Te, d as re } from "./crypto-BRyGpjGR.js";
7
- import { t as Ue, g as le } from "./index-CbTnDm6Y.js";
8
- import { t as Oe } from "./index-BRtYsist.js";
9
- import { t as xe } from "./index-BR4fdQ1R.js";
10
- import { t as Ne } from "./index-BjgJwjU0.js";
11
- import { u as De } from "./modelComp-CYG_7mmb.js";
12
- import { g as me } from "./array-XiW93OPp.js";
13
- import { v as Fe } from "./index-BP6-wpOt.js";
14
- import { u as ve } from "./login-C8oHBbmr.js";
15
- import { a as je, s as Be, b as Le, c as $e, d as Re } from "./index.vue_vue_type_style_index_0_scoped_11cfc8a8_lang-CND-nizm.js";
16
- import { useRouter as _e } from "vue-router";
17
- J([]);
18
- const ie = async (e) => {
19
- let a = [];
20
- e == null || e.forEach((o) => {
21
- var n;
22
- (n = o.compData) == null || n.forEach((r) => {
23
- var y;
24
- (y = r.contents) == null || y.forEach((u) => {
25
- var K, l, D, i;
26
- const f = (l = (K = u == null ? void 0 : u.compData) == null ? void 0 : K.find((p) => (p == null ? void 0 : p.key) === "extra")) == null ? void 0 : l.value;
27
- (i = (D = u.compData) == null ? void 0 : D.filter((p) => (p == null ? void 0 : p.key) !== "extra")) == null || i.forEach((p) => {
28
- var t;
29
- (t = Ce(I(p))) == null || t.forEach(async (k) => {
30
- var v, h, w, T, B, L, $, R;
31
- if (k.comp === "Table") {
32
- const U = await j({
33
- key: {
34
- systemKey: sessionStorage.getItem("systemKey"),
35
- pageKey: o.name,
36
- type: "method",
37
- version: 1,
38
- methodName: (w = (v = o.name) == null ? void 0 : v.split("/")) == null ? void 0 : w[((h = o.name) == null ? void 0 : h.split("/").length) - 1],
39
- methodKey: (T = Object.values(f[0])) == null ? void 0 : T[0],
40
- parentTable: (k == null ? void 0 : k.parentTableContents) ?? ""
41
- },
42
- value: {
43
- pageData: {
44
- comp: (B = q(I(k))) == null ? void 0 : B.comp,
45
- compData: (L = q(I(k))) == null ? void 0 : L.compData,
46
- name: ($ = q(I(k))) == null ? void 0 : $.name
47
- }
48
- }
49
- }), z = U.data.result, H = await ((R = Ae(I(k))) == null ? void 0 : R.map(async (N) => {
50
- var d, M;
51
- let s;
52
- N.length !== 0 && (s = await j({
53
- key: {
54
- systemKey: sessionStorage.getItem("systemKey"),
55
- pageKey: o.name,
56
- type: "methodData",
57
- methodKey: (d = Object.values(f[0])) == null ? void 0 : d[0],
58
- tableId: z
59
- },
60
- value: {
61
- tableData: N
62
- }
63
- }));
64
- const g = (M = (await V({
65
- key: {
66
- parentTable: N,
67
- systemKey: sessionStorage.getItem("systemKey"),
68
- pageKey: o.name,
69
- type: "method"
70
- }
71
- })).data.result) == null ? void 0 : M.map(async (S) => await pe({
72
- id: S.id,
73
- key: {
74
- systemKey: S.key.systemKey,
75
- pageKey: S.key.pageKey,
76
- type: S.key.type,
77
- methodKey: S.key.methodKey,
78
- parentTable: s.data.result
79
- }
80
- }));
81
- return a.push(g), s;
82
- }));
83
- a.push(U), a.push(H);
84
- }
85
- });
86
- });
87
- });
88
- });
89
- }), await Promise.all(a);
90
- }, Je = ae(), Z = (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 = Z(a.compData)), a)), Se = (e) => e == null ? void 0 : e.map((a) => (a.contents && (a.contents = a.contents.filter((o) => {
94
- var n;
95
- return ((n = o.comp) == null ? void 0 : n.toUpperCase()) === "CALCULATOR";
96
- })), a.compData && (a.compData = Se(a.compData)), a)), ne = (e) => {
97
- const a = Se(e);
98
- let o = [];
99
- return a == null || a.forEach((n) => {
100
- var r;
101
- (r = n.compData) != null && r.find((y) => {
102
- var u;
103
- return (u = y == null ? void 0 : y.contents) == null ? void 0 : u.find((f) => (f == null ? void 0 : f.comp) === "calculator");
104
- }) && o.push(n);
105
- }), o;
106
- }, oe = async (e) => {
107
- var a, o, n, r;
108
- try {
109
- const y = await j({
110
- key: {
111
- systemKey: sessionStorage.getItem("systemKey"),
112
- pageKey: "menu",
113
- type: "structure"
114
- },
115
- value: {
116
- pageData: e
117
- }
118
- });
119
- if (((a = y == null ? void 0 : y.data) == null ? void 0 : a.code) === 200) {
120
- const u = (n = (o = e == null ? void 0 : e.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents;
121
- Je.setRawMenus(u ?? []);
122
- }
123
- return (r = y == null ? void 0 : y.data) == null ? void 0 : r.code;
124
- } catch (y) {
125
- return Promise.reject(y);
126
- }
127
- }, Ve = async () => {
128
- var y, u, f, K, l, D;
129
- const e = V({
130
- key: {
131
- systemKey: sessionStorage.getItem("systemKey"),
132
- pageKey: "menu"
133
- }
134
- }), a = V({
135
- key: {
136
- systemKey: sessionStorage.getItem("systemKey"),
137
- type: "structure"
138
- }
139
- }), o = await Promise.all([e, a]), n = o == null ? void 0 : o[0], r = o == null ? void 0 : o[1];
140
- return {
141
- menuExist: ((y = n == null ? void 0 : n.data) == null ? void 0 : y.result) && ((f = (u = n == null ? void 0 : n.data) == null ? void 0 : u.result) == null ? void 0 : f.length) > 0,
142
- structureExist: ((K = r == null ? void 0 : r.data) == null ? void 0 : K.result) && ((D = (l = r == null ? void 0 : r.data) == null ? void 0 : l.result) == null ? void 0 : D.length) > 0
143
- };
144
- }, ue = async () => {
145
- var e;
146
- try {
147
- const a = Te(), o = await j({
148
- key: {
149
- systemKey: sessionStorage.getItem("systemKey"),
150
- pageKey: "secret",
151
- type: "system"
152
- },
153
- value: {
154
- cryptoInfo: {
155
- publicKey: a.publicKey,
156
- privateKey: a.privateKey
157
- }
158
- }
159
- });
160
- return ((e = o == null ? void 0 : o.data) == null ? void 0 : e.code) === 200;
161
- } catch (a) {
162
- throw a;
163
- }
164
- }, ya = async (e) => {
165
- var r, y, u, f, K, l;
166
- let a = I(e);
167
- a = [...a, Ue, Oe, xe, Ne];
168
- const { menuExist: o, structureExist: n } = await Ve();
169
- if (sessionStorage.getItem("systemKey") && !o && !n) {
170
- const D = (r = Z(a)) == null ? void 0 : r.filter((p) => {
171
- var t;
172
- return ((t = p == null ? void 0 : p.comp) == null ? void 0 : t.toUpperCase()) !== "MENU";
173
- }), i = a == null ? void 0 : a.find((p) => p.comp === "Menu");
174
- await oe(i), ue(), await te(D), await ie((y = ne(I(e))) == null ? void 0 : y.filter((p) => {
175
- var t;
176
- return ((t = p == null ? void 0 : p.comp) == null ? void 0 : t.toUpperCase()) !== "MENU";
177
- }));
178
- } else {
179
- const i = (f = (u = (await V({
180
- key: {
181
- systemKey: sessionStorage.getItem("systemKey")
182
- }
183
- })).data.result) == null ? void 0 : u.filter((v) => {
184
- var h;
185
- return ((h = v == null ? void 0 : v.key) == null ? void 0 : h.layer) !== "superAdmin";
186
- })) == null ? void 0 : f.map((v) => v.id), p = i == null ? void 0 : i.map(async (v) => await de({
187
- id: v
188
- }));
189
- await Promise.all(p);
190
- const t = (K = Z(a)) == null ? void 0 : K.filter((v) => {
191
- var h;
192
- return ((h = v == null ? void 0 : v.comp) == null ? void 0 : h.toUpperCase()) !== "MENU";
193
- }), k = a == null ? void 0 : a.find((v) => v.comp === "Menu");
194
- await oe(k), ue(), await te(t), await ie((l = ne(I(e))) == null ? void 0 : l.filter((v) => {
195
- var h;
196
- return ((h = v == null ? void 0 : v.comp) == null ? void 0 : h.toUpperCase()) !== "MENU";
197
- }));
198
- }
199
- }, Ge = ve(), { loginUserInfo: ye, cryptoInfo: x } = O(Ge), E = De(ee), { itemData: fe, curStructureCompIds: Q, isRefreshCurStructure: ze } = O(E), He = ae(ee), { activeMenuPath: b } = O(He), _ = be(ee), { selectIndex: fa, selectTitle: F } = O(_), ca = () => {
200
- E.setIsEdit("edit");
201
- }, ga = () => {
202
- E.setIsEdit("view"), E.setRefreshCurStructure(!0);
203
- }, X = async (e, a) => {
204
- var o;
205
- try {
206
- let n, r;
207
- a === "create" ? (n = {
208
- key: {
209
- systemKey: sessionStorage.getItem("systemKey"),
210
- pageKey: b.value,
211
- type: "structure",
212
- parentTable: "",
213
- version: 1
214
- },
215
- value: {
216
- pageData: e
217
- }
218
- }, r = j) : a === "update" ? (n = {
219
- id: e == null ? void 0 : e.id,
220
- key: {
221
- systemKey: sessionStorage.getItem("systemKey"),
222
- pageKey: b.value,
223
- type: "structure",
224
- parentTable: "",
225
- version: 1
226
- },
227
- value: {
228
- pageData: e
229
- }
230
- }, r = pe) : a === "delete" && (n = {
231
- id: e,
232
- key: {
233
- systemKey: sessionStorage.getItem("systemKey"),
234
- pageKey: b.value,
235
- type: "structure",
236
- parentTable: "",
237
- version: 1
238
- }
239
- }, r = de);
240
- const y = await r(n);
241
- return ((o = y == null ? void 0 : y.data) == null ? void 0 : o.code) === 200 ? y.data.result : (G.success("保存响应失败"), []);
242
- } catch {
243
- G.success("保存响应失败");
244
- }
245
- }, pa = async () => {
246
- var K;
247
- const e = JSON.parse(I(JSON.stringify(fe.value))), a = e == null ? void 0 : e.map((l) => l.id), o = a.filter((l) => {
248
- var D;
249
- return !((D = Q.value) != null && D.includes(l));
250
- }), n = (K = Q.value) == null ? void 0 : K.filter((l) => !a.includes(l)), r = [...o, ...n], y = e == null ? void 0 : e.filter((l) => !l.id), u = e == null ? void 0 : e.filter((l) => l.id);
251
- console.log("clickSavePage0", a, Q.value, r), console.log("clickSavePage1", e, fe.value), console.log("clickSavePage2", e), console.log("clickSavePage3", y), console.log("clickSavePage4", u);
252
- let f = [];
253
- r && (r == null ? void 0 : r.length) > 0 && (r == null || r.forEach((l) => {
254
- l && f.push(X(l, "delete"));
255
- })), y && (y == null ? void 0 : y.length) > 0 && (y == null || y.forEach((l) => {
256
- l && f.push(X(l, "create"));
257
- })), u && (u == null ? void 0 : u.length) > 0 && (u == null || u.forEach((l) => {
258
- a != null && a.includes(l.id) && (console.log("clickSavePage5", "包含"), l && f.push(X(l, "update")));
259
- })), Promise.all(f).then(() => {
260
- G.success("保存成功"), E.setRefreshCurStructure(!0);
261
- }).catch((l) => {
262
- G.success(l);
263
- });
264
- }, da = (e) => me(e), P = J([]), ha = async (e, a = "data") => {
265
- var n, r, y, u, f, K;
266
- if ((e == null ? void 0 : e.type) === "delete")
267
- await Ee((n = e == null ? void 0 : e.singleContent) == null ? void 0 : n.id);
268
- else if ((e == null ? void 0 : e.buttonName) === "新增") {
269
- let l = {};
270
- for (let D in e == null ? void 0 : e.singleContent)
271
- D !== "id" && D !== "index" && (l[D] = e == null ? void 0 : e.singleContent[D]);
272
- await Pe(
273
- a,
274
- b.value,
275
- e == null ? void 0 : e.index,
276
- sessionStorage.getItem("systemKey"),
277
- Object.values(l),
278
- e == null ? void 0 : e.column
279
- );
280
- } else if ((e == null ? void 0 : e.buttonName) === "编辑") {
281
- let l = {}, D = (r = e == null ? void 0 : e.singleContent) == null ? void 0 : r.id;
282
- for (let i in e == null ? void 0 : e.singleContent)
283
- i !== "id" && i !== "index" && (l[i] = e == null ? void 0 : e.singleContent[i]);
284
- await Ie(
285
- a,
286
- b.value,
287
- e == null ? void 0 : e.index,
288
- D,
289
- sessionStorage.getItem("systemKey"),
290
- Object.values(l),
291
- e == null ? void 0 : e.column
292
- );
293
- }
294
- let o = (u = (y = F.value) == null ? void 0 : y[F.value.length - 1]) != null && u.key ? parseInt((K = (f = F.value) == null ? void 0 : f[F.value.length - 1]) == null ? void 0 : K.key) : "";
295
- P.value = await he(b.value, sessionStorage.getItem("systemKey"), o), E.setItemData(P.value), E.setOriginalData(P.value);
296
- }, Da = async (e) => {
297
- var o, n;
298
- await ke(e == null ? void 0 : e.index, {
299
- comp: "Form",
300
- compData: (o = I(e == null ? void 0 : e.contents)) == null ? void 0 : o.filter((r) => r.contents),
301
- name: ""
302
- });
303
- const a = (n = I(P.value)) == null ? void 0 : n.map((r) => ((r == null ? void 0 : r.id) === (e == null ? void 0 : e.index) && (r.compData = e == null ? void 0 : e.contents), r));
304
- E.setItemData(a), E.setOriginalData(a);
305
- }, va = (e) => {
306
- P.value = e, E.setItemData(P.value), E.setOriginalData(P.value);
307
- }, ce = (e) => {
308
- var a, o, n;
309
- return ((o = (a = ye.value) == null ? void 0 : a.layer) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN" || ((n = ye.value) == null ? void 0 : n.account) === (e == null ? void 0 : e.account);
310
- }, ge = async (e, a, o) => {
311
- const n = le("/系统管理/角色管理"), r = le("/系统管理/部门管理");
312
- return await Promise.all([n, r]).then((u) => {
313
- var l, D;
314
- const f = (l = u == null ? void 0 : u[0]) == null ? void 0 : l.map((i) => ({
315
- label: i == null ? void 0 : i.roleName,
316
- value: i == null ? void 0 : i.roleName
317
- })), K = (D = u == null ? void 0 : u[1]) == null ? void 0 : D.map((i) => ({
318
- label: i == null ? void 0 : i.deptName,
319
- value: i == null ? void 0 : i.deptName
320
- }));
321
- return o ? e == null ? void 0 : e.map((i) => {
322
- var p;
323
- return {
324
- ...i,
325
- compData: (p = i == null ? void 0 : i.compData) == null ? void 0 : p.map((t) => {
326
- var k, v;
327
- return (t == null ? void 0 : t.key) === "header" ? {
328
- ...t,
329
- contents: (k = t == null ? void 0 : t.contents) == null ? void 0 : k.map((h) => h.prop === "userDept" ? {
330
- ...h,
331
- options: K
332
- } : h.prop === "userRoles" ? {
333
- ...h,
334
- options: f
335
- } : h)
336
- } : (t == null ? void 0 : t.key) === "tableContents" ? {
337
- ...t,
338
- contents: (v = t == null ? void 0 : t.contents) == null ? void 0 : v.map((h) => {
339
- var w;
340
- return {
341
- ...h,
342
- password: ce(h) ? re(h == null ? void 0 : h.password, (w = x == null ? void 0 : x.value) == null ? void 0 : w.privateKey) : h == null ? void 0 : h.password
343
- };
344
- })
345
- } : t;
346
- })
347
- };
348
- }) : e == null ? void 0 : e.map((i) => {
349
- var p;
350
- return {
351
- ...i,
352
- compData: (p = i == null ? void 0 : i.compData) == null ? void 0 : p.map((t) => {
353
- var k, v, h;
354
- return (t == null ? void 0 : t.key) === "rowButton" || (t == null ? void 0 : t.key) === "extraButton" ? {
355
- ...t,
356
- contents: (k = t == null ? void 0 : t.contents) == null ? void 0 : k.filter((w) => a == null ? void 0 : a.includes(w == null ? void 0 : w.label))
357
- } : (t == null ? void 0 : t.key) === "header" ? {
358
- ...t,
359
- contents: (v = t == null ? void 0 : t.contents) == null ? void 0 : v.map((w) => w.prop === "userDept" ? {
360
- ...w,
361
- options: K
362
- } : w.prop === "userRoles" ? {
363
- ...w,
364
- options: f
365
- } : w)
366
- } : (t == null ? void 0 : t.key) === "tableContents" ? {
367
- ...t,
368
- contents: (h = t == null ? void 0 : t.contents) == null ? void 0 : h.map((w) => {
369
- var T;
370
- return {
371
- ...w,
372
- password: ce(w) ? re(w == null ? void 0 : w.password, (T = x == null ? void 0 : x.value) == null ? void 0 : T.privateKey) : w == null ? void 0 : w.password
373
- };
374
- })
375
- } : t;
376
- })
377
- };
378
- });
379
- });
380
- };
381
- Y(
382
- () => [b.value, ze.value],
383
- async (e) => {
384
- var n;
385
- const a = e == null ? void 0 : e[0], o = e == null ? void 0 : e[1];
386
- if (a || o) {
387
- Fe(), sessionStorage.setItem("pageKey", b.value);
388
- const r = await he(a, sessionStorage.getItem("systemKey"), "", b.value);
389
- E.setExtraContents([]);
390
- const y = sessionStorage.getItem("authority"), u = JSON.parse(y || "");
391
- if (Array.isArray(u)) {
392
- const f = Array.isArray(u) && (u == null ? void 0 : u.filter((l) => l == null ? void 0 : l.includes(a))), K = f == null ? void 0 : f.map((l) => {
393
- var D;
394
- return ((D = l == null ? void 0 : l.split("/")) == null ? void 0 : D.pop()) || "";
395
- });
396
- P.value = a === "/系统管理/用户管理" ? await ge(r, K, !1) : r == null ? void 0 : r.map((l) => {
397
- var D;
398
- return {
399
- ...l,
400
- compData: (D = l == null ? void 0 : l.compData) == null ? void 0 : D.map((i) => {
401
- var p;
402
- return (i == null ? void 0 : i.key) === "rowButton" || (i == null ? void 0 : i.key) === "extraButton" ? {
403
- ...i,
404
- contents: (p = i == null ? void 0 : i.contents) == null ? void 0 : p.filter((t) => K == null ? void 0 : K.includes(t == null ? void 0 : t.label))
405
- } : i;
406
- })
407
- };
408
- });
409
- } else typeof u == "string" && (u == null ? void 0 : u.toUpperCase()) === "SUPERADMIN" ? P.value = a === "/系统管理/用户管理" ? await ge(r, null, !0) : r : P.value = [];
410
- _.setSelectTitle([]), _.setSelectIndex(""), _.setSelectMenu(""), E.setItemData(P.value), E.setOriginalData(P.value), E.setCurStructureCompIds((n = P.value) == null ? void 0 : n.map((f) => f == null ? void 0 : f.id)), E.setRefreshCurStructure(!1), F.value = b.value.split("/").filter((f) => f !== "").map((f) => ({ value: f.trim() }));
411
- }
412
- },
413
- {
414
- immediate: !0
415
- }
416
- );
417
- const Sa = Ke({
418
- name: "menu",
419
- components: {
420
- ssMenu: Be,
421
- DynamicIcon: je
422
- },
423
- setup() {
424
- const e = we({
425
- mode: {
426
- type: String,
427
- default: "vertical"
428
- }
429
- }), a = ae(), o = De(), n = J(0), r = _e(), { rawMenus: y, menuTriggerType: u, permissionSideMenus: f, platform: K } = O(a);
430
- O(o);
431
- const l = ve(), { structureData: D } = O(l), i = J([]), p = W(() => e == null ? void 0 : e.mode);
432
- let t;
433
- ((s) => {
434
- s[s.Menu = 0] = "Menu", s[s.FolderOpened = 1] = "FolderOpened";
435
- })(t || (t = {}));
436
- const k = (s) => {
437
- let c = [], g = [];
438
- return s == null || s.forEach((d) => {
439
- c = v(d, g);
440
- }), c;
441
- }, v = (s, c) => {
442
- const g = c, d = [];
443
- s == null || s.forEach((S) => {
444
- Array.isArray(S) ? d.push({ children: v(S, []) }) : d.push({ title: S });
445
- });
446
- let M = d.reduce((S, m) => (Object.entries(m).forEach(([C, A]) => {
447
- S[C] === void 0 ? A != null && A.title ? S[C] = [A] : S[C] = A : (Array.isArray(S[C]) || (S[C] = [{ title: S[C] }]), A != null && A.title || Array.isArray(A) ? S[C].push(A) : S[C].push({ title: A }));
448
- }), S), {});
449
- return M = h(I(M)), g.push(M), Array.isArray(g) && (g == null ? void 0 : g.length) > 1 ? g : g == null ? void 0 : g[0];
450
- }, h = (s) => {
451
- var c, g, d;
452
- return Array.isArray(s == null ? void 0 : s.title) && ((c = s == null ? void 0 : s.title) == null ? void 0 : c.length) === ((d = (g = s == null ? void 0 : s.title) == null ? void 0 : g.filter((M) => M.title)) == null ? void 0 : d.length) ? s == null ? void 0 : s.title : Array.isArray(s == null ? void 0 : s.children) ? w(s) : s;
453
- }, w = (s) => {
454
- var g;
455
- const c = s;
456
- return c.children = (g = c.children) == null ? void 0 : g.map((d) => {
457
- var M;
458
- return (M = d == null ? void 0 : d.title) != null && M.children ? d == null ? void 0 : d.title : d;
459
- }), c;
460
- }, T = (s, c = "", g = 0) => {
461
- var m;
462
- let d, M = I(s);
463
- const S = (m = D.value) == null ? void 0 : m.map((C) => {
464
- var A;
465
- return (A = C == null ? void 0 : C.key) == null ? void 0 : A.pageKey;
466
- });
467
- return Array.isArray(M) || (M = [M]), d = M == null ? void 0 : M.map((C) => {
468
- const A = c ? `${c}/${C.title}` : C.title, se = {
469
- ...C,
470
- path: A,
471
- level: g,
472
- show: !0,
473
- icon: t[`${g}`],
474
- carryData: S == null ? void 0 : S.includes(A),
475
- // carryData: true,
476
- isPenultimate: !C.children
477
- //便于角色授权菜单那里给叶子节点添加按钮节点
478
- };
479
- return C.children && C.children.length > 0 && (se.children = T(C.children, A, g + 1)), se;
480
- }), d;
481
- }, B = W(() => {
482
- let s = T(i.value);
483
- if (s = [...s, ...f.value], (s == null ? void 0 : s.length) === 0)
484
- return r.push("/"), [];
485
- const c = N(s, z.value);
486
- c.isFlag || (s = c == null ? void 0 : c.data);
487
- const g = s == null ? void 0 : s.map((d) => ({
488
- ...d,
489
- children: [],
490
- childMenus: d.children
491
- }));
492
- return K.value === "client" ? (a.setMenus(g), g) : s;
493
- }), L = (s) => {
494
- a.setMenuTriggerType("click"), a.setActiveMenuPath(s == null ? void 0 : s.path), K.value === "client" && (s != null && s.childMenus) && a.setAsideMenus([...s.childMenus]), s.isRouter ? r.push(s.path) : r.push("/");
495
- }, $ = (s) => {
496
- u.value === "click" ? n.value === 1 ? a.setActiveMenuPath(sessionStorage.getItem("pageKey")) : a.setActiveMenuPath(s) : a.setMenuTriggerType("click"), s != null && s.startsWith("/") ? r.push(s) : r.push("/"), n.value++;
497
- }, R = (s) => {
498
- a.setActiveMenuPath(s);
499
- }, U = (s) => {
500
- const c = document.documentElement;
501
- s == null || s.forEach((g) => {
502
- c.style.setProperty(g.name, g.value);
503
- });
504
- };
505
- Me(() => {
506
- n.value = 1;
507
- });
508
- const z = W(() => {
509
- const s = sessionStorage.getItem("authority");
510
- return s ? JSON.parse(s) : [];
511
- });
512
- Y(() => K.value, (s) => {
513
- s === "browser" ? U(Le) : s === "client" && (U($e), U(Re));
514
- }, { immediate: !0 }), Y(() => y.value, (s) => {
515
- if (s) {
516
- const c = s;
517
- i.value = k(c);
518
- } else
519
- a.setActiveMenuPath("");
520
- }, {
521
- immediate: !0
522
- });
523
- const H = (s, c) => {
524
- function g(d) {
525
- d == null || d.forEach((M) => {
526
- M.show = c == null ? void 0 : c.some((S) => S == null ? void 0 : S.includes(M.path)), M.children && g(M.children);
527
- });
528
- }
529
- return g(s), s;
530
- }, N = (s, c) => {
531
- if (Array.isArray(c)) {
532
- const g = Array.from(new Set(c == null ? void 0 : c.map((d) => d.substring(0, d.lastIndexOf("/")))));
533
- return {
534
- data: H(s, g),
535
- isFlag: !1
536
- };
537
- } else
538
- return {
539
- isFlag: (c == null ? void 0 : c.toUpperCase()) === "SUPERADMIN"
540
- };
541
- };
542
- return {
543
- mode: p,
544
- renderMenuList: B,
545
- clickMenu: L,
546
- openMenu: $,
547
- closeMenu: R,
548
- changeMenuStyle: U
549
- };
550
- }
551
- });
552
- export {
553
- Sa as _,
554
- ca as a,
555
- va as b,
556
- pa as c,
557
- Da as d,
558
- ha as e,
559
- ya as f,
560
- da as g,
561
- ga as o,
562
- P as s
563
- };