import { post, upload } from "@/request/axios.js";
import { getLevelsByParentId } from "@/request/data_dictionary.js";
import { ref } from "vue";

export const getSecurityNoticeList = (params) =>
  post("/securitynotice/listForSecurityNotice", params); // 安全通知列表
export const getSecurityNotice = (params) =>
  post("/securitynotice/getAllReadDetail", params); // 阅读详情
export const dateteSecurityNotice = (params) =>
  post("/securitynotice/delete", params); // 安全通知删除
export const dateteSecurityAllNotice = (params) =>
  post("/securitynotice/deleteAll", params); // 安全通知批量删除
export const getSecurityNoticeInfo = (params) =>
  post("/securitynotice/goEdit", params); // 安全通知详情
export const addSecurityNotice = (params) =>
  upload("/securitynotice/add", params); // 添加安全通知
export const getUserListAll = (params) => post("/user/listSelect", params);

export const layoutFnGetNotificationsClassification = async () => {
  const resData = await getLevelsByParentId({
    parentId: "aaecb47d95524b84904809671e48a777",
  });
  return ref(resData);
};

export const layoutFnGetSIGNEDSTATUSClassification = async () => {
  const resData = await getLevelsByParentId({
    parentId: "bbecb47d95524b84904809671e48a777",
  });
  return ref(resData);
};
