ss-component-new 1.1.510 → 1.1.511
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-BTjyzwbz.js → array-6rfRfZoy.js} +1 -1
- package/dist/{array-T-glopHk.cjs → array-BKzrrmWD.cjs} +2 -2
- package/dist/{index-BqlWuQ7F.cjs → index-3GfpOmBm.cjs} +1 -1
- package/dist/index-9keTbNci.js +1490 -0
- package/dist/{index-BPe56KwL.js → index-B72kja43.js} +12 -13
- package/dist/{index-B3sFb3ED.js → index-BBFJJ4tl.js} +5 -5
- package/dist/index-BBQKck4p.cjs +1 -0
- package/dist/index-BBQrfTQg.cjs +1 -0
- package/dist/index-BDmXVjP1.cjs +1 -0
- package/dist/{index-BC6o_HwA.js → index-BPQ17KYZ.js} +1 -1
- package/dist/{index-OUNz_X1-.js → index-BSC7EQfO.js} +15 -15
- package/dist/{index-B6WyqdEq.js → index-BY-71neG.js} +27 -28
- package/dist/{index-pWCRQCtH.cjs → index-BdCeB39f.cjs} +1 -1
- package/dist/{index-0Aj-6Pfy.cjs → index-Bk9CevKt.cjs} +3 -3
- package/dist/{index-WupiV34P.js → index-Bsluws3x.js} +1 -1
- package/dist/{index-D-3H8d48.js → index-Btfqm3Aj.js} +16 -17
- package/dist/index-Bw7fhgWa.js +186 -0
- package/dist/{index-BrZj-udo.js → index-Bz3SW9qv.js} +6 -6
- package/dist/{index--d0-FcKi.js → index-C-RVIq7e.js} +3 -3
- package/dist/{index-BcRfxlOl.cjs → index-C3G2rcyE.cjs} +1 -1
- package/dist/{index-18OPgy7M.js → index-C3Lo66u2.js} +4 -4
- package/dist/index-C8zdykvt.cjs +1 -0
- package/dist/{index-D9fT9K4k.js → index-COMGfNcR.js} +3 -3
- package/dist/index-CRSpuXYg.cjs +1 -0
- package/dist/index-CT9N59g0.cjs +1 -0
- package/dist/{index-cyR-UE9m.cjs → index-CbWlMlxi.cjs} +1 -1
- package/dist/{index-DXv077SA.cjs → index-Cd0szVvZ.cjs} +1 -1
- package/dist/{index-C17_NPz0.cjs → index-Ci1hpo3R.cjs} +1 -1
- package/dist/{index-JqG9oXli.js → index-CmUqS1hN.js} +1 -1
- package/dist/{index-MDG-_61i.js → index-CqmGUncB.js} +3 -3
- package/dist/index-D42emtHS.cjs +1 -0
- package/dist/{index-qlszF_bh.js → index-D5AYFKTM.js} +2 -2
- package/dist/{index-B-3rJW5B.cjs → index-D8QyJVl9.cjs} +1 -1
- package/dist/{index-Dx6aORao.cjs → index-D9ZIJbHw.cjs} +12 -12
- package/dist/{index-C5akdWTB.js → index-DF8AKNJv.js} +16 -17
- package/dist/index-DGHLPooK.js +457 -0
- package/dist/{index-BeUJWi0x.js → index-DLfWd1qr.js} +5 -5
- package/dist/index-DQxqAo5T.cjs +1 -0
- package/dist/index-DRXd1T3-.cjs +1 -0
- package/dist/{index-TnYimoKI.cjs → index-DgsMW7lK.cjs} +1 -1
- package/dist/{index-B35jXtRb.js → index-DnGhhxPP.js} +5 -5
- package/dist/{index-pxmLD5OC.cjs → index-Dw520ieR.cjs} +1 -1
- package/dist/{index-uN3j6KsS.cjs → index-Dy4AlOOz.cjs} +1 -1
- package/dist/{index-DNQe9fKA.js → index-DzjXzyVN.js} +1 -1
- package/dist/{index-OYYGU2YE.js → index-LCDlyiVS.js} +4 -4
- package/dist/index-NJKX8un9.js +3995 -0
- package/dist/{index-DYRVEBa9.js → index-NkBocgtR.js} +111 -112
- package/dist/{index-55yBsyRr.cjs → index-Oixs__9V.cjs} +1 -1
- package/dist/{index-Dh39r6dj.cjs → index-XKC9uwi7.cjs} +1 -1
- package/dist/{index-DtUmPH3r.cjs → index-YT4yRM1k.cjs} +1 -1
- package/dist/{index-CRkYxnL4.cjs → index-lZj2FVM-.cjs} +1 -1
- package/dist/{index-DwMyURBu.js → index-t25R8oz_.js} +9 -9
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dzi9C_6v.js → index.vue_vue_type_script_setup_true_lang-D0IUrek5.js} +40 -40
- package/dist/{index.vue_vue_type_script_setup_true_lang-CGZnYRAf.cjs → index.vue_vue_type_script_setup_true_lang-DWwRe3NO.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js} +9343 -9713
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs} +86 -86
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-9V0_8cmZ.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js} +15 -15
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B-GFoPJ9.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2bfU2M4.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BFaKxxEb.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BSG1ySNA.js → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js} +9759 -9781
- package/dist/{login-CW3Tv6wk.cjs → login-BHMBhU8d.cjs} +1 -1
- package/dist/{login-Bb_Ovfvl.js → login-CROQ1_RU.js} +4 -4
- package/dist/{main-DeaRuNYD.js → main-1yb7Pay5.js} +7 -8
- package/dist/main-DkeO8sGR.cjs +1 -0
- package/dist/{menu-jWcM5fkr.js → menu-BPLW-L8U.js} +3946 -3581
- package/dist/menu-CQ3_ZXwC.cjs +21 -0
- package/dist/menuIndex-BJdEj1Et.cjs +1 -0
- package/dist/menuIndex-BsKyxgvr.js +60 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-wPuQL8yW.js → threeModel-CFiMikXU.js} +1 -1
- package/dist/{threeModel-BqKggjkf.cjs → threeModel-Cz-eN53p.cjs} +1 -1
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-BOOCIUn8.js → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js} +2 -2
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index--3QjFI9W.cjs +0 -1
- package/dist/index-BgL0yfT5.cjs +0 -1
- package/dist/index-BkKYXjJ0.cjs +0 -1
- package/dist/index-Bpt6Hcq2.cjs +0 -1
- package/dist/index-CI__ZdC-.cjs +0 -1
- package/dist/index-CPfseYEB.cjs +0 -1
- package/dist/index-CZN1K7bK.js +0 -408
- package/dist/index-Cdxp_a8K.js +0 -185
- package/dist/index-CxS1YyFs.cjs +0 -1
- package/dist/index-DXIV-OAV.cjs +0 -1
- package/dist/index-DY4cro4C.js +0 -3995
- package/dist/index-DtsLJPQK.js +0 -1493
- package/dist/index-qHbYDYso.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Cek8Ghpc.cjs +0 -56
- package/dist/main-BrbcMu5X.cjs +0 -1
- package/dist/menu-BXTfsfTB.cjs +0 -21
- package/dist/menuIndex-BWim3TlH.js +0 -33
- package/dist/menuIndex-Cg6xI-jR.cjs +0 -1
package/dist/index-CZN1K7bK.js
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { ref as u, computed as E, reactive as T, nextTick as R, watch as N } from "vue";
|
|
2
|
-
import { bA as $, g as x, s as A, E as k, bx as j, bv as Q, by as V, u as q, p as K } from "./menu-jWcM5fkr.js";
|
|
3
|
-
import { u as G } from "./login-Bb_Ovfvl.js";
|
|
4
|
-
import { c as C } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js";
|
|
5
|
-
const H = $("authorityState", {
|
|
6
|
-
state: () => ({
|
|
7
|
-
routerPageStructures: []
|
|
8
|
-
}),
|
|
9
|
-
actions: {
|
|
10
|
-
setRouterPageStructure(a) {
|
|
11
|
-
this.routerPageStructures = a;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}), J = q(K), { activeMenuPath: h } = A(J), F = G(K), { structureData: X } = A(F), Y = H(K), { routerPageStructures: Z } = A(Y), m = u([
|
|
15
|
-
{
|
|
16
|
-
label: "角色名称",
|
|
17
|
-
value: "",
|
|
18
|
-
name: "roleName"
|
|
19
|
-
}
|
|
20
|
-
]), tt = u([
|
|
21
|
-
{
|
|
22
|
-
label: "查询"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "重置"
|
|
26
|
-
}
|
|
27
|
-
]), M = T({
|
|
28
|
-
isFilter: !1,
|
|
29
|
-
filterForm: {}
|
|
30
|
-
}), et = u(!1), at = (a) => {
|
|
31
|
-
console.log("handleQueryChange", a), M.isFilter = !0, M.filterForm = a;
|
|
32
|
-
}, w = u([
|
|
33
|
-
// {
|
|
34
|
-
// key: "extraButton",
|
|
35
|
-
// contents: [
|
|
36
|
-
// {
|
|
37
|
-
// label: "新增"
|
|
38
|
-
// }
|
|
39
|
-
// ]
|
|
40
|
-
// },
|
|
41
|
-
// {
|
|
42
|
-
// key: "rowButton",
|
|
43
|
-
// contents: [
|
|
44
|
-
// {
|
|
45
|
-
// label: "授权",
|
|
46
|
-
// textColor: `blue`
|
|
47
|
-
// }, {
|
|
48
|
-
// label: "编辑"
|
|
49
|
-
// },
|
|
50
|
-
// {
|
|
51
|
-
// label: "删除",
|
|
52
|
-
// textColor: 'red'
|
|
53
|
-
// }
|
|
54
|
-
// ]
|
|
55
|
-
// },
|
|
56
|
-
// // {
|
|
57
|
-
// // key: "tableIndex",
|
|
58
|
-
// // contents: []
|
|
59
|
-
// // },
|
|
60
|
-
// {
|
|
61
|
-
// key: "header",
|
|
62
|
-
// contents: [
|
|
63
|
-
// {
|
|
64
|
-
// label: "角色名称",
|
|
65
|
-
// prop: 'roleName'
|
|
66
|
-
// },
|
|
67
|
-
// {
|
|
68
|
-
// label: "角色状态",
|
|
69
|
-
// formType: 'Radio',
|
|
70
|
-
// prop: 'roleStatus',
|
|
71
|
-
// options: [
|
|
72
|
-
// {
|
|
73
|
-
// label: "启用",
|
|
74
|
-
// value: "启用"
|
|
75
|
-
// },
|
|
76
|
-
// {
|
|
77
|
-
// label: "禁用",
|
|
78
|
-
// value: "禁用"
|
|
79
|
-
// }
|
|
80
|
-
// ]
|
|
81
|
-
// },
|
|
82
|
-
// {
|
|
83
|
-
// label: "角色排序",
|
|
84
|
-
// prop: 'roleOrder',
|
|
85
|
-
// formType: 'Number',
|
|
86
|
-
// }, {
|
|
87
|
-
// label: "备注",
|
|
88
|
-
// prop: 'remark',
|
|
89
|
-
// formType: 'TextArea',
|
|
90
|
-
// }, {
|
|
91
|
-
// label: "权限",
|
|
92
|
-
// prop: 'roleAuthority',
|
|
93
|
-
// isTableColHidden: true,
|
|
94
|
-
// isFormColHidden: true,
|
|
95
|
-
// },
|
|
96
|
-
// {
|
|
97
|
-
// label: "操作"
|
|
98
|
-
// }
|
|
99
|
-
// ]
|
|
100
|
-
// },
|
|
101
|
-
// {
|
|
102
|
-
// key: "tableContents",
|
|
103
|
-
// contents: []
|
|
104
|
-
// // contents: [
|
|
105
|
-
// // [
|
|
106
|
-
// // "超级管理员",
|
|
107
|
-
// // "启动",
|
|
108
|
-
// // 1,
|
|
109
|
-
// // []
|
|
110
|
-
// // // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
|
|
111
|
-
// // ], [
|
|
112
|
-
// // "普通管理员",
|
|
113
|
-
// // "启动",
|
|
114
|
-
// // 2,
|
|
115
|
-
// // []
|
|
116
|
-
// // // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
|
|
117
|
-
// // ],
|
|
118
|
-
// // ]
|
|
119
|
-
// }
|
|
120
|
-
]), O = u([]), st = E(() => {
|
|
121
|
-
var t, s, e, c, l;
|
|
122
|
-
const a = (t = Z.value) == null ? void 0 : t.find((n) => {
|
|
123
|
-
var r;
|
|
124
|
-
return ((r = n == null ? void 0 : n.comp) == null ? void 0 : r.toUpperCase()) === "TABLE";
|
|
125
|
-
});
|
|
126
|
-
return a ? (O.value = (c = (e = (s = a == null ? void 0 : a.compData) == null ? void 0 : s.find((n) => (n == null ? void 0 : n.key) === "header")) == null ? void 0 : e.contents) == null ? void 0 : c.filter((n) => (n == null ? void 0 : n.label) !== "操作"), (l = a == null ? void 0 : a.compData) == null ? void 0 : l.map((n) => {
|
|
127
|
-
if ((n == null ? void 0 : n.key) === "rowButton") {
|
|
128
|
-
const r = [...n == null ? void 0 : n.contents, { label: "授权" }];
|
|
129
|
-
return {
|
|
130
|
-
...n,
|
|
131
|
-
contents: r
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
return n;
|
|
135
|
-
})) : [];
|
|
136
|
-
}), nt = (a) => {
|
|
137
|
-
I(a.singleContent, a.buttonName, b.value);
|
|
138
|
-
}, P = u({}), S = u(), p = async (a, t, s) => {
|
|
139
|
-
var e, c;
|
|
140
|
-
try {
|
|
141
|
-
const l = await a(t);
|
|
142
|
-
return ((e = l == null ? void 0 : l.data) == null ? void 0 : e.code) === 200 ? (s !== "查询" && await F.setLogRecordAsync({
|
|
143
|
-
type: s,
|
|
144
|
-
data: t
|
|
145
|
-
}, h.value), l.data.result || ((c = l == null ? void 0 : l.data) == null ? void 0 : c.code) === 200) : null;
|
|
146
|
-
} catch (l) {
|
|
147
|
-
k.error(l);
|
|
148
|
-
}
|
|
149
|
-
}, L = (a, t) => {
|
|
150
|
-
t == null || t.forEach((s) => {
|
|
151
|
-
a == null || a.forEach((e) => {
|
|
152
|
-
var c;
|
|
153
|
-
e.path == s.path && (e.checkedButtons = s.checkedButtons), e.children && ((c = e.children) == null ? void 0 : c.length) > 0 && L(e.children, t);
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
}, _ = (a) => a == null ? void 0 : a.map((t) => {
|
|
157
|
-
var e;
|
|
158
|
-
const s = {
|
|
159
|
-
...t,
|
|
160
|
-
checkedButtons: []
|
|
161
|
-
};
|
|
162
|
-
return s.children && ((e = s.children) == null ? void 0 : e.length) > 0 && (s.children = _(s.children)), s;
|
|
163
|
-
}), ct = async (a, t) => {
|
|
164
|
-
switch (P.value = C(t), a) {
|
|
165
|
-
case "授权":
|
|
166
|
-
y.title = `【${t.roleName}】授权`, y.show = !0, await R(), t.roleAuthority && Array.isArray(t.roleAuthority) && L(v.value, t.roleAuthority);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
}, lt = () => {
|
|
170
|
-
y.show = !1;
|
|
171
|
-
}, d = u(), rt = async (a) => {
|
|
172
|
-
const t = await p(x, {
|
|
173
|
-
key: {
|
|
174
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
175
|
-
type: "data",
|
|
176
|
-
pageKey: a
|
|
177
|
-
}
|
|
178
|
-
}, "查询"), s = t == null ? void 0 : t.map((e) => {
|
|
179
|
-
var c;
|
|
180
|
-
return {
|
|
181
|
-
id: e.id,
|
|
182
|
-
tableData: (c = e == null ? void 0 : e.value) == null ? void 0 : c.tableData
|
|
183
|
-
};
|
|
184
|
-
});
|
|
185
|
-
return s == null ? void 0 : s.map((e) => {
|
|
186
|
-
var c;
|
|
187
|
-
if (Array.isArray(e == null ? void 0 : e.tableData)) {
|
|
188
|
-
let l = { id: e.id };
|
|
189
|
-
return (c = e == null ? void 0 : e.tableData) == null || c.forEach((n, r) => {
|
|
190
|
-
l[`a${r}`] = n;
|
|
191
|
-
}), l;
|
|
192
|
-
} else
|
|
193
|
-
return {
|
|
194
|
-
...e.tableData,
|
|
195
|
-
id: e.id
|
|
196
|
-
};
|
|
197
|
-
});
|
|
198
|
-
}, ut = (a, t) => {
|
|
199
|
-
let s = {};
|
|
200
|
-
return t == null || t.forEach((e, c) => {
|
|
201
|
-
e.label && a && (s[e.label] = (a == null ? void 0 : a[`a${c}`]) ?? null);
|
|
202
|
-
}), s;
|
|
203
|
-
}, ot = (a) => {
|
|
204
|
-
let t = "";
|
|
205
|
-
for (const s in a)
|
|
206
|
-
if (a.hasOwnProperty(s)) {
|
|
207
|
-
const e = a[s];
|
|
208
|
-
Array.isArray(e) && e.forEach((c) => {
|
|
209
|
-
c.hasOwnProperty("checkedButtons") && (t = s);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
return t;
|
|
213
|
-
}, I = (a, t, s) => {
|
|
214
|
-
var n, r, i, f;
|
|
215
|
-
const e = C(a);
|
|
216
|
-
e != null && e.id && delete e.id;
|
|
217
|
-
const c = ut(e, O.value), l = ot(e);
|
|
218
|
-
console.log(1222, e, l, b.value), t === "新增" ? p(j, {
|
|
219
|
-
key: {
|
|
220
|
-
type: "data",
|
|
221
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
222
|
-
pageKey: (n = h.value) != null && n.startsWith("/") ? (r = h.value) == null ? void 0 : r.substring(1) : h.value,
|
|
223
|
-
tableId: s
|
|
224
|
-
},
|
|
225
|
-
value: {
|
|
226
|
-
tableData: c
|
|
227
|
-
}
|
|
228
|
-
}, t).then((o) => {
|
|
229
|
-
d.value = {
|
|
230
|
-
...a,
|
|
231
|
-
newId: o
|
|
232
|
-
}, t && o && k.success(t + "成功");
|
|
233
|
-
}) : t === "编辑" ? (console.log("编辑角色", c), p(Q, {
|
|
234
|
-
id: a.id,
|
|
235
|
-
key: {
|
|
236
|
-
type: "data",
|
|
237
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
238
|
-
pageKey: (i = h.value) != null && i.startsWith("/") ? (f = h.value) == null ? void 0 : f.substring(1) : h.value,
|
|
239
|
-
tableId: s
|
|
240
|
-
},
|
|
241
|
-
value: {
|
|
242
|
-
tableData: c
|
|
243
|
-
}
|
|
244
|
-
}, t).then((o) => {
|
|
245
|
-
t && o && k.success(t + "成功"), y.show = !1;
|
|
246
|
-
})) : t === "删除" && p(V, {
|
|
247
|
-
id: a.id
|
|
248
|
-
}, t).then((o) => {
|
|
249
|
-
t && o && k.success(t + "成功");
|
|
250
|
-
});
|
|
251
|
-
}, z = (a) => {
|
|
252
|
-
let t = [];
|
|
253
|
-
return a == null || a.forEach((s) => {
|
|
254
|
-
var e;
|
|
255
|
-
if (s.checkedButtons && ((e = s.checkedButtons) == null ? void 0 : e.length) > 0) {
|
|
256
|
-
const c = {
|
|
257
|
-
path: s.path,
|
|
258
|
-
checkedButtons: s.checkedButtons
|
|
259
|
-
// isCheckedAll: node.checkedButtons?.length === node.renderButtons?.length
|
|
260
|
-
};
|
|
261
|
-
t = t.concat(c);
|
|
262
|
-
}
|
|
263
|
-
s.children && (t = t.concat(z(s.children)));
|
|
264
|
-
}), t;
|
|
265
|
-
}, ht = () => {
|
|
266
|
-
d.value = {
|
|
267
|
-
...P.value,
|
|
268
|
-
roleAuthority: z(v.value)
|
|
269
|
-
// ['a' + authorityIndex]: checkedKeys
|
|
270
|
-
}, R(() => {
|
|
271
|
-
console.log("clickSubmitAuthority", d.value, w.value), I(d.value, "编辑", b.value);
|
|
272
|
-
});
|
|
273
|
-
}, y = T({
|
|
274
|
-
show: !1,
|
|
275
|
-
title: "角色授权",
|
|
276
|
-
width: "35%",
|
|
277
|
-
draggable: !0
|
|
278
|
-
}), it = ({ isPenultimate: a }, t) => {
|
|
279
|
-
var s, e;
|
|
280
|
-
return console.log("isPenultimate", a, t), ((e = (s = t == null ? void 0 : t.data) == null ? void 0 : s.renderButtons) == null ? void 0 : e.length) > 0 ? "is-penultimate" : "";
|
|
281
|
-
}, b = u(0), gt = async () => {
|
|
282
|
-
var s, e, c, l, n, r, i;
|
|
283
|
-
let a;
|
|
284
|
-
const t = await x({
|
|
285
|
-
key: {
|
|
286
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
287
|
-
type: "structure",
|
|
288
|
-
// 路由页面路径前缀会有/,但存储数据或获取数据时是要过滤掉/
|
|
289
|
-
pageKey: (s = h.value) != null && s.startsWith("/") ? (e = h.value) == null ? void 0 : e.substring(1) : h.value
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
return ((c = t == null ? void 0 : t.data) == null ? void 0 : c.code) === 200 && (l = t == null ? void 0 : t.data) != null && l.result && ((n = t == null ? void 0 : t.data) == null ? void 0 : n.result.length) > 0 && (a = (i = (r = t == null ? void 0 : t.data.result) == null ? void 0 : r[0]) == null ? void 0 : i.id), a;
|
|
293
|
-
}, v = u([]), yt = u([
|
|
294
|
-
{
|
|
295
|
-
path: "资源管理",
|
|
296
|
-
buttons: ["查询", "新增", "编辑", "删除"]
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
path: "资源管理/人员",
|
|
300
|
-
buttons: ["查询", "新增", "编辑", "删除"]
|
|
301
|
-
}
|
|
302
|
-
]), ft = (a, t) => {
|
|
303
|
-
var s;
|
|
304
|
-
a.checkedButtons = t ? (s = a.renderButtons) == null ? void 0 : s.map((e) => e.path) : [], console.log("handleNodeCheckChange", a, t);
|
|
305
|
-
}, g = u([]), pt = (a, t) => {
|
|
306
|
-
var s, e, c;
|
|
307
|
-
t.checkedButtons = a, ((s = t.checkedButtons) == null ? void 0 : s.length) === ((e = t.renderButtons) == null ? void 0 : e.length) ? g.value.push(t.path) : (a == null ? void 0 : a.length) === 0 && (g.value = (c = g.value) == null ? void 0 : c.filter((l) => l !== t.path));
|
|
308
|
-
};
|
|
309
|
-
N(() => g.value.length, () => {
|
|
310
|
-
var t, s;
|
|
311
|
-
const a = (t = S.value) == null ? void 0 : t.getCheckedKeys();
|
|
312
|
-
console.log(112, g.value, a), (s = S.value) == null || s.setCheckedKeys([...g.value]);
|
|
313
|
-
});
|
|
314
|
-
N(() => y.show, (a) => {
|
|
315
|
-
a || (v.value = _(v.value));
|
|
316
|
-
});
|
|
317
|
-
const B = E(() => {
|
|
318
|
-
var s;
|
|
319
|
-
const a = (s = C(X.value)) == null ? void 0 : s.filter((e) => {
|
|
320
|
-
var c, l;
|
|
321
|
-
return ((l = (c = e == null ? void 0 : e.key) == null ? void 0 : c.pageKey) == null ? void 0 : l.toUpperCase()) !== "MENU";
|
|
322
|
-
});
|
|
323
|
-
return [...a == null ? void 0 : a.map((e) => {
|
|
324
|
-
var n, r, i, f;
|
|
325
|
-
const c = /button/i;
|
|
326
|
-
let l = (i = (r = (n = e == null ? void 0 : e.value) == null ? void 0 : n.pageData) == null ? void 0 : r.compData) == null ? void 0 : i.filter((o) => c.test(o == null ? void 0 : o.key));
|
|
327
|
-
return l = Array.from(
|
|
328
|
-
new Set(l == null ? void 0 : l.flatMap((o) => o.contents.map((W) => W.label)))
|
|
329
|
-
), {
|
|
330
|
-
path: (f = e == null ? void 0 : e.key) == null ? void 0 : f.pageKey,
|
|
331
|
-
buttons: l
|
|
332
|
-
};
|
|
333
|
-
}), ...U.value];
|
|
334
|
-
}), U = u([]), D = (a, t) => {
|
|
335
|
-
if (Array.isArray(a))
|
|
336
|
-
return a == null ? void 0 : a.map((s) => {
|
|
337
|
-
var c, l;
|
|
338
|
-
const e = t == null ? void 0 : t.find((n) => (n == null ? void 0 : n.path) === (s == null ? void 0 : s.path));
|
|
339
|
-
return s.childMenus && s.childMenus.length > 0 ? {
|
|
340
|
-
...s,
|
|
341
|
-
renderButtons: s.carryData ? (c = e == null ? void 0 : e.buttons) == null ? void 0 : c.map((n) => ({
|
|
342
|
-
title: n,
|
|
343
|
-
path: s.path + "/" + n
|
|
344
|
-
})) : [],
|
|
345
|
-
checkedButtons: [],
|
|
346
|
-
children: D(s.childMenus, B.value),
|
|
347
|
-
childMenus: D(s.childMenus, B.value)
|
|
348
|
-
} : {
|
|
349
|
-
...s,
|
|
350
|
-
renderButtons: s.carryData ? (l = e == null ? void 0 : e.buttons) == null ? void 0 : l.map((n) => ({
|
|
351
|
-
title: n,
|
|
352
|
-
path: s.path + "/" + n
|
|
353
|
-
})) : [],
|
|
354
|
-
checkedButtons: []
|
|
355
|
-
};
|
|
356
|
-
});
|
|
357
|
-
}, dt = {
|
|
358
|
-
comp: "Group",
|
|
359
|
-
name: "/系统管理/角色管理",
|
|
360
|
-
compData: [
|
|
361
|
-
{
|
|
362
|
-
key: "groupContents",
|
|
363
|
-
contents: [
|
|
364
|
-
{
|
|
365
|
-
comp: "Table",
|
|
366
|
-
compData: w.value,
|
|
367
|
-
name: ""
|
|
368
|
-
}
|
|
369
|
-
]
|
|
370
|
-
}
|
|
371
|
-
]
|
|
372
|
-
}, Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
373
|
-
__proto__: null,
|
|
374
|
-
addButtonsToTree: D,
|
|
375
|
-
authorizeDialog: y,
|
|
376
|
-
buttonValue: tt,
|
|
377
|
-
changedRow: d,
|
|
378
|
-
clickRow: P,
|
|
379
|
-
clickRowButton: ct,
|
|
380
|
-
clickSubmitAuthority: ht,
|
|
381
|
-
closeAuthorizeDialog: lt,
|
|
382
|
-
customNodeClass: it,
|
|
383
|
-
getActivePageStructureId: gt,
|
|
384
|
-
getPageDataAsync: rt,
|
|
385
|
-
handleItemDataChange: nt,
|
|
386
|
-
handleNodeBtnChange: pt,
|
|
387
|
-
handleNodeCheckChange: ft,
|
|
388
|
-
handleQueryChange: at,
|
|
389
|
-
handleSubmitAsync: p,
|
|
390
|
-
isPageDataExist: et,
|
|
391
|
-
menuData: v,
|
|
392
|
-
menusButtons: yt,
|
|
393
|
-
pageData: w,
|
|
394
|
-
pageDataFiltered: st,
|
|
395
|
-
queryFormData: m,
|
|
396
|
-
structureButtons: B,
|
|
397
|
-
structureId: b,
|
|
398
|
-
submitTableAsyncByVerify: I,
|
|
399
|
-
tempRolePageData: dt,
|
|
400
|
-
tempSysMenus: U,
|
|
401
|
-
treeRef: S
|
|
402
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
403
|
-
export {
|
|
404
|
-
Bt as S,
|
|
405
|
-
y as a,
|
|
406
|
-
gt as g,
|
|
407
|
-
H as u
|
|
408
|
-
};
|
package/dist/index-Cdxp_a8K.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { ref as p, computed as m } from "vue";
|
|
2
|
-
import { s as v, E as u, bx as M, bv as D, by as U, g as _, u as L, p as f } from "./menu-jWcM5fkr.js";
|
|
3
|
-
import { a as N, u as O } from "./index-CZN1K7bK.js";
|
|
4
|
-
import { d as E, i as j, e as B } from "./crypto-BRyGpjGR.js";
|
|
5
|
-
import { u as z } from "./login-Bb_Ovfvl.js";
|
|
6
|
-
import { E as Q } from "./index-DYRVEBa9.js";
|
|
7
|
-
import { c as W } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js";
|
|
8
|
-
const P = z(f), { superAdminInfo: q, cryptoInfo: o } = v(P), w = L(f), { activeMenuPath: l } = v(w), d = "123456", F = O(f), { routerPageStructures: G } = v(F), b = p(0), J = p([
|
|
9
|
-
{
|
|
10
|
-
label: "用户名称",
|
|
11
|
-
value: "",
|
|
12
|
-
name: "userName"
|
|
13
|
-
}
|
|
14
|
-
]), i = m(() => {
|
|
15
|
-
const s = sessionStorage.getItem("isSuperAdmin");
|
|
16
|
-
return s ? JSON.parse(s) : !1;
|
|
17
|
-
}), V = (s) => {
|
|
18
|
-
console.log("handleQueryChange", s);
|
|
19
|
-
}, y = m(() => {
|
|
20
|
-
var a, r;
|
|
21
|
-
const s = (a = G.value) == null ? void 0 : a.find((e) => {
|
|
22
|
-
var n;
|
|
23
|
-
return ((n = e == null ? void 0 : e.comp) == null ? void 0 : n.toUpperCase()) === "TABLE";
|
|
24
|
-
});
|
|
25
|
-
return s ? (r = s == null ? void 0 : s.compData) == null ? void 0 : r.map((e) => {
|
|
26
|
-
if ((e == null ? void 0 : e.key) === "rowButton") {
|
|
27
|
-
const n = [...e == null ? void 0 : e.contents, { label: "重置密码" }];
|
|
28
|
-
return {
|
|
29
|
-
...e,
|
|
30
|
-
contents: n
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return e;
|
|
34
|
-
}) : [];
|
|
35
|
-
}), $ = (s) => {
|
|
36
|
-
h(s.singleContent, s.buttonName, b.value);
|
|
37
|
-
}, g = p(), H = (s) => {
|
|
38
|
-
console.log("onDoubleClick", s);
|
|
39
|
-
}, X = (s, a) => {
|
|
40
|
-
s === "重置密码" && Q.confirm(
|
|
41
|
-
`该操作将会重置【${a == null ? void 0 : a.account}】的密码,确认重置?`,
|
|
42
|
-
"警告",
|
|
43
|
-
{
|
|
44
|
-
confirmButtonText: "确认",
|
|
45
|
-
cancelButtonText: "取消",
|
|
46
|
-
type: "warning"
|
|
47
|
-
}
|
|
48
|
-
).then(() => {
|
|
49
|
-
g.value = {
|
|
50
|
-
...a,
|
|
51
|
-
password: d
|
|
52
|
-
}, h(g.value, s, b.value);
|
|
53
|
-
}).catch(() => {
|
|
54
|
-
u.info("取消重置");
|
|
55
|
-
});
|
|
56
|
-
}, x = () => {
|
|
57
|
-
I(l.value).then((s) => {
|
|
58
|
-
var r;
|
|
59
|
-
const a = Array.isArray(s) && (s == null ? void 0 : s.filter((e) => (e == null ? void 0 : e.account) !== q.value.account));
|
|
60
|
-
y.value = (r = y.value) == null ? void 0 : r.map((e) => e.key === "tableContents" ? {
|
|
61
|
-
...e,
|
|
62
|
-
// 不显示超管
|
|
63
|
-
contents: a == null ? void 0 : a.map((n) => {
|
|
64
|
-
var t;
|
|
65
|
-
return {
|
|
66
|
-
...n,
|
|
67
|
-
// 登录用户是超管才给解密
|
|
68
|
-
// password: loginUserIsSuper.value ? decryptData(d?.password, cryptoInfo?.value?.privateKey) : d?.password
|
|
69
|
-
password: E(n == null ? void 0 : n.password, (t = o == null ? void 0 : o.value) == null ? void 0 : t.privateKey)
|
|
70
|
-
};
|
|
71
|
-
})
|
|
72
|
-
} : e);
|
|
73
|
-
});
|
|
74
|
-
}, c = async (s, a, r) => {
|
|
75
|
-
var e, n;
|
|
76
|
-
try {
|
|
77
|
-
const t = await s(a);
|
|
78
|
-
return ((e = t == null ? void 0 : t.data) == null ? void 0 : e.code) === 200 ? (r !== "查询" && await P.setLogRecordAsync({
|
|
79
|
-
type: r,
|
|
80
|
-
data: a
|
|
81
|
-
}, l.value), t.data.result || ((n = t == null ? void 0 : t.data) == null ? void 0 : n.code) === 200) : null;
|
|
82
|
-
} catch (t) {
|
|
83
|
-
u.error(t);
|
|
84
|
-
}
|
|
85
|
-
}, h = (s, a, r) => {
|
|
86
|
-
var n, t, S, A, K, k;
|
|
87
|
-
const e = W(s);
|
|
88
|
-
e != null && e.id && delete e.id, j() && e && (!e.password && i.value ? e.password = B(d, (n = o == null ? void 0 : o.value) == null ? void 0 : n.publicKey) : e.password && i.value && (e.password = B(e == null ? void 0 : e.password, (t = o == null ? void 0 : o.value) == null ? void 0 : t.publicKey))), a === "新增" ? c(M, {
|
|
89
|
-
key: {
|
|
90
|
-
type: "data",
|
|
91
|
-
layer: e == null ? void 0 : e.layer,
|
|
92
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
93
|
-
pageKey: (S = l.value) != null && S.startsWith("/") ? (A = l.value) == null ? void 0 : A.substring(1) : l.value,
|
|
94
|
-
tableId: r
|
|
95
|
-
},
|
|
96
|
-
value: {
|
|
97
|
-
tableData: e
|
|
98
|
-
}
|
|
99
|
-
}, a).then((C) => {
|
|
100
|
-
var T;
|
|
101
|
-
g.value = {
|
|
102
|
-
...s,
|
|
103
|
-
newId: C,
|
|
104
|
-
password: i.value ? E((s == null ? void 0 : s.password) ?? d, (T = o == null ? void 0 : o.value) == null ? void 0 : T.privateKey) : s == null ? void 0 : s.password
|
|
105
|
-
}, a && C && u.success(a + "成功");
|
|
106
|
-
}) : a === "编辑" || a === "重置密码" ? c(D, {
|
|
107
|
-
id: s.id,
|
|
108
|
-
key: {
|
|
109
|
-
type: "data",
|
|
110
|
-
layer: e == null ? void 0 : e.layer,
|
|
111
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
112
|
-
pageKey: (K = l.value) != null && K.startsWith("/") ? (k = l.value) == null ? void 0 : k.substring(1) : l.value,
|
|
113
|
-
tableId: r
|
|
114
|
-
},
|
|
115
|
-
value: {
|
|
116
|
-
tableData: e
|
|
117
|
-
}
|
|
118
|
-
}, a).then(() => {
|
|
119
|
-
a === "重置密码" && x(), a && u.success(a + "成功"), N.show = !1;
|
|
120
|
-
}) : a === "删除" && c(U, {
|
|
121
|
-
id: s.id
|
|
122
|
-
}, a).then(() => {
|
|
123
|
-
a && u.success(a + "成功");
|
|
124
|
-
});
|
|
125
|
-
}, I = async (s) => {
|
|
126
|
-
const a = await c(_, {
|
|
127
|
-
key: {
|
|
128
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
129
|
-
type: "data",
|
|
130
|
-
pageKey: s
|
|
131
|
-
}
|
|
132
|
-
}, "查询"), r = a == null ? void 0 : a.map((e) => {
|
|
133
|
-
var n, t;
|
|
134
|
-
return {
|
|
135
|
-
id: e.id,
|
|
136
|
-
layer: (n = e.key) == null ? void 0 : n.layer,
|
|
137
|
-
tableData: (t = e == null ? void 0 : e.value) == null ? void 0 : t.tableData
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
return r == null ? void 0 : r.map((e) => {
|
|
141
|
-
var n;
|
|
142
|
-
if (!Array.isArray(e == null ? void 0 : e.tableData)) return {
|
|
143
|
-
...e.tableData,
|
|
144
|
-
layer: (n = e.key) == null ? void 0 : n.layer,
|
|
145
|
-
id: e.id
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
}, Y = {
|
|
149
|
-
comp: "Group",
|
|
150
|
-
name: "/系统管理/用户管理",
|
|
151
|
-
compData: [
|
|
152
|
-
{
|
|
153
|
-
key: "groupContents",
|
|
154
|
-
contents: [
|
|
155
|
-
{
|
|
156
|
-
comp: "Table",
|
|
157
|
-
compData: y.value,
|
|
158
|
-
name: ""
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
164
|
-
__proto__: null,
|
|
165
|
-
changedRow: g,
|
|
166
|
-
clickRowButton: X,
|
|
167
|
-
getPageDataAsync: I,
|
|
168
|
-
handleItemDataChange: $,
|
|
169
|
-
handleQueryChange: V,
|
|
170
|
-
handleSubmitAsync: c,
|
|
171
|
-
loginUserIsSuper: i,
|
|
172
|
-
onDoubleClick: H,
|
|
173
|
-
pageData: y,
|
|
174
|
-
queryFormData: J,
|
|
175
|
-
refreshUserTableData: x,
|
|
176
|
-
structureId: b,
|
|
177
|
-
submitTableAsyncByVerify: h,
|
|
178
|
-
tempUserPageData: Y
|
|
179
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
180
|
-
export {
|
|
181
|
-
re as S,
|
|
182
|
-
I as g,
|
|
183
|
-
c as h,
|
|
184
|
-
h as s
|
|
185
|
-
};
|
package/dist/index-CxS1YyFs.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),u=require("./menu-BXTfsfTB.cjs"),O=require("./login-CW3Tv6wk.cjs"),B=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs"),P=u.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(a){this.routerPageStructures=a}}}),q=u.useMenuState(u.pinia),{activeMenuPath:i}=u.storeToRefs(q),M=O.useLoginState(u.pinia),{structureData:z}=u.storeToRefs(M),L=P(u.pinia),{routerPageStructures:U}=u.storeToRefs(L),W=l.ref([{label:"角色名称",value:"",name:"roleName"}]),$=l.ref([{label:"查询"},{label:"重置"}]),I=l.reactive({isFilter:!1,filterForm:{}}),j=l.ref(!1),Q=a=>{console.log("handleQueryChange",a),I.isFilter=!0,I.filterForm=a},K=l.ref([]),T=l.ref([]),V=l.computed(()=>{var e,s,t,c,r;const a=(e=U.value)==null?void 0:e.find(n=>{var o;return((o=n==null?void 0:n.comp)==null?void 0:o.toUpperCase())==="TABLE"});return a?(T.value=(c=(t=(s=a==null?void 0:a.compData)==null?void 0:s.find(n=>(n==null?void 0:n.key)==="header"))==null?void 0:t.contents)==null?void 0:c.filter(n=>(n==null?void 0:n.label)!=="操作"),(r=a==null?void 0:a.compData)==null?void 0:r.map(n=>{if((n==null?void 0:n.key)==="rowButton"){const o=[...n==null?void 0:n.contents,{label:"授权"}];return{...n,contents:o}}return n})):[]}),G=a=>{w(a.singleContent,a.buttonName,b.value)},C=l.ref({}),D=l.ref(),p=async(a,e,s)=>{var t,c;try{const r=await a(e);return((t=r==null?void 0:r.data)==null?void 0:t.code)===200?(s!=="查询"&&await M.setLogRecordAsync({type:s,data:e},i.value),r.data.result||((c=r==null?void 0:r.data)==null?void 0:c.code)===200):null}catch(r){u.ElMessage.error(r)}},E=(a,e)=>{e==null||e.forEach(s=>{a==null||a.forEach(t=>{var c;t.path==s.path&&(t.checkedButtons=s.checkedButtons),t.children&&((c=t.children)==null?void 0:c.length)>0&&E(t.children,e)})})},_=a=>a==null?void 0:a.map(e=>{var t;const s={...e,checkedButtons:[]};return s.children&&((t=s.children)==null?void 0:t.length)>0&&(s.children=_(s.children)),s}),H=async(a,e)=>{switch(C.value=B.cloneDeep(e),a){case"授权":f.title=`【${e.roleName}】授权`,f.show=!0,await l.nextTick(),e.roleAuthority&&Array.isArray(e.roleAuthority)&&E(k.value,e.roleAuthority);break}},J=()=>{f.show=!1},v=l.ref(),X=async a=>{const e=await p(u.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:a}},"查询"),s=e==null?void 0:e.map(t=>{var c;return{id:t.id,tableData:(c=t==null?void 0:t.value)==null?void 0:c.tableData}});return s==null?void 0:s.map(t=>{var c;if(Array.isArray(t==null?void 0:t.tableData)){let r={id:t.id};return(c=t==null?void 0:t.tableData)==null||c.forEach((n,o)=>{r[`a${o}`]=n}),r}else return{...t.tableData,id:t.id}})},Y=(a,e)=>{let s={};return e==null||e.forEach((t,c)=>{t.label&&a&&(s[t.label]=(a==null?void 0:a[`a${c}`])??null)}),s},Z=a=>{let e="";for(const s in a)if(a.hasOwnProperty(s)){const t=a[s];Array.isArray(t)&&t.forEach(c=>{c.hasOwnProperty("checkedButtons")&&(e=s)})}return e},w=(a,e,s)=>{var n,o,g,d;const t=B.cloneDeep(a);t!=null&&t.id&&delete t.id;const c=Y(t,T.value),r=Z(t);console.log(1222,t,r,b.value),e==="新增"?p(u.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(n=i.value)!=null&&n.startsWith("/")?(o=i.value)==null?void 0:o.substring(1):i.value,tableId:s},value:{tableData:c}},e).then(h=>{v.value={...a,newId:h},e&&h&&u.ElMessage.success(e+"成功")}):e==="编辑"?(console.log("编辑角色",c),p(u.updateInsofDataApi,{id:a.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(g=i.value)!=null&&g.startsWith("/")?(d=i.value)==null?void 0:d.substring(1):i.value,tableId:s},value:{tableData:c}},e).then(h=>{e&&h&&u.ElMessage.success(e+"成功"),f.show=!1})):e==="删除"&&p(u.deleteInsofDataApi,{id:a.id},e).then(h=>{e&&h&&u.ElMessage.success(e+"成功")})},R=a=>{let e=[];return a==null||a.forEach(s=>{var t;if(s.checkedButtons&&((t=s.checkedButtons)==null?void 0:t.length)>0){const c={path:s.path,checkedButtons:s.checkedButtons};e=e.concat(c)}s.children&&(e=e.concat(R(s.children)))}),e},m=()=>{v.value={...C.value,roleAuthority:R(k.value)},l.nextTick(()=>{console.log("clickSubmitAuthority",v.value,K.value),w(v.value,"编辑",b.value)})},f=l.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),ee=({isPenultimate:a},e)=>{var s,t;return console.log("isPenultimate",a,e),((t=(s=e==null?void 0:e.data)==null?void 0:s.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},b=l.ref(0),x=async()=>{var s,t,c,r,n,o,g;let a;const e=await u.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:(s=i.value)!=null&&s.startsWith("/")?(t=i.value)==null?void 0:t.substring(1):i.value}});return((c=e==null?void 0:e.data)==null?void 0:c.code)===200&&(r=e==null?void 0:e.data)!=null&&r.result&&((n=e==null?void 0:e.data)==null?void 0:n.result.length)>0&&(a=(g=(o=e==null?void 0:e.data.result)==null?void 0:o[0])==null?void 0:g.id),a},k=l.ref([]),te=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),ae=(a,e)=>{var s;a.checkedButtons=e?(s=a.renderButtons)==null?void 0:s.map(t=>t.path):[],console.log("handleNodeCheckChange",a,e)},y=l.ref([]),se=(a,e)=>{var s,t,c;e.checkedButtons=a,((s=e.checkedButtons)==null?void 0:s.length)===((t=e.renderButtons)==null?void 0:t.length)?y.value.push(e.path):(a==null?void 0:a.length)===0&&(y.value=(c=y.value)==null?void 0:c.filter(r=>r!==e.path))};l.watch(()=>y.value.length,()=>{var e,s;const a=(e=D.value)==null?void 0:e.getCheckedKeys();console.log(112,y.value,a),(s=D.value)==null||s.setCheckedKeys([...y.value])});l.watch(()=>f.show,a=>{a||(k.value=_(k.value))});const S=l.computed(()=>{var s;const a=(s=B.cloneDeep(z.value))==null?void 0:s.filter(t=>{var c,r;return((r=(c=t==null?void 0:t.key)==null?void 0:c.pageKey)==null?void 0:r.toUpperCase())!=="MENU"});return[...a==null?void 0:a.map(t=>{var n,o,g,d;const c=/button/i;let r=(g=(o=(n=t==null?void 0:t.value)==null?void 0:n.pageData)==null?void 0:o.compData)==null?void 0:g.filter(h=>c.test(h==null?void 0:h.key));return r=Array.from(new Set(r==null?void 0:r.flatMap(h=>h.contents.map(F=>F.label)))),{path:(d=t==null?void 0:t.key)==null?void 0:d.pageKey,buttons:r}}),...N.value]}),N=l.ref([]),A=(a,e)=>{if(Array.isArray(a))return a==null?void 0:a.map(s=>{var c,r;const t=e==null?void 0:e.find(n=>(n==null?void 0:n.path)===(s==null?void 0:s.path));return s.childMenus&&s.childMenus.length>0?{...s,renderButtons:s.carryData?(c=t==null?void 0:t.buttons)==null?void 0:c.map(n=>({title:n,path:s.path+"/"+n})):[],checkedButtons:[],children:A(s.childMenus,S.value),childMenus:A(s.childMenus,S.value)}:{...s,renderButtons:s.carryData?(r=t==null?void 0:t.buttons)==null?void 0:r.map(n=>({title:n,path:s.path+"/"+n})):[],checkedButtons:[]}})},ne={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:K.value,name:""}]}]},ce=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:A,authorizeDialog:f,buttonValue:$,changedRow:v,clickRow:C,clickRowButton:H,clickSubmitAuthority:m,closeAuthorizeDialog:J,customNodeClass:ee,getActivePageStructureId:x,getPageDataAsync:X,handleItemDataChange:G,handleNodeBtnChange:se,handleNodeCheckChange:ae,handleQueryChange:Q,handleSubmitAsync:p,isPageDataExist:j,menuData:k,menusButtons:te,pageData:K,pageDataFiltered:V,queryFormData:W,structureButtons:S,structureId:b,submitTableAsyncByVerify:w,tempRolePageData:ne,tempSysMenus:N,treeRef:D},Symbol.toStringTag,{value:"Module"}));exports.State=ce;exports.authorizeDialog=f;exports.getActivePageStructureId=x;exports.useAuthorityState=P;
|