import request from '@/utils/request'
import {smart} from '@/api/commonApi'
// 设备配置

// 粮情检测设备；列表
export function getGrainCheckList(data) {
  return request({
    url: smart + `/basic-device-config-food/getFoodPage`,
    method: 'POST',
    data
  })
}
// 粮情检测 --新增
export function addGrainCheck(data) {
  return request({
    url: smart + `/basic-device-config-food/save`,
    method: 'POST',
    data
  })
}
// 粮情检测 --根据id查询
export function getGrainCheckItem(id) {
  return request({
    url: smart + `/basic-device-config-food/authority/getFoodById/${id}`,
    method: 'get',
  })
}
// 粮情检测 --根据id删除
export function deleteGrainCheckItem(id) {
  return request({
    url: smart + `/basic-device-config-food/deleteById/${id}`,
    method: 'get',
  })
}
// 粮情检测 --根据id 更新
export function updateGrainCheckItem(data) {
  return request({
    url: smart + `/basic-device-config-food/update`,
    method: 'post',
    data
  })
}

//---------------------------------------------- 气调检测设备 --------------------------------------
// 气调--获取列表
export function getAirHandlingList(data) {
  return request({
    url: smart + `/basic-device-config-gas/getGasPage`,
    method: 'post',
    data
  })
}
// 气调--新增保存
export function addAirHandlingItem(data) {
  return request({
    url: smart + `/basic-device-config-gas/save`,
    method: 'post',
    data
  })
}
// 气调详情 --根据id查询
export function getAirHandlingItem(id) {
  return request({
    url: smart + `/basic-device-config-gas/authority/getGasById/${id}`,
    method: 'get',
  })
}
// 气调详情 --根据id删除
export function deleteAirHandlingItem(id) {
  return request({
    url: smart + `/basic-device-config-gas/deleteById/${id}`,
    method: 'get',
  })
}
// 气调详情 --更新
export function updateAirHandlingItem(data) {
  return request({
    url: smart + `/basic-device-config-gas/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 氮气检测 --------------------------------------
// 氮气  --分页列表
export function getNitrogenList(data) {
  return request({
    url: smart + `/basic-device-config-nitrogen/getNitrogenPage`,
    method: 'post',
    data
  })
}
// 氮气  --新增
export function addNitrogenItem(data) {
  return request({
    url: smart + `/basic-device-config-nitrogen/save`,
    method: 'post',
    data
  })
}
// 氮气  --编辑更新
export function updateNitrogenItem(data) {
  return request({
    url: smart + `/basic-device-config-nitrogen/update`,
    method: 'post',
    data
  })
}
// 氮气  --删除
export function deleteNitrogenItem(id) {
  return request({
    url: smart + `/basic-device-config-nitrogen/deleteById/${id}`,
    method: 'get',
  })
}
//---------------------------------------------- 气体检测 --------------------------------------
// 气体检测  --分页列表
export function getGasDetectionList(data) {
  return request({
    url: smart + `/basic-device-config-atmosphere/getAtmospherePage`,
    method: 'post',
    data
  })
}
// 气体检测-- 删除
export function deleteGasDetectionItem(id) {
  return request({
    url: smart + `/basic-device-config-atmosphere/deleteById/${id}`,
    method: 'get',
  })
}
// 气体检测-- 新增
export function addGasDetectionItem(data) {
  return request({
    url: smart + `/basic-device-config-atmosphere/save`,
    method: 'post',
    data
  })
}
// 气体检测-- 编辑更新
export function updateGasDetectionItem(data) {
  return request({
    url: smart + `/basic-device-config-atmosphere/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 虫情检测 --------------------------------------
// 虫情检测  --分页列表
export function getPestDetectionList(data) {
  return request({
    url: smart + `/basic-device-config-pestis/getPestisPage`,
    method: 'post',
    data
  })
}
// 虫情检测-- 删除
export function deletePestDetectionItem(id) {
  return request({
    url: smart + `/basic-device-config-pestis/deleteById/${id}`,
    method: 'get',
  })
}
// 虫情检测-- 新增
export function addPestDetectionItem(data) {
  return request({
    url: smart + `/basic-device-config-pestis/save`,
    method: 'post',
    data
  })
}
// 虫情检测-- 编辑更新
export function updatePestDetectionItem(data) {
  return request({
    url: smart + `/basic-device-config-pestis/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 能耗检测 --------------------------------------
// 能源检测  --分页列表
export function getEnergyMonitoringList(data) {
  return request({
    url: smart + `/basic-device-config-energy/getenergyPage`,
    method: 'post',
    data
  })
}
// 能源检测-- 删除
export function deleteEnergyMonitoringItem(id) {
  return request({
    url: smart + `/basic-device-config-energy/deleteById/${id}`,
    method: 'get',
  })
}
// 能源检测-- 新增
export function addEnergyMonitoringItem(data) {
  return request({
    url: smart + `/basic-device-config-energy/save`,
    method: 'post',
    data
  })
}
// 能源检测-- 编辑更新
export function updateEnergyMonitoringItem(data) {
  return request({
    url: smart + `/basic-device-config-energy/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 气象站检测 --------------------------------------
// 气象站检测  --分页列表
export function getWeatherStationList(data) {
  return request({
    url: smart + `/basic-device-config-meteorological/getMeteorologicalPage`,
    method: 'post',
    data
  })
}
// 气象站检测-- 删除
export function deleteWeatherStationItem(id) {
  return request({
    url: smart + `/basic-device-config-meteorological/deleteById/${id}`,
    method: 'get',
  })
}
// 气象站检测-- 新增
export function addWeatherStationItem(data) {
  return request({
    url: smart + `/basic-device-config-meteorological/save`,
    method: 'post',
    data
  })
}
// 气象站检测-- 编辑更新
export function updateWeatherStationItem(data) {
  return request({
    url: smart + `/basic-device-config-meteorological/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 气密性检测 --------------------------------------
// 气密性检测  --分页列表
export function getGasTightnessList(data) {
  return request({
    url: smart + `/basic-device-config-airtightness/getAirtightnessPage`,
    method: 'post',
    data
  })
}
// 气密性检测-- 删除
export function deleteGasTightnessItem(id) {
  return request({
    url: smart + `/basic-device-config-airtightness/deleteById/${id}`,
    method: 'get',
  })
}
// 气密性检测-- 新增
export function addGasTightnessItem(data) {
  return request({
    url: smart + `/basic-device-config-airtightness/save`,
    method: 'post',
    data
  })
}
// 气密性检测-- 编辑更新
export function updateGasTightnessItem(data) {
  return request({
    url: smart + `/basic-device-config-airtightness/update`,
    method: 'post',
    data
  })
}

//---------------------------------------------- 通风检测 --------------------------------------
// 通风检测  --分页列表
export function getVentilationList(data) {
  return request({
    url: smart + `/basic-device-config-wind/getWindPage`,
    method: 'post',
    data
  })
}
// 通风检测-- 删除
export function deleteVentilationItem(id) {
  return request({
    url: smart + `/basic-device-config-wind/deleteById/${id}`,
    method: 'get',
  })
}
// 通风检测-- 新增
export function addVentilationItem(data) {
  return request({
    url: smart + `/basic-device-config-wind/save`,
    method: 'post',
    data
  })
}
// 通风检测-- 编辑更新
export function updateVentilationItem(data) {
  return request({
    url: smart + `/basic-device-config-wind/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 照明检测 --------------------------------------
// 照明检测  --分页列表
export function getLightingList(data) {
  return request({
    url: smart + `/basic-device-config-lighting/getLightingPage`,
    method: 'post',
    data
  })
}
// 照明检测-- 删除
export function deleteLightingItem(id) {
  return request({
    url: smart + `/basic-device-config-lighting/deleteById/${id}`,
    method: 'get',
  })
}
// 照明检测-- 新增
export function addLightingItem(data) {
  return request({
    url: smart + `/basic-device-config-lighting/save`,
    method: 'post',
    data
  })
}
// 照明检测-- 编辑更新
export function updateLightingItem(data) {
  return request({
    url: smart + `/basic-device-config-lighting/update`,
    method: 'post',
    data
  })
}
//---------------------------------------------- 控温检测 --------------------------------------
// 控温检测  --分页列表
export function getTemperatureControlList(data) {
  return request({
    url: smart + `/basic-device-config-temperature/getTemperaturePage`,
    method: 'post',
    data
  })
}
// 控温检测-- 删除
export function deleteTemperatureControlItem(id) {
  return request({
    url: smart + `/basic-device-config-temperature/deleteById/${id}`,
    method: 'get',
  })
}
// 控温检测-- 新增
export function addTemperatureControlItem(data) {
  return request({
    url: smart + `/basic-device-config-temperature/save`,
    method: 'post',
    data
  })
}
// 控温检测-- 编辑更新
export function updateTemperatureControlItem(data) {
  return request({
    url: smart + `/basic-device-config-temperature/update`,
    method: 'post',
    data
  })
}
