import request from '@/utils/request'

// 创建员工档案
export function createElectronicEmployee(data) {
  return request({
    url: '/ea/electronic-employee/create',
    method: 'post',
    data: data
  })
}

// 更新员工档案
export function updateElectronicEmployee(data) {
  return request({
    url: '/ea/electronic-employee/update',
    method: 'put',
    data: data
  })
}

// 删除员工档案
export function deleteElectronicEmployee(id) {
  return request({
    url: '/ea/electronic-employee/delete?id=' + id,
    method: 'delete'
  })
}

// 获得员工档案
export function getElectronicEmployee(id) {
  return request({
    url: '/ea/electronic-employee/get?id=' + id,
    method: 'get'
  })
}

// 获得员工档案分页
export function getElectronicEmployeePage(query) {
  return request({
    url: '/ea/electronic-employee/page',
    method: 'get',
    params: query
  })
}

// 导出员工档案 Excel
export function exportElectronicEmployeeExcel(query) {
  return request({
    url: '/ea/electronic-employee/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
