import request from '@/utils/request'

// 查询列表
export function listEmployee(query) {
  return request({
    url: '/presonnel/employee/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getEmployee(dictId) {
  return request({
    url: '/presonnel/employee/get?id=' + dictId,
    method: 'get'
  })
}

// 新增
export function addEmployee(data) {
  return request({
    url: '/presonnel/employee/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateEmployee(data) {
  return request({
    url: '/presonnel/employee/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delEmployee(dictId) {
  return request({
    url: '/presonnel/employee/delete?id=' + dictId,
    method: 'delete'
  })
}

// 导出
export function exportEmployee(query) {
  return request({
    url: '/presonnel/employee/export-excel',
    method: 'get',
    params: query,
    responseEmployee: 'blob'
  })
}