dataease-dm/frontend/src/api/system/role.js

56 lines
997 B
JavaScript
Raw Normal View History

2021-03-03 15:06:52 +08:00
import request from '@/utils/request'
export function allRoles() {
return request({
url: '/api/role/all',
method: 'post'
})
}
export function roleGrid(pageIndex, pageSize, data) {
return request({
url: '/api/role/roleGrid/' + pageIndex + '/' + pageSize,
method: 'post',
data
})
}
export function delRole(pid) {
return request({
url: '/api/role/delete/' + pid,
method: 'post'
})
}
export function addRole(data) {
return request({
url: '/api/role/create',
method: 'post',
data
})
}
export function editRole(data) {
return request({
url: '/api/role/update',
method: 'post',
data
})
}
export function addRoleMenus(data) {
return request({
url: '/api/role/saveRolesMenus',
method: 'post',
data
})
}
2021-03-05 17:20:45 +08:00
export function menuIds(roleId) {
return request({
url: '/api/role/menuIds/' + roleId,
method: 'post'
})
}
export default { addRole, editRole, delRole, roleGrid, allRoles, addRoleMenus, menuIds }