diff --git a/frontend/src/views/home/components/reportResultPopup.vue b/frontend/src/views/home/components/reportResultPopup.vue index 7f4fe0c..b078dad 100644 --- a/frontend/src/views/home/components/reportResultPopup.vue +++ b/frontend/src/views/home/components/reportResultPopup.vue @@ -188,7 +188,10 @@ const dialogSourceVisible = ref(false) const devData = ref() const activeName = ref(0) const checkStore = useCheckStore() -const currentWhichTimeData = ref({}) +const currentWhichTimeData = ref({ + time: '', + checkResult: -1 +}) // 定义 emit 事件 const emit = defineEmits<{ (e: 'reportGenerated'): void @@ -243,7 +246,7 @@ const handleChooseClick = async () => { const checkResult = resultSourceData.value[time].find((item: any) => item.checkResult === 1) return { time, checkResult: checkResult ? 1 : 2 } }) - currentWhichTimeData.value = whichTimeData.value[currentResult.whichTime] + currentWhichTimeData.value = whichTimeData.value.find((item: any) => item.time == currentResult.whichTime) sourceData.value = resultSourceData.value[currentResult.whichTime] } } @@ -251,7 +254,7 @@ const handleChooseClick = async () => { } const handleTimeChange = (value: any) => { sourceData.value = resultSourceData.value[value] - currentWhichTimeData.value = whichTimeData.value[value] + currentWhichTimeData.value = whichTimeData.value.find((item: any) => item.time == value) submitSourceData.resultType = '' submitSourceData.checkResult = -1 }