/**
 * 考核方案管理相关接口
 */
import request from '@/api/index'

// 分页列表
export function getListPage(params: object) {
  return request({
    url: '/assessmentPlan/listPage',
    method: 'get',
    params,
  })
}
// 删除
export function delProgramme(data: object) {
  return request({
    url: '/assessmentPlan/delete',
    method: 'get',
    params: data,
  })
}
// 新增
export function addProgramme(data: object) {
  return request({
    url: '/assessmentPlan/add',
    method: 'post',
    data,
  })
}
// 编辑
export function editProgramme(data: object) {
  return request({
    url: '/assessmentPlan/update',
    method: 'post',
    data,
  })
}
// 详情
export function getDetail(params: object) {
  return request({
    url: '/assessmentPlan/detail',
    method: 'get',
    params,
  })
}
// 添加方案指标
export function addProxyList(data: object) {
  return request({
    url: '/assessmentPlan/planQuotaAdd',
    method: 'post',
    data,
  })
}
// 方案指标列表
export function ProxyList(params: object) {
  return request({
    url: '/assessmentPlan/planQuotaListPage',
    method: 'get',
    params,
  })
}
// 考核方案等级下拉 /assessmentLevel/list
export function getGradeSelectList() {
  return request({
    url: '/assessmentLevel/list',
    method: 'get',
  })
}
// 启用考核计划方案
export function updatePlanEnabled(data: object) {
  return request({
    url: '/assessmentPlan/updatePlanEnabled',
    method: 'post',
    data,
  })
}
// 导入

export function uploadProgramme(data: object) {
  return request({
    url: '/assessmentPlan/import',
    method: 'post',
    data,
  })
}

// 批量删除
export function delBatchProgramme(data: object) {
  return request({
    url: '/assessmentPlan/batchDelete',
    method: 'post',
    data,
  })
}
// 考核单位分组查询接口
export function getDeptList(params: object) {
  return request({
    url: '/assessmentPlan/deptList',
    method: 'get',
    params,
  })
}
