Browse Source

feat:配置增加默认零点的值;

fuyang
YOU 10 months ago
parent
commit
1d2559f5e4
  1. 4
      src/views/chart/hooks/monitoring.ts

4
src/views/chart/hooks/monitoring.ts

@ -872,7 +872,9 @@ export default (state: IObject) => {
{ {
const date = new dateService().getFullDate(undefined, '-'); //当日 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 beginTime = new Date(`${date} ${time}`).getTime(); //组装好的日期获取时间戳
const endTime = beginTime + new dateService().oneDayTimestamp - 1000; //毫秒戳 一天的时间戳减去1秒 算出截至时间戳 const endTime = beginTime + new dateService().oneDayTimestamp - 1000; //毫秒戳 一天的时间戳减去1秒 算出截至时间戳

Loading…
Cancel
Save