import request from '../index'
const prefix = 'resource/staff'

export function getStaffList(data: any) {
  return request({
    url: `${prefix}/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getStaffBasic(data: object) {
  return request({
    url: `${prefix}/base/detail`,
    method: 'post',
    data,
  })
}

export function addStaffBasic(data: object) {
  return request({
    url: `${prefix}/base/add`,
    method: 'post',
    data,
  })
}

export function updateStaffBasic(data: object) {
  return request({
    url: `${prefix}/base/update`,
    method: 'post',
    data,
  })
}

export function deleteStaff(data: Object) {
  return request({
    url: `${prefix}/delete`,
    method: 'post',
    data,
  })
}

export function getEducationList(data: any) {
  return request({
    url: `${prefix}/education/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getAbilityList(data: any) {
  return request({
    url: `${prefix}/ability/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getProjectList(data: any) {
  return request({
    url: `${prefix}/project/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addEducationRecList(data: object) {
  return request({
    url: `${prefix}/education/batchAdd`,
    method: 'post',
    data,
  })
}

export function delEducationRecList(data: object) {
  return request({
    url: `${prefix}/education/batchDelete`,
    method: 'post',
    data,
  })
}

export function addAbilityRecList(data: object) {
  return request({
    url: `${prefix}/ability/batchAdd`,
    method: 'post',
    data,
  })
}

export function delAbilityRecList(data: object) {
  return request({
    url: `${prefix}/ability/batchDelete`,
    method: 'post',
    data,
  })
}

export function addProjectRecList(data: object) {
  return request({
    url: `${prefix}/project/batchAdd`,
    method: 'post',
    data,
  })
}

export function delProjectRecList(data: object) {
  return request({
    url: `${prefix}/project/batchDelete`,
    method: 'post',
    data,
  })
}

export function getAuthorizeList(data: any) {
  return request({
    url: `${prefix}/authorize/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addAuthorizeRecList(data: object) {
  return request({
    url: `${prefix}/authorize/batchAdd`,
    method: 'post',
    data,
  })
}

export function delAuthorizeRecList(data: object) {
  return request({
    url: `${prefix}/authorize/batchDelete`,
    method: 'post',
    data,
  })
}

export function getResumeList(data: any) {
  return request({
    url: `${prefix}/resume/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addResumeRecList(data: object) {
  return request({
    url: `${prefix}/resume/batchAdd`,
    method: 'post',
    data,
  })
}

export function delResumeRecList(data: object) {
  return request({
    url: `${prefix}/resume/batchDelete`,
    method: 'post',
    data,
  })
}

export function getPromoteList(data: any) {
  return request({
    url: `${prefix}/promote/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addPromoteRecList(data: object) {
  return request({
    url: `${prefix}/promote/batchAdd`,
    method: 'post',
    data,
  })
}

export function delPromoteRecList(data: object) {
  return request({
    url: `${prefix}/promote/batchDelete`,
    method: 'post',
    data,
  })
}

export function getVerifierList(data: any) {
  return request({
    url: `${prefix}/verifier/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addVerifierRecList(data: object) {
  return request({
    url: `${prefix}/verifier/batchAdd`,
    method: 'post',
    data,
  })
}

export function delVerifierRecList(data: object) {
  return request({
    url: `${prefix}/verifier/batchDelete`,
    method: 'post',
    data,
  })
}
