import type { ResPage } from '@/api/interface'
import type { TestSource } from '@/api/device/interface/testSource'
import http from '@/api'

/**
 * @name 检测源管理模块
 */
// 获取检测源列表
export const getTestSourceList = (params: TestSource.ReqTestSourceParams) => {
  return http.post(`/pqSource/list`, params)
}

//根据id查询检测源
export const getTestSourceById = (params: TestSource.ResTestSource) => {
  return http.get(`/pqSource/getById?id=${params.id}`)
}

//添加检测源
export const addTestSource = (params: TestSource.ResTestSource) => {
  return http.post(`/pqSource/add`, params)
}

//编辑检测源
export const updateTestSource = (params: TestSource.ResTestSource) => {
  return http.post(`/pqSource/update`, params)
}

//删除检测源
export const deleteTestSource = (params: string[]) => {
  return http.post(`/pqSource/delete`, params)
}
