cc1-admin-front 1.0.6 → 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.
- package/README.md +5 -1
- package/dist/apis/auth/ApiAuthPermission.d.ts +4 -0
- package/dist/apis/auth/ApiAuthRole.d.ts +4 -6
- package/dist/apis/auth/ApiAuthSession.d.ts +4 -0
- package/dist/apis/auth/ApiAuthUser.d.ts +2 -0
- package/dist/cc1-admin-front.css +1 -1
- package/dist/cc1-admin-front.js +25 -959
- package/dist/cc1-admin-front.umd.cjs +1 -1
- package/dist/{index-CatA5C4N.js → index-BHBDmhpM.js} +19 -15
- package/dist/{index-Aa_qAwSq.js → index-BKc52gsM.js} +69 -68
- package/dist/{index-DWmZQOPc.js → index-BNytnHfT.js} +62 -56
- package/dist/index-BbdDqL4R.js +106 -0
- package/dist/{index-D8U8yEvx.js → index-Bh99swBg.js} +9 -9
- package/dist/index-BsUQc1tS.js +72 -0
- package/dist/index-C0dTAIw4.js +182 -0
- package/dist/{index-pxgBPi_e.js → index-CEaedSLk.js} +21 -19
- package/dist/{index-DU5RPuKk.js → index-Cb9bja8p.js} +11 -11
- package/dist/index-CsUs4AR_.js +42 -0
- package/dist/{index-C8fkVOS0.js → index-CvtY70Y6.js} +16 -12
- package/dist/{index-rOyW50AB.js → index-CwyxJHDj.js} +34 -29
- package/dist/index-D3OkO10X.js +933 -0
- package/dist/{index-D6cX_pp2.js → index-DIRWVvKY.js} +27 -22
- package/dist/index-DPSZh1Ve.js +123 -0
- package/dist/{index-DzI5GwAU.js → index-E8d5Pz2_.js} +29 -25
- package/dist/{index-D47lvu37.js → index-SLpgD5v0.js} +81 -89
- package/dist/{index-DvZhYqrw.js → index-t7D_zBIH.js} +13 -12
- package/dist/index.d.ts +3 -3
- package/dist/plugins/directive.d.ts +1 -1
- package/dist/sstore/ssys.d.ts +0 -3
- package/dist/sstore/suser.d.ts +52 -9
- package/package.json +1 -1
- package/dist/apis/auth/ApiAuthApi.d.ts +0 -7
- package/dist/apis/system/ApiSystemTenant.d.ts +0 -6
- package/dist/index-BTuR22Wh.js +0 -41
- package/dist/index-CRagZR_l.js +0 -160
- package/dist/index-D7Xyt6lh.js +0 -180
- package/dist/index-DFNCjb_F.js +0 -69
- package/dist/index-Dejkixap.js +0 -181
- package/dist/index-uPQ6O40Q.js +0 -180
- package/dist/views/pages/system/tenant/index.vue.d.ts +0 -2
- /package/dist/views/pages/auth/{api → permission}/index.vue.d.ts +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { TSys as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as f, reactive as h, resolveComponent as p, openBlock as r, createBlock as d, withCtx as s, createTextVNode as u, toDisplayString as v, createVNode as c, unref as k, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { m as i, h as n } from "./index-D3OkO10X.js";
|
|
3
|
+
import { TSys as m } from "cc1-form";
|
|
4
|
+
const N = /* @__PURE__ */ f({
|
|
5
5
|
__name: "index",
|
|
6
|
-
setup(
|
|
7
|
-
const t =
|
|
6
|
+
setup(g) {
|
|
7
|
+
const t = h({
|
|
8
8
|
param: {
|
|
9
9
|
phone: "",
|
|
10
10
|
code: "123456"
|
|
11
11
|
},
|
|
12
12
|
option: {
|
|
13
|
-
api:
|
|
13
|
+
api: i,
|
|
14
14
|
data(a) {
|
|
15
15
|
return a.forEach((e) => {
|
|
16
16
|
e.createTime = new Date(e.createTime).Format();
|
|
@@ -18,6 +18,8 @@ const x = /* @__PURE__ */ m({
|
|
|
18
18
|
},
|
|
19
19
|
table: {
|
|
20
20
|
selectable: !0,
|
|
21
|
+
update: () => n("/sms/config/update"),
|
|
22
|
+
delete: () => n("/sms/config/delete"),
|
|
21
23
|
column: [
|
|
22
24
|
{
|
|
23
25
|
key: "createTime",
|
|
@@ -34,6 +36,8 @@ const x = /* @__PURE__ */ m({
|
|
|
34
36
|
]
|
|
35
37
|
},
|
|
36
38
|
tools: {
|
|
39
|
+
add: () => n("/sms/config/create"),
|
|
40
|
+
delete: () => n("/sms/config/delete"),
|
|
37
41
|
export: {
|
|
38
42
|
fileName: () => `短信配置_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
39
43
|
before(a) {
|
|
@@ -130,49 +134,50 @@ const x = /* @__PURE__ */ m({
|
|
|
130
134
|
sms: {
|
|
131
135
|
async send() {
|
|
132
136
|
if (!t.param.phone) {
|
|
133
|
-
|
|
137
|
+
m.success("请输入手机号码");
|
|
134
138
|
return;
|
|
135
139
|
}
|
|
136
|
-
await
|
|
140
|
+
await i.send({
|
|
137
141
|
phone: t.param.phone,
|
|
138
142
|
templateParam: {
|
|
139
143
|
code: t.param.code
|
|
140
144
|
}
|
|
141
|
-
}),
|
|
145
|
+
}), m.success("发送成功");
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
});
|
|
145
149
|
return (a, e) => {
|
|
146
|
-
const l = p("el-input"),
|
|
147
|
-
return
|
|
150
|
+
const l = p("el-input"), y = p("el-button"), b = p("t-curd");
|
|
151
|
+
return r(), d(b, {
|
|
148
152
|
option: t.option
|
|
149
153
|
}, {
|
|
150
|
-
"tools-right":
|
|
151
|
-
|
|
154
|
+
"tools-right": s(() => [
|
|
155
|
+
c(l, {
|
|
152
156
|
modelValue: t.param.phone,
|
|
153
157
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => t.param.phone = o),
|
|
154
158
|
placeholder: "手机号码",
|
|
155
159
|
style: { width: "150px" }
|
|
156
160
|
}, null, 8, ["modelValue"]),
|
|
157
|
-
|
|
161
|
+
c(l, {
|
|
158
162
|
modelValue: t.param.code,
|
|
159
163
|
"onUpdate:modelValue": e[1] || (e[1] = (o) => t.param.code = o),
|
|
160
164
|
placeholder: "验证码",
|
|
161
165
|
style: { width: "100px" }
|
|
162
166
|
}, null, 8, ["modelValue"]),
|
|
163
|
-
r(
|
|
167
|
+
k(n)("/sms/config/send") ? (r(), d(y, {
|
|
168
|
+
key: 0,
|
|
164
169
|
type: "danger",
|
|
165
170
|
onClick: t.sms.send
|
|
166
171
|
}, {
|
|
167
|
-
default:
|
|
168
|
-
|
|
172
|
+
default: s(() => e[2] || (e[2] = [
|
|
173
|
+
u("发送短信测试", -1)
|
|
169
174
|
])),
|
|
170
175
|
_: 1,
|
|
171
176
|
__: [2]
|
|
172
|
-
}, 8, ["onClick"])
|
|
177
|
+
}, 8, ["onClick"])) : _("", !0)
|
|
173
178
|
]),
|
|
174
|
-
"table-provider":
|
|
175
|
-
|
|
179
|
+
"table-provider": s(({ row: o }) => [
|
|
180
|
+
u(v(o.provider === "ALIYUN" ? "阿里云" : "腾讯云"), 1)
|
|
176
181
|
]),
|
|
177
182
|
_: 1
|
|
178
183
|
}, 8, ["option"]);
|
|
@@ -180,5 +185,5 @@ const x = /* @__PURE__ */ m({
|
|
|
180
185
|
}
|
|
181
186
|
});
|
|
182
187
|
export {
|
|
183
|
-
|
|
188
|
+
N as default
|
|
184
189
|
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent as R, reactive as b, onMounted as h, resolveComponent as p, openBlock as d, createBlock as m, withCtx as g, createVNode as f, unref as y, createElementBlock as I, Fragment as v, renderList as _ } from "vue";
|
|
2
|
+
import { g as s, d as k, f as w, s as S, e as n, h as o, a as L } from "./index-D3OkO10X.js";
|
|
3
|
+
import "cc1-form";
|
|
4
|
+
const C = /* @__PURE__ */ R({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(x) {
|
|
7
|
+
const e = b({
|
|
8
|
+
menus: [],
|
|
9
|
+
permissions: [],
|
|
10
|
+
assignableRoles: [],
|
|
11
|
+
managerRoles: [],
|
|
12
|
+
managerRoleId: "",
|
|
13
|
+
optionsLoaded: !1,
|
|
14
|
+
option: {
|
|
15
|
+
api: s,
|
|
16
|
+
search: { show: !1 },
|
|
17
|
+
table: {
|
|
18
|
+
border: !0,
|
|
19
|
+
selectable: {
|
|
20
|
+
show: o("/auth/role/delete"),
|
|
21
|
+
selectable: (t) => t.canEdit === !0
|
|
22
|
+
},
|
|
23
|
+
update: (t) => t.canEdit === !0 && o("/auth/role/update"),
|
|
24
|
+
delete: (t) => t.canEdit === !0 && o("/auth/role/delete")
|
|
25
|
+
},
|
|
26
|
+
page: { show: !1 },
|
|
27
|
+
tools: {
|
|
28
|
+
add: () => o("/auth/role/create"),
|
|
29
|
+
delete: () => o("/auth/role/delete"),
|
|
30
|
+
export: { show: !1 }
|
|
31
|
+
},
|
|
32
|
+
column: [
|
|
33
|
+
{ key: "title", label: "名称", type: "input", value: "", rules: !0 },
|
|
34
|
+
{ key: "type", label: "角色标识", type: "input", value: "", rules: !0 },
|
|
35
|
+
{
|
|
36
|
+
key: "status",
|
|
37
|
+
label: "状态",
|
|
38
|
+
type: "switch",
|
|
39
|
+
value: 1,
|
|
40
|
+
options: { switch: { activeValue: 1, activeLabel: "启用", inactiveValue: 2, inactiveLabel: "禁用" } }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: "managerRoleId",
|
|
44
|
+
label: "管理角色",
|
|
45
|
+
type: "select",
|
|
46
|
+
value: "",
|
|
47
|
+
rules: !0,
|
|
48
|
+
show: { table: !1 },
|
|
49
|
+
options: { select: { data: [] } }
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "assignableRoleIds",
|
|
53
|
+
label: "可分配角色",
|
|
54
|
+
type: "treeSelect",
|
|
55
|
+
value: [],
|
|
56
|
+
show: { table: !1 },
|
|
57
|
+
options: { treeSelect: { data: [], multiple: !0, collapseTags: !0, checkStrictly: !0 } }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "menuIds",
|
|
61
|
+
label: "菜单范围",
|
|
62
|
+
type: "treeSelect",
|
|
63
|
+
value: [],
|
|
64
|
+
show: { table: !1 },
|
|
65
|
+
options: { treeSelect: { data: [], multiple: !0, collapseTags: !0 } }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: "permissionIds",
|
|
69
|
+
label: "URL 权限",
|
|
70
|
+
type: "treeSelect",
|
|
71
|
+
value: [],
|
|
72
|
+
show: { table: !1 },
|
|
73
|
+
options: { treeSelect: { data: [], multiple: !0, collapseTags: !0, checkStrictly: !0 } }
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
form: {
|
|
77
|
+
openBefore: async (t, l) => {
|
|
78
|
+
if (c(), !e.optionsLoaded) {
|
|
79
|
+
const [r, i, u] = await Promise.all([
|
|
80
|
+
k.list(),
|
|
81
|
+
w.list(),
|
|
82
|
+
s.assignable()
|
|
83
|
+
]);
|
|
84
|
+
e.menus = S.getTableTree(r.data), e.permissions = i.data.filter((a) => !a.system && !a.retired && a.status === 1).map((a) => ({ ...a, label: `${a.title} (${a.url})` })), e.assignableRoles = u.data.filter((a) => !a.system), e.optionsLoaded = !0;
|
|
85
|
+
}
|
|
86
|
+
l.form.managerRoleId ||= e.managerRoleId, s.setManagerRoleId(l.form.managerRoleId), n.setOptionsData(e.option, "managerRoleId", e.managerRoles), n.setOptionsData(e.option, "menuIds", e.menus), n.setOptionsData(e.option, "permissionIds", e.permissions), n.setOptionsData(e.option, "assignableRoleIds", e.assignableRoles);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}), c = () => {
|
|
91
|
+
e.managerRoles.length || (e.managerRoles = L.session.roleInfo.roles.map((t) => ({ label: t.title, value: t._id })), e.managerRoleId = e.managerRoles[0]?.value || "", s.setManagerRoleId(e.managerRoleId));
|
|
92
|
+
};
|
|
93
|
+
return h(c), (t, l) => {
|
|
94
|
+
const r = p("el-option"), i = p("el-select"), u = p("t-curd");
|
|
95
|
+
return d(), m(u, {
|
|
96
|
+
option: e.option
|
|
97
|
+
}, {
|
|
98
|
+
"tools-right": g(() => [
|
|
99
|
+
f(i, {
|
|
100
|
+
modelValue: e.managerRoleId,
|
|
101
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => e.managerRoleId = a),
|
|
102
|
+
placeholder: "选择当前管理角色",
|
|
103
|
+
style: { width: "220px" },
|
|
104
|
+
onChange: y(s).setManagerRoleId
|
|
105
|
+
}, {
|
|
106
|
+
default: g(() => [
|
|
107
|
+
(d(!0), I(v, null, _(e.managerRoles, (a) => (d(), m(r, {
|
|
108
|
+
key: a.value,
|
|
109
|
+
label: a.label,
|
|
110
|
+
value: a.value
|
|
111
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["modelValue", "onChange"])
|
|
115
|
+
]),
|
|
116
|
+
_: 1
|
|
117
|
+
}, 8, ["option"]);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
C as default
|
|
123
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as h, ref as g, reactive as R, onMounted as C, resolveComponent as n, openBlock as T, createBlock as q, withCtx as l, createVNode as a, createTextVNode as _, createElementVNode as F } from "vue";
|
|
2
|
+
import { b as p, a as b } from "./index-D3OkO10X.js";
|
|
3
3
|
import { TSys as i } from "cc1-form";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { useRoute as E } from "vue-router";
|
|
5
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const j = /* @__PURE__ */ h({
|
|
6
7
|
__name: "index",
|
|
7
|
-
setup(
|
|
8
|
-
const u = g(), f = g(), e =
|
|
8
|
+
setup(A) {
|
|
9
|
+
const u = g(), f = g(), V = E(), e = R({
|
|
9
10
|
activeTab: "profile",
|
|
10
11
|
profileLoading: !1,
|
|
11
12
|
passwordLoading: !1,
|
|
@@ -20,7 +21,7 @@ const E = /* @__PURE__ */ U({
|
|
|
20
21
|
newPassword: "",
|
|
21
22
|
confirmPassword: ""
|
|
22
23
|
}
|
|
23
|
-
}),
|
|
24
|
+
}), P = {
|
|
24
25
|
nickname: [
|
|
25
26
|
{ required: !0, message: "请输入昵称", trigger: "blur" },
|
|
26
27
|
{ max: 100, message: "昵称不能超过 100 个字符", trigger: "blur" }
|
|
@@ -33,11 +34,11 @@ const E = /* @__PURE__ */ U({
|
|
|
33
34
|
trigger: "blur"
|
|
34
35
|
}
|
|
35
36
|
]
|
|
36
|
-
},
|
|
37
|
+
}, y = {
|
|
37
38
|
oldPassword: [{ required: !0, message: "请输入原密码", trigger: "blur" }],
|
|
38
39
|
newPassword: [
|
|
39
40
|
{ required: !0, message: "请输入新密码", trigger: "blur" },
|
|
40
|
-
{ min:
|
|
41
|
+
{ min: 12, max: 128, message: "新密码长度必须为 12–128 位", trigger: "blur" }
|
|
41
42
|
],
|
|
42
43
|
confirmPassword: [
|
|
43
44
|
{ required: !0, message: "请再次输入新密码", trigger: "blur" },
|
|
@@ -48,7 +49,7 @@ const E = /* @__PURE__ */ U({
|
|
|
48
49
|
trigger: "blur"
|
|
49
50
|
}
|
|
50
51
|
]
|
|
51
|
-
},
|
|
52
|
+
}, v = async () => {
|
|
52
53
|
e.profileLoading = !0;
|
|
53
54
|
try {
|
|
54
55
|
const d = await p.profile();
|
|
@@ -61,7 +62,7 @@ const E = /* @__PURE__ */ U({
|
|
|
61
62
|
} finally {
|
|
62
63
|
e.profileLoading = !1;
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
+
}, x = async () => {
|
|
65
66
|
if (await u.value?.validate().catch(() => !1)) {
|
|
66
67
|
e.profileLoading = !0;
|
|
67
68
|
try {
|
|
@@ -75,30 +76,33 @@ const E = /* @__PURE__ */ U({
|
|
|
75
76
|
e.profileLoading = !1;
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
},
|
|
79
|
+
}, k = async () => {
|
|
79
80
|
if (await f.value?.validate().catch(() => !1)) {
|
|
80
81
|
e.passwordLoading = !0;
|
|
81
82
|
try {
|
|
82
|
-
await p.changePassword({
|
|
83
|
+
const d = await p.changePassword({
|
|
83
84
|
oldPassword: e.password.oldPassword,
|
|
84
85
|
newPassword: e.password.newPassword
|
|
85
|
-
})
|
|
86
|
+
});
|
|
87
|
+
b.setSession(d.data), i.success("密码修改成功"), await i.router.replace("/");
|
|
86
88
|
} finally {
|
|
87
89
|
e.passwordLoading = !1;
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
return C(() => {
|
|
94
|
+
V.query.firstPasswordChange === "1" && (e.activeTab = "password"), v();
|
|
95
|
+
}), (d, o) => {
|
|
96
|
+
const s = n("el-input"), t = n("el-form-item"), m = n("el-button"), w = n("el-form"), c = n("el-tab-pane"), L = n("el-tabs"), U = n("el-card");
|
|
97
|
+
return T(), q(U, {
|
|
94
98
|
class: "profile-card",
|
|
95
99
|
shadow: "never"
|
|
96
100
|
}, {
|
|
97
101
|
header: l(() => o[8] || (o[8] = [
|
|
98
|
-
|
|
102
|
+
F("div", { class: "card-title" }, "个人中心", -1)
|
|
99
103
|
])),
|
|
100
104
|
default: l(() => [
|
|
101
|
-
a(
|
|
105
|
+
a(L, {
|
|
102
106
|
modelValue: e.activeTab,
|
|
103
107
|
"onUpdate:modelValue": o[7] || (o[7] = (r) => e.activeTab = r)
|
|
104
108
|
}, {
|
|
@@ -112,7 +116,7 @@ const E = /* @__PURE__ */ U({
|
|
|
112
116
|
ref_key: "profileFormRef",
|
|
113
117
|
ref: u,
|
|
114
118
|
model: e.profile,
|
|
115
|
-
rules:
|
|
119
|
+
rules: P,
|
|
116
120
|
"label-width": "90px",
|
|
117
121
|
class: "profile-form"
|
|
118
122
|
}, {
|
|
@@ -177,7 +181,7 @@ const E = /* @__PURE__ */ U({
|
|
|
177
181
|
a(m, {
|
|
178
182
|
type: "primary",
|
|
179
183
|
loading: e.profileLoading,
|
|
180
|
-
onClick:
|
|
184
|
+
onClick: x
|
|
181
185
|
}, {
|
|
182
186
|
default: l(() => o[9] || (o[9] = [
|
|
183
187
|
_("保存修改", -1)
|
|
@@ -203,7 +207,7 @@ const E = /* @__PURE__ */ U({
|
|
|
203
207
|
ref_key: "passwordFormRef",
|
|
204
208
|
ref: f,
|
|
205
209
|
model: e.password,
|
|
206
|
-
rules:
|
|
210
|
+
rules: y,
|
|
207
211
|
"label-width": "90px",
|
|
208
212
|
class: "profile-form"
|
|
209
213
|
}, {
|
|
@@ -258,7 +262,7 @@ const E = /* @__PURE__ */ U({
|
|
|
258
262
|
a(m, {
|
|
259
263
|
type: "primary",
|
|
260
264
|
loading: e.passwordLoading,
|
|
261
|
-
onClick:
|
|
265
|
+
onClick: k
|
|
262
266
|
}, {
|
|
263
267
|
default: l(() => o[10] || (o[10] = [
|
|
264
268
|
_("修改密码", -1)
|
|
@@ -283,7 +287,7 @@ const E = /* @__PURE__ */ U({
|
|
|
283
287
|
});
|
|
284
288
|
};
|
|
285
289
|
}
|
|
286
|
-
}),
|
|
290
|
+
}), $ = /* @__PURE__ */ N(j, [["__scopeId", "data-v-de5241e6"]]);
|
|
287
291
|
export {
|
|
288
|
-
|
|
292
|
+
$ as default
|
|
289
293
|
};
|