From 1d2559f5e4829193847d38c6f3d41350a32ff230 Mon Sep 17 00:00:00 2001 From: YOU <15501379989@163.com> Date: Wed, 2 Apr 2025 09:44:30 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E9=85=8D=E7=BD=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=BB=98=E8=AE=A4=E9=9B=B6=E7=82=B9=E7=9A=84=E5=80=BC?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chart/hooks/monitoring.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/chart/hooks/monitoring.ts b/src/views/chart/hooks/monitoring.ts index 6929e79..817894e 100644 --- a/src/views/chart/hooks/monitoring.ts +++ b/src/views/chart/hooks/monitoring.ts @@ -872,7 +872,9 @@ export default (state: IObject) => { { const date = new dateService().getFullDate(undefined, '-'); //当日 - const time = new dateService().getTime(others.beginTime); //24小时制的开始时间 从配置viewConfig中取 + const time = new dateService().getTime( + others.beginTime || new Date(+new dateService().getMidnightTimeStamp()), + ); //24小时制的开始时间 从配置viewConfig中取,没有就取当日零点时间 const beginTime = new Date(`${date} ${time}`).getTime(); //组装好的日期获取时间戳 const endTime = beginTime + new dateService().oneDayTimestamp - 1000; //毫秒戳 一天的时间戳减去1秒 算出截至时间戳