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,113 @@
|
|
|
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";
|
|
3
|
+
import "cc1-form";
|
|
4
|
+
const k = /* @__PURE__ */ r({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(b) {
|
|
7
|
+
const l = c({
|
|
8
|
+
option: {
|
|
9
|
+
api: y,
|
|
10
|
+
data(t) {
|
|
11
|
+
return t.forEach((e) => {
|
|
12
|
+
e.createTime = new Date(e.createTime).Format(), e.status = e.status ? "成功" : "失败";
|
|
13
|
+
}), t;
|
|
14
|
+
},
|
|
15
|
+
table: {
|
|
16
|
+
selectable: !0,
|
|
17
|
+
column: [
|
|
18
|
+
{
|
|
19
|
+
key: "createTime",
|
|
20
|
+
label: "登录时间",
|
|
21
|
+
type: "input",
|
|
22
|
+
value: "",
|
|
23
|
+
table: {
|
|
24
|
+
width: "180px"
|
|
25
|
+
},
|
|
26
|
+
sort: {
|
|
27
|
+
table: 1
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
tools: {
|
|
33
|
+
add: !1,
|
|
34
|
+
update: !1,
|
|
35
|
+
delete(t) {
|
|
36
|
+
return h.hasApi("/auth/loginLog/delete");
|
|
37
|
+
},
|
|
38
|
+
export: {
|
|
39
|
+
fileName: () => `登录日志_${(/* @__PURE__ */ new Date()).getTime()}`
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
column: [
|
|
43
|
+
{
|
|
44
|
+
key: "account",
|
|
45
|
+
label: "登录账号",
|
|
46
|
+
type: "input",
|
|
47
|
+
value: "",
|
|
48
|
+
show: {
|
|
49
|
+
search: !0
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "ip",
|
|
54
|
+
label: "IP地址",
|
|
55
|
+
type: "input",
|
|
56
|
+
value: "",
|
|
57
|
+
show: {
|
|
58
|
+
search: !0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "os",
|
|
63
|
+
label: "操作系统",
|
|
64
|
+
type: "input",
|
|
65
|
+
value: ""
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: "status",
|
|
69
|
+
label: "登录状态",
|
|
70
|
+
type: "switch",
|
|
71
|
+
value: 0,
|
|
72
|
+
show: {
|
|
73
|
+
search: !0
|
|
74
|
+
},
|
|
75
|
+
options: {
|
|
76
|
+
switch: {
|
|
77
|
+
activeLabel: "成功",
|
|
78
|
+
inactiveLabel: "失败"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: "msg",
|
|
84
|
+
label: "失败原因",
|
|
85
|
+
type: "input",
|
|
86
|
+
value: ""
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return (t, e) => {
|
|
92
|
+
const n = o("el-tag"), p = o("t-curd");
|
|
93
|
+
return u(), i(p, {
|
|
94
|
+
option: l.option
|
|
95
|
+
}, {
|
|
96
|
+
"table-status": s(({ row: a }) => [
|
|
97
|
+
m(n, {
|
|
98
|
+
type: a.status === "成功" ? "success" : "danger"
|
|
99
|
+
}, {
|
|
100
|
+
default: s(() => [
|
|
101
|
+
_(d(a.status), 1)
|
|
102
|
+
]),
|
|
103
|
+
_: 2
|
|
104
|
+
}, 1032, ["type"])
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["option"]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
k as default
|
|
113
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { defineComponent as u, reactive as c, resolveComponent as m, openBlock as f, createBlock as y } from "vue";
|
|
2
|
+
import { ApiAuthRole as L, ApiAuthMenu as h, ssys as i, ApiAuthApi as b, scurd as l } from "./cc1-admin-front.js";
|
|
3
|
+
import { TSys as s } from "cc1-form";
|
|
4
|
+
const _ = /* @__PURE__ */ u({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(d) {
|
|
7
|
+
const e = c({
|
|
8
|
+
menuList: [],
|
|
9
|
+
apiList: [],
|
|
10
|
+
roleList: [],
|
|
11
|
+
option: {
|
|
12
|
+
api: L,
|
|
13
|
+
data(t) {
|
|
14
|
+
return e.roleList = t, t;
|
|
15
|
+
},
|
|
16
|
+
search: {
|
|
17
|
+
show: !1
|
|
18
|
+
},
|
|
19
|
+
table: {
|
|
20
|
+
border: !0
|
|
21
|
+
},
|
|
22
|
+
tools: {
|
|
23
|
+
export: {
|
|
24
|
+
show: !1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
column: [
|
|
28
|
+
{
|
|
29
|
+
key: "title",
|
|
30
|
+
label: "名称",
|
|
31
|
+
type: "input",
|
|
32
|
+
value: "",
|
|
33
|
+
rules: !0
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "type",
|
|
37
|
+
label: "角色标识",
|
|
38
|
+
type: "input",
|
|
39
|
+
value: "",
|
|
40
|
+
rules: !0
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: "status",
|
|
44
|
+
label: "状态",
|
|
45
|
+
type: "switch",
|
|
46
|
+
value: 1,
|
|
47
|
+
options: {
|
|
48
|
+
switch: {
|
|
49
|
+
activeValue: 1,
|
|
50
|
+
activeLabel: "启用",
|
|
51
|
+
inactiveValue: 0,
|
|
52
|
+
inactiveLabel: "禁用"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "sort",
|
|
58
|
+
label: "排序",
|
|
59
|
+
type: "input",
|
|
60
|
+
value: 0,
|
|
61
|
+
form: {
|
|
62
|
+
span: 12
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "roleList",
|
|
67
|
+
label: "角色列表",
|
|
68
|
+
type: "tree-select",
|
|
69
|
+
value: [],
|
|
70
|
+
options: {
|
|
71
|
+
treeSelect: {
|
|
72
|
+
data: [],
|
|
73
|
+
multiple: !0,
|
|
74
|
+
collapseTags: !0,
|
|
75
|
+
maxCollapseTags: 4
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
show: {
|
|
79
|
+
table: !1
|
|
80
|
+
},
|
|
81
|
+
form: {
|
|
82
|
+
span: 12
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: "menuList",
|
|
87
|
+
label: "菜单列表",
|
|
88
|
+
type: "tree-select",
|
|
89
|
+
value: [],
|
|
90
|
+
options: {
|
|
91
|
+
treeSelect: {
|
|
92
|
+
data: [],
|
|
93
|
+
multiple: !0,
|
|
94
|
+
collapseTags: !0,
|
|
95
|
+
maxCollapseTags: 4
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
show: {
|
|
99
|
+
table: !1
|
|
100
|
+
},
|
|
101
|
+
form: {
|
|
102
|
+
span: 12
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: "apiList",
|
|
107
|
+
label: "接口列表",
|
|
108
|
+
type: "tree-select",
|
|
109
|
+
value: [],
|
|
110
|
+
options: {
|
|
111
|
+
treeSelect: {
|
|
112
|
+
data: [],
|
|
113
|
+
multiple: !0,
|
|
114
|
+
collapseTags: !0,
|
|
115
|
+
maxCollapseTags: 4,
|
|
116
|
+
checkStrictly: !1
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
show: {
|
|
120
|
+
table: !1
|
|
121
|
+
},
|
|
122
|
+
form: {
|
|
123
|
+
span: 12
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
form: {
|
|
128
|
+
openBefore: async (t, o) => {
|
|
129
|
+
if (t || (o.form.sort = e.roleList.length + 1), e.menuList.length === 0) {
|
|
130
|
+
s.loading();
|
|
131
|
+
let a = await h.list({
|
|
132
|
+
final(r, n, p) {
|
|
133
|
+
s.loading(!1);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
e.menuList = i.getTableTree(a.data), a = await b.list({
|
|
137
|
+
final(r, n, p) {
|
|
138
|
+
s.loading(!1);
|
|
139
|
+
}
|
|
140
|
+
}), e.apiList = i.getTableTree(a.data);
|
|
141
|
+
}
|
|
142
|
+
l.setOptionsData(e.option, "menuList", e.menuList), l.setOptionsData(e.option, "apiList", e.apiList), l.setOptionsData(e.option, "roleList", e.roleList);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
return (t, o) => {
|
|
148
|
+
const a = m("t-curd");
|
|
149
|
+
return f(), y(a, {
|
|
150
|
+
option: e.option
|
|
151
|
+
}, null, 8, ["option"]);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
export {
|
|
156
|
+
_ as default
|
|
157
|
+
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { defineComponent as b, reactive as m, resolveComponent as u, openBlock as d, createBlock as y, withCtx as t, createVNode as n, createTextVNode as p } from "vue";
|
|
2
|
+
import { ElMessageBox as k } from "element-plus";
|
|
3
|
+
import { ApiErrorLog as v } from "./cc1-admin-front.js";
|
|
4
|
+
import "cc1-form";
|
|
5
|
+
const T = /* @__PURE__ */ b({
|
|
6
|
+
__name: "index",
|
|
7
|
+
setup(f) {
|
|
8
|
+
const o = (l, e = "内容") => {
|
|
9
|
+
k.alert(
|
|
10
|
+
`<div style="white-space: pre-wrap; width: 1000px; word-break: break-all;">${l}</div>`,
|
|
11
|
+
e,
|
|
12
|
+
{
|
|
13
|
+
confirmButtonText: "确定",
|
|
14
|
+
dangerouslyUseHTMLString: !0
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}, s = m({
|
|
18
|
+
option: {
|
|
19
|
+
api: v,
|
|
20
|
+
data(l) {
|
|
21
|
+
return l.forEach((e) => {
|
|
22
|
+
e.createTime = new Date(e.createTime).Format();
|
|
23
|
+
}), l;
|
|
24
|
+
},
|
|
25
|
+
table: {
|
|
26
|
+
selectable: !0,
|
|
27
|
+
column: [
|
|
28
|
+
{
|
|
29
|
+
key: "createTime",
|
|
30
|
+
label: "创建时间",
|
|
31
|
+
type: "input",
|
|
32
|
+
value: "",
|
|
33
|
+
table: {
|
|
34
|
+
width: "180px"
|
|
35
|
+
},
|
|
36
|
+
sort: {
|
|
37
|
+
table: 1
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "status",
|
|
42
|
+
label: "状态码",
|
|
43
|
+
type: "input",
|
|
44
|
+
value: "",
|
|
45
|
+
table: {
|
|
46
|
+
width: "100px"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
tools: {
|
|
52
|
+
add: !1,
|
|
53
|
+
update: !1,
|
|
54
|
+
export: {
|
|
55
|
+
fileName: () => `错误日志_${(/* @__PURE__ */ new Date()).getTime()}`
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
column: [
|
|
59
|
+
{
|
|
60
|
+
key: "ip",
|
|
61
|
+
label: "IP地址",
|
|
62
|
+
type: "input",
|
|
63
|
+
value: "",
|
|
64
|
+
show: {
|
|
65
|
+
search: !0
|
|
66
|
+
},
|
|
67
|
+
table: {
|
|
68
|
+
width: "120px",
|
|
69
|
+
align: "left"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "path",
|
|
74
|
+
label: "请求路径",
|
|
75
|
+
type: "input",
|
|
76
|
+
value: "",
|
|
77
|
+
show: {
|
|
78
|
+
search: !0
|
|
79
|
+
},
|
|
80
|
+
table: {
|
|
81
|
+
minWidth: "180px",
|
|
82
|
+
align: "left"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: "method",
|
|
87
|
+
label: "请求方法",
|
|
88
|
+
type: "select",
|
|
89
|
+
value: "",
|
|
90
|
+
show: {
|
|
91
|
+
search: !0
|
|
92
|
+
},
|
|
93
|
+
table: {
|
|
94
|
+
minWidth: "100px"
|
|
95
|
+
},
|
|
96
|
+
options: {
|
|
97
|
+
select: {
|
|
98
|
+
data: [
|
|
99
|
+
{ label: "GET", value: "GET" },
|
|
100
|
+
{ label: "POST", value: "POST" },
|
|
101
|
+
{ label: "PUT", value: "PUT" },
|
|
102
|
+
{ label: "DELETE", value: "DELETE" }
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: "params",
|
|
109
|
+
label: "请求参数",
|
|
110
|
+
type: "input",
|
|
111
|
+
value: "",
|
|
112
|
+
table: {
|
|
113
|
+
slot: !0
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "userAgent",
|
|
118
|
+
label: "用户代理",
|
|
119
|
+
type: "input",
|
|
120
|
+
value: ""
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
key: "error",
|
|
124
|
+
label: "错误信息",
|
|
125
|
+
type: "input",
|
|
126
|
+
value: "",
|
|
127
|
+
show: {
|
|
128
|
+
search: !0
|
|
129
|
+
},
|
|
130
|
+
table: {
|
|
131
|
+
minWidth: "140px"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
key: "stack",
|
|
136
|
+
label: "错误堆栈",
|
|
137
|
+
type: "input",
|
|
138
|
+
value: "",
|
|
139
|
+
table: {
|
|
140
|
+
show: !1
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return (l, e) => {
|
|
147
|
+
const r = u("el-button"), c = u("t-curd");
|
|
148
|
+
return d(), y(c, {
|
|
149
|
+
option: s.option
|
|
150
|
+
}, {
|
|
151
|
+
"table-params": t(({ row: a }) => [
|
|
152
|
+
n(r, {
|
|
153
|
+
type: "primary",
|
|
154
|
+
link: "",
|
|
155
|
+
onClick: (i) => o(a.params, "请求参数")
|
|
156
|
+
}, {
|
|
157
|
+
default: t(() => e[0] || (e[0] = [
|
|
158
|
+
p("查看", -1)
|
|
159
|
+
])),
|
|
160
|
+
_: 2,
|
|
161
|
+
__: [0]
|
|
162
|
+
}, 1032, ["onClick"])
|
|
163
|
+
]),
|
|
164
|
+
"table-userAgent": t(({ row: a }) => [
|
|
165
|
+
n(r, {
|
|
166
|
+
type: "primary",
|
|
167
|
+
link: "",
|
|
168
|
+
onClick: (i) => o(a.userAgent, "用户代理")
|
|
169
|
+
}, {
|
|
170
|
+
default: t(() => e[1] || (e[1] = [
|
|
171
|
+
p("查看", -1)
|
|
172
|
+
])),
|
|
173
|
+
_: 2,
|
|
174
|
+
__: [1]
|
|
175
|
+
}, 1032, ["onClick"])
|
|
176
|
+
]),
|
|
177
|
+
"table-stack": t(({ row: a }) => [
|
|
178
|
+
n(r, {
|
|
179
|
+
type: "primary",
|
|
180
|
+
link: "",
|
|
181
|
+
onClick: (i) => o(a.stack, "错误堆栈")
|
|
182
|
+
}, {
|
|
183
|
+
default: t(() => e[2] || (e[2] = [
|
|
184
|
+
p("查看", -1)
|
|
185
|
+
])),
|
|
186
|
+
_: 2,
|
|
187
|
+
__: [2]
|
|
188
|
+
}, 1032, ["onClick"])
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["option"]);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
export {
|
|
196
|
+
T as default
|
|
197
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { defineComponent as m, reactive as y, resolveComponent as p, openBlock as b, createBlock as f, withCtx as n, createTextVNode as s, toDisplayString as v, createVNode as r } from "vue";
|
|
2
|
+
import { ApiSmsConfig as u } from "./cc1-admin-front.js";
|
|
3
|
+
import { TSys as d } from "cc1-form";
|
|
4
|
+
const x = /* @__PURE__ */ m({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(h) {
|
|
7
|
+
const t = y({
|
|
8
|
+
param: {
|
|
9
|
+
phone: "",
|
|
10
|
+
code: "123456"
|
|
11
|
+
},
|
|
12
|
+
option: {
|
|
13
|
+
api: u,
|
|
14
|
+
data(a) {
|
|
15
|
+
return a.forEach((e) => {
|
|
16
|
+
e.createTime = new Date(e.createTime).Format();
|
|
17
|
+
}), a;
|
|
18
|
+
},
|
|
19
|
+
table: {
|
|
20
|
+
selectable: !0,
|
|
21
|
+
column: [
|
|
22
|
+
{
|
|
23
|
+
key: "createTime",
|
|
24
|
+
label: "创建时间",
|
|
25
|
+
type: "input",
|
|
26
|
+
value: "",
|
|
27
|
+
table: {
|
|
28
|
+
width: "180px"
|
|
29
|
+
},
|
|
30
|
+
sort: {
|
|
31
|
+
table: 1
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
tools: {
|
|
37
|
+
export: {
|
|
38
|
+
fileName: () => `短信配置_${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
39
|
+
before(a) {
|
|
40
|
+
const e = {
|
|
41
|
+
true: "是",
|
|
42
|
+
false: "否"
|
|
43
|
+
};
|
|
44
|
+
a.data.forEach((l) => {
|
|
45
|
+
l.enabled = e[l.enabled + ""];
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
column: [
|
|
51
|
+
{
|
|
52
|
+
key: "provider",
|
|
53
|
+
label: "短信服务商",
|
|
54
|
+
type: "select",
|
|
55
|
+
value: "",
|
|
56
|
+
show: {
|
|
57
|
+
search: !0
|
|
58
|
+
},
|
|
59
|
+
options: {
|
|
60
|
+
select: {
|
|
61
|
+
data: [
|
|
62
|
+
{ label: "阿里云", value: "ALIYUN" },
|
|
63
|
+
{ label: "腾讯云", value: "TENCENT" }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: "accessKeyId",
|
|
70
|
+
label: "AccessKey",
|
|
71
|
+
type: "input",
|
|
72
|
+
value: ""
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "accessKeySecret",
|
|
76
|
+
label: "Secret",
|
|
77
|
+
type: "input",
|
|
78
|
+
value: "",
|
|
79
|
+
disabled: {
|
|
80
|
+
update: !0
|
|
81
|
+
},
|
|
82
|
+
show: {
|
|
83
|
+
table: !1
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: "signName",
|
|
88
|
+
label: "短信签名",
|
|
89
|
+
type: "input",
|
|
90
|
+
value: ""
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: "templateId",
|
|
94
|
+
label: "短信模板ID",
|
|
95
|
+
type: "input",
|
|
96
|
+
value: ""
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: "sdkAppId",
|
|
100
|
+
label: "应用ID",
|
|
101
|
+
type: "input",
|
|
102
|
+
value: ""
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "signId",
|
|
106
|
+
label: "签名ID",
|
|
107
|
+
type: "input",
|
|
108
|
+
value: ""
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "enabled",
|
|
112
|
+
label: "启用状态",
|
|
113
|
+
type: "switch",
|
|
114
|
+
value: !1,
|
|
115
|
+
show: {
|
|
116
|
+
search: !0
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "desc",
|
|
121
|
+
label: "备注",
|
|
122
|
+
type: "input",
|
|
123
|
+
value: "",
|
|
124
|
+
update: {
|
|
125
|
+
span: 12
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
sms: {
|
|
131
|
+
async send() {
|
|
132
|
+
if (!t.param.phone) {
|
|
133
|
+
d.success("请输入手机号码");
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
await u.send({
|
|
137
|
+
phone: t.param.phone,
|
|
138
|
+
templateParam: {
|
|
139
|
+
code: t.param.code
|
|
140
|
+
}
|
|
141
|
+
}), d.success("发送成功");
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
return (a, e) => {
|
|
146
|
+
const l = p("el-input"), c = p("el-button"), i = p("t-curd");
|
|
147
|
+
return b(), f(i, {
|
|
148
|
+
option: t.option
|
|
149
|
+
}, {
|
|
150
|
+
"tools-right": n(() => [
|
|
151
|
+
r(l, {
|
|
152
|
+
modelValue: t.param.phone,
|
|
153
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => t.param.phone = o),
|
|
154
|
+
placeholder: "手机号码",
|
|
155
|
+
style: { width: "150px" }
|
|
156
|
+
}, null, 8, ["modelValue"]),
|
|
157
|
+
r(l, {
|
|
158
|
+
modelValue: t.param.code,
|
|
159
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => t.param.code = o),
|
|
160
|
+
placeholder: "验证码",
|
|
161
|
+
style: { width: "100px" }
|
|
162
|
+
}, null, 8, ["modelValue"]),
|
|
163
|
+
r(c, {
|
|
164
|
+
type: "danger",
|
|
165
|
+
onClick: t.sms.send
|
|
166
|
+
}, {
|
|
167
|
+
default: n(() => e[2] || (e[2] = [
|
|
168
|
+
s("发送短信测试", -1)
|
|
169
|
+
])),
|
|
170
|
+
_: 1,
|
|
171
|
+
__: [2]
|
|
172
|
+
}, 8, ["onClick"])
|
|
173
|
+
]),
|
|
174
|
+
"table-provider": n(({ row: o }) => [
|
|
175
|
+
s(v(o.provider === "ALIYUN" ? "阿里云" : "腾讯云"), 1)
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}, 8, ["option"]);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
export {
|
|
183
|
+
x as default
|
|
184
|
+
};
|