import type { Device } from '@/api/device/interface/device'
import http from '@/api'

/**
 * @name 被检设备管理模块
 */

//获取被检设备
export const getPqDevList = (params: Device.ReqPqDevParams) => {
  return http.post(`/pqDev/list`, params)
}

//添加被检设备
export const addPqDev = (params: Device.ResPqDev) => {
  return http.post(`/pqDev/add`, params)
}

//编辑被检设备
export const updatePqDev = (params: Device.ResPqDev) => {
  return http.post(`/pqDev/update`, params)
}

//删除被检设备
export const deletePqDev = (params: string[]) => {
  return http.post(`/pqDev/delete`, params)
}

//导出被检设备
export const exportPqDev=(params: Device.ReqPqDevParams)=>{
  return http.download(`/pqDev/export`, params)
}
export const downloadTemplate = () => {
  return http.download(`/pqDev/downloadTemplate`)
}
//导入被检设备
export const importPqDev=(params: Device.ReqPqDevParams)=>{
  return http.upload(`/pqDev/import`, params)
}

//根据设备类型决定（电源、icd、模板、通道数、额定电压、额定电流）；
export const getPqDev = () => {
  return http.post(`/devType/list`)
}


//被检设备归档
export const documentedPqDev=(ids:string[])=>{
  return http.post(`/pqDev/documented`, ids)
}
