cc1-admin-front 1.0.4 → 1.0.5
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/cc1-admin-front.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./cc1-admin-front.css";
|
|
2
|
-
import { reactive as y, defineComponent as j, nextTick as P, resolveComponent as
|
|
2
|
+
import { reactive as y, defineComponent as j, nextTick as P, resolveComponent as L, openBlock as I, createBlock as T, withCtx as N, createVNode as _, unref as C, createCommentVNode as M, defineAsyncComponent as U, shallowRef as B, ref as W, watch as H, onBeforeUnmount as z, createElementBlock as J, createApp as F } from "vue";
|
|
3
3
|
import K, { TSys as h, TForm as q, TFormConfig as Y } from "cc1-form";
|
|
4
4
|
import { Scope as S, CRouter as Z } from "cc1-vue3";
|
|
5
5
|
import G from "cc1-ui";
|
|
@@ -257,25 +257,25 @@ Object.keys(O).forEach((e) => {
|
|
|
257
257
|
O[e][s] = `${e}_${s}`;
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
|
-
const tt = O.ERouter,
|
|
260
|
+
const tt = O.ERouter, p = y({
|
|
261
261
|
load: () => {
|
|
262
|
-
|
|
262
|
+
p.loginInfo = Cookie.get("loginInfo") || {}, p.userInfo = p.loginInfo.userInfo || {}, p.token = Cookie.get("token");
|
|
263
263
|
},
|
|
264
264
|
loginInfo: {},
|
|
265
265
|
userInfo: {},
|
|
266
266
|
token: null,
|
|
267
267
|
setUserInfo: (e) => {
|
|
268
|
-
|
|
268
|
+
p.loginInfo = e, p.userInfo = e.userInfo, p.token = e.token, Cookie.set("loginInfo", e), Cookie.set("token", e.token);
|
|
269
269
|
},
|
|
270
270
|
updateUserInfo: (e) => {
|
|
271
|
-
|
|
271
|
+
p.userInfo = { ...p.userInfo, ...e }, p.loginInfo.userInfo = p.userInfo, Cookie.set("loginInfo", p.loginInfo);
|
|
272
272
|
},
|
|
273
273
|
clearInfo: () => {
|
|
274
|
-
|
|
274
|
+
p.token = null, p.userInfo = {}, p.loginInfo = {}, c.setMenuList([], []), c.setApiList([]), Cookie.remove("loginInfo"), Cookie.remove("token"), Cookie.remove("menuList"), Cookie.remove("apiList");
|
|
275
275
|
},
|
|
276
|
-
hasApi: (e) =>
|
|
276
|
+
hasApi: (e) => p.loginInfo.roleInfo.apiList.includes(e)
|
|
277
277
|
});
|
|
278
|
-
class
|
|
278
|
+
class k {
|
|
279
279
|
static baseUrl = "";
|
|
280
280
|
static init() {
|
|
281
281
|
const t = (o, r, ...a) => {
|
|
@@ -284,15 +284,15 @@ class b {
|
|
|
284
284
|
});
|
|
285
285
|
}, s = (o, r, a) => {
|
|
286
286
|
let l = a?.data?.code || o, d = a?.data.message;
|
|
287
|
-
r.data.toast ? r.data.toast(l, a, r) : h.fail(
|
|
287
|
+
r.data.toast ? r.data.toast(l, a, r) : h.fail(u.i18n.t(`code.${l}`, { msg: d || "请求异常" }) || u.i18n.t("code.OtherException")), t(r.data, ["final", "fail", "complete"], o == 200, r, a), l == 401 && (p.clearInfo(), r.data.toLogin?.() !== !1 && h.router.replace("/login"));
|
|
288
288
|
};
|
|
289
289
|
http.setConfig({
|
|
290
|
-
base:
|
|
290
|
+
base: k.baseUrl,
|
|
291
291
|
before(o) {
|
|
292
292
|
o.param.headers = o.param.headers || {}, Object.keys(o.data).forEach((a) => {
|
|
293
293
|
(o.data[a] === void 0 || o.data[a] === null) && delete o.data[a];
|
|
294
294
|
});
|
|
295
|
-
const r =
|
|
295
|
+
const r = p.token || "";
|
|
296
296
|
r && (o.param.headers.Token = r);
|
|
297
297
|
},
|
|
298
298
|
after(o, r) {
|
|
@@ -307,7 +307,7 @@ class b {
|
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
class
|
|
310
|
+
class u {
|
|
311
311
|
/**
|
|
312
312
|
* 环境变量
|
|
313
313
|
*/
|
|
@@ -333,10 +333,10 @@ class p {
|
|
|
333
333
|
},
|
|
334
334
|
staticDir: "/static_admin"
|
|
335
335
|
};
|
|
336
|
-
this.config = ObjectUtil.deepMerge(s, t), this.env = this.config.env, this.i18n = this.config.i18n, this.staticDir = this.config.staticDir, this.elementLocale = this.config.elementLocale,
|
|
336
|
+
this.config = ObjectUtil.deepMerge(s, t), this.env = this.config.env, this.i18n = this.config.i18n, this.staticDir = this.config.staticDir, this.elementLocale = this.config.elementLocale, k.baseUrl = this.env.API;
|
|
337
337
|
}
|
|
338
338
|
static getBaseUrl(t) {
|
|
339
|
-
return t =
|
|
339
|
+
return t = k.baseUrl.replace("/api", "/") + t, t = t.replace(/(?<!:)\/{2,}/g, "/"), t;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
const V = (e) => {
|
|
@@ -417,7 +417,7 @@ const V = (e) => {
|
|
|
417
417
|
srcList: [],
|
|
418
418
|
index: 0,
|
|
419
419
|
open: (e, t = 0) => {
|
|
420
|
-
c.preview.index = t, c.preview.srcList = e.map((s) =>
|
|
420
|
+
c.preview.index = t, c.preview.srcList = e.map((s) => u.getBaseUrl(s)), c.preview.show = !0;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
}), et = /* @__PURE__ */ j({
|
|
@@ -425,7 +425,7 @@ const V = (e) => {
|
|
|
425
425
|
__name: "App",
|
|
426
426
|
setup(e) {
|
|
427
427
|
const t = y({
|
|
428
|
-
locale:
|
|
428
|
+
locale: u.elementLocale,
|
|
429
429
|
show: !0,
|
|
430
430
|
reload: () => {
|
|
431
431
|
t.show = !1, P(() => {
|
|
@@ -434,18 +434,18 @@ const V = (e) => {
|
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
436
|
return CEvent.on(tt.reload, t.reload), (s, o) => {
|
|
437
|
-
const r =
|
|
437
|
+
const r = L("x-route-event"), a = L("router-view"), l = L("el-image-viewer"), d = L("el-config-provider");
|
|
438
438
|
return I(), T(d, {
|
|
439
439
|
locale: t.locale
|
|
440
440
|
}, {
|
|
441
441
|
default: N(() => [
|
|
442
442
|
_(r),
|
|
443
443
|
_(a),
|
|
444
|
-
|
|
444
|
+
C(c).preview.show ? (I(), T(l, {
|
|
445
445
|
key: 0,
|
|
446
|
-
"url-list":
|
|
447
|
-
"initial-index":
|
|
448
|
-
onClose: o[0] || (o[0] = (i) =>
|
|
446
|
+
"url-list": C(c).preview.srcList,
|
|
447
|
+
"initial-index": C(c).preview.index,
|
|
448
|
+
onClose: o[0] || (o[0] = (i) => C(c).preview.show = !1)
|
|
449
449
|
}, null, 8, ["url-list", "initial-index"])) : M("", !0)
|
|
450
450
|
]),
|
|
451
451
|
_: 1
|
|
@@ -503,36 +503,36 @@ const V = (e) => {
|
|
|
503
503
|
getDateOptions: (e = !0) => {
|
|
504
504
|
const t = [];
|
|
505
505
|
e && t.push({
|
|
506
|
-
label:
|
|
506
|
+
label: u.i18n.t("dateOptions.AllDates"),
|
|
507
507
|
value: null,
|
|
508
508
|
key: "all"
|
|
509
509
|
}), t.push({
|
|
510
|
-
label:
|
|
510
|
+
label: u.i18n.t("dateOptions.Today"),
|
|
511
511
|
value: TimeUtil.somedayse(),
|
|
512
512
|
key: "today"
|
|
513
513
|
}), t.push({
|
|
514
|
-
label:
|
|
514
|
+
label: u.i18n.t("dateOptions.Yesterday"),
|
|
515
515
|
value: TimeUtil.somedayse(-1),
|
|
516
516
|
key: "yesterday"
|
|
517
517
|
});
|
|
518
518
|
const s = /* @__PURE__ */ new Date(), o = TimeUtil.somedayse, r = s.getDay(), a = o(1 - r)[0], l = o(7 - r)[1], d = {
|
|
519
|
-
label:
|
|
519
|
+
label: u.i18n.t("dateOptions.ThisWeek"),
|
|
520
520
|
value: [a, l],
|
|
521
521
|
key: "thisWeek"
|
|
522
522
|
};
|
|
523
523
|
t.push(d);
|
|
524
|
-
const i = o(1 - r - 7)[0], f = o(7 - r - 7)[1],
|
|
525
|
-
label:
|
|
524
|
+
const i = o(1 - r - 7)[0], f = o(7 - r - 7)[1], w = {
|
|
525
|
+
label: u.i18n.t("dateOptions.LastWeek"),
|
|
526
526
|
value: [i, f],
|
|
527
527
|
key: "lastWeek"
|
|
528
528
|
};
|
|
529
|
-
t.push(
|
|
529
|
+
t.push(w);
|
|
530
530
|
const n = /* @__PURE__ */ new Date();
|
|
531
531
|
n.setDate(1);
|
|
532
532
|
const g = o(0, n);
|
|
533
533
|
n.setMonth(n.getMonth() + 1), n.setDate(1), n.setDate(n.getDate() - 1);
|
|
534
534
|
const m = o(0, n), D = {
|
|
535
|
-
label:
|
|
535
|
+
label: u.i18n.t("dateOptions.ThisMonth"),
|
|
536
536
|
value: [g[0], m[1]],
|
|
537
537
|
key: "thisMonth"
|
|
538
538
|
};
|
|
@@ -652,11 +652,11 @@ const V = (e) => {
|
|
|
652
652
|
};
|
|
653
653
|
if (t.length) {
|
|
654
654
|
s && t.length > s && (t = t.substring(0, s));
|
|
655
|
-
const i = [], f = [],
|
|
655
|
+
const i = [], f = [], w = (n, g, m) => {
|
|
656
656
|
n === g ? Array.isArray(e[n]) ? m.push(...e[n]) : m.push(e[n]) : m.push(d[n.substring(3)]);
|
|
657
657
|
};
|
|
658
658
|
Object.keys(e).forEach((n) => {
|
|
659
|
-
n.startsWith("get") ?
|
|
659
|
+
n.startsWith("get") ? w(n, "getCustom", i) : n.startsWith("del") ? w(n, "delCustom", f) : d[n] && (t = d[n](t));
|
|
660
660
|
}), i.length && (t = t.replace(new RegExp(`[^${i.join("")}]`, "g"), "")), f.length && (t = t.replace(new RegExp(`[${f.join("")}]`, "g"), ""));
|
|
661
661
|
}
|
|
662
662
|
return e.after(t), t;
|
|
@@ -673,12 +673,12 @@ const V = (e) => {
|
|
|
673
673
|
}, rt = {
|
|
674
674
|
install: it
|
|
675
675
|
};
|
|
676
|
-
let
|
|
676
|
+
let x = {}, A = {};
|
|
677
677
|
const at = (e) => {
|
|
678
|
-
e.use(G),
|
|
679
|
-
|
|
680
|
-
}, VConf.vsicon.url =
|
|
681
|
-
|
|
678
|
+
e.use(G), x = Cookie.get("iconObj") || {}, A = Cookie.get("siconObj") || {}, VConf.vicon.fun.getRes = async (t) => x[t], VConf.vicon.fun.setRes = (t, s) => {
|
|
679
|
+
x[t] = s, Cookie.set("iconObj", x);
|
|
680
|
+
}, VConf.vsicon.url = u.staticDir + "/vicon/svg", VConf.vsicon.lib = "", VConf.vsicon.fun.getRes = async (t) => A[t], VConf.vsicon.fun.setRes = (t, s) => {
|
|
681
|
+
A[t] = s, Cookie.set("siconObj", A);
|
|
682
682
|
};
|
|
683
683
|
}, nt = {
|
|
684
684
|
install: at
|
|
@@ -693,7 +693,7 @@ const at = (e) => {
|
|
|
693
693
|
emits: ["update:modelValue"],
|
|
694
694
|
setup(e, { emit: t }) {
|
|
695
695
|
const s = U(() => h.loadModule("editor").then((n) => n.Editor)), o = U(() => h.loadModule("editor").then((n) => n.Toolbar)), r = e, a = t, l = B(), d = W(r.modelValue);
|
|
696
|
-
|
|
696
|
+
H(d, (n) => {
|
|
697
697
|
a("update:modelValue", n);
|
|
698
698
|
});
|
|
699
699
|
const i = {
|
|
@@ -706,32 +706,32 @@ const at = (e) => {
|
|
|
706
706
|
const m = await R.upload({
|
|
707
707
|
file: n
|
|
708
708
|
});
|
|
709
|
-
m.data =
|
|
709
|
+
m.data = u.getBaseUrl(m.data), g(m.data, "", m.data), a("update:modelValue", d.value);
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
|
-
|
|
714
|
+
z(() => {
|
|
715
715
|
const n = l.value;
|
|
716
716
|
n?.destroy();
|
|
717
717
|
});
|
|
718
|
-
const
|
|
718
|
+
const w = (n) => {
|
|
719
719
|
l.value = n;
|
|
720
720
|
};
|
|
721
721
|
return (n, g) => (I(), J("div", lt, [
|
|
722
|
-
_(
|
|
722
|
+
_(C(o), {
|
|
723
723
|
style: { "border-bottom": "1px solid #ccc" },
|
|
724
724
|
editor: l.value,
|
|
725
725
|
defaultConfig: i,
|
|
726
726
|
mode: "default"
|
|
727
727
|
}, null, 8, ["editor"]),
|
|
728
|
-
_(
|
|
728
|
+
_(C(s), {
|
|
729
729
|
style: { height: "500px", "overflow-y": "hidden" },
|
|
730
730
|
modelValue: d.value,
|
|
731
731
|
"onUpdate:modelValue": g[0] || (g[0] = (m) => d.value = m),
|
|
732
732
|
defaultConfig: f,
|
|
733
733
|
mode: "default",
|
|
734
|
-
onOnCreated:
|
|
734
|
+
onOnCreated: w
|
|
735
735
|
}, null, 8, ["modelValue"])
|
|
736
736
|
]));
|
|
737
737
|
}
|
|
@@ -836,12 +836,12 @@ const at = (e) => {
|
|
|
836
836
|
"/src/views/pages/system/config/index.vue": () => import("./index-CatA5C4N.js"),
|
|
837
837
|
"/src/views/pages/system/tenant/index.vue": () => import("./index-uPQ6O40Q.js")
|
|
838
838
|
});
|
|
839
|
-
if (!
|
|
839
|
+
if (!u.config.routes) {
|
|
840
840
|
h.fail("router.routes is required");
|
|
841
841
|
return;
|
|
842
842
|
}
|
|
843
|
-
Object.keys(
|
|
844
|
-
t[i] =
|
|
843
|
+
Object.keys(u.config.routes).forEach((i) => {
|
|
844
|
+
t[i] = u.config.routes[i];
|
|
845
845
|
});
|
|
846
846
|
const s = {}, o = ["light", "dark"], r = "light", a = "dark";
|
|
847
847
|
Object.keys(t).forEach((i) => {
|
|
@@ -883,11 +883,11 @@ const at = (e) => {
|
|
|
883
883
|
}
|
|
884
884
|
]
|
|
885
885
|
});
|
|
886
|
-
return h.router = d, h.routes = l.array, d;
|
|
886
|
+
return h.router = d, h.routes = l.array, u.config.routeHook?.(d), d;
|
|
887
887
|
};
|
|
888
888
|
v.store = {
|
|
889
889
|
ssys: c,
|
|
890
|
-
suser:
|
|
890
|
+
suser: p,
|
|
891
891
|
sutil: v,
|
|
892
892
|
svf: $,
|
|
893
893
|
scurd: E
|
|
@@ -904,22 +904,22 @@ const ft = () => {
|
|
|
904
904
|
gt();
|
|
905
905
|
};
|
|
906
906
|
v.reset = ft;
|
|
907
|
-
class
|
|
907
|
+
class wt {
|
|
908
908
|
/**
|
|
909
909
|
* 初始化
|
|
910
910
|
*/
|
|
911
911
|
static async init(t) {
|
|
912
|
-
t.use(ht), t.use(
|
|
912
|
+
t.use(ht), t.use(u.i18n), await u.i18n.setLang(), vt(), k.init();
|
|
913
913
|
const s = mt();
|
|
914
914
|
t.use(s), s.isReady().then(async () => {
|
|
915
915
|
t.mount("#app");
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
const
|
|
920
|
-
|
|
919
|
+
const b = F(et), Pt = async (e) => {
|
|
920
|
+
u.setConfig(e), await u.config.install?.(b), b.use(window.ElementPlus, u.config.elementPlus || {});
|
|
921
921
|
const t = await import("./index-DU5RPuKk.js");
|
|
922
|
-
|
|
922
|
+
b.use(t), await wt.init(b), u.config.installed?.(b);
|
|
923
923
|
};
|
|
924
924
|
export {
|
|
925
925
|
R as ApiApp,
|
|
@@ -938,11 +938,11 @@ export {
|
|
|
938
938
|
$t as ApiSystemConfig,
|
|
939
939
|
Dt as ApiSystemTenant,
|
|
940
940
|
tt as ERouter,
|
|
941
|
-
|
|
941
|
+
u as System,
|
|
942
942
|
Pt as initApp,
|
|
943
943
|
E as scurd,
|
|
944
944
|
c as ssys,
|
|
945
|
-
|
|
945
|
+
p as suser,
|
|
946
946
|
v as sutil,
|
|
947
947
|
$ as svf
|
|
948
948
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("cc1-vue3"),require("cc1-ui"),require("cc1-form"),require("vue-router"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","cc1-vue3","cc1-ui","cc1-form","vue-router","element-plus"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.nestAuthAdmin={},y.Vue,y.cc1Vue3,y.toolsVueUI,y.cc1Form,y.VueRouter,y.ElementPlus))})(this,(function(y,e,B,se,f,F,W){"use strict";class L{static all(t){return http.post("/auth/api/all",t)}static list(t){return http.post("/auth/api/list",t)}static create(t){return http.post("/auth/api/create",t)}static update(t){return http.post("/auth/api/update",t)}static delete(t){return http.post("/auth/api/delete",t)}}class A{static list(t){return http.post("/auth/menu/list",t)}static create(t){return http.post("/auth/menu/create",t)}static update(t){return http.post("/auth/menu/update",t)}static delete(t){return http.post("/auth/menu/delete",t)}}class ie{static sendCode(t){return http.post("/auth/phone/sendCode",{phone:t})}}class j{static list(t){return http.post("/auth/role/list",t)}static roleList(t){return http.post("/auth/role/roleList",t)}static create(t){return http.post("/auth/role/create",t)}static update(t){return http.post("/auth/role/update",t)}static delete(t){return http.post("/auth/role/delete",t)}}class ${static list(t){return http.post("/auth/user/list",t)}static create(t){return http.post("/auth/user/create",t)}static update(t){return http.post("/auth/user/update",t)}static delete(t){return http.post("/auth/user/delete",t)}static resetPassword(t){return http.post("/auth/user/resetPassword",t)}static profile(t){return http.post("/auth/user/profile",t)}static updateProfile(t){return http.post("/auth/user/updateProfile",t)}static changePassword(t){return http.post("/auth/user/changePassword",t)}static login(t){return http.post("/auth/user/login",t)}}class q{static send(t){return http.post("/captcha/send",t)}static verify(t){return http.post("/captcha/verify",t)}}class H{static list(t){return http.post("/auth/loginLog/list",t)}static delete(t){return http.post("/auth/loginLog/delete",t)}}class re{static list(t){return http.post({url:"cron/list",method:"post"},{...t})}static save(t){return http.post({url:"cron/save",method:"post"},t)}static remove(t){return http.post({url:"cron/remove",method:"post"},{id:t})}}class K{static list(t){return http.post("/email/config/list",t)}static create(t){return http.post("/email/config/create",t)}static update(t){return http.post("/email/config/update",t)}static delete(t){return http.post("/email/config/delete",t)}}class J{static list(t){return http.post("/log/error/list",t)}static delete(t){return http.post("/log/error/delete",t)}}class Y{static list(t){return http.post("/schedule/job/list",t)}static create(t){return http.post("/schedule/job/create",t)}static update(t){return http.post("/schedule/job/update",t)}static delete(t){return http.post("/schedule/job/delete",t)}static execute(t){return http.post("/schedule/job/execute",t)}static changeStatus(t){return http.post("/schedule/job/changeStatus",t)}}class U{static list(t){return http.post("/sms/config/list",t)}static create(t){return http.post("/sms/config/create",t)}static update(t){return http.post("/sms/config/update",t)}static delete(t){return http.post("/sms/config/delete",t)}static send(t){return http.post("/sms/config/send",t)}}class M{static time(t){return http.post("/app/time",t)}static upload(t){return http.post({url:"/app/upload",headers:{"Content-Type":"multipart/form-data"}},t)}}class G{static list(t){return http.post("/system/config/list",t)}static create(t){return http.post("/system/config/create",t)}static update(t){return http.post("/system/config/update",t)}static delete(t){return http.post("/system/config/delete",t)}}class Z{static list(t){return http.post("/tenant/list",t)}static create(t){return http.post("/tenant/create",t)}static update(t){return http.post("/tenant/update",t)}static delete(t){return http.post("/tenant/delete",t)}}const P={ERouter:{change:"",reload:""}};Object.keys(P).forEach(a=>{const t=P[a];Object.keys(t).forEach(l=>{P[a][l]=`${a}_${l}`})});const z=P.ERouter,w=e.reactive({load:()=>{w.loginInfo=Cookie.get("loginInfo")||{},w.userInfo=w.loginInfo.userInfo||{},w.token=Cookie.get("token")},loginInfo:{},userInfo:{},token:null,setUserInfo:a=>{w.loginInfo=a,w.userInfo=a.userInfo,w.token=a.token,Cookie.set("loginInfo",a),Cookie.set("token",a.token)},updateUserInfo:a=>{w.userInfo={...w.userInfo,...a},w.loginInfo.userInfo=w.userInfo,Cookie.set("loginInfo",w.loginInfo)},clearInfo:()=>{w.token=null,w.userInfo={},w.loginInfo={},_.setMenuList([],[]),_.setApiList([]),Cookie.remove("loginInfo"),Cookie.remove("token"),Cookie.remove("menuList"),Cookie.remove("apiList")},hasApi:a=>w.loginInfo.roleInfo.apiList.includes(a)});class E{static baseUrl="";static init(){const t=(o,n,...s)=>{n.forEach(i=>{o[i]&&o[i](...s)})},l=(o,n,s)=>{let i=s?.data?.code||o,c=s?.data.message;n.data.toast?n.data.toast(i,s,n):f.TSys.fail(x.i18n.t(`code.${i}`,{msg:c||"请求异常"})||x.i18n.t("code.OtherException")),t(n.data,["final","fail","complete"],o==200,n,s),i==401&&(w.clearInfo(),n.data.toLogin?.()!==!1&&f.TSys.router.replace("/login"))};http.setConfig({base:E.baseUrl,before(o){o.param.headers=o.param.headers||{},Object.keys(o.data).forEach(s=>{(o.data[s]===void 0||o.data[s]===null)&&delete o.data[s]});const n=w.token||"";n&&(o.param.headers.Token=n)},after(o,n){const{code:s}=o.data;if(s!=200){n.res=o.data,o.status=s;return}t(n.data,["final","success","complete"],o.data,n,o)},error:l})}}class x{static env;static i18n;static elementLocale;static staticDir;static config;static setConfig(t){const l={website:{recordNumber:"ICP备000000000号-1",author:"Copyright © 2022-2025 Design By Veigar"},staticDir:"/static_admin"};this.config=ObjectUtil.deepMerge(l,t),this.env=this.config.env,this.i18n=this.config.i18n,this.staticDir=this.config.staticDir,this.elementLocale=this.config.elementLocale,E.baseUrl=this.env.API}static getBaseUrl(t){return t=E.baseUrl.replace("/api","/")+t,t=t.replace(/(?<!:)\/{2,}/g,"/"),t}}const X=a=>{const t=JSONUtil.cp(a),l=o=>t.filter(s=>{let i=s.parentId;return s.parentId.includes(",")&&(i=s.parentId.split(",").pop()),i===o}).map(s=>({...s,children:l(s._id)})).sort((s,i)=>s.sort-i.sort);return l("0")},_=e.reactive({getTableTree:X,auth:{list:["/api/system/list","/api/system/detail"],isPass:a=>_.auth.list.includes(a)},load:()=>{_.menuListSource=JSONUtil.cp(Cookie.get("menuList"))},layout:{collapse:!1},menuListSource:[],menuList:[],setMenuList:(a,t)=>{_.menuList=a,_.menuListSource=JSONUtil.cp(t),Cookie.set("menuList",t)},getMenuList:async()=>{let a=Cookie.get("menuList");_.menuListSource=JSONUtil.cp(a);try{if(StrUtil.isNull(a)||(a=a),StrUtil.isNull(a))return f.TSys.router.push("/login"),[];let t=X(a);return _.setMenuList(t,a),JSONUtil.cp(_.menuList)}catch{f.TSys.router.push("/login")}return JSONUtil.cp(_.menuList)},apiList:[],setApiList:a=>{_.apiList=a,Cookie.set("apiList",_.apiList)},getApiList:async()=>{let a=Cookie.get("apiList");try{return StrUtil.isNull(a)||(a=a),StrUtil.isNull(a)?(f.TSys.router.push("/login"),[]):(_.setApiList(a),_.apiList)}catch{f.TSys.router.push("/login")}return _.apiList},upload:{handler:a=>{const t=document.createElement("input");t.type="file",t.accept=a.accept||"image/*",t.multiple=a.multiple||!1,t.onchange=async l=>{const o=l.target.files[0];if(o){const n=await M.upload({file:o});a.callback(n.data),a.toast,f.TSys.success("上传成功")}else a.callback("")},t.click()}},preview:{show:!1,srcList:[],index:0,open:(a,t=0)=>{_.preview.index=t,_.preview.srcList=a.map(l=>x.getBaseUrl(l)),_.preview.show=!0}}}),ce=e.defineComponent({name:"App",__name:"App",setup(a){const t=e.reactive({locale:x.elementLocale,show:!0,reload:()=>{t.show=!1,e.nextTick(()=>{t.show=!0})}});return CEvent.on(z.reload,t.reload),(l,o)=>{const n=e.resolveComponent("x-route-event"),s=e.resolveComponent("router-view"),i=e.resolveComponent("el-image-viewer"),c=e.resolveComponent("el-config-provider");return e.openBlock(),e.createBlock(c,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(n),e.createVNode(s),e.unref(_).preview.show?(e.openBlock(),e.createBlock(i,{key:0,"url-list":e.unref(_).preview.srcList,"initial-index":e.unref(_).preview.index,onClose:o[0]||(o[0]=r=>e.unref(_).preview.show=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0)]),_:1},8,["locale"])}}}),V=e.reactive({findOptions:(a,t)=>{const l=a.column.find(n=>n.key===t),o=n=>n.replace(/-([a-z])/g,(s,i)=>i.toUpperCase());if(l)return l.options[o(l.type)]},setOptionsData:(a,t,l)=>{const o=V.findOptions(a,t);o&&(o.data=l)},form:{openBefore:{parentId:(a,t,l,o)=>{a?t.type===f.TSys.EDialog.Add?(t.form.parentId=a._id,t.form.sort=a.children.length+1,t.form._id=void 0):t.form.parentId=a.parentId.substring(a.parentId.lastIndexOf(",")+1):(t.form.parentId="0",t.form.sort=l.length+1),V.setOptionsData(o,"parentId",[{_id:"0",title:"根",children:l}])}}}}),T=e.reactive({baseUrl:"",reset:()=>{},store:{},getStore(a){return T.store[a]},getDateOptions:(a=!0)=>{const t=[];a&&t.push({label:x.i18n.t("dateOptions.AllDates"),value:null,key:"all"}),t.push({label:x.i18n.t("dateOptions.Today"),value:TimeUtil.somedayse(),key:"today"}),t.push({label:x.i18n.t("dateOptions.Yesterday"),value:TimeUtil.somedayse(-1),key:"yesterday"});const l=new Date,o=TimeUtil.somedayse,n=l.getDay(),s=o(1-n)[0],i=o(7-n)[1],c={label:x.i18n.t("dateOptions.ThisWeek"),value:[s,i],key:"thisWeek"};t.push(c);const r=o(1-n-7)[0],p=o(7-n-7)[1],u={label:x.i18n.t("dateOptions.LastWeek"),value:[r,p],key:"lastWeek"};t.push(u);const d=new Date;d.setDate(1);const h=o(0,d);d.setMonth(d.getMonth()+1),d.setDate(1),d.setDate(d.getDate()-1);const m=o(0,d),g={label:x.i18n.t("dateOptions.ThisMonth"),value:[h[0],m[1]],key:"thisMonth"};return t.push(g),t}}),R=e.reactive({getVf:(a,t,l)=>{const o={};l===void 0&&(l=R.inputVal);for(const n in t)o[n]=s=>{a[n]=null,l({val:s.target.value,after:i=>{a[n]=i},...t[n]})};return o},inputVal:a=>{let{val:t,length:l,trim:o=!0,fixed:n=2,min:s=0,max:i=1e9}=a;o&&(t=t.replace(/\s+|\s+$/g,""));const c={int:r=>(r=r.replace(/[^\d]/g,""),r=Number(r)||0,r=s&&r<s?s:r,r=i&&r>i?i:r,r),float:r=>(r=r.replace(/^0(\d)/,"$1").replace(/^\./,"0").replace(/[^\d.]/g,"").replace(/^(\d*\.?\d*).*$/,"$1").replace(new RegExp(`^(\\d+)\\.(\\d{${n}}).*`),"$1.$2"),r),hanzi:r=>(r=r.replace(/[^\u4e00-\u9fa5]/g,""),r),Num:"0-9",En:"a-zA-Z",Hanzi:"一-龥"};if(t.length){l&&t.length>l&&(t=t.substring(0,l));const r=[],p=[],u=(d,h,m)=>{d===h?Array.isArray(a[d])?m.push(...a[d]):m.push(a[d]):m.push(c[d.substring(3)])};Object.keys(a).forEach(d=>{d.startsWith("get")?u(d,"getCustom",r):d.startsWith("del")?u(d,"delCustom",p):c[d]&&(t=c[d](t))}),r.length&&(t=t.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),p.length&&(t=t.replace(new RegExp(`[${p.join("")}]`,"g"),""))}return a.after(t),t}}),de={install:a=>{const t=Cookie.clear.bind(Cookie);Cookie.clear=async(l,o)=>{l=l||{},l.excludeList=l.excludeList||[],l.excludeList.push("apiurl"),await t(l,o)}}},pe={install:a=>{B.Scope.CEventBean=CEventBean,B.Scope.TimerBean=TimerBean}};let I={},O={};const me={install:a=>{a.use(se),I=Cookie.get("iconObj")||{},O=Cookie.get("siconObj")||{},VConf.vicon.fun.getRes=async t=>I[t],VConf.vicon.fun.setRes=(t,l)=>{I[t]=l,Cookie.set("iconObj",I)},VConf.vsicon.url=x.staticDir+"/vicon/svg",VConf.vsicon.lib="",VConf.vsicon.fun.getRes=async t=>O[t],VConf.vsicon.fun.setRes=(t,l)=>{O[t]=l,Cookie.set("siconObj",O)}}},ue={style:{border:"1px solid #ccc"}},fe=e.defineComponent({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(a,{emit:t}){const l=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Editor)),o=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Toolbar)),n=a,s=t,i=e.shallowRef(),c=e.ref(n.modelValue);e.watch(c,d=>{s("update:modelValue",d)});const r={excludeKeys:["group-video"]},p={placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(d,h){const m=await M.upload({file:d});m.data=x.getBaseUrl(m.data),h(m.data,"",m.data),s("update:modelValue",c.value)}}}};e.onBeforeUnmount(()=>{const d=i.value;d?.destroy()});const u=d=>{i.value=d};return(d,h)=>(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.unref(o),{style:{"border-bottom":"1px solid #ccc"},editor:i.value,defaultConfig:r,mode:"default"},null,8,["editor"]),e.createVNode(e.unref(l),{style:{height:"500px","overflow-y":"hidden"},modelValue:c.value,"onUpdate:modelValue":h[0]||(h[0]=m=>c.value=m),defaultConfig:p,mode:"default",onOnCreated:u},null,8,["modelValue"])]))}}),he={install:a=>{const t={activeValue:1,inactiveValue:0,activeText:"启用",inactiveText:"禁用",inlinePrompt:!0,tableConfig:{loadList:!1}};f.TForm.error.callback=(l,o)=>"必填",f.TFormConfig.setConfig({dialog:{delete:{content:'确定要执行删除操作吗,删除后<span style="color: red;">无法进行恢复</span>'}},size:{table:"default",form:"default",search:"default"},pagination:{size:20,pageSizes:[20,50,100,500],layout:"total, sizes, prev, pager, next, jumper"},table:{index:!0},tools:{export:{dropdown:!1}},columnConfig:{options:{switch:t,datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"},baseupload:{table:{showOverflowTooltip:!1}},basegroup:{dataApiConfig:{once:!0,init:!1,update:!0}},formAdd:{switch:t},formUpdate:{switch:t},search:{datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"}}}}}),a.use(f,{customComponent:{xEditor:fe}})}},_e={install:a=>{a.use(de),a.use(pe),a.use(me),a.use(he)}},ye=()=>{const a=r=>r.replace(/\/index$/,"");let t=Object.assign({"/src/views/error/index.vue":()=>Promise.resolve().then(()=>$e),"/src/views/layout/index.vue":()=>Promise.resolve().then(()=>We),"/src/views/login/index.vue":()=>Promise.resolve().then(()=>Qe),"/src/views/pages/auth/api/index.vue":()=>Promise.resolve().then(()=>ve),"/src/views/pages/auth/menu/index.vue":()=>Promise.resolve().then(()=>bt),"/src/views/pages/auth/role/index.vue":()=>Promise.resolve().then(()=>wt),"/src/views/pages/auth/user/index.vue":()=>Promise.resolve().then(()=>xt),"/src/views/pages/db/index.vue":()=>Promise.resolve().then(()=>Ct),"/src/views/pages/email/config/index.vue":()=>Promise.resolve().then(()=>Vt),"/src/views/pages/home/index.vue":()=>Promise.resolve().then(()=>Et),"/src/views/pages/log/error/index.vue":()=>Promise.resolve().then(()=>Bt),"/src/views/pages/log/loginlog/index.vue":()=>Promise.resolve().then(()=>Lt),"/src/views/pages/profile/index.vue":()=>Promise.resolve().then(()=>Pt),"/src/views/pages/schedule/job/index.vue":()=>Promise.resolve().then(()=>It),"/src/views/pages/sms/config/index.vue":()=>Promise.resolve().then(()=>Ot),"/src/views/pages/system/config/index.vue":()=>Promise.resolve().then(()=>Dt),"/src/views/pages/system/tenant/index.vue":()=>Promise.resolve().then(()=>At)});if(!x.config.routes){f.TSys.fail("router.routes is required");return}Object.keys(x.config.routes).forEach(r=>{t[r]=x.config.routes[r]});const l={},o=["light","dark"],n="light",s="dark";Object.keys(t).forEach(r=>{o.forEach(p=>{n!=p&&(new RegExp(`^/src/views/${p}`).test(r)||(l[r]=t[r]),new RegExp(`^/src/views/${s}`).test(r)&&t[r])})});const i=B.CRouter.init({modules:l,children:[{path:"/layout",component:"/layout",childrenReg:["^/pages"]}],setInfoHook(r){r.meta={title:r.path}},mapKeyPathHook(r){return a(r)},pathHook(r){return a(r).replace(/^\/pages/,"")}}),c=F.createRouter({history:F.createWebHashHistory(),routes:[...i.array,{path:"/",redirect:"/home"},{path:"/:matchOthers(.*)*",redirect:"/error"}]});return f.TSys.router=c,f.TSys.routes=i.array,c};T.store={ssys:_,suser:w,sutil:T,svf:R,scurd:V};const ge=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].reset?.()})},be=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].load?.()})},we=async()=>{be()};T.reset=ge;class xe{static async init(t){t.use(_e),t.use(x.i18n),await x.i18n.setLang(),we(),E.init();const l=ye();t.use(l),l.isReady().then(async()=>{t.mount("#app")})}}const D=e.createApp(ce),ke=async a=>{x.setConfig(a),await x.config.install?.(D),D.use(window.ElementPlus,a.elementPlus||{});const t=await Promise.resolve().then(()=>Mt);D.use(t),xe.init(D)},Ce={style:{background:"#7395ff",width:"100vw",height:"100vh"}},Ve={class:"nfsystem"},Ne=["src"],Te={class:"nftitle"},Se=e.defineComponent({__name:"index",setup(a){const t=()=>{f.TSys.router.push("/")};return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",Ve,[e.createElementVNode("img",{src:e.unref(x).staticDir+"/images/404.png"},null,8,Ne),e.createElementVNode("div",Te,[o[2]||(o[2]=e.createElementVNode("h2",null,"页面走丢了...",-1)),o[3]||(o[3]=e.createElementVNode("h4",null,"远方的朋友你好!非常抱歉,您所请求的页面不存在!",-1)),o[4]||(o[4]=e.createElementVNode("h4",null,"请仔细检查您输入的网址是否正确。",-1)),e.createVNode(n,{type:"warning",onClick:o[0]||(o[0]=s=>t()),style:{width:"220px"}},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("返回主页",-1)])),_:1,__:[1]})])])])}}}),S=(a,t)=>{const l=a.__vccOpts||a;for(const[o,n]of t)l[o]=n;return l},$e=Object.freeze(Object.defineProperty({__proto__:null,default:S(Se,[["__scopeId","data-v-29641492"]])},Symbol.toStringTag,{value:"Module"})),Ee={class:"header row no-wrap"},Be={class:"header-right"},Le={class:"header-user-con"},Pe={class:"el-dropdown-link row items-center"},Ie={class:"user-avator"},Oe=["src"],De=S(e.defineComponent({__name:"Header",setup(a){const t=e.reactive({layout:_.layout,message:2}),l=()=>{t.layout.collapse=!t.layout.collapse};e.onMounted(()=>{document.body.clientWidth<1500&&l()});const o=n=>{n=="loginout"?(w.clearInfo(),f.TSys.router.push("/login")):n=="user"&&f.TSys.router.push("/profile")};return(n,s)=>{const i=e.resolveComponent("v-icon"),c=e.resolveComponent("el-dropdown-item"),r=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",{class:"collapse-btn",onClick:l},[e.createVNode(i,{name:"menu",size:"32",color:["#34B0E5"],style:e.normalizeStyle([{transition:"all 0.3s"},{transform:`rotateZ(${t.layout.collapse?90:0}deg)`}])},null,8,["style"])]),s[2]||(s[2]=e.createElementVNode("i",{class:"el-icon-lx-redpacket_fill",style:{"font-size":"30px",color:"#ff5900"}},null,-1)),s[3]||(s[3]=e.createElementVNode("div",{class:"logo col"},"后台管理",-1)),e.createElementVNode("div",Be,[e.createElementVNode("div",Le,[e.createVNode(p,{class:"user-name",trigger:"click",onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(c,{command:"user"},{default:e.withCtx(()=>s[0]||(s[0]=[e.createTextVNode("个人中心",-1)])),_:1,__:[0]}),e.createVNode(c,{divided:"",command:"loginout"},{default:e.withCtx(()=>s[1]||(s[1]=[e.createTextVNode("退出登录",-1)])),_:1,__:[1]})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",Pe,[e.createTextVNode(e.toDisplayString(e.unref(w).userInfo.nickname)+" ",1),e.createElementVNode("div",Ie,[e.createElementVNode("img",{src:e.unref(x).staticDir+"/images/head.jpg"},null,8,Oe)])])]),_:1})])])])}}}),[["__scopeId","data-v-d5ae6f3f"]]),Ae={class:"flex items-center vicon"},je={class:"flex items-center vicon"},Ue=S(e.defineComponent({__name:"Sidebar",setup(a){const t=e.reactive({layout:_.layout,menu:[]}),l=async()=>{let s=await _.getMenuList();const i=c=>c.filter(r=>(r.type===0&&(r.url="/"+StrUtil.getId()),StrUtil.isNull(r.children)||(r.children=i(r.children)),r.show));s=i(s),t.menu=s};e.onMounted(()=>{l()});const o=e.computed(()=>f.TSys.router.currentRoute.value.path),n=s=>{o.value!==s&&window.innerWidth<900&&Timer.once(()=>{t.layout.collapse=!t.layout.collapse},300)};return(s,i)=>{const c=e.resolveComponent("v-icon"),r=e.resolveComponent("el-menu-item"),p=e.resolveComponent("el-sub-menu"),u=e.resolveComponent("el-menu"),d=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sidebar",[t.layout.collapse?"sidebar-hideen":"sidebar-show"]])},[e.createVNode(d,{height:"100%",style:{"background-color":"#324157"}},{default:e.withCtx(()=>[e.createVNode(u,{class:"sidebar-el-menu","default-active":o.value,collapse:t.layout.collapse,"text-color":"#bfcbd9","active-text-color":"#20a0ff","unique-opened":"",router:"",onSelect:n},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menu,h=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.children&&h.children?.length>0?(e.openBlock(),e.createBlock(p,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])]),e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.children,m=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.children&&m.children?.length>0?(e.openBlock(),e.createBlock(p,{key:0,index:m.url},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.children,(g,k)=>(e.openBlock(),e.createBlock(r,{key:k,index:g.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.title),1)]),_:2},1032,["index"]))),128))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(r,{key:1,index:m.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["index"]))],64))),256))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(r,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])])]),_:2},1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse"])]),_:1})],2)}}}),[["__scopeId","data-v-ac094262"]]),Me={style:{display:"flex",height:"calc(100% - 70px)"}},ze={class:"content"},Re={class:"view"},Fe={class:"row flex-center",style:{gap:"10px","font-size":"12px"}},We=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({keepAlive:["/auth/role","/auth/api"]});return(l,o)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(De),e.createElementVNode("div",Me,[e.createVNode(Ue),e.createElementVNode("div",ze,[e.createElementVNode("div",null,[e.createElementVNode("div",Re,[e.createVNode(n,null,{default:e.withCtx(({Component:s})=>[e.createVNode(e.Transition,{name:"slide-fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:t.keepAlive},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s),{key:l.$route.fullPath}))],1032,["include"]))]),_:2},1024)]),_:1}),e.createElementVNode("div",Fe,[e.createElementVNode("div",null,e.toDisplayString(e.unref(x).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(x).config.website.recordNumber),1)])])])])])],64)}}}),[["__scopeId","data-v-7d2c2356"]])},Symbol.toStringTag,{value:"Module"})),qe=["id"],He=e.defineComponent({__name:"index",setup(a){const t=StrUtil.getId(),l=e.reactive({boxid:"canvas_snow-"+t,itemid:"canvas_sakura-"+t});let o;const n=()=>{const s=document.getElementById(l.boxid);if(s){const i=s.getBoundingClientRect();innerHeight=i.height,innerWidth=i.width;let c=document.getElementById(l.itemid);c.width=innerWidth,c.height=innerHeight}};return e.onMounted(()=>{const s=document.getElementById(l.boxid).getBoundingClientRect();let i=s.height,c=s.width,r=new Image;r.src=x.staticDir+"/bg/yh.png";let p=function(m,g,k,b,N){this.x=m,this.y=g,this.s=k,this.r=b,this.fn=N};p.prototype.draw=function(m){m.save(),m.translate(this.x,this.y),m.rotate(this.r),m.drawImage(r,0,0,40*this.s,40*this.s),m.restore()},p.prototype.update=function(){this.x=this.fn.x(this.x,this.y),this.y=this.fn.y(this.y,this.y),this.r=this.fn.r(this.r),(this.x>c||this.x<0||this.y>i||this.y<0)&&(this.r=d("fnr"),Math.random()>.4?(this.x=d("x"),this.y=0,this.s=d("s"),this.r=d("r")):(this.x=c,this.y=d("y"),this.s=d("s"),this.r=d("r")))};let u=function(){this.list=[]};u.prototype.push=function(m){this.list.push(m)},u.prototype.update=function(){for(let m=0,g=this.list.length;m<g;m++)this.list[m].update()},u.prototype.draw=function(m){for(let g=0,k=this.list.length;g<k;g++)this.list[g].draw(m)},u.prototype.get=function(m){return this.list[m]},u.prototype.size=function(){return this.list.length};function d(m){let g,k;switch(m){case"x":g=Math.random()*c;break;case"y":g=Math.random()*i;break;case"s":g=Math.random();break;case"r":g=Math.random()*6;break;case"fnx":k=-.5+Math.random()*1,g=function(b,N){return b+.5*k-1.7};break;case"fny":k=1.5+Math.random()*.7,g=function(b,N){return N+k};break;case"fnr":k=Math.random()*.03,g=function(b){return b+k};break}return g}function h(){let m=document.createElement("canvas"),g;m.height=i,m.width=c,m.setAttribute("style","position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"),m.setAttribute("id",l.itemid),document.getElementById(l.boxid).appendChild(m),g=m.getContext("2d");let k=new u;for(let b=0;b<50;b++){let N,C,ee,te,oe,ne,le,ae;C=d("x"),ee=d("y"),oe=d("r"),te=d("s"),ne=d("fnx"),le=d("fny"),ae=d("fnr"),N=new p(C,ee,te,oe,{x:ne,y:le,r:ae}),N.draw(g),k.push(N)}o=function(){g.clearRect(0,0,m.width,m.height),k.update(),k.draw(g),requestAnimationFrame(o)},requestAnimationFrame(o)}r.onload=function(){h()},window.addEventListener("resize",n)}),e.onUnmounted(()=>{window.removeEventListener("resize",n),window.cancelAnimationFrame(o);let s=document.getElementById(l.itemid);s?.parentNode?.removeChild(s)}),(s,i)=>(e.openBlock(),e.createElementBlock("div",{id:l.boxid},null,8,qe))}}),Ke={class:"absolute fit"},Je={class:"login-icp"},Ye={class:"ms-login"},Ge={class:"row no-wrap",style:{width:"100%"}},Ze={class:"row no-wrap",style:{width:"100%"}},Xe={class:"login-btn"},Qe=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{isPhone:!1,login_name:"",login_password:"",phone:"",code:""},textCode:{loading:!1,text:"发送验证码",status:!1},rules:{login_name:[{required:!0,message:"请输入用户名",trigger:"blur"}],login_password:[{required:!0,message:"请输入密码",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},loading:!1,text:"登录"});w.clearInfo();const l=e.ref(),o=()=>{l.value.validate(async c=>{if(c){let r=t.param.isPhone?{phone:t.param.phone,code:t.param.code}:{account:t.param.login_name,password:t.param.login_password};t.loading=!0,t.text="加载中";const p=await $.login({...r,final(d,h,m){t.loading=!1,t.text="登录"}});w.setUserInfo(p.data);let u=_.getTableTree(p.data.roleInfo.menuList);_.setMenuList(u,p.data.roleInfo.menuList),_.setApiList(p.data.roleInfo.apiList),f.TSys.router.push("/")}})};let n=null;const s=c=>{Timer.un(n),StrUtil.isNull(c)&&(c=parseInt(Cookie.get("codeTime"))),!StrUtil.isNull(c)&&(t.textCode.status=!1,n=Timer.on(()=>{let r=new Date().getTime();if(r-c>0)t.textCode.status=!1,Timer.un(n),t.textCode.text="发送验证码";else{t.textCode.status=!0;const p=(c-r)/1e3;t.textCode.text=p.toFixed(0)+"秒后再试"}},1e3,!0))},i=async()=>{const c=await q.send({type:1,content:"1518079148@qq.com"});console.log("res",c)};return e.onMounted(()=>{s()}),(c,r)=>{const p=e.resolveComponent("el-button"),u=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:"login-wrap",style:e.normalizeStyle({backgroundImage:`url(${e.unref(x).staticDir+"/bg/g-1.jpg"})`})},[e.createElementVNode("div",Ke,[e.createVNode(He,{class:"fit"})]),e.createElementVNode("div",Je,[e.createElementVNode("div",null,e.toDisplayString(e.unref(x).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(x).config.website.recordNumber),1)]),e.createElementVNode("div",Ye,[r[9]||(r[9]=e.createElementVNode("div",{class:"ms-title"},"系统登陆",-1)),e.createVNode(h,{model:t.param,rules:t.rules,ref_key:"login",ref:l,"label-width":"0px",class:"ms-content"},{default:e.withCtx(()=>[t.param.isPhone?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{prop:"phone"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.phone,"onUpdate:modelValue":r[3]||(r[3]=m=>t.param.phone=m),placeholder:"手机号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",Ze,[e.createVNode(u,{placeholder:"验证码",modelValue:t.param.code,"onUpdate:modelValue":r[4]||(r[4]=m=>t.param.code=m),onKeyup:r[5]||(r[5]=e.withKeys(m=>o(),["enter","native"])),class:"input-phone"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue"]),e.createVNode(p,{loading:t.textCode.loading,disabled:t.textCode.status,type:"primary",onClick:r[6]||(r[6]=m=>i()),style:{"border-radius":"0px 4px 4px 0px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.textCode.text),1)]),_:1},8,["loading","disabled"])])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(d,{prop:"login_name"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.login_name,"onUpdate:modelValue":r[0]||(r[0]=m=>t.param.login_name=m),placeholder:"账号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"login_password"},{default:e.withCtx(()=>[e.createElementVNode("div",Ge,[e.createVNode(u,{type:"password",placeholder:"密码",modelValue:t.param.login_password,"onUpdate:modelValue":r[1]||(r[1]=m=>t.param.login_password=m),onKeyup:r[2]||(r[2]=e.withKeys(m=>o(),["enter","native"])),class:e.normalizeClass([t.param.isPhone?"input-phone":void 0])},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue","class"])])]),_:1})],64)),e.createElementVNode("div",Xe,[e.createVNode(p,{type:"primary",onClick:r[7]||(r[7]=m=>o()),loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),_:1},8,["loading"]),e.createElementVNode("div",{style:{color:"#ffffff","font-size":"14px","margin-top":"10px",cursor:"pointer"},onClick:r[8]||(r[8]=m=>t.param.isPhone=!t.param.isPhone)}," 切换"+e.toDisplayString(t.param.isPhone?"账号":"验证码")+"登录 ",1)])]),_:1},8,["model","rules"])])],4)}}}),[["__scopeId","data-v-9b624341"]])},Symbol.toStringTag,{value:"Module"})),ve=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],option:{api:L,search:{show:!1},data(l){return t.data=_.getTableTree(l),t.data},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",table:{width:"250px",align:"left"},rules:!0},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"接口",value:1}]}}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},form:{span:12}},{key:"url",label:"地址",type:"select",value:"",rules:!0,show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12}}],form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),o.type===f.TSys.EDialog.Add&&(l.title="");const n=await t.api.getList();V.setOptionsData(t.option,"url",n.map(s=>({label:s.path,value:s.path})))}},tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}},api:{list:[],getList:async()=>{if(t.api.list.length)return t.api.list;f.TSys.loading(!0);const l=await L.all({final(o,n,s){f.TSys.loading(!1)}});return t.api.list=l.data,t.api.list}}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:i})=>[i.type===0?(e.openBlock(),e.createBlock(n,{key:0,type:"success"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("目录",-1)])),_:1,__:[0]})):(e.openBlock(),e.createBlock(n,{key:1,type:"warning"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("接口",-1)])),_:1,__:[1]}))]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),et=e.defineComponent({__name:"addIconItem",props:{isbig:{default:!1},el:{default:{}},lib:{default:""},color:{default:""},nofill:{default:!1}},setup(a){const t=e.ref({}),l=e.reactive({show:!1,observer:{}});return e.onMounted(()=>{l.observer=new IntersectionObserver((o,n)=>{o.forEach(s=>{l.show=s.isIntersecting})},{threshold:0}),l.observer.observe(t.value)}),e.onUnmounted(()=>{l.observer.disconnect()}),(o,n)=>{const s=e.resolveComponent("VIcon");return e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle({minHeight:a.isbig?"40px":"20px"}),ref_key:"_dom",ref:t},[l.show?(e.openBlock(),e.createBlock(s,{key:0,lib:a.lib,name:a.el.name,size:a.isbig?40:20,color:a.color,nofill:a.nofill},null,8,["lib","name","size","color","nofill"])):e.createCommentVNode("",!0)],4)}}}),tt={class:"row items-center",style:{gap:"10px"}},ot=["onUpdate:modelValue"],nt=e.defineComponent({__name:"colorChoose",props:{colors:{default:[]},length:{default:6}},emits:["update:colors"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({color:[]});for(let r=0;r<l.length;r++)n.color.push({value:l.colors[r]||"#000000"});const s=()=>o("update:colors",n.color.map(r=>r.value));s();const i=B.Scope.Timer();let c=null;return e.watch(()=>n.color,()=>{i.un(c),c=i.once(()=>{s()},100)},{deep:!0}),(r,p)=>(e.openBlock(),e.createElementBlock("div",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.color,(u,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"color","onUpdate:modelValue":h=>n.color[d].value=h},null,8,ot)),[[e.vModelText,n.color[d].value]])),256))]))}}),lt={class:"row items-center",style:{height:"60px",overflow:"auto"}},at={class:"row items-center",style:{gap:"10px",margin:"15px 0"}},st={class:"row items-center",style:{gap:"10px","margin-bottom":"15px"}},it={class:"row items-center"},rt={class:"flex items-center",style:{"margin-bottom":"10px"}},ct={style:{"margin-left":"10px"}},dt={key:0,class:"row"},pt=["onClick"],mt={style:{width:"0px"},class:"flex flex-center"},ut={style:{"text-wrap":"nowrap"}},ft={class:"dialog-footer"},ht=S(e.defineComponent({__name:"addDialog",props:{show:{default:!1},iconName:{default:"home"},iconLib:{default:"ant"},iconFill:{default:[]}},emits:["close","update:show"],setup(a,{emit:t}){const l=a;e.watch(()=>l.show,()=>{n.show=l.show,n.show&&n.open()});const o=t,n=e.reactive({libs:[],lib:"",size:0,nofill:!1,isbig:!1,getlibs:async()=>{if(n.libs.length)return;const s=VConf.vicon,i=`${s.url}/_keys.json`;let c=await s.fun.getRes(i);c||(c=await s.fun.getResorce(i,!0));const r=`${s.url}/_size.json`;let p=await s.fun.getRes(r);p||(p=await s.fun.getResorce(r,!0)),n.size=p.num,n.libs=c},init:()=>{n.lib=l.iconLib||"ant",n.item.lib=l.iconLib||"ant",n.item.name=l.iconName||"home",n.color.length=0,n.color.push(...l.iconFill)},changeLib:()=>{n.open(!1)},list:{},title:"选择图标",findName:"",color:[],item:{lib:"",name:""},show:!1,showIcon:!1,open:async(s=!0)=>{f.TSys.loading(!0);const i=VConf.vicon;await n.getlibs(),s&&n.init(),n.showIcon=!1;const c=n.lib,r=`${i.url}/${c}/_all.json`;if(n.list[c]||(n.list[c]=[]),n.list[c].length){e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1);return}let p=await i.fun.getRes(r);p||(p=await i.fun.getResorce(r,!0));const u=Object.keys(p);n.list[c]=[];for(let d=0;d<u.length;d++)n.list[c].push({name:u[d]});e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1)},choose:async s=>{n.item.lib=n.lib,n.item.name=s.name,await StrUtil.copyText(`${n.lib}-${s.name}`)},close:()=>{n.show=!1},closeItem:()=>{o("close",{lib:n.item.lib,name:n.item.name,color:n.color}),n.close()}});return e.watch(()=>n.show,()=>{o("update:show",n.show)}),(s,i)=>{const c=e.resolveComponent("el-radio"),r=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-input"),u=e.resolveComponent("el-switch"),d=e.resolveComponent("el-tooltip"),h=e.resolveComponent("VIcon"),m=e.resolveComponent("el-scrollbar"),g=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":i[5]||(i[5]=b=>n.show=b),title:n.title,"close-on-click-modal":!1,style:{width:"950px"},"z-index":1e4},{footer:e.withCtx(()=>[e.createElementVNode("span",ft,[e.createVNode(g,{onClick:n.close},{default:e.withCtx(()=>i[15]||(i[15]=[e.createTextVNode("关闭",-1)])),_:1,__:[15]},8,["onClick"]),e.createVNode(g,{type:"primary",onClick:n.closeItem},{default:e.withCtx(()=>i[16]||(i[16]=[e.createTextVNode("确定",-1)])),_:1,__:[16]},8,["onClick"])])]),default:e.withCtx(()=>[e.createElementVNode("div",lt,[e.createVNode(r,{modelValue:n.lib,"onUpdate:modelValue":i[0]||(i[0]=b=>n.lib=b),onChange:n.changeLib},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.libs,b=>(e.openBlock(),e.createBlock(c,{value:b,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])]),e.createElementVNode("div",at,[i[6]||(i[6]=e.createElementVNode("div",null,"条件:",-1)),e.createVNode(p,{modelValue:n.findName,"onUpdate:modelValue":i[1]||(i[1]=b=>n.findName=b),style:{width:"160px"},placeholder:"查找"},null,8,["modelValue"]),i[7]||(i[7]=e.createElementVNode("div",null,"当前可选图标库数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.libs.length)+"个 ",1),i[8]||(i[8]=e.createElementVNode("div",null,"当前可选图标数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.size)+"个 ",1),i[9]||(i[9]=e.createElementVNode("div",null,"总大小:",-1)),i[10]||(i[10]=e.createTextVNode(" 43.49M ",-1))]),e.createElementVNode("div",st,[i[13]||(i[13]=e.createElementVNode("div",null,"放大:",-1)),e.createVNode(u,{modelValue:n.isbig,"onUpdate:modelValue":i[2]||(i[2]=b=>n.isbig=b)},null,8,["modelValue"]),e.createVNode(d,{effect:"dark",content:"开启时使用图标库上传时的颜色示例:chroma、chromab、bank等多色图标库",placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",it,[i[11]||(i[11]=e.createElementVNode("div",null,"颜色控制:",-1)),e.createVNode(u,{modelValue:n.nofill,"onUpdate:modelValue":i[3]||(i[3]=b=>n.nofill=b)},null,8,["modelValue"])])]),_:1}),!n.nofill&&n.showIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i[12]||(i[12]=e.createElementVNode("div",null,"颜色:",-1)),e.createVNode(nt,{colors:n.color,"onUpdate:colors":i[4]||(i[4]=b=>n.color=b)},null,8,["colors"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",rt,[i[14]||(i[14]=e.createElementVNode("div",null,"当前选中:",-1)),e.createVNode(h,{lib:n.item.lib,name:n.item.name,color:n.color},null,8,["lib","name","color"]),e.createElementVNode("div",ct,e.toDisplayString(n.item.lib)+"-"+e.toDisplayString(n.item.name),1)]),e.createVNode(m,{"max-height":"400px"},{default:e.withCtx(()=>[n.showIcon?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list[n.lib],b=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!n.findName||b.name.indexOf(n.findName)!=-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist column flex-center",onClick:N=>n.choose(b),style:e.normalizeStyle({background:b.name===n.item.name&&n.lib===n.item.lib?"#c8ebff":void 0,height:n.isbig?"80px":"60px",width:n.isbig?"180px":"90px"})},[e.createVNode(et,{isbig:n.isbig,el:b,color:n.color,nofill:n.nofill,lib:n.lib},null,8,["isbig","el","color","nofill","lib"]),e.createElementVNode("div",mt,[e.createElementVNode("div",ut,e.toDisplayString(b.name),1)])],12,pt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b9c727d4"]]),_t={class:"flex flex-center"},yt={class:"row"},gt=["onClick"],bt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({routers:[],initRouters:()=>{t.routers=[];const l=(o,n)=>{o.forEach(s=>{if(s.path){let i=s.path.split("/:")[0];i.length&&n.push({path:i,label:i,value:i})}s.children&&l(s.children,n)})};l(f.TSys.routes,t.routers)},icon:{visible:!1,current:null,form:{iconName:"",iconLib:"",iconFill:["#1890ff"]},show(l){t.icon.current=l,t.icon.visible=!0},select(l){t.icon.current.iconLib=l.lib,t.icon.current.iconName=l.name,t.icon.current.iconFill=l.color}},data:[],option:{api:A,data(l){return t.data=_.getTableTree(l),t.data},form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),V.setOptionsData(t.option,"url",t.routers),o.type===f.TSys.EDialog.Add&&(l.title="")},submitBefore(l,o){l.iconName?.length||(l.iconLib="",l.iconName="",l.iconFill=[])}},search:{show:!1},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",rules:!0,sort:{table:1}},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"路由",value:1}]}},sort:{table:2}},{key:"icon",label:"图标",type:"input",value:"",sort:{table:3}},{key:"show",label:"显示",type:"switch",value:1,show:{table:!1}},{key:"url",label:"地址",type:"select",rules:!0,value:"",show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12},sort:{table:4}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},sort:{table:5}},{key:"desc",label:"备注",type:"input",value:"",show:{table:!1}}],tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}}});return t.initRouters(),(l,o)=>{const n=e.resolveComponent("VIcon"),s=e.resolveComponent("el-tag"),i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"table-icon":e.withCtx(({row:p})=>[e.createElementVNode("div",_t,[p.iconName?(e.openBlock(),e.createBlock(n,{key:0,lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"18"},null,8,["lib","name","color"])):e.createCommentVNode("",!0)])]),"table-type":e.withCtx(({row:p})=>[e.createVNode(s,{type:p.type===0?"warning":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.type===0?"目录":"路由"),1)]),_:2},1032,["type"])]),"form-show":e.withCtx(({row:p,item:u})=>[p.type===1?(e.openBlock(),e.createBlock(i,{key:0,modelValue:p[u.key],"onUpdate:modelValue":d=>p[u.key]=d,"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),"form-icon":e.withCtx(({row:p,item:u})=>[e.createElementVNode("div",yt,[e.createVNode(c,{style:{"margin-right":"16px"},onClick:d=>t.icon.show(p)},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("选择图标",-1)])),_:2,__:[1]},1032,["onClick"]),p.iconName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist",onClick:d=>p.iconName=""},[e.createVNode(n,{lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"26"},null,8,["lib","name","color"])],8,gt)):e.createCommentVNode("",!0)])]),"tools-right":e.withCtx(()=>[e.createVNode(ht,{iconName:t.icon.form.iconName,iconLib:t.icon.form.iconLib,iconFill:t.icon.form.iconFill,show:t.icon.visible,"onUpdate:show":o[0]||(o[0]=p=>t.icon.visible=p),onClose:t.icon.select},null,8,["iconName","iconLib","iconFill","show","onClose"])]),_:1},8,["option"])}}}),[["__scopeId","data-v-72a09943"]])},Symbol.toStringTag,{value:"Module"})),wt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({menuList:[],apiList:[],roleList:[],option:{api:j,data(l){return t.roleList=l,l},search:{show:!1},table:{border:!0},page:{show:!1},tools:{export:{show:!1}},column:[{key:"title",label:"名称",type:"input",value:"",rules:!0},{key:"type",label:"角色标识",type:"input",value:"",rules:!0},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}}},{key:"sort",label:"排序",type:"input",value:0,form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"menuList",label:"菜单列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"apiList",label:"接口列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4,checkStrictly:!1}},show:{table:!1},form:{span:12}}],form:{openBefore:async(l,o)=>{if(l||(o.form.sort=t.roleList.length+1),t.menuList.length===0){f.TSys.loading();let n=await A.list({final(s,i,c){f.TSys.loading(!1)}});t.menuList=_.getTableTree(n.data),n=await L.list({final(s,i,c){f.TSys.loading(!1)}}),t.apiList=_.getTableTree(n.data)}V.setOptionsData(t.option,"menuList",t.menuList),V.setOptionsData(t.option,"apiList",t.apiList),V.setOptionsData(t.option,"roleList",t.roleList)}}}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),xt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],roleList:[],resetLoading:{},option:{api:$,data(o){return o},form:{openBefore:async(o,n)=>{if(t.roleList.length===0){f.TSys.loading();let s=await j.list({final(i,c,r){f.TSys.loading(!1)}});console.log("res.data",s.data),t.roleList=s.data}V.setOptionsData(t.option,"roleList",t.roleList)}},search:{show:!1},table:{selectable:!0,border:!0,operate:{width:210}},tools:{export:{fileName:()=>`用户列表_${new Date().getTime()}`}},column:[{key:"account",label:"账号",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}},sort:{table:2},form:{span:12}},{key:"nickname",label:"昵称",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"phone",label:"手机号",type:"input",value:"",sort:{table:3},form:{span:12}},{key:"desc",label:"简介",type:"input",value:"",show:{table:!1},form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}}]}}),l=async o=>{try{await W.ElMessageBox.confirm(`确定将账号“${o.account}”的密码重置为 123456 吗?`,"重置密码",{type:"warning",confirmButtonText:"确定重置",cancelButtonText:"取消"})}catch{return}t.resetLoading[o._id]=!0;try{await $.resetPassword({_id:o._id}),f.TSys.success("密码已重置为 123456")}finally{t.resetLoading[o._id]=!1}};return(o,n)=>{const s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"table-op-left":e.withCtx(({row:c})=>[e.createVNode(s,{link:"",type:"primary",loading:t.resetLoading[c._id],onClick:r=>l(c)},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode(" 重置密码 ",-1)])),_:2,__:[0]},1032,["loading","onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"}));class Q{static export(t){return http.post("/db/export",t)}static import(t){return http.post({url:"/db/import",headers:{"Content-Type":"multipart/form-data"}},t)}}const kt={class:"row"},Ct=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({import:()=>{const l=document.createElement("input");l.type="file",l.accept=".json,application/json",l.onchange=async o=>{const n=o.target.files[0];if(!n)return;const s=new FileReader;s.onload=async i=>{try{await Q.import({file:n}),f.TSys.success("导入覆盖成功")}catch(c){console.error("上传的文件不是合法JSON",c)}},s.readAsText(n)},l.click()},export:async()=>{const{data:l}=await Q.export();f.TSys.success("备份成功"+l,{duration:3e3})}});return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(n,{onClick:t.export},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("备份数据",-1)])),_:1,__:[0]},8,["onClick"]),e.createVNode(n,{onClick:t.import},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("导入覆盖",-1)])),_:1,__:[1]},8,["onClick"])])}}})},Symbol.toStringTag,{value:"Module"})),Vt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{host:"1518079148@qq.com"},option:{api:K,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`邮件配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.secure=o[n.secure],n.enabled=o[n.enabled]})}}},column:[{key:"host",label:"SMTP地址",type:"input",value:"",show:{search:!0}},{key:"port",label:"SMTP端口",type:"input",value:""},{key:"user",label:"SMTP邮箱",type:"input",value:"",show:{search:!0}},{key:"pass",label:"SMTP密码",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"secure",label:"SSL加密",type:"switch",value:1},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12},rules:!0}]},email:{async send(){await http.post("/email/send",{to:t.param.host,title:"测试邮件标题",content:"测试邮件内容666"}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.host,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.host=c),placeholder:"邮件地址",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.email.send},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("发送邮件测试",-1)])),_:1,__:[1]},8,["onClick"])]),"table-host":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.host),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Nt={class:"user-info"},Tt=["src"],St={class:"user-info-cont"},$t={class:"user-info-name"},Et=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){return(t,l)=>{const o=e.resolveComponent("el-card"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(s,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(o,{shadow:"hover",class:"mgb20"},{default:e.withCtx(()=>[e.createElementVNode("div",Nt,[e.createElementVNode("img",{src:e.unref(x).staticDir+"/images/head.jpg",class:"user-avator",alt:""},null,8,Tt),e.createElementVNode("div",St,[e.createElementVNode("div",$t,e.toDisplayString(e.unref(w).userInfo.nickname),1),e.createElementVNode("div",null,"欢迎"+e.toDisplayString(e.unref(w).userInfo.nickname)+"进入后台管理",1)])]),l[0]||(l[0]=e.createElementVNode("div",{class:"user-info-list"},[e.createElementVNode("div",{class:"user-info-list-item"},[e.createElementVNode("div",{class:"user-info-list-item-label"},"欢迎使用后台管理系统,左侧导航栏可快速访问各模块")])],-1))]),_:1,__:[0]})]),_:1})]),_:1})}}}),[["__scopeId","data-v-28a63a57"]])},Symbol.toStringTag,{value:"Module"})),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=(o,n="内容")=>{W.ElMessageBox.alert(`<div style="white-space: pre-wrap; width: 1000px; word-break: break-all;">${o}</div>`,n,{confirmButtonText:"确定",dangerouslyUseHTMLString:!0})},l=e.reactive({option:{api:J,data(o){return o.forEach(n=>{n.createTime=new Date(n.createTime).Format()}),o},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"status",label:"状态码",type:"input",value:"",table:{width:"100px"}}]},tools:{add:!1,update:!1,export:{fileName:()=>`错误日志_${new Date().getTime()}`}},column:[{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0},table:{width:"120px",align:"left"}},{key:"path",label:"请求路径",type:"input",value:"",show:{search:!0},table:{minWidth:"180px",align:"left"}},{key:"method",label:"请求方法",type:"select",value:"",show:{search:!0},table:{minWidth:"100px"},options:{select:{data:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]}}},{key:"params",label:"请求参数",type:"input",value:"",table:{slot:!0}},{key:"userAgent",label:"用户代理",type:"input",value:""},{key:"error",label:"错误信息",type:"input",value:"",show:{search:!0},table:{minWidth:"140px"}},{key:"stack",label:"错误堆栈",type:"input",value:"",table:{show:!1}}]}});return(o,n)=>{const s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:l.option},{"table-params":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.params,"请求参数")},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode("查看",-1)])),_:2,__:[0]},1032,["onClick"])]),"table-userAgent":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.userAgent,"用户代理")},{default:e.withCtx(()=>n[1]||(n[1]=[e.createTextVNode("查看",-1)])),_:2,__:[1]},1032,["onClick"])]),"table-stack":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.stack,"错误堆栈")},{default:e.withCtx(()=>n[2]||(n[2]=[e.createTextVNode("查看",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Lt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:H,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.status=o.status?"成功":"失败"}),l},table:{selectable:!0,column:[{key:"createTime",label:"登录时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:!1,update:!1,delete(l){return w.hasApi("/auth/loginLog/delete")},export:{fileName:()=>`登录日志_${new Date().getTime()}`}},column:[{key:"account",label:"登录账号",type:"input",value:"",show:{search:!0}},{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0}},{key:"os",label:"操作系统",type:"input",value:""},{key:"status",label:"登录状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeLabel:"成功",inactiveLabel:"失败"}}},{key:"msg",label:"失败原因",type:"input",value:""}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-status":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.status==="成功"?"success":"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.status),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Pt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.ref(),l=e.ref(),o=e.reactive({activeTab:"profile",profileLoading:!1,passwordLoading:!1,profile:{account:"",nickname:"",phone:"",desc:""},password:{oldPassword:"",newPassword:"",confirmPassword:""}}),n={nickname:[{required:!0,message:"请输入昵称",trigger:"blur"},{max:100,message:"昵称不能超过 100 个字符",trigger:"blur"}],phone:[{validator:(p,u,d)=>{!u||/^1\d{10}$/.test(u)?d():d(new Error("请输入正确的手机号"))},trigger:"blur"}]},s={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,message:"新密码至少 6 位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请再次输入新密码",trigger:"blur"},{validator:(p,u,d)=>{u===o.password.newPassword?d():d(new Error("两次输入的密码不一致"))},trigger:"blur"}]},i=async()=>{o.profileLoading=!0;try{const p=await $.profile();Object.assign(o.profile,{account:p.data.account||"",nickname:p.data.nickname||"",phone:p.data.phone||"",desc:p.data.desc||""})}finally{o.profileLoading=!1}},c=async()=>{if(await t.value?.validate().catch(()=>!1)){o.profileLoading=!0;try{const p=await $.updateProfile({nickname:o.profile.nickname,phone:o.profile.phone,desc:o.profile.desc});Object.assign(o.profile,p.data),w.updateUserInfo(p.data),f.TSys.success("个人信息修改成功")}finally{o.profileLoading=!1}}},r=async()=>{if(await l.value?.validate().catch(()=>!1)){o.passwordLoading=!0;try{await $.changePassword({oldPassword:o.password.oldPassword,newPassword:o.password.newPassword}),f.TSys.success("密码修改成功,请重新登录"),w.clearInfo(),await f.TSys.router.replace("/login")}finally{o.passwordLoading=!1}}};return e.onMounted(i),(p,u)=>{const d=e.resolveComponent("el-input"),h=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-button"),g=e.resolveComponent("el-form"),k=e.resolveComponent("el-tab-pane"),b=e.resolveComponent("el-tabs"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"profile-card",shadow:"never"},{header:e.withCtx(()=>u[8]||(u[8]=[e.createElementVNode("div",{class:"card-title"},"个人中心",-1)])),default:e.withCtx(()=>[e.createVNode(b,{modelValue:o.activeTab,"onUpdate:modelValue":u[7]||(u[7]=C=>o.activeTab=C)},{default:e.withCtx(()=>[e.createVNode(k,{label:"个人信息",name:"profile"},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"profileFormRef",ref:t,model:o.profile,rules:n,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"账号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.account,"onUpdate:modelValue":u[0]||(u[0]=C=>o.profile.account=C),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"昵称",prop:"nickname"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.nickname,"onUpdate:modelValue":u[1]||(u[1]=C=>o.profile.nickname=C),maxlength:"100","show-word-limit":""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.phone,"onUpdate:modelValue":u[2]||(u[2]=C=>o.profile.phone=C),maxlength:"11",placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"个人简介",prop:"desc"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.desc,"onUpdate:modelValue":u[3]||(u[3]=C=>o.profile.desc=C),type:"textarea",rows:4,maxlength:"1000","show-word-limit":"",placeholder:"请输入个人简介"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.profileLoading,onClick:c},{default:e.withCtx(()=>u[9]||(u[9]=[e.createTextVNode("保存修改",-1)])),_:1,__:[9]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),e.createVNode(k,{label:"修改密码",name:"password"},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"passwordFormRef",ref:l,model:o.password,rules:s,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.oldPassword,"onUpdate:modelValue":u[4]||(u[4]=C=>o.password.oldPassword=C),type:"password","show-password":"",autocomplete:"current-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.newPassword,"onUpdate:modelValue":u[5]||(u[5]=C=>o.password.newPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.confirmPassword,"onUpdate:modelValue":u[6]||(u[6]=C=>o.password.confirmPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.passwordLoading,onClick:r},{default:e.withCtx(()=>u[10]||(u[10]=[e.createTextVNode("修改密码",-1)])),_:1,__:[10]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),[["__scopeId","data-v-b691a248"]])},Symbol.toStringTag,{value:"Module"})),It=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Y,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.lastTime=o.lastTime?new Date(Number(o.lastTime)).Format():"-"}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"lastTime",label:"最后执行时间",type:"input",value:"",table:{width:"180px"}}]},tools:{export:{fileName:()=>`定时任务_${new Date().getTime()}`,before(l){const o={0:"正常",1:"暂停"},n={0:"允许",1:"禁止"};l.data.forEach(s=>{s.status=o[s.status],s.concurrent=n[s.concurrent]})}}},column:[{key:"name",label:"任务名称",type:"input",value:"",show:{search:!0},rules:!0},{key:"group",label:"任务组",type:"input",value:"",show:{search:!0},rules:!0},{key:"cron",label:"Cron表达式",type:"input",value:"",rules:!0},{key:"target",label:"调用目标",type:"input",value:"",rules:!0},{key:"params",label:"参数",type:"input",value:""},{key:"status",label:"启用状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ot=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{phone:"",code:"123456"},option:{api:U,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`短信配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.enabled=o[n.enabled]})}}},column:[{key:"provider",label:"短信服务商",type:"select",value:"",show:{search:!0},options:{select:{data:[{label:"阿里云",value:"ALIYUN"},{label:"腾讯云",value:"TENCENT"}]}}},{key:"accessKeyId",label:"AccessKey",type:"input",value:""},{key:"accessKeySecret",label:"Secret",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"signName",label:"短信签名",type:"input",value:""},{key:"templateId",label:"短信模板ID",type:"input",value:""},{key:"sdkAppId",label:"应用ID",type:"input",value:""},{key:"signId",label:"签名ID",type:"input",value:""},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12}}]},sms:{async send(){if(!t.param.phone){f.TSys.success("请输入手机号码");return}await U.send({phone:t.param.phone,templateParam:{code:t.param.code}}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.phone,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.phone=c),placeholder:"手机号码",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(n,{modelValue:t.param.code,"onUpdate:modelValue":o[1]||(o[1]=c=>t.param.code=c),placeholder:"验证码",style:{width:"100px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.sms.send},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("发送短信测试",-1)])),_:1,__:[2]},8,["onClick"])]),"table-provider":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.provider==="ALIYUN"?"阿里云":"腾讯云"),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:G,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"}},{key:"updateTime",label:"更新时间",type:"input",value:"",table:{minWidth:"180px"}}]},tools:{export:{fileName:()=>`系统配置_${new Date().getTime()}`}},column:[{key:"key",label:"配置键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupKey",label:"分组键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupValue",label:"分组名称",type:"input",value:"",rules:!0},{key:"system",label:"系统内置",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0,activeLabel:"是",inactiveLabel:"否"}}},{key:"desc",label:"配置说明",type:"input",value:"",form:{span:12}},{key:"value",label:"配置值",type:"input",value:"",rules:!0,table:{showOverflowTooltip:!0},form:{span:12},options:{input:{type:"textarea"}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},{"table-value":e.withCtx(({row:s})=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Z,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format(),o.expireTime&&(o.expireTime=new Date(o.expireTime))}),l},table:{border:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"},sort:{table:99}}]},tools:{export:{fileName:()=>`租户管理_${new Date().getTime()}`,before:l=>{l.data.forEach(o=>{o.expireTime&&(o.expireTime=new Date(o.expireTime).Format())})}}},column:[{key:"name",label:"租户名称",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:1}},{key:"code",label:"租户编码",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:2}},{key:"type",label:"租户类型",type:"select",value:1,options:{select:{data:[{label:"单库多租户",value:1},{label:"多库多租户",value:2}]}},rules:!0,show:{search:!0},sort:{table:3}},{key:"domain",label:"域名",type:"input",value:"",rules:!0,show:{table:!1,search:!0},sort:{table:4}},{key:"expireTime",label:"过期时间",type:"datetime",value:new Date,table:{minWidth:"180px"},sort:{table:100}},{key:"contactName",label:"联系人",type:"input",value:"",sort:{table:7}},{key:"contactPhone",label:"联系电话",type:"input",value:"",sort:{table:8}},{key:"dbUrl",label:"数据库连接",type:"input",value:"",rules:!0,show:{form:l=>l.type===2,table:!1}}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.type===1?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.type===1?"单库多租户":"多库多租户"),1)]),_:2},1032,["type"])]),"table-expireTime":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.expireTime<new Date().getTime()?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(new Date(i.expireTime).Format()),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),jt=e.defineComponent({__name:"index",props:{row:{default:{}},field:{default:"value"},itemFields:{default:[]},imgField:{default:""}},emits:["change"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({upload:{handler:s=>{_.upload.handler({callback:i=>{s[l.imgField]=i,o("change")}})}}});return(s,i)=>{const c=e.resolveComponent("el-button"),r=e.resolveComponent("TFormList");return e.openBlock(),e.createBlock(r,{row:a.row,field:a.field,itemFields:a.itemFields,onChange:i[0]||(i[0]=p=>o("change",p))},{"item-end":e.withCtx(({item:p})=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>n.upload.handler(p)},{default:e.withCtx(()=>i[1]||(i[1]=[e.createTextVNode("上传图片",-1)])),_:2,__:[1]},1032,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"item-end",{item:p},()=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>e.unref(_).preview.open(a.row[a.field].map(d=>d[a.imgField]),a.row[a.field].findIndex(d=>d[a.imgField]===p[a.imgField]))},{default:e.withCtx(()=>i[2]||(i[2]=[e.createTextVNode(" 查看图片 ",-1)])),_:2,__:[2]},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["row","field","itemFields"])}}}),Ut=e.defineComponent({__name:"index",setup(a){return e.watch(()=>f.TSys.router.currentRoute.value.path,(t,l)=>{CEvent.emit(z.change,t)},{immediate:!0}),(t,l)=>null}}),v=a=>{a.component("xRouteEvent",Ut),a.component("xFormList",jt)},Mt=Object.freeze(Object.defineProperty({__proto__:null,default:{install:v},install:v},Symbol.toStringTag,{value:"Module"}));y.ApiApp=M,y.ApiAuthApi=L,y.ApiAuthMenu=A,y.ApiAuthPhone=ie,y.ApiAuthRole=j,y.ApiAuthUser=$,y.ApiCaptcha=q,y.ApiCron=re,y.ApiEmailConfig=K,y.ApiErrorLog=J,y.ApiJob=Y,y.ApiLoginLog=H,y.ApiSmsConfig=U,y.ApiSystemConfig=G,y.ApiSystemTenant=Z,y.ERouter=z,y.System=x,y.initApp=ke,y.scurd=V,y.ssys=_,y.suser=w,y.sutil=T,y.svf=R,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("cc1-vue3"),require("cc1-ui"),require("cc1-form"),require("vue-router"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","cc1-vue3","cc1-ui","cc1-form","vue-router","element-plus"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.nestAuthAdmin={},y.Vue,y.cc1Vue3,y.toolsVueUI,y.cc1Form,y.VueRouter,y.ElementPlus))})(this,(function(y,e,L,se,f,F,W){"use strict";class P{static all(t){return http.post("/auth/api/all",t)}static list(t){return http.post("/auth/api/list",t)}static create(t){return http.post("/auth/api/create",t)}static update(t){return http.post("/auth/api/update",t)}static delete(t){return http.post("/auth/api/delete",t)}}class A{static list(t){return http.post("/auth/menu/list",t)}static create(t){return http.post("/auth/menu/create",t)}static update(t){return http.post("/auth/menu/update",t)}static delete(t){return http.post("/auth/menu/delete",t)}}class ie{static sendCode(t){return http.post("/auth/phone/sendCode",{phone:t})}}class j{static list(t){return http.post("/auth/role/list",t)}static roleList(t){return http.post("/auth/role/roleList",t)}static create(t){return http.post("/auth/role/create",t)}static update(t){return http.post("/auth/role/update",t)}static delete(t){return http.post("/auth/role/delete",t)}}class ${static list(t){return http.post("/auth/user/list",t)}static create(t){return http.post("/auth/user/create",t)}static update(t){return http.post("/auth/user/update",t)}static delete(t){return http.post("/auth/user/delete",t)}static resetPassword(t){return http.post("/auth/user/resetPassword",t)}static profile(t){return http.post("/auth/user/profile",t)}static updateProfile(t){return http.post("/auth/user/updateProfile",t)}static changePassword(t){return http.post("/auth/user/changePassword",t)}static login(t){return http.post("/auth/user/login",t)}}class q{static send(t){return http.post("/captcha/send",t)}static verify(t){return http.post("/captcha/verify",t)}}class H{static list(t){return http.post("/auth/loginLog/list",t)}static delete(t){return http.post("/auth/loginLog/delete",t)}}class re{static list(t){return http.post({url:"cron/list",method:"post"},{...t})}static save(t){return http.post({url:"cron/save",method:"post"},t)}static remove(t){return http.post({url:"cron/remove",method:"post"},{id:t})}}class K{static list(t){return http.post("/email/config/list",t)}static create(t){return http.post("/email/config/create",t)}static update(t){return http.post("/email/config/update",t)}static delete(t){return http.post("/email/config/delete",t)}}class J{static list(t){return http.post("/log/error/list",t)}static delete(t){return http.post("/log/error/delete",t)}}class Y{static list(t){return http.post("/schedule/job/list",t)}static create(t){return http.post("/schedule/job/create",t)}static update(t){return http.post("/schedule/job/update",t)}static delete(t){return http.post("/schedule/job/delete",t)}static execute(t){return http.post("/schedule/job/execute",t)}static changeStatus(t){return http.post("/schedule/job/changeStatus",t)}}class U{static list(t){return http.post("/sms/config/list",t)}static create(t){return http.post("/sms/config/create",t)}static update(t){return http.post("/sms/config/update",t)}static delete(t){return http.post("/sms/config/delete",t)}static send(t){return http.post("/sms/config/send",t)}}class M{static time(t){return http.post("/app/time",t)}static upload(t){return http.post({url:"/app/upload",headers:{"Content-Type":"multipart/form-data"}},t)}}class G{static list(t){return http.post("/system/config/list",t)}static create(t){return http.post("/system/config/create",t)}static update(t){return http.post("/system/config/update",t)}static delete(t){return http.post("/system/config/delete",t)}}class Z{static list(t){return http.post("/tenant/list",t)}static create(t){return http.post("/tenant/create",t)}static update(t){return http.post("/tenant/update",t)}static delete(t){return http.post("/tenant/delete",t)}}const I={ERouter:{change:"",reload:""}};Object.keys(I).forEach(a=>{const t=I[a];Object.keys(t).forEach(l=>{I[a][l]=`${a}_${l}`})});const z=I.ERouter,x=e.reactive({load:()=>{x.loginInfo=Cookie.get("loginInfo")||{},x.userInfo=x.loginInfo.userInfo||{},x.token=Cookie.get("token")},loginInfo:{},userInfo:{},token:null,setUserInfo:a=>{x.loginInfo=a,x.userInfo=a.userInfo,x.token=a.token,Cookie.set("loginInfo",a),Cookie.set("token",a.token)},updateUserInfo:a=>{x.userInfo={...x.userInfo,...a},x.loginInfo.userInfo=x.userInfo,Cookie.set("loginInfo",x.loginInfo)},clearInfo:()=>{x.token=null,x.userInfo={},x.loginInfo={},_.setMenuList([],[]),_.setApiList([]),Cookie.remove("loginInfo"),Cookie.remove("token"),Cookie.remove("menuList"),Cookie.remove("apiList")},hasApi:a=>x.loginInfo.roleInfo.apiList.includes(a)});class E{static baseUrl="";static init(){const t=(o,n,...s)=>{n.forEach(i=>{o[i]&&o[i](...s)})},l=(o,n,s)=>{let i=s?.data?.code||o,c=s?.data.message;n.data.toast?n.data.toast(i,s,n):f.TSys.fail(g.i18n.t(`code.${i}`,{msg:c||"请求异常"})||g.i18n.t("code.OtherException")),t(n.data,["final","fail","complete"],o==200,n,s),i==401&&(x.clearInfo(),n.data.toLogin?.()!==!1&&f.TSys.router.replace("/login"))};http.setConfig({base:E.baseUrl,before(o){o.param.headers=o.param.headers||{},Object.keys(o.data).forEach(s=>{(o.data[s]===void 0||o.data[s]===null)&&delete o.data[s]});const n=x.token||"";n&&(o.param.headers.Token=n)},after(o,n){const{code:s}=o.data;if(s!=200){n.res=o.data,o.status=s;return}t(n.data,["final","success","complete"],o.data,n,o)},error:l})}}class g{static env;static i18n;static elementLocale;static staticDir;static config;static setConfig(t){const l={website:{recordNumber:"ICP备000000000号-1",author:"Copyright © 2022-2025 Design By Veigar"},staticDir:"/static_admin"};this.config=ObjectUtil.deepMerge(l,t),this.env=this.config.env,this.i18n=this.config.i18n,this.staticDir=this.config.staticDir,this.elementLocale=this.config.elementLocale,E.baseUrl=this.env.API}static getBaseUrl(t){return t=E.baseUrl.replace("/api","/")+t,t=t.replace(/(?<!:)\/{2,}/g,"/"),t}}const X=a=>{const t=JSONUtil.cp(a),l=o=>t.filter(s=>{let i=s.parentId;return s.parentId.includes(",")&&(i=s.parentId.split(",").pop()),i===o}).map(s=>({...s,children:l(s._id)})).sort((s,i)=>s.sort-i.sort);return l("0")},_=e.reactive({getTableTree:X,auth:{list:["/api/system/list","/api/system/detail"],isPass:a=>_.auth.list.includes(a)},load:()=>{_.menuListSource=JSONUtil.cp(Cookie.get("menuList"))},layout:{collapse:!1},menuListSource:[],menuList:[],setMenuList:(a,t)=>{_.menuList=a,_.menuListSource=JSONUtil.cp(t),Cookie.set("menuList",t)},getMenuList:async()=>{let a=Cookie.get("menuList");_.menuListSource=JSONUtil.cp(a);try{if(StrUtil.isNull(a)||(a=a),StrUtil.isNull(a))return f.TSys.router.push("/login"),[];let t=X(a);return _.setMenuList(t,a),JSONUtil.cp(_.menuList)}catch{f.TSys.router.push("/login")}return JSONUtil.cp(_.menuList)},apiList:[],setApiList:a=>{_.apiList=a,Cookie.set("apiList",_.apiList)},getApiList:async()=>{let a=Cookie.get("apiList");try{return StrUtil.isNull(a)||(a=a),StrUtil.isNull(a)?(f.TSys.router.push("/login"),[]):(_.setApiList(a),_.apiList)}catch{f.TSys.router.push("/login")}return _.apiList},upload:{handler:a=>{const t=document.createElement("input");t.type="file",t.accept=a.accept||"image/*",t.multiple=a.multiple||!1,t.onchange=async l=>{const o=l.target.files[0];if(o){const n=await M.upload({file:o});a.callback(n.data),a.toast,f.TSys.success("上传成功")}else a.callback("")},t.click()}},preview:{show:!1,srcList:[],index:0,open:(a,t=0)=>{_.preview.index=t,_.preview.srcList=a.map(l=>g.getBaseUrl(l)),_.preview.show=!0}}}),ce=e.defineComponent({name:"App",__name:"App",setup(a){const t=e.reactive({locale:g.elementLocale,show:!0,reload:()=>{t.show=!1,e.nextTick(()=>{t.show=!0})}});return CEvent.on(z.reload,t.reload),(l,o)=>{const n=e.resolveComponent("x-route-event"),s=e.resolveComponent("router-view"),i=e.resolveComponent("el-image-viewer"),c=e.resolveComponent("el-config-provider");return e.openBlock(),e.createBlock(c,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(n),e.createVNode(s),e.unref(_).preview.show?(e.openBlock(),e.createBlock(i,{key:0,"url-list":e.unref(_).preview.srcList,"initial-index":e.unref(_).preview.index,onClose:o[0]||(o[0]=r=>e.unref(_).preview.show=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0)]),_:1},8,["locale"])}}}),V=e.reactive({findOptions:(a,t)=>{const l=a.column.find(n=>n.key===t),o=n=>n.replace(/-([a-z])/g,(s,i)=>i.toUpperCase());if(l)return l.options[o(l.type)]},setOptionsData:(a,t,l)=>{const o=V.findOptions(a,t);o&&(o.data=l)},form:{openBefore:{parentId:(a,t,l,o)=>{a?t.type===f.TSys.EDialog.Add?(t.form.parentId=a._id,t.form.sort=a.children.length+1,t.form._id=void 0):t.form.parentId=a.parentId.substring(a.parentId.lastIndexOf(",")+1):(t.form.parentId="0",t.form.sort=l.length+1),V.setOptionsData(o,"parentId",[{_id:"0",title:"根",children:l}])}}}}),T=e.reactive({baseUrl:"",reset:()=>{},store:{},getStore(a){return T.store[a]},getDateOptions:(a=!0)=>{const t=[];a&&t.push({label:g.i18n.t("dateOptions.AllDates"),value:null,key:"all"}),t.push({label:g.i18n.t("dateOptions.Today"),value:TimeUtil.somedayse(),key:"today"}),t.push({label:g.i18n.t("dateOptions.Yesterday"),value:TimeUtil.somedayse(-1),key:"yesterday"});const l=new Date,o=TimeUtil.somedayse,n=l.getDay(),s=o(1-n)[0],i=o(7-n)[1],c={label:g.i18n.t("dateOptions.ThisWeek"),value:[s,i],key:"thisWeek"};t.push(c);const r=o(1-n-7)[0],p=o(7-n-7)[1],u={label:g.i18n.t("dateOptions.LastWeek"),value:[r,p],key:"lastWeek"};t.push(u);const d=new Date;d.setDate(1);const h=o(0,d);d.setMonth(d.getMonth()+1),d.setDate(1),d.setDate(d.getDate()-1);const m=o(0,d),b={label:g.i18n.t("dateOptions.ThisMonth"),value:[h[0],m[1]],key:"thisMonth"};return t.push(b),t}}),R=e.reactive({getVf:(a,t,l)=>{const o={};l===void 0&&(l=R.inputVal);for(const n in t)o[n]=s=>{a[n]=null,l({val:s.target.value,after:i=>{a[n]=i},...t[n]})};return o},inputVal:a=>{let{val:t,length:l,trim:o=!0,fixed:n=2,min:s=0,max:i=1e9}=a;o&&(t=t.replace(/\s+|\s+$/g,""));const c={int:r=>(r=r.replace(/[^\d]/g,""),r=Number(r)||0,r=s&&r<s?s:r,r=i&&r>i?i:r,r),float:r=>(r=r.replace(/^0(\d)/,"$1").replace(/^\./,"0").replace(/[^\d.]/g,"").replace(/^(\d*\.?\d*).*$/,"$1").replace(new RegExp(`^(\\d+)\\.(\\d{${n}}).*`),"$1.$2"),r),hanzi:r=>(r=r.replace(/[^\u4e00-\u9fa5]/g,""),r),Num:"0-9",En:"a-zA-Z",Hanzi:"一-龥"};if(t.length){l&&t.length>l&&(t=t.substring(0,l));const r=[],p=[],u=(d,h,m)=>{d===h?Array.isArray(a[d])?m.push(...a[d]):m.push(a[d]):m.push(c[d.substring(3)])};Object.keys(a).forEach(d=>{d.startsWith("get")?u(d,"getCustom",r):d.startsWith("del")?u(d,"delCustom",p):c[d]&&(t=c[d](t))}),r.length&&(t=t.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),p.length&&(t=t.replace(new RegExp(`[${p.join("")}]`,"g"),""))}return a.after(t),t}}),de={install:a=>{const t=Cookie.clear.bind(Cookie);Cookie.clear=async(l,o)=>{l=l||{},l.excludeList=l.excludeList||[],l.excludeList.push("apiurl"),await t(l,o)}}},pe={install:a=>{L.Scope.CEventBean=CEventBean,L.Scope.TimerBean=TimerBean}};let O={},D={};const me={install:a=>{a.use(se),O=Cookie.get("iconObj")||{},D=Cookie.get("siconObj")||{},VConf.vicon.fun.getRes=async t=>O[t],VConf.vicon.fun.setRes=(t,l)=>{O[t]=l,Cookie.set("iconObj",O)},VConf.vsicon.url=g.staticDir+"/vicon/svg",VConf.vsicon.lib="",VConf.vsicon.fun.getRes=async t=>D[t],VConf.vsicon.fun.setRes=(t,l)=>{D[t]=l,Cookie.set("siconObj",D)}}},ue={style:{border:"1px solid #ccc"}},fe=e.defineComponent({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(a,{emit:t}){const l=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Editor)),o=e.defineAsyncComponent(()=>f.TSys.loadModule("editor").then(d=>d.Toolbar)),n=a,s=t,i=e.shallowRef(),c=e.ref(n.modelValue);e.watch(c,d=>{s("update:modelValue",d)});const r={excludeKeys:["group-video"]},p={placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(d,h){const m=await M.upload({file:d});m.data=g.getBaseUrl(m.data),h(m.data,"",m.data),s("update:modelValue",c.value)}}}};e.onBeforeUnmount(()=>{const d=i.value;d?.destroy()});const u=d=>{i.value=d};return(d,h)=>(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(e.unref(o),{style:{"border-bottom":"1px solid #ccc"},editor:i.value,defaultConfig:r,mode:"default"},null,8,["editor"]),e.createVNode(e.unref(l),{style:{height:"500px","overflow-y":"hidden"},modelValue:c.value,"onUpdate:modelValue":h[0]||(h[0]=m=>c.value=m),defaultConfig:p,mode:"default",onOnCreated:u},null,8,["modelValue"])]))}}),he={install:a=>{const t={activeValue:1,inactiveValue:0,activeText:"启用",inactiveText:"禁用",inlinePrompt:!0,tableConfig:{loadList:!1}};f.TForm.error.callback=(l,o)=>"必填",f.TFormConfig.setConfig({dialog:{delete:{content:'确定要执行删除操作吗,删除后<span style="color: red;">无法进行恢复</span>'}},size:{table:"default",form:"default",search:"default"},pagination:{size:20,pageSizes:[20,50,100,500],layout:"total, sizes, prev, pager, next, jumper"},table:{index:!0},tools:{export:{dropdown:!1}},columnConfig:{options:{switch:t,datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"},baseupload:{table:{showOverflowTooltip:!1}},basegroup:{dataApiConfig:{once:!0,init:!1,update:!0}},formAdd:{switch:t},formUpdate:{switch:t},search:{datetime:{startPlaceholder:"开始时间",endPlaceholder:"结束时间"}}}}}),a.use(f,{customComponent:{xEditor:fe}})}},_e={install:a=>{a.use(de),a.use(pe),a.use(me),a.use(he)}},ye=()=>{const a=r=>r.replace(/\/index$/,"");let t=Object.assign({"/src/views/error/index.vue":()=>Promise.resolve().then(()=>$e),"/src/views/layout/index.vue":()=>Promise.resolve().then(()=>We),"/src/views/login/index.vue":()=>Promise.resolve().then(()=>Qe),"/src/views/pages/auth/api/index.vue":()=>Promise.resolve().then(()=>ve),"/src/views/pages/auth/menu/index.vue":()=>Promise.resolve().then(()=>bt),"/src/views/pages/auth/role/index.vue":()=>Promise.resolve().then(()=>wt),"/src/views/pages/auth/user/index.vue":()=>Promise.resolve().then(()=>xt),"/src/views/pages/db/index.vue":()=>Promise.resolve().then(()=>Ct),"/src/views/pages/email/config/index.vue":()=>Promise.resolve().then(()=>Vt),"/src/views/pages/home/index.vue":()=>Promise.resolve().then(()=>Et),"/src/views/pages/log/error/index.vue":()=>Promise.resolve().then(()=>Bt),"/src/views/pages/log/loginlog/index.vue":()=>Promise.resolve().then(()=>Lt),"/src/views/pages/profile/index.vue":()=>Promise.resolve().then(()=>Pt),"/src/views/pages/schedule/job/index.vue":()=>Promise.resolve().then(()=>It),"/src/views/pages/sms/config/index.vue":()=>Promise.resolve().then(()=>Ot),"/src/views/pages/system/config/index.vue":()=>Promise.resolve().then(()=>Dt),"/src/views/pages/system/tenant/index.vue":()=>Promise.resolve().then(()=>At)});if(!g.config.routes){f.TSys.fail("router.routes is required");return}Object.keys(g.config.routes).forEach(r=>{t[r]=g.config.routes[r]});const l={},o=["light","dark"],n="light",s="dark";Object.keys(t).forEach(r=>{o.forEach(p=>{n!=p&&(new RegExp(`^/src/views/${p}`).test(r)||(l[r]=t[r]),new RegExp(`^/src/views/${s}`).test(r)&&t[r])})});const i=L.CRouter.init({modules:l,children:[{path:"/layout",component:"/layout",childrenReg:["^/pages"]}],setInfoHook(r){r.meta={title:r.path}},mapKeyPathHook(r){return a(r)},pathHook(r){return a(r).replace(/^\/pages/,"")}}),c=F.createRouter({history:F.createWebHashHistory(),routes:[...i.array,{path:"/",redirect:"/home"},{path:"/:matchOthers(.*)*",redirect:"/error"}]});return f.TSys.router=c,f.TSys.routes=i.array,g.config.routeHook?.(c),c};T.store={ssys:_,suser:x,sutil:T,svf:R,scurd:V};const ge=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].reset?.()})},be=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].load?.()})},we=async()=>{be()};T.reset=ge;class xe{static async init(t){t.use(_e),t.use(g.i18n),await g.i18n.setLang(),we(),E.init();const l=ye();t.use(l),l.isReady().then(async()=>{t.mount("#app")})}}const B=e.createApp(ce),ke=async a=>{g.setConfig(a),await g.config.install?.(B),B.use(window.ElementPlus,g.config.elementPlus||{});const t=await Promise.resolve().then(()=>Mt);B.use(t),await xe.init(B),g.config.installed?.(B)},Ce={style:{background:"#7395ff",width:"100vw",height:"100vh"}},Ve={class:"nfsystem"},Ne=["src"],Te={class:"nftitle"},Se=e.defineComponent({__name:"index",setup(a){const t=()=>{f.TSys.router.push("/")};return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",Ve,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/404.png"},null,8,Ne),e.createElementVNode("div",Te,[o[2]||(o[2]=e.createElementVNode("h2",null,"页面走丢了...",-1)),o[3]||(o[3]=e.createElementVNode("h4",null,"远方的朋友你好!非常抱歉,您所请求的页面不存在!",-1)),o[4]||(o[4]=e.createElementVNode("h4",null,"请仔细检查您输入的网址是否正确。",-1)),e.createVNode(n,{type:"warning",onClick:o[0]||(o[0]=s=>t()),style:{width:"220px"}},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("返回主页",-1)])),_:1,__:[1]})])])])}}}),S=(a,t)=>{const l=a.__vccOpts||a;for(const[o,n]of t)l[o]=n;return l},$e=Object.freeze(Object.defineProperty({__proto__:null,default:S(Se,[["__scopeId","data-v-29641492"]])},Symbol.toStringTag,{value:"Module"})),Ee={class:"header row no-wrap"},Be={class:"header-right"},Le={class:"header-user-con"},Pe={class:"el-dropdown-link row items-center"},Ie={class:"user-avator"},Oe=["src"],De=S(e.defineComponent({__name:"Header",setup(a){const t=e.reactive({layout:_.layout,message:2}),l=()=>{t.layout.collapse=!t.layout.collapse};e.onMounted(()=>{document.body.clientWidth<1500&&l()});const o=n=>{n=="loginout"?(x.clearInfo(),f.TSys.router.push("/login")):n=="user"&&f.TSys.router.push("/profile")};return(n,s)=>{const i=e.resolveComponent("v-icon"),c=e.resolveComponent("el-dropdown-item"),r=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",{class:"collapse-btn",onClick:l},[e.createVNode(i,{name:"menu",size:"32",color:["#34B0E5"],style:e.normalizeStyle([{transition:"all 0.3s"},{transform:`rotateZ(${t.layout.collapse?90:0}deg)`}])},null,8,["style"])]),s[2]||(s[2]=e.createElementVNode("i",{class:"el-icon-lx-redpacket_fill",style:{"font-size":"30px",color:"#ff5900"}},null,-1)),s[3]||(s[3]=e.createElementVNode("div",{class:"logo col"},"后台管理",-1)),e.createElementVNode("div",Be,[e.createElementVNode("div",Le,[e.createVNode(p,{class:"user-name",trigger:"click",onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(c,{command:"user"},{default:e.withCtx(()=>s[0]||(s[0]=[e.createTextVNode("个人中心",-1)])),_:1,__:[0]}),e.createVNode(c,{divided:"",command:"loginout"},{default:e.withCtx(()=>s[1]||(s[1]=[e.createTextVNode("退出登录",-1)])),_:1,__:[1]})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",Pe,[e.createTextVNode(e.toDisplayString(e.unref(x).userInfo.nickname)+" ",1),e.createElementVNode("div",Ie,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg"},null,8,Oe)])])]),_:1})])])])}}}),[["__scopeId","data-v-d5ae6f3f"]]),Ae={class:"flex items-center vicon"},je={class:"flex items-center vicon"},Ue=S(e.defineComponent({__name:"Sidebar",setup(a){const t=e.reactive({layout:_.layout,menu:[]}),l=async()=>{let s=await _.getMenuList();const i=c=>c.filter(r=>(r.type===0&&(r.url="/"+StrUtil.getId()),StrUtil.isNull(r.children)||(r.children=i(r.children)),r.show));s=i(s),t.menu=s};e.onMounted(()=>{l()});const o=e.computed(()=>f.TSys.router.currentRoute.value.path),n=s=>{o.value!==s&&window.innerWidth<900&&Timer.once(()=>{t.layout.collapse=!t.layout.collapse},300)};return(s,i)=>{const c=e.resolveComponent("v-icon"),r=e.resolveComponent("el-menu-item"),p=e.resolveComponent("el-sub-menu"),u=e.resolveComponent("el-menu"),d=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sidebar",[t.layout.collapse?"sidebar-hideen":"sidebar-show"]])},[e.createVNode(d,{height:"100%",style:{"background-color":"#324157"}},{default:e.withCtx(()=>[e.createVNode(u,{class:"sidebar-el-menu","default-active":o.value,collapse:t.layout.collapse,"text-color":"#bfcbd9","active-text-color":"#20a0ff","unique-opened":"",router:"",onSelect:n},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menu,h=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.children&&h.children?.length>0?(e.openBlock(),e.createBlock(p,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])]),e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.children,m=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.children&&m.children?.length>0?(e.openBlock(),e.createBlock(p,{key:0,index:m.url},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.children,(b,k)=>(e.openBlock(),e.createBlock(r,{key:k,index:b.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.title),1)]),_:2},1032,["index"]))),128))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(r,{key:1,index:m.url},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["index"]))],64))),256))]),_:2},1032,["index"])):(e.openBlock(),e.createBlock(r,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createVNode(c,{lib:h.iconLib,name:h.iconName,size:"24",color:["#1890ff"]},null,8,["lib","name"])])]),_:2},1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse"])]),_:1})],2)}}}),[["__scopeId","data-v-ac094262"]]),Me={style:{display:"flex",height:"calc(100% - 70px)"}},ze={class:"content"},Re={class:"view"},Fe={class:"row flex-center",style:{gap:"10px","font-size":"12px"}},We=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({keepAlive:["/auth/role","/auth/api"]});return(l,o)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(De),e.createElementVNode("div",Me,[e.createVNode(Ue),e.createElementVNode("div",ze,[e.createElementVNode("div",null,[e.createElementVNode("div",Re,[e.createVNode(n,null,{default:e.withCtx(({Component:s})=>[e.createVNode(e.Transition,{name:"slide-fade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{include:t.keepAlive},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s),{key:l.$route.fullPath}))],1032,["include"]))]),_:2},1024)]),_:1}),e.createElementVNode("div",Fe,[e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.recordNumber),1)])])])])])],64)}}}),[["__scopeId","data-v-7d2c2356"]])},Symbol.toStringTag,{value:"Module"})),qe=["id"],He=e.defineComponent({__name:"index",setup(a){const t=StrUtil.getId(),l=e.reactive({boxid:"canvas_snow-"+t,itemid:"canvas_sakura-"+t});let o;const n=()=>{const s=document.getElementById(l.boxid);if(s){const i=s.getBoundingClientRect();innerHeight=i.height,innerWidth=i.width;let c=document.getElementById(l.itemid);c.width=innerWidth,c.height=innerHeight}};return e.onMounted(()=>{const s=document.getElementById(l.boxid).getBoundingClientRect();let i=s.height,c=s.width,r=new Image;r.src=g.staticDir+"/bg/yh.png";let p=function(m,b,k,w,N){this.x=m,this.y=b,this.s=k,this.r=w,this.fn=N};p.prototype.draw=function(m){m.save(),m.translate(this.x,this.y),m.rotate(this.r),m.drawImage(r,0,0,40*this.s,40*this.s),m.restore()},p.prototype.update=function(){this.x=this.fn.x(this.x,this.y),this.y=this.fn.y(this.y,this.y),this.r=this.fn.r(this.r),(this.x>c||this.x<0||this.y>i||this.y<0)&&(this.r=d("fnr"),Math.random()>.4?(this.x=d("x"),this.y=0,this.s=d("s"),this.r=d("r")):(this.x=c,this.y=d("y"),this.s=d("s"),this.r=d("r")))};let u=function(){this.list=[]};u.prototype.push=function(m){this.list.push(m)},u.prototype.update=function(){for(let m=0,b=this.list.length;m<b;m++)this.list[m].update()},u.prototype.draw=function(m){for(let b=0,k=this.list.length;b<k;b++)this.list[b].draw(m)},u.prototype.get=function(m){return this.list[m]},u.prototype.size=function(){return this.list.length};function d(m){let b,k;switch(m){case"x":b=Math.random()*c;break;case"y":b=Math.random()*i;break;case"s":b=Math.random();break;case"r":b=Math.random()*6;break;case"fnx":k=-.5+Math.random()*1,b=function(w,N){return w+.5*k-1.7};break;case"fny":k=1.5+Math.random()*.7,b=function(w,N){return N+k};break;case"fnr":k=Math.random()*.03,b=function(w){return w+k};break}return b}function h(){let m=document.createElement("canvas"),b;m.height=i,m.width=c,m.setAttribute("style","position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"),m.setAttribute("id",l.itemid),document.getElementById(l.boxid).appendChild(m),b=m.getContext("2d");let k=new u;for(let w=0;w<50;w++){let N,C,ee,te,oe,ne,le,ae;C=d("x"),ee=d("y"),oe=d("r"),te=d("s"),ne=d("fnx"),le=d("fny"),ae=d("fnr"),N=new p(C,ee,te,oe,{x:ne,y:le,r:ae}),N.draw(b),k.push(N)}o=function(){b.clearRect(0,0,m.width,m.height),k.update(),k.draw(b),requestAnimationFrame(o)},requestAnimationFrame(o)}r.onload=function(){h()},window.addEventListener("resize",n)}),e.onUnmounted(()=>{window.removeEventListener("resize",n),window.cancelAnimationFrame(o);let s=document.getElementById(l.itemid);s?.parentNode?.removeChild(s)}),(s,i)=>(e.openBlock(),e.createElementBlock("div",{id:l.boxid},null,8,qe))}}),Ke={class:"absolute fit"},Je={class:"login-icp"},Ye={class:"ms-login"},Ge={class:"row no-wrap",style:{width:"100%"}},Ze={class:"row no-wrap",style:{width:"100%"}},Xe={class:"login-btn"},Qe=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{isPhone:!1,login_name:"",login_password:"",phone:"",code:""},textCode:{loading:!1,text:"发送验证码",status:!1},rules:{login_name:[{required:!0,message:"请输入用户名",trigger:"blur"}],login_password:[{required:!0,message:"请输入密码",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},loading:!1,text:"登录"});x.clearInfo();const l=e.ref(),o=()=>{l.value.validate(async c=>{if(c){let r=t.param.isPhone?{phone:t.param.phone,code:t.param.code}:{account:t.param.login_name,password:t.param.login_password};t.loading=!0,t.text="加载中";const p=await $.login({...r,final(d,h,m){t.loading=!1,t.text="登录"}});x.setUserInfo(p.data);let u=_.getTableTree(p.data.roleInfo.menuList);_.setMenuList(u,p.data.roleInfo.menuList),_.setApiList(p.data.roleInfo.apiList),f.TSys.router.push("/")}})};let n=null;const s=c=>{Timer.un(n),StrUtil.isNull(c)&&(c=parseInt(Cookie.get("codeTime"))),!StrUtil.isNull(c)&&(t.textCode.status=!1,n=Timer.on(()=>{let r=new Date().getTime();if(r-c>0)t.textCode.status=!1,Timer.un(n),t.textCode.text="发送验证码";else{t.textCode.status=!0;const p=(c-r)/1e3;t.textCode.text=p.toFixed(0)+"秒后再试"}},1e3,!0))},i=async()=>{const c=await q.send({type:1,content:"1518079148@qq.com"});console.log("res",c)};return e.onMounted(()=>{s()}),(c,r)=>{const p=e.resolveComponent("el-button"),u=e.resolveComponent("el-input"),d=e.resolveComponent("el-form-item"),h=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",{class:"login-wrap",style:e.normalizeStyle({backgroundImage:`url(${e.unref(g).staticDir+"/bg/g-1.jpg"})`})},[e.createElementVNode("div",Ke,[e.createVNode(He,{class:"fit"})]),e.createElementVNode("div",Je,[e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.author),1),e.createElementVNode("div",null,e.toDisplayString(e.unref(g).config.website.recordNumber),1)]),e.createElementVNode("div",Ye,[r[9]||(r[9]=e.createElementVNode("div",{class:"ms-title"},"系统登陆",-1)),e.createVNode(h,{model:t.param,rules:t.rules,ref_key:"login",ref:l,"label-width":"0px",class:"ms-content"},{default:e.withCtx(()=>[t.param.isPhone?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{prop:"phone"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.phone,"onUpdate:modelValue":r[3]||(r[3]=m=>t.param.phone=m),placeholder:"手机号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"code"},{default:e.withCtx(()=>[e.createElementVNode("div",Ze,[e.createVNode(u,{placeholder:"验证码",modelValue:t.param.code,"onUpdate:modelValue":r[4]||(r[4]=m=>t.param.code=m),onKeyup:r[5]||(r[5]=e.withKeys(m=>o(),["enter","native"])),class:"input-phone"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue"]),e.createVNode(p,{loading:t.textCode.loading,disabled:t.textCode.status,type:"primary",onClick:r[6]||(r[6]=m=>i()),style:{"border-radius":"0px 4px 4px 0px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.textCode.text),1)]),_:1},8,["loading","disabled"])])]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(d,{prop:"login_name"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.param.login_name,"onUpdate:modelValue":r[0]||(r[0]=m=>t.param.login_name=m),placeholder:"账号"},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-people"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(d,{prop:"login_password"},{default:e.withCtx(()=>[e.createElementVNode("div",Ge,[e.createVNode(u,{type:"password",placeholder:"密码",modelValue:t.param.login_password,"onUpdate:modelValue":r[1]||(r[1]=m=>t.param.login_password=m),onKeyup:r[2]||(r[2]=e.withKeys(m=>o(),["enter","native"])),class:e.normalizeClass([t.param.isPhone?"input-phone":void 0])},{default:e.withCtx(()=>[e.createVNode(p,{slot:"prepend",icon:"el-icon-lx-lock"})]),_:1},8,["modelValue","class"])])]),_:1})],64)),e.createElementVNode("div",Xe,[e.createVNode(p,{type:"primary",onClick:r[7]||(r[7]=m=>o()),loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),_:1},8,["loading"]),e.createElementVNode("div",{style:{color:"#ffffff","font-size":"14px","margin-top":"10px",cursor:"pointer"},onClick:r[8]||(r[8]=m=>t.param.isPhone=!t.param.isPhone)}," 切换"+e.toDisplayString(t.param.isPhone?"账号":"验证码")+"登录 ",1)])]),_:1},8,["model","rules"])])],4)}}}),[["__scopeId","data-v-9b624341"]])},Symbol.toStringTag,{value:"Module"})),ve=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],option:{api:P,search:{show:!1},data(l){return t.data=_.getTableTree(l),t.data},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",table:{width:"250px",align:"left"},rules:!0},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"接口",value:1}]}}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},form:{span:12}},{key:"url",label:"地址",type:"select",value:"",rules:!0,show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12}}],form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),o.type===f.TSys.EDialog.Add&&(l.title="");const n=await t.api.getList();V.setOptionsData(t.option,"url",n.map(s=>({label:s.path,value:s.path})))}},tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}},api:{list:[],getList:async()=>{if(t.api.list.length)return t.api.list;f.TSys.loading(!0);const l=await P.all({final(o,n,s){f.TSys.loading(!1)}});return t.api.list=l.data,t.api.list}}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:i})=>[i.type===0?(e.openBlock(),e.createBlock(n,{key:0,type:"success"},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("目录",-1)])),_:1,__:[0]})):(e.openBlock(),e.createBlock(n,{key:1,type:"warning"},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("接口",-1)])),_:1,__:[1]}))]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),et=e.defineComponent({__name:"addIconItem",props:{isbig:{default:!1},el:{default:{}},lib:{default:""},color:{default:""},nofill:{default:!1}},setup(a){const t=e.ref({}),l=e.reactive({show:!1,observer:{}});return e.onMounted(()=>{l.observer=new IntersectionObserver((o,n)=>{o.forEach(s=>{l.show=s.isIntersecting})},{threshold:0}),l.observer.observe(t.value)}),e.onUnmounted(()=>{l.observer.disconnect()}),(o,n)=>{const s=e.resolveComponent("VIcon");return e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle({minHeight:a.isbig?"40px":"20px"}),ref_key:"_dom",ref:t},[l.show?(e.openBlock(),e.createBlock(s,{key:0,lib:a.lib,name:a.el.name,size:a.isbig?40:20,color:a.color,nofill:a.nofill},null,8,["lib","name","size","color","nofill"])):e.createCommentVNode("",!0)],4)}}}),tt={class:"row items-center",style:{gap:"10px"}},ot=["onUpdate:modelValue"],nt=e.defineComponent({__name:"colorChoose",props:{colors:{default:[]},length:{default:6}},emits:["update:colors"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({color:[]});for(let r=0;r<l.length;r++)n.color.push({value:l.colors[r]||"#000000"});const s=()=>o("update:colors",n.color.map(r=>r.value));s();const i=L.Scope.Timer();let c=null;return e.watch(()=>n.color,()=>{i.un(c),c=i.once(()=>{s()},100)},{deep:!0}),(r,p)=>(e.openBlock(),e.createElementBlock("div",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.color,(u,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"color","onUpdate:modelValue":h=>n.color[d].value=h},null,8,ot)),[[e.vModelText,n.color[d].value]])),256))]))}}),lt={class:"row items-center",style:{height:"60px",overflow:"auto"}},at={class:"row items-center",style:{gap:"10px",margin:"15px 0"}},st={class:"row items-center",style:{gap:"10px","margin-bottom":"15px"}},it={class:"row items-center"},rt={class:"flex items-center",style:{"margin-bottom":"10px"}},ct={style:{"margin-left":"10px"}},dt={key:0,class:"row"},pt=["onClick"],mt={style:{width:"0px"},class:"flex flex-center"},ut={style:{"text-wrap":"nowrap"}},ft={class:"dialog-footer"},ht=S(e.defineComponent({__name:"addDialog",props:{show:{default:!1},iconName:{default:"home"},iconLib:{default:"ant"},iconFill:{default:[]}},emits:["close","update:show"],setup(a,{emit:t}){const l=a;e.watch(()=>l.show,()=>{n.show=l.show,n.show&&n.open()});const o=t,n=e.reactive({libs:[],lib:"",size:0,nofill:!1,isbig:!1,getlibs:async()=>{if(n.libs.length)return;const s=VConf.vicon,i=`${s.url}/_keys.json`;let c=await s.fun.getRes(i);c||(c=await s.fun.getResorce(i,!0));const r=`${s.url}/_size.json`;let p=await s.fun.getRes(r);p||(p=await s.fun.getResorce(r,!0)),n.size=p.num,n.libs=c},init:()=>{n.lib=l.iconLib||"ant",n.item.lib=l.iconLib||"ant",n.item.name=l.iconName||"home",n.color.length=0,n.color.push(...l.iconFill)},changeLib:()=>{n.open(!1)},list:{},title:"选择图标",findName:"",color:[],item:{lib:"",name:""},show:!1,showIcon:!1,open:async(s=!0)=>{f.TSys.loading(!0);const i=VConf.vicon;await n.getlibs(),s&&n.init(),n.showIcon=!1;const c=n.lib,r=`${i.url}/${c}/_all.json`;if(n.list[c]||(n.list[c]=[]),n.list[c].length){e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1);return}let p=await i.fun.getRes(r);p||(p=await i.fun.getResorce(r,!0));const u=Object.keys(p);n.list[c]=[];for(let d=0;d<u.length;d++)n.list[c].push({name:u[d]});e.nextTick(()=>{n.showIcon=!0}),f.TSys.loading(!1)},choose:async s=>{n.item.lib=n.lib,n.item.name=s.name,await StrUtil.copyText(`${n.lib}-${s.name}`)},close:()=>{n.show=!1},closeItem:()=>{o("close",{lib:n.item.lib,name:n.item.name,color:n.color}),n.close()}});return e.watch(()=>n.show,()=>{o("update:show",n.show)}),(s,i)=>{const c=e.resolveComponent("el-radio"),r=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-input"),u=e.resolveComponent("el-switch"),d=e.resolveComponent("el-tooltip"),h=e.resolveComponent("VIcon"),m=e.resolveComponent("el-scrollbar"),b=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(k,{modelValue:n.show,"onUpdate:modelValue":i[5]||(i[5]=w=>n.show=w),title:n.title,"close-on-click-modal":!1,style:{width:"950px"},"z-index":1e4},{footer:e.withCtx(()=>[e.createElementVNode("span",ft,[e.createVNode(b,{onClick:n.close},{default:e.withCtx(()=>i[15]||(i[15]=[e.createTextVNode("关闭",-1)])),_:1,__:[15]},8,["onClick"]),e.createVNode(b,{type:"primary",onClick:n.closeItem},{default:e.withCtx(()=>i[16]||(i[16]=[e.createTextVNode("确定",-1)])),_:1,__:[16]},8,["onClick"])])]),default:e.withCtx(()=>[e.createElementVNode("div",lt,[e.createVNode(r,{modelValue:n.lib,"onUpdate:modelValue":i[0]||(i[0]=w=>n.lib=w),onChange:n.changeLib},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.libs,w=>(e.openBlock(),e.createBlock(c,{value:w,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])]),e.createElementVNode("div",at,[i[6]||(i[6]=e.createElementVNode("div",null,"条件:",-1)),e.createVNode(p,{modelValue:n.findName,"onUpdate:modelValue":i[1]||(i[1]=w=>n.findName=w),style:{width:"160px"},placeholder:"查找"},null,8,["modelValue"]),i[7]||(i[7]=e.createElementVNode("div",null,"当前可选图标库数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.libs.length)+"个 ",1),i[8]||(i[8]=e.createElementVNode("div",null,"当前可选图标数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.size)+"个 ",1),i[9]||(i[9]=e.createElementVNode("div",null,"总大小:",-1)),i[10]||(i[10]=e.createTextVNode(" 43.49M ",-1))]),e.createElementVNode("div",st,[i[13]||(i[13]=e.createElementVNode("div",null,"放大:",-1)),e.createVNode(u,{modelValue:n.isbig,"onUpdate:modelValue":i[2]||(i[2]=w=>n.isbig=w)},null,8,["modelValue"]),e.createVNode(d,{effect:"dark",content:"开启时使用图标库上传时的颜色示例:chroma、chromab、bank等多色图标库",placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",it,[i[11]||(i[11]=e.createElementVNode("div",null,"颜色控制:",-1)),e.createVNode(u,{modelValue:n.nofill,"onUpdate:modelValue":i[3]||(i[3]=w=>n.nofill=w)},null,8,["modelValue"])])]),_:1}),!n.nofill&&n.showIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[i[12]||(i[12]=e.createElementVNode("div",null,"颜色:",-1)),e.createVNode(nt,{colors:n.color,"onUpdate:colors":i[4]||(i[4]=w=>n.color=w)},null,8,["colors"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",rt,[i[14]||(i[14]=e.createElementVNode("div",null,"当前选中:",-1)),e.createVNode(h,{lib:n.item.lib,name:n.item.name,color:n.color},null,8,["lib","name","color"]),e.createElementVNode("div",ct,e.toDisplayString(n.item.lib)+"-"+e.toDisplayString(n.item.name),1)]),e.createVNode(m,{"max-height":"400px"},{default:e.withCtx(()=>[n.showIcon?(e.openBlock(),e.createElementBlock("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list[n.lib],w=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!n.findName||w.name.indexOf(n.findName)!=-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist column flex-center",onClick:N=>n.choose(w),style:e.normalizeStyle({background:w.name===n.item.name&&n.lib===n.item.lib?"#c8ebff":void 0,height:n.isbig?"80px":"60px",width:n.isbig?"180px":"90px"})},[e.createVNode(et,{isbig:n.isbig,el:w,color:n.color,nofill:n.nofill,lib:n.lib},null,8,["isbig","el","color","nofill","lib"]),e.createElementVNode("div",mt,[e.createElementVNode("div",ut,e.toDisplayString(w.name),1)])],12,pt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b9c727d4"]]),_t={class:"flex flex-center"},yt={class:"row"},gt=["onClick"],bt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.reactive({routers:[],initRouters:()=>{t.routers=[];const l=(o,n)=>{o.forEach(s=>{if(s.path){let i=s.path.split("/:")[0];i.length&&n.push({path:i,label:i,value:i})}s.children&&l(s.children,n)})};l(f.TSys.routes,t.routers)},icon:{visible:!1,current:null,form:{iconName:"",iconLib:"",iconFill:["#1890ff"]},show(l){t.icon.current=l,t.icon.visible=!0},select(l){t.icon.current.iconLib=l.lib,t.icon.current.iconName=l.name,t.icon.current.iconFill=l.color}},data:[],option:{api:A,data(l){return t.data=_.getTableTree(l),t.data},form:{openBefore:async(l,o)=>{V.form.openBefore.parentId(l.title?l:null,o,t.data,t.option),V.setOptionsData(t.option,"url",t.routers),o.type===f.TSys.EDialog.Add&&(l.title="")},submitBefore(l,o){l.iconName?.length||(l.iconLib="",l.iconName="",l.iconFill=[])}},search:{show:!1},table:{border:!0,index:!1,add:l=>l?.type===0,operate:{width:160}},page:{show:!1},column:[{key:"parentId",label:"父级",type:"treeSelect",value:"0",form:{span:12},options:{treeSelect:{data:[],multiple:!1}},show:{table:!1}},{key:"title",label:"名称",type:"input",value:"",rules:!0,sort:{table:1}},{key:"type",label:"类型",type:"select",value:0,options:{select:{clearable:!1,data:[{label:"目录",value:0},{label:"路由",value:1}]}},sort:{table:2}},{key:"icon",label:"图标",type:"input",value:"",sort:{table:3}},{key:"show",label:"显示",type:"switch",value:1,show:{table:!1}},{key:"url",label:"地址",type:"select",rules:!0,value:"",show:{form:l=>l.type===1},options:{select:{filterable:!0,data:[]}},table:{minWidth:"250px",align:"left"},form:{span:12},sort:{table:4}},{key:"sort",label:"排序",type:"input",value:0,table:{width:"80px",align:"center"},sort:{table:5}},{key:"desc",label:"备注",type:"input",value:"",show:{table:!1}}],tools:{add:l=>l===void 0?!0:l.type===0,update:!0,delete:!0,export:{show:!1},expand:!0}}});return t.initRouters(),(l,o)=>{const n=e.resolveComponent("VIcon"),s=e.resolveComponent("el-tag"),i=e.resolveComponent("el-switch"),c=e.resolveComponent("el-button"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"table-icon":e.withCtx(({row:p})=>[e.createElementVNode("div",_t,[p.iconName?(e.openBlock(),e.createBlock(n,{key:0,lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"18"},null,8,["lib","name","color"])):e.createCommentVNode("",!0)])]),"table-type":e.withCtx(({row:p})=>[e.createVNode(s,{type:p.type===0?"warning":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.type===0?"目录":"路由"),1)]),_:2},1032,["type"])]),"form-show":e.withCtx(({row:p,item:u})=>[p.type===1?(e.openBlock(),e.createBlock(i,{key:0,modelValue:p[u.key],"onUpdate:modelValue":d=>p[u.key]=d,"active-value":1,"inactive-value":0},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),"form-icon":e.withCtx(({row:p,item:u})=>[e.createElementVNode("div",yt,[e.createVNode(c,{style:{"margin-right":"16px"},onClick:d=>t.icon.show(p)},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("选择图标",-1)])),_:2,__:[1]},1032,["onClick"]),p.iconName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iconlist",onClick:d=>p.iconName=""},[e.createVNode(n,{lib:p.iconLib,name:p.iconName,color:p.iconFill,size:"26"},null,8,["lib","name","color"])],8,gt)):e.createCommentVNode("",!0)])]),"tools-right":e.withCtx(()=>[e.createVNode(ht,{iconName:t.icon.form.iconName,iconLib:t.icon.form.iconLib,iconFill:t.icon.form.iconFill,show:t.icon.visible,"onUpdate:show":o[0]||(o[0]=p=>t.icon.visible=p),onClose:t.icon.select},null,8,["iconName","iconLib","iconFill","show","onClose"])]),_:1},8,["option"])}}}),[["__scopeId","data-v-72a09943"]])},Symbol.toStringTag,{value:"Module"})),wt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({menuList:[],apiList:[],roleList:[],option:{api:j,data(l){return t.roleList=l,l},search:{show:!1},table:{border:!0},page:{show:!1},tools:{export:{show:!1}},column:[{key:"title",label:"名称",type:"input",value:"",rules:!0},{key:"type",label:"角色标识",type:"input",value:"",rules:!0},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}}},{key:"sort",label:"排序",type:"input",value:0,form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"menuList",label:"菜单列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}},{key:"apiList",label:"接口列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4,checkStrictly:!1}},show:{table:!1},form:{span:12}}],form:{openBefore:async(l,o)=>{if(l||(o.form.sort=t.roleList.length+1),t.menuList.length===0){f.TSys.loading();let n=await A.list({final(s,i,c){f.TSys.loading(!1)}});t.menuList=_.getTableTree(n.data),n=await P.list({final(s,i,c){f.TSys.loading(!1)}}),t.apiList=_.getTableTree(n.data)}V.setOptionsData(t.option,"menuList",t.menuList),V.setOptionsData(t.option,"apiList",t.apiList),V.setOptionsData(t.option,"roleList",t.roleList)}}}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),xt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],roleList:[],resetLoading:{},option:{api:$,data(o){return o},form:{openBefore:async(o,n)=>{if(t.roleList.length===0){f.TSys.loading();let s=await j.list({final(i,c,r){f.TSys.loading(!1)}});console.log("res.data",s.data),t.roleList=s.data}V.setOptionsData(t.option,"roleList",t.roleList)}},search:{show:!1},table:{selectable:!0,border:!0,operate:{width:210}},tools:{export:{fileName:()=>`用户列表_${new Date().getTime()}`}},column:[{key:"account",label:"账号",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"status",label:"状态",type:"switch",value:1,options:{switch:{activeValue:1,activeLabel:"启用",inactiveValue:0,inactiveLabel:"禁用"}},sort:{table:2},form:{span:12}},{key:"nickname",label:"昵称",type:"input",value:"",sort:{table:1},form:{span:12}},{key:"phone",label:"手机号",type:"input",value:"",sort:{table:3},form:{span:12}},{key:"desc",label:"简介",type:"input",value:"",show:{table:!1},form:{span:12}},{key:"roleList",label:"角色列表",type:"treeSelect",value:[],options:{treeSelect:{data:[],multiple:!0,collapseTags:!0,maxCollapseTags:4}},show:{table:!1},form:{span:12}}]}}),l=async o=>{try{await W.ElMessageBox.confirm(`确定将账号“${o.account}”的密码重置为 123456 吗?`,"重置密码",{type:"warning",confirmButtonText:"确定重置",cancelButtonText:"取消"})}catch{return}t.resetLoading[o._id]=!0;try{await $.resetPassword({_id:o._id}),f.TSys.success("密码已重置为 123456")}finally{t.resetLoading[o._id]=!1}};return(o,n)=>{const s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"table-op-left":e.withCtx(({row:c})=>[e.createVNode(s,{link:"",type:"primary",loading:t.resetLoading[c._id],onClick:r=>l(c)},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode(" 重置密码 ",-1)])),_:2,__:[0]},1032,["loading","onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"}));class Q{static export(t){return http.post("/db/export",t)}static import(t){return http.post({url:"/db/import",headers:{"Content-Type":"multipart/form-data"}},t)}}const kt={class:"row"},Ct=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({import:()=>{const l=document.createElement("input");l.type="file",l.accept=".json,application/json",l.onchange=async o=>{const n=o.target.files[0];if(!n)return;const s=new FileReader;s.onload=async i=>{try{await Q.import({file:n}),f.TSys.success("导入覆盖成功")}catch(c){console.error("上传的文件不是合法JSON",c)}},s.readAsText(n)},l.click()},export:async()=>{const{data:l}=await Q.export();f.TSys.success("备份成功"+l,{duration:3e3})}});return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(n,{onClick:t.export},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("备份数据",-1)])),_:1,__:[0]},8,["onClick"]),e.createVNode(n,{onClick:t.import},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("导入覆盖",-1)])),_:1,__:[1]},8,["onClick"])])}}})},Symbol.toStringTag,{value:"Module"})),Vt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{host:"1518079148@qq.com"},option:{api:K,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`邮件配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.secure=o[n.secure],n.enabled=o[n.enabled]})}}},column:[{key:"host",label:"SMTP地址",type:"input",value:"",show:{search:!0}},{key:"port",label:"SMTP端口",type:"input",value:""},{key:"user",label:"SMTP邮箱",type:"input",value:"",show:{search:!0}},{key:"pass",label:"SMTP密码",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"secure",label:"SSL加密",type:"switch",value:1},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12},rules:!0}]},email:{async send(){await http.post("/email/send",{to:t.param.host,title:"测试邮件标题",content:"测试邮件内容666"}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.host,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.host=c),placeholder:"邮件地址",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.email.send},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("发送邮件测试",-1)])),_:1,__:[1]},8,["onClick"])]),"table-host":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.host),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Nt={class:"user-info"},Tt=["src"],St={class:"user-info-cont"},$t={class:"user-info-name"},Et=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){return(t,l)=>{const o=e.resolveComponent("el-card"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(s,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(o,{shadow:"hover",class:"mgb20"},{default:e.withCtx(()=>[e.createElementVNode("div",Nt,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg",class:"user-avator",alt:""},null,8,Tt),e.createElementVNode("div",St,[e.createElementVNode("div",$t,e.toDisplayString(e.unref(x).userInfo.nickname),1),e.createElementVNode("div",null,"欢迎"+e.toDisplayString(e.unref(x).userInfo.nickname)+"进入后台管理",1)])]),l[0]||(l[0]=e.createElementVNode("div",{class:"user-info-list"},[e.createElementVNode("div",{class:"user-info-list-item"},[e.createElementVNode("div",{class:"user-info-list-item-label"},"欢迎使用后台管理系统,左侧导航栏可快速访问各模块")])],-1))]),_:1,__:[0]})]),_:1})]),_:1})}}}),[["__scopeId","data-v-28a63a57"]])},Symbol.toStringTag,{value:"Module"})),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=(o,n="内容")=>{W.ElMessageBox.alert(`<div style="white-space: pre-wrap; width: 1000px; word-break: break-all;">${o}</div>`,n,{confirmButtonText:"确定",dangerouslyUseHTMLString:!0})},l=e.reactive({option:{api:J,data(o){return o.forEach(n=>{n.createTime=new Date(n.createTime).Format()}),o},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"status",label:"状态码",type:"input",value:"",table:{width:"100px"}}]},tools:{add:!1,update:!1,export:{fileName:()=>`错误日志_${new Date().getTime()}`}},column:[{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0},table:{width:"120px",align:"left"}},{key:"path",label:"请求路径",type:"input",value:"",show:{search:!0},table:{minWidth:"180px",align:"left"}},{key:"method",label:"请求方法",type:"select",value:"",show:{search:!0},table:{minWidth:"100px"},options:{select:{data:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]}}},{key:"params",label:"请求参数",type:"input",value:"",table:{slot:!0}},{key:"userAgent",label:"用户代理",type:"input",value:""},{key:"error",label:"错误信息",type:"input",value:"",show:{search:!0},table:{minWidth:"140px"}},{key:"stack",label:"错误堆栈",type:"input",value:"",table:{show:!1}}]}});return(o,n)=>{const s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:l.option},{"table-params":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.params,"请求参数")},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode("查看",-1)])),_:2,__:[0]},1032,["onClick"])]),"table-userAgent":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.userAgent,"用户代理")},{default:e.withCtx(()=>n[1]||(n[1]=[e.createTextVNode("查看",-1)])),_:2,__:[1]},1032,["onClick"])]),"table-stack":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:r=>t(c.stack,"错误堆栈")},{default:e.withCtx(()=>n[2]||(n[2]=[e.createTextVNode("查看",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Lt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:H,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.status=o.status?"成功":"失败"}),l},table:{selectable:!0,column:[{key:"createTime",label:"登录时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{add:!1,update:!1,delete(l){return x.hasApi("/auth/loginLog/delete")},export:{fileName:()=>`登录日志_${new Date().getTime()}`}},column:[{key:"account",label:"登录账号",type:"input",value:"",show:{search:!0}},{key:"ip",label:"IP地址",type:"input",value:"",show:{search:!0}},{key:"os",label:"操作系统",type:"input",value:""},{key:"status",label:"登录状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeLabel:"成功",inactiveLabel:"失败"}}},{key:"msg",label:"失败原因",type:"input",value:""}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-status":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.status==="成功"?"success":"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.status),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Pt=Object.freeze(Object.defineProperty({__proto__:null,default:S(e.defineComponent({__name:"index",setup(a){const t=e.ref(),l=e.ref(),o=e.reactive({activeTab:"profile",profileLoading:!1,passwordLoading:!1,profile:{account:"",nickname:"",phone:"",desc:""},password:{oldPassword:"",newPassword:"",confirmPassword:""}}),n={nickname:[{required:!0,message:"请输入昵称",trigger:"blur"},{max:100,message:"昵称不能超过 100 个字符",trigger:"blur"}],phone:[{validator:(p,u,d)=>{!u||/^1\d{10}$/.test(u)?d():d(new Error("请输入正确的手机号"))},trigger:"blur"}]},s={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,message:"新密码至少 6 位",trigger:"blur"}],confirmPassword:[{required:!0,message:"请再次输入新密码",trigger:"blur"},{validator:(p,u,d)=>{u===o.password.newPassword?d():d(new Error("两次输入的密码不一致"))},trigger:"blur"}]},i=async()=>{o.profileLoading=!0;try{const p=await $.profile();Object.assign(o.profile,{account:p.data.account||"",nickname:p.data.nickname||"",phone:p.data.phone||"",desc:p.data.desc||""})}finally{o.profileLoading=!1}},c=async()=>{if(await t.value?.validate().catch(()=>!1)){o.profileLoading=!0;try{const p=await $.updateProfile({nickname:o.profile.nickname,phone:o.profile.phone,desc:o.profile.desc});Object.assign(o.profile,p.data),x.updateUserInfo(p.data),f.TSys.success("个人信息修改成功")}finally{o.profileLoading=!1}}},r=async()=>{if(await l.value?.validate().catch(()=>!1)){o.passwordLoading=!0;try{await $.changePassword({oldPassword:o.password.oldPassword,newPassword:o.password.newPassword}),f.TSys.success("密码修改成功,请重新登录"),x.clearInfo(),await f.TSys.router.replace("/login")}finally{o.passwordLoading=!1}}};return e.onMounted(i),(p,u)=>{const d=e.resolveComponent("el-input"),h=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-button"),b=e.resolveComponent("el-form"),k=e.resolveComponent("el-tab-pane"),w=e.resolveComponent("el-tabs"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"profile-card",shadow:"never"},{header:e.withCtx(()=>u[8]||(u[8]=[e.createElementVNode("div",{class:"card-title"},"个人中心",-1)])),default:e.withCtx(()=>[e.createVNode(w,{modelValue:o.activeTab,"onUpdate:modelValue":u[7]||(u[7]=C=>o.activeTab=C)},{default:e.withCtx(()=>[e.createVNode(k,{label:"个人信息",name:"profile"},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"profileFormRef",ref:t,model:o.profile,rules:n,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"账号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.account,"onUpdate:modelValue":u[0]||(u[0]=C=>o.profile.account=C),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"昵称",prop:"nickname"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.nickname,"onUpdate:modelValue":u[1]||(u[1]=C=>o.profile.nickname=C),maxlength:"100","show-word-limit":""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.phone,"onUpdate:modelValue":u[2]||(u[2]=C=>o.profile.phone=C),maxlength:"11",placeholder:"请输入手机号"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"个人简介",prop:"desc"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.profile.desc,"onUpdate:modelValue":u[3]||(u[3]=C=>o.profile.desc=C),type:"textarea",rows:4,maxlength:"1000","show-word-limit":"",placeholder:"请输入个人简介"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.profileLoading,onClick:c},{default:e.withCtx(()=>u[9]||(u[9]=[e.createTextVNode("保存修改",-1)])),_:1,__:[9]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1}),e.createVNode(k,{label:"修改密码",name:"password"},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"passwordFormRef",ref:l,model:o.password,rules:s,"label-width":"90px",class:"profile-form"},{default:e.withCtx(()=>[e.createVNode(h,{label:"原密码",prop:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.oldPassword,"onUpdate:modelValue":u[4]||(u[4]=C=>o.password.oldPassword=C),type:"password","show-password":"",autocomplete:"current-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"新密码",prop:"newPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.newPassword,"onUpdate:modelValue":u[5]||(u[5]=C=>o.password.newPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"确认密码",prop:"confirmPassword"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.password.confirmPassword,"onUpdate:modelValue":u[6]||(u[6]=C=>o.password.confirmPassword=C),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1}),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(m,{type:"primary",loading:o.passwordLoading,onClick:r},{default:e.withCtx(()=>u[10]||(u[10]=[e.createTextVNode("修改密码",-1)])),_:1,__:[10]},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),[["__scopeId","data-v-b691a248"]])},Symbol.toStringTag,{value:"Module"})),It=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Y,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.lastTime=o.lastTime?new Date(Number(o.lastTime)).Format():"-"}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}},{key:"lastTime",label:"最后执行时间",type:"input",value:"",table:{width:"180px"}}]},tools:{export:{fileName:()=>`定时任务_${new Date().getTime()}`,before(l){const o={0:"正常",1:"暂停"},n={0:"允许",1:"禁止"};l.data.forEach(s=>{s.status=o[s.status],s.concurrent=n[s.concurrent]})}}},column:[{key:"name",label:"任务名称",type:"input",value:"",show:{search:!0},rules:!0},{key:"group",label:"任务组",type:"input",value:"",show:{search:!0},rules:!0},{key:"cron",label:"Cron表达式",type:"input",value:"",rules:!0},{key:"target",label:"调用目标",type:"input",value:"",rules:!0},{key:"params",label:"参数",type:"input",value:""},{key:"status",label:"启用状态",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},null,8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ot=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{phone:"",code:"123456"},option:{api:U,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{width:"180px"},sort:{table:1}}]},tools:{export:{fileName:()=>`短信配置_${new Date().getTime()}`,before(l){const o={1:"是",0:"否"};l.data.forEach(n=>{n.enabled=o[n.enabled]})}}},column:[{key:"provider",label:"短信服务商",type:"select",value:"",show:{search:!0},options:{select:{data:[{label:"阿里云",value:"ALIYUN"},{label:"腾讯云",value:"TENCENT"}]}}},{key:"accessKeyId",label:"AccessKey",type:"input",value:""},{key:"accessKeySecret",label:"Secret",type:"input",value:"",disabled:{update:!0},show:{table:!1}},{key:"signName",label:"短信签名",type:"input",value:""},{key:"templateId",label:"短信模板ID",type:"input",value:""},{key:"sdkAppId",label:"应用ID",type:"input",value:""},{key:"signId",label:"签名ID",type:"input",value:""},{key:"enabled",label:"启用状态",type:"switch",value:0,show:{search:!0}},{key:"desc",label:"备注",type:"input",value:"",update:{span:12}}]},sms:{async send(){if(!t.param.phone){f.TSys.success("请输入手机号码");return}await U.send({phone:t.param.phone,templateParam:{code:t.param.code}}),f.TSys.success("发送成功")}}});return(l,o)=>{const n=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"tools-right":e.withCtx(()=>[e.createVNode(n,{modelValue:t.param.phone,"onUpdate:modelValue":o[0]||(o[0]=c=>t.param.phone=c),placeholder:"手机号码",style:{width:"150px"}},null,8,["modelValue"]),e.createVNode(n,{modelValue:t.param.code,"onUpdate:modelValue":o[1]||(o[1]=c=>t.param.code=c),placeholder:"验证码",style:{width:"100px"}},null,8,["modelValue"]),e.createVNode(s,{type:"danger",onClick:t.sms.send},{default:e.withCtx(()=>o[2]||(o[2]=[e.createTextVNode("发送短信测试",-1)])),_:1,__:[2]},8,["onClick"])]),"table-provider":e.withCtx(({row:c})=>[e.createTextVNode(e.toDisplayString(c.provider==="ALIYUN"?"阿里云":"腾讯云"),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:G,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format()}),l},table:{selectable:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"}},{key:"updateTime",label:"更新时间",type:"input",value:"",table:{minWidth:"180px"}}]},tools:{export:{fileName:()=>`系统配置_${new Date().getTime()}`}},column:[{key:"key",label:"配置键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupKey",label:"分组键",type:"input",value:"",show:{search:!0},rules:!0},{key:"groupValue",label:"分组名称",type:"input",value:"",rules:!0},{key:"system",label:"系统内置",type:"switch",value:0,show:{search:!0},options:{switch:{activeValue:1,inactiveValue:0,activeLabel:"是",inactiveLabel:"否"}}},{key:"desc",label:"配置说明",type:"input",value:"",form:{span:12}},{key:"value",label:"配置值",type:"input",value:"",rules:!0,table:{showOverflowTooltip:!0},form:{span:12},options:{input:{type:"textarea"}}}]}});return(l,o)=>{const n=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(n,{option:t.option},{"table-value":e.withCtx(({row:s})=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({option:{api:Z,data(l){return l.forEach(o=>{o.createTime=new Date(o.createTime).Format(),o.updateTime=new Date(o.updateTime).Format(),o.expireTime&&(o.expireTime=new Date(o.expireTime))}),l},table:{border:!0,column:[{key:"createTime",label:"创建时间",type:"input",value:"",table:{minWidth:"180px"},sort:{table:99}}]},tools:{export:{fileName:()=>`租户管理_${new Date().getTime()}`,before:l=>{l.data.forEach(o=>{o.expireTime&&(o.expireTime=new Date(o.expireTime).Format())})}}},column:[{key:"name",label:"租户名称",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:1}},{key:"code",label:"租户编码",type:"input",value:"",rules:!0,show:{search:!0},sort:{table:2}},{key:"type",label:"租户类型",type:"select",value:1,options:{select:{data:[{label:"单库多租户",value:1},{label:"多库多租户",value:2}]}},rules:!0,show:{search:!0},sort:{table:3}},{key:"domain",label:"域名",type:"input",value:"",rules:!0,show:{table:!1,search:!0},sort:{table:4}},{key:"expireTime",label:"过期时间",type:"datetime",value:new Date,table:{minWidth:"180px"},sort:{table:100}},{key:"contactName",label:"联系人",type:"input",value:"",sort:{table:7}},{key:"contactPhone",label:"联系电话",type:"input",value:"",sort:{table:8}},{key:"dbUrl",label:"数据库连接",type:"input",value:"",rules:!0,show:{form:l=>l.type===2,table:!1}}]}});return(l,o)=>{const n=e.resolveComponent("el-tag"),s=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(s,{option:t.option},{"table-type":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.type===1?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.type===1?"单库多租户":"多库多租户"),1)]),_:2},1032,["type"])]),"table-expireTime":e.withCtx(({row:i})=>[e.createVNode(n,{type:i.expireTime<new Date().getTime()?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(new Date(i.expireTime).Format()),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),jt=e.defineComponent({__name:"index",props:{row:{default:{}},field:{default:"value"},itemFields:{default:[]},imgField:{default:""}},emits:["change"],setup(a,{emit:t}){const l=a,o=t,n=e.reactive({upload:{handler:s=>{_.upload.handler({callback:i=>{s[l.imgField]=i,o("change")}})}}});return(s,i)=>{const c=e.resolveComponent("el-button"),r=e.resolveComponent("TFormList");return e.openBlock(),e.createBlock(r,{row:a.row,field:a.field,itemFields:a.itemFields,onChange:i[0]||(i[0]=p=>o("change",p))},{"item-end":e.withCtx(({item:p})=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>n.upload.handler(p)},{default:e.withCtx(()=>i[1]||(i[1]=[e.createTextVNode("上传图片",-1)])),_:2,__:[1]},1032,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"item-end",{item:p},()=>[a.imgField?(e.openBlock(),e.createBlock(c,{key:0,link:"",type:"primary",onClick:u=>e.unref(_).preview.open(a.row[a.field].map(d=>d[a.imgField]),a.row[a.field].findIndex(d=>d[a.imgField]===p[a.imgField]))},{default:e.withCtx(()=>i[2]||(i[2]=[e.createTextVNode(" 查看图片 ",-1)])),_:2,__:[2]},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["row","field","itemFields"])}}}),Ut=e.defineComponent({__name:"index",setup(a){return e.watch(()=>f.TSys.router.currentRoute.value.path,(t,l)=>{CEvent.emit(z.change,t)},{immediate:!0}),(t,l)=>null}}),v=a=>{a.component("xRouteEvent",Ut),a.component("xFormList",jt)},Mt=Object.freeze(Object.defineProperty({__proto__:null,default:{install:v},install:v},Symbol.toStringTag,{value:"Module"}));y.ApiApp=M,y.ApiAuthApi=P,y.ApiAuthMenu=A,y.ApiAuthPhone=ie,y.ApiAuthRole=j,y.ApiAuthUser=$,y.ApiCaptcha=q,y.ApiCron=re,y.ApiEmailConfig=K,y.ApiErrorLog=J,y.ApiJob=Y,y.ApiLoginLog=H,y.ApiSmsConfig=U,y.ApiSystemConfig=G,y.ApiSystemTenant=Z,y.ERouter=z,y.System=g,y.initApp=ke,y.scurd=V,y.ssys=_,y.suser=x,y.sutil=T,y.svf=R,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/utils/System.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type App } from 'vue';
|
|
2
|
+
import type { Router } from 'vue-router';
|
|
2
3
|
export default class System {
|
|
3
4
|
/**
|
|
4
5
|
* 环境变量
|
|
@@ -62,10 +63,16 @@ export default class System {
|
|
|
62
63
|
* ])
|
|
63
64
|
*/
|
|
64
65
|
routes: Record<string, () => Promise<unknown>>;
|
|
66
|
+
/** 路由处理钩子 */
|
|
67
|
+
routeHook: (router: Router) => any;
|
|
65
68
|
/**
|
|
66
69
|
* 初始化回调
|
|
67
70
|
*/
|
|
68
71
|
install: (app: App) => any;
|
|
72
|
+
/**
|
|
73
|
+
* 初始化结束回调
|
|
74
|
+
*/
|
|
75
|
+
installed: (app: App) => any;
|
|
69
76
|
};
|
|
70
77
|
static setConfig(config: any): void;
|
|
71
78
|
static getBaseUrl(url: string): string;
|