完善角色菜单分配管理

This commit is contained in:
橙子
2022-04-29 12:38:19 +08:00
parent c651b60c59
commit 6c7b2224b1
14 changed files with 116 additions and 74 deletions

View File

@@ -26,12 +26,5 @@ export default {
method: 'post',
data: data
})
},
GetTopMenusByHttpUser() {
return myaxios({
url: '/Menu/GetTopMenusByHttpUser',
method: 'get'
})
}
}

View File

@@ -1,23 +1,36 @@
import myaxios from '@/util/myaxios'
export default {
getRole() {
getList() {
return myaxios({
url: '/Role/getRole',
method: 'get'
})
},
setMenuByRole(roleList, menuList) {
return myaxios({
url: '/Role/setMenuByRole',
url: '/Role/GetList',
method: 'post',
data: { ids1: roleList, ids2: menuList }
data: {
parameters: [
{
key: "isDeleted",
value: "0",
type: 0
}
],
orderBys: [
"id"
]
}
})
},
GetTopMenusByRoleId(roleId) {
giveRoleSetMenu(roleList, menuList) {
return myaxios({
url: `/Role/GetTopMenusByRoleId?roleId=${roleId}`,
method: 'get'
url: '/Role/GiveRoleSetMenu',
method: 'put',
data: { RoleIds: roleList, menuIds: menuList }
})
},
getInMenuByRoleId(roleId) {
return myaxios({
url: `/Role/GetInMenuByRoleId?roleId=${roleId}`,
method: 'get'
})
}