import { get, put, post, deletes, postFile } from '@/http/index'

// 查询故障案例列表
export const getFaultCase = async (data) => {
  return await get('/als/faultCase/esList', data)
}

// 新增故障案例
export const addFaultCase = async (data) => {
  return await post('/als/faultCase', data)
}

// 修改故障案例
export const updateFaultCase = async (data) => {
  return await put('/als/faultCase', data)
}

// 删除故障案例
export const removeFaultCase = async (id) => {
  return await deletes('/als/faultCase/' + id)
}

// 导出下载模板
export const importTemplateApi = async () => {
  return await postFile('/als/faultCase/importTemplate', {})
}

// 导出数据
export const exportApi = async (data) => {
  return await postFile('/als/faultCase/export', data)
}
