修复BUG: 子角色授权问题

This commit is contained in:
猿小天
2024-06-23 10:54:40 +08:00
parent 354d230c2a
commit 452bc0a63a
3 changed files with 14 additions and 40 deletions

View File

@@ -26,7 +26,15 @@ export function setRolePremission(roleId:any,data:object) {
})
}
export function getDataPermissionRange() {
export function getDataPermissionRange(query:object) {
return request({
url: '/api/system/role_menu_button_permission/data_scope/',
method: 'get',
params:query
})
}
export function getDataPermissionRangeAll() {
return request({
url: '/api/system/role_menu_button_permission/data_scope/',
method: 'get',

View File

@@ -124,7 +124,7 @@ watch(
(val) => {
drawerVisible.value = val;
getMenuBtnPermission()
fetchData()
}
);
const handleDrawerClose = () => {
@@ -159,9 +159,9 @@ const getMenuBtnPermission = async () => {
menuData.value = resMenu.data
}
const fetchData = async () => {
const fetchData = async (btnId) => {
try {
const resRange = await getDataPermissionRange();
const resRange = await getDataPermissionRange({menu_button:btnId});
if (resRange?.code === 2000) {
dataPermissionRange.value = resRange.data;
}
@@ -183,6 +183,7 @@ const handleSettingClick = (record: MenusType, btnId: number) => {
menuCurrent.value = record;
menuBtnCurrent.value = btnId;
dialogVisible.value = true;
fetchData(btnId)
};
const handleColumnChange = (val: boolean, record: MenusType, btnType: string) => {