import http from '@/http'

const listUrl = {
  1: '/api/v1/performance-appraisal/plan/list',
  2: '/api/v1/performance-appraisal/audit/submit-list'
}
export const list = (sate, params) => http.get(listUrl[sate], { params }) // 评价计划列表
export const detail = id => http.get(`/api/v1/performance-appraisal/plan/detail/${id}`) // 评价计划详情
export const edit = data => http.post(`/api/v1/performance-appraisal/plan/edit`, data) // 评价计划编辑
export const create = data => http.post(`/api/v1/performance-appraisal/plan/create`, data) // 评价计划新建
export const del = id => http.post(`/api/v1/performance-appraisal/plan/delete/${id}`) // 评价计划删除
export const groupList = (id, params) => http.get(`/api/v1/performance-appraisal/plan/group/list/${id}`, { params }) // 评价计划分组列表
export const groupSave = data => http.post(`/api/v1/performance-appraisal/plan/group/save`, data) // 评价计划分组保存
export const groupDel = id => http.post(`/api/v1/performance-appraisal/plan/group/delete/${id}`) // 评价计划分组删除
export const groupDetail = id => http.get(`/api/v1/performance-appraisal/plan/group/detail/${id}`) // 评价计划分组详情
export const addProject = data => http.post(`/api/v1/performance-appraisal/plan/addProject`, data) // 添加待评价项目判断项目是否可以添加
export const addApplication = data => http.post(`/api/v1/performance-appraisal/plan/addApplication`, data) // 添加待评价应用判断应用是否可以添加
export const planProjectList = params => http.get(`/api/v1/performance-appraisal/plan/project-list`, { params }) // 评价计划内待分组项目列表
export const finalProjectList = params => http.get(`/api/v1/performance-appraisal/plan/final-project-list`, { params }) // 终验项目列表
export const finalAppList = params => http.get(`/api/v1/performance-appraisal/plan/final-application-list`, { params }) // 终验应用列表

export const filterProjects = params => http.get('/api/v1/performance-appraisal/plan/filter-projects', { params }) // 筛选项目
// export const auditSubmitList = params => http.get('/api/v1/performance-appraisal/audit/submit-list', { params }) // 审核列表

