diff --git a/react-ui/src/pages/System/Role/index.tsx b/react-ui/src/pages/System/Role/index.tsx index 9488c100..c7a4e9cf 100644 --- a/react-ui/src/pages/System/Role/index.tsx +++ b/react-ui/src/pages/System/Role/index.tsx @@ -177,7 +177,7 @@ const RoleTableList: React.FC = () => { confirm({ title: `确认要${text}${record.roleName}角色吗?`, onOk() { - changeRoleStatus(record.roleId, newStatus).then((resp) => { + changeRoleStatus(record.roleId, record.roleKey, newStatus).then((resp) => { if (resp.code === 200) { messageApi.open({ type: 'success', diff --git a/react-ui/src/services/system/role.ts b/react-ui/src/services/system/role.ts index b1d79fc7..ea99fe29 100644 --- a/react-ui/src/services/system/role.ts +++ b/react-ui/src/services/system/role.ts @@ -70,9 +70,10 @@ export function updateRoleDataScope(data: Record) { } // 角色状态修改 -export function changeRoleStatus(roleId: number, status: string) { +export function changeRoleStatus(roleId: number, roleKey: string, status: string) { const data = { roleId, + roleKey, status, }; return request('/api/system/role/changeStatus', {