cc1-admin-front 1.0.5 → 2.0.0

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.
Files changed (41) hide show
  1. package/README.md +5 -1
  2. package/dist/apis/auth/ApiAuthPermission.d.ts +4 -0
  3. package/dist/apis/auth/ApiAuthRole.d.ts +4 -6
  4. package/dist/apis/auth/ApiAuthSession.d.ts +4 -0
  5. package/dist/apis/auth/ApiAuthUser.d.ts +2 -0
  6. package/dist/cc1-admin-front.css +1 -1
  7. package/dist/cc1-admin-front.js +25 -945
  8. package/dist/cc1-admin-front.umd.cjs +1 -1
  9. package/dist/{index-CatA5C4N.js → index-BHBDmhpM.js} +19 -15
  10. package/dist/{index-Aa_qAwSq.js → index-BKc52gsM.js} +69 -68
  11. package/dist/{index-DWmZQOPc.js → index-BNytnHfT.js} +62 -56
  12. package/dist/index-BbdDqL4R.js +106 -0
  13. package/dist/{index-D8U8yEvx.js → index-Bh99swBg.js} +9 -9
  14. package/dist/index-BsUQc1tS.js +72 -0
  15. package/dist/index-C0dTAIw4.js +182 -0
  16. package/dist/{index-pxgBPi_e.js → index-CEaedSLk.js} +21 -19
  17. package/dist/{index-DU5RPuKk.js → index-Cb9bja8p.js} +11 -11
  18. package/dist/index-CsUs4AR_.js +42 -0
  19. package/dist/{index-C8fkVOS0.js → index-CvtY70Y6.js} +16 -12
  20. package/dist/{index-rOyW50AB.js → index-CwyxJHDj.js} +34 -29
  21. package/dist/index-D3OkO10X.js +933 -0
  22. package/dist/{index-D6cX_pp2.js → index-DIRWVvKY.js} +27 -22
  23. package/dist/index-DPSZh1Ve.js +123 -0
  24. package/dist/{index-DzI5GwAU.js → index-E8d5Pz2_.js} +29 -25
  25. package/dist/{index-D47lvu37.js → index-SLpgD5v0.js} +81 -89
  26. package/dist/{index-DvZhYqrw.js → index-t7D_zBIH.js} +13 -12
  27. package/dist/index.d.ts +3 -3
  28. package/dist/plugins/directive.d.ts +4 -0
  29. package/dist/sstore/ssys.d.ts +0 -3
  30. package/dist/sstore/suser.d.ts +52 -9
  31. package/package.json +1 -1
  32. package/dist/apis/auth/ApiAuthApi.d.ts +0 -7
  33. package/dist/apis/system/ApiSystemTenant.d.ts +0 -6
  34. package/dist/index-BTuR22Wh.js +0 -41
  35. package/dist/index-CRagZR_l.js +0 -160
  36. package/dist/index-D7Xyt6lh.js +0 -180
  37. package/dist/index-DFNCjb_F.js +0 -69
  38. package/dist/index-Dejkixap.js +0 -181
  39. package/dist/index-uPQ6O40Q.js +0 -180
  40. package/dist/views/pages/system/tenant/index.vue.d.ts +0 -2
  41. /package/dist/views/pages/auth/{api → permission}/index.vue.d.ts +0 -0
@@ -1,35 +1,35 @@
1
- import { defineComponent as z, reactive as N, onMounted as P, onUnmounted as D, openBlock as v, createElementBlock as k, ref as H, resolveComponent as b, normalizeStyle as K, unref as I, createElementVNode as c, createVNode as a, toDisplayString as _, withCtx as u, Fragment as B, normalizeClass as W, withKeys as L, createTextVNode as q } from "vue";
2
- import { System as C, suser as $, ApiAuthUser as j, ssys as V, ApiCaptcha as X } from "./cc1-admin-front.js";
3
- import { TSys as Y } from "cc1-form";
4
- import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const J = ["id"], O = /* @__PURE__ */ z({
1
+ import { defineComponent as N, reactive as $, onMounted as z, onUnmounted as R, openBlock as v, createElementBlock as C, ref as D, resolveComponent as w, normalizeStyle as L, unref as V, createElementVNode as g, createVNode as a, toDisplayString as b, withCtx as u, Fragment as U, normalizeClass as H, withKeys as q, createTextVNode as A } from "vue";
2
+ import { S as k, b as K, a as W, c as j } from "./index-D3OkO10X.js";
3
+ import { TSys as X } from "cc1-form";
4
+ import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const G = ["id"], J = /* @__PURE__ */ N({
6
6
  __name: "index",
7
- setup(R) {
8
- const t = StrUtil.getId(), m = N({
7
+ setup(P) {
8
+ const t = StrUtil.getId(), m = $({
9
9
  boxid: "canvas_snow-" + t,
10
10
  itemid: "canvas_sakura-" + t
11
11
  });
12
- let g;
13
- const y = () => {
12
+ let f;
13
+ const _ = () => {
14
14
  const p = document.getElementById(m.boxid);
15
15
  if (p) {
16
- const h = p.getBoundingClientRect();
17
- innerHeight = h.height, innerWidth = h.width;
16
+ const c = p.getBoundingClientRect();
17
+ innerHeight = c.height, innerWidth = c.width;
18
18
  let s = document.getElementById(m.itemid);
19
19
  s.width = innerWidth, s.height = innerHeight;
20
20
  }
21
21
  };
22
- return P(() => {
22
+ return z(() => {
23
23
  const p = document.getElementById(m.boxid).getBoundingClientRect();
24
- let h = p.height, s = p.width, n = new Image();
25
- n.src = C.staticDir + "/bg/yh.png";
26
- let r = function(e, o, l, f, x) {
27
- this.x = e, this.y = o, this.s = l, this.r = f, this.fn = x;
24
+ let c = p.height, s = p.width, n = new Image();
25
+ n.src = k.staticDir + "/bg/yh.png";
26
+ let r = function(e, o, l, h, x) {
27
+ this.x = e, this.y = o, this.s = l, this.r = h, this.fn = x;
28
28
  };
29
29
  r.prototype.draw = function(e) {
30
30
  e.save(), e.translate(this.x, this.y), e.rotate(this.r), e.drawImage(n, 0, 0, 40 * this.s, 40 * this.s), e.restore();
31
31
  }, r.prototype.update = function() {
32
- 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 > s || this.x < 0 || this.y > h || this.y < 0) && (this.r = i("fnr"), Math.random() > 0.4 ? (this.x = i("x"), this.y = 0, this.s = i("s"), this.r = i("r")) : (this.x = s, this.y = i("y"), this.s = i("s"), this.r = i("r")));
32
+ 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 > s || this.x < 0 || this.y > c || this.y < 0) && (this.r = i("fnr"), Math.random() > 0.4 ? (this.x = i("x"), this.y = 0, this.s = i("s"), this.r = i("r")) : (this.x = s, this.y = i("y"), this.s = i("s"), this.r = i("r")));
33
33
  };
34
34
  let d = function() {
35
35
  this.list = [];
@@ -54,7 +54,7 @@ const J = ["id"], O = /* @__PURE__ */ z({
54
54
  o = Math.random() * s;
55
55
  break;
56
56
  case "y":
57
- o = Math.random() * h;
57
+ o = Math.random() * c;
58
58
  break;
59
59
  case "s":
60
60
  o = Math.random();
@@ -63,60 +63,60 @@ const J = ["id"], O = /* @__PURE__ */ z({
63
63
  o = Math.random() * 6;
64
64
  break;
65
65
  case "fnx":
66
- l = -0.5 + Math.random() * 1, o = function(f, x) {
67
- return f + 0.5 * l - 1.7;
66
+ l = -0.5 + Math.random() * 1, o = function(h, x) {
67
+ return h + 0.5 * l - 1.7;
68
68
  };
69
69
  break;
70
70
  case "fny":
71
- l = 1.5 + Math.random() * 0.7, o = function(f, x) {
71
+ l = 1.5 + Math.random() * 0.7, o = function(h, x) {
72
72
  return x + l;
73
73
  };
74
74
  break;
75
75
  case "fnr":
76
- l = Math.random() * 0.03, o = function(f) {
77
- return f + l;
76
+ l = Math.random() * 0.03, o = function(h) {
77
+ return h + l;
78
78
  };
79
79
  break;
80
80
  }
81
81
  return o;
82
82
  }
83
- function w() {
83
+ function y() {
84
84
  let e = document.createElement("canvas"), o;
85
- e.height = h, e.width = s, e.setAttribute("style", "position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"), e.setAttribute("id", m.itemid), document.getElementById(m.boxid).appendChild(e), o = e.getContext("2d");
85
+ e.height = c, e.width = s, e.setAttribute("style", "position: absolute;left: 0;top: 0;pointer-events: none;object-fit:cover;"), e.setAttribute("id", m.itemid), document.getElementById(m.boxid).appendChild(e), o = e.getContext("2d");
86
86
  let l = new d();
87
- for (let f = 0; f < 50; f++) {
88
- let x, S, T, E, F, M, U, A;
89
- S = i("x"), T = i("y"), F = i("r"), E = i("s"), M = i("fnx"), U = i("fny"), A = i("fnr"), x = new r(S, T, E, F, {
90
- x: M,
91
- y: U,
92
- r: A
87
+ for (let h = 0; h < 50; h++) {
88
+ let x, S, I, E, F, T, B, M;
89
+ S = i("x"), I = i("y"), F = i("r"), E = i("s"), T = i("fnx"), B = i("fny"), M = i("fnr"), x = new r(S, I, E, F, {
90
+ x: T,
91
+ y: B,
92
+ r: M
93
93
  }), x.draw(o), l.push(x);
94
94
  }
95
- g = function() {
96
- o.clearRect(0, 0, e.width, e.height), l.update(), l.draw(o), requestAnimationFrame(g);
97
- }, requestAnimationFrame(g);
95
+ f = function() {
96
+ o.clearRect(0, 0, e.width, e.height), l.update(), l.draw(o), requestAnimationFrame(f);
97
+ }, requestAnimationFrame(f);
98
98
  }
99
99
  n.onload = function() {
100
- w();
101
- }, window.addEventListener("resize", y);
102
- }), D(() => {
103
- window.removeEventListener("resize", y), window.cancelAnimationFrame(g);
100
+ y();
101
+ }, window.addEventListener("resize", _);
102
+ }), R(() => {
103
+ window.removeEventListener("resize", _), window.cancelAnimationFrame(f);
104
104
  let p = document.getElementById(m.itemid);
105
105
  p?.parentNode?.removeChild(p);
106
- }), (p, h) => (v(), k("div", {
106
+ }), (p, c) => (v(), C("div", {
107
107
  id: m.boxid
108
- }, null, 8, J));
108
+ }, null, 8, G));
109
109
  }
110
- }), Q = { class: "absolute fit" }, Z = { class: "login-icp" }, ee = { class: "ms-login" }, te = {
110
+ }), O = { class: "absolute fit" }, Q = { class: "login-icp" }, Z = { class: "ms-login" }, ee = {
111
111
  class: "row no-wrap",
112
112
  style: { width: "100%" }
113
- }, ne = {
113
+ }, te = {
114
114
  class: "row no-wrap",
115
115
  style: { width: "100%" }
116
- }, oe = { class: "login-btn" }, ie = /* @__PURE__ */ z({
116
+ }, ne = { class: "login-btn" }, oe = /* @__PURE__ */ N({
117
117
  __name: "index",
118
- setup(R) {
119
- const t = N({
118
+ setup(P) {
119
+ const t = $({
120
120
  param: {
121
121
  isPhone: !1,
122
122
  login_name: "",
@@ -137,9 +137,7 @@ const J = ["id"], O = /* @__PURE__ */ z({
137
137
  },
138
138
  loading: !1,
139
139
  text: "登录"
140
- });
141
- $.clearInfo();
142
- const m = H(), g = () => {
140
+ }), m = D(), f = () => {
143
141
  m.value.validate(async (s) => {
144
142
  if (s) {
145
143
  let n = t.param.isPhone ? {
@@ -150,25 +148,23 @@ const J = ["id"], O = /* @__PURE__ */ z({
150
148
  password: t.param.login_password
151
149
  };
152
150
  t.loading = !0, t.text = "加载中";
153
- const r = await j.login({
151
+ const r = await K.login({
154
152
  ...n,
155
- final(i, w, e) {
153
+ final(d, i, y) {
156
154
  t.loading = !1, t.text = "登录";
157
155
  }
158
156
  });
159
- $.setUserInfo(r.data);
160
- let d = V.getTableTree(r.data.roleInfo.menuList);
161
- V.setMenuList(d, r.data.roleInfo.menuList), V.setApiList(r.data.roleInfo.apiList), Y.router.push("/");
157
+ W.setSession(r.data), X.router.push(r.data.mustChangePassword ? "/profile?firstPasswordChange=1" : "/");
162
158
  }
163
159
  });
164
160
  };
165
- let y = null;
161
+ let _ = null;
166
162
  const p = (s) => {
167
- Timer.un(y), StrUtil.isNull(s) && (s = parseInt(Cookie.get("codeTime"))), !StrUtil.isNull(s) && (t.textCode.status = !1, y = Timer.on(
163
+ Timer.un(_), StrUtil.isNull(s) && (s = parseInt(Cookie.get("codeTime"))), !StrUtil.isNull(s) && (t.textCode.status = !1, _ = Timer.on(
168
164
  () => {
169
165
  let n = (/* @__PURE__ */ new Date()).getTime();
170
166
  if (n - s > 0)
171
- t.textCode.status = !1, Timer.un(y), t.textCode.text = "发送验证码";
167
+ t.textCode.status = !1, Timer.un(_), t.textCode.text = "发送验证码";
172
168
  else {
173
169
  t.textCode.status = !0;
174
170
  const r = (s - n) / 1e3;
@@ -178,28 +174,28 @@ const J = ["id"], O = /* @__PURE__ */ z({
178
174
  1e3,
179
175
  !0
180
176
  ));
181
- }, h = async () => {
182
- const s = await X.send({ type: 1, content: "1518079148@qq.com" });
177
+ }, c = async () => {
178
+ const s = await j.send({ type: 1, content: "1518079148@qq.com" });
183
179
  console.log("res", s);
184
180
  };
185
- return P(() => {
181
+ return z(() => {
186
182
  p();
187
183
  }), (s, n) => {
188
- const r = b("el-button"), d = b("el-input"), i = b("el-form-item"), w = b("el-form");
189
- return v(), k("div", {
184
+ const r = w("el-button"), d = w("el-input"), i = w("el-form-item"), y = w("el-form");
185
+ return v(), C("div", {
190
186
  class: "login-wrap",
191
- style: K({ backgroundImage: `url(${I(C).staticDir + "/bg/g-1.jpg"})` })
187
+ style: L({ backgroundImage: `url(${V(k).staticDir + "/bg/g-1.jpg"})` })
192
188
  }, [
193
- c("div", Q, [
194
- a(O, { class: "fit" })
189
+ g("div", O, [
190
+ a(J, { class: "fit" })
195
191
  ]),
196
- c("div", Z, [
197
- c("div", null, _(I(C).config.website.author), 1),
198
- c("div", null, _(I(C).config.website.recordNumber), 1)
192
+ g("div", Q, [
193
+ g("div", null, b(V(k).config.website.author), 1),
194
+ g("div", null, b(V(k).config.website.recordNumber), 1)
199
195
  ]),
200
- c("div", ee, [
201
- n[9] || (n[9] = c("div", { class: "ms-title" }, "系统登陆", -1)),
202
- a(w, {
196
+ g("div", Z, [
197
+ n[8] || (n[8] = g("div", { class: "ms-title" }, "系统登陆", -1)),
198
+ a(y, {
203
199
  model: t.param,
204
200
  rules: t.rules,
205
201
  ref_key: "login",
@@ -208,7 +204,7 @@ const J = ["id"], O = /* @__PURE__ */ z({
208
204
  class: "ms-content"
209
205
  }, {
210
206
  default: u(() => [
211
- t.param.isPhone ? (v(), k(B, { key: 1 }, [
207
+ t.param.isPhone ? (v(), C(U, { key: 1 }, [
212
208
  a(i, { prop: "phone" }, {
213
209
  default: u(() => [
214
210
  a(d, {
@@ -229,12 +225,12 @@ const J = ["id"], O = /* @__PURE__ */ z({
229
225
  }),
230
226
  a(i, { prop: "code" }, {
231
227
  default: u(() => [
232
- c("div", ne, [
228
+ g("div", te, [
233
229
  a(d, {
234
230
  placeholder: "验证码",
235
231
  modelValue: t.param.code,
236
232
  "onUpdate:modelValue": n[4] || (n[4] = (e) => t.param.code = e),
237
- onKeyup: n[5] || (n[5] = L((e) => g(), ["enter", "native"])),
233
+ onKeyup: n[5] || (n[5] = q((e) => f(), ["enter", "native"])),
238
234
  class: "input-phone"
239
235
  }, {
240
236
  default: u(() => [
@@ -249,11 +245,11 @@ const J = ["id"], O = /* @__PURE__ */ z({
249
245
  loading: t.textCode.loading,
250
246
  disabled: t.textCode.status,
251
247
  type: "primary",
252
- onClick: n[6] || (n[6] = (e) => h()),
248
+ onClick: n[6] || (n[6] = (e) => c()),
253
249
  style: { "border-radius": "0px 4px 4px 0px" }
254
250
  }, {
255
251
  default: u(() => [
256
- q(_(t.textCode.text), 1)
252
+ A(b(t.textCode.text), 1)
257
253
  ]),
258
254
  _: 1
259
255
  }, 8, ["loading", "disabled"])
@@ -261,7 +257,7 @@ const J = ["id"], O = /* @__PURE__ */ z({
261
257
  ]),
262
258
  _: 1
263
259
  })
264
- ], 64)) : (v(), k(B, { key: 0 }, [
260
+ ], 64)) : (v(), C(U, { key: 0 }, [
265
261
  a(i, { prop: "login_name" }, {
266
262
  default: u(() => [
267
263
  a(d, {
@@ -282,14 +278,14 @@ const J = ["id"], O = /* @__PURE__ */ z({
282
278
  }),
283
279
  a(i, { prop: "login_password" }, {
284
280
  default: u(() => [
285
- c("div", te, [
281
+ g("div", ee, [
286
282
  a(d, {
287
283
  type: "password",
288
284
  placeholder: "密码",
289
285
  modelValue: t.param.login_password,
290
286
  "onUpdate:modelValue": n[1] || (n[1] = (e) => t.param.login_password = e),
291
- onKeyup: n[2] || (n[2] = L((e) => g(), ["enter", "native"])),
292
- class: W([t.param.isPhone ? "input-phone" : void 0])
287
+ onKeyup: n[2] || (n[2] = q((e) => f(), ["enter", "native"])),
288
+ class: H([t.param.isPhone ? "input-phone" : void 0])
293
289
  }, {
294
290
  default: u(() => [
295
291
  a(r, {
@@ -304,21 +300,17 @@ const J = ["id"], O = /* @__PURE__ */ z({
304
300
  _: 1
305
301
  })
306
302
  ], 64)),
307
- c("div", oe, [
303
+ g("div", ne, [
308
304
  a(r, {
309
305
  type: "primary",
310
- onClick: n[7] || (n[7] = (e) => g()),
306
+ onClick: n[7] || (n[7] = (e) => f()),
311
307
  loading: t.loading
312
308
  }, {
313
309
  default: u(() => [
314
- q(_(t.text), 1)
310
+ A(b(t.text), 1)
315
311
  ]),
316
312
  _: 1
317
- }, 8, ["loading"]),
318
- c("div", {
319
- style: { color: "#ffffff", "font-size": "14px", "margin-top": "10px", cursor: "pointer" },
320
- onClick: n[8] || (n[8] = (e) => t.param.isPhone = !t.param.isPhone)
321
- }, " 切换" + _(t.param.isPhone ? "账号" : "验证码") + "登录 ", 1)
313
+ }, 8, ["loading"])
322
314
  ])
323
315
  ]),
324
316
  _: 1
@@ -327,7 +319,7 @@ const J = ["id"], O = /* @__PURE__ */ z({
327
319
  ], 4);
328
320
  };
329
321
  }
330
- }), de = /* @__PURE__ */ G(ie, [["__scopeId", "data-v-9b624341"]]);
322
+ }), le = /* @__PURE__ */ Y(oe, [["__scopeId", "data-v-68eb361d"]]);
331
323
  export {
332
- de as default
324
+ le as default
333
325
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as r, reactive as c, resolveComponent as o, openBlock as u, createBlock as i, withCtx as s, createVNode as m, createTextVNode as _, toDisplayString as d } from "vue";
2
- import { ApiLoginLog as y, suser as h } from "./cc1-admin-front.js";
1
+ import { defineComponent as u, reactive as c, resolveComponent as o, openBlock as p, createBlock as m, withCtx as s, createVNode as d, createTextVNode as _, toDisplayString as h } from "vue";
2
+ import { k as y, a as l } from "./index-D3OkO10X.js";
3
3
  import "cc1-form";
4
- const k = /* @__PURE__ */ r({
4
+ const k = /* @__PURE__ */ u({
5
5
  __name: "index",
6
6
  setup(b) {
7
- const l = c({
7
+ const n = c({
8
8
  option: {
9
9
  api: y,
10
10
  data(t) {
@@ -14,6 +14,8 @@ const k = /* @__PURE__ */ r({
14
14
  },
15
15
  table: {
16
16
  selectable: !0,
17
+ update: !1,
18
+ delete: () => l.hasPermission("/auth/loginLog/delete"),
17
19
  column: [
18
20
  {
19
21
  key: "createTime",
@@ -31,9 +33,8 @@ const k = /* @__PURE__ */ r({
31
33
  },
32
34
  tools: {
33
35
  add: !1,
34
- update: !1,
35
- delete(t) {
36
- return h.hasApi("/auth/loginLog/delete");
36
+ delete() {
37
+ return l.hasPermission("/auth/loginLog/delete");
37
38
  },
38
39
  export: {
39
40
  fileName: () => `登录日志_${(/* @__PURE__ */ new Date()).getTime()}`
@@ -89,16 +90,16 @@ const k = /* @__PURE__ */ r({
89
90
  }
90
91
  });
91
92
  return (t, e) => {
92
- const n = o("el-tag"), p = o("t-curd");
93
- return u(), i(p, {
94
- option: l.option
93
+ const r = o("el-tag"), i = o("t-curd");
94
+ return p(), m(i, {
95
+ option: n.option
95
96
  }, {
96
97
  "table-status": s(({ row: a }) => [
97
- m(n, {
98
+ d(r, {
98
99
  type: a.status === "成功" ? "success" : "danger"
99
100
  }, {
100
101
  default: s(() => [
101
- _(d(a.status), 1)
102
+ _(h(a.status), 1)
102
103
  ]),
103
104
  _: 2
104
105
  }, 1032, ["type"])
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import 'tools-css/index.css';
2
2
  import 'tools-css/scroll.css';
3
- import ApiAuthApi from './apis/auth/ApiAuthApi';
3
+ import ApiAuthPermission from './apis/auth/ApiAuthPermission';
4
4
  import ApiAuthMenu from './apis/auth/ApiAuthMenu';
5
5
  import ApiAuthPhone from './apis/auth/ApiAuthPhone';
6
6
  import ApiAuthRole from './apis/auth/ApiAuthRole';
7
7
  import ApiAuthUser from './apis/auth/ApiAuthUser';
8
+ import ApiAuthSession from './apis/auth/ApiAuthSession';
8
9
  import ApiCaptcha from './apis/auth/ApiCaptcha';
9
10
  import ApiLoginLog from './apis/auth/ApiLoginLog';
10
11
  import ApiCron from './apis/cron/ApiCron';
@@ -14,7 +15,6 @@ import ApiJob from './apis/schedule/ApiJob';
14
15
  import ApiSmsConfig from './apis/sms/ApiSmsConfig';
15
16
  import ApiApp from './apis/system/ApiApp';
16
17
  import ApiSystemConfig from './apis/system/ApiSystemConfig';
17
- import ApiSystemTenant from './apis/system/ApiSystemTenant';
18
18
  import { ERouter } from './enum/Enum';
19
19
  import { scurd } from './sstore/scurd';
20
20
  import { ssys } from './sstore/ssys';
@@ -24,7 +24,7 @@ import { svf } from './sstore/svf';
24
24
  import './styles/index.less';
25
25
  import System from './utils/System';
26
26
  declare const initApp: (config: Partial<typeof System.config>) => Promise<void>;
27
- export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, ERouter, initApp, scurd, ssys, suser, sutil, svf, System };
27
+ export { ApiApp, ApiAuthPermission, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiAuthSession, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ERouter, initApp, scurd, ssys, suser, sutil, svf, System };
28
28
 
29
29
  declare global {
30
30
  type query = {
@@ -0,0 +1,4 @@
1
+ import { type App } from 'vue';
2
+ export declare const hasPermission: (url: unknown) => boolean;
3
+ export declare const install: (app: App) => void;
4
+ export default install;
@@ -46,9 +46,6 @@ export declare const ssys: {
46
46
  }[];
47
47
  setMenuList: (menuList: Menu[], menuListSource: Menu[]) => void;
48
48
  getMenuList: () => Promise<Menu[]>;
49
- apiList: string[];
50
- setApiList: (apiList: string[]) => void;
51
- getApiList: () => Promise<string[]>;
52
49
  upload: {
53
50
  handler: (param: {
54
51
  callback: (url: string) => void;
@@ -1,33 +1,76 @@
1
+ export type SessionInfo = {
2
+ token: string;
3
+ mustChangePassword: boolean;
4
+ userInfo: UserInfo;
5
+ roleInfo: {
6
+ roles: Array<{
7
+ _id: string;
8
+ type: string;
9
+ title: string;
10
+ }>;
11
+ permissionUrls: string[];
12
+ menus: any[];
13
+ };
14
+ };
1
15
  export declare const suser: {
2
- load: () => void;
3
- loginInfo: {
4
- roleInfo: {
5
- apiList: string[];
6
- menuList: string[];
7
- };
16
+ session: {
8
17
  token: string;
18
+ mustChangePassword: boolean;
9
19
  userInfo: {
20
+ _id?: string | undefined;
10
21
  account?: string | undefined;
11
22
  nickname: string;
12
23
  phone?: string | undefined;
13
24
  desc?: string | undefined;
25
+ status?: number | undefined;
26
+ managerId?: string | undefined;
27
+ ancestorIds?: string[] | undefined;
28
+ authVersion?: number | undefined;
29
+ };
30
+ roleInfo: {
31
+ roles: {
32
+ _id: string;
33
+ type: string;
34
+ title: string;
35
+ }[];
36
+ permissionUrls: string[];
37
+ menus: any[];
14
38
  };
15
39
  };
16
40
  userInfo: {
41
+ _id?: string | undefined;
17
42
  account?: string | undefined;
18
43
  nickname: string;
19
44
  phone?: string | undefined;
20
45
  desc?: string | undefined;
46
+ status?: number | undefined;
47
+ managerId?: string | undefined;
48
+ ancestorIds?: string[] | undefined;
49
+ authVersion?: number | undefined;
21
50
  };
22
- token: any;
23
- setUserInfo: (loginInfo: any) => void;
51
+ token: string;
52
+ loaded: boolean;
53
+ loading: {
54
+ then: <TResult1 = boolean, TResult2 = never>(onfulfilled?: ((value: boolean) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
55
+ catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<boolean | TResult>;
56
+ finally: (onfinally?: (() => void) | null | undefined) => Promise<boolean>;
57
+ readonly [Symbol.toStringTag]: string;
58
+ } | null;
59
+ load: () => void;
60
+ setSession: (session: SessionInfo) => void;
61
+ refresh: () => Promise<boolean>;
24
62
  updateUserInfo: (userInfo: Partial<UserInfo>) => void;
25
63
  clearInfo: () => void;
26
- hasApi: (api: string) => boolean;
64
+ hasPermission: (url: string) => boolean;
27
65
  };
28
66
  export type UserInfo = {
67
+ _id?: string;
29
68
  account?: string;
30
69
  nickname: string;
31
70
  phone?: string;
32
71
  desc?: string;
72
+ status?: number;
73
+ managerId?: string;
74
+ ancestorIds?: string[];
75
+ authVersion?: number;
33
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-admin-front",
3
- "version": "1.0.5",
3
+ "version": "2.0.0",
4
4
  "description": "我来助你-后台管理系统-页面",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,7 +0,0 @@
1
- export default class ApiAuthApi {
2
- static all(param?: ApiData): Promise<any>;
3
- static list(param?: ApiData): Promise<any>;
4
- static create(param?: ApiData): Promise<any>;
5
- static update(param?: ApiData): Promise<any>;
6
- static delete(param?: ApiData): Promise<any>;
7
- }
@@ -1,6 +0,0 @@
1
- export default class ApiSystemTenant {
2
- static list(param?: any): Promise<any>;
3
- static create(param?: any): Promise<any>;
4
- static update(param?: any): Promise<any>;
5
- static delete(param?: any): Promise<any>;
6
- }
@@ -1,41 +0,0 @@
1
- import { defineComponent as s, resolveComponent as r, openBlock as i, createElementBlock as l, createElementVNode as e, unref as d, createVNode as m, withCtx as p, createTextVNode as _ } from "vue";
2
- import { System as u } from "./cc1-admin-front.js";
3
- import { TSys as f } from "cc1-form";
4
- import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const c = { style: { background: "#7395ff", width: "100vw", height: "100vh" } }, v = { class: "nfsystem" }, x = ["src"], g = { class: "nftitle" }, y = /* @__PURE__ */ s({
6
- __name: "index",
7
- setup(h) {
8
- const o = () => {
9
- f.router.push("/");
10
- };
11
- return (w, t) => {
12
- const n = r("el-button");
13
- return i(), l("div", c, [
14
- e("div", v, [
15
- e("img", {
16
- src: d(u).staticDir + "/images/404.png"
17
- }, null, 8, x),
18
- e("div", g, [
19
- t[2] || (t[2] = e("h2", null, "页面走丢了...", -1)),
20
- t[3] || (t[3] = e("h4", null, "远方的朋友你好!非常抱歉,您所请求的页面不存在!", -1)),
21
- t[4] || (t[4] = e("h4", null, "请仔细检查您输入的网址是否正确。", -1)),
22
- m(n, {
23
- type: "warning",
24
- onClick: t[0] || (t[0] = (k) => o()),
25
- style: { width: "220px" }
26
- }, {
27
- default: p(() => t[1] || (t[1] = [
28
- _("返回主页", -1)
29
- ])),
30
- _: 1,
31
- __: [1]
32
- })
33
- ])
34
- ])
35
- ]);
36
- };
37
- }
38
- }), B = /* @__PURE__ */ a(y, [["__scopeId", "data-v-29641492"]]);
39
- export {
40
- B as default
41
- };