import request from '@/utils/request'
import { smart } from '@/api/commonApi'
// 报警阈值设置

// 温度报警 -- 列表
export function getTemperatureAlarmList (params) {
  return request({
    url: smart + `/basic-temperature-alarm/getAll`,
    method: 'get',
    params
  })
}
// 温度报警 --删除
export function deleteTemperatureAlarmItem (data) {
  return request({
    url: smart + `/basic-temperature-alarm/deleteBasicTemperatureAlarm`,
    method: 'put',
    data
  })
}

// 温度报警 --新增
export function addTemperatureAlarmItem (data) {
  return request({
    url: smart + `/basic-temperature-alarm/insertBasicTemperatureAlarm`,
    method: 'post',
    data
  })
}

// 温度检测 --更新
export function updateTemperatureAlarmItem (data) {
  return request({
    url: smart + `/basic-temperature-alarm/updateBasicTemperatureAlarm`,
    method: 'put',
    data
  })
}
  // ----------------------------------------------- 虫情报警------------------------------------
  // 虫情报警 -- 列表
  export function getPestAlarmList (params) {
    return request({
      url: smart + `/basic-insect-alarm/getAll`,
      method: 'get',
      params
    })
  }
  // 虫情报警 -- 新增
  export function addPestAlarmList (data) {
    return request({
      url: smart + `/basic-insect-alarm/insertBasicInsectAlarm`,
      method: 'post',
      data
    })
  }
  // 虫情报警 -- 修改
  export function updatePestAlarmList (data) {
    return request({
      url: smart + `/basic-insect-alarm/updateBasicInsectAlarm`,
      method: 'put',
      data
    })
  }
  // 虫情报警 -- 删除
  export function deletePestAlarmList (data) {
    return request({
      url: smart + `/basic-insect-alarm/deleteBasicInsectAlarm`,
      method: 'put',
      data
    })
  }
  // ----------------------------------------------- 能耗报警------------------------------------
  // 能耗报警 -- 列表
  export function getEnergyAlarmList (params) {
    return request({
      url: smart + `/basic-kgce-alarm/getAll`,
      method: 'get',
      params
    })
  }
  // 能耗报警 -- 新增
  export function addEnergyAlarmItem (data) {
    return request({
      url: smart + `/basic-kgce-alarm/insertBasicKgceAlarm`,
      method: 'put',
      data
    })
  }
  // 能耗报警 -- 修改
  export function updateEnergyAlarmItem (data) {
    return request({
      url: smart + `/basic-kgce-alarm/updateBasicKgceAlarm`,
      method: 'put',
      data
    })
  }
  // 能耗报警 -- 删除
  export function deleteEnergyAlarmItem (data) {
    return request({
      url: smart + `/basic-kgce-alarm/deleteBasicKgceAlarm`,
      method: 'put',
      data
    })
  }
  // ----------------------------------------------- 气密性报警------------------------------------
  // 气密性报警 -- 列表
  export function getGasTightnessAlarmList (params) {
    return request({
      url: smart + `/basic-gas-tightness-alarm/getAll`,
      method: 'get',
      params
    })
  }
  // 气密性报警 -- 新增
  export function addGasTightnessAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-tightness-alarm/insertBasicGasTightnessAlarm`,
      method: 'put',
      data
    })
  }
  // 气密性报警 -- 修改
  export function updateGasTightnessAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-tightness-alarm/updateBasicGasAlarm`,
      method: 'put',
      data
    })
  }
  // 气密性报警 -- 删除
  export function deleteGasTightnessAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-tightness-alarm/deleteBasicGasTightnessAlarm`,
      method: 'put',
      data
    })
  }
  // ----------------------------------------------- 气体报警------------------------------------
  // 气体报警 -- 列表
  export function getGasAlarmList (params) {
    return request({
      url: smart + `/basic-gas-alarm/getAll`,
      method: 'get',
      params
    })
  }
  // 气体报警 -- 新增
  export function addGasAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-alarm/insertBasicGasAlarm`,
      method: 'put',
      data
    })
  }
  // 气体报警 -- 修改
  export function updateGasAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-alarm/updateBasicGasAlarm`,
      method: 'put',
      data
    })
  }
  // 气体报警 -- 删除
  export function deleteGasAlarmItem (data) {
    return request({
      url: smart + `/basic-gas-alarm/deleteBasicGasAlarm`,
      method: 'put',
      data
    })
  }
