import request from '@/config/axios'

// 打分数据
export const getKpiEmployees = (params) => {
  return request.get({ url: '/admin-api/oa/examine-score/getExamineUserExamineScore', params })
}

// 保存考勤打分数据
export const saveKpiScore = (data) => {
  return request.put({ url: '/admin-api/oa/examine-score/update', data })
}

// 删除考核项
export const deleteKpiItem = (params) => {
  return request.delete({ url: '/admin-api/oa/examine-score/delete', params })
}

// 考评分页数据
export const getScorePage = (params) => {
  return request.get({ url: '/admin-api/oa/examine-period/page', params })
}

// 封存
export const saveScoreRecord = (params) => {
  return request.get({ url: '/admin-api/oa/examine-period/confirm', params })
}

// 查询周期是否已封存
export const getKpiPeriodStatus = (params) => {
  return request.get({ url: '/admin-api/oa/examine-period/getExaminePeriodByPeriod', params })
}

// 查询考核记录
export const getScoreRecord = (data) => {
  return request.post({ url: '/admin-api/oa/examine-result/periodPage', data })
}

// 查详情
export const getScoreDetail = (params) => {
  return request.get({ url: '/admin-api/oa/examine-result/detail', params })
}
