import request from '@/utils/request'

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

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

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

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

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