import request from '@/utils/request'

// 根据学员id查询继任者清单详细信息
export function getSuccessorBySuccessorId(successorId) {
  return request({
    url: '/spec/successor/getInfoBySuccessorId/' + successorId,
    method: 'get'
  })
}

// 查询导师列表
export function listMentors() {
  return request({
    url: '/spec/successor/listMentors',
    method: 'get'
  })
}

// 查询继任者清单列表
export function listSuccessor(query) {
  return request({
    url: '/spec/successor/list',
    method: 'get',
    params: query
  })
}

// 查询学员
export function listPostStaff(query) {
  return request({
    url: '/spec/successor/listPostStaff',
    method: 'get',
    params: query
  })
}
// 查询导师
export function listPostMentorStaff(query) {
  return request({
    url: '/spec/successor/listPostMentorStaff',
    method: 'get',
    params: query
  })
}

// 查询继任者清单详细
export function getSuccessor(id) {
  return request({
    url: '/spec/successor/' + id,
    method: 'get'
  })
}

// 新增继任者清单
export function addSuccessor(data) {
  return request({
    url: '/spec/successor',
    method: 'post',
    data: data
  })
}

// 修改继任者清单
export function updateSuccessor(data) {
  return request({
    url: '/spec/successor',
    method: 'put',
    data: data
  })
}

// 删除继任者清单
export function delSuccessor(id) {
  return request({
    url: '/spec/successor/' + id,
    method: 'delete'
  })
}

// 导出继任者清单
export function exportSuccessor(query) {
  return request({
    url: '/spec/successor/export',
    method: 'get',
    params: query
  })
}
