xto-fronted 0.2.1 → 0.2.3
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/components/Layout/Breadcrumb.vue.d.ts +2 -0
- package/dist/index.es.js +622 -575
- package/dist/index.umd.js +7 -7
- package/dist/router/dynamicRoutes.d.ts +2 -0
- package/dist/router/index.d.ts +2 -1
- package/dist/router/staticRoutes.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/utils/request.d.ts +5 -0
- package/package.json +11 -11
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Message as
|
|
3
|
-
import { ref as C, computed as
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { Menu as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Switch as
|
|
1
|
+
import Ue from "axios";
|
|
2
|
+
import { Message as R, Tooltip as Pe, Drawer as Me } from "@xto/feedback";
|
|
3
|
+
import { ref as C, computed as w, watch as Ne, reactive as he, defineComponent as F, openBlock as y, createElementBlock as L, createElementVNode as a, withDirectives as _e, toDisplayString as T, unref as h, vShow as ve, createVNode as x, isRef as ge, withCtx as I, Fragment as M, renderList as j, createBlock as V, createTextVNode as oe, createCommentVNode as D, normalizeClass as ae, onMounted as Be, onUnmounted as Re, withModifiers as Ae, Transition as Ve, resolveComponent as De, normalizeStyle as Fe, withKeys as Oe } from "vue";
|
|
4
|
+
import { defineStore as re } from "pinia";
|
|
5
|
+
import { useRouter as W, useRoute as le, createRouter as ye, createWebHistory as we } from "vue-router";
|
|
6
|
+
import { Menu as be, SubMenu as ke, MenuItem as se } from "@xto/navigation";
|
|
7
|
+
import { Button as ce, Icon as q } from "@xto/base";
|
|
8
|
+
import { Switch as fe, Input as de, Form as ze, FormItem as ue } from "@xto/form";
|
|
9
9
|
const He = {
|
|
10
10
|
appName: "XTO App",
|
|
11
11
|
baseUrl: "",
|
|
@@ -15,16 +15,16 @@ const He = {
|
|
|
15
15
|
loginPath: "/login"
|
|
16
16
|
};
|
|
17
17
|
let ne = { ...He };
|
|
18
|
-
function
|
|
18
|
+
function je(e) {
|
|
19
19
|
ne = { ...ne, ...e };
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function N() {
|
|
22
22
|
return ne;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Fs(e) {
|
|
25
25
|
return ne[e];
|
|
26
26
|
}
|
|
27
|
-
const Q = () => `tooyu-cloud:${
|
|
27
|
+
const Q = () => `tooyu-cloud:${N().appId}:`, Ce = (e) => ({
|
|
28
28
|
get(s) {
|
|
29
29
|
const t = Q(), n = e.getItem(t + s);
|
|
30
30
|
if (!n) return null;
|
|
@@ -53,17 +53,17 @@ const Q = () => `tooyu-cloud:${P().appId}:`, be = (e) => ({
|
|
|
53
53
|
n.startsWith(s) && e.removeItem(n);
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
}), Z =
|
|
56
|
+
}), Z = Ce(window.localStorage), ee = Ce(window.sessionStorage), k = {
|
|
57
57
|
get: Z.get,
|
|
58
58
|
set: Z.set,
|
|
59
59
|
remove: Z.remove,
|
|
60
60
|
clear: Z.clear
|
|
61
|
-
},
|
|
61
|
+
}, Os = {
|
|
62
62
|
get: ee.get,
|
|
63
63
|
set: ee.set,
|
|
64
64
|
remove: ee.remove,
|
|
65
65
|
clear: ee.clear
|
|
66
|
-
},
|
|
66
|
+
}, pe = "login_info", Ke = "user_info", G = () => k.get(pe), qe = (e) => {
|
|
67
67
|
const s = {
|
|
68
68
|
accessToken: e.access_token,
|
|
69
69
|
refreshToken: e.refresh_token,
|
|
@@ -72,20 +72,20 @@ const Q = () => `tooyu-cloud:${P().appId}:`, be = (e) => ({
|
|
|
72
72
|
tokenType: e.token_type,
|
|
73
73
|
code: e.code
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
const e =
|
|
75
|
+
k.set(pe, s);
|
|
76
|
+
}, Le = () => {
|
|
77
|
+
const e = G();
|
|
78
78
|
return (e == null ? void 0 : e.accessToken) || null;
|
|
79
|
-
},
|
|
80
|
-
const e =
|
|
79
|
+
}, We = () => {
|
|
80
|
+
const e = G();
|
|
81
81
|
return (e == null ? void 0 : e.tokenType) || "Bearer";
|
|
82
|
-
},
|
|
83
|
-
const e =
|
|
82
|
+
}, zs = () => {
|
|
83
|
+
const e = G();
|
|
84
84
|
return (e == null ? void 0 : e.code) || null;
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
const e =
|
|
85
|
+
}, xe = () => {
|
|
86
|
+
k.remove(pe), k.remove(Ke);
|
|
87
|
+
}, Ie = () => !!Le(), Ye = () => {
|
|
88
|
+
const e = N(), s = Ue.create({
|
|
89
89
|
baseURL: e.baseUrl,
|
|
90
90
|
timeout: 15e3,
|
|
91
91
|
headers: {
|
|
@@ -94,9 +94,9 @@ const Q = () => `tooyu-cloud:${P().appId}:`, be = (e) => ({
|
|
|
94
94
|
});
|
|
95
95
|
return s.interceptors.request.use(
|
|
96
96
|
(t) => {
|
|
97
|
-
const n =
|
|
97
|
+
const n = Le();
|
|
98
98
|
if (n) {
|
|
99
|
-
const o =
|
|
99
|
+
const o = We();
|
|
100
100
|
t.headers.Authorization = `${o} ${n}`;
|
|
101
101
|
}
|
|
102
102
|
return t;
|
|
@@ -104,8 +104,10 @@ const Q = () => `tooyu-cloud:${P().appId}:`, be = (e) => ({
|
|
|
104
104
|
(t) => Promise.reject(t)
|
|
105
105
|
), s.interceptors.response.use(
|
|
106
106
|
(t) => {
|
|
107
|
+
if (t.config.responseType === "blob")
|
|
108
|
+
return t;
|
|
107
109
|
const { data: n } = t;
|
|
108
|
-
return n.code === 200 || n.code === 0 ? t : (
|
|
110
|
+
return n.code === 200 || n.code === 0 ? t : (R.error(n.message || "请求失败"), Promise.reject(new Error(n.message || "请求失败")));
|
|
109
111
|
},
|
|
110
112
|
(t) => {
|
|
111
113
|
var o;
|
|
@@ -114,25 +116,25 @@ const Q = () => `tooyu-cloud:${P().appId}:`, be = (e) => ({
|
|
|
114
116
|
switch (n.status) {
|
|
115
117
|
case 401:
|
|
116
118
|
case 403:
|
|
117
|
-
|
|
119
|
+
R.error("登录已过期,请重新登录"), xe(), window.location.href = "/login";
|
|
118
120
|
break;
|
|
119
121
|
case 404:
|
|
120
|
-
|
|
122
|
+
R.error("请求资源不存在");
|
|
121
123
|
break;
|
|
122
124
|
case 500:
|
|
123
|
-
|
|
125
|
+
R.error("服务器错误");
|
|
124
126
|
break;
|
|
125
127
|
default:
|
|
126
|
-
|
|
128
|
+
R.error(((o = n.data) == null ? void 0 : o.message) || "请求失败");
|
|
127
129
|
}
|
|
128
130
|
else
|
|
129
|
-
|
|
131
|
+
R.error("网络连接失败");
|
|
130
132
|
return Promise.reject(t);
|
|
131
133
|
}
|
|
132
134
|
), s;
|
|
133
135
|
};
|
|
134
136
|
let te = null;
|
|
135
|
-
function
|
|
137
|
+
function H() {
|
|
136
138
|
return te || (te = Ye()), te;
|
|
137
139
|
}
|
|
138
140
|
function Ge() {
|
|
@@ -140,97 +142,111 @@ function Ge() {
|
|
|
140
142
|
}
|
|
141
143
|
new Proxy({}, {
|
|
142
144
|
get(e, s) {
|
|
143
|
-
return
|
|
145
|
+
return H()[s];
|
|
144
146
|
}
|
|
145
147
|
});
|
|
146
|
-
const
|
|
148
|
+
const J = {
|
|
147
149
|
get(e, s) {
|
|
148
|
-
return
|
|
150
|
+
return H().get(e, s).then((t) => t.data);
|
|
149
151
|
},
|
|
150
152
|
post(e, s, t) {
|
|
151
|
-
return
|
|
153
|
+
return H().post(e, s, t).then((n) => n.data);
|
|
152
154
|
},
|
|
153
155
|
put(e, s, t) {
|
|
154
|
-
return
|
|
156
|
+
return H().put(e, s, t).then((n) => n.data);
|
|
155
157
|
},
|
|
156
158
|
patch(e, s, t) {
|
|
157
|
-
return
|
|
159
|
+
return H().patch(e, s, t).then((n) => n.data);
|
|
158
160
|
},
|
|
159
161
|
delete(e, s) {
|
|
160
|
-
return
|
|
162
|
+
return H().delete(e, s).then((t) => t.data);
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* 下载文件(blob 响应)
|
|
166
|
+
* 直接返回 Blob 对象,绕过响应拦截器的业务错误处理
|
|
167
|
+
*/
|
|
168
|
+
download(e, s) {
|
|
169
|
+
return H().get(e, { ...s, responseType: "blob" }).then((t) => (t.headers["content-type"] || "").includes("application/json") ? t.data.text().then((o) => {
|
|
170
|
+
try {
|
|
171
|
+
const d = JSON.parse(o);
|
|
172
|
+
return R.error(d.message || "请求失败"), Promise.reject(new Error(d.message || "请求失败"));
|
|
173
|
+
} catch {
|
|
174
|
+
return R.error("请求失败"), Promise.reject(new Error("请求失败"));
|
|
175
|
+
}
|
|
176
|
+
}) : t.data);
|
|
161
177
|
}
|
|
162
|
-
},
|
|
163
|
-
const e = C(
|
|
164
|
-
e.value = !e.value, s.value = e.value ? "dark" : "light",
|
|
178
|
+
}, $e = "/vite.svg", X = re("app", () => {
|
|
179
|
+
const e = C(k.get("isDark") || !1), s = C(k.get("theme") || "light"), t = C(k.get("layout") || "sidebar"), n = C(k.get("isCollapsed") || !1), o = C(k.get("showTabs") ?? !0), d = C(k.get("showFooter") ?? !0), l = C(k.get("showBreadcrumb") ?? !0), r = C(k.get("primaryColor") || "#409eff"), i = C(k.get("isGrayscale") || !1), u = C([]), p = w(() => e.value ? "dark" : "light"), f = () => {
|
|
180
|
+
e.value = !e.value, s.value = e.value ? "dark" : "light", _();
|
|
165
181
|
}, v = ($) => {
|
|
166
|
-
s.value = $, e.value = $ === "dark",
|
|
167
|
-
},
|
|
182
|
+
s.value = $, e.value = $ === "dark", _();
|
|
183
|
+
}, _ = () => {
|
|
168
184
|
const $ = document.documentElement;
|
|
169
|
-
e.value ? $.classList.add("dark") : $.classList.remove("dark"),
|
|
185
|
+
e.value ? $.classList.add("dark") : $.classList.remove("dark"), k.set("isDark", e.value), k.set("theme", s.value);
|
|
170
186
|
}, c = () => {
|
|
171
|
-
n.value = !n.value,
|
|
172
|
-
},
|
|
173
|
-
t.value = $,
|
|
174
|
-
},
|
|
175
|
-
o.value = !o.value,
|
|
176
|
-
},
|
|
177
|
-
|
|
187
|
+
n.value = !n.value, k.set("isCollapsed", n.value);
|
|
188
|
+
}, g = ($) => {
|
|
189
|
+
t.value = $, k.set("layout", $);
|
|
190
|
+
}, m = () => {
|
|
191
|
+
o.value = !o.value, k.set("showTabs", o.value);
|
|
192
|
+
}, b = () => {
|
|
193
|
+
d.value = !d.value, k.set("showFooter", d.value);
|
|
178
194
|
}, E = () => {
|
|
179
|
-
l.value = !l.value,
|
|
180
|
-
},
|
|
181
|
-
r.value = $, document.documentElement.style.setProperty("--color-primary", $),
|
|
195
|
+
l.value = !l.value, k.set("showBreadcrumb", l.value);
|
|
196
|
+
}, P = ($) => {
|
|
197
|
+
r.value = $, document.documentElement.style.setProperty("--color-primary", $), k.set("primaryColor", $);
|
|
182
198
|
}, O = ($) => {
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
$ ?
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
},
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
|
|
199
|
+
i.value = $;
|
|
200
|
+
const Y = document.documentElement;
|
|
201
|
+
$ ? Y.classList.add("grayscale") : Y.classList.remove("grayscale"), k.set("isGrayscale", $);
|
|
202
|
+
}, z = ($) => {
|
|
203
|
+
u.value.includes($) || u.value.push($);
|
|
204
|
+
}, B = ($) => {
|
|
205
|
+
const Y = u.value.indexOf($);
|
|
206
|
+
Y > -1 && u.value.splice(Y, 1);
|
|
207
|
+
}, S = () => {
|
|
208
|
+
u.value = [];
|
|
193
209
|
}, U = () => {
|
|
194
|
-
|
|
210
|
+
_(), r.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", r.value), i.value && document.documentElement.classList.add("grayscale");
|
|
195
211
|
};
|
|
196
|
-
return
|
|
212
|
+
return Ne(e, _), {
|
|
197
213
|
isDark: e,
|
|
198
214
|
theme: s,
|
|
199
215
|
layout: t,
|
|
200
216
|
isCollapsed: n,
|
|
201
217
|
showTabs: o,
|
|
202
|
-
showFooter:
|
|
218
|
+
showFooter: d,
|
|
203
219
|
showBreadcrumb: l,
|
|
204
220
|
primaryColor: r,
|
|
205
|
-
isGrayscale:
|
|
206
|
-
cachedViews:
|
|
221
|
+
isGrayscale: i,
|
|
222
|
+
cachedViews: u,
|
|
207
223
|
themeClass: p,
|
|
208
224
|
toggleTheme: f,
|
|
209
225
|
toggleCollapse: c,
|
|
210
226
|
setTheme: v,
|
|
211
|
-
setLayout:
|
|
212
|
-
toggleTabs:
|
|
213
|
-
toggleFooter:
|
|
227
|
+
setLayout: g,
|
|
228
|
+
toggleTabs: m,
|
|
229
|
+
toggleFooter: b,
|
|
214
230
|
toggleBreadcrumb: E,
|
|
215
|
-
setPrimaryColor:
|
|
231
|
+
setPrimaryColor: P,
|
|
216
232
|
setGrayscale: O,
|
|
217
|
-
addCachedView:
|
|
218
|
-
removeCachedView:
|
|
219
|
-
clearCachedViews:
|
|
233
|
+
addCachedView: z,
|
|
234
|
+
removeCachedView: B,
|
|
235
|
+
clearCachedViews: S,
|
|
220
236
|
initTheme: U
|
|
221
237
|
};
|
|
222
|
-
}),
|
|
223
|
-
const e = C(
|
|
224
|
-
|
|
238
|
+
}), Te = re("auth", () => {
|
|
239
|
+
const e = C(G()), s = w(() => Ie()), t = (r) => {
|
|
240
|
+
qe(r), e.value = G();
|
|
225
241
|
}, n = () => {
|
|
226
|
-
e.value = null,
|
|
227
|
-
}, o =
|
|
242
|
+
e.value = null, xe();
|
|
243
|
+
}, o = w(() => {
|
|
228
244
|
var r;
|
|
229
245
|
return ((r = e.value) == null ? void 0 : r.accessToken) || null;
|
|
230
|
-
}),
|
|
246
|
+
}), d = w(() => {
|
|
231
247
|
var r;
|
|
232
248
|
return ((r = e.value) == null ? void 0 : r.tokenType) || "Bearer";
|
|
233
|
-
}), l =
|
|
249
|
+
}), l = w(() => {
|
|
234
250
|
var r;
|
|
235
251
|
return ((r = e.value) == null ? void 0 : r.code) || null;
|
|
236
252
|
});
|
|
@@ -238,19 +254,19 @@ const X = {
|
|
|
238
254
|
loginInfo: e,
|
|
239
255
|
isLoggedIn: s,
|
|
240
256
|
accessToken: o,
|
|
241
|
-
tokenType:
|
|
257
|
+
tokenType: d,
|
|
242
258
|
code: l,
|
|
243
259
|
login: t,
|
|
244
260
|
logout: n
|
|
245
261
|
};
|
|
246
|
-
}),
|
|
247
|
-
const e = C(
|
|
262
|
+
}), Se = re("user", () => {
|
|
263
|
+
const e = C(k.get("user_info")), s = w(() => !!e.value), t = w(() => {
|
|
248
264
|
var r;
|
|
249
265
|
return ((r = e.value) == null ? void 0 : r.userName) || "";
|
|
250
|
-
}), n =
|
|
266
|
+
}), n = w(() => {
|
|
251
267
|
var r;
|
|
252
268
|
return ((r = e.value) == null ? void 0 : r.avatar) || "";
|
|
253
|
-
}), o =
|
|
269
|
+
}), o = w(() => {
|
|
254
270
|
var r;
|
|
255
271
|
return (r = e.value) == null ? void 0 : r.userId;
|
|
256
272
|
});
|
|
@@ -261,75 +277,75 @@ const X = {
|
|
|
261
277
|
avatar: n,
|
|
262
278
|
userId: o,
|
|
263
279
|
setUserInfo: (r) => {
|
|
264
|
-
e.value = r,
|
|
280
|
+
e.value = r, k.set("user_info", r);
|
|
265
281
|
},
|
|
266
282
|
clearUserInfo: () => {
|
|
267
|
-
e.value = null,
|
|
283
|
+
e.value = null, k.remove("user_info");
|
|
268
284
|
}
|
|
269
285
|
};
|
|
270
|
-
}),
|
|
271
|
-
const e = "menu_list", s = "menu_btn_list", t = C(
|
|
272
|
-
const f =
|
|
286
|
+
}), K = re("menu", () => {
|
|
287
|
+
const e = "menu_list", s = "menu_btn_list", t = C(k.get(e) || []), n = C(k.get(s) || {}), o = w(() => t.value.length > 0), d = w(() => {
|
|
288
|
+
const f = N();
|
|
273
289
|
function v(c) {
|
|
274
290
|
if (c && c.length > 0)
|
|
275
|
-
for (let
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
return
|
|
291
|
+
for (let g = 0; g < c.length; g++) {
|
|
292
|
+
const m = c[g];
|
|
293
|
+
if (m.default)
|
|
294
|
+
return m.path;
|
|
279
295
|
{
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
return
|
|
296
|
+
const b = v(m.children || []);
|
|
297
|
+
if (b)
|
|
298
|
+
return b;
|
|
283
299
|
}
|
|
284
300
|
}
|
|
285
301
|
return null;
|
|
286
302
|
}
|
|
287
303
|
return v(t.value) || f.indexPath || "/dashboard";
|
|
288
304
|
}), l = (f, v) => {
|
|
289
|
-
const
|
|
305
|
+
const _ = [];
|
|
290
306
|
return !f || f.length <= 0 || f.forEach((c) => {
|
|
291
307
|
if (c.type === 1) {
|
|
292
|
-
const
|
|
308
|
+
const g = {
|
|
293
309
|
code: c.menuCode,
|
|
294
310
|
name: c.menuName,
|
|
295
311
|
path: "",
|
|
296
312
|
title: c.menuName
|
|
297
|
-
},
|
|
298
|
-
let
|
|
299
|
-
|
|
313
|
+
}, m = v || "";
|
|
314
|
+
let b = n.value[m] || [];
|
|
315
|
+
b.push(g), n.value[m] = b;
|
|
300
316
|
} else {
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
!
|
|
317
|
+
const g = [];
|
|
318
|
+
let m = c.menuUrl, b = c.isOut || !1;
|
|
319
|
+
!b && c.menuUrl && (c.menuUrl.startsWith("http") ? m = "/iframe/" + encodeURIComponent(m) : c.menuUrl.startsWith("keep-alive:") && (m = "/iframe/keep-alive/" + encodeURIComponent(m.split("keep-alive:")[1])));
|
|
304
320
|
const E = {
|
|
305
321
|
code: c.menuCode,
|
|
306
322
|
name: c.menuName,
|
|
307
|
-
path:
|
|
323
|
+
path: m,
|
|
308
324
|
icon: "grid",
|
|
309
325
|
closable: c.closable,
|
|
310
326
|
default: c.isDefault,
|
|
311
|
-
out:
|
|
312
|
-
children:
|
|
327
|
+
out: b,
|
|
328
|
+
children: g,
|
|
313
329
|
title: c.menuName
|
|
314
330
|
};
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
E.children =
|
|
331
|
+
if (_.push(E), c.children && c.children.length > 0) {
|
|
332
|
+
const P = l(c.children, c.menuUrl);
|
|
333
|
+
E.children = P;
|
|
318
334
|
}
|
|
319
335
|
}
|
|
320
|
-
}),
|
|
336
|
+
}), _;
|
|
321
337
|
}, r = (f) => {
|
|
322
|
-
t.value = f,
|
|
323
|
-
},
|
|
324
|
-
const v = t.value.findIndex((
|
|
338
|
+
t.value = f, k.set(e, f);
|
|
339
|
+
}, i = (f) => {
|
|
340
|
+
const v = t.value.findIndex((_) => _.code === "home");
|
|
325
341
|
v > -1 && t.value.splice(v, 1), t.value.unshift({
|
|
326
342
|
...f,
|
|
327
343
|
code: "home",
|
|
328
344
|
name: "首页"
|
|
329
|
-
}),
|
|
330
|
-
},
|
|
345
|
+
}), k.set(e, t.value);
|
|
346
|
+
}, u = (f, v) => {
|
|
331
347
|
if (p(), !(v != null && v.skipIndexMenu)) {
|
|
332
|
-
const c =
|
|
348
|
+
const c = N();
|
|
333
349
|
t.value.push({
|
|
334
350
|
code: "home",
|
|
335
351
|
name: "首页",
|
|
@@ -341,25 +357,25 @@ const X = {
|
|
|
341
357
|
title: "首页"
|
|
342
358
|
});
|
|
343
359
|
}
|
|
344
|
-
const
|
|
345
|
-
t.value.push(...
|
|
360
|
+
const _ = l(f);
|
|
361
|
+
t.value.push(..._), k.set(e, t.value), k.set(s, n.value);
|
|
346
362
|
}, p = () => {
|
|
347
|
-
t.value = [], n.value = {},
|
|
363
|
+
t.value = [], n.value = {}, k.remove(e), k.remove(s);
|
|
348
364
|
};
|
|
349
365
|
return {
|
|
350
366
|
menuList: t,
|
|
351
367
|
menuBtnListMap: n,
|
|
352
368
|
hasMenu: o,
|
|
353
|
-
index:
|
|
369
|
+
index: d,
|
|
354
370
|
setMenuList: r,
|
|
355
|
-
setIndexMenu:
|
|
356
|
-
setMenuFromRemote:
|
|
371
|
+
setIndexMenu: i,
|
|
372
|
+
setMenuFromRemote: u,
|
|
357
373
|
clearMenu: p
|
|
358
374
|
};
|
|
359
375
|
});
|
|
360
|
-
function
|
|
361
|
-
const s =
|
|
362
|
-
return
|
|
376
|
+
function Je(e) {
|
|
377
|
+
const s = N();
|
|
378
|
+
return J.post("/user/v1.0/login/by-domain", {
|
|
363
379
|
appId: s.appId,
|
|
364
380
|
clientId: s.clientId,
|
|
365
381
|
uid: e.uid,
|
|
@@ -367,95 +383,95 @@ function Xe(e) {
|
|
|
367
383
|
code: !0
|
|
368
384
|
});
|
|
369
385
|
}
|
|
370
|
-
function
|
|
371
|
-
return
|
|
386
|
+
function Xe() {
|
|
387
|
+
return J.put("/user/v1.0/user/logout");
|
|
372
388
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
389
|
+
function Hs(e, s) {
|
|
390
|
+
return J.get(`/user/v1.0/login/by-code?appId=${e}&code=${s}`);
|
|
375
391
|
}
|
|
376
392
|
function Qe() {
|
|
377
|
-
return
|
|
393
|
+
return J.get("/user/v1.0/user/get-me");
|
|
378
394
|
}
|
|
379
395
|
function Ze() {
|
|
380
|
-
const e =
|
|
381
|
-
return
|
|
396
|
+
const e = N();
|
|
397
|
+
return J.get(`/user/v1.0/menu/get-menu?appId=${e.appId}`);
|
|
382
398
|
}
|
|
383
|
-
function
|
|
384
|
-
const e =
|
|
385
|
-
|
|
399
|
+
function ie() {
|
|
400
|
+
const e = W(), s = le(), t = Te(), n = Se(), o = K(), d = C(!1), l = w(() => t.isLoggedIn), r = w(() => n.userInfo), i = w(() => n.userName || ""), u = w(() => o.menuList), p = w(() => o.index), f = async (b, E) => {
|
|
401
|
+
d.value = !0;
|
|
386
402
|
try {
|
|
387
|
-
|
|
388
|
-
const O = (await
|
|
389
|
-
t.login(O), await
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
const
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
location.href =
|
|
403
|
+
m();
|
|
404
|
+
const O = (await Je({ uid: b, password: E })).data;
|
|
405
|
+
t.login(O), await _(), await c();
|
|
406
|
+
const z = s.query.redirectUrl;
|
|
407
|
+
if (z) {
|
|
408
|
+
const B = decodeURIComponent(z);
|
|
409
|
+
if (B.startsWith("http")) {
|
|
410
|
+
const S = O.code;
|
|
411
|
+
location.href = B.includes("?") ? `${B}&code=${S}` : `${B}?code=${S}`;
|
|
396
412
|
} else
|
|
397
|
-
await e.replace(
|
|
413
|
+
await e.replace(B);
|
|
398
414
|
} else
|
|
399
415
|
await e.replace(p.value || "/");
|
|
400
|
-
return
|
|
401
|
-
} catch (
|
|
402
|
-
return
|
|
416
|
+
return R.success("登录成功"), { success: !0, data: O };
|
|
417
|
+
} catch (P) {
|
|
418
|
+
return R.error((P == null ? void 0 : P.message) || "登录失败"), { success: !1, error: P };
|
|
403
419
|
} finally {
|
|
404
|
-
|
|
420
|
+
d.value = !1;
|
|
405
421
|
}
|
|
406
|
-
}, v = async (
|
|
407
|
-
const E =
|
|
422
|
+
}, v = async (b = !0) => {
|
|
423
|
+
const E = N();
|
|
408
424
|
try {
|
|
409
|
-
await
|
|
410
|
-
} catch (
|
|
411
|
-
console.error("退出登录接口失败",
|
|
425
|
+
await Xe();
|
|
426
|
+
} catch (P) {
|
|
427
|
+
console.error("退出登录接口失败", P);
|
|
412
428
|
} finally {
|
|
413
|
-
|
|
429
|
+
m(), e.push(E.loginPath || "/login"), b && R.success("退出登录成功");
|
|
414
430
|
}
|
|
415
|
-
},
|
|
416
|
-
const
|
|
417
|
-
return n.setUserInfo(
|
|
431
|
+
}, _ = async () => {
|
|
432
|
+
const b = await Qe();
|
|
433
|
+
return n.setUserInfo(b.data), b.data;
|
|
418
434
|
}, c = async () => {
|
|
419
|
-
const
|
|
420
|
-
return o.setMenuFromRemote(
|
|
421
|
-
},
|
|
435
|
+
const b = await Ze();
|
|
436
|
+
return o.setMenuFromRemote(b.data), o.menuList;
|
|
437
|
+
}, g = async () => {
|
|
422
438
|
if (!t.isLoggedIn)
|
|
423
439
|
return !1;
|
|
424
440
|
try {
|
|
425
|
-
return n.userInfo || await
|
|
426
|
-
} catch (
|
|
427
|
-
return console.error("初始化应用失败",
|
|
441
|
+
return n.userInfo || await _(), o.hasMenu || await c(), !0;
|
|
442
|
+
} catch (b) {
|
|
443
|
+
return console.error("初始化应用失败", b), m(), !1;
|
|
428
444
|
}
|
|
429
|
-
},
|
|
445
|
+
}, m = () => {
|
|
430
446
|
t.logout(), n.clearUserInfo(), o.clearMenu();
|
|
431
447
|
};
|
|
432
448
|
return {
|
|
433
449
|
// 状态
|
|
434
|
-
loading:
|
|
450
|
+
loading: d,
|
|
435
451
|
isLoggedIn: l,
|
|
436
452
|
userInfo: r,
|
|
437
|
-
userName:
|
|
438
|
-
menuList:
|
|
453
|
+
userName: i,
|
|
454
|
+
menuList: u,
|
|
439
455
|
indexPath: p,
|
|
440
456
|
// 方法
|
|
441
457
|
login: f,
|
|
442
458
|
logout: v,
|
|
443
|
-
loadUserInfo:
|
|
459
|
+
loadUserInfo: _,
|
|
444
460
|
loadMenu: c,
|
|
445
|
-
initApp:
|
|
446
|
-
clearAllState:
|
|
461
|
+
initApp: g,
|
|
462
|
+
clearAllState: m
|
|
447
463
|
};
|
|
448
464
|
}
|
|
449
|
-
function
|
|
450
|
-
const e =
|
|
451
|
-
const f = window.location.pathname,
|
|
452
|
-
return Array.isArray(p) ? p.some((c) =>
|
|
465
|
+
function js() {
|
|
466
|
+
const e = K(), s = Te(), t = Se(), n = w(() => s.isLoggedIn), o = w(() => t.userName), d = w(() => t.userInfo), l = (p) => {
|
|
467
|
+
const f = window.location.pathname, _ = (e.menuBtnListMap[f] || []).map((c) => c.code);
|
|
468
|
+
return Array.isArray(p) ? p.some((c) => _.includes(c)) : _.includes(p);
|
|
453
469
|
};
|
|
454
470
|
return {
|
|
455
471
|
// 状态
|
|
456
472
|
isLoggedIn: n,
|
|
457
473
|
userName: o,
|
|
458
|
-
userInfo:
|
|
474
|
+
userInfo: d,
|
|
459
475
|
// 方法
|
|
460
476
|
hasPermission: l,
|
|
461
477
|
hasAnyPermission: (p) => p.some((f) => l(f)),
|
|
@@ -466,222 +482,223 @@ function Ds() {
|
|
|
466
482
|
}
|
|
467
483
|
};
|
|
468
484
|
}
|
|
469
|
-
function
|
|
470
|
-
const e =
|
|
471
|
-
const
|
|
472
|
-
return
|
|
473
|
-
E.children && E.children.length > 0 ?
|
|
474
|
-
}),
|
|
475
|
-
}, p =
|
|
476
|
-
(
|
|
477
|
-
) : []), f =
|
|
478
|
-
if (
|
|
479
|
-
const
|
|
480
|
-
(
|
|
485
|
+
function Ee() {
|
|
486
|
+
const e = le(), s = W(), t = K(), n = X(), o = C(""), d = w(() => e.path), l = w(() => n.isCollapsed), r = w(() => t.menuList), i = w(() => t.hasMenu), u = (g, m = "") => {
|
|
487
|
+
const b = [];
|
|
488
|
+
return g.forEach((E) => {
|
|
489
|
+
E.children && E.children.length > 0 ? b.push(...u(E.children, E.title)) : b.push({ ...E, parentTitle: m });
|
|
490
|
+
}), b;
|
|
491
|
+
}, p = w(() => o.value.trim() ? u(r.value).filter(
|
|
492
|
+
(m) => m.title.toLowerCase().includes(o.value.toLowerCase())
|
|
493
|
+
) : []), f = w(() => o.value.trim() ? r.value.map((g) => {
|
|
494
|
+
if (g.children && g.children.length > 0) {
|
|
495
|
+
const m = g.children.filter(
|
|
496
|
+
(b) => b.title.toLowerCase().includes(o.value.toLowerCase())
|
|
481
497
|
);
|
|
482
|
-
return
|
|
498
|
+
return m.length > 0 ? { ...g, children: m } : null;
|
|
483
499
|
}
|
|
484
|
-
return
|
|
500
|
+
return g.title.toLowerCase().includes(o.value.toLowerCase()) ? g : null;
|
|
485
501
|
}).filter(Boolean) : r.value);
|
|
486
502
|
return {
|
|
487
503
|
// 状态
|
|
488
504
|
searchKeyword: o,
|
|
489
|
-
activeMenu:
|
|
505
|
+
activeMenu: d,
|
|
490
506
|
isCollapsed: l,
|
|
491
507
|
menuList: r,
|
|
492
|
-
hasMenu:
|
|
508
|
+
hasMenu: i,
|
|
493
509
|
searchResults: p,
|
|
494
510
|
filteredMenuList: f,
|
|
495
511
|
// 方法
|
|
496
|
-
flattenMenus:
|
|
497
|
-
handleMenuSelect: (
|
|
498
|
-
|
|
512
|
+
flattenMenus: u,
|
|
513
|
+
handleMenuSelect: (g) => {
|
|
514
|
+
g && g !== e.path && (s.push(g), o.value = "");
|
|
499
515
|
},
|
|
500
|
-
handleSearchItemClick: (
|
|
501
|
-
s.push(
|
|
516
|
+
handleSearchItemClick: (g) => {
|
|
517
|
+
s.push(g), o.value = "";
|
|
502
518
|
},
|
|
503
519
|
clearSearch: () => {
|
|
504
520
|
o.value = "";
|
|
505
521
|
}
|
|
506
522
|
};
|
|
507
523
|
}
|
|
508
|
-
function
|
|
509
|
-
const { rules: t, onSubmit: n } = s, o = C(),
|
|
510
|
-
v(),
|
|
524
|
+
function Ks(e, s = {}) {
|
|
525
|
+
const { rules: t, onSubmit: n } = s, o = C(), d = he({ ...e }), l = C(!1), r = C(!1), i = C(!1), u = () => {
|
|
526
|
+
v(), i.value = !1, r.value = !0;
|
|
511
527
|
}, p = (c) => {
|
|
512
|
-
Object.assign(
|
|
528
|
+
Object.assign(d, c), i.value = !0, r.value = !0;
|
|
513
529
|
}, f = () => {
|
|
514
530
|
r.value = !1, v();
|
|
515
531
|
}, v = () => {
|
|
516
532
|
var c;
|
|
517
|
-
Object.keys(e).forEach((
|
|
518
|
-
|
|
533
|
+
Object.keys(e).forEach((g) => {
|
|
534
|
+
d[g] = e[g];
|
|
519
535
|
}), (c = o.value) == null || c.resetFields();
|
|
520
536
|
};
|
|
521
537
|
return {
|
|
522
538
|
formRef: o,
|
|
523
|
-
formData:
|
|
539
|
+
formData: d,
|
|
524
540
|
rules: t,
|
|
525
541
|
loading: l,
|
|
526
542
|
visible: r,
|
|
527
|
-
isEdit:
|
|
528
|
-
openAdd:
|
|
543
|
+
isEdit: i,
|
|
544
|
+
openAdd: u,
|
|
529
545
|
openEdit: p,
|
|
530
546
|
close: f,
|
|
531
547
|
resetForm: v,
|
|
532
548
|
handleSubmit: async () => {
|
|
533
549
|
var c;
|
|
534
550
|
try {
|
|
535
|
-
await ((c = o.value) == null ? void 0 : c.validate()), l.value = !0, await (n == null ? void 0 : n(
|
|
536
|
-
} catch (
|
|
537
|
-
console.error(
|
|
551
|
+
await ((c = o.value) == null ? void 0 : c.validate()), l.value = !0, await (n == null ? void 0 : n(d)), f();
|
|
552
|
+
} catch (g) {
|
|
553
|
+
console.error(g);
|
|
538
554
|
} finally {
|
|
539
555
|
l.value = !1;
|
|
540
556
|
}
|
|
541
557
|
}
|
|
542
558
|
};
|
|
543
559
|
}
|
|
544
|
-
function
|
|
545
|
-
const { fetchData: s, defaultPageSize: t = 10 } = e, n = C(!1), o = C([]),
|
|
560
|
+
function qs(e) {
|
|
561
|
+
const { fetchData: s, defaultPageSize: t = 10 } = e, n = C(!1), o = C([]), d = C(0), l = C(1), r = C(t), i = he({}), u = async () => {
|
|
546
562
|
n.value = !0;
|
|
547
563
|
try {
|
|
548
|
-
const
|
|
549
|
-
...
|
|
564
|
+
const m = {
|
|
565
|
+
...i,
|
|
550
566
|
page: l.value,
|
|
551
567
|
pageSize: r.value
|
|
552
|
-
},
|
|
553
|
-
o.value =
|
|
554
|
-
} catch (
|
|
555
|
-
console.error(
|
|
568
|
+
}, b = await s(m);
|
|
569
|
+
o.value = b.list, d.value = b.total;
|
|
570
|
+
} catch (m) {
|
|
571
|
+
console.error(m);
|
|
556
572
|
} finally {
|
|
557
573
|
n.value = !1;
|
|
558
574
|
}
|
|
559
575
|
}, p = () => {
|
|
560
|
-
l.value = 1,
|
|
576
|
+
l.value = 1, u();
|
|
561
577
|
}, f = () => {
|
|
562
|
-
Object.keys(
|
|
563
|
-
|
|
564
|
-
}), l.value = 1,
|
|
565
|
-
}, v = (
|
|
566
|
-
l.value =
|
|
567
|
-
},
|
|
568
|
-
r.value =
|
|
578
|
+
Object.keys(i).forEach((m) => {
|
|
579
|
+
i[m] = void 0;
|
|
580
|
+
}), l.value = 1, u();
|
|
581
|
+
}, v = (m) => {
|
|
582
|
+
l.value = m, u();
|
|
583
|
+
}, _ = (m) => {
|
|
584
|
+
r.value = m, l.value = 1, u();
|
|
569
585
|
}, c = () => {
|
|
570
|
-
|
|
571
|
-
},
|
|
586
|
+
u();
|
|
587
|
+
}, g = w(() => ({
|
|
572
588
|
current: l.value,
|
|
573
589
|
pageSize: r.value,
|
|
574
|
-
total:
|
|
590
|
+
total: d.value
|
|
575
591
|
}));
|
|
576
592
|
return {
|
|
577
593
|
loading: n,
|
|
578
594
|
data: o,
|
|
579
|
-
total:
|
|
595
|
+
total: d,
|
|
580
596
|
currentPage: l,
|
|
581
597
|
pageSize: r,
|
|
582
|
-
searchParams:
|
|
583
|
-
pagination:
|
|
584
|
-
getData:
|
|
598
|
+
searchParams: i,
|
|
599
|
+
pagination: g,
|
|
600
|
+
getData: u,
|
|
585
601
|
handleSearch: p,
|
|
586
602
|
handleReset: f,
|
|
587
603
|
handlePageChange: v,
|
|
588
|
-
handleSizeChange:
|
|
604
|
+
handleSizeChange: _,
|
|
589
605
|
refresh: c
|
|
590
606
|
};
|
|
591
607
|
}
|
|
592
608
|
const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1 }, nt = {
|
|
593
609
|
key: 0,
|
|
594
610
|
class: "sidebar__user"
|
|
595
|
-
}, ot = { class: "sidebar__user-info" }, at = { class: "sidebar__user-name" }, rt = { class: "sidebar__user-role" }, lt = /* @__PURE__ */
|
|
611
|
+
}, ot = { class: "sidebar__user-info" }, at = { class: "sidebar__user-name" }, rt = { class: "sidebar__user-role" }, lt = /* @__PURE__ */ F({
|
|
596
612
|
__name: "Sidebar",
|
|
597
613
|
setup(e) {
|
|
598
|
-
const { logout: s, userName: t, userInfo: n } =
|
|
599
|
-
activeMenu:
|
|
614
|
+
const { logout: s, userName: t, userInfo: n } = ie(), o = N(), {
|
|
615
|
+
activeMenu: d,
|
|
600
616
|
isCollapsed: l,
|
|
601
617
|
filteredMenuList: r,
|
|
602
|
-
handleMenuSelect:
|
|
603
|
-
} =
|
|
604
|
-
return (
|
|
618
|
+
handleMenuSelect: i
|
|
619
|
+
} = Ee();
|
|
620
|
+
return (u, p) => {
|
|
605
621
|
var f;
|
|
606
622
|
return y(), L("div", et, [
|
|
607
623
|
a("div", tt, [
|
|
608
|
-
p[
|
|
609
|
-
src:
|
|
624
|
+
p[1] || (p[1] = a("img", {
|
|
625
|
+
src: $e,
|
|
610
626
|
alt: "Logo",
|
|
611
627
|
class: "sidebar__logo-img"
|
|
612
628
|
}, null, -1)),
|
|
613
|
-
|
|
614
|
-
[ve, !
|
|
629
|
+
_e(a("span", { class: "sidebar__logo-text" }, T(h(o).appName), 513), [
|
|
630
|
+
[ve, !h(l)]
|
|
615
631
|
])
|
|
616
632
|
]),
|
|
617
|
-
x(
|
|
618
|
-
|
|
619
|
-
|
|
633
|
+
x(h(be), {
|
|
634
|
+
modelValue: h(d),
|
|
635
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => ge(d) ? d.value = v : null),
|
|
636
|
+
collapse: h(l),
|
|
620
637
|
"collapse-transition": !1,
|
|
621
638
|
class: "sidebar__menu",
|
|
622
|
-
onSelect: i
|
|
639
|
+
onSelect: h(i)
|
|
623
640
|
}, {
|
|
624
641
|
default: I(() => [
|
|
625
|
-
(y(!0), L(
|
|
642
|
+
(y(!0), L(M, null, j(h(r), (v) => (y(), L(M, {
|
|
626
643
|
key: v.path
|
|
627
644
|
}, [
|
|
628
|
-
v.children && v.children.length > 0 ? (y(),
|
|
645
|
+
v.children && v.children.length > 0 ? (y(), V(h(ke), {
|
|
629
646
|
key: 0,
|
|
630
647
|
index: v.path,
|
|
631
648
|
icon: "grid"
|
|
632
649
|
}, {
|
|
633
650
|
title: I(() => [
|
|
634
|
-
|
|
635
|
-
[ve, !
|
|
651
|
+
_e(a("span", null, T(v.title), 513), [
|
|
652
|
+
[ve, !h(l)]
|
|
636
653
|
])
|
|
637
654
|
]),
|
|
638
655
|
default: I(() => [
|
|
639
|
-
(y(!0), L(
|
|
640
|
-
key:
|
|
641
|
-
index:
|
|
656
|
+
(y(!0), L(M, null, j(v.children, (_) => (y(), V(h(se), {
|
|
657
|
+
key: _.path,
|
|
658
|
+
index: _.path,
|
|
642
659
|
icon: "grid"
|
|
643
660
|
}, {
|
|
644
661
|
default: I(() => [
|
|
645
|
-
a("span", null,
|
|
662
|
+
a("span", null, T(_.title), 1)
|
|
646
663
|
]),
|
|
647
664
|
_: 2
|
|
648
665
|
}, 1032, ["index"]))), 128))
|
|
649
666
|
]),
|
|
650
667
|
_: 2
|
|
651
|
-
}, 1032, ["index"])) : (y(),
|
|
668
|
+
}, 1032, ["index"])) : (y(), V(h(se), {
|
|
652
669
|
key: 1,
|
|
653
670
|
index: v.path,
|
|
654
671
|
icon: "grid"
|
|
655
672
|
}, {
|
|
656
673
|
default: I(() => [
|
|
657
|
-
|
|
674
|
+
h(l) ? (y(), V(h(Pe), {
|
|
658
675
|
key: 0,
|
|
659
676
|
content: v.title,
|
|
660
677
|
placement: "right"
|
|
661
678
|
}, {
|
|
662
|
-
default: I(() => [...p[
|
|
679
|
+
default: I(() => [...p[2] || (p[2] = [
|
|
663
680
|
a("span", null, null, -1)
|
|
664
681
|
])]),
|
|
665
682
|
_: 1
|
|
666
|
-
}, 8, ["content"])) : (y(), L("span", st,
|
|
683
|
+
}, 8, ["content"])) : (y(), L("span", st, T(v.title), 1))
|
|
667
684
|
]),
|
|
668
685
|
_: 2
|
|
669
686
|
}, 1032, ["index"]))
|
|
670
687
|
], 64))), 128))
|
|
671
688
|
]),
|
|
672
689
|
_: 1
|
|
673
|
-
}, 8, ["
|
|
674
|
-
|
|
690
|
+
}, 8, ["modelValue", "collapse", "onSelect"]),
|
|
691
|
+
h(l) ? D("", !0) : (y(), L("div", nt, [
|
|
675
692
|
a("div", ot, [
|
|
676
|
-
a("span", at,
|
|
677
|
-
a("span", rt,
|
|
693
|
+
a("span", at, T(h(t) || "用户"), 1),
|
|
694
|
+
a("span", rt, T(((f = h(n)) == null ? void 0 : f.departmentName) || ""), 1)
|
|
678
695
|
]),
|
|
679
|
-
x(
|
|
696
|
+
x(h(ce), {
|
|
680
697
|
type: "text",
|
|
681
698
|
size: "small",
|
|
682
|
-
onClick:
|
|
699
|
+
onClick: h(s)
|
|
683
700
|
}, {
|
|
684
|
-
default: I(() => [...p[
|
|
701
|
+
default: I(() => [...p[3] || (p[3] = [
|
|
685
702
|
oe("退出", -1)
|
|
686
703
|
])]),
|
|
687
704
|
_: 1
|
|
@@ -695,14 +712,14 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
695
712
|
for (const [n, o] of s)
|
|
696
713
|
t[n] = o;
|
|
697
714
|
return t;
|
|
698
|
-
}, ct = /* @__PURE__ */ A(lt, [["__scopeId", "data-v-
|
|
715
|
+
}, ct = /* @__PURE__ */ A(lt, [["__scopeId", "data-v-d6c5528d"]]), it = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
699
716
|
<rect x="3" y="3" width="18" height="4" rx="1"/>
|
|
700
717
|
<rect x="3" y="9" width="6" height="12" rx="1"/>
|
|
701
718
|
<rect x="11" y="9" width="10" height="12" rx="1"/>
|
|
702
719
|
</svg>`, ut = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
703
720
|
<rect x="3" y="3" width="18" height="4" rx="1"/>
|
|
704
721
|
<rect x="3" y="9" width="18" height="12" rx="1"/>
|
|
705
|
-
</svg>`, dt = { class: "setting-drawer" }, ht = { class: "setting-section" },
|
|
722
|
+
</svg>`, dt = { class: "setting-drawer" }, ht = { class: "setting-section" }, pt = { class: "setting-section__content" }, _t = { class: "layout-options" }, vt = ["onClick"], ft = ["innerHTML"], mt = { class: "layout-option__label" }, gt = { class: "setting-section" }, yt = { class: "setting-section__content" }, wt = { class: "setting-item" }, bt = { class: "setting-item" }, kt = /* @__PURE__ */ F({
|
|
706
723
|
inheritAttrs: !1,
|
|
707
724
|
__name: "index",
|
|
708
725
|
props: {
|
|
@@ -710,19 +727,19 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
710
727
|
},
|
|
711
728
|
emits: ["update:visible"],
|
|
712
729
|
setup(e, { emit: s }) {
|
|
713
|
-
const t =
|
|
730
|
+
const t = X(), n = {
|
|
714
731
|
navLeft: it,
|
|
715
732
|
navTop: ut
|
|
716
733
|
}, o = [
|
|
717
734
|
{ value: "sidebar", label: "左侧导航", icon: "navLeft" },
|
|
718
735
|
{ value: "top", label: "顶部导航", icon: "navTop" }
|
|
719
|
-
],
|
|
736
|
+
], d = w({
|
|
720
737
|
get: () => t.layout,
|
|
721
|
-
set: (
|
|
738
|
+
set: (i) => t.setLayout(i)
|
|
722
739
|
}), l = s, r = () => {
|
|
723
740
|
l("update:visible", !1);
|
|
724
741
|
};
|
|
725
|
-
return (
|
|
742
|
+
return (i, u) => (y(), V(h(Me), {
|
|
726
743
|
"model-value": e.visible,
|
|
727
744
|
title: "皮肤设置",
|
|
728
745
|
direction: "rtl",
|
|
@@ -732,31 +749,38 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
732
749
|
default: I(() => [
|
|
733
750
|
a("div", dt, [
|
|
734
751
|
a("div", ht, [
|
|
735
|
-
|
|
736
|
-
a("div",
|
|
737
|
-
a("div",
|
|
738
|
-
(y(), L(
|
|
752
|
+
u[0] || (u[0] = a("h4", { class: "setting-section__title" }, "导航模式", -1)),
|
|
753
|
+
a("div", pt, [
|
|
754
|
+
a("div", _t, [
|
|
755
|
+
(y(), L(M, null, j(o, (p) => a("div", {
|
|
739
756
|
key: p.value,
|
|
740
|
-
class:
|
|
741
|
-
onClick: (f) =>
|
|
757
|
+
class: ae(["layout-option", { "is-active": d.value === p.value }]),
|
|
758
|
+
onClick: (f) => d.value = p.value
|
|
742
759
|
}, [
|
|
743
760
|
a("div", {
|
|
744
761
|
class: "layout-option__preview",
|
|
745
762
|
innerHTML: n[p.icon]
|
|
746
763
|
}, null, 8, ft),
|
|
747
|
-
a("span",
|
|
764
|
+
a("span", mt, T(p.label), 1)
|
|
748
765
|
], 10, vt)), 64))
|
|
749
766
|
])
|
|
750
767
|
])
|
|
751
768
|
]),
|
|
752
|
-
a("div",
|
|
753
|
-
|
|
769
|
+
a("div", gt, [
|
|
770
|
+
u[3] || (u[3] = a("h4", { class: "setting-section__title" }, "界面设置", -1)),
|
|
754
771
|
a("div", yt, [
|
|
755
772
|
a("div", wt, [
|
|
756
|
-
|
|
757
|
-
x(
|
|
758
|
-
"model-value":
|
|
759
|
-
"onUpdate:modelValue":
|
|
773
|
+
u[1] || (u[1] = a("span", { class: "setting-item__label" }, "显示面包屑", -1)),
|
|
774
|
+
x(h(fe), {
|
|
775
|
+
"model-value": h(t).showBreadcrumb,
|
|
776
|
+
"onUpdate:modelValue": h(t).toggleBreadcrumb
|
|
777
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
778
|
+
]),
|
|
779
|
+
a("div", bt, [
|
|
780
|
+
u[2] || (u[2] = a("span", { class: "setting-item__label" }, "灰度模式", -1)),
|
|
781
|
+
x(h(fe), {
|
|
782
|
+
"model-value": h(t).isGrayscale,
|
|
783
|
+
"onUpdate:modelValue": h(t).setGrayscale
|
|
760
784
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
761
785
|
])
|
|
762
786
|
])
|
|
@@ -766,113 +790,160 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
766
790
|
_: 1
|
|
767
791
|
}, 8, ["model-value"]));
|
|
768
792
|
}
|
|
769
|
-
}),
|
|
793
|
+
}), Ct = /* @__PURE__ */ A(kt, [["__scopeId", "data-v-3a74bfd0"]]), Lt = {
|
|
794
|
+
key: 0,
|
|
795
|
+
class: "breadcrumb"
|
|
796
|
+
}, xt = ["onClick"], It = /* @__PURE__ */ F({
|
|
797
|
+
__name: "Breadcrumb",
|
|
798
|
+
setup(e) {
|
|
799
|
+
const s = le(), t = W(), n = K(), o = w(() => {
|
|
800
|
+
var p;
|
|
801
|
+
const l = s.path, r = n.menuList, i = (f, v, _ = []) => {
|
|
802
|
+
for (const c of f) {
|
|
803
|
+
const g = {
|
|
804
|
+
title: c.title,
|
|
805
|
+
path: c.path,
|
|
806
|
+
isLast: !1
|
|
807
|
+
};
|
|
808
|
+
if (c.path === v)
|
|
809
|
+
return g.isLast = !0, [..._, g];
|
|
810
|
+
if (c.children && c.children.length > 0) {
|
|
811
|
+
const m = i(c.children, v, [..._, g]);
|
|
812
|
+
if (m)
|
|
813
|
+
return m;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return null;
|
|
817
|
+
}, u = i(r, l);
|
|
818
|
+
return u && u.length > 0 ? u : (p = s.meta) != null && p.title ? [{ title: s.meta.title, path: l, isLast: !0 }] : [];
|
|
819
|
+
}), d = (l) => {
|
|
820
|
+
!l.isLast && l.path && t.push(l.path);
|
|
821
|
+
};
|
|
822
|
+
return (l, r) => o.value.length > 0 ? (y(), L("div", Lt, [
|
|
823
|
+
(y(!0), L(M, null, j(o.value, (i, u) => (y(), L(M, {
|
|
824
|
+
key: i.path
|
|
825
|
+
}, [
|
|
826
|
+
a("span", {
|
|
827
|
+
class: ae(["breadcrumb__item", { "breadcrumb__item--link": !i.isLast }]),
|
|
828
|
+
onClick: (p) => d(i)
|
|
829
|
+
}, T(i.title), 11, xt),
|
|
830
|
+
u < o.value.length - 1 ? (y(), V(h(q), {
|
|
831
|
+
key: 0,
|
|
832
|
+
name: "arrow-right",
|
|
833
|
+
size: 12,
|
|
834
|
+
class: "breadcrumb__separator"
|
|
835
|
+
})) : D("", !0)
|
|
836
|
+
], 64))), 128))
|
|
837
|
+
])) : D("", !0);
|
|
838
|
+
}
|
|
839
|
+
}), $t = /* @__PURE__ */ A(It, [["__scopeId", "data-v-31468670"]]), Tt = { class: "header" }, St = { class: "header__left" }, Et = { class: "header__right" }, Ut = {
|
|
770
840
|
key: 0,
|
|
771
841
|
class: "header__search-results"
|
|
772
|
-
},
|
|
842
|
+
}, Pt = ["onClick"], Mt = { class: "header__search-info" }, Nt = { class: "header__search-title" }, Bt = {
|
|
773
843
|
key: 0,
|
|
774
844
|
class: "header__search-parent"
|
|
775
|
-
},
|
|
845
|
+
}, Rt = ["title"], At = { class: "header__avatar" }, Vt = { class: "header__user-name" }, Dt = {
|
|
776
846
|
key: 0,
|
|
777
847
|
class: "header__dropdown"
|
|
778
|
-
},
|
|
848
|
+
}, Ft = { class: "header__dropdown-header" }, Ot = { class: "header__dropdown-avatar" }, zt = { class: "header__dropdown-info" }, Ht = { class: "header__dropdown-name" }, jt = { class: "header__dropdown-role" }, Kt = { class: "header__dropdown-menu" }, qt = /* @__PURE__ */ F({
|
|
779
849
|
__name: "Header",
|
|
780
850
|
props: {
|
|
781
851
|
showCollapse: { type: Boolean }
|
|
782
852
|
},
|
|
783
853
|
setup(e) {
|
|
784
|
-
const s =
|
|
785
|
-
searchKeyword:
|
|
854
|
+
const s = X(), { logout: t, userName: n, userInfo: o } = ie(), {
|
|
855
|
+
searchKeyword: d,
|
|
786
856
|
searchResults: l,
|
|
787
857
|
handleSearchItemClick: r
|
|
788
|
-
} =
|
|
858
|
+
} = Ee(), i = C(!1), u = C(null), p = C(null), f = C(!1), v = C(!1), _ = w(() => n.value || "用户"), c = () => {
|
|
789
859
|
s.toggleCollapse();
|
|
790
|
-
}, m = () => {
|
|
791
|
-
s.toggleTheme();
|
|
792
860
|
}, g = () => {
|
|
861
|
+
s.toggleTheme();
|
|
862
|
+
}, m = () => {
|
|
793
863
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
794
|
-
},
|
|
864
|
+
}, b = () => {
|
|
795
865
|
f.value = !!document.fullscreenElement;
|
|
796
866
|
}, E = () => {
|
|
797
|
-
|
|
798
|
-
},
|
|
799
|
-
|
|
867
|
+
i.value = !i.value;
|
|
868
|
+
}, P = () => {
|
|
869
|
+
i.value = !1;
|
|
800
870
|
}, O = async () => {
|
|
801
|
-
|
|
802
|
-
},
|
|
803
|
-
|
|
871
|
+
P(), await t();
|
|
872
|
+
}, z = (B) => {
|
|
873
|
+
u.value && !u.value.contains(B.target) && P(), p.value && !p.value.contains(B.target) && (d.value = "");
|
|
804
874
|
};
|
|
805
|
-
return
|
|
806
|
-
document.addEventListener("click",
|
|
807
|
-
}),
|
|
808
|
-
document.removeEventListener("click",
|
|
809
|
-
}), (
|
|
810
|
-
a("div",
|
|
875
|
+
return Be(() => {
|
|
876
|
+
document.addEventListener("click", z), document.addEventListener("fullscreenchange", b);
|
|
877
|
+
}), Re(() => {
|
|
878
|
+
document.removeEventListener("click", z), document.removeEventListener("fullscreenchange", b);
|
|
879
|
+
}), (B, S) => (y(), L("div", Tt, [
|
|
880
|
+
a("div", St, [
|
|
811
881
|
e.showCollapse ? (y(), L("div", {
|
|
812
882
|
key: 0,
|
|
813
883
|
class: "header__collapse",
|
|
814
884
|
onClick: c
|
|
815
|
-
}, [...
|
|
885
|
+
}, [...S[3] || (S[3] = [
|
|
816
886
|
a("span", null, "☰", -1)
|
|
817
|
-
])])) :
|
|
887
|
+
])])) : D("", !0),
|
|
888
|
+
h(s).showBreadcrumb ? (y(), V($t, { key: 1 })) : D("", !0)
|
|
818
889
|
]),
|
|
819
|
-
a("div",
|
|
890
|
+
a("div", Et, [
|
|
820
891
|
a("div", {
|
|
821
892
|
class: "header__search",
|
|
822
893
|
ref_key: "searchRef",
|
|
823
894
|
ref: p
|
|
824
895
|
}, [
|
|
825
|
-
x(
|
|
826
|
-
modelValue:
|
|
827
|
-
"onUpdate:modelValue":
|
|
896
|
+
x(h(de), {
|
|
897
|
+
modelValue: h(d),
|
|
898
|
+
"onUpdate:modelValue": S[0] || (S[0] = (U) => ge(d) ? d.value = U : null),
|
|
828
899
|
placeholder: "搜索菜单...",
|
|
829
900
|
size: "small",
|
|
830
901
|
clearable: ""
|
|
831
902
|
}, null, 8, ["modelValue"]),
|
|
832
|
-
|
|
833
|
-
(y(!0), L(
|
|
903
|
+
h(l).length > 0 ? (y(), L("div", Ut, [
|
|
904
|
+
(y(!0), L(M, null, j(h(l), (U) => (y(), L("div", {
|
|
834
905
|
key: U.path,
|
|
835
906
|
class: "header__search-item",
|
|
836
|
-
onClick: ($) =>
|
|
907
|
+
onClick: ($) => h(r)(U.path)
|
|
837
908
|
}, [
|
|
838
|
-
x(
|
|
909
|
+
x(h(q), {
|
|
839
910
|
name: "grid",
|
|
840
911
|
size: 16,
|
|
841
912
|
class: "header__search-icon"
|
|
842
913
|
}),
|
|
843
|
-
a("div",
|
|
844
|
-
a("span",
|
|
845
|
-
U.parentTitle ? (y(), L("span",
|
|
914
|
+
a("div", Mt, [
|
|
915
|
+
a("span", Nt, T(U.title), 1),
|
|
916
|
+
U.parentTitle ? (y(), L("span", Bt, T(U.parentTitle), 1)) : D("", !0)
|
|
846
917
|
])
|
|
847
|
-
], 8,
|
|
848
|
-
])) :
|
|
918
|
+
], 8, Pt))), 128))
|
|
919
|
+
])) : D("", !0)
|
|
849
920
|
], 512),
|
|
850
921
|
a("div", {
|
|
851
922
|
class: "header__action",
|
|
852
|
-
onClick:
|
|
923
|
+
onClick: m,
|
|
853
924
|
title: f.value ? "退出全屏" : "全屏"
|
|
854
925
|
}, [
|
|
855
|
-
x(
|
|
926
|
+
x(h(q), {
|
|
856
927
|
name: f.value ? "fullscreen-exit" : "fullscreen",
|
|
857
928
|
size: 16
|
|
858
929
|
}, null, 8, ["name"])
|
|
859
|
-
], 8,
|
|
930
|
+
], 8, Rt),
|
|
860
931
|
a("div", {
|
|
861
932
|
class: "header__action",
|
|
862
|
-
onClick:
|
|
933
|
+
onClick: g,
|
|
863
934
|
title: "切换主题"
|
|
864
935
|
}, [
|
|
865
|
-
x(
|
|
866
|
-
name:
|
|
936
|
+
x(h(q), {
|
|
937
|
+
name: h(s).isDark ? "sun" : "moon",
|
|
867
938
|
size: 16
|
|
868
939
|
}, null, 8, ["name"])
|
|
869
940
|
]),
|
|
870
941
|
a("div", {
|
|
871
942
|
class: "header__action",
|
|
872
|
-
onClick:
|
|
943
|
+
onClick: S[1] || (S[1] = (U) => v.value = !0),
|
|
873
944
|
title: "皮肤设置"
|
|
874
945
|
}, [
|
|
875
|
-
x(
|
|
946
|
+
x(h(q), {
|
|
876
947
|
name: "skin",
|
|
877
948
|
size: 16
|
|
878
949
|
})
|
|
@@ -880,105 +951,105 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
880
951
|
a("div", {
|
|
881
952
|
class: "header__user",
|
|
882
953
|
ref_key: "dropdownRef",
|
|
883
|
-
ref:
|
|
954
|
+
ref: u
|
|
884
955
|
}, [
|
|
885
956
|
a("div", {
|
|
886
957
|
class: "header__user-trigger",
|
|
887
958
|
onClick: Ae(E, ["stop"])
|
|
888
959
|
}, [
|
|
889
|
-
a("div",
|
|
890
|
-
a("span", null,
|
|
960
|
+
a("div", At, [
|
|
961
|
+
a("span", null, T(_.value.charAt(0)), 1)
|
|
891
962
|
]),
|
|
892
|
-
a("span",
|
|
963
|
+
a("span", Vt, T(_.value), 1),
|
|
893
964
|
a("span", {
|
|
894
|
-
class:
|
|
965
|
+
class: ae(["header__user-arrow", { "is-active": i.value }])
|
|
895
966
|
}, "▼", 2)
|
|
896
967
|
]),
|
|
897
|
-
x(
|
|
968
|
+
x(Ve, { name: "dropdown" }, {
|
|
898
969
|
default: I(() => {
|
|
899
970
|
var U;
|
|
900
971
|
return [
|
|
901
|
-
|
|
902
|
-
a("div",
|
|
903
|
-
a("div",
|
|
904
|
-
a("span", null,
|
|
972
|
+
i.value ? (y(), L("div", Dt, [
|
|
973
|
+
a("div", Ft, [
|
|
974
|
+
a("div", Ot, [
|
|
975
|
+
a("span", null, T(_.value.charAt(0)), 1)
|
|
905
976
|
]),
|
|
906
|
-
a("div",
|
|
907
|
-
a("div",
|
|
908
|
-
a("div",
|
|
977
|
+
a("div", zt, [
|
|
978
|
+
a("div", Ht, T(_.value), 1),
|
|
979
|
+
a("div", jt, T(((U = h(o)) == null ? void 0 : U.departmentName) || ""), 1)
|
|
909
980
|
])
|
|
910
981
|
]),
|
|
911
|
-
|
|
912
|
-
a("div",
|
|
982
|
+
S[5] || (S[5] = a("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
983
|
+
a("div", Kt, [
|
|
913
984
|
a("div", {
|
|
914
985
|
class: "header__dropdown-item header__dropdown-item--danger",
|
|
915
986
|
onClick: O
|
|
916
987
|
}, [
|
|
917
|
-
x(
|
|
988
|
+
x(h(q), {
|
|
918
989
|
name: "logout",
|
|
919
990
|
size: 16
|
|
920
991
|
}),
|
|
921
|
-
|
|
992
|
+
S[4] || (S[4] = a("span", null, "退出登录", -1))
|
|
922
993
|
])
|
|
923
994
|
])
|
|
924
|
-
])) :
|
|
995
|
+
])) : D("", !0)
|
|
925
996
|
];
|
|
926
997
|
}),
|
|
927
998
|
_: 1
|
|
928
999
|
})
|
|
929
1000
|
], 512)
|
|
930
1001
|
]),
|
|
931
|
-
x(
|
|
1002
|
+
x(Ct, {
|
|
932
1003
|
visible: v.value,
|
|
933
|
-
"onUpdate:visible":
|
|
1004
|
+
"onUpdate:visible": S[2] || (S[2] = (U) => v.value = U)
|
|
934
1005
|
}, null, 8, ["visible"])
|
|
935
1006
|
]));
|
|
936
1007
|
}
|
|
937
|
-
}),
|
|
1008
|
+
}), me = /* @__PURE__ */ A(qt, [["__scopeId", "data-v-b15434d8"]]), Wt = { class: "top-menu" }, Yt = /* @__PURE__ */ F({
|
|
938
1009
|
__name: "TopMenu",
|
|
939
1010
|
setup(e) {
|
|
940
|
-
const s =
|
|
1011
|
+
const s = le(), t = W(), n = K(), o = w(() => s.path), d = (l) => {
|
|
941
1012
|
t.push(l);
|
|
942
1013
|
};
|
|
943
|
-
return (l, r) => (y(), L("div",
|
|
944
|
-
x(
|
|
1014
|
+
return (l, r) => (y(), L("div", Wt, [
|
|
1015
|
+
x(h(be), {
|
|
945
1016
|
"default-active": o.value,
|
|
946
1017
|
mode: "horizontal",
|
|
947
1018
|
class: "top-menu__inner",
|
|
948
|
-
onSelect:
|
|
1019
|
+
onSelect: d
|
|
949
1020
|
}, {
|
|
950
1021
|
default: I(() => [
|
|
951
|
-
(y(!0), L(
|
|
952
|
-
key:
|
|
1022
|
+
(y(!0), L(M, null, j(h(n).menuList, (i) => (y(), L(M, {
|
|
1023
|
+
key: i.path
|
|
953
1024
|
}, [
|
|
954
|
-
|
|
1025
|
+
i.children && i.children.length > 0 ? (y(), V(h(ke), {
|
|
955
1026
|
key: 0,
|
|
956
|
-
index:
|
|
1027
|
+
index: i.path,
|
|
957
1028
|
icon: "grid"
|
|
958
1029
|
}, {
|
|
959
1030
|
title: I(() => [
|
|
960
|
-
a("span", null,
|
|
1031
|
+
a("span", null, T(i.title), 1)
|
|
961
1032
|
]),
|
|
962
1033
|
default: I(() => [
|
|
963
|
-
(y(!0), L(
|
|
964
|
-
key:
|
|
965
|
-
index:
|
|
1034
|
+
(y(!0), L(M, null, j(i.children, (u) => (y(), V(h(se), {
|
|
1035
|
+
key: u.path,
|
|
1036
|
+
index: u.path,
|
|
966
1037
|
icon: "grid"
|
|
967
1038
|
}, {
|
|
968
1039
|
default: I(() => [
|
|
969
|
-
a("span", null,
|
|
1040
|
+
a("span", null, T(u.title), 1)
|
|
970
1041
|
]),
|
|
971
1042
|
_: 2
|
|
972
1043
|
}, 1032, ["index"]))), 128))
|
|
973
1044
|
]),
|
|
974
1045
|
_: 2
|
|
975
|
-
}, 1032, ["index"])) : (y(),
|
|
1046
|
+
}, 1032, ["index"])) : (y(), V(h(se), {
|
|
976
1047
|
key: 1,
|
|
977
|
-
index:
|
|
1048
|
+
index: i.path,
|
|
978
1049
|
icon: "grid"
|
|
979
1050
|
}, {
|
|
980
1051
|
default: I(() => [
|
|
981
|
-
a("span", null,
|
|
1052
|
+
a("span", null, T(i.title), 1)
|
|
982
1053
|
]),
|
|
983
1054
|
_: 2
|
|
984
1055
|
}, 1032, ["index"]))
|
|
@@ -988,78 +1059,78 @@ const et = { class: "sidebar" }, tt = { class: "sidebar__logo" }, st = { key: 1
|
|
|
988
1059
|
}, 8, ["default-active"])
|
|
989
1060
|
]));
|
|
990
1061
|
}
|
|
991
|
-
}),
|
|
1062
|
+
}), Gt = /* @__PURE__ */ A(Yt, [["__scopeId", "data-v-f9b502d8"]]), Jt = { class: "layout__main" }, Xt = { class: "layout__content" }, Qt = { class: "layout__top" }, Zt = { class: "layout__content" }, es = /* @__PURE__ */ F({
|
|
992
1063
|
__name: "index",
|
|
993
1064
|
setup(e) {
|
|
994
|
-
const s =
|
|
1065
|
+
const s = X(), t = w(
|
|
995
1066
|
() => s.isCollapsed ? "64px" : "210px"
|
|
996
|
-
), n =
|
|
1067
|
+
), n = w(() => s.layout), o = w(() => n.value === "sidebar"), d = w(() => n.value === "sidebar");
|
|
997
1068
|
return (l, r) => {
|
|
998
|
-
const
|
|
1069
|
+
const i = De("router-view");
|
|
999
1070
|
return y(), L("div", {
|
|
1000
|
-
class:
|
|
1071
|
+
class: ae(["layout", `layout--${n.value}`])
|
|
1001
1072
|
}, [
|
|
1002
|
-
o.value ? (y(), L(
|
|
1073
|
+
o.value ? (y(), L(M, { key: 0 }, [
|
|
1003
1074
|
a("aside", {
|
|
1004
1075
|
class: "layout__aside",
|
|
1005
|
-
style:
|
|
1076
|
+
style: Fe({ width: t.value })
|
|
1006
1077
|
}, [
|
|
1007
1078
|
x(ct)
|
|
1008
1079
|
], 4),
|
|
1009
|
-
a("div",
|
|
1010
|
-
x(
|
|
1080
|
+
a("div", Jt, [
|
|
1081
|
+
x(me, {
|
|
1011
1082
|
class: "layout__header",
|
|
1012
|
-
"show-collapse":
|
|
1083
|
+
"show-collapse": d.value
|
|
1013
1084
|
}, null, 8, ["show-collapse"]),
|
|
1014
|
-
a("main",
|
|
1015
|
-
x(
|
|
1085
|
+
a("main", Xt, [
|
|
1086
|
+
x(i)
|
|
1016
1087
|
])
|
|
1017
1088
|
])
|
|
1018
|
-
], 64)) : n.value === "top" ? (y(), L(
|
|
1019
|
-
a("div",
|
|
1089
|
+
], 64)) : n.value === "top" ? (y(), L(M, { key: 1 }, [
|
|
1090
|
+
a("div", Qt, [
|
|
1020
1091
|
r[0] || (r[0] = a("div", { class: "layout__logo" }, [
|
|
1021
1092
|
a("img", {
|
|
1022
|
-
src:
|
|
1093
|
+
src: $e,
|
|
1023
1094
|
alt: "Logo",
|
|
1024
1095
|
class: "layout__logo-img"
|
|
1025
1096
|
})
|
|
1026
1097
|
], -1)),
|
|
1027
|
-
x(
|
|
1028
|
-
x(
|
|
1098
|
+
x(Gt),
|
|
1099
|
+
x(me, {
|
|
1029
1100
|
class: "layout__header--top",
|
|
1030
1101
|
"show-collapse": !1
|
|
1031
1102
|
})
|
|
1032
1103
|
]),
|
|
1033
|
-
a("main",
|
|
1034
|
-
x(
|
|
1104
|
+
a("main", Zt, [
|
|
1105
|
+
x(i)
|
|
1035
1106
|
])
|
|
1036
|
-
], 64)) :
|
|
1107
|
+
], 64)) : D("", !0)
|
|
1037
1108
|
], 2);
|
|
1038
1109
|
};
|
|
1039
1110
|
}
|
|
1040
|
-
}),
|
|
1041
|
-
function
|
|
1042
|
-
return y(), L("div",
|
|
1111
|
+
}), ts = /* @__PURE__ */ A(es, [["__scopeId", "data-v-a2789d75"]]), ss = {}, ns = { class: "tabs-wrapper" };
|
|
1112
|
+
function os(e, s) {
|
|
1113
|
+
return y(), L("div", ns);
|
|
1043
1114
|
}
|
|
1044
|
-
const
|
|
1045
|
-
function
|
|
1046
|
-
return y(), L("div",
|
|
1115
|
+
const Ws = /* @__PURE__ */ A(ss, [["render", os], ["__scopeId", "data-v-3b1e382a"]]), as = {}, rs = { class: "footer" };
|
|
1116
|
+
function ls(e, s) {
|
|
1117
|
+
return y(), L("div", rs, [...s[0] || (s[0] = [
|
|
1047
1118
|
a("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
1048
1119
|
])]);
|
|
1049
1120
|
}
|
|
1050
|
-
const
|
|
1121
|
+
const Ys = /* @__PURE__ */ A(as, [["render", ls], ["__scopeId", "data-v-317ae311"]]), cs = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
1051
1122
|
<circle cx="12" cy="8" r="4"/>
|
|
1052
1123
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
|
|
1053
|
-
</svg>`,
|
|
1124
|
+
</svg>`, is = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
1054
1125
|
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
|
|
1055
1126
|
<path d="M7 11V7a5 5 0 0 1 10 0v4"/>
|
|
1056
|
-
</svg>`,
|
|
1127
|
+
</svg>`, us = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
1057
1128
|
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
|
1058
1129
|
<circle cx="12" cy="12" r="3"/>
|
|
1059
|
-
</svg>`,
|
|
1130
|
+
</svg>`, ds = `<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
1060
1131
|
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/>
|
|
1061
1132
|
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
1062
|
-
</svg>`,
|
|
1133
|
+
</svg>`, hs = { class: "login" }, ps = { class: "login__container" }, _s = { class: "login__header" }, vs = ["src"], fs = { class: "login__title" }, ms = { class: "login__subtitle" }, gs = ["innerHTML"], ys = ["innerHTML"], ws = ["innerHTML"], bs = /* @__PURE__ */ F({
|
|
1063
1134
|
__name: "index",
|
|
1064
1135
|
props: {
|
|
1065
1136
|
logo: {},
|
|
@@ -1068,56 +1139,56 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1068
1139
|
},
|
|
1069
1140
|
emits: ["success", "error"],
|
|
1070
1141
|
setup(e, { emit: s }) {
|
|
1071
|
-
const t = s, { login: n, loading: o } =
|
|
1142
|
+
const t = s, { login: n, loading: o } = ie(), d = N(), l = he({
|
|
1072
1143
|
uid: "",
|
|
1073
1144
|
password: ""
|
|
1074
|
-
}), r = C(!1),
|
|
1145
|
+
}), r = C(!1), i = {
|
|
1075
1146
|
uid: [
|
|
1076
1147
|
{ required: !0, message: "请输入账号", trigger: "blur" }
|
|
1077
1148
|
],
|
|
1078
1149
|
password: [
|
|
1079
1150
|
{ required: !0, message: "请输入密码", trigger: "blur" }
|
|
1080
1151
|
]
|
|
1081
|
-
},
|
|
1082
|
-
user:
|
|
1083
|
-
lock:
|
|
1084
|
-
eye:
|
|
1085
|
-
eyeOff:
|
|
1152
|
+
}, u = C(), p = {
|
|
1153
|
+
user: cs,
|
|
1154
|
+
lock: is,
|
|
1155
|
+
eye: us,
|
|
1156
|
+
eyeOff: ds
|
|
1086
1157
|
}, f = async () => {
|
|
1087
1158
|
var v;
|
|
1088
1159
|
try {
|
|
1089
|
-
await ((v =
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
} catch (
|
|
1093
|
-
console.error("登录失败",
|
|
1160
|
+
await ((v = u.value) == null ? void 0 : v.validate());
|
|
1161
|
+
const _ = await n(l.uid, l.password);
|
|
1162
|
+
_.success ? t("success", _.data) : t("error", _.error);
|
|
1163
|
+
} catch (_) {
|
|
1164
|
+
console.error("登录失败", _), t("error", _);
|
|
1094
1165
|
}
|
|
1095
1166
|
};
|
|
1096
|
-
return (v,
|
|
1097
|
-
a("div",
|
|
1098
|
-
a("div",
|
|
1167
|
+
return (v, _) => (y(), L("div", hs, [
|
|
1168
|
+
a("div", ps, [
|
|
1169
|
+
a("div", _s, [
|
|
1099
1170
|
a("img", {
|
|
1100
1171
|
src: e.logo || "/vite.svg",
|
|
1101
1172
|
alt: "Logo",
|
|
1102
1173
|
class: "login__logo"
|
|
1103
|
-
}, null, 8,
|
|
1104
|
-
a("h1",
|
|
1105
|
-
a("p",
|
|
1174
|
+
}, null, 8, vs),
|
|
1175
|
+
a("h1", fs, T(e.title || h(d).appName), 1),
|
|
1176
|
+
a("p", ms, T(e.subtitle || "后台管理系统"), 1)
|
|
1106
1177
|
]),
|
|
1107
|
-
x(
|
|
1178
|
+
x(h(ze), {
|
|
1108
1179
|
ref_key: "formRef",
|
|
1109
|
-
ref:
|
|
1180
|
+
ref: u,
|
|
1110
1181
|
model: l,
|
|
1111
|
-
rules:
|
|
1182
|
+
rules: i,
|
|
1112
1183
|
class: "login__form",
|
|
1113
1184
|
"label-width": "0"
|
|
1114
1185
|
}, {
|
|
1115
1186
|
default: I(() => [
|
|
1116
|
-
x(
|
|
1187
|
+
x(h(ue), { prop: "uid" }, {
|
|
1117
1188
|
default: I(() => [
|
|
1118
|
-
x(
|
|
1189
|
+
x(h(de), {
|
|
1119
1190
|
modelValue: l.uid,
|
|
1120
|
-
"onUpdate:modelValue":
|
|
1191
|
+
"onUpdate:modelValue": _[0] || (_[0] = (c) => l.uid = c),
|
|
1121
1192
|
placeholder: "请输入账号",
|
|
1122
1193
|
size: "large"
|
|
1123
1194
|
}, {
|
|
@@ -1125,18 +1196,18 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1125
1196
|
a("span", {
|
|
1126
1197
|
class: "login__input-icon",
|
|
1127
1198
|
innerHTML: p.user
|
|
1128
|
-
}, null, 8,
|
|
1199
|
+
}, null, 8, gs)
|
|
1129
1200
|
]),
|
|
1130
1201
|
_: 1
|
|
1131
1202
|
}, 8, ["modelValue"])
|
|
1132
1203
|
]),
|
|
1133
1204
|
_: 1
|
|
1134
1205
|
}),
|
|
1135
|
-
x(
|
|
1206
|
+
x(h(ue), { prop: "password" }, {
|
|
1136
1207
|
default: I(() => [
|
|
1137
|
-
x(
|
|
1208
|
+
x(h(de), {
|
|
1138
1209
|
modelValue: l.password,
|
|
1139
|
-
"onUpdate:modelValue":
|
|
1210
|
+
"onUpdate:modelValue": _[2] || (_[2] = (c) => l.password = c),
|
|
1140
1211
|
type: r.value ? "text" : "password",
|
|
1141
1212
|
placeholder: "请输入密码",
|
|
1142
1213
|
size: "large",
|
|
@@ -1146,30 +1217,30 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1146
1217
|
a("span", {
|
|
1147
1218
|
class: "login__input-icon",
|
|
1148
1219
|
innerHTML: p.lock
|
|
1149
|
-
}, null, 8,
|
|
1220
|
+
}, null, 8, ys)
|
|
1150
1221
|
]),
|
|
1151
1222
|
suffix: I(() => [
|
|
1152
1223
|
a("span", {
|
|
1153
1224
|
class: "login__input-icon login__input-icon--clickable",
|
|
1154
|
-
onClick:
|
|
1225
|
+
onClick: _[1] || (_[1] = (c) => r.value = !r.value),
|
|
1155
1226
|
innerHTML: r.value ? p.eyeOff : p.eye
|
|
1156
|
-
}, null, 8,
|
|
1227
|
+
}, null, 8, ws)
|
|
1157
1228
|
]),
|
|
1158
1229
|
_: 1
|
|
1159
1230
|
}, 8, ["modelValue", "type"])
|
|
1160
1231
|
]),
|
|
1161
1232
|
_: 1
|
|
1162
1233
|
}),
|
|
1163
|
-
x(
|
|
1234
|
+
x(h(ue), null, {
|
|
1164
1235
|
default: I(() => [
|
|
1165
|
-
x(
|
|
1236
|
+
x(h(ce), {
|
|
1166
1237
|
type: "primary",
|
|
1167
1238
|
size: "large",
|
|
1168
|
-
loading:
|
|
1239
|
+
loading: h(o),
|
|
1169
1240
|
class: "login__submit",
|
|
1170
1241
|
onClick: f
|
|
1171
1242
|
}, {
|
|
1172
|
-
default: I(() => [...
|
|
1243
|
+
default: I(() => [..._[3] || (_[3] = [
|
|
1173
1244
|
oe(" 登录 ", -1)
|
|
1174
1245
|
])]),
|
|
1175
1246
|
_: 1
|
|
@@ -1183,18 +1254,18 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1183
1254
|
])
|
|
1184
1255
|
]));
|
|
1185
1256
|
}
|
|
1186
|
-
}),
|
|
1257
|
+
}), Gs = /* @__PURE__ */ A(bs, [["__scopeId", "data-v-a48f4a52"]]), ks = { class: "error-page" }, Cs = { class: "error-page__content" }, Ls = /* @__PURE__ */ F({
|
|
1187
1258
|
__name: "404",
|
|
1188
1259
|
setup(e) {
|
|
1189
|
-
const s =
|
|
1260
|
+
const s = W(), t = () => {
|
|
1190
1261
|
s.push("/");
|
|
1191
1262
|
};
|
|
1192
|
-
return (n, o) => (y(), L("div",
|
|
1193
|
-
a("div",
|
|
1263
|
+
return (n, o) => (y(), L("div", ks, [
|
|
1264
|
+
a("div", Cs, [
|
|
1194
1265
|
o[1] || (o[1] = a("div", { class: "error-page__code" }, "404", -1)),
|
|
1195
1266
|
o[2] || (o[2] = a("div", { class: "error-page__title" }, "页面不存在", -1)),
|
|
1196
1267
|
o[3] || (o[3] = a("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
|
|
1197
|
-
x(
|
|
1268
|
+
x(h(ce), {
|
|
1198
1269
|
type: "primary",
|
|
1199
1270
|
onClick: t
|
|
1200
1271
|
}, {
|
|
@@ -1206,18 +1277,18 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1206
1277
|
])
|
|
1207
1278
|
]));
|
|
1208
1279
|
}
|
|
1209
|
-
}),
|
|
1280
|
+
}), Js = /* @__PURE__ */ A(Ls, [["__scopeId", "data-v-25c06185"]]), xs = { class: "error-page" }, Is = { class: "error-page__content" }, $s = /* @__PURE__ */ F({
|
|
1210
1281
|
__name: "403",
|
|
1211
1282
|
setup(e) {
|
|
1212
|
-
const s =
|
|
1283
|
+
const s = W(), t = () => {
|
|
1213
1284
|
s.push("/");
|
|
1214
1285
|
};
|
|
1215
|
-
return (n, o) => (y(), L("div",
|
|
1216
|
-
a("div",
|
|
1286
|
+
return (n, o) => (y(), L("div", xs, [
|
|
1287
|
+
a("div", Is, [
|
|
1217
1288
|
o[1] || (o[1] = a("div", { class: "error-page__code" }, "403", -1)),
|
|
1218
1289
|
o[2] || (o[2] = a("div", { class: "error-page__title" }, "无访问权限", -1)),
|
|
1219
1290
|
o[3] || (o[3] = a("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
|
|
1220
|
-
x(
|
|
1291
|
+
x(h(ce), {
|
|
1221
1292
|
type: "primary",
|
|
1222
1293
|
onClick: t
|
|
1223
1294
|
}, {
|
|
@@ -1229,47 +1300,47 @@ const Hs = /* @__PURE__ */ A(es, [["render", ss], ["__scopeId", "data-v-317ae311
|
|
|
1229
1300
|
])
|
|
1230
1301
|
]));
|
|
1231
1302
|
}
|
|
1232
|
-
}),
|
|
1233
|
-
function
|
|
1234
|
-
const s =
|
|
1235
|
-
return Array.isArray(e) ? e.some((
|
|
1303
|
+
}), Xs = /* @__PURE__ */ A($s, [["__scopeId", "data-v-42d7e36e"]]);
|
|
1304
|
+
function Qs(e) {
|
|
1305
|
+
const s = K(), t = window.location.pathname, o = (s.menuBtnListMap[t] || []).map((d) => d.code);
|
|
1306
|
+
return Array.isArray(e) ? e.some((d) => o.includes(d)) : o.includes(e);
|
|
1236
1307
|
}
|
|
1237
|
-
const
|
|
1238
|
-
function
|
|
1239
|
-
const t =
|
|
1240
|
-
history:
|
|
1308
|
+
const Ts = ["/login", "/404", "/403"];
|
|
1309
|
+
function Zs(e, s) {
|
|
1310
|
+
const t = N(), n = ye({
|
|
1311
|
+
history: we((s == null ? void 0 : s.base) || ""),
|
|
1241
1312
|
routes: e,
|
|
1242
1313
|
scrollBehavior: (s == null ? void 0 : s.scrollBehavior) || (() => ({ left: 0, top: 0 }))
|
|
1243
1314
|
});
|
|
1244
|
-
return n.beforeEach(async (o,
|
|
1245
|
-
const r =
|
|
1246
|
-
if (r.initTheme(),
|
|
1315
|
+
return n.beforeEach(async (o, d, l) => {
|
|
1316
|
+
const r = X();
|
|
1317
|
+
if (r.initTheme(), Ie())
|
|
1247
1318
|
if (o.path === t.loginPath)
|
|
1248
1319
|
l({ path: t.indexPath || "/" });
|
|
1249
1320
|
else {
|
|
1250
|
-
const { initApp:
|
|
1251
|
-
if (!
|
|
1321
|
+
const { initApp: i, isLoggedIn: u } = ie();
|
|
1322
|
+
if (!u.value && !await i()) {
|
|
1252
1323
|
l(t.loginPath || "/login");
|
|
1253
1324
|
return;
|
|
1254
1325
|
}
|
|
1255
1326
|
o.name && o.meta.keepAlive && r.addCachedView(o.name), l();
|
|
1256
1327
|
}
|
|
1257
1328
|
else
|
|
1258
|
-
|
|
1329
|
+
Ts.includes(o.path) ? l() : l({
|
|
1259
1330
|
path: t.loginPath || "/login",
|
|
1260
1331
|
query: { redirectUrl: encodeURIComponent(o.fullPath) }
|
|
1261
1332
|
});
|
|
1262
1333
|
}), n;
|
|
1263
1334
|
}
|
|
1264
|
-
function
|
|
1265
|
-
const t =
|
|
1266
|
-
history:
|
|
1335
|
+
function en(e, s) {
|
|
1336
|
+
const t = ye({
|
|
1337
|
+
history: we(),
|
|
1267
1338
|
routes: s
|
|
1268
1339
|
});
|
|
1269
1340
|
e.matcher = t.matcher;
|
|
1270
1341
|
}
|
|
1271
|
-
function
|
|
1272
|
-
const s =
|
|
1342
|
+
function tn(e) {
|
|
1343
|
+
const s = N();
|
|
1273
1344
|
return [
|
|
1274
1345
|
{
|
|
1275
1346
|
path: (e == null ? void 0 : e.loginPath) || s.loginPath || "/login",
|
|
@@ -1280,15 +1351,6 @@ function Xs(e) {
|
|
|
1280
1351
|
hidden: !0
|
|
1281
1352
|
}
|
|
1282
1353
|
},
|
|
1283
|
-
{
|
|
1284
|
-
path: "/404",
|
|
1285
|
-
name: "NotFound",
|
|
1286
|
-
component: e == null ? void 0 : e.notFoundComponent,
|
|
1287
|
-
meta: {
|
|
1288
|
-
title: "404",
|
|
1289
|
-
hidden: !0
|
|
1290
|
-
}
|
|
1291
|
-
},
|
|
1292
1354
|
{
|
|
1293
1355
|
path: "/403",
|
|
1294
1356
|
name: "Forbidden",
|
|
@@ -1297,37 +1359,29 @@ function Xs(e) {
|
|
|
1297
1359
|
title: "403",
|
|
1298
1360
|
hidden: !0
|
|
1299
1361
|
}
|
|
1300
|
-
},
|
|
1301
|
-
{
|
|
1302
|
-
path: "/:pathMatch(.*)*",
|
|
1303
|
-
redirect: "/404",
|
|
1304
|
-
meta: {
|
|
1305
|
-
hidden: !0
|
|
1306
|
-
}
|
|
1307
1362
|
}
|
|
1308
1363
|
];
|
|
1309
1364
|
}
|
|
1310
|
-
function
|
|
1311
|
-
const t = s.indexPath || "/dashboard";
|
|
1312
|
-
return {
|
|
1365
|
+
function sn(e, s = {}) {
|
|
1366
|
+
const t = s.indexPath || "/dashboard", n = [...e];
|
|
1367
|
+
return s.notFoundComponent && n.push({
|
|
1368
|
+
path: "/:pathMatch(.*)*",
|
|
1369
|
+
name: "LayoutNotFound",
|
|
1370
|
+
component: s.notFoundComponent,
|
|
1371
|
+
meta: {
|
|
1372
|
+
title: "404",
|
|
1373
|
+
hidden: !0
|
|
1374
|
+
}
|
|
1375
|
+
}), {
|
|
1313
1376
|
path: "/",
|
|
1314
1377
|
name: "Layout",
|
|
1315
|
-
component: s.layoutComponent ||
|
|
1378
|
+
component: s.layoutComponent || ts,
|
|
1316
1379
|
redirect: t,
|
|
1317
|
-
children:
|
|
1380
|
+
children: n
|
|
1318
1381
|
};
|
|
1319
1382
|
}
|
|
1320
|
-
function
|
|
1383
|
+
function nn(e = {}) {
|
|
1321
1384
|
return [
|
|
1322
|
-
{
|
|
1323
|
-
path: "/404",
|
|
1324
|
-
name: "NotFound",
|
|
1325
|
-
component: e.notFoundComponent,
|
|
1326
|
-
meta: {
|
|
1327
|
-
title: "404",
|
|
1328
|
-
hidden: !0
|
|
1329
|
-
}
|
|
1330
|
-
},
|
|
1331
1385
|
{
|
|
1332
1386
|
path: "/403",
|
|
1333
1387
|
name: "Forbidden",
|
|
@@ -1336,29 +1390,22 @@ function Qs(e = {}) {
|
|
|
1336
1390
|
title: "403",
|
|
1337
1391
|
hidden: !0
|
|
1338
1392
|
}
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
path: "/:pathMatch(.*)*",
|
|
1342
|
-
redirect: "/404",
|
|
1343
|
-
meta: {
|
|
1344
|
-
hidden: !0
|
|
1345
|
-
}
|
|
1346
1393
|
}
|
|
1347
1394
|
];
|
|
1348
1395
|
}
|
|
1349
|
-
var
|
|
1350
|
-
const
|
|
1396
|
+
var Ss = /* @__PURE__ */ ((e) => (e[e.ENABLED = 1] = "ENABLED", e[e.DISABLED = 0] = "DISABLED", e))(Ss || {}), Es = /* @__PURE__ */ ((e) => (e[e.UNKNOWN = 0] = "UNKNOWN", e[e.MALE = 1] = "MALE", e[e.FEMALE = 2] = "FEMALE", e))(Es || {}), Us = /* @__PURE__ */ ((e) => (e[e.DIRECTORY = 0] = "DIRECTORY", e[e.MENU = 1] = "MENU", e[e.BUTTON = 2] = "BUTTON", e))(Us || {});
|
|
1397
|
+
const on = {
|
|
1351
1398
|
1: "启用",
|
|
1352
1399
|
0: "禁用"
|
|
1353
|
-
},
|
|
1400
|
+
}, an = {
|
|
1354
1401
|
0: "未知",
|
|
1355
1402
|
1: "男",
|
|
1356
1403
|
2: "女"
|
|
1357
|
-
},
|
|
1404
|
+
}, rn = {
|
|
1358
1405
|
0: "目录",
|
|
1359
1406
|
1: "菜单",
|
|
1360
1407
|
2: "按钮"
|
|
1361
|
-
},
|
|
1408
|
+
}, ln = [
|
|
1362
1409
|
{
|
|
1363
1410
|
label: "启用",
|
|
1364
1411
|
value: 1
|
|
@@ -1369,7 +1416,7 @@ const Zs = {
|
|
|
1369
1416
|
value: 0
|
|
1370
1417
|
/* DISABLED */
|
|
1371
1418
|
}
|
|
1372
|
-
],
|
|
1419
|
+
], cn = [
|
|
1373
1420
|
{
|
|
1374
1421
|
label: "未知",
|
|
1375
1422
|
value: 0
|
|
@@ -1385,7 +1432,7 @@ const Zs = {
|
|
|
1385
1432
|
value: 2
|
|
1386
1433
|
/* FEMALE */
|
|
1387
1434
|
}
|
|
1388
|
-
],
|
|
1435
|
+
], un = [
|
|
1389
1436
|
{
|
|
1390
1437
|
label: "目录",
|
|
1391
1438
|
value: 0
|
|
@@ -1401,77 +1448,77 @@ const Zs = {
|
|
|
1401
1448
|
value: 2
|
|
1402
1449
|
/* BUTTON */
|
|
1403
1450
|
}
|
|
1404
|
-
],
|
|
1451
|
+
], dn = {
|
|
1405
1452
|
mounted(e, s) {
|
|
1406
|
-
var
|
|
1407
|
-
const t =
|
|
1453
|
+
var i;
|
|
1454
|
+
const t = K(), { value: n } = s;
|
|
1408
1455
|
if (!n) return;
|
|
1409
|
-
const o = window.location.pathname, l = (t.menuBtnListMap[o] || []).map((
|
|
1456
|
+
const o = window.location.pathname, l = (t.menuBtnListMap[o] || []).map((u) => u.code);
|
|
1410
1457
|
let r = !1;
|
|
1411
|
-
Array.isArray(n) ? r = n.some((
|
|
1458
|
+
Array.isArray(n) ? r = n.some((u) => l.includes(u)) : r = l.includes(n), r || (i = e.parentNode) == null || i.removeChild(e);
|
|
1412
1459
|
}
|
|
1413
1460
|
};
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1416
|
-
config:
|
|
1461
|
+
function hn(e) {
|
|
1462
|
+
return je(e), Ge(), {
|
|
1463
|
+
config: N()
|
|
1417
1464
|
};
|
|
1418
1465
|
}
|
|
1419
1466
|
export {
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1467
|
+
Ys as Footer,
|
|
1468
|
+
Xs as Forbidden,
|
|
1469
|
+
Es as Gender,
|
|
1470
|
+
cn as GenderOptions,
|
|
1471
|
+
an as GenderText,
|
|
1472
|
+
me as Header,
|
|
1473
|
+
ts as Layout,
|
|
1474
|
+
Gs as Login,
|
|
1475
|
+
Us as MenuType,
|
|
1476
|
+
un as MenuTypeOptions,
|
|
1477
|
+
rn as MenuTypeText,
|
|
1478
|
+
Js as NotFound,
|
|
1479
|
+
Ct as SettingDrawer,
|
|
1433
1480
|
ct as Sidebar,
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1481
|
+
Ss as Status,
|
|
1482
|
+
ln as StatusOptions,
|
|
1483
|
+
on as StatusText,
|
|
1484
|
+
Ws as Tabs,
|
|
1485
|
+
xe as clearToken,
|
|
1486
|
+
nn as createErrorRoutes,
|
|
1487
|
+
sn as createLayoutRoute,
|
|
1488
|
+
Zs as createRouter,
|
|
1489
|
+
tn as createStaticRoutes,
|
|
1490
|
+
hn as createXtoApp,
|
|
1491
|
+
zs as getCode,
|
|
1492
|
+
N as getConfig,
|
|
1493
|
+
Fs as getConfigValue,
|
|
1447
1494
|
Qe as getCurrentUser,
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1495
|
+
G as getLoginInfo,
|
|
1496
|
+
H as getRequest,
|
|
1497
|
+
Le as getToken,
|
|
1498
|
+
We as getTokenType,
|
|
1452
1499
|
Ze as getUserMenu,
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1500
|
+
Qs as hasPermission,
|
|
1501
|
+
Ie as hasToken,
|
|
1502
|
+
J as http,
|
|
1503
|
+
k as local,
|
|
1457
1504
|
Z as localStorageUtil,
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1505
|
+
Je as login,
|
|
1506
|
+
Hs as loginByCode,
|
|
1507
|
+
Xe as logout,
|
|
1508
|
+
dn as permissionDirective,
|
|
1462
1509
|
Ge as resetRequest,
|
|
1463
|
-
|
|
1464
|
-
|
|
1510
|
+
en as resetRouter,
|
|
1511
|
+
Os as session,
|
|
1465
1512
|
ee as sessionStorageUtil,
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1513
|
+
je as setConfig,
|
|
1514
|
+
qe as setLoginInfo,
|
|
1515
|
+
ie as useApp,
|
|
1516
|
+
X as useAppStore,
|
|
1517
|
+
js as useAuth,
|
|
1518
|
+
Te as useAuthStore,
|
|
1519
|
+
Ks as useForm,
|
|
1520
|
+
Ee as useMenu,
|
|
1521
|
+
K as useMenuStore,
|
|
1522
|
+
qs as useTable,
|
|
1523
|
+
Se as useUserStore
|
|
1477
1524
|
};
|