import request from '@/utils/request'

// 查询异常告警规则列表
export function listRule(query) {
  return request({
    url: '/ems/record/alarmRule/list',
    method: 'get',
    params: query
  })
}

// 查询异常告警规则详细
export function getRule(objId) {
  return request({
    url: '/ems/record/alarmRule/' + objId,
    method: 'get'
  })
}

// 新增异常告警规则
export function addRule(data) {
  return request({
    url: '/ems/record/alarmRule',
    method: 'post',
    data: data
  })
}

// 修改异常告警规则
export function updateRule(data) {
  return request({
    url: '/ems/record/alarmRule',
    method: 'put',
    data: data
  })
}

// 删除异常告警规则
export function delRule(objId) {
  return request({
    url: '/ems/record/alarmRule/' + objId,
    method: 'delete'
  })
}
