import request from '@/utils/request'
// 添加组织   http://192.168.31.230:6209/api/v3/api/v3/employee/batch
export function employeeBatch(data) {
  console.log(data)
  return request({
    url: '/api/v3/employees/batch',
    method: 'post',
    data: data
  })
}

// 删除用户 http://192.168.31.230:6209/api/v3/occupations/{occID}
export function delUser(id) {
  return request({
    url: '/api/v3/employees/' + id,
    method: 'delete'
  })
}
// 批量删除用户 http://192.168.31.230:6209/api/v3/occupations/{occID}
export function delJobs(query) {
  return request({
    url: '/api/v3/employees/batch',
    method: 'delete',
    params: query
  })
}
// 获取用户信息 http://192.168.31.230:6209/api/v3/occupations/{occID}
export function getOccInfo(id) {
  return request({
    url: '/api/v3/employees/' + id,
    method: 'get'
  })
}

// 设置用户岗位 http://192.168.31.230:6209/api/v3/occupations/{occID}
export function setUserOcc(data) {
  return request({
    url: '/api/v3/employees/tag/batch',
    method: 'post',
    data: data
  })
}

// 更改用户信息 http://192.168.31.230:6209/api/v3/employees/'+id
export function editUserInfo(data, id) {
  return request({
    url: '/api/v3/employees/' + id,
    method: 'put',
    data: data
  })
}

// 更改用户信息 http://192.168.31.230:6209/api/v3/employees/tag/batch
export function editUserOcc(data) {
  return request({
    url: '/api/v3/employees/tag/batch',
    method: 'post',
    data: data
  })
}

//下载模板 http://192.168.31.230:6209/api/v3/api/v3/employees/batch/template
export function userTemplate() {
  return request({
    url: '/api/v3/employees/batch/template',
    method: 'get',
    responseType: 'blob'
  })
}
