import request from '@/utils/request'

export function queryUserOfDepartment(data) {
  return request({
    url: '/user/queryUserOfDepartment',
    method: 'post',
    data
  })
}
export function organizationPersonnel(data) {
  return request({
    url: '/user/organizationPersonnel',
    method: 'post',
    data
  })
}

export function addDepartmentUser(data) {
  return request({
    url: '/user/addDepartmentUser',
    method: 'post',
    data
  })
}

export function updateUserInfo(data) {
  return request({
    url: '/user/updateUserInfo',
    method: 'post',
    data
  })
}
// 用户明细
export function getUserDetail(id) {
  return request({
    url: '/user/getUserDetail/' + id,
    method: 'get'
  })
}

// 编辑用户回显数据
export function getUserInfo(id) {
  return request({
    url: '/user/getUserInfo/' + id,
    method: 'get'
  })
}
//
export function addUserInitShowData(id) {
  return request({
    url: '/user/addUserInitShowData/' + id,
    method: 'get'
  })
}
// 显示当前用户所在厂树形部门结构
export function loginUserTreeDepartment() {
  return request({
    url: '/user/loginUserTreeDepartment',
    method: 'get'
  })
}
// /user/exportUser
export function exportUser(data) {
  return request({
    url: '/user/exportUser',
    method: 'post',
    data
  })
}
// /user/deleteUsers
export function deleteUsers(data) {
  return request({
    url: '/user/deleteUsers',
    method: 'delete',
    data
  })
}
export function thoroughDeleteUsers(data) {
  return request({
    url: '/user/thoroughDeleteUsers',
    method: 'delete',
    data
  })
}
export function resetPassword(data) {
  return request({
    url: '/user/resetPassword',
    method: 'post',
    data
  })
}
