/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-11-28 10:26:24
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2024-12-05 13:53:53
 * @FilePath: \znxjxt-ui\src\api\xj\inspection\center.js
 * @Description: 巡检中心-预警中心接口
 */
import request from "@/utils/request";

// 获取预警中心列表
export function getWarningList(query) {
  return request({
    url: "/notice/list",
    method: "get",
    params: query,
  });
}

// 获取预警中心导航栏
export function getWarningNav() {
  return request({
    url: "/notice/unreadCount",
    method: "get",
  });
}

// 根据id标记通知为已读
export function markNoticeRead(id) {
  return request({
    url: `/notice/read/${id}`,
    method: "post",
  });
}

// 标记所有通知为已读
export function noticeReadAll() {
  return request({
    url: "/notice/readAll",
    method: "post",
  });
}

// 批量删除通知
export function deleteNotice(ids) {
  return request({
    url: "/notice/remove",
    method: "post",
    data: ids,
  });
}