角色列表添加

This commit is contained in:
仲么了
2024-01-19 14:08:07 +08:00
parent 343bda8c70
commit 9b75f5b38c
19 changed files with 515 additions and 378 deletions

View File

@@ -31,3 +31,12 @@ export function deleteMenu(id: string) {
method: 'delete',
})
}
// 更新角色菜单
export function updateRoleMenu(data:any) {
return createAxios({
url: '/user-boot/function/assignFunctionByRoleIndexes',
method: 'post',
data: data
})
}

25
src/api/user-boot/role.ts Normal file
View File

@@ -0,0 +1,25 @@
import createAxios from '@/utils/request'
export function add(data: any) {
return createAxios({
url: '/user-boot/role/add',
method: 'post',
data: data
})
}
export function update(data: any) {
return createAxios({
url: '/user-boot/role/update',
method: 'post',
data: data
})
}
export function del(data: any) {
return createAxios({
url: '/user-boot/role/delete',
method: 'post',
data: data
})
}

View File

@@ -0,0 +1,21 @@
import createAxios from '@/utils/request'
export function getFunctionsByRoleIndex(data) {
return createAxios({
url: '/user-boot/roleFunction/getFunctionsByRoleIndex',
method: 'post',
params: data
})
}
export function updateRoleMenu(data:any) {
return createAxios({
url: '/user-boot/function/assignFunctionByRoleIndexes',
method: 'post',
data: data
// params: roleIndex,functionIndexList
// data:{
// roleIndex,functionIndexList
// }
})
}