From 2ce8b8e56267608177f89b6c6d10a9a2d21766c1 Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Wed, 13 Mar 2024 15:33:36 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=84=9F=E7=9F=A5=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/components/RoadAndEvents/utils/buttonEvent.js | 1 - .../Home/components/RoadAndEvents/utils/httpList.js | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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(() => {