调整数据库表的单复数
This commit is contained in:
@@ -35,72 +35,72 @@ export default {
|
||||
},
|
||||
|
||||
// 用户管理
|
||||
users: {
|
||||
user: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/users", { params });
|
||||
return await request.get("auth/user", { params });
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`auth/users/${id}`);
|
||||
return await request.get(`auth/user/${id}`);
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/users", params);
|
||||
return await request.post("auth/user", params);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`auth/users/${id}`, params);
|
||||
return await request.put(`auth/user/${id}`, params);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`auth/users/${id}`);
|
||||
return await request.delete(`auth/user/${id}`);
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/users/batch-delete", params);
|
||||
return await request.post("auth/user/batch-delete", params);
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/users/batch-status", params);
|
||||
return await request.post("auth/user/batch-status", params);
|
||||
},
|
||||
},
|
||||
batchDepartment: {
|
||||
post: async function (params) {
|
||||
return await request.post(
|
||||
"auth/users/batch-department",
|
||||
"auth/user/batch-department",
|
||||
params,
|
||||
);
|
||||
},
|
||||
},
|
||||
batchRoles: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/users/batch-roles", params);
|
||||
return await request.post("auth/user/batch-roles", params);
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/users/export", params, {
|
||||
return await request.post("auth/user/export", params, {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post("auth/users/import", formData, {
|
||||
return await request.post("auth/user/import", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get("auth/users/download-template", {
|
||||
return await request.get("auth/user/download-template", {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
@@ -108,28 +108,28 @@ export default {
|
||||
},
|
||||
|
||||
// 在线用户管理
|
||||
onlineUsers: {
|
||||
onlineUser: {
|
||||
count: {
|
||||
get: async function () {
|
||||
return await request.get("auth/online-users/count");
|
||||
return await request.get("auth/online-user/count");
|
||||
},
|
||||
},
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/online-users", { params });
|
||||
return await request.get("auth/online-user", { params });
|
||||
},
|
||||
},
|
||||
sessions: {
|
||||
get: async function (userId) {
|
||||
return await request.get(
|
||||
`auth/online-users/${userId}/sessions`,
|
||||
`auth/online-user/${userId}/sessions`,
|
||||
);
|
||||
},
|
||||
},
|
||||
offline: {
|
||||
post: async function (userId, params) {
|
||||
return await request.post(
|
||||
`auth/online-users/${userId}/offline`,
|
||||
`auth/online-user/${userId}/offline`,
|
||||
params,
|
||||
);
|
||||
},
|
||||
@@ -137,92 +137,92 @@ export default {
|
||||
offlineAll: {
|
||||
post: async function (userId) {
|
||||
return await request.post(
|
||||
`auth/online-users/${userId}/offline-all`,
|
||||
`auth/online-user/${userId}/offline-all`,
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// 角色管理
|
||||
roles: {
|
||||
role: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/roles", { params });
|
||||
return await request.get("auth/role", { params });
|
||||
},
|
||||
},
|
||||
all: {
|
||||
get: async function () {
|
||||
return await request.get("auth/roles/all");
|
||||
return await request.get("auth/role/all");
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`auth/roles/${id}`);
|
||||
return await request.get(`auth/role/${id}`);
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/roles", params);
|
||||
return await request.post("auth/role", params);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`auth/roles/${id}`, params);
|
||||
return await request.put(`auth/role/${id}`, params);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`auth/roles/${id}`);
|
||||
return await request.delete(`auth/role/${id}`);
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/roles/batch-delete", params);
|
||||
return await request.post("auth/role/batch-delete", params);
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/roles/batch-status", params);
|
||||
return await request.post("auth/role/batch-status", params);
|
||||
},
|
||||
},
|
||||
permissions: {
|
||||
get: async function (id) {
|
||||
return await request.get(`auth/roles/${id}/permissions`);
|
||||
return await request.get(`auth/role/${id}/permissions`);
|
||||
},
|
||||
post: async function (id, params) {
|
||||
return await request.post(
|
||||
`auth/roles/${id}/permissions`,
|
||||
`auth/role/${id}/permissions`,
|
||||
params,
|
||||
);
|
||||
},
|
||||
},
|
||||
copy: {
|
||||
post: async function (id, params) {
|
||||
return await request.post(`auth/roles/${id}/copy`, params);
|
||||
return await request.post(`auth/role/${id}/copy`, params);
|
||||
},
|
||||
},
|
||||
batchCopy: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/roles/batch-copy", params);
|
||||
return await request.post("auth/role/batch-copy", params);
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/roles/export", params, {
|
||||
return await request.post("auth/role/export", params, {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post("auth/roles/import", formData, {
|
||||
return await request.post("auth/role/import", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get("auth/roles/download-template", {
|
||||
return await request.get("auth/role/download-template", {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
@@ -230,46 +230,46 @@ export default {
|
||||
},
|
||||
|
||||
// 权限管理
|
||||
permissions: {
|
||||
permission: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/permissions", { params });
|
||||
return await request.get("auth/permission", { params });
|
||||
},
|
||||
},
|
||||
tree: {
|
||||
get: async function () {
|
||||
return await request.get("auth/permissions/tree");
|
||||
return await request.get("auth/permission/tree");
|
||||
},
|
||||
},
|
||||
menu: {
|
||||
get: async function () {
|
||||
return await request.get("auth/permissions/menu");
|
||||
return await request.get("auth/permission/menu");
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`auth/permissions/${id}`);
|
||||
return await request.get(`auth/permission/${id}`);
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/permissions", params);
|
||||
return await request.post("auth/permission", params);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`auth/permissions/${id}`, params);
|
||||
return await request.put(`auth/permission/${id}`, params);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`auth/permissions/${id}`);
|
||||
return await request.delete(`auth/permission/${id}`);
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post(
|
||||
"auth/permissions/batch-delete",
|
||||
"auth/permission/batch-delete",
|
||||
params,
|
||||
);
|
||||
},
|
||||
@@ -277,28 +277,28 @@ export default {
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post(
|
||||
"auth/permissions/batch-status",
|
||||
"auth/permission/batch-status",
|
||||
params,
|
||||
);
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/permissions/export", params, {
|
||||
return await request.post("auth/permission/export", params, {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post("auth/permissions/import", formData, {
|
||||
return await request.post("auth/permission/import", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get("auth/permissions/download-template", {
|
||||
return await request.get("auth/permission/download-template", {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
@@ -306,46 +306,46 @@ export default {
|
||||
},
|
||||
|
||||
// 部门管理
|
||||
departments: {
|
||||
department: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/departments", { params });
|
||||
return await request.get("auth/department", { params });
|
||||
},
|
||||
},
|
||||
tree: {
|
||||
get: async function (params) {
|
||||
return await request.get("auth/departments/tree", { params });
|
||||
return await request.get("auth/department/tree", { params });
|
||||
},
|
||||
},
|
||||
all: {
|
||||
get: async function () {
|
||||
return await request.get("auth/departments/all");
|
||||
return await request.get("auth/department/all");
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`auth/departments/${id}`);
|
||||
return await request.get(`auth/department/${id}`);
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/departments", params);
|
||||
return await request.post("auth/department", params);
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`auth/departments/${id}`, params);
|
||||
return await request.put(`auth/department/${id}`, params);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`auth/departments/${id}`);
|
||||
return await request.delete(`auth/department/${id}`);
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post(
|
||||
"auth/departments/batch-delete",
|
||||
"auth/department/batch-delete",
|
||||
params,
|
||||
);
|
||||
},
|
||||
@@ -353,28 +353,28 @@ export default {
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post(
|
||||
"auth/departments/batch-status",
|
||||
"auth/department/batch-status",
|
||||
params,
|
||||
);
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post("auth/departments/export", params, {
|
||||
return await request.post("auth/department/export", params, {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post("auth/departments/import", formData, {
|
||||
return await request.post("auth/department/import", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get("auth/departments/download-template", {
|
||||
return await request.get("auth/department/download-template", {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user