import request from '@/utils/request'


//获取人员列表

export function usersLists(params) {
    return request({
      url: '/users',
      method: 'get',
      params
    })
}
//新增管理员
export function addUsers(data) {
    return request({
      url: '/users',
      method: 'post',
      data
    })
}
//删除管理员
export function deleteUsers(data) {
    return request({
      url: '/users/' +data,
      method: 'delete',
    })
}
//修改、禁用账号
export function putUsers(data) {
    return request({
      url: '/users/' +data.id,
      method: 'put',
      data
    })
}
//修改用户密码
export function changeUserPwd(data) {
    return request({
      url: '/user-remake-password',
      method: 'post',
      data
    })
}
//修改用户角色
export function changeUserRole(data) {
    return request({
      url: '/user-update-role',
      method: 'post',
      data
    })
}
//查看详情
export function usersDetail(params) {
    return request({
      url: '/users/' + params,
      method: 'get'
    })
}