befly-admin-ui 1.18.0 → 1.19.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/components/pageTableDetail.vue +2 -2
- package/layouts/default.vue +3 -3
- package/package.json +1 -1
- package/views/config/dict/components/edit.vue +1 -1
- package/views/config/dict/index.vue +1 -2
- package/views/config/dictType/components/edit.vue +1 -1
- package/views/config/dictType/index.vue +1 -1
- package/views/config/system/components/edit.vue +1 -1
- package/views/config/system/index.vue +1 -1
- package/views/index/components/environmentInfo.vue +1 -1
- package/views/index/components/projectStats.vue +1 -1
- package/views/index/components/serviceStatus.vue +1 -1
- package/views/index/components/systemOverview.vue +1 -1
- package/views/index/components/systemResources.vue +1 -1
- package/views/log/email/index.vue +3 -4
- package/views/log/error/index.vue +0 -1
- package/views/log/login/index.vue +1 -2
- package/views/log/operate/index.vue +0 -1
- package/views/login_1/index.vue +1 -1
- package/views/people/admin/components/edit.vue +2 -2
- package/views/people/admin/index.vue +1 -2
- package/views/permission/api/index.vue +1 -1
- package/views/permission/menu/index.vue +1 -1
- package/views/permission/role/components/api.vue +3 -3
- package/views/permission/role/components/edit.vue +1 -1
- package/views/permission/role/components/menu.vue +3 -3
- package/views/permission/role/index.vue +1 -2
- package/views/resource/gallery/index.vue +0 -1
|
@@ -252,7 +252,7 @@ const $Method = {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
const res = await $Http
|
|
255
|
+
const res = await $Http(listEndpoint.path, data, Array.isArray(listEndpoint.dropValues) ? ["", ...listEndpoint.dropValues] : [""], listEndpoint.dropKeyValue);
|
|
256
256
|
|
|
257
257
|
if (seq !== $From.requestSeq) {
|
|
258
258
|
return;
|
|
@@ -406,7 +406,7 @@ const $Method = {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
await $Http
|
|
409
|
+
await $Http(ep.path, data, ep.dropValues, ep.dropKeyValue);
|
|
410
410
|
|
|
411
411
|
MessagePlugin.success("删除成功");
|
|
412
412
|
destroy();
|
package/layouts/default.vue
CHANGED
|
@@ -183,7 +183,7 @@ const $Method = {
|
|
|
183
183
|
},
|
|
184
184
|
fetchUserInfo: async function () {
|
|
185
185
|
try {
|
|
186
|
-
const res = await $Http
|
|
186
|
+
const res = await $Http("/core/admin/detail", {}, [""]);
|
|
187
187
|
const userInfo = res?.data && typeof res.data === "object" ? res.data : {};
|
|
188
188
|
|
|
189
189
|
$Data.userInfo.nickname = userInfo.nickname || "管理员";
|
|
@@ -197,7 +197,7 @@ const $Method = {
|
|
|
197
197
|
},
|
|
198
198
|
fetchUserMenus: async function () {
|
|
199
199
|
try {
|
|
200
|
-
const { data } = await $Http
|
|
200
|
+
const { data } = await $Http("/core/menu/all", {}, [""]);
|
|
201
201
|
const lists = Array.isArray(data?.lists) ? data.lists : [];
|
|
202
202
|
|
|
203
203
|
const normalizedLists = lists.map((menu) => {
|
|
@@ -341,7 +341,7 @@ const $Method = {
|
|
|
341
341
|
const hashedPassword = await hashPassword($Data.passwordForm.password);
|
|
342
342
|
const storedPassword = await hashPassword(hashedPassword);
|
|
343
343
|
|
|
344
|
-
await $Http
|
|
344
|
+
await $Http("/core/admin/update", {
|
|
345
345
|
id: $Data.userInfo.id,
|
|
346
346
|
password: storedPassword
|
|
347
347
|
});
|
package/package.json
CHANGED
|
@@ -118,7 +118,7 @@ const $Method = {
|
|
|
118
118
|
params["id"] = $Prop.rowData.id;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
await $Http
|
|
121
|
+
await $Http(apiUrl, params);
|
|
122
122
|
MessagePlugin.success($Prop.actionType === "add" ? "添加成功" : "更新成功");
|
|
123
123
|
$Computed.visible = false;
|
|
124
124
|
$Emit("success");
|
|
@@ -70,7 +70,6 @@ const $Data = reactive({
|
|
|
70
70
|
endpoints: {
|
|
71
71
|
list: {
|
|
72
72
|
path: "/core/dict/select",
|
|
73
|
-
dropValues: [""],
|
|
74
73
|
buildData: () => {
|
|
75
74
|
return {
|
|
76
75
|
typeCode: $Data.searchTypeCode,
|
|
@@ -108,7 +107,7 @@ const $Method = {
|
|
|
108
107
|
},
|
|
109
108
|
apiDictTypeAll: async function () {
|
|
110
109
|
try {
|
|
111
|
-
const res = await $Http
|
|
110
|
+
const res = await $Http("/core/dictType/all", {}, [""]);
|
|
112
111
|
$Data.typeList = res.data.lists || [];
|
|
113
112
|
} catch (error) {
|
|
114
113
|
MessagePlugin.error(error.msg || error.message || "加载数据失败");
|
|
@@ -109,7 +109,7 @@ const $Method = {
|
|
|
109
109
|
params["id"] = $Prop.rowData.id;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
await $Http
|
|
112
|
+
await $Http(apiUrl, params);
|
|
113
113
|
MessagePlugin.success($Prop.actionType === "add" ? "添加成功" : "更新成功");
|
|
114
114
|
$Computed.visible = false;
|
|
115
115
|
$Emit("success");
|
|
@@ -159,7 +159,7 @@ const $Method = {
|
|
|
159
159
|
$Data.submitting = true;
|
|
160
160
|
try {
|
|
161
161
|
const api = $Prop.actionType === "upd" ? "/core/sysConfig/update" : "/core/sysConfig/insert";
|
|
162
|
-
await $Http
|
|
162
|
+
await $Http(api, $Data.formData);
|
|
163
163
|
|
|
164
164
|
MessagePlugin.success($Prop.actionType === "upd" ? "编辑成功" : "添加成功");
|
|
165
165
|
$Emit("success");
|
|
@@ -92,7 +92,7 @@ const $Data = reactive({
|
|
|
92
92
|
const $Method = {
|
|
93
93
|
fetchData: async function () {
|
|
94
94
|
try {
|
|
95
|
-
const res = await $Http
|
|
95
|
+
const res = await $Http("/core/dashboard/environmentInfo", {}, [""]);
|
|
96
96
|
Object.assign($Data.environmentInfo, res.data);
|
|
97
97
|
} catch (_error) {
|
|
98
98
|
// 静默失败:不阻断页面展示
|
|
@@ -228,7 +228,7 @@ const $Method = {
|
|
|
228
228
|
},
|
|
229
229
|
fetchData: async function () {
|
|
230
230
|
try {
|
|
231
|
-
const onlineStatsRes = await $Http
|
|
231
|
+
const onlineStatsRes = await $Http("/core/tongJi/onlineStats", {}, [""]);
|
|
232
232
|
$Data.productState.options = $Method.mapProjectRows(onlineStatsRes.data);
|
|
233
233
|
} catch (_error) {
|
|
234
234
|
// 静默失败:不阻断页面展示
|
|
@@ -57,7 +57,7 @@ const $Const = {
|
|
|
57
57
|
const $Method = {
|
|
58
58
|
fetchData: async function () {
|
|
59
59
|
try {
|
|
60
|
-
const res = await $Http
|
|
60
|
+
const res = await $Http("/core/dashboard/serviceStatus", {}, [""]);
|
|
61
61
|
const nextServices = Array.isArray(res.data?.services) ? res.data.services.filter((service) => service?.name !== "OSS存储") : [];
|
|
62
62
|
$Data.services.splice(0, $Data.services.length, ...nextServices);
|
|
63
63
|
} catch (_error) {
|
|
@@ -74,7 +74,7 @@ const $Data = reactive({
|
|
|
74
74
|
const $Method = {
|
|
75
75
|
fetchData: async function () {
|
|
76
76
|
try {
|
|
77
|
-
const [overviewRes, errorStatsRes] = await Promise.all([$Http
|
|
77
|
+
const [overviewRes, errorStatsRes] = await Promise.all([$Http("/core/dashboard/systemOverview", {}, [""]), $Http("/core/tongJi/errorStats", {}, [""])]);
|
|
78
78
|
|
|
79
79
|
Object.assign($Data.permissionStats, overviewRes.data);
|
|
80
80
|
$Data.errorStats.trend = Array.isArray(errorStatsRes.data?.trend) ? errorStatsRes.data.trend : [];
|
|
@@ -61,7 +61,7 @@ const $Data = reactive({
|
|
|
61
61
|
const $Method = {
|
|
62
62
|
fetchData: async function () {
|
|
63
63
|
try {
|
|
64
|
-
const res = await $Http
|
|
64
|
+
const res = await $Http("/core/dashboard/systemResources", {}, [""]);
|
|
65
65
|
Object.assign($Data.systemResources, res.data);
|
|
66
66
|
} catch (_error) {
|
|
67
67
|
// 静默失败:不阻断页面展示
|
|
@@ -116,8 +116,7 @@ const $Data = reactive({
|
|
|
116
116
|
]),
|
|
117
117
|
endpoints: {
|
|
118
118
|
list: {
|
|
119
|
-
path: "/core/email/logList"
|
|
120
|
-
dropValues: [""]
|
|
119
|
+
path: "/core/email/logList"
|
|
121
120
|
}
|
|
122
121
|
},
|
|
123
122
|
sendDialogVisible: false,
|
|
@@ -145,7 +144,7 @@ const $Method = {
|
|
|
145
144
|
|
|
146
145
|
$Data.sending = true;
|
|
147
146
|
try {
|
|
148
|
-
await $Http
|
|
147
|
+
await $Http("/core/email/send", {
|
|
149
148
|
to: $Data.sendForm.to,
|
|
150
149
|
subject: $Data.sendForm.subject,
|
|
151
150
|
content: $Data.sendForm.content,
|
|
@@ -170,7 +169,7 @@ const $Method = {
|
|
|
170
169
|
},
|
|
171
170
|
onVerify: async function () {
|
|
172
171
|
try {
|
|
173
|
-
await $Http
|
|
172
|
+
await $Http("/core/email/verify");
|
|
174
173
|
MessagePlugin.success("邮件服务配置正常");
|
|
175
174
|
} catch (error) {
|
|
176
175
|
MessagePlugin.error(error.msg || error.message || "验证失败");
|
package/views/login_1/index.vue
CHANGED
|
@@ -121,7 +121,7 @@ const $Method = {
|
|
|
121
121
|
|
|
122
122
|
const hashedPassword = await hashPassword($Data.formData.password);
|
|
123
123
|
|
|
124
|
-
const res = await $Http
|
|
124
|
+
const res = await $Http("/core/auth/login", {
|
|
125
125
|
loginType: $Data.formData.loginType,
|
|
126
126
|
account: $Data.formData.account,
|
|
127
127
|
password: hashedPassword
|
|
@@ -123,7 +123,7 @@ const $Method = {
|
|
|
123
123
|
},
|
|
124
124
|
apiRoleLists: async function () {
|
|
125
125
|
try {
|
|
126
|
-
const result = await $Http
|
|
126
|
+
const result = await $Http("/core/role/all", {}, [""]);
|
|
127
127
|
const roleList = Array.isArray(result.data?.lists) ? result.data.lists : [];
|
|
128
128
|
$Type.roleOptions = roleList.map((item) => {
|
|
129
129
|
return {
|
|
@@ -166,7 +166,7 @@ const $Method = {
|
|
|
166
166
|
formData.password = await hashPassword(password);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
const result = await $Http
|
|
169
|
+
const result = await $Http($Computed.isUpdate ? "/core/admin/update" : "/core/admin/insert", formData);
|
|
170
170
|
|
|
171
171
|
MessagePlugin.success(result.msg);
|
|
172
172
|
$Emit("success");
|
|
@@ -83,7 +83,7 @@ const $Method = {
|
|
|
83
83
|
loadApiAll: async function () {
|
|
84
84
|
$Data.loading = true;
|
|
85
85
|
try {
|
|
86
|
-
const res = await $Http
|
|
86
|
+
const res = await $Http("/core/api/all", {}, [""]);
|
|
87
87
|
const list = res.data?.lists || [];
|
|
88
88
|
$Data.allData = list;
|
|
89
89
|
$Data.tableData = list;
|
|
@@ -59,7 +59,7 @@ const $Method = {
|
|
|
59
59
|
apiMenuList: async function () {
|
|
60
60
|
$Data.loading = true;
|
|
61
61
|
try {
|
|
62
|
-
const res = await $Http
|
|
62
|
+
const res = await $Http("/core/menu/all", {}, [""]);
|
|
63
63
|
const lists = Array.isArray(res?.data?.lists) ? res.data.lists : [];
|
|
64
64
|
|
|
65
65
|
const treeResult = arrayToTree(lists, "path", "parentPath", "children", "sort");
|
|
@@ -100,7 +100,7 @@ const $Method = {
|
|
|
100
100
|
},
|
|
101
101
|
apiApiAll: async function () {
|
|
102
102
|
try {
|
|
103
|
-
const res = await $Http
|
|
103
|
+
const res = await $Http("/core/api/all", {}, [""]);
|
|
104
104
|
|
|
105
105
|
const apiMap = new Map();
|
|
106
106
|
const resRecord = res && typeof res === "object" ? res : null;
|
|
@@ -159,7 +159,7 @@ const $Method = {
|
|
|
159
159
|
if (!$Prop.rowData.id) return;
|
|
160
160
|
|
|
161
161
|
try {
|
|
162
|
-
const res = await $Http
|
|
162
|
+
const res = await $Http(
|
|
163
163
|
"/core/role/apis",
|
|
164
164
|
{
|
|
165
165
|
roleCode: $Prop.rowData.code
|
|
@@ -204,7 +204,7 @@ const $Method = {
|
|
|
204
204
|
try {
|
|
205
205
|
$Data.submitting = true;
|
|
206
206
|
|
|
207
|
-
await $Http
|
|
207
|
+
await $Http("/core/role/apiSave", {
|
|
208
208
|
roleCode: $Prop.rowData.code,
|
|
209
209
|
apiPaths: $Data.checkedApiPaths
|
|
210
210
|
});
|
|
@@ -128,7 +128,7 @@ const $Method = {
|
|
|
128
128
|
|
|
129
129
|
$Data.submitting = true;
|
|
130
130
|
const formData = $Prop.actionType === "add" ? fieldClear($Data.formData, { omitKeys: ["id", "state"] }) : $Data.formData;
|
|
131
|
-
const res = await $Http
|
|
131
|
+
const res = await $Http($Prop.actionType === "upd" ? "/core/role/update" : "/core/role/insert", formData);
|
|
132
132
|
|
|
133
133
|
MessagePlugin.success(res.msg);
|
|
134
134
|
$Emit("success");
|
|
@@ -77,7 +77,7 @@ const $Method = {
|
|
|
77
77
|
},
|
|
78
78
|
apiMenuAll: async function () {
|
|
79
79
|
try {
|
|
80
|
-
const res = await $Http
|
|
80
|
+
const res = await $Http("/core/menu/all", {}, [""]);
|
|
81
81
|
const lists = Array.isArray(res?.data?.lists) ? res.data.lists : [];
|
|
82
82
|
|
|
83
83
|
const treeResult = arrayToTree(lists, "path", "parentPath", "children", "sort");
|
|
@@ -129,7 +129,7 @@ const $Method = {
|
|
|
129
129
|
if (!$Prop.rowData.id) return;
|
|
130
130
|
|
|
131
131
|
try {
|
|
132
|
-
const res = await $Http
|
|
132
|
+
const res = await $Http(
|
|
133
133
|
"/core/role/menus",
|
|
134
134
|
{
|
|
135
135
|
roleCode: $Prop.rowData.code
|
|
@@ -171,7 +171,7 @@ const $Method = {
|
|
|
171
171
|
try {
|
|
172
172
|
$Data.submitting = true;
|
|
173
173
|
|
|
174
|
-
await $Http
|
|
174
|
+
await $Http("/core/role/menuSave", {
|
|
175
175
|
roleCode: $Prop.rowData.code,
|
|
176
176
|
menuPaths: $Data.checkedMenuPaths
|
|
177
177
|
});
|