import request from "@/utils/request";

// 获取所有未推送消息
export function msgAlarmWebAlarm() {
  return request({
    url: "/service/msgAlarm/webAlarm",
    method: "get",
  });
}

// 首页-更多消息
export function msgAlarmMessageMore(data) {
  return request({
    url: "/service/msgAlarm/messageMore",
    method: "POST",
    data: data,
  });
}

export function msgAlarmMessageMoreNum(data) {
  return request({
    url: "/service/msgAlarm/messageMoreNum",
    method: "POST",
    data: data,
  });
}

// 消息已读
export function msgAlarmRead(data) {
  return request({
    url: "/service/msgAlarm/read",
    method: "post",
    data: data,
  });
}

// 报警信息分页
export function msgAlarmList(data) {
  return request({
    url: "/service/msgAlarm/list",
    method: "post",
    data: data,
  });
}

// 根据报警信息ID获取详细信
export function msgAlarmDetail(data) {
  return request({
    url: "/service/msgAlarm/" + data,
    method: "get",
  });
}

// 线路下拉
export function baseRailwayManagement(data) {
  return request({
    url: "/service/baseRailwayManagement/query",
    method: "get",
  });
}

export function dataType(data) {
  return request({
    url: "/system/dict/data/type/" + data,
    method: "get",
  });
}

// 解除报警(应该是已经废弃了)
export function releaseAlarm(data) {
  return request({
    url: "/service/msgAlarm/" + data,
    method: "post",
    data,
  });
}

// 解除报警(新)
export function updateIsLock(data) {
  return request({
    url: "/service/msgAlarm/updateIsLock",
    method: "post",
    data,
    params: data,
  });
}

export function readById(data) {
  return request({
    url: "/service/msgAlarm/read/",
    method: "post",
    data,
  });
}

export function getCameraDataUpLoadOut(data) {
  return request({
    url: "/service/msgAlarm/exportMsgAlarm",
    method: "post",
    data,
    responseType: "blob",
  });
}

export function baseVehicleVehicleTree(data = {}) {
  return request({
    url: "/baseVehicle/vehicleTree",
    method: "post",
    data,
  });
}
export function baseVehicleVehicleCurrentStream(data = "") {
  return request({
    url: "/baseVehicle/vehicleCurrentStream?zdCode=" + data,
    method: "get",
    data,
  });
}
export function alarmMessageList(data) {
  return request({
    url: "/service/msgHeartbeatAlarmMessage/list",
    method: "post",
    data,
  });
}
