ss-component-new 1.3.584 → 1.3.586
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/ss-component.js
CHANGED
|
@@ -15,7 +15,7 @@ const s = o(() => import("./index-B2SW5XjJ.js").then((t) => t.q));
|
|
|
15
15
|
s.install = (t) => {
|
|
16
16
|
t.component("ssTab", s);
|
|
17
17
|
};
|
|
18
|
-
const r = o(() => import("./index-
|
|
18
|
+
const r = o(() => import("./index-95FKYNW8.js").then((t) => t.i));
|
|
19
19
|
r.install = (t) => {
|
|
20
20
|
t.component("ssMenu", r);
|
|
21
21
|
};
|
package/dist/ss-component2.js
CHANGED
|
@@ -13,7 +13,7 @@ const a = [
|
|
|
13
13
|
{
|
|
14
14
|
path: "/",
|
|
15
15
|
name: "Model",
|
|
16
|
-
component: async () => import("./index-
|
|
16
|
+
component: async () => import("./index-CTYsjn-v.js"),
|
|
17
17
|
// component: async ()=>import('@/components/views/model/component/main.vue'),
|
|
18
18
|
// component: async ()=>import('@/components/views/canvas/index.vue'),
|
|
19
19
|
// component: async ()=>import('@/components/views/test/index.vue'),
|
package/package.json
CHANGED
package/dist/index-VVvE6CIK.js
DELETED
|
@@ -1,504 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as gt, computed as we, onMounted as Qe, resolveComponent as Q, createBlock as Le, openBlock as F, withCtx as q, resolveDynamicComponent as Xe, defineComponent as Ct, defineProps as kt, ref as O, watch as Ke, reactive as _t, nextTick as Dt, createElementBlock as K, Fragment as Be, createVNode as $, createCommentVNode as Te, normalizeStyle as It, toDisplayString as $e, createElementVNode as Me, renderList as ze, createTextVNode as xe } from "vue";
|
|
2
|
-
import { u as St, a as bt, p as Je, b as Tt, s as Ee, c as je, v as Fe } from "./index-D8UY4uNQ.js";
|
|
3
|
-
import { S as Mt } from "./index-BHtNKL1L.js";
|
|
4
|
-
import "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-X_k372gl.js";
|
|
5
|
-
import { I as wt } from "./request-B1c8BUkR.js";
|
|
6
|
-
import { s as ut } from "./index-11kpzK0A.js";
|
|
7
|
-
import { c as At } from "./index-B2SW5XjJ.js";
|
|
8
|
-
import { useRouter as Bt } from "vue-router";
|
|
9
|
-
import { a as Et, e as Ft, f as Lt, g as Ut, h as jt } from "./index-ChNfRlIP.js";
|
|
10
|
-
import { g as qe, u as Pt, b as We, c as Ot, a as Rt } from "./index-YvUJL9Us.js";
|
|
11
|
-
import { g as Kt } from "./index-Bq9ROITA.js";
|
|
12
|
-
import { f as $t } from "./menuIndex-DAW9B-9g.js";
|
|
13
|
-
import { d as Ge, e as Ne, n as zt } from "./index-DsdWSuDi.js";
|
|
14
|
-
import { u as xt } from "./index-D9xMYIes.js";
|
|
15
|
-
import { _ as Jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
-
const Ue = gt(() => import("./index-B2SW5XjJ.js").then((i) => i.p));
|
|
17
|
-
Ue.install = (i) => {
|
|
18
|
-
i.component("ssMenu", Ue);
|
|
19
|
-
};
|
|
20
|
-
const qt = {
|
|
21
|
-
__name: "index",
|
|
22
|
-
props: {
|
|
23
|
-
name: String
|
|
24
|
-
},
|
|
25
|
-
setup(i) {
|
|
26
|
-
const n = i, S = we(() => wt[n.name]);
|
|
27
|
-
return Qe(() => {
|
|
28
|
-
}), (f, a) => {
|
|
29
|
-
const l = Q("el-icon");
|
|
30
|
-
return F(), Le(l, null, {
|
|
31
|
-
default: q(() => [
|
|
32
|
-
(F(), Le(Xe(S.value)))
|
|
33
|
-
]),
|
|
34
|
-
_: 1
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}, Ye = (i, n, S = 0) => {
|
|
39
|
-
let f = i;
|
|
40
|
-
return f != null && f.every((a) => Array.isArray(a)) && (f != null && f.every((a) => Array.isArray(a) && a.length === 1) ? f = f == null ? void 0 : f.filter((a) => (a == null ? void 0 : a[0]) !== (n == null ? void 0 : n[S])) : f = f == null ? void 0 : f.map((a) => {
|
|
41
|
-
if (a != null && a.find((l) => l === (n == null ? void 0 : n[S])) && (n == null ? void 0 : n.length) !== 1) {
|
|
42
|
-
let l = je(n), r = a == null ? void 0 : a.filter((y) => y !== (l == null ? void 0 : l[S])), I = S + 1, w = Ye(r, l, I), M = [];
|
|
43
|
-
M.push(a == null ? void 0 : a[0]), w == null || w.forEach((y) => {
|
|
44
|
-
M.push(y);
|
|
45
|
-
}), a = M;
|
|
46
|
-
}
|
|
47
|
-
return a;
|
|
48
|
-
})), f;
|
|
49
|
-
}, Ze = (i, n, S, f = 0) => {
|
|
50
|
-
let a = i;
|
|
51
|
-
return a != null && a.every((l) => Array.isArray(l)) && (a != null && a.every((l) => Array.isArray(l) && l.length === 1) ? a.push([S]) : a = a == null ? void 0 : a.map((l) => {
|
|
52
|
-
if (l != null && l.find((r) => r === (n == null ? void 0 : n[f])) && (n == null ? void 0 : n.length) !== 1) {
|
|
53
|
-
let r = je(n), I = l == null ? void 0 : l.filter((u) => u !== (r == null ? void 0 : r[f])), w = f + 1, M = Ze(I, r, S, w), y = [];
|
|
54
|
-
y.push(l == null ? void 0 : l[0]), M == null || M.forEach((u) => {
|
|
55
|
-
y.push(u);
|
|
56
|
-
}), l = y;
|
|
57
|
-
}
|
|
58
|
-
return l;
|
|
59
|
-
})), a;
|
|
60
|
-
}, Pe = (i, n, S, f, a = 0) => {
|
|
61
|
-
let l = i;
|
|
62
|
-
return l != null && l.every((r) => Array.isArray(r)) && (l != null && l.every((r) => Array.isArray(r) && r.length === 1) ? l = l == null ? void 0 : l.map((r) => ((r == null ? void 0 : r[0]) === S && (r = [f]), r)) : l = l == null ? void 0 : l.map((r) => {
|
|
63
|
-
if (r != null && r.find((I) => I === (n == null ? void 0 : n[a])) && (n == null ? void 0 : n.length) !== 1) {
|
|
64
|
-
let I = je(n), w = r == null ? void 0 : r.filter((R) => R !== (I == null ? void 0 : I[a])), M = a + 1, y = Pe(w, I, S, f, M), u = [];
|
|
65
|
-
u.push(r == null ? void 0 : r[0]), y == null || y.forEach((R) => {
|
|
66
|
-
u.push(R);
|
|
67
|
-
}), r = u;
|
|
68
|
-
}
|
|
69
|
-
return r;
|
|
70
|
-
})), l;
|
|
71
|
-
};
|
|
72
|
-
function Ve(i = "menu") {
|
|
73
|
-
return {
|
|
74
|
-
name: i,
|
|
75
|
-
components: {
|
|
76
|
-
SvgIcon: Mt,
|
|
77
|
-
ssMenu: Ue,
|
|
78
|
-
DynamicIcon: qt,
|
|
79
|
-
ssDialog: ut,
|
|
80
|
-
ssInput: At
|
|
81
|
-
},
|
|
82
|
-
setup(n, { emit: S }) {
|
|
83
|
-
const f = kt({
|
|
84
|
-
mode: {
|
|
85
|
-
type: String,
|
|
86
|
-
default: "vertical"
|
|
87
|
-
}
|
|
88
|
-
}), a = O([
|
|
89
|
-
{
|
|
90
|
-
allowInherit: !1,
|
|
91
|
-
operateType: "复制新增",
|
|
92
|
-
operateIcon: "CopyAddMenu"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
allowInherit: !1,
|
|
96
|
-
operateType: "删除",
|
|
97
|
-
operateIcon: "DeleteMenu"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
allowInherit: !1,
|
|
101
|
-
operateType: "修改菜单名",
|
|
102
|
-
operateIcon: "FixedMenu"
|
|
103
|
-
}
|
|
104
|
-
]), l = St(), r = bt(Je), I = Tt(Je), { loginUserInfo: w } = Ee(I), M = O(0), y = Bt(), u = O(), { asideMenus: R, menuTriggerType: o, platform: Ie, jumpMenuInform: z } = Ee(l), { fixMenuStatus: Se } = Ee(r), { isSuperAdmin: be } = xt(), B = we(() => f == null ? void 0 : f.mode), ue = (t) => t == null ? void 0 : t.map((e) => {
|
|
105
|
-
var p, d;
|
|
106
|
-
return !(e != null && e.children) || ((p = e == null ? void 0 : e.children) == null ? void 0 : p.length) === 0 ? e.config = a.value : e != null && e.children && ((d = e == null ? void 0 : e.children) == null ? void 0 : d.length) > 0 && (e.children = ue(e.children)), e;
|
|
107
|
-
}), Oe = we(() => {
|
|
108
|
-
let t = [...R.value];
|
|
109
|
-
if ((t == null ? void 0 : t.length) === 0)
|
|
110
|
-
return y.push("/"), [];
|
|
111
|
-
const s = lt(t, tt.value);
|
|
112
|
-
return s.isFlag || (t = s == null ? void 0 : s.data), t = t == null ? void 0 : t.map((e) => {
|
|
113
|
-
var p, d;
|
|
114
|
-
return !(e != null && e.children) || ((p = e == null ? void 0 : e.children) == null ? void 0 : p.length) === 0 ? e.config = a.value : e != null && e.children && ((d = e == null ? void 0 : e.children) == null ? void 0 : d.length) > 0 && (e.children = ue(e.children)), e;
|
|
115
|
-
}), t;
|
|
116
|
-
}), He = async (t, s) => {
|
|
117
|
-
r.setRouteToChildPath(""), l.setMenuTriggerType("click"), l.setActiveMenuPath(t == null ? void 0 : t.path), l.setActiveAsideMenu(t), t.isRouter ? y.push(t.path) : y.push("/"), S("node-click", t, s);
|
|
118
|
-
}, me = async (t) => {
|
|
119
|
-
const s = $t(Oe.value, "path", t);
|
|
120
|
-
l.setActiveAsideMenu(s), r.setRouteToChildPath(""), Se.value ? r.setFixMenuStatus(!1) : (Z.value && (o.value = "open"), o.value === "click" ? z.value || l.setActiveMenuPath(t) : Z.value || (l.setMenuTriggerType("click"), z.value || l.setActiveMenuPath(t))), t != null && t.startsWith("/") ? y.push(t) : y.push("/"), M.value++;
|
|
121
|
-
}, et = (t) => {
|
|
122
|
-
Z.value || l.setActiveMenuPath(t);
|
|
123
|
-
}, X = (t) => {
|
|
124
|
-
const s = document.documentElement;
|
|
125
|
-
t == null || t.forEach((e) => {
|
|
126
|
-
s.style.setProperty(e.name, e.value);
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
Qe(() => {
|
|
130
|
-
M.value = 1;
|
|
131
|
-
});
|
|
132
|
-
const tt = we(() => {
|
|
133
|
-
const t = sessionStorage.getItem("authority");
|
|
134
|
-
return t ? JSON.parse(t) : [];
|
|
135
|
-
});
|
|
136
|
-
Ke(
|
|
137
|
-
() => Ie.value,
|
|
138
|
-
(t) => {
|
|
139
|
-
t === "browser" ? X(Et) : t === "client" ? (X(Ft), X(Lt)) : t === "three" && (X(Ut), X(jt));
|
|
140
|
-
},
|
|
141
|
-
{ immediate: !0 }
|
|
142
|
-
);
|
|
143
|
-
const lt = (t, s) => ({
|
|
144
|
-
isFlag: !0
|
|
145
|
-
}), x = _t({
|
|
146
|
-
show: !1,
|
|
147
|
-
title: "菜单配置",
|
|
148
|
-
width: "30%",
|
|
149
|
-
type: "create"
|
|
150
|
-
}), st = (t) => Kt(t), ot = O({}), at = O([]), ee = O({}), Y = O({}), it = (t) => {
|
|
151
|
-
switch (t) {
|
|
152
|
-
case "复制新增":
|
|
153
|
-
return "create";
|
|
154
|
-
case "修改菜单名":
|
|
155
|
-
return "update";
|
|
156
|
-
case "删除":
|
|
157
|
-
return "delete";
|
|
158
|
-
}
|
|
159
|
-
}, Re = O({}), rt = (t) => {
|
|
160
|
-
l.setCacheInputMenu({
|
|
161
|
-
type: x.type,
|
|
162
|
-
data: t
|
|
163
|
-
}), l.setIsRefreshMenus(!0);
|
|
164
|
-
}, nt = async (t, s, e) => {
|
|
165
|
-
var p, d, C, W, b, V, L, te, le, se, oe, ae, ie, re, ne, pe, ce, fe, he, de, ve, ye, ge, Ce, ke, _e, De;
|
|
166
|
-
if (s === "create") {
|
|
167
|
-
let U = (e == null ? void 0 : e.title) + "(1)", P = (d = (p = e == null ? void 0 : e.path) == null ? void 0 : p.split("/")) == null ? void 0 : d.filter((_, v) => {
|
|
168
|
-
var k, T;
|
|
169
|
-
return v !== ((T = (k = e == null ? void 0 : e.path) == null ? void 0 : k.split("/")) == null ? void 0 : T.length) - 1;
|
|
170
|
-
}), j = await Ge(
|
|
171
|
-
(b = (W = (C = e == null ? void 0 : e.path) == null ? void 0 : C.split("/")) == null ? void 0 : W.filter((_, v) => {
|
|
172
|
-
var k, T;
|
|
173
|
-
return v !== ((T = (k = e == null ? void 0 : e.path) == null ? void 0 : k.split("/")) == null ? void 0 : T.length) - 1;
|
|
174
|
-
})) == null ? void 0 : b.join("/"),
|
|
175
|
-
sessionStorage.getItem("systemKey"),
|
|
176
|
-
""
|
|
177
|
-
);
|
|
178
|
-
if (P.push(U), P = P == null ? void 0 : P.join("/"), (j == null ? void 0 : j.length) > 0) {
|
|
179
|
-
let _ = j == null ? void 0 : j[0], v = (L = (V = _ == null ? void 0 : _.compData) == null ? void 0 : V.find((k) => (k == null ? void 0 : k.key) === "header")) == null ? void 0 : L.contents;
|
|
180
|
-
if (((te = v == null ? void 0 : v[0]) == null ? void 0 : te.directiveLabel) === "#isMain") {
|
|
181
|
-
let k = (le = v == null ? void 0 : v[0]) == null ? void 0 : le.prop, T = (oe = (se = _ == null ? void 0 : _.compData) == null ? void 0 : se.find(
|
|
182
|
-
(D) => (D == null ? void 0 : D.key) === "tableContents"
|
|
183
|
-
)) == null ? void 0 : oe.contents, G;
|
|
184
|
-
T == null || T.forEach((D) => {
|
|
185
|
-
var N, J;
|
|
186
|
-
if (D.length === 1)
|
|
187
|
-
((N = D == null ? void 0 : D[0]) == null ? void 0 : N[k]) === (e == null ? void 0 : e.title) && (G = D == null ? void 0 : D[0], G[k] = U);
|
|
188
|
-
else {
|
|
189
|
-
let c = (J = v == null ? void 0 : v.filter((h) => h !== "操作")) == null ? void 0 : J.map((h) => h == null ? void 0 : h.prop), E = D == null ? void 0 : D.filter((h) => !(h != null && h.id)), A = Ne(E, c);
|
|
190
|
-
A[k] = U, G = A;
|
|
191
|
-
}
|
|
192
|
-
}), await Ot({
|
|
193
|
-
key: {
|
|
194
|
-
type: "data",
|
|
195
|
-
pageKey: (re = (ie = (ae = e == null ? void 0 : e.path) == null ? void 0 : ae.split("/")) == null ? void 0 : ie.filter((D, N) => {
|
|
196
|
-
var J, c;
|
|
197
|
-
return N !== ((c = (J = e == null ? void 0 : e.path) == null ? void 0 : J.split("/")) == null ? void 0 : c.length) - 1;
|
|
198
|
-
})) == null ? void 0 : re.join("/"),
|
|
199
|
-
tableId: _ == null ? void 0 : _.id,
|
|
200
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
201
|
-
createUserId: (ne = w.value) == null ? void 0 : ne.id,
|
|
202
|
-
createUserLayer: ((pe = w.value) == null ? void 0 : pe.dept) || ((ce = w.value) == null ? void 0 : ce.部门名称)
|
|
203
|
-
},
|
|
204
|
-
value: {
|
|
205
|
-
tableData: G
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
await zt(e == null ? void 0 : e.path, P), l.setUpdateMenuStatus(!1), await Fe(), l.setActiveMenuPath(
|
|
211
|
-
(de = (he = (fe = e == null ? void 0 : e.path) == null ? void 0 : fe.split("/")) == null ? void 0 : he.filter((_, v) => {
|
|
212
|
-
var k, T;
|
|
213
|
-
return v !== ((T = (k = e == null ? void 0 : e.path) == null ? void 0 : k.split("/")) == null ? void 0 : T.length) - 1;
|
|
214
|
-
})) == null ? void 0 : de.join("/")
|
|
215
|
-
), l.setActiveTopMenuPath((ye = (ve = e == null ? void 0 : e.path) == null ? void 0 : ve.split("/")) == null ? void 0 : ye[0]), l.setIsRefreshMenus(!1), l.setIsRefreshMenus(!0);
|
|
216
|
-
} else if (s === "update")
|
|
217
|
-
u.value = e;
|
|
218
|
-
else if (s === "delete") {
|
|
219
|
-
let U = [];
|
|
220
|
-
(U == null ? void 0 : U.length) > 0 && await Rt({
|
|
221
|
-
ids: U
|
|
222
|
-
}), l.setUpdateMenuStatus(!1), await Fe(), l.setActiveMenuPath(
|
|
223
|
-
(ke = (Ce = (ge = e == null ? void 0 : e.path) == null ? void 0 : ge.split("/")) == null ? void 0 : Ce.filter((P, j) => {
|
|
224
|
-
var _, v;
|
|
225
|
-
return j !== ((v = (_ = e == null ? void 0 : e.path) == null ? void 0 : _.split("/")) == null ? void 0 : v.length) - 1;
|
|
226
|
-
})) == null ? void 0 : ke.join("/")
|
|
227
|
-
), l.setActiveTopMenuPath((De = (_e = e == null ? void 0 : e.path) == null ? void 0 : _e.split("/")) == null ? void 0 : De[0]), l.setIsRefreshMenus(!1), l.setIsRefreshMenus(!0);
|
|
228
|
-
}
|
|
229
|
-
}, pt = async (t, s) => {
|
|
230
|
-
var te, le, se, oe, ae, ie, re, ne, pe, ce, fe, he, de, ve, ye, ge, Ce, ke, _e, De, U, P, j, _, v, k, T, G, D, N, J;
|
|
231
|
-
let e = await qe({
|
|
232
|
-
key: {
|
|
233
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
234
|
-
pageKey: "menu"
|
|
235
|
-
}
|
|
236
|
-
}), p = (le = (te = e == null ? void 0 : e.data) == null ? void 0 : te.result) == null ? void 0 : le[0], d = (se = p == null ? void 0 : p.value) == null ? void 0 : se.pageData;
|
|
237
|
-
d.compData = (oe = d.compData) == null ? void 0 : oe.map((c) => {
|
|
238
|
-
var E, A;
|
|
239
|
-
return (c == null ? void 0 : c.key) === "menuContents" && (c.contents = Pe(c.contents, (E = s == null ? void 0 : s.path) == null ? void 0 : E.split("/"), s == null ? void 0 : s.title, (A = t == null ? void 0 : t.target) == null ? void 0 : A.value)), c;
|
|
240
|
-
}), p != null && p.id && await Pt({
|
|
241
|
-
id: p == null ? void 0 : p.id,
|
|
242
|
-
value: {
|
|
243
|
-
pageData: d
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
let C = (ie = (ae = s == null ? void 0 : s.path) == null ? void 0 : ae.split("/")) == null ? void 0 : ie.filter((c, E) => {
|
|
247
|
-
var A, h;
|
|
248
|
-
return E !== ((h = (A = s == null ? void 0 : s.path) == null ? void 0 : A.split("/")) == null ? void 0 : h.length) - 1;
|
|
249
|
-
}), W = C == null ? void 0 : C.join("/");
|
|
250
|
-
C.push((re = t == null ? void 0 : t.target) == null ? void 0 : re.value), C = C == null ? void 0 : C.join("/");
|
|
251
|
-
let b = await Ge(W, sessionStorage.getItem("systemKey"), "");
|
|
252
|
-
if (((he = (fe = (ce = (pe = (ne = b == null ? void 0 : b[0]) == null ? void 0 : ne.compData) == null ? void 0 : pe.find((c) => (c == null ? void 0 : c.key) === "header")) == null ? void 0 : ce.contents) == null ? void 0 : fe[0]) == null ? void 0 : he.directiveLabel) === "#isMain") {
|
|
253
|
-
let c = (Ce = (ge = (ye = (ve = (de = b == null ? void 0 : b[0]) == null ? void 0 : de.compData) == null ? void 0 : ve.find((g) => (g == null ? void 0 : g.key) === "header")) == null ? void 0 : ye.contents) == null ? void 0 : ge[0]) == null ? void 0 : Ce.prop, E = (De = (_e = (ke = b == null ? void 0 : b[0]) == null ? void 0 : ke.compData) == null ? void 0 : _e.find(
|
|
254
|
-
(g) => (g == null ? void 0 : g.key) === "tableContents"
|
|
255
|
-
)) == null ? void 0 : De.contents, A = (_ = (j = (P = (U = b == null ? void 0 : b[0]) == null ? void 0 : U.compData) == null ? void 0 : P.find((g) => (g == null ? void 0 : g.key) === "header")) == null ? void 0 : j.contents) == null ? void 0 : _.map((g) => g == null ? void 0 : g.prop), h;
|
|
256
|
-
if (E == null || E.forEach((g) => {
|
|
257
|
-
var m;
|
|
258
|
-
let H = Ne(g, A);
|
|
259
|
-
(H == null ? void 0 : H[c]) === s.title && (h = H, h[c] = (m = t == null ? void 0 : t.target) == null ? void 0 : m.value);
|
|
260
|
-
}), h) {
|
|
261
|
-
let g = {};
|
|
262
|
-
for (let m in h)
|
|
263
|
-
m !== "id" && (g[m] = h == null ? void 0 : h[m]);
|
|
264
|
-
let H = [
|
|
265
|
-
{
|
|
266
|
-
id: h == null ? void 0 : h.id,
|
|
267
|
-
value: {
|
|
268
|
-
tableData: g
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
];
|
|
272
|
-
await We({
|
|
273
|
-
dataList: H
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
let V = await qe({
|
|
278
|
-
key: {
|
|
279
|
-
systemKey: sessionStorage.getItem("systemKey"),
|
|
280
|
-
pageKey: s == null ? void 0 : s.path
|
|
281
|
-
}
|
|
282
|
-
}), L = (k = (v = V == null ? void 0 : V.data) == null ? void 0 : v.result) == null ? void 0 : k.map((c) => ({
|
|
283
|
-
id: c == null ? void 0 : c.id,
|
|
284
|
-
key: c == null ? void 0 : c.key
|
|
285
|
-
}));
|
|
286
|
-
L = L == null ? void 0 : L.map((c) => (c.key.pageKey = C, c)), (L == null ? void 0 : L.length) > 0 && await We({
|
|
287
|
-
dataList: L
|
|
288
|
-
}), l.setUpdateMenuStatus(!1), await Fe(), l.setActiveMenuPath(
|
|
289
|
-
(D = (G = (T = s == null ? void 0 : s.path) == null ? void 0 : T.split("/")) == null ? void 0 : G.filter((c, E) => {
|
|
290
|
-
var A, h;
|
|
291
|
-
return E !== ((h = (A = s == null ? void 0 : s.path) == null ? void 0 : A.split("/")) == null ? void 0 : h.length) - 1;
|
|
292
|
-
})) == null ? void 0 : D.join("/")
|
|
293
|
-
), l.setActiveTopMenuPath((J = (N = s == null ? void 0 : s.path) == null ? void 0 : N.split("/")) == null ? void 0 : J[0]), l.setIsRefreshMenus(!1), l.setIsRefreshMenus(!0), u.value = void 0;
|
|
294
|
-
}, ct = async (t, s) => {
|
|
295
|
-
x.type = it(s == null ? void 0 : s.operateType), await nt(s, x.type, t), Y.value = t, Re.value = s;
|
|
296
|
-
}, ft = () => {
|
|
297
|
-
x.show = !1;
|
|
298
|
-
}, ht = (t) => t == null ? void 0 : t.filter((s) => s.allowInherit), dt = () => {
|
|
299
|
-
var e, p, d, C, W;
|
|
300
|
-
let t;
|
|
301
|
-
x.type === "create" && (t = ((e = Y.value) == null ? void 0 : e.path) + "/" + ee.value[(p = ee.value) == null ? void 0 : p.prop]), x.type === "update" && (t = (d = Y.value) == null ? void 0 : d.path);
|
|
302
|
-
const s = {
|
|
303
|
-
...Y.value,
|
|
304
|
-
//是否继承父菜单的配置
|
|
305
|
-
config: ht((C = Y.value) == null ? void 0 : C.config),
|
|
306
|
-
children: [],
|
|
307
|
-
childMenus: [],
|
|
308
|
-
title: ee.value[(W = ee.value) == null ? void 0 : W.prop],
|
|
309
|
-
path: t
|
|
310
|
-
};
|
|
311
|
-
console.log("clickSubmitForm", Re.value, Y.value, s), rt(s), x.show = !1;
|
|
312
|
-
}, vt = (t) => {
|
|
313
|
-
var e, p;
|
|
314
|
-
const s = (e = t == null ? void 0 : t.contents) == null ? void 0 : e.find((d) => d.key === "formContent");
|
|
315
|
-
s && (ee.value = (p = s == null ? void 0 : s.contents) == null ? void 0 : p.reduce(
|
|
316
|
-
(d, C) => (d[C.key] = C.value, d.prop = C.key, d),
|
|
317
|
-
{}
|
|
318
|
-
));
|
|
319
|
-
}, Z = O(!1), yt = () => {
|
|
320
|
-
Z.value = !Z.value;
|
|
321
|
-
}, Ae = O(null);
|
|
322
|
-
return Ke(() => R.value, async (t) => {
|
|
323
|
-
var s, e;
|
|
324
|
-
if (t) {
|
|
325
|
-
await Dt();
|
|
326
|
-
const p = t == null ? void 0 : t[0];
|
|
327
|
-
if (((s = p == null ? void 0 : p.children) == null ? void 0 : s.length) > 0) {
|
|
328
|
-
const d = p == null ? void 0 : p.path;
|
|
329
|
-
Ae.value && ((e = Ae.value) == null || e.openMenuRefByIndex(d));
|
|
330
|
-
} else
|
|
331
|
-
z != null && z.value ? l.setJumpMenuInform(!1) : l.setActiveMenuPath((p == null ? void 0 : p.path) ?? "");
|
|
332
|
-
}
|
|
333
|
-
}, { immediate: !0 }), {
|
|
334
|
-
menuRef: Ae,
|
|
335
|
-
isCollapse: Z,
|
|
336
|
-
handleMenuCollapse: yt,
|
|
337
|
-
handleCompChange: vt,
|
|
338
|
-
dialogForm: ot,
|
|
339
|
-
dialogRenderComps: at,
|
|
340
|
-
getComponents: st,
|
|
341
|
-
clickSubmitForm: dt,
|
|
342
|
-
dialogInfo: x,
|
|
343
|
-
beforeDialogDestroy: ft,
|
|
344
|
-
clickMenuIcon: ct,
|
|
345
|
-
mode: B,
|
|
346
|
-
renderMenuList: Oe,
|
|
347
|
-
clickMenu: He,
|
|
348
|
-
openMenu: me,
|
|
349
|
-
closeMenu: et,
|
|
350
|
-
changeMenuStyle: X,
|
|
351
|
-
fixElement: u,
|
|
352
|
-
onBlur: pt,
|
|
353
|
-
isSuperAdmin: be
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
const Wt = Ct(Ve()), Gt = ["title"], Nt = {
|
|
359
|
-
key: 1,
|
|
360
|
-
class: "menu-title",
|
|
361
|
-
style: { display: "flex", width: "100px" }
|
|
362
|
-
}, Qt = {
|
|
363
|
-
key: 2,
|
|
364
|
-
class: "menu-operate-icon"
|
|
365
|
-
}, Xt = { class: "menu-config-wrap" }, Yt = ["onClick"], Zt = { class: "module-dialog-content" };
|
|
366
|
-
function Vt(i, n, S, f, a, l) {
|
|
367
|
-
var R;
|
|
368
|
-
const r = Q("ss-input"), I = Q("svg-icon"), w = Q("el-popover"), M = Q("ss-menu"), y = Q("el-button"), u = Q("ss-dialog");
|
|
369
|
-
return F(), K(Be, null, [
|
|
370
|
-
$(M, {
|
|
371
|
-
ref: "menuRef",
|
|
372
|
-
class: "vertical-menu",
|
|
373
|
-
mode: i.mode,
|
|
374
|
-
menuList: i.renderMenuList,
|
|
375
|
-
isCollapse: i.isCollapse,
|
|
376
|
-
uniqueOpened: !0,
|
|
377
|
-
onClickMenu: i.clickMenu,
|
|
378
|
-
onOpenMenu: i.openMenu,
|
|
379
|
-
onCloseMenu: i.closeMenu
|
|
380
|
-
}, {
|
|
381
|
-
title: q(({ menu: o }) => {
|
|
382
|
-
var Ie, z, Se, be;
|
|
383
|
-
return [
|
|
384
|
-
!i.fixElement || (o == null ? void 0 : o.path) !== ((Ie = i.fixElement) == null ? void 0 : Ie.path) ? (F(), K("span", {
|
|
385
|
-
key: 0,
|
|
386
|
-
title: o.title,
|
|
387
|
-
class: "menu-title",
|
|
388
|
-
style: It({ marginRight: o != null && o.config && ((z = o == null ? void 0 : o.config) == null ? void 0 : z.length) > 0 ? "25px" : "1px" })
|
|
389
|
-
}, $e(o.title ?? ""), 13, Gt)) : Te("", !0),
|
|
390
|
-
i.fixElement && (o == null ? void 0 : o.path) === ((Se = i.fixElement) == null ? void 0 : Se.path) ? (F(), K("span", Nt, [
|
|
391
|
-
$(r, {
|
|
392
|
-
value: o.title,
|
|
393
|
-
onBlur: (B) => i.onBlur(B, o)
|
|
394
|
-
}, null, 8, ["value", "onBlur"])
|
|
395
|
-
])) : Te("", !0),
|
|
396
|
-
o != null && o.config && ((be = o == null ? void 0 : o.config) == null ? void 0 : be.length) > 0 && i.isSuperAdmin ? (F(), K("span", Qt, [
|
|
397
|
-
$(w, {
|
|
398
|
-
title: "",
|
|
399
|
-
placement: "bottom-start",
|
|
400
|
-
trigger: "hover",
|
|
401
|
-
"popper-class": "menu-operate-popover"
|
|
402
|
-
}, {
|
|
403
|
-
reference: q(() => [
|
|
404
|
-
$(I, {
|
|
405
|
-
name: "more",
|
|
406
|
-
style: { cursor: "pointer", width: "15px", height: "15px" }
|
|
407
|
-
})
|
|
408
|
-
]),
|
|
409
|
-
default: q(() => [
|
|
410
|
-
Me("div", Xt, [
|
|
411
|
-
(F(!0), K(Be, null, ze(o == null ? void 0 : o.config, (B) => (F(), K("div", {
|
|
412
|
-
class: "menu-config-item",
|
|
413
|
-
key: B.id,
|
|
414
|
-
onClick: (ue) => i.clickMenuIcon(o, B)
|
|
415
|
-
}, [
|
|
416
|
-
$(I, {
|
|
417
|
-
name: B == null ? void 0 : B.operateIcon,
|
|
418
|
-
style: { width: "15px", height: "15px", "margin-right": "8px" }
|
|
419
|
-
}, null, 8, ["name"]),
|
|
420
|
-
Me("span", null, $e(B == null ? void 0 : B.operateType), 1)
|
|
421
|
-
], 8, Yt))), 128))
|
|
422
|
-
])
|
|
423
|
-
]),
|
|
424
|
-
_: 2
|
|
425
|
-
}, 1024)
|
|
426
|
-
])) : Te("", !0)
|
|
427
|
-
];
|
|
428
|
-
}),
|
|
429
|
-
_: 1
|
|
430
|
-
}, 8, ["mode", "menuList", "isCollapse", "onClickMenu", "onOpenMenu", "onCloseMenu"]),
|
|
431
|
-
((R = i.renderMenuList) == null ? void 0 : R.length) > 0 ? (F(), K("div", {
|
|
432
|
-
key: 0,
|
|
433
|
-
class: "fold-icon",
|
|
434
|
-
onClick: n[0] || (n[0] = (...o) => i.handleMenuCollapse && i.handleMenuCollapse(...o))
|
|
435
|
-
}, [
|
|
436
|
-
$(I, {
|
|
437
|
-
name: i.isCollapse ? "expand" : "pack",
|
|
438
|
-
style: { width: "15px", height: "15px" }
|
|
439
|
-
}, null, 8, ["name"])
|
|
440
|
-
])) : Te("", !0),
|
|
441
|
-
$(u, {
|
|
442
|
-
class: "module-dialog",
|
|
443
|
-
title: i.dialogInfo.title,
|
|
444
|
-
visible: i.dialogInfo.show,
|
|
445
|
-
width: i.dialogInfo.width,
|
|
446
|
-
onBeforeDestroy: i.beforeDialogDestroy
|
|
447
|
-
}, {
|
|
448
|
-
default: q(() => [
|
|
449
|
-
Me("div", Zt, [
|
|
450
|
-
(F(!0), K(Be, null, ze(i.dialogRenderComps, (o) => (F(), K("div", {
|
|
451
|
-
key: o.id
|
|
452
|
-
}, [
|
|
453
|
-
(F(), Le(Xe(i.getComponents((o == null ? void 0 : o.comp) ?? "Input")), {
|
|
454
|
-
itemData: o == null ? void 0 : o.compData,
|
|
455
|
-
key: o == null ? void 0 : o.id,
|
|
456
|
-
content: (o == null ? void 0 : o.contents) ?? [],
|
|
457
|
-
config: o == null ? void 0 : o.config,
|
|
458
|
-
onContentChange: i.handleCompChange
|
|
459
|
-
}, null, 40, ["itemData", "content", "config", "onContentChange"]))
|
|
460
|
-
]))), 128))
|
|
461
|
-
])
|
|
462
|
-
]),
|
|
463
|
-
footer: q(() => [
|
|
464
|
-
Me("div", null, [
|
|
465
|
-
$(y, {
|
|
466
|
-
id: "themeBorderButton",
|
|
467
|
-
onClick: i.beforeDialogDestroy
|
|
468
|
-
}, {
|
|
469
|
-
default: q(() => n[1] || (n[1] = [
|
|
470
|
-
xe("取消")
|
|
471
|
-
])),
|
|
472
|
-
_: 1,
|
|
473
|
-
__: [1]
|
|
474
|
-
}, 8, ["onClick"]),
|
|
475
|
-
$(y, {
|
|
476
|
-
id: "themeButton",
|
|
477
|
-
onClick: i.clickSubmitForm
|
|
478
|
-
}, {
|
|
479
|
-
default: q(() => n[2] || (n[2] = [
|
|
480
|
-
xe(" 确认 ")
|
|
481
|
-
])),
|
|
482
|
-
_: 1,
|
|
483
|
-
__: [2]
|
|
484
|
-
}, 8, ["onClick"])
|
|
485
|
-
])
|
|
486
|
-
]),
|
|
487
|
-
_: 1
|
|
488
|
-
}, 8, ["title", "visible", "width", "onBeforeDestroy"])
|
|
489
|
-
], 64);
|
|
490
|
-
}
|
|
491
|
-
const Ht = /* @__PURE__ */ Jt(Wt, [["render", Vt], ["__scopeId", "data-v-a385ba2f"]]), vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
492
|
-
__proto__: null,
|
|
493
|
-
addSelectMenu: Ze,
|
|
494
|
-
default: Ht,
|
|
495
|
-
deleteSelectMenu: Ye,
|
|
496
|
-
fixSelectMenu: Pe,
|
|
497
|
-
setComponent: Ve
|
|
498
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
499
|
-
export {
|
|
500
|
-
qt as _,
|
|
501
|
-
Ht as a,
|
|
502
|
-
vl as i,
|
|
503
|
-
Ue as s
|
|
504
|
-
};
|