Explorar o código

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

Zimo hai 16 horas
pai
achega
3a85174781
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)