import request from '@/utils/request'

// 查询月度反馈培养计划列表
export function listPlanMonthly(query) {
  return request({
    url: '/spec/plan/listMonthly',
    method: 'get',
    params: query
  })
}

// 查询季度汇报培养计划列表
export function listPlanSeasonal(query) {
  return request({
    url: '/spec/plan/listSeasonal',
    method: 'get',
    params: query
  })
}

// 根据导师ID查询学员列表
export function getSuccessorListByMentorId(data) {
  return request({
    url: '/spec/plan/listSuccessorsByMentorId',
    method: 'get',
    params: data
  })
}

// 根据MENTOR_STAFF_ID查询培训计划列表
export function listPlanByMentorId(query) {
  return request({
    url: '/spec/plan/listByMentorId',
    method: 'get',
    params: query
  })
}
// 根据YearId查询培训计划列表
export function listPlanByYearId(query) {
  return request({
    url: '/spec/plan/listByYearId',
    method: 'get',
    params: query
  })
}

// 根据STAFF_ID查询培训计划列表
export function listPlanByStaffId(query) {
  return request({
    url: '/spec/plan/listByStaffId',
    method: 'get',
    params: query
  })
}

// 根据导师ID查询学员列表
export function listSuccessorsByMentorId(query) {
  return request({
    url: '/spec/plan/listSuccessorsByMentorId',
    method: 'get',
    params: query
  })
}

// 查询培训计划列表
export function listPlan(query) {
  return request({
    url: '/spec/plan/list',
    method: 'get',
    params: query
  })
}

// 查询培训计划详细
export function getPlan(id) {
  return request({
    url: '/spec/plan/' + id,
    method: 'get'
  })
}

// 新增培训计划
export function addPlan(data) {
  return request({
    url: '/spec/plan',
    method: 'post',
    data: data
  })
}

// 修改培训计划
export function updatePlan2(data) {
  return request({
    url: '/spec/plan/edit2',
    method: 'put',
    data: data
  })
}

// 修改培训计划
export function updatePlan(data) {
  return request({
    url: '/spec/plan',
    method: 'put',
    data: data
  })
}

// 删除培训计划
export function delPlan(id) {
  return request({
    url: '/spec/plan/' + id,
    method: 'delete'
  })
}

// 导出培训计划
export function exportPlan(query) {
  return request({
    url: '/spec/plan/export',
    method: 'get',
    params: query
  })
}

// 下载培养计划导入模板
export function importTemplate() {
  return request({
    url: '/spec/plan/importTemplate',
    method: 'get'
  })
}
