/**
 * 人员管理页面 API
 */
import request from '@/utils/request'

/** 人员列表查询 */
export const queryPersonListApi = (data) => {
  return request.get('/base/tbPeople/list', {
    params: data
  })
}

/** 新增人员 */
export const addPersonApi = (data) => {
  return request.post('/base/tbPeople', data)
}

/** 修改人员 */
export const editPersonApi = (data) => {
  return request.put('/base/tbPeople', data)
}

/** 删除人员 */
export const deletePersonApi = (id) => {
  return request.delete(`/base/tbPeople/${id}`)
}

/** 人员信息查询 */
export const queryInfoApi = (id) => {
  return request.get(`/base/tbPeople/${id}`)
}

/** 文件上传 */
export const personFileUpLoad = (data) => {
  /* const formData = new FormData()
  formData.append('file', param.fileData.file) */
  return request({
    url: '/base/tbPeople/importData',
    method: 'post',
    data
  })
}
