소스 검색

fix: 调整异常警示本日查询时间为前一天

Zimo 4 일 전
부모
커밋
3a85174781
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/views/pms/stat/rykb/exception-prompt.vue

+ 1 - 1
src/views/pms/stat/rykb/exception-prompt.vue

@@ -27,7 +27,7 @@ const productionTopList = computed(() => productionList.value.slice(0, 9))
 const deviceExceptionCount = ref(0)
 
 function getCreateTime(type: TimeRange) {
-  const now = dayjs()
+  const now = type === 'day' ? dayjs().subtract(1, 'day') : dayjs()
   const start = now.startOf(type === 'day' ? 'day' : type === 'year' ? 'year' : type)
   const end = now.endOf(type === 'day' ? 'day' : type === 'year' ? 'year' : type)