import request from '@/utils/request'

// 查询企业员工信息列表
export function listCompanyUser(query) {
  return request({
    url: '/company/companyUser/list',
    method: 'get',
    params: query
  })
}
export function getAllUserlist(query) {
  return request({
    url: '/company/companyUser/getAllUserlist',
    method: 'get',
    params: query
  })
}

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


// 查询企业员工信息详细
export function getCompanyUser(userId) {
  return request({
    url: '/company/companyUser/' + userId,
    method: 'get'
  })
}

// 新增企业员工信息
export function addCompanyUser(data) {
  return request({
    url: '/company/companyUser',
    method: 'post',
    data: data
  })
}

// 修改企业员工信息
export function updateCompanyUser(data) {
  return request({
    url: '/company/companyUser',
    method: 'put',
    data: data
  })
}

// 删除企业员工信息
export function delCompanyUser(userId) {
  return request({
    url: '/company/companyUser/' + userId,
    method: 'delete'
  })
}

// 导出企业员工信息
export function exportCompanyUser(query) {
  return request({
    url: '/company/companyUser/export',
    method: 'get',
    params: query
  })
}