From 43c75c96a7bb8ea11992d42edefc05004a201de7 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Thu, 9 Oct 2025 15:47:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E6=B3=A2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compareDataCheckSingleChannelSingleTestPopup.vue | 7 +++---- frontend/src/views/home/components/compareTest.vue | 10 ++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue index 1eb2cc9..3c5afc2 100644 --- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue @@ -266,9 +266,8 @@ const open = async (row: any, chnNum: string, deviceId: string | null, source: n const initGetResult = async () => { // 判断是否为录波数据 - const isLuoboData = (sourceKey.value == 1 && rowList.value.scriptName == "录波") || + const isLuoboData = (sourceKey.value == 1 && rowList.value.scriptName == "录波数据") || (sourceKey.value == 2 && scriptData.value[0]?.code == "wave_data"); - if (isLuoboData) { isWaveData.value = true // 设置录波数据相关的选项 @@ -432,7 +431,7 @@ const handleCommonChange = async () => { const tempNode = { scriptName: rowList.value.scriptName, id: rowList.value.scriptType, - code: rowList.value.scriptName === "录波" ? 'wave_data' : '' + code: rowList.value.scriptName === "录波数据" ? 'wave_data' : '' } handleNodeClick(tempNode) } @@ -489,7 +488,7 @@ const getResults = async (code: any) => { // 判断是否为录波数据请求 const isWaveDataRequest = code === 'wave_data' || isWaveData.value - + console.log('isWaveDataRequest:', rowList.value.scriptType) getContrastResult({ planId: checkStore.plan.id, scriptType: rowList.value.scriptType, diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index d43d290..6a4b3d1 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -131,6 +131,7 @@ import {getBigTestItem} from '@/api/check/test' import {getAutoGenerate} from '@/api/user/login' import {useModeStore} from '@/stores/modules/mode' // 引入模式 store import {useDictStore} from '@/stores/modules/dict' +import { ca } from 'element-plus/es/locale' const checkStore = useCheckStore() const modeStore = useModeStore() @@ -461,13 +462,14 @@ watch( } switch (newValue.code) { case 25001: + case 25006: case 25005: { let result: CheckData.ScriptChnItem[] = [] let message = JSON.parse(newValue.data) // 当收到 25005 消息时,录波项目开始loading - if (newValue.code == 25005) { + if (newValue.code == 25005 || newValue.code == 25006) { // 设置录波项目为LOADING状态 const waveResultItem = checkResult.find(item => item.code === 'wave_data') @@ -487,7 +489,7 @@ watch( } // 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目,则使用已设置的状态 - if (newValue.code == 25005 && item.code === 'wave_data') { + if ((newValue.code == 25005 || newValue.code == 25006) && item.code === 'wave_data') { const existingWaveItem = checkResult.find(checkItem => checkItem.scriptType === 'wave_data') if (existingWaveItem) { temp.devices = [...existingWaveItem.devices] // 保留已设置的devices @@ -536,6 +538,10 @@ watch( if(newValue.code == 25005){ setLogList("error", '实时数据校验失败!开始录波校验...') } + if(newValue.code == 25006){ + setLogList("error", '统计数据校验失败!开始录波校验...') + } + break }