diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index 91723c86..ae1aba84 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -247,7 +247,6 @@ export const eventMap = { .catch(() => {}); loadingMessage?.close(); - if (!data) return; if (!data?.length && !isDefault) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js index 3313604b..4792f829 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js @@ -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(() => {