diff --git a/frontend/src/components/ImportZip/index.vue b/frontend/src/components/ImportZip/index.vue index a2b6cbc..ba57416 100644 --- a/frontend/src/components/ImportZip/index.vue +++ b/frontend/src/components/ImportZip/index.vue @@ -5,7 +5,6 @@ :destroy-on-close="true" width="450px" :close-on-click-modal="!parameter.progressBar" - :show-close="!disable" draggable > { parameter.value = { ...parameter.value, ...params } + disable.value = true + fileDisabled.value = false dialogVisible.value = true } @@ -181,7 +182,7 @@ const initSSE = () => { eventSource.value = http.sse('/sse/createSse') eventSource.value.onmessage = event => { - // console.log('收到消息内容是:', event.data) + // console.log('收到消息内容是:', event.data) const res = JSON.parse(event.data) progressData.value.percentage = res.data progressData.value.message = res.message @@ -210,7 +211,7 @@ const closeEventSource = () => { if (eventSource.value) { eventSource.value.close() eventSource.value = null - // console.log('SSE连接已关闭') + // console.log('SSE连接已关闭') } } // 监听 dialogVisible 的变化,确保在对话框关闭时清理资源 diff --git a/frontend/src/views/home/components/reportResultPopup.vue b/frontend/src/views/home/components/reportResultPopup.vue index a31696f..7f4fe0c 100644 --- a/frontend/src/views/home/components/reportResultPopup.vue +++ b/frontend/src/views/home/components/reportResultPopup.vue @@ -104,12 +104,33 @@ + + v-for="item in whichTimeData" + :key="item.time" + :label="`第${item.time}次`" + :value="item.time" + > +
+ {{ '第' + item.time + '次' }} + 符合 + 不符合 +
+
@@ -167,7 +188,7 @@ const dialogSourceVisible = ref(false) const devData = ref() const activeName = ref(0) const checkStore = useCheckStore() - +const currentWhichTimeData = ref({}) // 定义 emit 事件 const emit = defineEmits<{ (e: 'reportGenerated'): void @@ -217,7 +238,12 @@ const handleChooseClick = async () => { if (res.data) { resultSourceData.value = res.data // 选择第几次 - whichTimeData.value = Object.keys(resultSourceData.value) + whichTimeData.value = Object.keys(resultSourceData.value).map(time => { + // 检测结果只要有一个合格就算合格 + const checkResult = resultSourceData.value[time].find((item: any) => item.checkResult === 1) + return { time, checkResult: checkResult ? 1 : 2 } + }) + currentWhichTimeData.value = whichTimeData.value[currentResult.whichTime] sourceData.value = resultSourceData.value[currentResult.whichTime] } } @@ -225,6 +251,7 @@ const handleChooseClick = async () => { } const handleTimeChange = (value: any) => { sourceData.value = resultSourceData.value[value] + currentWhichTimeData.value = whichTimeData.value[value] submitSourceData.resultType = '' submitSourceData.checkResult = -1 }