You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

64 lines
1.1 KiB

import api from '@/utils/api'
import qs from 'qs'
export function add(data) {
return api({
url: '/role',
method: 'post',
data
})
}
export function edit(data) {
return api({
url: '/role',
method: 'put',
data
})
}
export function del(params) {
return api({
url: '/role',
method: 'delete',
params,
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
})
}
export function getList(params) {
return api({
url: '/role/list',
method: 'get',
params
})
}
export function getRoleMenuList(roleId) {
return api({
url: '/role/getRoleMenuList/' + roleId,
method: 'get'
})
}
export function getAllRole() {
return api({
url: '/role/getAllRole',
method: 'get'
})
}
export function updateDataScope(data) {
return api({
url: '/role/updateDataScope',
method: 'put',
data,
paramsSerializer: function(data) {
return qs.stringify(data, { indices: false })
}
})
}
export default { add, edit, del, getList }