ss-component-new 1.1.119 → 1.1.121
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-BfXzoZuw.cjs → array-CXhFwwqo.cjs} +1 -1
- package/dist/{array-Rt8vZZgS.js → array-GKiq_tn9.js} +8 -8
- package/dist/{cloneDeep-AJHaze0Q.cjs → cloneDeep-tQf7WEs8.cjs} +1 -1
- package/dist/{cloneDeep-CG42CRoY.js → cloneDeep-vZFEDRrU.js} +1 -1
- package/dist/{index-Pp2SqEvW.js → index-0UA233-u.js} +5 -5
- package/dist/index-1YFwWhIC.cjs +1 -0
- package/dist/index-B6iYjA8R.cjs +1 -0
- package/dist/{index-D8EQPlwQ.js → index-BXwd1P4x.js} +5 -5
- package/dist/{index-C8Sr0m-k.cjs → index-BdcBWc99.cjs} +1 -1
- package/dist/{index-JV0bV7aS.js → index-Bhm8MhJf.js} +1 -1
- package/dist/{index-Bneh-d87.cjs → index-BpKjooqU.cjs} +1 -1
- package/dist/{index-B02p06Uu.js → index-CE7jgmab.js} +23 -23
- package/dist/{index-2cCe1h3s.cjs → index-CFrbpfv0.cjs} +1 -1
- package/dist/index-CJ1zMvM-.cjs +1 -0
- package/dist/index-CM3HIKOQ.js +328 -0
- package/dist/index-CSFiZEGP.js +405 -0
- package/dist/{index-WcYE0gzv.js → index-CXDfgoDy.js} +4 -4
- package/dist/{index-JCuqH3EV.js → index-CYO_2UDB.js} +1 -1
- package/dist/index-CqCD6Ycw.cjs +1 -0
- package/dist/{index-BA9r1DVV.js → index-CrN82Jcz.js} +6 -6
- package/dist/{index-BStRxBZo.cjs → index-D14rmyEv.cjs} +1 -1
- package/dist/{index-TH_grXXp.cjs → index-DJjZ5Toi.cjs} +1 -1
- package/dist/{index-BqCHck8R.js → index-DXryG-nG.js} +16 -17
- package/dist/index-Det__boR.cjs +1 -0
- package/dist/index-DfmdUHnV.js +445 -0
- package/dist/index-Dm1zenUu.cjs +1 -0
- package/dist/{index-D6suk1qF.cjs → index-Du-CR9HQ.cjs} +1 -1
- package/dist/{index-ss5hP712.js → index-DzARWpFJ.js} +65 -63
- package/dist/{index-I9GdBlNM.cjs → index-EV28Lju3.cjs} +1 -1
- package/dist/{index-MYE0Ps6S.js → index-VcwAdA78.js} +17 -17
- package/dist/{index-DUD1sIy_.cjs → index-h8YlWO3M.cjs} +1 -1
- package/dist/index-iOl5iPFq.cjs +1 -0
- package/dist/{index-DBpjodSJ.js → index-pF_8OJOJ.js} +1 -1
- package/dist/{index-J-UlU6hy.js → index-q-zIPTnT.js} +1 -1
- package/dist/{index-DE0RJ8x8.js → index-q0VupmyF.js} +7 -8
- package/dist/index-y0RxrCA_.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-90CEE-zx.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-CvWM7pc-.js +226 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-DnIwwvfQ.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CVZbqzna.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-duTu15ER.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Cem7_S_Q.js} +6 -6
- package/dist/login-BVmf8RMZ.cjs +1 -0
- package/dist/login-CChMyF5j.js +88 -0
- package/dist/{main-C2Qwlouf.js → main-ChxgD0Un.js} +6 -6
- package/dist/{main-CLAEvgNn.cjs → main-DYXrqtiX.cjs} +1 -1
- package/dist/{menu-Bu4rY1Z6.cjs → menu-CS1eT20u.cjs} +1 -1
- package/dist/{menu-CXUDwcTB.js → menu-wU4DAZfH.js} +1 -1
- package/dist/{modelComp-NLIx45uR.js → modelComp-d1h-HYNv.js} +1 -1
- package/dist/{modelComp-CEMqvvoP.cjs → modelComp-pHwtS2H5.cjs} +1 -1
- package/dist/{request-CYTCJJX1.js → request-BeuBq-N8.js} +1 -1
- package/dist/{request-DT8-iZQF.cjs → request-C1So2YgV.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-B8OJ5UJ-.cjs +0 -1
- package/dist/index-BORDIYLf.js +0 -383
- package/dist/index-BY2B9vbX.cjs +0 -1
- package/dist/index-BsiXXt_k.cjs +0 -1
- package/dist/index-CLrKbKzP.cjs +0 -1
- package/dist/index-CoSGMwbd.js +0 -432
- package/dist/index-DEmXLfH7.cjs +0 -1
- package/dist/index-DNX-9j0I.cjs +0 -1
- package/dist/index-Dala1Ccm.cjs +0 -1
- package/dist/index-DcDOyAh5.js +0 -312
- package/dist/index-GC2tJM_6.cjs +0 -1
- package/dist/index-Gn42GooV.js +0 -35
- package/dist/index-ZOKJGEsG.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-ChOsIeWs.js +0 -209
- package/dist/index.vue_vue_type_style_index_0_scoped_77dec451_lang-M1FWDMWO.cjs +0 -1
- package/dist/login-BXka-5zt.js +0 -53
- package/dist/login-DROx9m1u.cjs +0 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { ref as c, computed as A, reactive as I, nextTick as K, watch as N } from "vue";
|
|
2
|
+
import { s as m, E as C, u as P } from "./menu-wU4DAZfH.js";
|
|
3
|
+
import { g as F, c as M, a as O, d as j, u as _ } from "./login-CChMyF5j.js";
|
|
4
|
+
import { c as B } from "./cloneDeep-vZFEDRrU.js";
|
|
5
|
+
const z = P(), { activeMenuPath: w } = m(z), Q = _(), { structureData: U } = m(Q), V = c([
|
|
6
|
+
{
|
|
7
|
+
label: "角色名称",
|
|
8
|
+
value: "",
|
|
9
|
+
name: "roleName"
|
|
10
|
+
}
|
|
11
|
+
]), $ = c([
|
|
12
|
+
{
|
|
13
|
+
label: "查询"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "重置"
|
|
17
|
+
}
|
|
18
|
+
]), S = I({
|
|
19
|
+
isFilter: !1,
|
|
20
|
+
filterForm: {}
|
|
21
|
+
}), q = c(!1), H = (n) => {
|
|
22
|
+
console.log("handleQueryChange", n), S.isFilter = !0, S.filterForm = n;
|
|
23
|
+
}, r = c([
|
|
24
|
+
{
|
|
25
|
+
key: "extraButton",
|
|
26
|
+
contents: [
|
|
27
|
+
{
|
|
28
|
+
label: "新增"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "rowButton",
|
|
34
|
+
contents: [
|
|
35
|
+
{
|
|
36
|
+
label: "授权",
|
|
37
|
+
textColor: "blue"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "编辑"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: "删除",
|
|
44
|
+
textColor: "red"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "tableIndex",
|
|
50
|
+
contents: []
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "header",
|
|
54
|
+
contents: [
|
|
55
|
+
{
|
|
56
|
+
label: "角色名称",
|
|
57
|
+
prop: "roleName"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "角色状态",
|
|
61
|
+
formType: "Radio",
|
|
62
|
+
prop: "roleStatus",
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
label: "启用",
|
|
66
|
+
value: "启用"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "禁用",
|
|
70
|
+
value: "禁用"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: "角色排序",
|
|
76
|
+
prop: "roleOrder",
|
|
77
|
+
formType: "Number"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: "权限",
|
|
81
|
+
prop: "roleAuthority",
|
|
82
|
+
isHidden: !0
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "操作"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key: "tableContents"
|
|
91
|
+
// contents: [
|
|
92
|
+
// [
|
|
93
|
+
// "超级管理员",
|
|
94
|
+
// "启动",
|
|
95
|
+
// 1,
|
|
96
|
+
// []
|
|
97
|
+
// // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
|
|
98
|
+
// ], [
|
|
99
|
+
// "普通管理员",
|
|
100
|
+
// "启动",
|
|
101
|
+
// 2,
|
|
102
|
+
// []
|
|
103
|
+
// // ['元元模型/系统/查询', '元元模型/系统/新增', '元元模型/系统/编辑']
|
|
104
|
+
// ],
|
|
105
|
+
// ]
|
|
106
|
+
}
|
|
107
|
+
]), L = A(() => r.value), W = (n) => {
|
|
108
|
+
var e;
|
|
109
|
+
r.value = (e = r.value) == null ? void 0 : e.map((t) => t.key === "tableContents" ? {
|
|
110
|
+
...t,
|
|
111
|
+
contents: n.content
|
|
112
|
+
} : t), console.log("handleItemDataChange", n), D(n.singleContent, n.buttonName);
|
|
113
|
+
}, G = (n) => {
|
|
114
|
+
var a, l, o;
|
|
115
|
+
console.log("handleContentChange", n);
|
|
116
|
+
const e = B(n);
|
|
117
|
+
let t = (l = (a = e == null ? void 0 : e.contents) == null ? void 0 : a.find((s) => s.key === "tableContents")) == null ? void 0 : l.contents;
|
|
118
|
+
r.value = (o = r.value) == null ? void 0 : o.map((s) => s.key === "tableContents" ? {
|
|
119
|
+
...s,
|
|
120
|
+
contents: t == null ? void 0 : t.map((i) => Object.keys(i).filter((g) => g.startsWith("a")).map((g) => i[g]))
|
|
121
|
+
} : s), console.log("rawData", r.value);
|
|
122
|
+
}, v = c({}), k = c(), f = async (n, e) => {
|
|
123
|
+
var a, l;
|
|
124
|
+
const t = await n(e);
|
|
125
|
+
if (((a = t == null ? void 0 : t.data) == null ? void 0 : a.code) === 200)
|
|
126
|
+
return t.data.result || ((l = t == null ? void 0 : t.data) == null ? void 0 : l.code) === 200;
|
|
127
|
+
}, T = (n, e) => {
|
|
128
|
+
e == null || e.forEach((t) => {
|
|
129
|
+
n == null || n.forEach((a) => {
|
|
130
|
+
var l;
|
|
131
|
+
a.path == t.path && (a.checkedButtons = t.checkedButtons), a.children && ((l = a.children) == null ? void 0 : l.length) > 0 && T(a.children, e);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}, x = (n) => n == null ? void 0 : n.map((e) => {
|
|
135
|
+
var a;
|
|
136
|
+
const t = {
|
|
137
|
+
...e,
|
|
138
|
+
checkedButtons: []
|
|
139
|
+
};
|
|
140
|
+
return t.children && ((a = t.children) == null ? void 0 : a.length) > 0 && (t.children = x(t.children)), t;
|
|
141
|
+
}), J = async (n, e) => {
|
|
142
|
+
var t, a;
|
|
143
|
+
switch (console.log("clickRowButton", n, e, u.value), v.value = B(e), n) {
|
|
144
|
+
case "授权":
|
|
145
|
+
console.log("角色的权限", e.roleAuthority), console.log("角色的tree", u.value), console.log("角色的pageData", r.value), p.title = `【${e.roleName}】授权`, p.show = !0, await K(), T(u.value, e.roleAuthority), (a = k.value) == null || a.setCheckedKeys((t = e.roleAuthority) == null ? void 0 : t.map((l) => l.path));
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}, X = () => {
|
|
149
|
+
p.show = !1;
|
|
150
|
+
}, y = c(), Y = async (n) => {
|
|
151
|
+
const e = await f(F, {
|
|
152
|
+
key: {
|
|
153
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
154
|
+
pageKey: n
|
|
155
|
+
}
|
|
156
|
+
}), t = e == null ? void 0 : e.map((a) => {
|
|
157
|
+
var l;
|
|
158
|
+
return {
|
|
159
|
+
id: a.id,
|
|
160
|
+
rowData: (l = a == null ? void 0 : a.value) == null ? void 0 : l.rowData
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
return console.log("tempRes", t), t == null ? void 0 : t.map((a) => {
|
|
164
|
+
var l;
|
|
165
|
+
if (Array.isArray(a == null ? void 0 : a.rowData)) {
|
|
166
|
+
let o = { id: a.id };
|
|
167
|
+
return (l = a == null ? void 0 : a.rowData) == null || l.forEach((s, i) => {
|
|
168
|
+
o[`a${i}`] = s;
|
|
169
|
+
}), o;
|
|
170
|
+
} else
|
|
171
|
+
return {
|
|
172
|
+
...a.rowData,
|
|
173
|
+
id: a.id
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}, D = (n, e) => {
|
|
177
|
+
if (e === "新增") {
|
|
178
|
+
const t = B(n);
|
|
179
|
+
delete t.id, f(M, {
|
|
180
|
+
key: {
|
|
181
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
182
|
+
pageKey: w.value
|
|
183
|
+
},
|
|
184
|
+
value: {
|
|
185
|
+
rowData: t
|
|
186
|
+
}
|
|
187
|
+
}).then((a) => {
|
|
188
|
+
y.value = {
|
|
189
|
+
...n,
|
|
190
|
+
newId: a
|
|
191
|
+
}, e && a && C.success(e + "成功");
|
|
192
|
+
});
|
|
193
|
+
} else e === "编辑" ? f(O, {
|
|
194
|
+
id: n.id,
|
|
195
|
+
key: {
|
|
196
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
197
|
+
pageKey: w.value
|
|
198
|
+
},
|
|
199
|
+
value: {
|
|
200
|
+
rowData: n
|
|
201
|
+
}
|
|
202
|
+
}).then((t) => {
|
|
203
|
+
e && t && C.success(e + "成功"), p.show = !1;
|
|
204
|
+
}) : e === "删除" && (console.log(222, n), f(j, {
|
|
205
|
+
id: n.id
|
|
206
|
+
}).then((t) => {
|
|
207
|
+
e && t && C.success(e + "成功");
|
|
208
|
+
}));
|
|
209
|
+
}, b = (n) => {
|
|
210
|
+
let e = [];
|
|
211
|
+
return n == null || n.forEach((t) => {
|
|
212
|
+
var a;
|
|
213
|
+
if (t.checkedButtons && ((a = t.checkedButtons) == null ? void 0 : a.length) > 0) {
|
|
214
|
+
const l = {
|
|
215
|
+
path: t.path,
|
|
216
|
+
checkedButtons: t.checkedButtons
|
|
217
|
+
// isCheckedAll: node.checkedButtons?.length === node.renderButtons?.length
|
|
218
|
+
};
|
|
219
|
+
e = e.concat(l);
|
|
220
|
+
}
|
|
221
|
+
t.children && (e = e.concat(b(t.children)));
|
|
222
|
+
}), e;
|
|
223
|
+
}, Z = () => {
|
|
224
|
+
console.log(122, v.value, b(u.value)), y.value = {
|
|
225
|
+
...v.value,
|
|
226
|
+
roleAuthority: b(u.value)
|
|
227
|
+
// ['a' + authorityIndex]: checkedKeys
|
|
228
|
+
}, K(() => {
|
|
229
|
+
console.log("clickSubmitAuthority", y.value, r.value), D(y.value, "编辑");
|
|
230
|
+
});
|
|
231
|
+
}, p = I({
|
|
232
|
+
show: !1,
|
|
233
|
+
title: "角色授权",
|
|
234
|
+
width: "35%",
|
|
235
|
+
draggable: !0
|
|
236
|
+
}), ee = ({ isPenultimate: n }, e) => {
|
|
237
|
+
var t, a;
|
|
238
|
+
return console.log("isPenultimate", n, e), ((a = (t = e == null ? void 0 : e.data) == null ? void 0 : t.renderButtons) == null ? void 0 : a.length) > 0 ? "is-penultimate" : "";
|
|
239
|
+
}, u = c([]), te = c([
|
|
240
|
+
{
|
|
241
|
+
path: "资源管理",
|
|
242
|
+
buttons: ["查询", "新增", "编辑", "删除"]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
path: "资源管理/人员",
|
|
246
|
+
buttons: ["查询", "新增", "编辑", "删除"]
|
|
247
|
+
}
|
|
248
|
+
]), ae = (n, e) => {
|
|
249
|
+
var t;
|
|
250
|
+
n.checkedButtons = e ? (t = n.renderButtons) == null ? void 0 : t.map((a) => a.path) : [], console.log("handleNodeCheckChange", n, e);
|
|
251
|
+
}, d = c([]), ne = (n, e) => {
|
|
252
|
+
var t, a, l, o;
|
|
253
|
+
e.checkedButtons = n, ((t = e.checkedButtons) == null ? void 0 : t.length) === ((a = e.renderButtons) == null ? void 0 : a.length) ? d.value.push(e.path) : ((l = e.checkedButtons) == null ? void 0 : l.length) === 0 && (d.value = (o = d.value) == null ? void 0 : o.filter((s) => s !== e.path)), console.log("角色的handleNodeBtnChange", e, n);
|
|
254
|
+
};
|
|
255
|
+
N(() => d.value.length, () => {
|
|
256
|
+
var e, t;
|
|
257
|
+
const n = (e = k.value) == null ? void 0 : e.getCheckedKeys();
|
|
258
|
+
console.log(112, d.value, n), (t = k.value) == null || t.setCheckedKeys([...d.value]);
|
|
259
|
+
});
|
|
260
|
+
N(() => p.show, (n) => {
|
|
261
|
+
n || (u.value = x(u.value), console.log("角色的resetCheckedButtonsInTree", u.value));
|
|
262
|
+
});
|
|
263
|
+
const le = A(() => {
|
|
264
|
+
var t;
|
|
265
|
+
const n = (t = B(U.value)) == null ? void 0 : t.filter((a) => {
|
|
266
|
+
var l, o;
|
|
267
|
+
return ((o = (l = a == null ? void 0 : a.key) == null ? void 0 : l.pageKey) == null ? void 0 : o.toUpperCase()) !== "MENU";
|
|
268
|
+
}), e = n == null ? void 0 : n.map((a) => {
|
|
269
|
+
var o, s, i, g;
|
|
270
|
+
let l = (i = (s = (o = a == null ? void 0 : a.value) == null ? void 0 : o.pageData) == null ? void 0 : s.compData) == null ? void 0 : i.filter((h) => (h == null ? void 0 : h.key) === "extraButton" || (h == null ? void 0 : h.key) === "rowButton");
|
|
271
|
+
return l = Array.from(
|
|
272
|
+
new Set(l == null ? void 0 : l.flatMap((h) => h.contents.map((E) => E.label)))
|
|
273
|
+
), {
|
|
274
|
+
path: (g = a == null ? void 0 : a.key) == null ? void 0 : g.pageKey,
|
|
275
|
+
buttons: l
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
return console.log("1234filteredGroups", n), e;
|
|
279
|
+
}), R = (n, e) => {
|
|
280
|
+
if (Array.isArray(n))
|
|
281
|
+
return n == null ? void 0 : n.map((t) => t.children && t.children.length > 0 ? {
|
|
282
|
+
...t,
|
|
283
|
+
renderButtons: t.carryData ? e == null ? void 0 : e.map((a) => ({
|
|
284
|
+
title: a,
|
|
285
|
+
path: t.path + "/" + a
|
|
286
|
+
})) : [],
|
|
287
|
+
checkedButtons: [],
|
|
288
|
+
children: R(t.children, e)
|
|
289
|
+
} : {
|
|
290
|
+
...t,
|
|
291
|
+
renderButtons: t.carryData ? e == null ? void 0 : e.map((a) => ({
|
|
292
|
+
title: a,
|
|
293
|
+
path: t.path + "/" + a
|
|
294
|
+
})) : [],
|
|
295
|
+
checkedButtons: []
|
|
296
|
+
});
|
|
297
|
+
}, ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
298
|
+
__proto__: null,
|
|
299
|
+
addButtonsToTree: R,
|
|
300
|
+
authorizeDialog: p,
|
|
301
|
+
buttonValue: $,
|
|
302
|
+
changedRow: y,
|
|
303
|
+
clickRow: v,
|
|
304
|
+
clickRowButton: J,
|
|
305
|
+
clickSubmitAuthority: Z,
|
|
306
|
+
closeAuthorizeDialog: X,
|
|
307
|
+
customNodeClass: ee,
|
|
308
|
+
getPageDataAsync: Y,
|
|
309
|
+
handleContentChange: G,
|
|
310
|
+
handleItemDataChange: W,
|
|
311
|
+
handleNodeBtnChange: ne,
|
|
312
|
+
handleNodeCheckChange: ae,
|
|
313
|
+
handleQueryChange: H,
|
|
314
|
+
handleSubmitAsync: f,
|
|
315
|
+
isPageDataExist: q,
|
|
316
|
+
menuData: u,
|
|
317
|
+
menusButtons: te,
|
|
318
|
+
pageData: r,
|
|
319
|
+
pageDataFiltered: L,
|
|
320
|
+
queryFormData: V,
|
|
321
|
+
structureButtons: le,
|
|
322
|
+
submitTableAsyncByVerify: D,
|
|
323
|
+
treeRef: k
|
|
324
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
325
|
+
export {
|
|
326
|
+
ue as S,
|
|
327
|
+
p as a
|
|
328
|
+
};
|