cc1-admin-front 1.0.5 → 1.0.6

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.
@@ -1,10 +1,10 @@
1
1
  import "./cc1-admin-front.css";
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";
2
+ import { reactive as C, defineComponent as j, nextTick as D, resolveComponent as k, openBlock as _, createBlock as U, withCtx as N, createVNode as O, unref as y, createCommentVNode as M, defineAsyncComponent as T, shallowRef as W, ref as z, watch as B, onBeforeUnmount as H, 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
- import { Scope as S, CRouter as Z } from "cc1-vue3";
4
+ import { CRouter as Z } from "cc1-vue3";
5
5
  import G from "cc1-ui";
6
6
  import { createRouter as Q, createWebHashHistory as X } from "vue-router";
7
- class xt {
7
+ class It {
8
8
  static all(t) {
9
9
  return http.post("/auth/api/all", t);
10
10
  }
@@ -21,7 +21,7 @@ class xt {
21
21
  return http.post("/auth/api/delete", t);
22
22
  }
23
23
  }
24
- class At {
24
+ class Ot {
25
25
  static list(t) {
26
26
  return http.post("/auth/menu/list", t);
27
27
  }
@@ -35,12 +35,12 @@ class At {
35
35
  return http.post("/auth/menu/delete", t);
36
36
  }
37
37
  }
38
- class Ot {
38
+ class _t {
39
39
  static sendCode(t) {
40
40
  return http.post("/auth/phone/sendCode", { phone: t });
41
41
  }
42
42
  }
43
- class _t {
43
+ class Et {
44
44
  static list(t) {
45
45
  return http.post("/auth/role/list", t);
46
46
  }
@@ -62,7 +62,7 @@ class _t {
62
62
  return http.post("/auth/role/delete", t);
63
63
  }
64
64
  }
65
- class It {
65
+ class Ut {
66
66
  static list(t) {
67
67
  return http.post("/auth/user/list", t);
68
68
  }
@@ -91,7 +91,7 @@ class It {
91
91
  return http.post("/auth/user/login", t);
92
92
  }
93
93
  }
94
- class Et {
94
+ class Tt {
95
95
  static send(t) {
96
96
  return http.post("/captcha/send", t);
97
97
  }
@@ -99,7 +99,7 @@ class Et {
99
99
  return http.post("/captcha/verify", t);
100
100
  }
101
101
  }
102
- class Tt {
102
+ class St {
103
103
  static list(t) {
104
104
  return http.post("/auth/loginLog/list", t);
105
105
  }
@@ -107,7 +107,7 @@ class Tt {
107
107
  return http.post("/auth/loginLog/delete", t);
108
108
  }
109
109
  }
110
- class Ut {
110
+ class Vt {
111
111
  static list(t) {
112
112
  return http.post(
113
113
  {
@@ -136,7 +136,7 @@ class Ut {
136
136
  );
137
137
  }
138
138
  }
139
- class St {
139
+ class jt {
140
140
  static list(t) {
141
141
  return http.post("/email/config/list", t);
142
142
  }
@@ -150,7 +150,7 @@ class St {
150
150
  return http.post("/email/config/delete", t);
151
151
  }
152
152
  }
153
- class Vt {
153
+ class Rt {
154
154
  static list(t) {
155
155
  return http.post("/log/error/list", t);
156
156
  }
@@ -158,7 +158,7 @@ class Vt {
158
158
  return http.post("/log/error/delete", t);
159
159
  }
160
160
  }
161
- class jt {
161
+ class $t {
162
162
  static list(t) {
163
163
  return http.post("/schedule/job/list", t);
164
164
  }
@@ -178,7 +178,7 @@ class jt {
178
178
  return http.post("/schedule/job/changeStatus", t);
179
179
  }
180
180
  }
181
- class Rt {
181
+ class Pt {
182
182
  static list(t) {
183
183
  return http.post("/sms/config/list", t);
184
184
  }
@@ -211,7 +211,7 @@ class R {
211
211
  );
212
212
  }
213
213
  }
214
- class $t {
214
+ class Dt {
215
215
  static list(t) {
216
216
  return http.post("/system/config/list", t);
217
217
  }
@@ -225,7 +225,7 @@ class $t {
225
225
  return http.post("/system/config/delete", t);
226
226
  }
227
227
  }
228
- class Dt {
228
+ class Nt {
229
229
  static list(t) {
230
230
  return http.post("/tenant/list", t);
231
231
  }
@@ -239,7 +239,7 @@ class Dt {
239
239
  return http.post("/tenant/delete", t);
240
240
  }
241
241
  }
242
- const O = {
242
+ const I = {
243
243
  ERouter: {
244
244
  /**
245
245
  * 路由改变
@@ -251,13 +251,13 @@ const O = {
251
251
  reload: ""
252
252
  }
253
253
  };
254
- Object.keys(O).forEach((e) => {
255
- const t = O[e];
254
+ Object.keys(I).forEach((e) => {
255
+ const t = I[e];
256
256
  Object.keys(t).forEach((s) => {
257
- O[e][s] = `${e}_${s}`;
257
+ I[e][s] = `${e}_${s}`;
258
258
  });
259
259
  });
260
- const tt = O.ERouter, p = y({
260
+ const tt = I.ERouter, p = C({
261
261
  load: () => {
262
262
  p.loginInfo = Cookie.get("loginInfo") || {}, p.userInfo = p.loginInfo.userInfo || {}, p.token = Cookie.get("token");
263
263
  },
@@ -275,30 +275,30 @@ const tt = O.ERouter, p = y({
275
275
  },
276
276
  hasApi: (e) => p.loginInfo.roleInfo.apiList.includes(e)
277
277
  });
278
- class k {
278
+ class L {
279
279
  static baseUrl = "";
280
280
  static init() {
281
- const t = (o, r, ...a) => {
281
+ const t = (o, r, ...n) => {
282
282
  r.forEach((l) => {
283
- o[l] && o[l](...a);
283
+ o[l] && o[l](...n);
284
284
  });
285
- }, s = (o, r, a) => {
286
- let l = a?.data?.code || o, d = a?.data.message;
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"));
285
+ }, s = (o, r, n) => {
286
+ let l = n?.data?.code || o, d = n?.data.message;
287
+ r.data.toast ? r.data.toast(l, n, r) : h.fail(u.i18n.t(`code.${l}`, { msg: d || "请求异常" }) || u.i18n.t("code.OtherException")), t(r.data, ["final", "fail", "complete"], o == 200, r, n), l == 401 && (p.clearInfo(), r.data.toLogin?.() !== !1 && h.router.replace("/login"));
288
288
  };
289
289
  http.setConfig({
290
- base: k.baseUrl,
290
+ base: L.baseUrl,
291
291
  before(o) {
292
- o.param.headers = o.param.headers || {}, Object.keys(o.data).forEach((a) => {
293
- (o.data[a] === void 0 || o.data[a] === null) && delete o.data[a];
292
+ o.param.headers = o.param.headers || {}, Object.keys(o.data).forEach((n) => {
293
+ (o.data[n] === void 0 || o.data[n] === null) && delete o.data[n];
294
294
  });
295
295
  const r = p.token || "";
296
296
  r && (o.param.headers.Token = r);
297
297
  },
298
298
  after(o, r) {
299
- const { code: a } = o.data;
300
- if (a != 200) {
301
- r.res = o.data, o.status = a;
299
+ const { code: n } = o.data;
300
+ if (n != 200) {
301
+ r.res = o.data, o.status = n;
302
302
  return;
303
303
  }
304
304
  t(r.data, ["final", "success", "complete"], o.data, r, o);
@@ -333,23 +333,23 @@ class u {
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, k.baseUrl = this.env.API;
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, L.baseUrl = this.env.API;
337
337
  }
338
338
  static getBaseUrl(t) {
339
- return t = k.baseUrl.replace("/api", "/") + t, t = t.replace(/(?<!:)\/{2,}/g, "/"), t;
339
+ return t = L.baseUrl.replace("/api", "/") + t, t = t.replace(/(?<!:)\/{2,}/g, "/"), t;
340
340
  }
341
341
  }
342
- const V = (e) => {
343
- const t = JSONUtil.cp(e), s = (o) => t.filter((a) => {
344
- let l = a.parentId;
345
- return a.parentId.includes(",") && (l = a.parentId.split(",").pop()), l === o;
346
- }).map((a) => ({
347
- ...a,
348
- children: s(a._id)
349
- })).sort((a, l) => a.sort - l.sort);
342
+ const S = (e) => {
343
+ const t = JSONUtil.cp(e), s = (o) => t.filter((n) => {
344
+ let l = n.parentId;
345
+ return n.parentId.includes(",") && (l = n.parentId.split(",").pop()), l === o;
346
+ }).map((n) => ({
347
+ ...n,
348
+ children: s(n._id)
349
+ })).sort((n, l) => n.sort - l.sort);
350
350
  return s("0");
351
- }, c = y({
352
- getTableTree: V,
351
+ }, c = C({
352
+ getTableTree: S,
353
353
  auth: {
354
354
  list: ["/api/system/list", "/api/system/detail"],
355
355
  isPass: (e) => c.auth.list.includes(e)
@@ -377,7 +377,7 @@ const V = (e) => {
377
377
  try {
378
378
  if (StrUtil.isNull(e) || (e = e), StrUtil.isNull(e))
379
379
  return h.router.push("/login"), [];
380
- let t = V(e);
380
+ let t = S(e);
381
381
  return c.setMenuList(t, e), JSONUtil.cp(c.menuList);
382
382
  } catch {
383
383
  h.router.push("/login");
@@ -424,35 +424,35 @@ const V = (e) => {
424
424
  name: "App",
425
425
  __name: "App",
426
426
  setup(e) {
427
- const t = y({
427
+ const t = C({
428
428
  locale: u.elementLocale,
429
429
  show: !0,
430
430
  reload: () => {
431
- t.show = !1, P(() => {
431
+ t.show = !1, D(() => {
432
432
  t.show = !0;
433
433
  });
434
434
  }
435
435
  });
436
436
  return CEvent.on(tt.reload, t.reload), (s, o) => {
437
- const r = L("x-route-event"), a = L("router-view"), l = L("el-image-viewer"), d = L("el-config-provider");
438
- return I(), T(d, {
437
+ const r = k("x-route-event"), n = k("router-view"), l = k("el-image-viewer"), d = k("el-config-provider");
438
+ return _(), U(d, {
439
439
  locale: t.locale
440
440
  }, {
441
441
  default: N(() => [
442
- _(r),
443
- _(a),
444
- C(c).preview.show ? (I(), T(l, {
442
+ O(r),
443
+ O(n),
444
+ y(c).preview.show ? (_(), U(l, {
445
445
  key: 0,
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)
446
+ "url-list": y(c).preview.srcList,
447
+ "initial-index": y(c).preview.index,
448
+ onClose: o[0] || (o[0] = (i) => y(c).preview.show = !1)
449
449
  }, null, 8, ["url-list", "initial-index"])) : M("", !0)
450
450
  ]),
451
451
  _: 1
452
452
  }, 8, ["locale"]);
453
453
  };
454
454
  }
455
- }), E = y({
455
+ }), E = C({
456
456
  /**
457
457
  * 查找组件对应的options配置
458
458
  * @param option
@@ -460,7 +460,7 @@ const V = (e) => {
460
460
  * @returns
461
461
  */
462
462
  findOptions: (e, t) => {
463
- const s = e.column.find((r) => r.key === t), o = (r) => r.replace(/-([a-z])/g, (a, l) => l.toUpperCase());
463
+ const s = e.column.find((r) => r.key === t), o = (r) => r.replace(/-([a-z])/g, (n, l) => l.toUpperCase());
464
464
  if (s)
465
465
  return s.options[o(s.type)];
466
466
  },
@@ -488,7 +488,7 @@ const V = (e) => {
488
488
  }
489
489
  }
490
490
  }
491
- }), v = y({
491
+ }), v = C({
492
492
  /**
493
493
  * 请求根地址
494
494
  */
@@ -515,9 +515,9 @@ const V = (e) => {
515
515
  value: TimeUtil.somedayse(-1),
516
516
  key: "yesterday"
517
517
  });
518
- const s = /* @__PURE__ */ new Date(), o = TimeUtil.somedayse, r = s.getDay(), a = o(1 - r)[0], l = o(7 - r)[1], d = {
518
+ const s = /* @__PURE__ */ new Date(), o = TimeUtil.somedayse, r = s.getDay(), n = o(1 - r)[0], l = o(7 - r)[1], d = {
519
519
  label: u.i18n.t("dateOptions.ThisWeek"),
520
- value: [a, l],
520
+ value: [n, l],
521
521
  key: "thisWeek"
522
522
  };
523
523
  t.push(d);
@@ -527,18 +527,18 @@ const V = (e) => {
527
527
  key: "lastWeek"
528
528
  };
529
529
  t.push(w);
530
- const n = /* @__PURE__ */ new Date();
531
- n.setDate(1);
532
- const g = o(0, n);
533
- n.setMonth(n.getMonth() + 1), n.setDate(1), n.setDate(n.getDate() - 1);
534
- const m = o(0, n), D = {
530
+ const a = /* @__PURE__ */ new Date();
531
+ a.setDate(1);
532
+ const g = o(0, a);
533
+ a.setMonth(a.getMonth() + 1), a.setDate(1), a.setDate(a.getDate() - 1);
534
+ const m = o(0, a), P = {
535
535
  label: u.i18n.t("dateOptions.ThisMonth"),
536
536
  value: [g[0], m[1]],
537
537
  key: "thisMonth"
538
538
  };
539
- return t.push(D), t;
539
+ return t.push(P), t;
540
540
  }
541
- }), $ = y({
541
+ }), $ = C({
542
542
  /**
543
543
  * 获取校验对象-默认使用对数字进行只保留数字、正数、小数后两位保留修正操作
544
544
  *
@@ -573,9 +573,9 @@ const V = (e) => {
573
573
  const o = {};
574
574
  s === void 0 && (s = $.inputVal);
575
575
  for (const r in t)
576
- o[r] = (a) => {
576
+ o[r] = (n) => {
577
577
  e[r] = null, s({
578
- val: a.target.value,
578
+ val: n.target.value,
579
579
  after: (l) => {
580
580
  e[r] = l;
581
581
  },
@@ -640,10 +640,10 @@ const V = (e) => {
640
640
  *
641
641
  */
642
642
  inputVal: (e) => {
643
- let { val: t, length: s, trim: o = !0, fixed: r = 2, min: a = 0, max: l = 1e9 } = e;
643
+ let { val: t, length: s, trim: o = !0, fixed: r = 2, min: n = 0, max: l = 1e9 } = e;
644
644
  o && (t = t.replace(/\s+|\s+$/g, ""));
645
645
  const d = {
646
- int: (i) => (i = i.replace(/[^\d]/g, ""), i = Number(i) || 0, i = a && i < a ? a : i, i = l && i > l ? l : i, i),
646
+ int: (i) => (i = i.replace(/[^\d]/g, ""), i = Number(i) || 0, i = n && i < n ? n : i, i = l && i > l ? l : i, i),
647
647
  float: (i) => (i = i.replace(/^0(\d)/, "$1").replace(/^\./, "0").replace(/[^\d.]/g, "").replace(/^(\d*\.?\d*).*$/, "$1").replace(new RegExp(`^(\\d+)\\.(\\d{${r}}).*`), "$1.$2"), i),
648
648
  hanzi: (i) => (i = i.replace(/[^\u4e00-\u9fa5]/g, ""), i),
649
649
  Num: "0-9",
@@ -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 = [], w = (n, g, m) => {
656
- n === g ? Array.isArray(e[n]) ? m.push(...e[n]) : m.push(e[n]) : m.push(d[n.substring(3)]);
655
+ const i = [], f = [], w = (a, g, m) => {
656
+ a === g ? Array.isArray(e[a]) ? m.push(...e[a]) : m.push(e[a]) : m.push(d[a.substring(3)]);
657
657
  };
658
- Object.keys(e).forEach((n) => {
659
- n.startsWith("get") ? w(n, "getCustom", i) : n.startsWith("del") ? w(n, "delCustom", f) : d[n] && (t = d[n](t));
658
+ Object.keys(e).forEach((a) => {
659
+ a.startsWith("get") ? w(a, "getCustom", i) : a.startsWith("del") ? w(a, "delCustom", f) : d[a] && (t = d[a](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;
@@ -669,19 +669,18 @@ const V = (e) => {
669
669
  }, ot = {
670
670
  install: st
671
671
  }, it = (e) => {
672
- S.CEventBean = CEventBean, S.TimerBean = TimerBean;
673
672
  }, rt = {
674
673
  install: it
675
674
  };
676
675
  let x = {}, A = {};
677
- const at = (e) => {
676
+ const nt = (e) => {
678
677
  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
678
  x[t] = s, Cookie.set("iconObj", x);
680
679
  }, 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
680
  A[t] = s, Cookie.set("siconObj", A);
682
681
  };
683
- }, nt = {
684
- install: at
682
+ }, at = {
683
+ install: nt
685
684
  }, lt = { style: { border: "1px solid #ccc" } }, ct = /* @__PURE__ */ j({
686
685
  __name: "index",
687
686
  props: {
@@ -692,9 +691,9 @@ const at = (e) => {
692
691
  },
693
692
  emits: ["update:modelValue"],
694
693
  setup(e, { emit: t }) {
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
- H(d, (n) => {
697
- a("update:modelValue", n);
694
+ const s = T(() => h.loadModule("editor").then((a) => a.Editor)), o = T(() => h.loadModule("editor").then((a) => a.Toolbar)), r = e, n = t, l = W(), d = z(r.modelValue);
695
+ B(d, (a) => {
696
+ n("update:modelValue", a);
698
697
  });
699
698
  const i = {
700
699
  excludeKeys: ["group-video"]
@@ -702,30 +701,30 @@ const at = (e) => {
702
701
  placeholder: "请输入内容...",
703
702
  MENU_CONF: {
704
703
  uploadImage: {
705
- async customUpload(n, g) {
704
+ async customUpload(a, g) {
706
705
  const m = await R.upload({
707
- file: n
706
+ file: a
708
707
  });
709
- m.data = u.getBaseUrl(m.data), g(m.data, "", m.data), a("update:modelValue", d.value);
708
+ m.data = u.getBaseUrl(m.data), g(m.data, "", m.data), n("update:modelValue", d.value);
710
709
  }
711
710
  }
712
711
  }
713
712
  };
714
- z(() => {
715
- const n = l.value;
716
- n?.destroy();
713
+ H(() => {
714
+ const a = l.value;
715
+ a?.destroy();
717
716
  });
718
- const w = (n) => {
719
- l.value = n;
717
+ const w = (a) => {
718
+ l.value = a;
720
719
  };
721
- return (n, g) => (I(), J("div", lt, [
722
- _(C(o), {
720
+ return (a, g) => (_(), J("div", lt, [
721
+ O(y(o), {
723
722
  style: { "border-bottom": "1px solid #ccc" },
724
723
  editor: l.value,
725
724
  defaultConfig: i,
726
725
  mode: "default"
727
726
  }, null, 8, ["editor"]),
728
- _(C(s), {
727
+ O(y(s), {
729
728
  style: { height: "500px", "overflow-y": "hidden" },
730
729
  modelValue: d.value,
731
730
  "onUpdate:modelValue": g[0] || (g[0] = (m) => d.value = m),
@@ -812,10 +811,25 @@ const at = (e) => {
812
811
  }, pt = {
813
812
  install: ut
814
813
  }, dt = (e) => {
815
- e.use(ot), e.use(rt), e.use(nt), e.use(pt);
816
- }, ht = {
817
- install: dt
818
- }, mt = () => {
814
+ if (typeof e != "string" || e.length === 0) return !1;
815
+ const t = p.loginInfo?.roleInfo, s = t?.roleList;
816
+ if (Array.isArray(s) && s.some((r) => r?.type === "superadmin")) return !0;
817
+ const o = t?.apiList;
818
+ return Array.isArray(o) && o.includes(e);
819
+ }, V = (e, t) => {
820
+ dt(t.value) || e.remove();
821
+ }, ht = (e) => {
822
+ e.directive("auth", {
823
+ mounted: V,
824
+ updated(t, s) {
825
+ s.value !== s.oldValue && V(t, s);
826
+ }
827
+ });
828
+ }, mt = (e) => {
829
+ e.use(ot), e.use(rt), e.use(at), e.use(pt), e.use(ht);
830
+ }, ft = {
831
+ install: mt
832
+ }, gt = () => {
819
833
  const e = (i) => i.replace(/\/index$/, "");
820
834
  let t = /* @__PURE__ */ Object.assign({
821
835
  "/src/views/error/index.vue": () => import("./index-BTuR22Wh.js"),
@@ -843,10 +857,10 @@ const at = (e) => {
843
857
  Object.keys(u.config.routes).forEach((i) => {
844
858
  t[i] = u.config.routes[i];
845
859
  });
846
- const s = {}, o = ["light", "dark"], r = "light", a = "dark";
860
+ const s = {}, o = ["light", "dark"], r = "light", n = "dark";
847
861
  Object.keys(t).forEach((i) => {
848
862
  o.forEach((f) => {
849
- r != f && (new RegExp(`^/src/views/${f}`).test(i) || (s[i] = t[i]), new RegExp(`^/src/views/${a}`).test(i) && t[i]);
863
+ r != f && (new RegExp(`^/src/views/${f}`).test(i) || (s[i] = t[i]), new RegExp(`^/src/views/${n}`).test(i) && t[i]);
850
864
  });
851
865
  });
852
866
  const l = Z.init({
@@ -892,54 +906,54 @@ v.store = {
892
906
  svf: $,
893
907
  scurd: E
894
908
  };
895
- const ft = () => {
909
+ const vt = () => {
896
910
  Object.keys(v.store).forEach((e) => {
897
911
  e !== "sutil" && v.store[e].reset?.();
898
912
  });
899
- }, gt = () => {
913
+ }, wt = () => {
900
914
  Object.keys(v.store).forEach((e) => {
901
915
  e !== "sutil" && v.store[e].load?.();
902
916
  });
903
- }, vt = async () => {
904
- gt();
917
+ }, yt = async () => {
918
+ wt();
905
919
  };
906
- v.reset = ft;
907
- class wt {
920
+ v.reset = vt;
921
+ class Ct {
908
922
  /**
909
923
  * 初始化
910
924
  */
911
925
  static async init(t) {
912
- t.use(ht), t.use(u.i18n), await u.i18n.setLang(), vt(), k.init();
913
- const s = mt();
926
+ t.use(ft), t.use(u.i18n), await u.i18n.setLang(), yt(), L.init();
927
+ const s = gt();
914
928
  t.use(s), s.isReady().then(async () => {
915
929
  t.mount("#app");
916
930
  });
917
931
  }
918
932
  }
919
- const b = F(et), Pt = async (e) => {
933
+ const b = F(et), Mt = async (e) => {
920
934
  u.setConfig(e), await u.config.install?.(b), b.use(window.ElementPlus, u.config.elementPlus || {});
921
935
  const t = await import("./index-DU5RPuKk.js");
922
- b.use(t), await wt.init(b), u.config.installed?.(b);
936
+ b.use(t), await Ct.init(b), u.config.installed?.(b);
923
937
  };
924
938
  export {
925
939
  R as ApiApp,
926
- xt as ApiAuthApi,
927
- At as ApiAuthMenu,
928
- Ot as ApiAuthPhone,
929
- _t as ApiAuthRole,
930
- It as ApiAuthUser,
931
- Et as ApiCaptcha,
932
- Ut as ApiCron,
933
- St as ApiEmailConfig,
934
- Vt as ApiErrorLog,
935
- jt as ApiJob,
936
- Tt as ApiLoginLog,
937
- Rt as ApiSmsConfig,
938
- $t as ApiSystemConfig,
939
- Dt as ApiSystemTenant,
940
+ It as ApiAuthApi,
941
+ Ot as ApiAuthMenu,
942
+ _t as ApiAuthPhone,
943
+ Et as ApiAuthRole,
944
+ Ut as ApiAuthUser,
945
+ Tt as ApiCaptcha,
946
+ Vt as ApiCron,
947
+ jt as ApiEmailConfig,
948
+ Rt as ApiErrorLog,
949
+ $t as ApiJob,
950
+ St as ApiLoginLog,
951
+ Pt as ApiSmsConfig,
952
+ Dt as ApiSystemConfig,
953
+ Nt as ApiSystemTenant,
940
954
  tt as ERouter,
941
955
  u as System,
942
- Pt as initApp,
956
+ Mt as initApp,
943
957
  E as scurd,
944
958
  c as ssys,
945
959
  p as suser,
@@ -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,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"})}));
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,R,re,f,F,W){"use strict";class B{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 D{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 A{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 ce{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 j{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 U{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 M=P.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(r=>{o[r]&&o[r](...s)})},l=(o,n,s)=>{let r=s?.data?.code||o,c=s?.data.message;n.data.toast?n.data.toast(r,s,n):f.TSys.fail(g.i18n.t(`code.${r}`,{msg:c||"请求异常"})||g.i18n.t("code.OtherException")),t(n.data,["final","fail","complete"],o==200,n,s),r==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 r=s.parentId;return s.parentId.includes(",")&&(r=s.parentId.split(",").pop()),r===o}).map(s=>({...s,children:l(s._id)})).sort((s,r)=>s.sort-r.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 U.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}}}),de=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(M.reload,t.reload),(l,o)=>{const n=e.resolveComponent("x-route-event"),s=e.resolveComponent("router-view"),r=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(r,{key:0,"url-list":e.unref(_).preview.srcList,"initial-index":e.unref(_).preview.index,onClose:o[0]||(o[0]=i=>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,r)=>r.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],r=o(7-n)[1],c={label:g.i18n.t("dateOptions.ThisWeek"),value:[s,r],key:"thisWeek"};t.push(c);const i=o(1-n-7)[0],p=o(7-n-7)[1],u={label:g.i18n.t("dateOptions.LastWeek"),value:[i,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}}),z=e.reactive({getVf:(a,t,l)=>{const o={};l===void 0&&(l=z.inputVal);for(const n in t)o[n]=s=>{a[n]=null,l({val:s.target.value,after:r=>{a[n]=r},...t[n]})};return o},inputVal:a=>{let{val:t,length:l,trim:o=!0,fixed:n=2,min:s=0,max:r=1e9}=a;o&&(t=t.replace(/\s+|\s+$/g,""));const c={int:i=>(i=i.replace(/[^\d]/g,""),i=Number(i)||0,i=s&&i<s?s:i,i=r&&i>r?r:i,i),float:i=>(i=i.replace(/^0(\d)/,"$1").replace(/^\./,"0").replace(/[^\d.]/g,"").replace(/^(\d*\.?\d*).*$/,"$1").replace(new RegExp(`^(\\d+)\\.(\\d{${n}}).*`),"$1.$2"),i),hanzi:i=>(i=i.replace(/[^\u4e00-\u9fa5]/g,""),i),Num:"0-9",En:"a-zA-Z",Hanzi:"一-龥"};if(t.length){l&&t.length>l&&(t=t.substring(0,l));const i=[],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",i):d.startsWith("del")?u(d,"delCustom",p):c[d]&&(t=c[d](t))}),i.length&&(t=t.replace(new RegExp(`[^${i.join("")}]`,"g"),"")),p.length&&(t=t.replace(new RegExp(`[${p.join("")}]`,"g"),""))}return a.after(t),t}}),pe={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)}}},me={install:a=>{}};let I={},O={};const ue={install:a=>{a.use(re),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=g.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)}}},fe={style:{border:"1px solid #ccc"}},he=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,r=e.shallowRef(),c=e.ref(n.modelValue);e.watch(c,d=>{s("update:modelValue",d)});const i={excludeKeys:["group-video"]},p={placeholder:"请输入内容...",MENU_CONF:{uploadImage:{async customUpload(d,h){const m=await U.upload({file:d});m.data=g.getBaseUrl(m.data),h(m.data,"",m.data),s("update:modelValue",c.value)}}}};e.onBeforeUnmount(()=>{const d=r.value;d?.destroy()});const u=d=>{r.value=d};return(d,h)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(e.unref(o),{style:{"border-bottom":"1px solid #ccc"},editor:r.value,defaultConfig:i,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"])]))}}),_e={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:he}})}},ye=a=>{if(typeof a!="string"||a.length===0)return!1;const t=x.loginInfo?.roleInfo,l=t?.roleList;if(Array.isArray(l)&&l.some(n=>n?.type==="superadmin"))return!0;const o=t?.apiList;return Array.isArray(o)&&o.includes(a)},Q=(a,t)=>{ye(t.value)||a.remove()},ge=a=>{a.directive("auth",{mounted:Q,updated(t,l){l.value!==l.oldValue&&Q(t,l)}})},be={install:a=>{a.use(pe),a.use(me),a.use(ue),a.use(_e),a.use(ge)}},we=()=>{const a=i=>i.replace(/\/index$/,"");let t=Object.assign({"/src/views/error/index.vue":()=>Promise.resolve().then(()=>Be),"/src/views/layout/index.vue":()=>Promise.resolve().then(()=>Ke),"/src/views/login/index.vue":()=>Promise.resolve().then(()=>tt),"/src/views/pages/auth/api/index.vue":()=>Promise.resolve().then(()=>ot),"/src/views/pages/auth/menu/index.vue":()=>Promise.resolve().then(()=>kt),"/src/views/pages/auth/role/index.vue":()=>Promise.resolve().then(()=>Ct),"/src/views/pages/auth/user/index.vue":()=>Promise.resolve().then(()=>Vt),"/src/views/pages/db/index.vue":()=>Promise.resolve().then(()=>Tt),"/src/views/pages/email/config/index.vue":()=>Promise.resolve().then(()=>St),"/src/views/pages/home/index.vue":()=>Promise.resolve().then(()=>Pt),"/src/views/pages/log/error/index.vue":()=>Promise.resolve().then(()=>It),"/src/views/pages/log/loginlog/index.vue":()=>Promise.resolve().then(()=>Ot),"/src/views/pages/profile/index.vue":()=>Promise.resolve().then(()=>Dt),"/src/views/pages/schedule/job/index.vue":()=>Promise.resolve().then(()=>At),"/src/views/pages/sms/config/index.vue":()=>Promise.resolve().then(()=>jt),"/src/views/pages/system/config/index.vue":()=>Promise.resolve().then(()=>Ut),"/src/views/pages/system/tenant/index.vue":()=>Promise.resolve().then(()=>Mt)});if(!g.config.routes){f.TSys.fail("router.routes is required");return}Object.keys(g.config.routes).forEach(i=>{t[i]=g.config.routes[i]});const l={},o=["light","dark"],n="light",s="dark";Object.keys(t).forEach(i=>{o.forEach(p=>{n!=p&&(new RegExp(`^/src/views/${p}`).test(i)||(l[i]=t[i]),new RegExp(`^/src/views/${s}`).test(i)&&t[i])})});const r=R.CRouter.init({modules:l,children:[{path:"/layout",component:"/layout",childrenReg:["^/pages"]}],setInfoHook(i){i.meta={title:i.path}},mapKeyPathHook(i){return a(i)},pathHook(i){return a(i).replace(/^\/pages/,"")}}),c=F.createRouter({history:F.createWebHashHistory(),routes:[...r.array,{path:"/",redirect:"/home"},{path:"/:matchOthers(.*)*",redirect:"/error"}]});return f.TSys.router=c,f.TSys.routes=r.array,g.config.routeHook?.(c),c};T.store={ssys:_,suser:x,sutil:T,svf:z,scurd:V};const xe=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].reset?.()})},ke=()=>{Object.keys(T.store).forEach(a=>{a!=="sutil"&&T.store[a].load?.()})},Ce=async()=>{ke()};T.reset=xe;class Ve{static async init(t){t.use(be),t.use(g.i18n),await g.i18n.setLang(),Ce(),E.init();const l=we();t.use(l),l.isReady().then(async()=>{t.mount("#app")})}}const L=e.createApp(de),Ne=async a=>{g.setConfig(a),await g.config.install?.(L),L.use(window.ElementPlus,g.config.elementPlus||{});const t=await Promise.resolve().then(()=>Ft);L.use(t),await Ve.init(L),g.config.installed?.(L)},Te={style:{background:"#7395ff",width:"100vw",height:"100vh"}},Se={class:"nfsystem"},$e=["src"],Ee={class:"nftitle"},Le=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",Te,[e.createElementVNode("div",Se,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/404.png"},null,8,$e),e.createElementVNode("div",Ee,[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},Be=Object.freeze(Object.defineProperty({__proto__:null,default:S(Le,[["__scopeId","data-v-29641492"]])},Symbol.toStringTag,{value:"Module"})),Pe={class:"header row no-wrap"},Ie={class:"header-right"},Oe={class:"header-user-con"},De={class:"el-dropdown-link row items-center"},Ae={class:"user-avator"},je=["src"],Ue=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 r=e.resolveComponent("v-icon"),c=e.resolveComponent("el-dropdown-item"),i=e.resolveComponent("el-dropdown-menu"),p=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("div",{class:"collapse-btn",onClick:l},[e.createVNode(r,{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",Ie,[e.createElementVNode("div",Oe,[e.createVNode(p,{class:"user-name",trigger:"click",onCommand:o},{dropdown:e.withCtx(()=>[e.createVNode(i,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",De,[e.createTextVNode(e.toDisplayString(e.unref(x).userInfo.nickname)+" ",1),e.createElementVNode("div",Ae,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg"},null,8,je)])])]),_:1})])])])}}}),[["__scopeId","data-v-d5ae6f3f"]]),Me={class:"flex items-center vicon"},ze={class:"flex items-center vicon"},Re=S(e.defineComponent({__name:"Sidebar",setup(a){const t=e.reactive({layout:_.layout,menu:[]}),l=async()=>{let s=await _.getMenuList();const r=c=>c.filter(i=>(i.type===0&&(i.url="/"+StrUtil.getId()),StrUtil.isNull(i.children)||(i.children=r(i.children)),i.show));s=r(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,r)=>{const c=e.resolveComponent("v-icon"),i=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",Me,[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(i,{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(i,{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(i,{index:h.url,key:h.url},{title:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(h.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",ze,[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"]]),Fe={style:{display:"flex",height:"calc(100% - 70px)"}},We={class:"content"},qe={class:"view"},He={class:"row flex-center",style:{gap:"10px","font-size":"12px"}},Ke=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(Ue),e.createElementVNode("div",Fe,[e.createVNode(Re),e.createElementVNode("div",We,[e.createElementVNode("div",null,[e.createElementVNode("div",qe,[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",He,[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"})),Je=["id"],Ye=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 r=s.getBoundingClientRect();innerHeight=r.height,innerWidth=r.width;let c=document.getElementById(l.itemid);c.width=innerWidth,c.height=innerHeight}};return e.onMounted(()=>{const s=document.getElementById(l.boxid).getBoundingClientRect();let r=s.height,c=s.width,i=new Image;i.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(i,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>r||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()*r;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=r,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,te,oe,ne,le,ae,se;C=d("x"),te=d("y"),ne=d("r"),oe=d("s"),le=d("fnx"),ae=d("fny"),se=d("fnr"),N=new p(C,te,oe,ne,{x:le,y:ae,r:se}),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)}i.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,r)=>(e.openBlock(),e.createElementBlock("div",{id:l.boxid},null,8,Je))}}),Ge={class:"absolute fit"},Ze={class:"login-icp"},Xe={class:"ms-login"},Qe={class:"row no-wrap",style:{width:"100%"}},ve={class:"row no-wrap",style:{width:"100%"}},et={class:"login-btn"},tt=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 i=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({...i,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 i=new Date().getTime();if(i-c>0)t.textCode.status=!1,Timer.un(n),t.textCode.text="发送验证码";else{t.textCode.status=!0;const p=(c-i)/1e3;t.textCode.text=p.toFixed(0)+"秒后再试"}},1e3,!0))},r=async()=>{const c=await q.send({type:1,content:"1518079148@qq.com"});console.log("res",c)};return e.onMounted(()=>{s()}),(c,i)=>{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",Ge,[e.createVNode(Ye,{class:"fit"})]),e.createElementVNode("div",Ze,[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",Xe,[i[9]||(i[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":i[3]||(i[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",ve,[e.createVNode(u,{placeholder:"验证码",modelValue:t.param.code,"onUpdate:modelValue":i[4]||(i[4]=m=>t.param.code=m),onKeyup:i[5]||(i[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:i[6]||(i[6]=m=>r()),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":i[0]||(i[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",Qe,[e.createVNode(u,{type:"password",placeholder:"密码",modelValue:t.param.login_password,"onUpdate:modelValue":i[1]||(i[1]=m=>t.param.login_password=m),onKeyup:i[2]||(i[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",et,[e.createVNode(p,{type:"primary",onClick:i[7]||(i[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:i[8]||(i[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"})),ot=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({data:[],option:{api:B,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 B.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:r})=>[r.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"})),nt=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)}}}),lt={class:"row items-center",style:{gap:"10px"}},at=["onUpdate:modelValue"],st=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 i=0;i<l.length;i++)n.color.push({value:l.colors[i]||"#000000"});const s=()=>o("update:colors",n.color.map(i=>i.value));s();const r=R.Scope.Timer();let c=null;return e.watch(()=>n.color,()=>{r.un(c),c=r.once(()=>{s()},100)},{deep:!0}),(i,p)=>(e.openBlock(),e.createElementBlock("div",lt,[(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,at)),[[e.vModelText,n.color[d].value]])),256))]))}}),rt={class:"row items-center",style:{height:"60px",overflow:"auto"}},it={class:"row items-center",style:{gap:"10px",margin:"15px 0"}},ct={class:"row items-center",style:{gap:"10px","margin-bottom":"15px"}},dt={class:"row items-center"},pt={class:"flex items-center",style:{"margin-bottom":"10px"}},mt={style:{"margin-left":"10px"}},ut={key:0,class:"row"},ft=["onClick"],ht={style:{width:"0px"},class:"flex flex-center"},_t={style:{"text-wrap":"nowrap"}},yt={class:"dialog-footer"},gt=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,r=`${s.url}/_keys.json`;let c=await s.fun.getRes(r);c||(c=await s.fun.getResorce(r,!0));const i=`${s.url}/_size.json`;let p=await s.fun.getRes(i);p||(p=await s.fun.getResorce(i,!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 r=VConf.vicon;await n.getlibs(),s&&n.init(),n.showIcon=!1;const c=n.lib,i=`${r.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 r.fun.getRes(i);p||(p=await r.fun.getResorce(i,!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,r)=>{const c=e.resolveComponent("el-radio"),i=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":r[5]||(r[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",yt,[e.createVNode(b,{onClick:n.close},{default:e.withCtx(()=>r[15]||(r[15]=[e.createTextVNode("关闭",-1)])),_:1,__:[15]},8,["onClick"]),e.createVNode(b,{type:"primary",onClick:n.closeItem},{default:e.withCtx(()=>r[16]||(r[16]=[e.createTextVNode("确定",-1)])),_:1,__:[16]},8,["onClick"])])]),default:e.withCtx(()=>[e.createElementVNode("div",rt,[e.createVNode(i,{modelValue:n.lib,"onUpdate:modelValue":r[0]||(r[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",it,[r[6]||(r[6]=e.createElementVNode("div",null,"条件:",-1)),e.createVNode(p,{modelValue:n.findName,"onUpdate:modelValue":r[1]||(r[1]=w=>n.findName=w),style:{width:"160px"},placeholder:"查找"},null,8,["modelValue"]),r[7]||(r[7]=e.createElementVNode("div",null,"当前可选图标库数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.libs.length)+"个 ",1),r[8]||(r[8]=e.createElementVNode("div",null,"当前可选图标数量:",-1)),e.createTextVNode(" "+e.toDisplayString(n.size)+"个 ",1),r[9]||(r[9]=e.createElementVNode("div",null,"总大小:",-1)),r[10]||(r[10]=e.createTextVNode(" 43.49M ",-1))]),e.createElementVNode("div",ct,[r[13]||(r[13]=e.createElementVNode("div",null,"放大:",-1)),e.createVNode(u,{modelValue:n.isbig,"onUpdate:modelValue":r[2]||(r[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",dt,[r[11]||(r[11]=e.createElementVNode("div",null,"颜色控制:",-1)),e.createVNode(u,{modelValue:n.nofill,"onUpdate:modelValue":r[3]||(r[3]=w=>n.nofill=w)},null,8,["modelValue"])])]),_:1}),!n.nofill&&n.showIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r[12]||(r[12]=e.createElementVNode("div",null,"颜色:",-1)),e.createVNode(st,{colors:n.color,"onUpdate:colors":r[4]||(r[4]=w=>n.color=w)},null,8,["colors"])],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",pt,[r[14]||(r[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",mt,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",ut,[(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(nt,{isbig:n.isbig,el:w,color:n.color,nofill:n.nofill,lib:n.lib},null,8,["isbig","el","color","nofill","lib"]),e.createElementVNode("div",ht,[e.createElementVNode("div",_t,e.toDisplayString(w.name),1)])],12,ft)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b9c727d4"]]),bt={class:"flex flex-center"},wt={class:"row"},xt=["onClick"],kt=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 r=s.path.split("/:")[0];r.length&&n.push({path:r,label:r,value:r})}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:D,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"),r=e.resolveComponent("el-switch"),c=e.resolveComponent("el-button"),i=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(i,{option:t.option},{"table-icon":e.withCtx(({row:p})=>[e.createElementVNode("div",bt,[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(r,{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",wt,[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,xt)):e.createCommentVNode("",!0)])]),"tools-right":e.withCtx(()=>[e.createVNode(gt,{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"})),Ct=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({menuList:[],apiList:[],roleList:[],option:{api:A,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 D.list({final(s,r,c){f.TSys.loading(!1)}});t.menuList=_.getTableTree(n.data),n=await B.list({final(s,r,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"})),Vt=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 A.list({final(r,c,i){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"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:t.option},{"table-op-left":e.withCtx(({row:c})=>[e.createVNode(s,{link:"",type:"primary",loading:t.resetLoading[c._id],onClick:i=>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 v{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 Nt={class:"row"},Tt=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 r=>{try{await v.import({file:n}),f.TSys.success("导入覆盖成功")}catch(c){console.error("上传的文件不是合法JSON",c)}},s.readAsText(n)},l.click()},export:async()=>{const{data:l}=await v.export();f.TSys.success("备份成功"+l,{duration:3e3})}});return(l,o)=>{const n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Nt,[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"})),St=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"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{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"})),$t={class:"user-info"},Et=["src"],Lt={class:"user-info-cont"},Bt={class:"user-info-name"},Pt=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",$t,[e.createElementVNode("img",{src:e.unref(g).staticDir+"/images/head.jpg",class:"user-avator",alt:""},null,8,Et),e.createElementVNode("div",Lt,[e.createElementVNode("div",Bt,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"})),It=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"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{option:l.option},{"table-params":e.withCtx(({row:c})=>[e.createVNode(s,{type:"primary",link:"",onClick:i=>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:i=>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:i=>t(c.stack,"错误堆栈")},{default:e.withCtx(()=>n[2]||(n[2]=[e.createTextVNode("查看",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Ot=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:r})=>[e.createVNode(n,{type:r.status==="成功"?"success":"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.status),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),Dt=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"}]},r=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}}},i=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(r),(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:i},{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"})),At=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"})),jt=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(a){const t=e.reactive({param:{phone:"",code:"123456"},option:{api:j,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 j.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"),r=e.resolveComponent("t-curd");return e.openBlock(),e.createBlock(r,{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"})),Ut=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"})),Mt=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:r})=>[e.createVNode(n,{type:r.type===1?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.type===1?"单库多租户":"多库多租户"),1)]),_:2},1032,["type"])]),"table-expireTime":e.withCtx(({row:r})=>[e.createVNode(n,{type:r.expireTime<new Date().getTime()?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(new Date(r.expireTime).Format()),1)]),_:2},1032,["type"])]),_:1},8,["option"])}}})},Symbol.toStringTag,{value:"Module"})),zt=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:r=>{s[l.imgField]=r,o("change")}})}}});return(s,r)=>{const c=e.resolveComponent("el-button"),i=e.resolveComponent("TFormList");return e.openBlock(),e.createBlock(i,{row:a.row,field:a.field,itemFields:a.itemFields,onChange:r[0]||(r[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(()=>r[1]||(r[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(()=>r[2]||(r[2]=[e.createTextVNode(" 查看图片 ",-1)])),_:2,__:[2]},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:3},8,["row","field","itemFields"])}}}),Rt=e.defineComponent({__name:"index",setup(a){return e.watch(()=>f.TSys.router.currentRoute.value.path,(t,l)=>{CEvent.emit(M.change,t)},{immediate:!0}),(t,l)=>null}}),ee=a=>{a.component("xRouteEvent",Rt),a.component("xFormList",zt)},Ft=Object.freeze(Object.defineProperty({__proto__:null,default:{install:ee},install:ee},Symbol.toStringTag,{value:"Module"}));y.ApiApp=U,y.ApiAuthApi=B,y.ApiAuthMenu=D,y.ApiAuthPhone=ie,y.ApiAuthRole=A,y.ApiAuthUser=$,y.ApiCaptcha=q,y.ApiCron=ce,y.ApiEmailConfig=K,y.ApiErrorLog=J,y.ApiJob=Y,y.ApiLoginLog=H,y.ApiSmsConfig=j,y.ApiSystemConfig=G,y.ApiSystemTenant=Z,y.ERouter=M,y.System=g,y.initApp=Ne,y.scurd=V,y.ssys=_,y.suser=x,y.sutil=T,y.svf=z,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,4 @@
1
+ import { type App } from 'vue';
2
+ export declare const hasPermission: (api: unknown) => boolean;
3
+ export declare const install: (app: App) => void;
4
+ export default install;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-admin-front",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "我来助你-后台管理系统-页面",
5
5
  "repository": {
6
6
  "type": "git",