From f74f264d875b003730484f3fe7cb242c7f91294e Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期四, 15 八月 2024 17:32:55 +0800 Subject: [PATCH] fix: 模型管理代码修改 --- src/api/authority.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/src/api/authority.ts b/src/api/authority.ts index f3a9039..b8522ba 100644 --- a/src/api/authority.ts +++ b/src/api/authority.ts @@ -63,6 +63,46 @@ total: number; } +export interface Role { + roleId: string; + createTime: string; + updateTime: string; + roleName: string; + remark: string; + iconCls: string; + roleSort: string; + status: string; + roleKey: string; + dataScope: string; + dept: any; + resources: any; + knowledges: any; + dialogs: any; +} + +export function RoleList(params: Pagination) { + return axios.get<Result<Role[]>>('/base/system/role/list', { params }); +} + +export function RoleDelete(id) { + return axios.delete('/base/system/role/' + id); +} + +export function RoleEdit(role) { + return axios.put('/base/system/role', { role }); +} + +export function RoleAdd(role) { + return axios.post('/base/system/role', { role }); +} + +export function Rolestatus(roleId, status) { + return axios.put('/base/system/role/changeStatus', { + roleId: roleId, + status: status, + }); +} + export function UserList(params: Pagination) { return axios.get<Result<User[]>>('/base/system/user/list', { params }); } -- Gitblit v1.8.0