import request from '@/utils/request'

// 列表查询
export function list(params) {
    return request({
        url: '/system/user/list',
        method: 'GET',
        params,
    })
}

// 角色下拉查询
export function optionselect(params) {
    return request({
        url: '/system/role/optionselect',
        method: 'GET',
        params,
    })
}



//用户管理列表-新增
export function userAdd(params) {
    return request({
        url: '/system/user/',
        method: 'POST',
        data: params,
    })
}

//用户管理列表-修改
export function userUpdate(params) {
    return request({
        url: '/system/user/',
        method: 'PUT',
        data: params,
    })
}



// 角色-回显
export function authRole(params, userId) {
    return request({
        url: '/system/user/authRole/' + userId,
        method: 'GET',
        params,
    })
}


//用户授权角色
export function authRoleDetail(params) {
    return request({
        url: '/system/user/authRole',
        method: 'PUT',
        data: params,
    })
}