|
|
@ -1,6 +1,6 @@ |
|
|
|
import { Message } from "element-ui"; |
|
|
|
// import { axiosIns } from "@screen/utils/axios/auth.js";
|
|
|
|
|
|
|
|
import moment from "moment"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
/** |
|
|
@ -306,17 +306,20 @@ export function getEventTopicList(eventType, options) { |
|
|
|
*/ |
|
|
|
export function getPerceiveEventList(data = {}) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
const completeTime = moment().format("YYYY-MM-DD"); |
|
|
|
const startTime = moment().add(-30, "d").format("YYYY-MM-DD"); |
|
|
|
data.startTime = startTime; |
|
|
|
data.completeTime = completeTime; |
|
|
|
request({ |
|
|
|
url: `/perceivedEvents/warning/warningList`, |
|
|
|
method: "POST", |
|
|
|
data: { ...data }, |
|
|
|
}) |
|
|
|
.then(({ code, rows }) => { |
|
|
|
.then(({ code, data: rows }) => { |
|
|
|
if (code != 200) { |
|
|
|
reject(); |
|
|
|
return Message.error(`事件加载失败!`); |
|
|
|
} |
|
|
|
|
|
|
|
resolve(rows); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|