import request from '@/config/axios'

// 创建
export const createKpi = (data) => {
  return request.post({
    url: '/admin-api/oa/examine-configuration/create',
    data,
    isSubmitForm: true
  })
}

// 修改
export const updateKpi = (data) => {
  return request.put({ url: '/admin-api/oa/examine-configuration/update', data })
}

//  修改状态
export const updateKpiStatus = (data) => {
  return request.put({ url: '/admin-api/oa/examine-configuration/status/update', data })
}

// 分页
export const getKpiPage = (params) => {
  return request.get({ url: '/admin-api/oa/examine-configuration/page', params })
}

// 详情
export const getKpiDetail = (id) => {
  return request.get({ url: '/admin-api/oa/examine-configuration/get', params: { id } })
}

// 删除
export const deleteKpi = (id) => {
  return request.delete({ url: '/admin-api/oa/examine-configuration/delete', params: { id } })
}

//
export const getKpiEmployees = () => {
  return request.get({
    url: '/admin-api/oa/employee/examinedEmployees'
  })
}
