Преглед на файлове

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

Zimo преди 3 дни
родител
ревизия
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)