/**
 * 告警规则管理接口
 */
import request from '@/utils/request'
// 告警规则查询
export function getAlarmRuleList(params) {
  return request({
    url: 'alarmRule/list',
    method: 'get',
    params
  })
}
// 修改告警规则
export function updateAlarmRule(params) {
  return request({
    url: 'alarmRule/update',
    method: 'post',
    params
  })
}
// 新增告警规则
export function addAlarmRule(params) {
  return request({
    url: 'alarmRule/add',
    method: 'post',
    params
  })
}
// 删除告警规则
export function delAlarmRule(id) {
  return request({
    url: 'alarmRule/delete',
    method: 'post',
    params: {
      id: id
    }
  })
}

// 告警规则查询
export function getAlarmLevelList(params) {
  return request({
    url: 'alarm/levelList',
    method: 'get',
    params
  })
}
// 告警规则查询
export function getAlarmLevelByType(params) {
  return request({
    url: 'alarm/levelByType',
    method: 'get',
    params
  })
}

// 修改告警规则
export function updateAlarmLevel(params) {
  return request({
    url: 'alarm/configLevel',
    method: 'post',
    data: params
  })
}

// 待配置告警规则的设备列表
export function getDeviceSimpleList(deviceType, configStatus) {
  return request({
    url: 'alarmRule/getNoAlarmDevice',
    method: 'get'
  })
}
