import request from '@/utils/request'

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/store/user/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getUser(userId) {
  return request({
    url: '/store/user/' + userId,
    method: 'get'
  })
}

// 查询用户详细
export function queryUserVo(userId) {
  return request({
    url: '/store/user/queryvo/' + userId,
    method: 'get'
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/store/user',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/store/user',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delUser(userId) {
  return request({
    url: '/store/user/' + userId,
    method: 'delete'
  })
}

// 导出用户
export function exportUser(query) {
  return request({
    url: '/store/user/export',
    method: 'get',
    params: query
  })
}

export function getUserList(query) {
  return request({
    url: '/store/user/getUserList',
    method: 'get',
    params: query
  })
}

export function listBySearch(query) {
  return request({
    url: '/store/user/listBySearch',
    method: 'get',
    params: query
  })
}

export function getAllUserListLimit(query) {
  return request({
    url: '/company/companyUser/getAllUserListLimit',
    method: 'get',
    params: query
  })
}

// 获取小黑屋用户列表
export function darkRoomList(query) {
  return request({
    url: '/his/user/darkRoomList',
    method: 'get',
    params: query
  })
}

// 批量解禁
export function enabledUsers(data) {
  return request({
    url: '/his/user/enabledUsers',
    method: 'post',
    data: data
  })
}
