xto-fronted 0.4.16 → 0.4.18
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/{index-Cp8sP57V.js → index--Urjal10.js} +1 -1
- package/dist/{index-DYFNnzjr.js → index-C2LrtpQb.js} +547 -557
- package/dist/{index-BvGKg7pX.js → index-D6SM8jcQ.js} +1 -1
- package/dist/{index-CWqQlqFn.js → index-DK5nOrQA.js} +1 -1
- package/dist/{index-CXru1UAh.js → index-DmjW2npo.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/stores/app.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Layout/Header.vue +3 -45
- package/src/stores/app.ts +20 -2
- package/dist/components/Layout/MixTopMenu.vue.d.ts +0 -2
- package/dist/index-8tKP-ZZr.js +0 -475
- package/dist/index-BDELIN6f.js +0 -345
- package/dist/index-Bqx7oYvi.js +0 -2303
- package/dist/index-DYjM-bJ4.js +0 -142
- package/dist/index-U9HXi5z6.js +0 -372
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as _, computed as y, watch as rt, defineComponent as X, openBlock as u, createElementBlock as g, normalizeClass as F, createElementVNode as t, withDirectives as Be, toDisplayString as T, unref as l, vShow as lt, createVNode as S, withCtx as x, Fragment as A, renderList as K, createBlock as R, createTextVNode as ee, createCommentVNode as z, onMounted as it, onUnmounted as ut, withModifiers as Ve, Transition as ze, withKeys as Fe, vModelText as ct, normalizeStyle as Ke, resolveComponent as dt, reactive as Ce } from "vue";
|
|
2
2
|
import { defineStore as pe } from "pinia";
|
|
3
|
-
import { useRoute as ae, useRouter as
|
|
4
|
-
import { Menu as
|
|
3
|
+
import { useRoute as ae, useRouter as J, createRouter as Se, createWebHistory as Ie } from "vue-router";
|
|
4
|
+
import { Menu as je, SubMenu as qe, MenuItem as ue, Tabs as mt, TabPane as pt } from "@xto/navigation";
|
|
5
5
|
import { Icon as M, Button as he } from "@xto/base";
|
|
6
|
-
import { Drawer as
|
|
7
|
-
import { Form as
|
|
8
|
-
import
|
|
9
|
-
const se = "xto_",
|
|
6
|
+
import { Drawer as ht, Message as H } from "@xto/feedback";
|
|
7
|
+
import { Form as ft, FormItem as re, Input as Ae, Checkbox as vt } from "@xto/form";
|
|
8
|
+
import _t from "axios";
|
|
9
|
+
const se = "xto_", Ye = (e) => ({
|
|
10
10
|
get(s) {
|
|
11
11
|
const o = e.getItem(se + s);
|
|
12
12
|
if (!o) return null;
|
|
@@ -32,7 +32,7 @@ const se = "xto_", qe = (e) => ({
|
|
|
32
32
|
o.startsWith(se) && e.removeItem(o);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
}), le =
|
|
35
|
+
}), le = Ye(window.localStorage), ie = Ye(window.sessionStorage), f = {
|
|
36
36
|
get: le.get,
|
|
37
37
|
set: le.set,
|
|
38
38
|
remove: le.remove,
|
|
@@ -42,69 +42,71 @@ const se = "xto_", qe = (e) => ({
|
|
|
42
42
|
set: ie.set,
|
|
43
43
|
remove: ie.remove,
|
|
44
44
|
clear: ie.clear
|
|
45
|
-
},
|
|
46
|
-
const e =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
}, P = (
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, Y = (
|
|
60
|
-
|
|
61
|
-
}, B = () => {
|
|
62
|
-
|
|
45
|
+
}, ke = ["sidebar", "top"], Q = pe("app", () => {
|
|
46
|
+
const e = _(f.get("appName") || "XTO App"), s = _(f.get("indexPath") || "/dashboard"), o = _(f.get("isDark") || !1), a = _(f.get("theme") || "light"), n = f.get("layout"), c = _(
|
|
47
|
+
ke.includes(n) ? n : "sidebar"
|
|
48
|
+
), b = _(f.get("isCollapsed") || !1), d = _(f.get("showTabs") ?? !0), h = _(f.get("showFooter") ?? !0), i = _(f.get("showBreadcrumb") ?? !0), p = _(f.get("primaryColor") || "#409eff"), r = _([]), v = y(() => o.value ? "dark" : "light"), D = (I) => {
|
|
49
|
+
e.value = I, f.set("appName", I);
|
|
50
|
+
}, w = (I) => {
|
|
51
|
+
s.value = I, f.set("indexPath", I);
|
|
52
|
+
}, P = () => {
|
|
53
|
+
o.value = !o.value, a.value = o.value ? "dark" : "light", L();
|
|
54
|
+
}, C = (I) => {
|
|
55
|
+
a.value = I, o.value = I === "dark", L();
|
|
56
|
+
}, L = () => {
|
|
57
|
+
const I = document.documentElement;
|
|
58
|
+
o.value ? I.classList.add("dark") : I.classList.remove("dark"), f.set("isDark", o.value), f.set("theme", a.value);
|
|
59
|
+
}, Y = () => {
|
|
60
|
+
b.value = !b.value, f.set("isCollapsed", b.value);
|
|
61
|
+
}, B = (I) => {
|
|
62
|
+
ke.includes(I) || (I = "sidebar"), c.value = I, f.set("layout", I);
|
|
63
63
|
}, $ = () => {
|
|
64
|
-
d.value = !d.value, f.set("
|
|
64
|
+
d.value = !d.value, f.set("showTabs", d.value);
|
|
65
65
|
}, V = () => {
|
|
66
|
-
h.value = !h.value, f.set("
|
|
67
|
-
}, N = (
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
p.value.
|
|
71
|
-
}, ve = (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
h.value = !h.value, f.set("showFooter", h.value);
|
|
67
|
+
}, N = () => {
|
|
68
|
+
i.value = !i.value, f.set("showBreadcrumb", i.value);
|
|
69
|
+
}, O = (I) => {
|
|
70
|
+
p.value = I, document.documentElement.style.setProperty("--color-primary", I), f.set("primaryColor", I);
|
|
71
|
+
}, ve = (I) => {
|
|
72
|
+
r.value.includes(I) || r.value.push(I);
|
|
73
|
+
}, _e = (I) => {
|
|
74
|
+
const W = r.value.indexOf(I);
|
|
75
|
+
W > -1 && r.value.splice(W, 1);
|
|
76
76
|
}, ge = () => {
|
|
77
|
-
|
|
77
|
+
r.value = [];
|
|
78
|
+
}, ne = () => {
|
|
79
|
+
L(), p.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", p.value), ke.includes(c.value) || (c.value = "sidebar", f.set("layout", "sidebar"));
|
|
78
80
|
};
|
|
79
|
-
return
|
|
81
|
+
return rt(o, L), {
|
|
80
82
|
appName: e,
|
|
81
83
|
indexPath: s,
|
|
82
84
|
isDark: o,
|
|
83
85
|
theme: a,
|
|
84
|
-
layout:
|
|
85
|
-
isCollapsed:
|
|
86
|
-
showTabs:
|
|
87
|
-
showFooter:
|
|
88
|
-
showBreadcrumb:
|
|
89
|
-
primaryColor:
|
|
90
|
-
cachedViews:
|
|
91
|
-
themeClass:
|
|
92
|
-
setAppName:
|
|
93
|
-
setIndexPath:
|
|
94
|
-
toggleTheme:
|
|
95
|
-
toggleCollapse:
|
|
96
|
-
setTheme:
|
|
97
|
-
setLayout:
|
|
98
|
-
toggleTabs:
|
|
99
|
-
toggleFooter:
|
|
100
|
-
toggleBreadcrumb:
|
|
101
|
-
setPrimaryColor:
|
|
102
|
-
addCachedView:
|
|
103
|
-
removeCachedView:
|
|
104
|
-
clearCachedViews:
|
|
105
|
-
initTheme:
|
|
86
|
+
layout: c,
|
|
87
|
+
isCollapsed: b,
|
|
88
|
+
showTabs: d,
|
|
89
|
+
showFooter: h,
|
|
90
|
+
showBreadcrumb: i,
|
|
91
|
+
primaryColor: p,
|
|
92
|
+
cachedViews: r,
|
|
93
|
+
themeClass: v,
|
|
94
|
+
setAppName: D,
|
|
95
|
+
setIndexPath: w,
|
|
96
|
+
toggleTheme: P,
|
|
97
|
+
toggleCollapse: Y,
|
|
98
|
+
setTheme: C,
|
|
99
|
+
setLayout: B,
|
|
100
|
+
toggleTabs: $,
|
|
101
|
+
toggleFooter: V,
|
|
102
|
+
toggleBreadcrumb: N,
|
|
103
|
+
setPrimaryColor: O,
|
|
104
|
+
addCachedView: ve,
|
|
105
|
+
removeCachedView: _e,
|
|
106
|
+
clearCachedViews: ge,
|
|
107
|
+
initTheme: ne
|
|
106
108
|
};
|
|
107
|
-
}),
|
|
109
|
+
}), be = "menu_list", gt = {
|
|
108
110
|
menuCode: "home",
|
|
109
111
|
menuName: "首页",
|
|
110
112
|
menuUrl: "/dashboard",
|
|
@@ -112,40 +114,40 @@ const se = "xto_", qe = (e) => ({
|
|
|
112
114
|
closable: !1,
|
|
113
115
|
isDefault: !1,
|
|
114
116
|
isOut: !1
|
|
115
|
-
},
|
|
116
|
-
const e =
|
|
117
|
+
}, te = pe("menu", () => {
|
|
118
|
+
const e = _(f.get(be) || []), s = y(() => e.value.length > 0);
|
|
117
119
|
return {
|
|
118
120
|
menuList: e,
|
|
119
121
|
hasMenu: s,
|
|
120
122
|
setMenuList: (n) => {
|
|
121
|
-
e.value = [
|
|
123
|
+
e.value = [gt, ...n], f.set(be, e.value);
|
|
122
124
|
},
|
|
123
125
|
clearMenu: () => {
|
|
124
|
-
e.value = [], f.remove(
|
|
126
|
+
e.value = [], f.remove(be);
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
|
-
}),
|
|
128
|
-
const e =
|
|
129
|
-
var
|
|
130
|
-
return ((
|
|
129
|
+
}), We = "/vite.svg", we = "user_info", j = pe("user", () => {
|
|
130
|
+
const e = _(f.get(we)), s = y(() => !!e.value), o = y(() => {
|
|
131
|
+
var r;
|
|
132
|
+
return ((r = e.value) == null ? void 0 : r.userId) || "";
|
|
131
133
|
}), a = y(() => {
|
|
132
|
-
var
|
|
133
|
-
return ((
|
|
134
|
+
var r;
|
|
135
|
+
return ((r = e.value) == null ? void 0 : r.userName) || "";
|
|
134
136
|
}), n = y(() => {
|
|
135
|
-
var
|
|
136
|
-
return ((
|
|
137
|
+
var r;
|
|
138
|
+
return ((r = e.value) == null ? void 0 : r.departmentName) || "";
|
|
137
139
|
}), c = y(() => {
|
|
138
|
-
var
|
|
139
|
-
return ((
|
|
140
|
-
}),
|
|
141
|
-
var
|
|
142
|
-
return ((
|
|
140
|
+
var r;
|
|
141
|
+
return ((r = e.value) == null ? void 0 : r.email) || "";
|
|
142
|
+
}), b = y(() => {
|
|
143
|
+
var r;
|
|
144
|
+
return ((r = e.value) == null ? void 0 : r.mobilePhone) || "";
|
|
143
145
|
}), d = y(() => {
|
|
144
|
-
var
|
|
145
|
-
return ((
|
|
146
|
+
var r;
|
|
147
|
+
return ((r = e.value) == null ? void 0 : r.positionName) || "";
|
|
146
148
|
}), h = y(() => {
|
|
147
|
-
var
|
|
148
|
-
return ((
|
|
149
|
+
var r;
|
|
150
|
+
return ((r = e.value) == null ? void 0 : r.avatar) || "";
|
|
149
151
|
});
|
|
150
152
|
return {
|
|
151
153
|
userInfo: e,
|
|
@@ -154,37 +156,37 @@ const se = "xto_", qe = (e) => ({
|
|
|
154
156
|
userName: a,
|
|
155
157
|
departmentName: n,
|
|
156
158
|
email: c,
|
|
157
|
-
mobilePhone:
|
|
159
|
+
mobilePhone: b,
|
|
158
160
|
positionName: d,
|
|
159
161
|
avatar: h,
|
|
160
|
-
setUserInfo: (
|
|
161
|
-
e.value =
|
|
162
|
+
setUserInfo: (r) => {
|
|
163
|
+
e.value = r, f.set(we, r);
|
|
162
164
|
},
|
|
163
165
|
clearUserInfo: () => {
|
|
164
|
-
e.value = null, f.remove(
|
|
166
|
+
e.value = null, f.remove(we);
|
|
165
167
|
}
|
|
166
168
|
};
|
|
167
|
-
}),
|
|
168
|
-
f.set(Ie, e);
|
|
169
|
-
}, yt = () => f.get(xe), kt = (e) => {
|
|
169
|
+
}), xe = "token", Le = "token_type", Te = "refresh_token", Ee = "expires_time", Ne = "refresh_time", Ue = "code", fe = () => f.get(xe), yt = (e) => {
|
|
170
170
|
f.set(xe, e);
|
|
171
|
-
},
|
|
171
|
+
}, kt = () => f.get(Le), bt = (e) => {
|
|
172
172
|
f.set(Le, e);
|
|
173
|
-
},
|
|
173
|
+
}, Uo = () => f.get(Te), wt = (e) => {
|
|
174
174
|
f.set(Te, e);
|
|
175
|
-
},
|
|
175
|
+
}, Ct = () => f.get(Ee), St = (e) => {
|
|
176
176
|
f.set(Ee, e);
|
|
177
|
-
},
|
|
177
|
+
}, $o = () => f.get(Ne), It = (e) => {
|
|
178
178
|
f.set(Ne, e);
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
}, He = () => {
|
|
182
|
-
|
|
183
|
-
},
|
|
184
|
-
|
|
179
|
+
}, Mo = () => f.get(Ue), xt = (e) => {
|
|
180
|
+
f.set(Ue, e);
|
|
181
|
+
}, He = (e) => {
|
|
182
|
+
yt(e.access_token), bt(e.token_type || "Bearer"), wt(e.refresh_token), St(e.expires_time), It(e.refresh_time), e.code && xt(e.code);
|
|
183
|
+
}, Xe = () => {
|
|
184
|
+
f.remove(xe), f.remove(Le), f.remove(Te), f.remove(Ee), f.remove(Ne), f.remove(Ue);
|
|
185
|
+
}, Lt = () => {
|
|
186
|
+
const e = Ct();
|
|
185
187
|
return e ? Date.now() > e : !0;
|
|
186
|
-
},
|
|
187
|
-
const e =
|
|
188
|
+
}, Je = () => !!fe() && !Lt(), $e = pe("auth", () => {
|
|
189
|
+
const e = _(fe()), s = y(() => Je()), o = _(""), a = _(""), n = _(""), c = _("/login");
|
|
188
190
|
return {
|
|
189
191
|
token: e,
|
|
190
192
|
isLoggedIn: s,
|
|
@@ -193,10 +195,10 @@ const se = "xto_", qe = (e) => ({
|
|
|
193
195
|
clientId: n,
|
|
194
196
|
loginPath: c,
|
|
195
197
|
login: (v) => {
|
|
196
|
-
e.value = v.access_token,
|
|
198
|
+
e.value = v.access_token, He(v);
|
|
197
199
|
},
|
|
198
200
|
logout: () => {
|
|
199
|
-
e.value = null,
|
|
201
|
+
e.value = null, Xe();
|
|
200
202
|
},
|
|
201
203
|
setBaseUrl: (v) => {
|
|
202
204
|
o.value = v;
|
|
@@ -211,29 +213,29 @@ const se = "xto_", qe = (e) => ({
|
|
|
211
213
|
c.value = v;
|
|
212
214
|
}
|
|
213
215
|
};
|
|
214
|
-
}),
|
|
216
|
+
}), Tt = { class: "sidebar__logo" }, Et = { class: "sidebar__menu-icon" }, Nt = {
|
|
215
217
|
key: 1,
|
|
216
218
|
class: "sidebar__menu-char"
|
|
217
|
-
},
|
|
219
|
+
}, Ut = { class: "sidebar__menu-icon" }, $t = {
|
|
218
220
|
key: 1,
|
|
219
221
|
class: "sidebar__menu-char"
|
|
220
|
-
},
|
|
222
|
+
}, Mt = { class: "sidebar__menu-icon" }, Rt = {
|
|
221
223
|
key: 1,
|
|
222
224
|
class: "sidebar__menu-char"
|
|
223
|
-
},
|
|
225
|
+
}, Dt = {
|
|
224
226
|
key: 0,
|
|
225
227
|
class: "sidebar__user"
|
|
226
|
-
},
|
|
228
|
+
}, Pt = { class: "sidebar__user-info" }, Ot = { class: "sidebar__user-name" }, zt = { class: "sidebar__user-role" }, At = /* @__PURE__ */ X({
|
|
227
229
|
__name: "Sidebar",
|
|
228
230
|
props: {
|
|
229
231
|
menuList: { default: () => [] }
|
|
230
232
|
},
|
|
231
233
|
setup(e) {
|
|
232
|
-
const s = e, o = ae(), a =
|
|
234
|
+
const s = e, o = ae(), a = J(), n = te(), c = j(), b = $e(), d = Q(), h = y(() => s.menuList.length > 0 ? s.menuList : n.menuList), i = y(() => d.isCollapsed), p = y(() => o.path), r = y(() => d.isDark ? "#1d1e1f" : "#fff"), v = y(() => d.isDark ? "#cfd3dc" : "#303133"), D = y(() => "#409eff"), w = ($) => {
|
|
233
235
|
$ && $ !== o.path && a.push($);
|
|
234
236
|
}, P = () => {
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
+
b.logout(), c.clearUserInfo(), n.clearMenu(), a.push("/login");
|
|
238
|
+
}, C = /* @__PURE__ */ new Set([
|
|
237
239
|
"arrow-up",
|
|
238
240
|
"arrow-down",
|
|
239
241
|
"arrow-left",
|
|
@@ -335,7 +337,7 @@ const se = "xto_", qe = (e) => ({
|
|
|
335
337
|
"sun",
|
|
336
338
|
"theme",
|
|
337
339
|
"skin"
|
|
338
|
-
]),
|
|
340
|
+
]), L = ($) => {
|
|
339
341
|
if (!$ || $ === "") return "";
|
|
340
342
|
if ($.startsWith("tineco-icon-")) {
|
|
341
343
|
const N = $.replace("tineco-icon-", "");
|
|
@@ -372,81 +374,81 @@ const se = "xto_", qe = (e) => ({
|
|
|
372
374
|
list: "list",
|
|
373
375
|
grid: "grid"
|
|
374
376
|
}[$] || $;
|
|
375
|
-
}, Y = ($) => $ ? $.charAt(0) : "", B = ($) =>
|
|
376
|
-
return ($, V) => (u(),
|
|
377
|
-
class: F(["sidebar", { "sidebar--collapsed":
|
|
377
|
+
}, Y = ($) => $ ? $.charAt(0) : "", B = ($) => C.has($);
|
|
378
|
+
return ($, V) => (u(), g("div", {
|
|
379
|
+
class: F(["sidebar", { "sidebar--collapsed": i.value }])
|
|
378
380
|
}, [
|
|
379
|
-
t("div",
|
|
381
|
+
t("div", Tt, [
|
|
380
382
|
V[0] || (V[0] = t("img", {
|
|
381
|
-
src:
|
|
383
|
+
src: We,
|
|
382
384
|
alt: "Logo",
|
|
383
385
|
class: "sidebar__logo-img"
|
|
384
386
|
}, null, -1)),
|
|
385
|
-
|
|
386
|
-
[
|
|
387
|
+
Be(t("span", { class: "sidebar__logo-text" }, T(l(d).appName), 513), [
|
|
388
|
+
[lt, !i.value]
|
|
387
389
|
])
|
|
388
390
|
]),
|
|
389
|
-
S(
|
|
391
|
+
S(l(je), {
|
|
390
392
|
"default-active": p.value,
|
|
391
393
|
mode: "vertical",
|
|
392
|
-
collapse:
|
|
394
|
+
collapse: i.value,
|
|
393
395
|
"collapse-transition": !1,
|
|
394
|
-
"background-color":
|
|
396
|
+
"background-color": r.value,
|
|
395
397
|
"text-color": v.value,
|
|
396
398
|
"active-text-color": D.value,
|
|
397
399
|
class: "sidebar__menu",
|
|
398
|
-
onSelect:
|
|
400
|
+
onSelect: w
|
|
399
401
|
}, {
|
|
400
|
-
default:
|
|
401
|
-
(u(!0),
|
|
402
|
+
default: x(() => [
|
|
403
|
+
(u(!0), g(A, null, K(h.value, (N) => (u(), g(A, {
|
|
402
404
|
key: N.menuUrl
|
|
403
405
|
}, [
|
|
404
|
-
N.children && N.children.length > 0 ? (u(), R(
|
|
406
|
+
N.children && N.children.length > 0 ? (u(), R(l(qe), {
|
|
405
407
|
key: 0,
|
|
406
408
|
index: N.menuUrl
|
|
407
409
|
}, {
|
|
408
|
-
title:
|
|
409
|
-
t("span",
|
|
410
|
-
B(
|
|
410
|
+
title: x(() => [
|
|
411
|
+
t("span", Et, [
|
|
412
|
+
B(L(N.icon)) ? (u(), R(l(M), {
|
|
411
413
|
key: 0,
|
|
412
|
-
name:
|
|
414
|
+
name: L(N.icon),
|
|
413
415
|
size: 16
|
|
414
|
-
}, null, 8, ["name"])) : (u(),
|
|
416
|
+
}, null, 8, ["name"])) : (u(), g("span", Nt, T(Y(N.menuName)), 1))
|
|
415
417
|
]),
|
|
416
|
-
t("span", null,
|
|
418
|
+
t("span", null, T(N.menuName), 1)
|
|
417
419
|
]),
|
|
418
|
-
default:
|
|
419
|
-
(u(!0),
|
|
420
|
-
key:
|
|
421
|
-
index:
|
|
420
|
+
default: x(() => [
|
|
421
|
+
(u(!0), g(A, null, K(N.children, (O) => (u(), R(l(ue), {
|
|
422
|
+
key: O.menuUrl,
|
|
423
|
+
index: O.menuUrl
|
|
422
424
|
}, {
|
|
423
|
-
default:
|
|
424
|
-
t("span",
|
|
425
|
-
B(
|
|
425
|
+
default: x(() => [
|
|
426
|
+
t("span", Ut, [
|
|
427
|
+
B(L(O.icon)) ? (u(), R(l(M), {
|
|
426
428
|
key: 0,
|
|
427
|
-
name:
|
|
429
|
+
name: L(O.icon),
|
|
428
430
|
size: 16
|
|
429
|
-
}, null, 8, ["name"])) : (u(),
|
|
431
|
+
}, null, 8, ["name"])) : (u(), g("span", $t, T(Y(O.menuName)), 1))
|
|
430
432
|
]),
|
|
431
|
-
t("span", null,
|
|
433
|
+
t("span", null, T(O.menuName), 1)
|
|
432
434
|
]),
|
|
433
435
|
_: 2
|
|
434
436
|
}, 1032, ["index"]))), 128))
|
|
435
437
|
]),
|
|
436
438
|
_: 2
|
|
437
|
-
}, 1032, ["index"])) : (u(), R(
|
|
439
|
+
}, 1032, ["index"])) : (u(), R(l(ue), {
|
|
438
440
|
key: 1,
|
|
439
441
|
index: N.menuUrl
|
|
440
442
|
}, {
|
|
441
|
-
default:
|
|
442
|
-
t("span",
|
|
443
|
-
B(
|
|
443
|
+
default: x(() => [
|
|
444
|
+
t("span", Mt, [
|
|
445
|
+
B(L(N.icon)) ? (u(), R(l(M), {
|
|
444
446
|
key: 0,
|
|
445
|
-
name:
|
|
447
|
+
name: L(N.icon),
|
|
446
448
|
size: 16
|
|
447
|
-
}, null, 8, ["name"])) : (u(),
|
|
449
|
+
}, null, 8, ["name"])) : (u(), g("span", Rt, T(Y(N.menuName)), 1))
|
|
448
450
|
]),
|
|
449
|
-
t("span", null,
|
|
451
|
+
t("span", null, T(N.menuName), 1)
|
|
450
452
|
]),
|
|
451
453
|
_: 2
|
|
452
454
|
}, 1032, ["index"]))
|
|
@@ -454,18 +456,18 @@ const se = "xto_", qe = (e) => ({
|
|
|
454
456
|
]),
|
|
455
457
|
_: 1
|
|
456
458
|
}, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color"]),
|
|
457
|
-
|
|
458
|
-
t("div",
|
|
459
|
-
t("span",
|
|
460
|
-
t("span", zt,
|
|
459
|
+
i.value ? z("", !0) : (u(), g("div", Dt, [
|
|
460
|
+
t("div", Pt, [
|
|
461
|
+
t("span", Ot, T(l(c).userName), 1),
|
|
462
|
+
t("span", zt, T(l(c).departmentName), 1)
|
|
461
463
|
]),
|
|
462
|
-
S(
|
|
464
|
+
S(l(he), {
|
|
463
465
|
type: "text",
|
|
464
466
|
size: "small",
|
|
465
467
|
onClick: P
|
|
466
468
|
}, {
|
|
467
|
-
default:
|
|
468
|
-
|
|
469
|
+
default: x(() => [...V[1] || (V[1] = [
|
|
470
|
+
ee("退出", -1)
|
|
469
471
|
])]),
|
|
470
472
|
_: 1
|
|
471
473
|
})
|
|
@@ -477,131 +479,127 @@ const se = "xto_", qe = (e) => ({
|
|
|
477
479
|
for (const [a, n] of s)
|
|
478
480
|
o[a] = n;
|
|
479
481
|
return o;
|
|
480
|
-
},
|
|
482
|
+
}, Bt = /* @__PURE__ */ q(At, [["__scopeId", "data-v-480fc818"]]), Vt = { class: "header" }, Ft = { class: "header__left" }, Kt = {
|
|
481
483
|
key: 0,
|
|
482
484
|
class: "header__breadcrumb"
|
|
483
|
-
},
|
|
485
|
+
}, jt = {
|
|
484
486
|
key: 0,
|
|
485
487
|
class: "breadcrumb-separator"
|
|
486
|
-
},
|
|
488
|
+
}, qt = { class: "header__right" }, Yt = ["title"], Wt = { class: "header__avatar" }, Ht = { class: "header__user-name" }, Xt = {
|
|
487
489
|
key: 0,
|
|
488
490
|
class: "header__dropdown"
|
|
489
|
-
},
|
|
491
|
+
}, Jt = { class: "header__dropdown-header" }, Qt = { class: "header__dropdown-avatar" }, Zt = { class: "header__dropdown-info" }, Gt = { class: "header__dropdown-name" }, es = { class: "header__dropdown-role" }, ts = { class: "header__dropdown-menu" }, ss = { class: "search-container" }, os = { class: "search-input-wrapper" }, as = {
|
|
490
492
|
key: 0,
|
|
491
493
|
class: "search-results"
|
|
492
|
-
},
|
|
494
|
+
}, ns = ["onClick"], rs = { class: "search-result-info" }, ls = { class: "search-result-title" }, is = {
|
|
493
495
|
key: 0,
|
|
494
496
|
class: "search-result-parent"
|
|
495
|
-
},
|
|
497
|
+
}, us = {
|
|
496
498
|
key: 1,
|
|
497
499
|
class: "search-empty"
|
|
498
|
-
},
|
|
500
|
+
}, cs = { class: "settings-drawer" }, ds = { class: "settings-section" }, ms = { class: "settings-layout-options" }, ps = ["onClick"], hs = { class: "layout-option__preview" }, fs = {
|
|
499
501
|
key: 0,
|
|
500
502
|
class: "layout-preview-sidebar"
|
|
501
|
-
},
|
|
503
|
+
}, vs = {
|
|
502
504
|
key: 1,
|
|
503
505
|
class: "layout-preview-top"
|
|
504
|
-
},
|
|
505
|
-
key: 2,
|
|
506
|
-
class: "layout-preview-mix"
|
|
507
|
-
}, _s = { class: "layout-option__label" }, gs = { class: "settings-section" }, ys = { class: "settings-color-options" }, ks = ["title", "onClick"], bs = { class: "settings-section" }, ws = { class: "settings-switch-list" }, Cs = { class: "settings-switch-item" }, Ss = { class: "settings-switch-item" }, Is = /* @__PURE__ */ H({
|
|
506
|
+
}, _s = { class: "layout-option__label" }, gs = { class: "settings-section" }, ys = { class: "settings-color-options" }, ks = ["title", "onClick"], bs = { class: "settings-section" }, ws = { class: "settings-switch-list" }, Cs = { class: "settings-switch-item" }, Ss = { class: "settings-switch-item" }, Is = /* @__PURE__ */ X({
|
|
508
507
|
__name: "Header",
|
|
509
508
|
setup(e) {
|
|
510
|
-
const s = ae(), o =
|
|
509
|
+
const s = ae(), o = J(), a = Q(), n = j(), c = $e(), b = te(), d = _(!1), h = _(!1), i = _(null), p = _(!1), r = _(!1), v = _(""), D = _(null), w = _(!1), P = [
|
|
511
510
|
{ value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
|
|
512
|
-
{ value: "top", label: "顶部菜单", icon: "menu" }
|
|
513
|
-
|
|
514
|
-
], b = [
|
|
511
|
+
{ value: "top", label: "顶部菜单", icon: "menu" }
|
|
512
|
+
], C = [
|
|
515
513
|
{ value: "#409eff", label: "默认蓝" },
|
|
516
514
|
{ value: "#1890ff", label: "科技蓝" },
|
|
517
515
|
{ value: "#52c41a", label: "极光绿" },
|
|
518
516
|
{ value: "#faad14", label: "日落橙" },
|
|
519
517
|
{ value: "#f5222d", label: "薄暮红" },
|
|
520
518
|
{ value: "#722ed1", label: "酱紫" }
|
|
521
|
-
],
|
|
519
|
+
], L = y(() => s.matched.filter((m) => m.meta && m.meta.title).map((m) => ({
|
|
522
520
|
title: m.meta.title,
|
|
523
521
|
path: m.path
|
|
524
522
|
}))), Y = (U, m = "") => {
|
|
525
|
-
const
|
|
523
|
+
const Z = [];
|
|
526
524
|
return U.forEach((k) => {
|
|
527
|
-
k.children && k.children.length > 0 ?
|
|
528
|
-
}),
|
|
529
|
-
}, B = y(() => v.value.trim() ? Y(
|
|
525
|
+
k.children && k.children.length > 0 ? Z.push(...Y(k.children, k.title)) : Z.push({ ...k, parentTitle: m });
|
|
526
|
+
}), Z;
|
|
527
|
+
}, B = y(() => v.value.trim() ? Y(b.menuList).filter(
|
|
530
528
|
(m) => m.title.toLowerCase().includes(v.value.toLowerCase())
|
|
531
529
|
) : []), $ = y(() => a.layout), V = () => {
|
|
532
530
|
a.toggleCollapse();
|
|
533
531
|
}, N = () => {
|
|
534
532
|
a.toggleTheme();
|
|
535
|
-
},
|
|
533
|
+
}, O = () => {
|
|
536
534
|
h.value = !0;
|
|
537
535
|
}, ve = (U) => {
|
|
538
536
|
a.setLayout(U);
|
|
539
537
|
}, _e = (U) => {
|
|
540
|
-
|
|
538
|
+
w.value = U;
|
|
541
539
|
const m = document.documentElement;
|
|
542
540
|
U ? m.classList.add("grey-mode") : m.classList.remove("grey-mode");
|
|
543
541
|
}, ge = () => {
|
|
544
542
|
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
|
|
545
|
-
}, x = () => {
|
|
546
|
-
p.value = !!document.fullscreenElement;
|
|
547
543
|
}, ne = () => {
|
|
544
|
+
p.value = !!document.fullscreenElement;
|
|
545
|
+
}, I = () => {
|
|
548
546
|
d.value = !d.value;
|
|
549
|
-
},
|
|
547
|
+
}, W = () => {
|
|
550
548
|
d.value = !1;
|
|
551
|
-
},
|
|
552
|
-
|
|
549
|
+
}, Re = () => {
|
|
550
|
+
r.value = !0;
|
|
553
551
|
}, ye = () => {
|
|
554
|
-
|
|
555
|
-
},
|
|
552
|
+
r.value = !1, v.value = "";
|
|
553
|
+
}, De = (U) => {
|
|
556
554
|
o.push(U), ye();
|
|
557
|
-
},
|
|
555
|
+
}, st = (U) => {
|
|
558
556
|
a.setPrimaryColor(U);
|
|
559
|
-
}, st = () => {
|
|
560
|
-
te(), o.push("/profile");
|
|
561
557
|
}, ot = () => {
|
|
562
|
-
|
|
558
|
+
W(), o.push("/profile");
|
|
563
559
|
}, at = () => {
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
|
|
560
|
+
W(), o.push("/change-password");
|
|
561
|
+
}, nt = () => {
|
|
562
|
+
W(), c.logout(), n.clearUserInfo(), b.clearMenu(), o.push("/login");
|
|
567
563
|
}, Pe = (U) => {
|
|
568
|
-
|
|
564
|
+
i.value && !i.value.contains(U.target) && W(), D.value && !D.value.contains(U.target) && ye();
|
|
565
|
+
}, Oe = (U) => {
|
|
566
|
+
U.key === "Escape" && (ye(), W()), (U.ctrlKey || U.metaKey) && U.key === "k" && (U.preventDefault(), Re());
|
|
569
567
|
};
|
|
570
|
-
return
|
|
571
|
-
document.addEventListener("click",
|
|
572
|
-
}),
|
|
573
|
-
document.removeEventListener("click",
|
|
568
|
+
return it(() => {
|
|
569
|
+
document.addEventListener("click", Pe), document.addEventListener("fullscreenchange", ne), document.addEventListener("keydown", Oe), a.initTheme(), w.value = document.documentElement.classList.contains("grey-mode");
|
|
570
|
+
}), ut(() => {
|
|
571
|
+
document.removeEventListener("click", Pe), document.removeEventListener("fullscreenchange", ne), document.removeEventListener("keydown", Oe);
|
|
574
572
|
}), (U, m) => {
|
|
575
|
-
var
|
|
576
|
-
return u(),
|
|
577
|
-
t("div",
|
|
573
|
+
var Z;
|
|
574
|
+
return u(), g("div", Vt, [
|
|
575
|
+
t("div", Ft, [
|
|
578
576
|
t("div", {
|
|
579
577
|
class: "header__collapse",
|
|
580
578
|
onClick: V
|
|
581
579
|
}, [
|
|
582
|
-
S(
|
|
583
|
-
name:
|
|
580
|
+
S(l(M), {
|
|
581
|
+
name: l(a).isCollapsed ? "menu-unfold" : "menu-fold",
|
|
584
582
|
size: 18
|
|
585
583
|
}, null, 8, ["name"])
|
|
586
584
|
]),
|
|
587
|
-
|
|
588
|
-
(u(!0),
|
|
585
|
+
l(a).showBreadcrumb ? (u(), g("div", Kt, [
|
|
586
|
+
(u(!0), g(A, null, K(L.value, (k, G) => (u(), g("span", {
|
|
589
587
|
key: k.path
|
|
590
588
|
}, [
|
|
591
|
-
|
|
589
|
+
G > 0 ? (u(), g("span", jt, "/")) : z("", !0),
|
|
592
590
|
t("span", {
|
|
593
|
-
class: F({ "is-current":
|
|
594
|
-
},
|
|
591
|
+
class: F({ "is-current": G === L.value.length - 1 })
|
|
592
|
+
}, T(k.title), 3)
|
|
595
593
|
]))), 128))
|
|
596
|
-
])) :
|
|
594
|
+
])) : z("", !0)
|
|
597
595
|
]),
|
|
598
|
-
t("div",
|
|
596
|
+
t("div", qt, [
|
|
599
597
|
t("div", {
|
|
600
598
|
class: "header__action",
|
|
601
|
-
onClick:
|
|
599
|
+
onClick: Re,
|
|
602
600
|
title: "搜索 (Ctrl+K)"
|
|
603
601
|
}, [
|
|
604
|
-
S(
|
|
602
|
+
S(l(M), {
|
|
605
603
|
name: "search",
|
|
606
604
|
size: 16
|
|
607
605
|
})
|
|
@@ -611,17 +609,17 @@ const se = "xto_", qe = (e) => ({
|
|
|
611
609
|
onClick: ge,
|
|
612
610
|
title: p.value ? "退出全屏" : "全屏"
|
|
613
611
|
}, [
|
|
614
|
-
S(
|
|
612
|
+
S(l(M), {
|
|
615
613
|
name: p.value ? "fullscreen-exit" : "fullscreen",
|
|
616
614
|
size: 16
|
|
617
615
|
}, null, 8, ["name"])
|
|
618
|
-
], 8,
|
|
616
|
+
], 8, Yt),
|
|
619
617
|
t("div", {
|
|
620
618
|
class: "header__action",
|
|
621
|
-
onClick:
|
|
619
|
+
onClick: O,
|
|
622
620
|
title: "换肤设置"
|
|
623
621
|
}, [
|
|
624
|
-
S(
|
|
622
|
+
S(l(M), {
|
|
625
623
|
name: "skin",
|
|
626
624
|
size: 16
|
|
627
625
|
})
|
|
@@ -631,49 +629,49 @@ const se = "xto_", qe = (e) => ({
|
|
|
631
629
|
onClick: N,
|
|
632
630
|
title: "切换主题"
|
|
633
631
|
}, [
|
|
634
|
-
S(
|
|
635
|
-
name:
|
|
632
|
+
S(l(M), {
|
|
633
|
+
name: l(a).isDark ? "sun" : "moon",
|
|
636
634
|
size: 16
|
|
637
635
|
}, null, 8, ["name"])
|
|
638
636
|
]),
|
|
639
637
|
t("div", {
|
|
640
638
|
class: "header__user",
|
|
641
639
|
ref_key: "dropdownRef",
|
|
642
|
-
ref:
|
|
640
|
+
ref: i
|
|
643
641
|
}, [
|
|
644
642
|
t("div", {
|
|
645
643
|
class: "header__user-trigger",
|
|
646
|
-
onClick:
|
|
644
|
+
onClick: Ve(I, ["stop"])
|
|
647
645
|
}, [
|
|
648
|
-
t("div",
|
|
649
|
-
t("span", null,
|
|
646
|
+
t("div", Wt, [
|
|
647
|
+
t("span", null, T(((Z = l(n).userName) == null ? void 0 : Z.charAt(0)) || "U"), 1)
|
|
650
648
|
]),
|
|
651
|
-
t("span",
|
|
649
|
+
t("span", Ht, T(l(n).userName), 1),
|
|
652
650
|
t("span", {
|
|
653
651
|
class: F(["header__user-arrow", { "is-active": d.value }])
|
|
654
652
|
}, "▼", 2)
|
|
655
653
|
]),
|
|
656
654
|
S(ze, { name: "dropdown" }, {
|
|
657
|
-
default:
|
|
655
|
+
default: x(() => {
|
|
658
656
|
var k;
|
|
659
657
|
return [
|
|
660
|
-
d.value ? (u(),
|
|
661
|
-
t("div",
|
|
662
|
-
t("div", Jt, [
|
|
663
|
-
t("span", null, L(((k = r(n).userName) == null ? void 0 : k.charAt(0)) || "U"), 1)
|
|
664
|
-
]),
|
|
658
|
+
d.value ? (u(), g("div", Xt, [
|
|
659
|
+
t("div", Jt, [
|
|
665
660
|
t("div", Qt, [
|
|
666
|
-
t("
|
|
667
|
-
|
|
661
|
+
t("span", null, T(((k = l(n).userName) == null ? void 0 : k.charAt(0)) || "U"), 1)
|
|
662
|
+
]),
|
|
663
|
+
t("div", Zt, [
|
|
664
|
+
t("div", Gt, T(l(n).userName), 1),
|
|
665
|
+
t("div", es, T(l(n).departmentName), 1)
|
|
668
666
|
])
|
|
669
667
|
]),
|
|
670
668
|
m[8] || (m[8] = t("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
671
|
-
t("div",
|
|
669
|
+
t("div", ts, [
|
|
672
670
|
t("div", {
|
|
673
671
|
class: "header__dropdown-item",
|
|
674
|
-
onClick:
|
|
672
|
+
onClick: ot
|
|
675
673
|
}, [
|
|
676
|
-
S(
|
|
674
|
+
S(l(M), {
|
|
677
675
|
name: "user",
|
|
678
676
|
size: 16
|
|
679
677
|
}),
|
|
@@ -681,9 +679,9 @@ const se = "xto_", qe = (e) => ({
|
|
|
681
679
|
]),
|
|
682
680
|
t("div", {
|
|
683
681
|
class: "header__dropdown-item",
|
|
684
|
-
onClick:
|
|
682
|
+
onClick: at
|
|
685
683
|
}, [
|
|
686
|
-
S(
|
|
684
|
+
S(l(M), {
|
|
687
685
|
name: "lock",
|
|
688
686
|
size: 16
|
|
689
687
|
}),
|
|
@@ -692,16 +690,16 @@ const se = "xto_", qe = (e) => ({
|
|
|
692
690
|
m[7] || (m[7] = t("div", { class: "header__dropdown-divider" }, null, -1)),
|
|
693
691
|
t("div", {
|
|
694
692
|
class: "header__dropdown-item header__dropdown-item--danger",
|
|
695
|
-
onClick:
|
|
693
|
+
onClick: nt
|
|
696
694
|
}, [
|
|
697
|
-
S(
|
|
695
|
+
S(l(M), {
|
|
698
696
|
name: "logout",
|
|
699
697
|
size: 16
|
|
700
698
|
}),
|
|
701
699
|
m[6] || (m[6] = t("span", null, "退出登录", -1))
|
|
702
700
|
])
|
|
703
701
|
])
|
|
704
|
-
])) :
|
|
702
|
+
])) : z("", !0)
|
|
705
703
|
];
|
|
706
704
|
}),
|
|
707
705
|
_: 1
|
|
@@ -709,132 +707,124 @@ const se = "xto_", qe = (e) => ({
|
|
|
709
707
|
], 512)
|
|
710
708
|
]),
|
|
711
709
|
S(ze, { name: "search" }, {
|
|
712
|
-
default:
|
|
713
|
-
|
|
710
|
+
default: x(() => [
|
|
711
|
+
r.value ? (u(), g("div", {
|
|
714
712
|
key: 0,
|
|
715
713
|
class: "header__search-modal",
|
|
716
714
|
ref_key: "searchRef",
|
|
717
715
|
ref: D
|
|
718
716
|
}, [
|
|
719
|
-
t("div",
|
|
720
|
-
t("div",
|
|
721
|
-
S(
|
|
717
|
+
t("div", ss, [
|
|
718
|
+
t("div", os, [
|
|
719
|
+
S(l(M), {
|
|
722
720
|
class: "search-icon",
|
|
723
721
|
name: "search",
|
|
724
722
|
size: 20
|
|
725
723
|
}),
|
|
726
|
-
|
|
724
|
+
Be(t("input", {
|
|
727
725
|
"onUpdate:modelValue": m[0] || (m[0] = (k) => v.value = k),
|
|
728
726
|
type: "text",
|
|
729
727
|
class: "search-input",
|
|
730
728
|
placeholder: "搜索菜单...",
|
|
731
729
|
autofocus: "",
|
|
732
|
-
onKeyup: m[1] || (m[1] =
|
|
730
|
+
onKeyup: m[1] || (m[1] = Fe((k) => B.value[0] && De(B.value[0].path), ["enter"]))
|
|
733
731
|
}, null, 544), [
|
|
734
|
-
[
|
|
732
|
+
[ct, v.value]
|
|
735
733
|
]),
|
|
736
734
|
m[9] || (m[9] = t("span", { class: "search-shortcut" }, "ESC 关闭", -1))
|
|
737
735
|
]),
|
|
738
|
-
B.value.length > 0 ? (u(),
|
|
739
|
-
(u(!0),
|
|
736
|
+
B.value.length > 0 ? (u(), g("div", as, [
|
|
737
|
+
(u(!0), g(A, null, K(B.value, (k, G) => (u(), g("div", {
|
|
740
738
|
key: k.path,
|
|
741
|
-
class: F(["search-result-item", { "is-first":
|
|
742
|
-
onClick: (bo) =>
|
|
739
|
+
class: F(["search-result-item", { "is-first": G === 0 }]),
|
|
740
|
+
onClick: (bo) => De(k.path)
|
|
743
741
|
}, [
|
|
744
|
-
S(
|
|
742
|
+
S(l(M), {
|
|
745
743
|
class: "search-result-icon",
|
|
746
744
|
name: k.icon || "file",
|
|
747
745
|
size: 20
|
|
748
746
|
}, null, 8, ["name"]),
|
|
749
|
-
t("div",
|
|
750
|
-
t("span",
|
|
751
|
-
k.parentTitle ? (u(),
|
|
747
|
+
t("div", rs, [
|
|
748
|
+
t("span", ls, T(k.title), 1),
|
|
749
|
+
k.parentTitle ? (u(), g("span", is, T(k.parentTitle), 1)) : z("", !0)
|
|
752
750
|
])
|
|
753
|
-
], 10,
|
|
754
|
-
])) : v.value ? (u(),
|
|
751
|
+
], 10, ns))), 128))
|
|
752
|
+
])) : v.value ? (u(), g("div", us, " 未找到匹配的菜单 ")) : z("", !0)
|
|
755
753
|
])
|
|
756
|
-
], 512)) :
|
|
754
|
+
], 512)) : z("", !0)
|
|
757
755
|
]),
|
|
758
756
|
_: 1
|
|
759
757
|
}),
|
|
760
|
-
S(
|
|
758
|
+
S(l(ht), {
|
|
761
759
|
modelValue: h.value,
|
|
762
760
|
"onUpdate:modelValue": m[3] || (m[3] = (k) => h.value = k),
|
|
763
761
|
title: "换肤设置",
|
|
764
762
|
direction: "rtl",
|
|
765
763
|
size: "320px"
|
|
766
764
|
}, {
|
|
767
|
-
default:
|
|
768
|
-
t("div",
|
|
769
|
-
t("div",
|
|
770
|
-
m[
|
|
771
|
-
t("div",
|
|
772
|
-
(u(),
|
|
765
|
+
default: x(() => [
|
|
766
|
+
t("div", cs, [
|
|
767
|
+
t("div", ds, [
|
|
768
|
+
m[12] || (m[12] = t("div", { class: "settings-title" }, "布局模式", -1)),
|
|
769
|
+
t("div", ms, [
|
|
770
|
+
(u(), g(A, null, K(P, (k) => t("div", {
|
|
773
771
|
key: k.value,
|
|
774
772
|
class: F(["layout-option", { "is-active": $.value === k.value }]),
|
|
775
|
-
onClick: (
|
|
773
|
+
onClick: (G) => ve(k.value)
|
|
776
774
|
}, [
|
|
777
|
-
t("div",
|
|
778
|
-
k.value === "sidebar" ? (u(),
|
|
775
|
+
t("div", hs, [
|
|
776
|
+
k.value === "sidebar" ? (u(), g("div", fs, [...m[10] || (m[10] = [
|
|
779
777
|
t("div", { class: "preview-aside" }, null, -1),
|
|
780
778
|
t("div", { class: "preview-main" }, [
|
|
781
779
|
t("div", { class: "preview-header" }),
|
|
782
780
|
t("div", { class: "preview-content" })
|
|
783
781
|
], -1)
|
|
784
|
-
])])) :
|
|
782
|
+
])])) : (u(), g("div", vs, [...m[11] || (m[11] = [
|
|
785
783
|
t("div", { class: "preview-header-full" }, null, -1),
|
|
786
784
|
t("div", { class: "preview-content-full" }, null, -1)
|
|
787
|
-
])])) : (u(), _("div", vs, [...m[12] || (m[12] = [
|
|
788
|
-
t("div", { class: "preview-header-mix" }, [
|
|
789
|
-
t("div", { class: "preview-mix-left" })
|
|
790
|
-
], -1),
|
|
791
|
-
t("div", { class: "preview-mix-body" }, [
|
|
792
|
-
t("div", { class: "preview-mix-aside" }),
|
|
793
|
-
t("div", { class: "preview-mix-content" })
|
|
794
|
-
], -1)
|
|
795
785
|
])]))
|
|
796
786
|
]),
|
|
797
|
-
t("span", _s,
|
|
798
|
-
], 10,
|
|
787
|
+
t("span", _s, T(k.label), 1)
|
|
788
|
+
], 10, ps)), 64))
|
|
799
789
|
])
|
|
800
790
|
]),
|
|
801
791
|
t("div", gs, [
|
|
802
|
-
m[
|
|
792
|
+
m[13] || (m[13] = t("div", { class: "settings-title" }, "主题色", -1)),
|
|
803
793
|
t("div", ys, [
|
|
804
|
-
(u(),
|
|
794
|
+
(u(), g(A, null, K(C, (k) => t("div", {
|
|
805
795
|
key: k.value,
|
|
806
|
-
class: F(["color-option", { "is-active":
|
|
807
|
-
style:
|
|
796
|
+
class: F(["color-option", { "is-active": l(a).primaryColor === k.value }]),
|
|
797
|
+
style: Ke({ backgroundColor: k.value }),
|
|
808
798
|
title: k.label,
|
|
809
|
-
onClick: (
|
|
799
|
+
onClick: (G) => st(k.value)
|
|
810
800
|
}, [
|
|
811
|
-
|
|
801
|
+
l(a).primaryColor === k.value ? (u(), R(l(M), {
|
|
812
802
|
key: 0,
|
|
813
803
|
name: "check",
|
|
814
804
|
size: 12,
|
|
815
805
|
color: "#fff"
|
|
816
|
-
})) :
|
|
806
|
+
})) : z("", !0)
|
|
817
807
|
], 14, ks)), 64))
|
|
818
808
|
])
|
|
819
809
|
]),
|
|
820
810
|
t("div", bs, [
|
|
821
|
-
m[
|
|
811
|
+
m[18] || (m[18] = t("div", { class: "settings-title" }, "功能设置", -1)),
|
|
822
812
|
t("div", ws, [
|
|
823
813
|
t("div", Cs, [
|
|
824
|
-
m[
|
|
814
|
+
m[15] || (m[15] = t("span", null, "灰色模式", -1)),
|
|
825
815
|
t("div", {
|
|
826
|
-
class: F(["switch-wrapper", { "is-checked":
|
|
827
|
-
onClick: m[2] || (m[2] = (k) => _e(!
|
|
828
|
-
}, [...m[
|
|
816
|
+
class: F(["switch-wrapper", { "is-checked": w.value }]),
|
|
817
|
+
onClick: m[2] || (m[2] = (k) => _e(!w.value))
|
|
818
|
+
}, [...m[14] || (m[14] = [
|
|
829
819
|
t("span", { class: "switch-core" }, null, -1)
|
|
830
820
|
])], 2)
|
|
831
821
|
]),
|
|
832
822
|
t("div", Ss, [
|
|
833
|
-
m[
|
|
823
|
+
m[17] || (m[17] = t("span", null, "暗黑模式", -1)),
|
|
834
824
|
t("div", {
|
|
835
|
-
class: F(["switch-wrapper", { "is-checked":
|
|
825
|
+
class: F(["switch-wrapper", { "is-checked": l(a).isDark }]),
|
|
836
826
|
onClick: N
|
|
837
|
-
}, [...m[
|
|
827
|
+
}, [...m[16] || (m[16] = [
|
|
838
828
|
t("span", { class: "switch-core" }, null, -1)
|
|
839
829
|
])], 2)
|
|
840
830
|
])
|
|
@@ -847,7 +837,7 @@ const se = "xto_", qe = (e) => ({
|
|
|
847
837
|
]);
|
|
848
838
|
};
|
|
849
839
|
}
|
|
850
|
-
}), xs = /* @__PURE__ */ q(Is, [["__scopeId", "data-v-
|
|
840
|
+
}), xs = /* @__PURE__ */ q(Is, [["__scopeId", "data-v-33c86f57"]]), Ls = { class: "top-menu" }, Ts = { class: "top-menu__menu-icon" }, Es = {
|
|
851
841
|
key: 1,
|
|
852
842
|
class: "top-menu__menu-char"
|
|
853
843
|
}, Ns = { class: "top-menu__menu-icon" }, Us = {
|
|
@@ -856,11 +846,11 @@ const se = "xto_", qe = (e) => ({
|
|
|
856
846
|
}, $s = { class: "top-menu__menu-icon" }, Ms = {
|
|
857
847
|
key: 1,
|
|
858
848
|
class: "top-menu__menu-char"
|
|
859
|
-
}, Rs = /* @__PURE__ */
|
|
849
|
+
}, Rs = /* @__PURE__ */ X({
|
|
860
850
|
__name: "TopMenu",
|
|
861
851
|
setup(e) {
|
|
862
|
-
const s = ae(), o =
|
|
863
|
-
|
|
852
|
+
const s = ae(), o = J(), a = te(), n = Q(), c = y(() => s.path), b = y(() => n.isDark ? "#1d1e1f" : "#fff"), d = y(() => n.isDark ? "#cfd3dc" : "#303133"), h = y(() => "#409eff"), i = (w) => {
|
|
853
|
+
w && w !== s.path && o.push(w);
|
|
864
854
|
}, p = /* @__PURE__ */ new Set([
|
|
865
855
|
"arrow-up",
|
|
866
856
|
"arrow-down",
|
|
@@ -963,10 +953,10 @@ const se = "xto_", qe = (e) => ({
|
|
|
963
953
|
"sun",
|
|
964
954
|
"theme",
|
|
965
955
|
"skin"
|
|
966
|
-
]),
|
|
967
|
-
if (!
|
|
968
|
-
if (
|
|
969
|
-
const
|
|
956
|
+
]), r = (w) => {
|
|
957
|
+
if (!w || w === "") return "";
|
|
958
|
+
if (w.startsWith("tineco-icon-")) {
|
|
959
|
+
const C = w.replace("tineco-icon-", "");
|
|
970
960
|
return {
|
|
971
961
|
home: "home",
|
|
972
962
|
dashboard: "dashboard",
|
|
@@ -980,7 +970,7 @@ const se = "xto_", qe = (e) => ({
|
|
|
980
970
|
chart: "chart",
|
|
981
971
|
report: "report",
|
|
982
972
|
analytics: "analytics"
|
|
983
|
-
}[
|
|
973
|
+
}[C] || C;
|
|
984
974
|
}
|
|
985
975
|
return {
|
|
986
976
|
dashboard: "dashboard",
|
|
@@ -999,68 +989,68 @@ const se = "xto_", qe = (e) => ({
|
|
|
999
989
|
app: "app",
|
|
1000
990
|
list: "list",
|
|
1001
991
|
grid: "grid"
|
|
1002
|
-
}[
|
|
1003
|
-
}, v = (
|
|
1004
|
-
return (
|
|
1005
|
-
S(
|
|
992
|
+
}[w] || w;
|
|
993
|
+
}, v = (w) => w ? w.charAt(0) : "", D = (w) => p.has(w);
|
|
994
|
+
return (w, P) => (u(), g("div", Ls, [
|
|
995
|
+
S(l(je), {
|
|
1006
996
|
"default-active": c.value,
|
|
1007
997
|
mode: "horizontal",
|
|
1008
|
-
"background-color":
|
|
998
|
+
"background-color": b.value,
|
|
1009
999
|
"text-color": d.value,
|
|
1010
1000
|
"active-text-color": h.value,
|
|
1011
1001
|
class: "top-menu__menu",
|
|
1012
|
-
onSelect:
|
|
1002
|
+
onSelect: i
|
|
1013
1003
|
}, {
|
|
1014
|
-
default:
|
|
1015
|
-
(u(!0),
|
|
1016
|
-
key:
|
|
1004
|
+
default: x(() => [
|
|
1005
|
+
(u(!0), g(A, null, K(l(a).menuList, (C) => (u(), g(A, {
|
|
1006
|
+
key: C.menuUrl
|
|
1017
1007
|
}, [
|
|
1018
|
-
|
|
1008
|
+
C.children && C.children.length > 0 ? (u(), R(l(qe), {
|
|
1019
1009
|
key: 0,
|
|
1020
|
-
index:
|
|
1010
|
+
index: C.menuUrl
|
|
1021
1011
|
}, {
|
|
1022
|
-
title:
|
|
1012
|
+
title: x(() => [
|
|
1023
1013
|
t("span", Ts, [
|
|
1024
|
-
D(
|
|
1014
|
+
D(r(C.icon)) ? (u(), R(l(M), {
|
|
1025
1015
|
key: 0,
|
|
1026
|
-
name:
|
|
1016
|
+
name: r(C.icon),
|
|
1027
1017
|
size: 16
|
|
1028
|
-
}, null, 8, ["name"])) : (u(),
|
|
1018
|
+
}, null, 8, ["name"])) : (u(), g("span", Es, T(v(C.menuName)), 1))
|
|
1029
1019
|
]),
|
|
1030
|
-
t("span", null,
|
|
1020
|
+
t("span", null, T(C.menuName), 1)
|
|
1031
1021
|
]),
|
|
1032
|
-
default:
|
|
1033
|
-
(u(!0),
|
|
1034
|
-
key:
|
|
1035
|
-
index:
|
|
1022
|
+
default: x(() => [
|
|
1023
|
+
(u(!0), g(A, null, K(C.children, (L) => (u(), R(l(ue), {
|
|
1024
|
+
key: L.menuUrl,
|
|
1025
|
+
index: L.menuUrl
|
|
1036
1026
|
}, {
|
|
1037
|
-
default:
|
|
1027
|
+
default: x(() => [
|
|
1038
1028
|
t("span", Ns, [
|
|
1039
|
-
D(
|
|
1029
|
+
D(r(L.icon)) ? (u(), R(l(M), {
|
|
1040
1030
|
key: 0,
|
|
1041
|
-
name:
|
|
1031
|
+
name: r(L.icon),
|
|
1042
1032
|
size: 16
|
|
1043
|
-
}, null, 8, ["name"])) : (u(),
|
|
1033
|
+
}, null, 8, ["name"])) : (u(), g("span", Us, T(v(L.menuName)), 1))
|
|
1044
1034
|
]),
|
|
1045
|
-
t("span", null, L
|
|
1035
|
+
t("span", null, T(L.menuName), 1)
|
|
1046
1036
|
]),
|
|
1047
1037
|
_: 2
|
|
1048
1038
|
}, 1032, ["index"]))), 128))
|
|
1049
1039
|
]),
|
|
1050
1040
|
_: 2
|
|
1051
|
-
}, 1032, ["index"])) : (u(), R(
|
|
1041
|
+
}, 1032, ["index"])) : (u(), R(l(ue), {
|
|
1052
1042
|
key: 1,
|
|
1053
|
-
index:
|
|
1043
|
+
index: C.menuUrl
|
|
1054
1044
|
}, {
|
|
1055
|
-
default:
|
|
1045
|
+
default: x(() => [
|
|
1056
1046
|
t("span", $s, [
|
|
1057
|
-
D(
|
|
1047
|
+
D(r(C.icon)) ? (u(), R(l(M), {
|
|
1058
1048
|
key: 0,
|
|
1059
|
-
name:
|
|
1049
|
+
name: r(C.icon),
|
|
1060
1050
|
size: 16
|
|
1061
|
-
}, null, 8, ["name"])) : (u(),
|
|
1051
|
+
}, null, 8, ["name"])) : (u(), g("span", Ms, T(v(C.menuName)), 1))
|
|
1062
1052
|
]),
|
|
1063
|
-
t("span", null,
|
|
1053
|
+
t("span", null, T(C.menuName), 1)
|
|
1064
1054
|
]),
|
|
1065
1055
|
_: 2
|
|
1066
1056
|
}, 1032, ["index"]))
|
|
@@ -1070,49 +1060,49 @@ const se = "xto_", qe = (e) => ({
|
|
|
1070
1060
|
}, 8, ["default-active", "background-color", "text-color", "active-text-color"])
|
|
1071
1061
|
]));
|
|
1072
1062
|
}
|
|
1073
|
-
}), Ds = /* @__PURE__ */ q(Rs, [["__scopeId", "data-v-8b571a75"]]), Ps = { class: "layout__main" },
|
|
1063
|
+
}), Ds = /* @__PURE__ */ q(Rs, [["__scopeId", "data-v-8b571a75"]]), Ps = { class: "layout__main" }, Os = { class: "layout__header" }, zs = { class: "layout__content" }, As = /* @__PURE__ */ X({
|
|
1074
1064
|
__name: "index",
|
|
1075
1065
|
setup(e) {
|
|
1076
|
-
const s =
|
|
1066
|
+
const s = Q(), o = te(), a = y(
|
|
1077
1067
|
() => s.isCollapsed ? "64px" : "210px"
|
|
1078
|
-
), n = y(() => s.layout), c = y(() => n.value === "sidebar"),
|
|
1068
|
+
), n = y(() => s.layout), c = y(() => n.value === "sidebar"), b = y(() => n.value === "top");
|
|
1079
1069
|
return (d, h) => {
|
|
1080
|
-
const
|
|
1081
|
-
return u(),
|
|
1070
|
+
const i = dt("router-view");
|
|
1071
|
+
return u(), g("div", {
|
|
1082
1072
|
class: F(["layout", `layout--${n.value}`])
|
|
1083
1073
|
}, [
|
|
1084
|
-
c.value ? (u(),
|
|
1074
|
+
c.value ? (u(), g("aside", {
|
|
1085
1075
|
key: 0,
|
|
1086
1076
|
class: "layout__aside",
|
|
1087
|
-
style:
|
|
1077
|
+
style: Ke({ width: a.value })
|
|
1088
1078
|
}, [
|
|
1089
|
-
S(
|
|
1090
|
-
"menu-list":
|
|
1079
|
+
S(Bt, {
|
|
1080
|
+
"menu-list": l(o).menuList
|
|
1091
1081
|
}, null, 8, ["menu-list"])
|
|
1092
|
-
], 4)) :
|
|
1093
|
-
|
|
1082
|
+
], 4)) : z("", !0),
|
|
1083
|
+
b.value ? (u(), R(Ds, { key: 1 })) : z("", !0),
|
|
1094
1084
|
t("div", Ps, [
|
|
1095
|
-
t("header",
|
|
1085
|
+
t("header", Os, [
|
|
1096
1086
|
S(xs)
|
|
1097
1087
|
]),
|
|
1098
|
-
t("main",
|
|
1099
|
-
S(
|
|
1088
|
+
t("main", zs, [
|
|
1089
|
+
S(i)
|
|
1100
1090
|
])
|
|
1101
1091
|
])
|
|
1102
1092
|
], 2);
|
|
1103
1093
|
};
|
|
1104
1094
|
}
|
|
1105
|
-
}),
|
|
1095
|
+
}), Qe = /* @__PURE__ */ q(As, [["__scopeId", "data-v-c45071f5"]]), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1106
1096
|
__proto__: null,
|
|
1107
|
-
default:
|
|
1108
|
-
}, Symbol.toStringTag, { value: "Module" })), Vs = { class: "tabs-wrapper" }, Fs = { class: "tab-label" }, Ks = ["onClick"], js = /* @__PURE__ */
|
|
1097
|
+
default: Qe
|
|
1098
|
+
}, Symbol.toStringTag, { value: "Module" })), Vs = { class: "tabs-wrapper" }, Fs = { class: "tab-label" }, Ks = ["onClick"], js = /* @__PURE__ */ X({
|
|
1109
1099
|
__name: "Tabs",
|
|
1110
1100
|
setup(e) {
|
|
1111
|
-
const s = ae(), o =
|
|
1101
|
+
const s = ae(), o = J(), a = y(() => {
|
|
1112
1102
|
const d = [];
|
|
1113
1103
|
return s.matched.forEach((h) => {
|
|
1114
|
-
var
|
|
1115
|
-
(
|
|
1104
|
+
var i;
|
|
1105
|
+
(i = h.meta) != null && i.affix && d.push({
|
|
1116
1106
|
name: h.name,
|
|
1117
1107
|
title: h.meta.title,
|
|
1118
1108
|
path: h.path,
|
|
@@ -1121,34 +1111,34 @@ const se = "xto_", qe = (e) => ({
|
|
|
1121
1111
|
}), d;
|
|
1122
1112
|
}), n = y(() => s.path), c = (d) => {
|
|
1123
1113
|
o.push(d);
|
|
1124
|
-
},
|
|
1125
|
-
const h = a.value.find((
|
|
1114
|
+
}, b = (d) => {
|
|
1115
|
+
const h = a.value.find((i) => i.path === d);
|
|
1126
1116
|
if (!(h != null && h.affix) && d === n.value) {
|
|
1127
|
-
const
|
|
1117
|
+
const i = a.value.findIndex((r) => r.path === d), p = a.value[i - 1] || a.value[i + 1];
|
|
1128
1118
|
p && o.push(p.path);
|
|
1129
1119
|
}
|
|
1130
1120
|
};
|
|
1131
|
-
return (d, h) => (u(),
|
|
1132
|
-
S(
|
|
1121
|
+
return (d, h) => (u(), g("div", Vs, [
|
|
1122
|
+
S(l(mt), {
|
|
1133
1123
|
modelValue: n.value,
|
|
1134
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
1124
|
+
"onUpdate:modelValue": h[0] || (h[0] = (i) => n.value = i),
|
|
1135
1125
|
type: "card",
|
|
1136
1126
|
onTabClick: c
|
|
1137
1127
|
}, {
|
|
1138
|
-
default:
|
|
1139
|
-
(u(!0),
|
|
1140
|
-
key:
|
|
1141
|
-
name:
|
|
1142
|
-
label:
|
|
1143
|
-
closable: !
|
|
1128
|
+
default: x(() => [
|
|
1129
|
+
(u(!0), g(A, null, K(a.value, (i) => (u(), R(l(pt), {
|
|
1130
|
+
key: i.path,
|
|
1131
|
+
name: i.path,
|
|
1132
|
+
label: i.title,
|
|
1133
|
+
closable: !i.affix
|
|
1144
1134
|
}, {
|
|
1145
|
-
label:
|
|
1135
|
+
label: x(() => [
|
|
1146
1136
|
t("span", Fs, [
|
|
1147
|
-
|
|
1148
|
-
|
|
1137
|
+
ee(T(i.title) + " ", 1),
|
|
1138
|
+
i.affix ? z("", !0) : (u(), g("span", {
|
|
1149
1139
|
key: 0,
|
|
1150
1140
|
class: "tab-close",
|
|
1151
|
-
onClick:
|
|
1141
|
+
onClick: Ve((p) => b(i.path), ["stop"])
|
|
1152
1142
|
}, " ✕ ", 8, Ks))
|
|
1153
1143
|
])
|
|
1154
1144
|
]),
|
|
@@ -1161,12 +1151,12 @@ const se = "xto_", qe = (e) => ({
|
|
|
1161
1151
|
}
|
|
1162
1152
|
}), Ro = /* @__PURE__ */ q(js, [["__scopeId", "data-v-9156d8cd"]]), qs = {}, Ys = { class: "footer" };
|
|
1163
1153
|
function Ws(e, s) {
|
|
1164
|
-
return u(),
|
|
1154
|
+
return u(), g("div", Ys, [...s[0] || (s[0] = [
|
|
1165
1155
|
t("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
|
|
1166
1156
|
])]);
|
|
1167
1157
|
}
|
|
1168
1158
|
const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a"]]), Hs = () => {
|
|
1169
|
-
const e =
|
|
1159
|
+
const e = _t.create({
|
|
1170
1160
|
baseURL: void 0,
|
|
1171
1161
|
timeout: 3e4,
|
|
1172
1162
|
headers: {
|
|
@@ -1175,14 +1165,14 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
|
|
|
1175
1165
|
});
|
|
1176
1166
|
return e.interceptors.request.use(
|
|
1177
1167
|
(s) => {
|
|
1178
|
-
const o = fe(), a =
|
|
1168
|
+
const o = fe(), a = kt() || "Bearer";
|
|
1179
1169
|
return o && (s.headers.Authorization = `${a} ${o}`), s;
|
|
1180
1170
|
},
|
|
1181
1171
|
(s) => Promise.reject(s)
|
|
1182
1172
|
), e.interceptors.response.use(
|
|
1183
1173
|
(s) => {
|
|
1184
1174
|
const { data: o } = s;
|
|
1185
|
-
return o.code === 200 || o.code === 0 ? o.data : (
|
|
1175
|
+
return o.code === 200 || o.code === 0 ? o.data : (H.error(o.message || "请求失败"), Promise.reject(new Error(o.message || "请求失败")));
|
|
1186
1176
|
},
|
|
1187
1177
|
(s) => {
|
|
1188
1178
|
var a;
|
|
@@ -1190,26 +1180,26 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
|
|
|
1190
1180
|
if (o)
|
|
1191
1181
|
switch (o.status) {
|
|
1192
1182
|
case 401:
|
|
1193
|
-
|
|
1183
|
+
H.error("登录已过期,请重新登录"), Xe(), window.location.href = "/login";
|
|
1194
1184
|
break;
|
|
1195
1185
|
case 403:
|
|
1196
|
-
|
|
1186
|
+
H.error("没有权限访问");
|
|
1197
1187
|
break;
|
|
1198
1188
|
case 404:
|
|
1199
|
-
|
|
1189
|
+
H.error("请求资源不存在");
|
|
1200
1190
|
break;
|
|
1201
1191
|
case 500:
|
|
1202
|
-
|
|
1192
|
+
H.error("服务器错误");
|
|
1203
1193
|
break;
|
|
1204
1194
|
default:
|
|
1205
|
-
|
|
1195
|
+
H.error(((a = o.data) == null ? void 0 : a.message) || "请求失败");
|
|
1206
1196
|
}
|
|
1207
1197
|
else
|
|
1208
|
-
|
|
1198
|
+
H.error("网络连接失败");
|
|
1209
1199
|
return Promise.reject(s);
|
|
1210
1200
|
}
|
|
1211
1201
|
), e;
|
|
1212
|
-
}, oe = Hs(),
|
|
1202
|
+
}, oe = Hs(), E = {
|
|
1213
1203
|
get(e, s) {
|
|
1214
1204
|
return oe.get(e, s);
|
|
1215
1205
|
},
|
|
@@ -1227,22 +1217,22 @@ const Do = /* @__PURE__ */ q(qs, [["render", Ws], ["__scopeId", "data-v-4852826a
|
|
|
1227
1217
|
}
|
|
1228
1218
|
};
|
|
1229
1219
|
function Xs(e) {
|
|
1230
|
-
return
|
|
1220
|
+
return E.post("/user/v1.0/login/by-domain", e);
|
|
1231
1221
|
}
|
|
1232
1222
|
function Po() {
|
|
1233
|
-
return
|
|
1223
|
+
return E.put("/user/v1.0/user/logout");
|
|
1234
1224
|
}
|
|
1235
1225
|
function Js() {
|
|
1236
|
-
return
|
|
1226
|
+
return E.get("/user/v1.0/user/get-me");
|
|
1237
1227
|
}
|
|
1238
|
-
function zo(e) {
|
|
1239
|
-
return T.post("/user/v1.0/refresh", { refreshToken: e });
|
|
1240
|
-
}
|
|
1241
|
-
const ce = g(""), de = g(""), me = g("");
|
|
1242
1228
|
function Oo(e) {
|
|
1229
|
+
return E.post("/user/v1.0/refresh", { refreshToken: e });
|
|
1230
|
+
}
|
|
1231
|
+
const ce = _(""), de = _(""), me = _("");
|
|
1232
|
+
function zo(e) {
|
|
1243
1233
|
e.appId && (ce.value = e.appId), e.clientId && (de.value = e.clientId), e.apiBaseUrl && (me.value = e.apiBaseUrl);
|
|
1244
1234
|
}
|
|
1245
|
-
function
|
|
1235
|
+
function Me() {
|
|
1246
1236
|
if (ce.value)
|
|
1247
1237
|
return ce.value;
|
|
1248
1238
|
try {
|
|
@@ -1273,13 +1263,13 @@ const Bo = {
|
|
|
1273
1263
|
appId: ce,
|
|
1274
1264
|
clientId: de,
|
|
1275
1265
|
apiBaseUrl: me
|
|
1276
|
-
}, Zs = { class: "login" }, Gs = { class: "login__container" }, eo = /* @__PURE__ */
|
|
1266
|
+
}, Zs = { class: "login" }, Gs = { class: "login__container" }, eo = /* @__PURE__ */ X({
|
|
1277
1267
|
__name: "index",
|
|
1278
1268
|
setup(e) {
|
|
1279
|
-
const s =
|
|
1269
|
+
const s = J(), o = ae(), a = _(!1), n = _(!1), c = Ce({
|
|
1280
1270
|
uid: "",
|
|
1281
1271
|
password: ""
|
|
1282
|
-
}),
|
|
1272
|
+
}), b = {
|
|
1283
1273
|
uid: [
|
|
1284
1274
|
{ required: !0, message: "请输入用户名", trigger: "blur" }
|
|
1285
1275
|
],
|
|
@@ -1287,56 +1277,56 @@ const Bo = {
|
|
|
1287
1277
|
{ required: !0, message: "请输入密码", trigger: "blur" },
|
|
1288
1278
|
{ min: 6, message: "密码长度至少6位", trigger: "blur" }
|
|
1289
1279
|
]
|
|
1290
|
-
}, d =
|
|
1291
|
-
var
|
|
1280
|
+
}, d = _(), h = async () => {
|
|
1281
|
+
var i;
|
|
1292
1282
|
try {
|
|
1293
|
-
await ((
|
|
1283
|
+
await ((i = d.value) == null ? void 0 : i.validate()), a.value = !0;
|
|
1294
1284
|
const p = await Xs({
|
|
1295
|
-
appId:
|
|
1285
|
+
appId: Me(),
|
|
1296
1286
|
clientId: Qs(),
|
|
1297
1287
|
uid: c.uid,
|
|
1298
1288
|
password: c.password,
|
|
1299
1289
|
code: !0
|
|
1300
1290
|
});
|
|
1301
|
-
|
|
1302
|
-
const
|
|
1303
|
-
s.push(
|
|
1291
|
+
He(p), H.success("登录成功");
|
|
1292
|
+
const r = o.query.redirect || "/";
|
|
1293
|
+
s.push(r);
|
|
1304
1294
|
} catch (p) {
|
|
1305
1295
|
console.error("登录失败:", p);
|
|
1306
1296
|
} finally {
|
|
1307
1297
|
a.value = !1;
|
|
1308
1298
|
}
|
|
1309
1299
|
};
|
|
1310
|
-
return (
|
|
1300
|
+
return (i, p) => (u(), g("div", Zs, [
|
|
1311
1301
|
t("div", Gs, [
|
|
1312
1302
|
p[5] || (p[5] = t("div", { class: "login__header" }, [
|
|
1313
1303
|
t("img", {
|
|
1314
|
-
src:
|
|
1304
|
+
src: We,
|
|
1315
1305
|
alt: "Logo",
|
|
1316
1306
|
class: "login__logo"
|
|
1317
1307
|
}),
|
|
1318
1308
|
t("h1", { class: "login__title" }, "Xto Demo"),
|
|
1319
1309
|
t("p", { class: "login__subtitle" }, "后台管理系统")
|
|
1320
1310
|
], -1)),
|
|
1321
|
-
S(
|
|
1311
|
+
S(l(ft), {
|
|
1322
1312
|
ref_key: "formRef",
|
|
1323
1313
|
ref: d,
|
|
1324
1314
|
model: c,
|
|
1325
|
-
rules:
|
|
1315
|
+
rules: b,
|
|
1326
1316
|
class: "login__form",
|
|
1327
1317
|
"label-width": "0"
|
|
1328
1318
|
}, {
|
|
1329
|
-
default:
|
|
1330
|
-
S(
|
|
1331
|
-
default:
|
|
1332
|
-
S(
|
|
1319
|
+
default: x(() => [
|
|
1320
|
+
S(l(re), { prop: "uid" }, {
|
|
1321
|
+
default: x(() => [
|
|
1322
|
+
S(l(Ae), {
|
|
1333
1323
|
modelValue: c.uid,
|
|
1334
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
1324
|
+
"onUpdate:modelValue": p[0] || (p[0] = (r) => c.uid = r),
|
|
1335
1325
|
placeholder: "用户名",
|
|
1336
1326
|
size: "large"
|
|
1337
1327
|
}, {
|
|
1338
|
-
prefix:
|
|
1339
|
-
S(
|
|
1328
|
+
prefix: x(() => [
|
|
1329
|
+
S(l(M), {
|
|
1340
1330
|
name: "user",
|
|
1341
1331
|
size: 18
|
|
1342
1332
|
})
|
|
@@ -1346,19 +1336,19 @@ const Bo = {
|
|
|
1346
1336
|
]),
|
|
1347
1337
|
_: 1
|
|
1348
1338
|
}),
|
|
1349
|
-
S(
|
|
1350
|
-
default:
|
|
1351
|
-
S(
|
|
1339
|
+
S(l(re), { prop: "password" }, {
|
|
1340
|
+
default: x(() => [
|
|
1341
|
+
S(l(Ae), {
|
|
1352
1342
|
modelValue: c.password,
|
|
1353
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
1343
|
+
"onUpdate:modelValue": p[1] || (p[1] = (r) => c.password = r),
|
|
1354
1344
|
type: "password",
|
|
1355
1345
|
placeholder: "密码",
|
|
1356
1346
|
size: "large",
|
|
1357
1347
|
"show-password": "",
|
|
1358
|
-
onKeyup:
|
|
1348
|
+
onKeyup: Fe(h, ["enter"])
|
|
1359
1349
|
}, {
|
|
1360
|
-
prefix:
|
|
1361
|
-
S(
|
|
1350
|
+
prefix: x(() => [
|
|
1351
|
+
S(l(M), {
|
|
1362
1352
|
name: "lock",
|
|
1363
1353
|
size: 18
|
|
1364
1354
|
})
|
|
@@ -1368,31 +1358,31 @@ const Bo = {
|
|
|
1368
1358
|
]),
|
|
1369
1359
|
_: 1
|
|
1370
1360
|
}),
|
|
1371
|
-
S(
|
|
1372
|
-
default:
|
|
1373
|
-
S(
|
|
1361
|
+
S(l(re), null, {
|
|
1362
|
+
default: x(() => [
|
|
1363
|
+
S(l(vt), {
|
|
1374
1364
|
modelValue: n.value,
|
|
1375
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
1365
|
+
"onUpdate:modelValue": p[2] || (p[2] = (r) => n.value = r)
|
|
1376
1366
|
}, {
|
|
1377
|
-
default:
|
|
1378
|
-
|
|
1367
|
+
default: x(() => [...p[3] || (p[3] = [
|
|
1368
|
+
ee("记住我", -1)
|
|
1379
1369
|
])]),
|
|
1380
1370
|
_: 1
|
|
1381
1371
|
}, 8, ["modelValue"])
|
|
1382
1372
|
]),
|
|
1383
1373
|
_: 1
|
|
1384
1374
|
}),
|
|
1385
|
-
S(
|
|
1386
|
-
default:
|
|
1387
|
-
S(
|
|
1375
|
+
S(l(re), null, {
|
|
1376
|
+
default: x(() => [
|
|
1377
|
+
S(l(he), {
|
|
1388
1378
|
type: "primary",
|
|
1389
1379
|
size: "large",
|
|
1390
1380
|
loading: a.value,
|
|
1391
1381
|
class: "login__submit",
|
|
1392
1382
|
onClick: h
|
|
1393
1383
|
}, {
|
|
1394
|
-
default:
|
|
1395
|
-
|
|
1384
|
+
default: x(() => [...p[4] || (p[4] = [
|
|
1385
|
+
ee(" 登录 ", -1)
|
|
1396
1386
|
])]),
|
|
1397
1387
|
_: 1
|
|
1398
1388
|
}, 8, ["loading"])
|
|
@@ -1411,23 +1401,23 @@ const Bo = {
|
|
|
1411
1401
|
}), to = /* @__PURE__ */ q(eo, [["__scopeId", "data-v-f3e724b6"]]), so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1412
1402
|
__proto__: null,
|
|
1413
1403
|
default: to
|
|
1414
|
-
}, Symbol.toStringTag, { value: "Module" })), oo = { class: "error-page" }, ao = { class: "error-page__content" }, no = /* @__PURE__ */
|
|
1404
|
+
}, Symbol.toStringTag, { value: "Module" })), oo = { class: "error-page" }, ao = { class: "error-page__content" }, no = /* @__PURE__ */ X({
|
|
1415
1405
|
__name: "404",
|
|
1416
1406
|
setup(e) {
|
|
1417
|
-
const s =
|
|
1407
|
+
const s = J(), o = () => {
|
|
1418
1408
|
s.push("/");
|
|
1419
1409
|
};
|
|
1420
|
-
return (a, n) => (u(),
|
|
1410
|
+
return (a, n) => (u(), g("div", oo, [
|
|
1421
1411
|
t("div", ao, [
|
|
1422
1412
|
n[1] || (n[1] = t("div", { class: "error-page__code" }, "404", -1)),
|
|
1423
1413
|
n[2] || (n[2] = t("div", { class: "error-page__title" }, "页面不存在", -1)),
|
|
1424
1414
|
n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
|
|
1425
|
-
S(
|
|
1415
|
+
S(l(he), {
|
|
1426
1416
|
type: "primary",
|
|
1427
1417
|
onClick: o
|
|
1428
1418
|
}, {
|
|
1429
|
-
default:
|
|
1430
|
-
|
|
1419
|
+
default: x(() => [...n[0] || (n[0] = [
|
|
1420
|
+
ee("返回首页", -1)
|
|
1431
1421
|
])]),
|
|
1432
1422
|
_: 1
|
|
1433
1423
|
})
|
|
@@ -1437,23 +1427,23 @@ const Bo = {
|
|
|
1437
1427
|
}), ro = /* @__PURE__ */ q(no, [["__scopeId", "data-v-c3c12c24"]]), lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1438
1428
|
__proto__: null,
|
|
1439
1429
|
default: ro
|
|
1440
|
-
}, Symbol.toStringTag, { value: "Module" })), io = { class: "error-page" }, uo = { class: "error-page__content" }, co = /* @__PURE__ */
|
|
1430
|
+
}, Symbol.toStringTag, { value: "Module" })), io = { class: "error-page" }, uo = { class: "error-page__content" }, co = /* @__PURE__ */ X({
|
|
1441
1431
|
__name: "403",
|
|
1442
1432
|
setup(e) {
|
|
1443
|
-
const s =
|
|
1433
|
+
const s = J(), o = () => {
|
|
1444
1434
|
s.push("/");
|
|
1445
1435
|
};
|
|
1446
|
-
return (a, n) => (u(),
|
|
1436
|
+
return (a, n) => (u(), g("div", io, [
|
|
1447
1437
|
t("div", uo, [
|
|
1448
1438
|
n[1] || (n[1] = t("div", { class: "error-page__code" }, "403", -1)),
|
|
1449
1439
|
n[2] || (n[2] = t("div", { class: "error-page__title" }, "无访问权限", -1)),
|
|
1450
1440
|
n[3] || (n[3] = t("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
|
|
1451
|
-
S(
|
|
1441
|
+
S(l(he), {
|
|
1452
1442
|
type: "primary",
|
|
1453
1443
|
onClick: o
|
|
1454
1444
|
}, {
|
|
1455
|
-
default:
|
|
1456
|
-
|
|
1445
|
+
default: x(() => [...n[0] || (n[0] = [
|
|
1446
|
+
ee("返回首页", -1)
|
|
1457
1447
|
])]),
|
|
1458
1448
|
_: 1
|
|
1459
1449
|
})
|
|
@@ -1465,15 +1455,15 @@ const Bo = {
|
|
|
1465
1455
|
default: mo
|
|
1466
1456
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1467
1457
|
function Vo() {
|
|
1468
|
-
const e =
|
|
1458
|
+
const e = Q(), s = j(), o = $e(), a = y(() => s.userName || ""), n = y(() => s.userInfo), c = y(() => e.appName), b = y(() => o.isLoggedIn), d = y(() => e.isDark), h = y(() => e.theme), i = y(() => e.isCollapsed), p = y(() => e.layout);
|
|
1469
1459
|
return {
|
|
1470
1460
|
userName: a,
|
|
1471
1461
|
userInfo: n,
|
|
1472
1462
|
appName: c,
|
|
1473
|
-
isLoggedIn:
|
|
1463
|
+
isLoggedIn: b,
|
|
1474
1464
|
isDark: d,
|
|
1475
1465
|
theme: h,
|
|
1476
|
-
isCollapsed:
|
|
1466
|
+
isCollapsed: i,
|
|
1477
1467
|
layout: p,
|
|
1478
1468
|
toggleTheme: () => {
|
|
1479
1469
|
e.toggleTheme();
|
|
@@ -1490,70 +1480,70 @@ function Fo() {
|
|
|
1490
1480
|
};
|
|
1491
1481
|
}
|
|
1492
1482
|
function Ko(e, s = {}) {
|
|
1493
|
-
const { rules: o, onSubmit: a } = s, n =
|
|
1483
|
+
const { rules: o, onSubmit: a } = s, n = _(), c = Ce({ ...e }), b = _(!1), d = _(!1), h = _(!1), i = () => {
|
|
1494
1484
|
v(), h.value = !1, d.value = !0;
|
|
1495
|
-
}, p = (
|
|
1496
|
-
Object.assign(c,
|
|
1497
|
-
},
|
|
1485
|
+
}, p = (w) => {
|
|
1486
|
+
Object.assign(c, w), h.value = !0, d.value = !0;
|
|
1487
|
+
}, r = () => {
|
|
1498
1488
|
d.value = !1, v();
|
|
1499
1489
|
}, v = () => {
|
|
1500
|
-
var
|
|
1490
|
+
var w;
|
|
1501
1491
|
Object.keys(e).forEach((P) => {
|
|
1502
1492
|
c[P] = e[P];
|
|
1503
|
-
}), (
|
|
1493
|
+
}), (w = n.value) == null || w.resetFields();
|
|
1504
1494
|
};
|
|
1505
1495
|
return {
|
|
1506
1496
|
formRef: n,
|
|
1507
1497
|
formData: c,
|
|
1508
1498
|
rules: o,
|
|
1509
|
-
loading:
|
|
1499
|
+
loading: b,
|
|
1510
1500
|
visible: d,
|
|
1511
1501
|
isEdit: h,
|
|
1512
|
-
openAdd:
|
|
1502
|
+
openAdd: i,
|
|
1513
1503
|
openEdit: p,
|
|
1514
|
-
close:
|
|
1504
|
+
close: r,
|
|
1515
1505
|
resetForm: v,
|
|
1516
1506
|
handleSubmit: async () => {
|
|
1517
|
-
var
|
|
1507
|
+
var w;
|
|
1518
1508
|
try {
|
|
1519
|
-
await ((
|
|
1509
|
+
await ((w = n.value) == null ? void 0 : w.validate()), b.value = !0, await (a == null ? void 0 : a(c)), r();
|
|
1520
1510
|
} catch (P) {
|
|
1521
1511
|
console.error(P);
|
|
1522
1512
|
} finally {
|
|
1523
|
-
|
|
1513
|
+
b.value = !1;
|
|
1524
1514
|
}
|
|
1525
1515
|
}
|
|
1526
1516
|
};
|
|
1527
1517
|
}
|
|
1528
1518
|
function jo(e) {
|
|
1529
|
-
const { fetchData: s, defaultPageSize: o = 10 } = e, a =
|
|
1519
|
+
const { fetchData: s, defaultPageSize: o = 10 } = e, a = _(!1), n = _([]), c = _(0), b = _(1), d = _(o), h = Ce({}), i = async () => {
|
|
1530
1520
|
a.value = !0;
|
|
1531
1521
|
try {
|
|
1532
|
-
const
|
|
1522
|
+
const C = {
|
|
1533
1523
|
...h,
|
|
1534
|
-
page:
|
|
1524
|
+
page: b.value,
|
|
1535
1525
|
pageSize: d.value
|
|
1536
|
-
},
|
|
1537
|
-
n.value =
|
|
1538
|
-
} catch (
|
|
1539
|
-
console.error(
|
|
1526
|
+
}, L = await s(C);
|
|
1527
|
+
n.value = L.list, c.value = L.total;
|
|
1528
|
+
} catch (C) {
|
|
1529
|
+
console.error(C);
|
|
1540
1530
|
} finally {
|
|
1541
1531
|
a.value = !1;
|
|
1542
1532
|
}
|
|
1543
1533
|
}, p = () => {
|
|
1544
|
-
|
|
1545
|
-
},
|
|
1546
|
-
Object.keys(h).forEach((
|
|
1547
|
-
h[
|
|
1548
|
-
}),
|
|
1549
|
-
}, v = (
|
|
1550
|
-
|
|
1551
|
-
}, D = (
|
|
1552
|
-
d.value =
|
|
1553
|
-
},
|
|
1554
|
-
|
|
1534
|
+
b.value = 1, i();
|
|
1535
|
+
}, r = () => {
|
|
1536
|
+
Object.keys(h).forEach((C) => {
|
|
1537
|
+
h[C] = void 0;
|
|
1538
|
+
}), b.value = 1, i();
|
|
1539
|
+
}, v = (C) => {
|
|
1540
|
+
b.value = C, i();
|
|
1541
|
+
}, D = (C) => {
|
|
1542
|
+
d.value = C, b.value = 1, i();
|
|
1543
|
+
}, w = () => {
|
|
1544
|
+
i();
|
|
1555
1545
|
}, P = y(() => ({
|
|
1556
|
-
current:
|
|
1546
|
+
current: b.value,
|
|
1557
1547
|
pageSize: d.value,
|
|
1558
1548
|
total: c.value
|
|
1559
1549
|
}));
|
|
@@ -1561,16 +1551,16 @@ function jo(e) {
|
|
|
1561
1551
|
loading: a,
|
|
1562
1552
|
data: n,
|
|
1563
1553
|
total: c,
|
|
1564
|
-
currentPage:
|
|
1554
|
+
currentPage: b,
|
|
1565
1555
|
pageSize: d,
|
|
1566
1556
|
searchParams: h,
|
|
1567
1557
|
pagination: P,
|
|
1568
|
-
getData:
|
|
1558
|
+
getData: i,
|
|
1569
1559
|
handleSearch: p,
|
|
1570
|
-
handleReset:
|
|
1560
|
+
handleReset: r,
|
|
1571
1561
|
handlePageChange: v,
|
|
1572
1562
|
handleSizeChange: D,
|
|
1573
|
-
refresh:
|
|
1563
|
+
refresh: w
|
|
1574
1564
|
};
|
|
1575
1565
|
}
|
|
1576
1566
|
function qo(e) {
|
|
@@ -1582,7 +1572,7 @@ function Yo(e) {
|
|
|
1582
1572
|
function Wo() {
|
|
1583
1573
|
return !0;
|
|
1584
1574
|
}
|
|
1585
|
-
const
|
|
1575
|
+
const Ze = [
|
|
1586
1576
|
{
|
|
1587
1577
|
path: "/login",
|
|
1588
1578
|
name: "Login",
|
|
@@ -1610,13 +1600,13 @@ const Qe = [
|
|
|
1610
1600
|
hidden: !0
|
|
1611
1601
|
}
|
|
1612
1602
|
}
|
|
1613
|
-
],
|
|
1603
|
+
], Ge = {
|
|
1614
1604
|
path: "/:pathMatch(.*)*",
|
|
1615
1605
|
redirect: "/404",
|
|
1616
1606
|
meta: {
|
|
1617
1607
|
hidden: !0
|
|
1618
1608
|
}
|
|
1619
|
-
},
|
|
1609
|
+
}, et = {
|
|
1620
1610
|
path: "/",
|
|
1621
1611
|
name: "Layout",
|
|
1622
1612
|
component: () => Promise.resolve().then(() => Bs),
|
|
@@ -1625,7 +1615,7 @@ const Qe = [
|
|
|
1625
1615
|
{
|
|
1626
1616
|
path: "/dashboard",
|
|
1627
1617
|
name: "Dashboard",
|
|
1628
|
-
component: () => import("./index-
|
|
1618
|
+
component: () => import("./index-D6SM8jcQ.js"),
|
|
1629
1619
|
meta: {
|
|
1630
1620
|
title: "仪表盘",
|
|
1631
1621
|
icon: "dashboard",
|
|
@@ -1636,7 +1626,7 @@ const Qe = [
|
|
|
1636
1626
|
{
|
|
1637
1627
|
path: "/system/user",
|
|
1638
1628
|
name: "SystemUser",
|
|
1639
|
-
component: () => import("./index-
|
|
1629
|
+
component: () => import("./index-DK5nOrQA.js"),
|
|
1640
1630
|
meta: {
|
|
1641
1631
|
title: "用户管理",
|
|
1642
1632
|
icon: "user",
|
|
@@ -1646,7 +1636,7 @@ const Qe = [
|
|
|
1646
1636
|
{
|
|
1647
1637
|
path: "/system/role",
|
|
1648
1638
|
name: "SystemRole",
|
|
1649
|
-
component: () => import("./index-
|
|
1639
|
+
component: () => import("./index-DmjW2npo.js"),
|
|
1650
1640
|
meta: {
|
|
1651
1641
|
title: "角色管理",
|
|
1652
1642
|
icon: "role",
|
|
@@ -1656,7 +1646,7 @@ const Qe = [
|
|
|
1656
1646
|
{
|
|
1657
1647
|
path: "/system/menu",
|
|
1658
1648
|
name: "SystemMenu",
|
|
1659
|
-
component: () => import("./index
|
|
1649
|
+
component: () => import("./index--Urjal10.js"),
|
|
1660
1650
|
meta: {
|
|
1661
1651
|
title: "菜单管理",
|
|
1662
1652
|
icon: "menu",
|
|
@@ -1668,7 +1658,7 @@ const Qe = [
|
|
|
1668
1658
|
{
|
|
1669
1659
|
path: "/dashboard",
|
|
1670
1660
|
name: "Dashboard",
|
|
1671
|
-
component: () => import("./index-
|
|
1661
|
+
component: () => import("./index-D6SM8jcQ.js"),
|
|
1672
1662
|
meta: {
|
|
1673
1663
|
title: "仪表盘",
|
|
1674
1664
|
icon: "dashboard",
|
|
@@ -1688,7 +1678,7 @@ const Qe = [
|
|
|
1688
1678
|
{
|
|
1689
1679
|
path: "user",
|
|
1690
1680
|
name: "SystemUser",
|
|
1691
|
-
component: () => import("./index-
|
|
1681
|
+
component: () => import("./index-DK5nOrQA.js"),
|
|
1692
1682
|
meta: {
|
|
1693
1683
|
title: "用户管理",
|
|
1694
1684
|
icon: "user",
|
|
@@ -1698,7 +1688,7 @@ const Qe = [
|
|
|
1698
1688
|
{
|
|
1699
1689
|
path: "role",
|
|
1700
1690
|
name: "SystemRole",
|
|
1701
|
-
component: () => import("./index-
|
|
1691
|
+
component: () => import("./index-DmjW2npo.js"),
|
|
1702
1692
|
meta: {
|
|
1703
1693
|
title: "角色管理",
|
|
1704
1694
|
icon: "role",
|
|
@@ -1708,7 +1698,7 @@ const Qe = [
|
|
|
1708
1698
|
{
|
|
1709
1699
|
path: "menu",
|
|
1710
1700
|
name: "SystemMenu",
|
|
1711
|
-
component: () => import("./index
|
|
1701
|
+
component: () => import("./index--Urjal10.js"),
|
|
1712
1702
|
meta: {
|
|
1713
1703
|
title: "菜单管理",
|
|
1714
1704
|
icon: "menu",
|
|
@@ -1765,20 +1755,20 @@ const Qe = [
|
|
|
1765
1755
|
}
|
|
1766
1756
|
]
|
|
1767
1757
|
}
|
|
1768
|
-
],
|
|
1769
|
-
history:
|
|
1770
|
-
routes: [...
|
|
1758
|
+
], tt = Se({
|
|
1759
|
+
history: Ie(),
|
|
1760
|
+
routes: [...Ze, et, Ge],
|
|
1771
1761
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
1772
1762
|
}), fo = ["/login", "/404", "/403"];
|
|
1773
|
-
|
|
1774
|
-
const a =
|
|
1775
|
-
if (a.initTheme(),
|
|
1763
|
+
tt.beforeEach(async (e, s, o) => {
|
|
1764
|
+
const a = Q();
|
|
1765
|
+
if (a.initTheme(), Je())
|
|
1776
1766
|
if (e.path === "/login")
|
|
1777
1767
|
o({ path: "/" });
|
|
1778
1768
|
else {
|
|
1779
1769
|
const n = j();
|
|
1780
1770
|
n.isLoggedIn || (n.setUserInfo({
|
|
1781
|
-
appId:
|
|
1771
|
+
appId: Me(),
|
|
1782
1772
|
userId: "1",
|
|
1783
1773
|
userName: "管理员",
|
|
1784
1774
|
departmentName: "技术部",
|
|
@@ -1786,87 +1776,87 @@ et.beforeEach(async (e, s, o) => {
|
|
|
1786
1776
|
mobilePhone: "13800138000",
|
|
1787
1777
|
positionName: "管理员",
|
|
1788
1778
|
avatar: ""
|
|
1789
|
-
}),
|
|
1779
|
+
}), te().setMenuList(ho)), e.name && e.meta.keepAlive && a.addCachedView(e.name), o();
|
|
1790
1780
|
}
|
|
1791
1781
|
else
|
|
1792
1782
|
fo.includes(e.path) ? o() : o("/login");
|
|
1793
1783
|
});
|
|
1794
1784
|
function Xo() {
|
|
1795
|
-
const e =
|
|
1796
|
-
history:
|
|
1797
|
-
routes: [...
|
|
1785
|
+
const e = Se({
|
|
1786
|
+
history: Ie(),
|
|
1787
|
+
routes: [...Ze, et, Ge]
|
|
1798
1788
|
});
|
|
1799
|
-
|
|
1789
|
+
tt.matcher = e.matcher;
|
|
1800
1790
|
}
|
|
1801
1791
|
function Jo(e, s = {}) {
|
|
1802
1792
|
const o = s.indexPath || "/dashboard";
|
|
1803
1793
|
return {
|
|
1804
1794
|
path: "/",
|
|
1805
1795
|
name: "Layout",
|
|
1806
|
-
component:
|
|
1796
|
+
component: Qe,
|
|
1807
1797
|
redirect: o,
|
|
1808
1798
|
children: e
|
|
1809
1799
|
};
|
|
1810
1800
|
}
|
|
1811
1801
|
function Qo(e) {
|
|
1812
|
-
return
|
|
1813
|
-
history:
|
|
1802
|
+
return Se({
|
|
1803
|
+
history: Ie(),
|
|
1814
1804
|
routes: e,
|
|
1815
1805
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
1816
1806
|
});
|
|
1817
1807
|
}
|
|
1818
1808
|
function Zo(e) {
|
|
1819
|
-
return
|
|
1809
|
+
return E.get("/role/list", { params: e });
|
|
1820
1810
|
}
|
|
1821
1811
|
function Go(e) {
|
|
1822
|
-
return
|
|
1812
|
+
return E.get(`/role/${e}`);
|
|
1823
1813
|
}
|
|
1824
1814
|
function ea(e) {
|
|
1825
|
-
return
|
|
1815
|
+
return E.post("/role", e);
|
|
1826
1816
|
}
|
|
1827
1817
|
function ta(e, s) {
|
|
1828
|
-
return
|
|
1818
|
+
return E.put(`/role/${e}`, s);
|
|
1829
1819
|
}
|
|
1830
1820
|
function sa(e) {
|
|
1831
|
-
return
|
|
1821
|
+
return E.delete(`/role/${e}`);
|
|
1832
1822
|
}
|
|
1833
1823
|
function oa(e, s) {
|
|
1834
|
-
return
|
|
1824
|
+
return E.patch(`/role/${e}/status`, { status: s });
|
|
1835
1825
|
}
|
|
1836
1826
|
function aa() {
|
|
1837
|
-
return
|
|
1827
|
+
return E.get("/user/v1.0/menu/list");
|
|
1838
1828
|
}
|
|
1839
1829
|
function vo(e) {
|
|
1840
|
-
const s = e ||
|
|
1841
|
-
return
|
|
1830
|
+
const s = e || Me();
|
|
1831
|
+
return E.get(`/user/v1.0/menu/get-menu?appId=${s}`);
|
|
1842
1832
|
}
|
|
1843
1833
|
function na(e) {
|
|
1844
|
-
return
|
|
1834
|
+
return E.post("/menu", e);
|
|
1845
1835
|
}
|
|
1846
1836
|
function ra(e, s) {
|
|
1847
|
-
return
|
|
1837
|
+
return E.put(`/menu/${e}`, s);
|
|
1848
1838
|
}
|
|
1849
1839
|
function la(e) {
|
|
1850
|
-
return
|
|
1840
|
+
return E.delete(`/menu/${e}`);
|
|
1851
1841
|
}
|
|
1852
1842
|
const _o = ["/login", "/404", "/403"];
|
|
1853
1843
|
function ia(e, s = {}) {
|
|
1854
1844
|
const o = s.whiteList || _o, a = s.loginPath || "/login", n = s.homePath || "/";
|
|
1855
|
-
e.beforeEach(async (c,
|
|
1856
|
-
const h =
|
|
1845
|
+
e.beforeEach(async (c, b, d) => {
|
|
1846
|
+
const h = Q(), i = j(), p = te();
|
|
1857
1847
|
if (h.initTheme(), fe())
|
|
1858
1848
|
if (c.path === a)
|
|
1859
1849
|
d({ path: n });
|
|
1860
|
-
else if (
|
|
1850
|
+
else if (i.isLoggedIn)
|
|
1861
1851
|
c.name && c.meta.keepAlive && h.addCachedView(c.name), d();
|
|
1862
1852
|
else
|
|
1863
1853
|
try {
|
|
1864
1854
|
if (s.fetchUserInfo) {
|
|
1865
1855
|
const v = await s.fetchUserInfo();
|
|
1866
|
-
|
|
1856
|
+
i.setUserInfo(v);
|
|
1867
1857
|
} else {
|
|
1868
1858
|
const v = await Js();
|
|
1869
|
-
|
|
1859
|
+
i.setUserInfo(v);
|
|
1870
1860
|
}
|
|
1871
1861
|
if (s.fetchMenu) {
|
|
1872
1862
|
const v = await s.fetchMenu();
|
|
@@ -1877,7 +1867,7 @@ function ia(e, s = {}) {
|
|
|
1877
1867
|
}
|
|
1878
1868
|
s.onLoginSuccess && s.onLoginSuccess(), c.name && c.meta.keepAlive && h.addCachedView(c.name), d({ ...c, replace: !0 });
|
|
1879
1869
|
} catch (v) {
|
|
1880
|
-
console.error("获取用户信息失败:", v),
|
|
1870
|
+
console.error("获取用户信息失败:", v), i.clearUserInfo(), p.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), d({ path: a, query: { redirect: c.fullPath } });
|
|
1881
1871
|
}
|
|
1882
1872
|
else
|
|
1883
1873
|
o.includes(c.path) ? d() : d({ path: a, query: { redirect: c.fullPath } });
|
|
@@ -1885,28 +1875,28 @@ function ia(e, s = {}) {
|
|
|
1885
1875
|
});
|
|
1886
1876
|
}
|
|
1887
1877
|
function ua(e) {
|
|
1888
|
-
return
|
|
1878
|
+
return E.get("/user/list", { params: e });
|
|
1889
1879
|
}
|
|
1890
1880
|
function ca(e) {
|
|
1891
|
-
return
|
|
1881
|
+
return E.get(`/user/${e}`);
|
|
1892
1882
|
}
|
|
1893
1883
|
function da(e) {
|
|
1894
|
-
return
|
|
1884
|
+
return E.post("/user", e);
|
|
1895
1885
|
}
|
|
1896
1886
|
function ma(e, s) {
|
|
1897
|
-
return
|
|
1887
|
+
return E.put(`/user/${e}`, s);
|
|
1898
1888
|
}
|
|
1899
1889
|
function pa(e) {
|
|
1900
|
-
return
|
|
1890
|
+
return E.delete(`/user/${e}`);
|
|
1901
1891
|
}
|
|
1902
1892
|
function ha(e) {
|
|
1903
|
-
return
|
|
1893
|
+
return E.post("/user/batch-delete", { ids: e });
|
|
1904
1894
|
}
|
|
1905
1895
|
function fa(e, s) {
|
|
1906
|
-
return
|
|
1896
|
+
return E.patch(`/user/${e}/status`, { status: s });
|
|
1907
1897
|
}
|
|
1908
1898
|
function va(e) {
|
|
1909
|
-
return
|
|
1899
|
+
return E.post(`/user/${e}/reset-password`);
|
|
1910
1900
|
}
|
|
1911
1901
|
var go = /* @__PURE__ */ ((e) => (e[e.ENABLED = 1] = "ENABLED", e[e.DISABLED = 0] = "DISABLED", e))(go || {}), yo = /* @__PURE__ */ ((e) => (e[e.UNKNOWN = 0] = "UNKNOWN", e[e.MALE = 1] = "MALE", e[e.FEMALE = 2] = "FEMALE", e))(yo || {}), ko = /* @__PURE__ */ ((e) => (e[e.DIRECTORY = 0] = "DIRECTORY", e[e.MENU = 1] = "MENU", e[e.BUTTON = 2] = "BUTTON", e))(ko || {});
|
|
1912
1902
|
const _a = {
|
|
@@ -1970,7 +1960,7 @@ const _a = {
|
|
|
1970
1960
|
}
|
|
1971
1961
|
};
|
|
1972
1962
|
export {
|
|
1973
|
-
|
|
1963
|
+
Lt as $,
|
|
1974
1964
|
Mo as A,
|
|
1975
1965
|
aa as B,
|
|
1976
1966
|
vo as C,
|
|
@@ -1982,10 +1972,10 @@ export {
|
|
|
1982
1972
|
Go as I,
|
|
1983
1973
|
Zo as J,
|
|
1984
1974
|
fe as K,
|
|
1985
|
-
|
|
1975
|
+
Qe as L,
|
|
1986
1976
|
ko as M,
|
|
1987
|
-
|
|
1988
|
-
|
|
1977
|
+
Ct as N,
|
|
1978
|
+
kt as O,
|
|
1989
1979
|
ca as P,
|
|
1990
1980
|
Js as Q,
|
|
1991
1981
|
ua as R,
|
|
@@ -1993,45 +1983,45 @@ export {
|
|
|
1993
1983
|
Ro as T,
|
|
1994
1984
|
qo as U,
|
|
1995
1985
|
Yo as V,
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1986
|
+
Je as W,
|
|
1987
|
+
E as X,
|
|
1988
|
+
zo as Y,
|
|
1999
1989
|
Wo as Z,
|
|
2000
1990
|
q as _,
|
|
2001
1991
|
ka as a,
|
|
2002
|
-
|
|
1992
|
+
et as a0,
|
|
2003
1993
|
f as a1,
|
|
2004
1994
|
le as a2,
|
|
2005
1995
|
Xs as a3,
|
|
2006
1996
|
Po as a4,
|
|
2007
1997
|
ho as a5,
|
|
2008
1998
|
Ca as a6,
|
|
2009
|
-
|
|
1999
|
+
Oo as a7,
|
|
2010
2000
|
va as a8,
|
|
2011
2001
|
Xo as a9,
|
|
2012
|
-
|
|
2002
|
+
tt as aa,
|
|
2013
2003
|
No as ab,
|
|
2014
2004
|
ie as ac,
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2005
|
+
xt as ad,
|
|
2006
|
+
It as ae,
|
|
2007
|
+
wt as af,
|
|
2008
|
+
yt as ag,
|
|
2009
|
+
St as ah,
|
|
2010
|
+
He as ai,
|
|
2011
|
+
bt as aj,
|
|
2022
2012
|
ia as ak,
|
|
2023
|
-
|
|
2013
|
+
Ze as al,
|
|
2024
2014
|
ra as am,
|
|
2025
2015
|
ta as an,
|
|
2026
2016
|
oa as ao,
|
|
2027
2017
|
ma as ap,
|
|
2028
2018
|
fa as aq,
|
|
2029
2019
|
Vo as ar,
|
|
2030
|
-
|
|
2020
|
+
Q as as,
|
|
2031
2021
|
Fo as at,
|
|
2032
|
-
|
|
2022
|
+
$e as au,
|
|
2033
2023
|
Ko as av,
|
|
2034
|
-
|
|
2024
|
+
te as aw,
|
|
2035
2025
|
jo as ax,
|
|
2036
2026
|
j as ay,
|
|
2037
2027
|
wa as b,
|
|
@@ -2040,12 +2030,12 @@ export {
|
|
|
2040
2030
|
ga as e,
|
|
2041
2031
|
ya as f,
|
|
2042
2032
|
ro as g,
|
|
2043
|
-
|
|
2033
|
+
Bt as h,
|
|
2044
2034
|
to as i,
|
|
2045
2035
|
_a as j,
|
|
2046
2036
|
Bo as k,
|
|
2047
2037
|
ha as l,
|
|
2048
|
-
|
|
2038
|
+
Xe as m,
|
|
2049
2039
|
Jo as n,
|
|
2050
2040
|
na as o,
|
|
2051
2041
|
ea as p,
|
|
@@ -2055,8 +2045,8 @@ export {
|
|
|
2055
2045
|
la as t,
|
|
2056
2046
|
sa as u,
|
|
2057
2047
|
pa as v,
|
|
2058
|
-
|
|
2048
|
+
Ge as w,
|
|
2059
2049
|
Ao as x,
|
|
2060
|
-
|
|
2050
|
+
Me as y,
|
|
2061
2051
|
Qs as z
|
|
2062
2052
|
};
|