From 7b700d875cf9d221293b725b790d0b43c29ec6f4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 1 Apr 2023 22:30:02 +0800 Subject: [PATCH] =?UTF-8?q?REVIEW=20=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=88=E8=AE=BE=E7=BD=AE=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/permission/index.ts | 4 +- src/api/system/role/index.ts | 3 + src/views/system/role/DataPermissionForm.vue | 174 ------------------ src/views/system/role/RoleAssignMenuForm.vue | 13 +- .../system/role/RoleDataPermissionForm.vue | 161 ++++++++++++++++ src/views/system/role/index.vue | 17 +- 6 files changed, 175 insertions(+), 197 deletions(-) delete mode 100644 src/views/system/role/DataPermissionForm.vue create mode 100644 src/views/system/role/RoleDataPermissionForm.vue diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts index 958b4718..baf2805b 100644 --- a/src/api/system/permission/index.ts +++ b/src/api/system/permission/index.ts @@ -22,12 +22,12 @@ export const getRoleMenuList = async (roleId: number) => { } // 赋予角色菜单权限 -export const assignRoleMenuApi = async (data: PermissionAssignRoleMenuReqVO) => { +export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => { return await request.post({ url: '/system/permission/assign-role-menu', data }) } // 赋予角色数据权限 -export const assignRoleDataScopeApi = async (data: PermissionAssignRoleDataScopeReqVO) => { +export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => { return await request.post({ url: '/system/permission/assign-role-data-scope', data }) } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 902d5ca6..93636ff0 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -7,6 +7,8 @@ export interface RoleVO { sort: number status: number type: number + dataScope: number + dataScopeDeptIds: number[] createTime: Date } @@ -49,6 +51,7 @@ export const updateRoleStatus = async (data: UpdateStatusReqVO) => { export const deleteRole = async (id: number) => { return await request.delete({ url: '/system/role/delete?id=' + id }) } + // 导出角色 export const exportRole = (params) => { return request.download({ diff --git a/src/views/system/role/DataPermissionForm.vue b/src/views/system/role/DataPermissionForm.vue deleted file mode 100644 index bccc5f46..00000000 --- a/src/views/system/role/DataPermissionForm.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - diff --git a/src/views/system/role/RoleAssignMenuForm.vue b/src/views/system/role/RoleAssignMenuForm.vue index c016a51f..db33811e 100644 --- a/src/views/system/role/RoleAssignMenuForm.vue +++ b/src/views/system/role/RoleAssignMenuForm.vue @@ -1,12 +1,6 @@