import request from "@/utils/request";

// 查询设备告警列表
export function listAlertRule(query) {
  return request({
    url: "/product/alertRule/list",
    method: "get",
    params: query,
  });
}

// 查询设备告警详细
export function getAlertRule(alertId) {
  return request({
    url: "/product/alertRule/" + alertId,
    method: "get",
  });
}

// 新增设备告警
export function addAlertRule(data) {
  return request({
    url: "/product/alertRule",
    method: "post",
    data: data,
  });
}

// 修改设备告警
export function updateAlertRule(data) {
  return request({
    url: "/product/alertRule",
    method: "put",
    data: data,
  });
}

// 删除设备告警
export function delAlertRule(alertId) {
  return request({
    url: "/product/alertRule/" + alertId,
    method: "delete",
  });
}
