cc1-admin-front 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/App.vue.d.ts +2 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/apis/auth/ApiAuthApi.d.ts +7 -0
- package/dist/apis/auth/ApiAuthMenu.d.ts +6 -0
- package/dist/apis/auth/ApiAuthPhone.d.ts +3 -0
- package/dist/apis/auth/ApiAuthRole.d.ts +12 -0
- package/dist/apis/auth/ApiAuthUser.d.ts +7 -0
- package/dist/apis/auth/ApiCaptcha.d.ts +4 -0
- package/dist/apis/auth/ApiLoginLog.d.ts +4 -0
- package/dist/apis/cron/ApiCron.d.ts +6 -0
- package/dist/apis/db/ApiDb.d.ts +4 -0
- package/dist/apis/email/ApiEmailConfig.d.ts +6 -0
- package/dist/apis/log/ApiErrorLog.d.ts +4 -0
- package/dist/apis/schedule/ApiJob.d.ts +8 -0
- package/dist/apis/sms/ApiSmsConfig.d.ts +7 -0
- package/dist/apis/system/ApiApp.d.ts +4 -0
- package/dist/apis/system/ApiSystemConfig.d.ts +6 -0
- package/dist/apis/system/ApiSystemTenant.d.ts +6 -0
- package/dist/apis/types/query.d.ts +4 -0
- package/dist/cc1-admin-front.css +1 -0
- package/dist/cc1-admin-front.js +937 -0
- package/dist/cc1-admin-front.umd.cjs +1 -0
- package/dist/components/editor/index.vue.d.ts +18 -0
- package/dist/components/formList/index.vue.d.ts +97 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/particle/yinhua/index.vue.d.ts +2 -0
- package/dist/components/routeEvent/index.vue.d.ts +2 -0
- package/dist/enum/Enum.d.ts +15 -0
- package/dist/index--6fokZC8.js +172 -0
- package/dist/index-BTuR22Wh.js +41 -0
- package/dist/index-Bk_LJXIb.js +257 -0
- package/dist/index-C8fkVOS0.js +127 -0
- package/dist/index-CJ5aGrl0.js +152 -0
- package/dist/index-CatA5C4N.js +132 -0
- package/dist/index-D47lvu37.js +333 -0
- package/dist/index-D8U8yEvx.js +49 -0
- package/dist/index-DFNCjb_F.js +69 -0
- package/dist/index-DU5RPuKk.js +95 -0
- package/dist/index-Dkl3LwVN.js +143 -0
- package/dist/index-DvZhYqrw.js +113 -0
- package/dist/index-O3L87IEQ.js +157 -0
- package/dist/index-pxgBPi_e.js +197 -0
- package/dist/index-rnNeo1-y.js +184 -0
- package/dist/index-tQ4ZyO21.js +592 -0
- package/dist/index-uPQ6O40Q.js +180 -0
- package/dist/index.d.ts +41 -0
- package/dist/plugins/index.d.ts +6 -0
- package/dist/plugins/tools-form.d.ts +7 -0
- package/dist/plugins/tools-javascript.d.ts +6 -0
- package/dist/plugins/tools-vue3.d.ts +6 -0
- package/dist/plugins/uivite.d.ts +6 -0
- package/dist/router/index.d.ts +1 -0
- package/dist/sstore/index.d.ts +5 -0
- package/dist/sstore/scurd.d.ts +10 -0
- package/dist/sstore/ssys.d.ts +85 -0
- package/dist/sstore/suser.d.ts +20 -0
- package/dist/sstore/sutil.d.ts +16 -0
- package/dist/sstore/svf.d.ts +73 -0
- package/dist/utils/Config.d.ts +7 -0
- package/dist/utils/HttpConfig.d.ts +4 -0
- package/dist/utils/System.d.ts +71 -0
- package/dist/views/error/index.vue.d.ts +2 -0
- package/dist/views/layout/com/Header.vue.d.ts +2 -0
- package/dist/views/layout/com/Sidebar.vue.d.ts +2 -0
- package/dist/views/layout/index.vue.d.ts +2 -0
- package/dist/views/login/index.vue.d.ts +2 -0
- package/dist/views/pages/auth/api/index.vue.d.ts +2 -0
- package/dist/views/pages/auth/menu/com/addDialog.vue.d.ts +39 -0
- package/dist/views/pages/auth/menu/com/addIconItem.vue.d.ts +40 -0
- package/dist/views/pages/auth/menu/com/colorChoose.vue.d.ts +23 -0
- package/dist/views/pages/auth/menu/index.vue.d.ts +2 -0
- package/dist/views/pages/auth/role/index.vue.d.ts +2 -0
- package/dist/views/pages/auth/user/index.vue.d.ts +2 -0
- package/dist/views/pages/db/index.vue.d.ts +2 -0
- package/dist/views/pages/email/config/index.vue.d.ts +2 -0
- package/dist/views/pages/home/index.vue.d.ts +2 -0
- package/dist/views/pages/log/error/index.vue.d.ts +2 -0
- package/dist/views/pages/log/loginlog/index.vue.d.ts +2 -0
- package/dist/views/pages/schedule/job/index.vue.d.ts +2 -0
- package/dist/views/pages/sms/config/index.vue.d.ts +2 -0
- package/dist/views/pages/system/config/index.vue.d.ts +2 -0
- package/dist/views/pages/system/tenant/index.vue.d.ts +2 -0
- package/package.json +66 -0
|
@@ -0,0 +1,333 @@
|
|
|
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({
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(R) {
|
|
8
|
+
const t = StrUtil.getId(), m = N({
|
|
9
|
+
boxid: "canvas_snow-" + t,
|
|
10
|
+
itemid: "canvas_sakura-" + t
|
|
11
|
+
});
|
|
12
|
+
let g;
|
|
13
|
+
const y = () => {
|
|
14
|
+
const p = document.getElementById(m.boxid);
|
|
15
|
+
if (p) {
|
|
16
|
+
const h = p.getBoundingClientRect();
|
|
17
|
+
innerHeight = h.height, innerWidth = h.width;
|
|
18
|
+
let s = document.getElementById(m.itemid);
|
|
19
|
+
s.width = innerWidth, s.height = innerHeight;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return P(() => {
|
|
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;
|
|
28
|
+
};
|
|
29
|
+
r.prototype.draw = function(e) {
|
|
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
|
+
}, 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")));
|
|
33
|
+
};
|
|
34
|
+
let d = function() {
|
|
35
|
+
this.list = [];
|
|
36
|
+
};
|
|
37
|
+
d.prototype.push = function(e) {
|
|
38
|
+
this.list.push(e);
|
|
39
|
+
}, d.prototype.update = function() {
|
|
40
|
+
for (let e = 0, o = this.list.length; e < o; e++)
|
|
41
|
+
this.list[e].update();
|
|
42
|
+
}, d.prototype.draw = function(e) {
|
|
43
|
+
for (let o = 0, l = this.list.length; o < l; o++)
|
|
44
|
+
this.list[o].draw(e);
|
|
45
|
+
}, d.prototype.get = function(e) {
|
|
46
|
+
return this.list[e];
|
|
47
|
+
}, d.prototype.size = function() {
|
|
48
|
+
return this.list.length;
|
|
49
|
+
};
|
|
50
|
+
function i(e) {
|
|
51
|
+
let o, l;
|
|
52
|
+
switch (e) {
|
|
53
|
+
case "x":
|
|
54
|
+
o = Math.random() * s;
|
|
55
|
+
break;
|
|
56
|
+
case "y":
|
|
57
|
+
o = Math.random() * h;
|
|
58
|
+
break;
|
|
59
|
+
case "s":
|
|
60
|
+
o = Math.random();
|
|
61
|
+
break;
|
|
62
|
+
case "r":
|
|
63
|
+
o = Math.random() * 6;
|
|
64
|
+
break;
|
|
65
|
+
case "fnx":
|
|
66
|
+
l = -0.5 + Math.random() * 1, o = function(f, x) {
|
|
67
|
+
return f + 0.5 * l - 1.7;
|
|
68
|
+
};
|
|
69
|
+
break;
|
|
70
|
+
case "fny":
|
|
71
|
+
l = 1.5 + Math.random() * 0.7, o = function(f, x) {
|
|
72
|
+
return x + l;
|
|
73
|
+
};
|
|
74
|
+
break;
|
|
75
|
+
case "fnr":
|
|
76
|
+
l = Math.random() * 0.03, o = function(f) {
|
|
77
|
+
return f + l;
|
|
78
|
+
};
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return o;
|
|
82
|
+
}
|
|
83
|
+
function w() {
|
|
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");
|
|
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
|
|
93
|
+
}), x.draw(o), l.push(x);
|
|
94
|
+
}
|
|
95
|
+
g = function() {
|
|
96
|
+
o.clearRect(0, 0, e.width, e.height), l.update(), l.draw(o), requestAnimationFrame(g);
|
|
97
|
+
}, requestAnimationFrame(g);
|
|
98
|
+
}
|
|
99
|
+
n.onload = function() {
|
|
100
|
+
w();
|
|
101
|
+
}, window.addEventListener("resize", y);
|
|
102
|
+
}), D(() => {
|
|
103
|
+
window.removeEventListener("resize", y), window.cancelAnimationFrame(g);
|
|
104
|
+
let p = document.getElementById(m.itemid);
|
|
105
|
+
p?.parentNode?.removeChild(p);
|
|
106
|
+
}), (p, h) => (v(), k("div", {
|
|
107
|
+
id: m.boxid
|
|
108
|
+
}, null, 8, J));
|
|
109
|
+
}
|
|
110
|
+
}), Q = { class: "absolute fit" }, Z = { class: "login-icp" }, ee = { class: "ms-login" }, te = {
|
|
111
|
+
class: "row no-wrap",
|
|
112
|
+
style: { width: "100%" }
|
|
113
|
+
}, ne = {
|
|
114
|
+
class: "row no-wrap",
|
|
115
|
+
style: { width: "100%" }
|
|
116
|
+
}, oe = { class: "login-btn" }, ie = /* @__PURE__ */ z({
|
|
117
|
+
__name: "index",
|
|
118
|
+
setup(R) {
|
|
119
|
+
const t = N({
|
|
120
|
+
param: {
|
|
121
|
+
isPhone: !1,
|
|
122
|
+
login_name: "",
|
|
123
|
+
login_password: "",
|
|
124
|
+
phone: "",
|
|
125
|
+
code: ""
|
|
126
|
+
},
|
|
127
|
+
textCode: {
|
|
128
|
+
loading: !1,
|
|
129
|
+
text: "发送验证码",
|
|
130
|
+
status: !1
|
|
131
|
+
},
|
|
132
|
+
rules: {
|
|
133
|
+
login_name: [{ required: !0, message: "请输入用户名", trigger: "blur" }],
|
|
134
|
+
login_password: [{ required: !0, message: "请输入密码", trigger: "blur" }],
|
|
135
|
+
phone: [{ required: !0, message: "请输入手机号", trigger: "blur" }],
|
|
136
|
+
code: [{ required: !0, message: "请输入验证码", trigger: "blur" }]
|
|
137
|
+
},
|
|
138
|
+
loading: !1,
|
|
139
|
+
text: "登录"
|
|
140
|
+
});
|
|
141
|
+
$.clearInfo();
|
|
142
|
+
const m = H(), g = () => {
|
|
143
|
+
m.value.validate(async (s) => {
|
|
144
|
+
if (s) {
|
|
145
|
+
let n = t.param.isPhone ? {
|
|
146
|
+
phone: t.param.phone,
|
|
147
|
+
code: t.param.code
|
|
148
|
+
} : {
|
|
149
|
+
account: t.param.login_name,
|
|
150
|
+
password: t.param.login_password
|
|
151
|
+
};
|
|
152
|
+
t.loading = !0, t.text = "加载中";
|
|
153
|
+
const r = await j.login({
|
|
154
|
+
...n,
|
|
155
|
+
final(i, w, e) {
|
|
156
|
+
t.loading = !1, t.text = "登录";
|
|
157
|
+
}
|
|
158
|
+
});
|
|
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("/");
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
let y = null;
|
|
166
|
+
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(
|
|
168
|
+
() => {
|
|
169
|
+
let n = (/* @__PURE__ */ new Date()).getTime();
|
|
170
|
+
if (n - s > 0)
|
|
171
|
+
t.textCode.status = !1, Timer.un(y), t.textCode.text = "发送验证码";
|
|
172
|
+
else {
|
|
173
|
+
t.textCode.status = !0;
|
|
174
|
+
const r = (s - n) / 1e3;
|
|
175
|
+
t.textCode.text = r.toFixed(0) + "秒后再试";
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
1e3,
|
|
179
|
+
!0
|
|
180
|
+
));
|
|
181
|
+
}, h = async () => {
|
|
182
|
+
const s = await X.send({ type: 1, content: "1518079148@qq.com" });
|
|
183
|
+
console.log("res", s);
|
|
184
|
+
};
|
|
185
|
+
return P(() => {
|
|
186
|
+
p();
|
|
187
|
+
}), (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", {
|
|
190
|
+
class: "login-wrap",
|
|
191
|
+
style: K({ backgroundImage: `url(${I(C).staticDir + "/bg/g-1.jpg"})` })
|
|
192
|
+
}, [
|
|
193
|
+
c("div", Q, [
|
|
194
|
+
a(O, { class: "fit" })
|
|
195
|
+
]),
|
|
196
|
+
c("div", Z, [
|
|
197
|
+
c("div", null, _(I(C).config.website.author), 1),
|
|
198
|
+
c("div", null, _(I(C).config.website.recordNumber), 1)
|
|
199
|
+
]),
|
|
200
|
+
c("div", ee, [
|
|
201
|
+
n[9] || (n[9] = c("div", { class: "ms-title" }, "系统登陆", -1)),
|
|
202
|
+
a(w, {
|
|
203
|
+
model: t.param,
|
|
204
|
+
rules: t.rules,
|
|
205
|
+
ref_key: "login",
|
|
206
|
+
ref: m,
|
|
207
|
+
"label-width": "0px",
|
|
208
|
+
class: "ms-content"
|
|
209
|
+
}, {
|
|
210
|
+
default: u(() => [
|
|
211
|
+
t.param.isPhone ? (v(), k(B, { key: 1 }, [
|
|
212
|
+
a(i, { prop: "phone" }, {
|
|
213
|
+
default: u(() => [
|
|
214
|
+
a(d, {
|
|
215
|
+
modelValue: t.param.phone,
|
|
216
|
+
"onUpdate:modelValue": n[3] || (n[3] = (e) => t.param.phone = e),
|
|
217
|
+
placeholder: "手机号"
|
|
218
|
+
}, {
|
|
219
|
+
default: u(() => [
|
|
220
|
+
a(r, {
|
|
221
|
+
slot: "prepend",
|
|
222
|
+
icon: "el-icon-lx-people"
|
|
223
|
+
})
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, ["modelValue"])
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
}),
|
|
230
|
+
a(i, { prop: "code" }, {
|
|
231
|
+
default: u(() => [
|
|
232
|
+
c("div", ne, [
|
|
233
|
+
a(d, {
|
|
234
|
+
placeholder: "验证码",
|
|
235
|
+
modelValue: t.param.code,
|
|
236
|
+
"onUpdate:modelValue": n[4] || (n[4] = (e) => t.param.code = e),
|
|
237
|
+
onKeyup: n[5] || (n[5] = L((e) => g(), ["enter", "native"])),
|
|
238
|
+
class: "input-phone"
|
|
239
|
+
}, {
|
|
240
|
+
default: u(() => [
|
|
241
|
+
a(r, {
|
|
242
|
+
slot: "prepend",
|
|
243
|
+
icon: "el-icon-lx-lock"
|
|
244
|
+
})
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["modelValue"]),
|
|
248
|
+
a(r, {
|
|
249
|
+
loading: t.textCode.loading,
|
|
250
|
+
disabled: t.textCode.status,
|
|
251
|
+
type: "primary",
|
|
252
|
+
onClick: n[6] || (n[6] = (e) => h()),
|
|
253
|
+
style: { "border-radius": "0px 4px 4px 0px" }
|
|
254
|
+
}, {
|
|
255
|
+
default: u(() => [
|
|
256
|
+
q(_(t.textCode.text), 1)
|
|
257
|
+
]),
|
|
258
|
+
_: 1
|
|
259
|
+
}, 8, ["loading", "disabled"])
|
|
260
|
+
])
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
})
|
|
264
|
+
], 64)) : (v(), k(B, { key: 0 }, [
|
|
265
|
+
a(i, { prop: "login_name" }, {
|
|
266
|
+
default: u(() => [
|
|
267
|
+
a(d, {
|
|
268
|
+
modelValue: t.param.login_name,
|
|
269
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => t.param.login_name = e),
|
|
270
|
+
placeholder: "账号"
|
|
271
|
+
}, {
|
|
272
|
+
default: u(() => [
|
|
273
|
+
a(r, {
|
|
274
|
+
slot: "prepend",
|
|
275
|
+
icon: "el-icon-lx-people"
|
|
276
|
+
})
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 8, ["modelValue"])
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
}),
|
|
283
|
+
a(i, { prop: "login_password" }, {
|
|
284
|
+
default: u(() => [
|
|
285
|
+
c("div", te, [
|
|
286
|
+
a(d, {
|
|
287
|
+
type: "password",
|
|
288
|
+
placeholder: "密码",
|
|
289
|
+
modelValue: t.param.login_password,
|
|
290
|
+
"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])
|
|
293
|
+
}, {
|
|
294
|
+
default: u(() => [
|
|
295
|
+
a(r, {
|
|
296
|
+
slot: "prepend",
|
|
297
|
+
icon: "el-icon-lx-lock"
|
|
298
|
+
})
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
}, 8, ["modelValue", "class"])
|
|
302
|
+
])
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})
|
|
306
|
+
], 64)),
|
|
307
|
+
c("div", oe, [
|
|
308
|
+
a(r, {
|
|
309
|
+
type: "primary",
|
|
310
|
+
onClick: n[7] || (n[7] = (e) => g()),
|
|
311
|
+
loading: t.loading
|
|
312
|
+
}, {
|
|
313
|
+
default: u(() => [
|
|
314
|
+
q(_(t.text), 1)
|
|
315
|
+
]),
|
|
316
|
+
_: 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)
|
|
322
|
+
])
|
|
323
|
+
]),
|
|
324
|
+
_: 1
|
|
325
|
+
}, 8, ["model", "rules"])
|
|
326
|
+
])
|
|
327
|
+
], 4);
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}), de = /* @__PURE__ */ G(ie, [["__scopeId", "data-v-9b624341"]]);
|
|
331
|
+
export {
|
|
332
|
+
de as default
|
|
333
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as d, resolveComponent as s, openBlock as m, createBlock as u, withCtx as o, createVNode as r, createElementVNode as e, unref as t, toDisplayString as i } from "vue";
|
|
2
|
+
import { System as f, suser as c } from "./cc1-admin-front.js";
|
|
3
|
+
import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const v = { class: "user-info" }, h = ["src"], g = { class: "user-info-cont" }, x = { class: "user-info-name" }, k = /* @__PURE__ */ d({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(w) {
|
|
7
|
+
return (C, n) => {
|
|
8
|
+
const l = s("el-card"), a = s("el-col"), _ = s("el-row");
|
|
9
|
+
return m(), u(_, { gutter: 20 }, {
|
|
10
|
+
default: o(() => [
|
|
11
|
+
r(a, null, {
|
|
12
|
+
default: o(() => [
|
|
13
|
+
r(l, {
|
|
14
|
+
shadow: "hover",
|
|
15
|
+
class: "mgb20"
|
|
16
|
+
}, {
|
|
17
|
+
default: o(() => [
|
|
18
|
+
e("div", v, [
|
|
19
|
+
e("img", {
|
|
20
|
+
src: t(f).staticDir + "/images/head.jpg",
|
|
21
|
+
class: "user-avator",
|
|
22
|
+
alt: ""
|
|
23
|
+
}, null, 8, h),
|
|
24
|
+
e("div", g, [
|
|
25
|
+
e("div", x, i(t(c).userInfo.nickname), 1),
|
|
26
|
+
e("div", null, "欢迎" + i(t(c).userInfo.nickname) + "进入后台管理", 1)
|
|
27
|
+
])
|
|
28
|
+
]),
|
|
29
|
+
n[0] || (n[0] = e("div", { class: "user-info-list" }, [
|
|
30
|
+
e("div", { class: "user-info-list-item" }, [
|
|
31
|
+
e("div", { class: "user-info-list-item-label" }, "欢迎使用后台管理系统,左侧导航栏可快速访问各模块")
|
|
32
|
+
])
|
|
33
|
+
], -1))
|
|
34
|
+
]),
|
|
35
|
+
_: 1,
|
|
36
|
+
__: [0]
|
|
37
|
+
})
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
})
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}), B = /* @__PURE__ */ p(k, [["__scopeId", "data-v-28a63a57"]]);
|
|
47
|
+
export {
|
|
48
|
+
B as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent as m, reactive as u, resolveComponent as _, openBlock as f, createElementBlock as x, createVNode as c, withCtx as s, createTextVNode as a } from "vue";
|
|
2
|
+
import { TSys as i } from "cc1-form";
|
|
3
|
+
class p {
|
|
4
|
+
static export(e) {
|
|
5
|
+
return http.post("/db/export", e);
|
|
6
|
+
}
|
|
7
|
+
static import(e) {
|
|
8
|
+
return http.post({
|
|
9
|
+
url: "/db/import",
|
|
10
|
+
headers: {
|
|
11
|
+
"Content-Type": "multipart/form-data"
|
|
12
|
+
}
|
|
13
|
+
}, e);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const C = { class: "row" }, w = /* @__PURE__ */ m({
|
|
17
|
+
__name: "index",
|
|
18
|
+
setup(l) {
|
|
19
|
+
const e = u({
|
|
20
|
+
import: () => {
|
|
21
|
+
const t = document.createElement("input");
|
|
22
|
+
t.type = "file", t.accept = ".json,application/json", t.onchange = async (o) => {
|
|
23
|
+
const n = o.target.files[0];
|
|
24
|
+
if (!n) return;
|
|
25
|
+
const r = new FileReader();
|
|
26
|
+
r.onload = async (k) => {
|
|
27
|
+
try {
|
|
28
|
+
await p.import({ file: n }), i.success("导入覆盖成功");
|
|
29
|
+
} catch (d) {
|
|
30
|
+
console.error("上传的文件不是合法JSON", d);
|
|
31
|
+
}
|
|
32
|
+
}, r.readAsText(n);
|
|
33
|
+
}, t.click();
|
|
34
|
+
},
|
|
35
|
+
export: async () => {
|
|
36
|
+
const { data: t } = await p.export();
|
|
37
|
+
i.success("备份成功" + t, {
|
|
38
|
+
duration: 3e3
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return (t, o) => {
|
|
43
|
+
const n = _("el-button");
|
|
44
|
+
return f(), x("div", C, [
|
|
45
|
+
c(n, {
|
|
46
|
+
onClick: e.export
|
|
47
|
+
}, {
|
|
48
|
+
default: s(() => o[0] || (o[0] = [
|
|
49
|
+
a("备份数据", -1)
|
|
50
|
+
])),
|
|
51
|
+
_: 1,
|
|
52
|
+
__: [0]
|
|
53
|
+
}, 8, ["onClick"]),
|
|
54
|
+
c(n, {
|
|
55
|
+
onClick: e.import
|
|
56
|
+
}, {
|
|
57
|
+
default: s(() => o[1] || (o[1] = [
|
|
58
|
+
a("导入覆盖", -1)
|
|
59
|
+
])),
|
|
60
|
+
_: 1,
|
|
61
|
+
__: [1]
|
|
62
|
+
}, 8, ["onClick"])
|
|
63
|
+
]);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
w as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as k, reactive as w, resolveComponent as f, openBlock as m, createBlock as r, withCtx as a, createTextVNode as s, createCommentVNode as F, renderSlot as h, unref as y, watch as p } from "vue";
|
|
2
|
+
import { ssys as g, ERouter as T } from "./cc1-admin-front.js";
|
|
3
|
+
import { TSys as $ } from "cc1-form";
|
|
4
|
+
const b = /* @__PURE__ */ k({
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
row: {
|
|
8
|
+
default: {}
|
|
9
|
+
},
|
|
10
|
+
field: {
|
|
11
|
+
default: "value"
|
|
12
|
+
},
|
|
13
|
+
itemFields: {
|
|
14
|
+
default: []
|
|
15
|
+
},
|
|
16
|
+
imgField: {
|
|
17
|
+
default: ""
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
emits: ["change"],
|
|
21
|
+
setup(e, { emit: i }) {
|
|
22
|
+
const o = e, u = i, x = w({
|
|
23
|
+
upload: {
|
|
24
|
+
handler: (l) => {
|
|
25
|
+
g.upload.handler({
|
|
26
|
+
callback: (t) => {
|
|
27
|
+
l[o.imgField] = t, u("change");
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return (l, t) => {
|
|
34
|
+
const c = f("el-button"), C = f("TFormList");
|
|
35
|
+
return m(), r(C, {
|
|
36
|
+
row: e.row,
|
|
37
|
+
field: e.field,
|
|
38
|
+
itemFields: e.itemFields,
|
|
39
|
+
onChange: t[0] || (t[0] = (n) => u("change", n))
|
|
40
|
+
}, {
|
|
41
|
+
"item-end": a(({ item: n }) => [
|
|
42
|
+
e.imgField ? (m(), r(c, {
|
|
43
|
+
key: 0,
|
|
44
|
+
link: "",
|
|
45
|
+
type: "primary",
|
|
46
|
+
onClick: (v) => x.upload.handler(n)
|
|
47
|
+
}, {
|
|
48
|
+
default: a(() => t[1] || (t[1] = [
|
|
49
|
+
s("上传图片", -1)
|
|
50
|
+
])),
|
|
51
|
+
_: 2,
|
|
52
|
+
__: [1]
|
|
53
|
+
}, 1032, ["onClick"])) : F("", !0),
|
|
54
|
+
h(l.$slots, "item-end", { item: n }, () => [
|
|
55
|
+
e.imgField ? (m(), r(c, {
|
|
56
|
+
key: 0,
|
|
57
|
+
link: "",
|
|
58
|
+
type: "primary",
|
|
59
|
+
onClick: (v) => y(g).preview.open(
|
|
60
|
+
e.row[e.field].map((d) => d[e.imgField]),
|
|
61
|
+
e.row[e.field].findIndex((d) => d[e.imgField] === n[e.imgField])
|
|
62
|
+
)
|
|
63
|
+
}, {
|
|
64
|
+
default: a(() => t[2] || (t[2] = [
|
|
65
|
+
s(" 查看图片 ", -1)
|
|
66
|
+
])),
|
|
67
|
+
_: 2,
|
|
68
|
+
__: [2]
|
|
69
|
+
}, 1032, ["onClick"])) : F("", !0)
|
|
70
|
+
])
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 8, ["row", "field", "itemFields"]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}), E = /* @__PURE__ */ k({
|
|
77
|
+
__name: "index",
|
|
78
|
+
setup(e) {
|
|
79
|
+
return p(
|
|
80
|
+
() => $.router.currentRoute.value.path,
|
|
81
|
+
(i, o) => {
|
|
82
|
+
CEvent.emit(T.change, i);
|
|
83
|
+
},
|
|
84
|
+
{ immediate: !0 }
|
|
85
|
+
), (i, o) => null;
|
|
86
|
+
}
|
|
87
|
+
}), L = (e) => {
|
|
88
|
+
e.component("xRouteEvent", E), e.component("xFormList", b);
|
|
89
|
+
}, S = {
|
|
90
|
+
install: L
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
S as default,
|
|
94
|
+
L as install
|
|
95
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { defineComponent as s, reactive as n, resolveComponent as r, openBlock as i, createBlock as p } from "vue";
|
|
2
|
+
import { ApiAuthUser as c, ApiAuthRole as u, scurd as m } from "./cc1-admin-front.js";
|
|
3
|
+
import { TSys as o } from "cc1-form";
|
|
4
|
+
const k = /* @__PURE__ */ s({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(f) {
|
|
7
|
+
const e = n({
|
|
8
|
+
data: [],
|
|
9
|
+
roleList: [],
|
|
10
|
+
option: {
|
|
11
|
+
api: c,
|
|
12
|
+
data(a) {
|
|
13
|
+
return a;
|
|
14
|
+
},
|
|
15
|
+
form: {
|
|
16
|
+
openBefore: async (a, l) => {
|
|
17
|
+
if (e.roleList.length === 0) {
|
|
18
|
+
o.loading();
|
|
19
|
+
let t = await u.list({
|
|
20
|
+
final(d, b, y) {
|
|
21
|
+
o.loading(!1);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
console.log("res.data", t.data), e.roleList = t.data;
|
|
25
|
+
}
|
|
26
|
+
m.setOptionsData(e.option, "roleList", e.roleList);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
search: {
|
|
30
|
+
show: !1
|
|
31
|
+
},
|
|
32
|
+
table: {
|
|
33
|
+
selectable: !0,
|
|
34
|
+
border: !0
|
|
35
|
+
},
|
|
36
|
+
tools: {
|
|
37
|
+
export: {
|
|
38
|
+
fileName: () => `用户列表_${(/* @__PURE__ */ new Date()).getTime()}`
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
column: [
|
|
42
|
+
{
|
|
43
|
+
key: "account",
|
|
44
|
+
label: "账号",
|
|
45
|
+
type: "input",
|
|
46
|
+
value: "",
|
|
47
|
+
sort: {
|
|
48
|
+
table: 1
|
|
49
|
+
},
|
|
50
|
+
form: {
|
|
51
|
+
span: 12
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: "status",
|
|
56
|
+
label: "状态",
|
|
57
|
+
type: "switch",
|
|
58
|
+
value: 1,
|
|
59
|
+
options: {
|
|
60
|
+
switch: {
|
|
61
|
+
activeValue: 1,
|
|
62
|
+
activeLabel: "启用",
|
|
63
|
+
inactiveValue: 0,
|
|
64
|
+
inactiveLabel: "禁用"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
sort: {
|
|
68
|
+
table: 2
|
|
69
|
+
},
|
|
70
|
+
form: {
|
|
71
|
+
span: 12
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "nickname",
|
|
76
|
+
label: "昵称",
|
|
77
|
+
type: "input",
|
|
78
|
+
value: "",
|
|
79
|
+
sort: {
|
|
80
|
+
table: 1
|
|
81
|
+
},
|
|
82
|
+
form: {
|
|
83
|
+
span: 12
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: "phone",
|
|
88
|
+
label: "手机号",
|
|
89
|
+
type: "input",
|
|
90
|
+
value: "",
|
|
91
|
+
sort: {
|
|
92
|
+
table: 3
|
|
93
|
+
},
|
|
94
|
+
form: {
|
|
95
|
+
span: 12
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: "desc",
|
|
100
|
+
label: "简介",
|
|
101
|
+
type: "input",
|
|
102
|
+
value: "",
|
|
103
|
+
show: {
|
|
104
|
+
table: !1
|
|
105
|
+
},
|
|
106
|
+
form: {
|
|
107
|
+
span: 12
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "roleList",
|
|
112
|
+
label: "角色列表",
|
|
113
|
+
type: "tree-select",
|
|
114
|
+
value: [],
|
|
115
|
+
options: {
|
|
116
|
+
treeSelect: {
|
|
117
|
+
data: [],
|
|
118
|
+
multiple: !0,
|
|
119
|
+
collapseTags: !0,
|
|
120
|
+
maxCollapseTags: 4
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
show: {
|
|
124
|
+
table: !1
|
|
125
|
+
},
|
|
126
|
+
form: {
|
|
127
|
+
span: 12
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
return (a, l) => {
|
|
134
|
+
const t = r("t-curd");
|
|
135
|
+
return i(), p(t, {
|
|
136
|
+
option: e.option
|
|
137
|
+
}, null, 8, ["option"]);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
export {
|
|
142
|
+
k as default
|
|
143
|
+
};
|