// 告警确认

import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// 告警确认列表
export function listAlarmConfirm(query) {
  return request({
    url: "/patrol/analysis/list",
    method: "get",
    params: query,
  });
}

// 告警确认详情
export function getAlarmConfirmDetail(id) {
  return request({
    url: "/patrol/analysis/" + parseStrEmpty(id),
    method: "get",
  });
}

// 告警确认处理
export function handleAlarmConfirm(params) {
  return request({
    url: "/patrol/analysis/updateWarn",
    method: "get",
    params: params,
  });
}

// 批量告警确认处理
export function handleBatchAlarmConfirm(params) {
  return request({
    url: "/patrol/analysis/updateWarn",
    method: "get",
    params: params,
  });
}

// 设备树
export function getDeviceTree(params = {}) {
  return request({
    url: "/basedata/prodevmnt/device/treeAreaDeviceSelect",
    method: "get",
    params: params,
  });
}

// 获取全部算法列表
export function getAllAlgorithmList() {
  return request({
    url: "/basedata/subtype/list",
    method: "get",
    params: {
      pageNum: 1,
      pageSize: 99999,
    },
  });
}
