/* * @Description: * @Autor: chengq * @Date: 2022-07-18 17:28:04 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-08-18 09:32:22 */ import { http } from "@/utils/https"; /** * @description: 加载权限管理左边的菜单树的json * @param {*} data */ export const getlog = (data) => { return http.get("/log/oplog/search", data); }; export const exportTactics = (params) => { return http.post("/log/oplog/expBatch", params, { responseType: "blob", }); }; /** * @description: 日志审计-全部导出 * @param {*} adminName 用户名 * @param {*} operateType 默认传空 * @return {*} file */ export const exportAll = (params) => { return http.post("/log/oplog/expBatchAll", params, { responseType: "blob", }); }; /** * @description: 通用下载 要求返回文件流 * @param {*} data */ export function downLoadXlsx(data, name) { const blob = new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", }); // const fileName = `报备修改记录.xls`; const fileName = name; const elink = document.createElement("a"); elink.download = fileName; elink.style.display = "none"; elink.href = URL.createObjectURL(blob); document.body.appendChild(elink); elink.click(); URL.revokeObjectURL(elink.href); // 释放URL 对象 document.body.removeChild(elink); } export const getlogoplog = (data) => { return http.get("/log/oplog/archived/search", data); }; export const getdowmfile = (params) => { return http.post("/log/oplog/archived/download", params, { responseType: "blob", }); }; export const getarchivedManual = (params) => { return http.post("/log/oplog/archivedManual", params); }; export const getquartz = (params) => { return http.post("/api/quartz/updateLogFileArchive", params); }; export const getLogFileArchive = () => { return http.get("/api/quartz/getLogFileArchive"); };