import request from '@/utils/request' //引入axios请求及拦截器
export default {
    //新增角色
    addRole(data) {
        return request({
            url: '/system/role',
            method: 'post',
            data
        })
    },
    //状态修改
    changeStatusRole(data) {
        return request({
            url: '/system/role/changeStatus',
            method: 'post',
            data
        })
    },
    //修改保存数据权限
    dataScopeRole(data) {
        return request({
            url: '/system/role/dataScope',
            method: 'post',
            data
        })
    },
    //修改保存角色
    editRole(data) {
        return request({
            url: '/system/role/edit',
            method: 'post',
            data
        })
    },
    //角色列表
    obtainRoleList(data) {
        return request({
            url: '/system/role/list',
            method: 'get',
            params: data
        })
    },
    //获取角色选择框列表
    obtainRoleOptionselect(data) {
        return request({
            url: '/system/role/optionselect',
            method: 'get',
            params: data
        })
    },
    //根据角色编号获取详细信息
    obtainRoleId(data) {
        return request({
            url: `/system/role/` + data,
            method: 'get',
        })
    },
}