From 97d1f08bbee552b85d2d84e2645168419535d316 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Mon, 13 Oct 2025 13:56:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E6=A3=80=E6=B5=8B=E9=97=AA?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/home/components/compareTest.vue | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index 2544536..8ec76a2 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -353,6 +353,7 @@ watch( } } break + case 'connect': switch (newValue.operateCode) { case 'Contrast_Dev': @@ -457,6 +458,7 @@ watch( case 25001: case 25006: case 25005: + case 25007:// 添加闪变处理 { let result: CheckData.ScriptChnItem[] = [] @@ -476,6 +478,18 @@ watch( } } + + if (newValue.code == 25007) { + // 设置闪变项目为LOADING状态 + const flickerResultItem = checkResult.find(item => item.code === 'flicker_data') + + if (flickerResultItem) { + flickerResultItem.devices.forEach(device => { + device.chnResult.fill(CheckData.ChnCheckResultEnum.LOADING) + }) + } + } + scriptData.forEach(item => { // 处理当前节点的数据 const temp: CheckData.ScriptChnItem = { @@ -491,7 +505,14 @@ watch( if (existingWaveItem) { temp.devices = [...existingWaveItem.devices] // 保留已设置的devices } - } else { + } // 特殊处理闪变项目 - 如果是25007消息且当前项目是闪变项目,则使用已设置的状态 + else if (newValue.code == 25007 && item.code === 'PST') { + const existingFlickerItem = checkResult.find(checkItem => checkItem.scriptType === 'PST') + if (existingFlickerItem) { + temp.devices = [...existingFlickerItem.devices] // 保留已设置的devices + } + } + else { // 找到message中所有scriptName与当前item.code匹配的项 const matchedDevices = message .filter((msg: any) => msg.scriptName === item.code) @@ -505,7 +526,7 @@ watch( temp.devices.push(...matchedDevices) // 对于未匹配到的设备,也要添加占位符(特别是录波项目) - if (item.code === 'wave_data') { + if (item.code === 'wave_data' || item.code === 'PST') { deviceList.forEach(device => { const isDeviceExist = matchedDevices.some((matchedDevice: any) => matchedDevice.deviceId === device.deviceId) if (!isDeviceExist) { @@ -688,7 +709,7 @@ const initCheckResult = (defaultValue: CheckData.ChnCheckResultEnum) => { let tempChnResult: CheckData.ChnCheckResultEnum[] = [] for (let j = 0; j < checkStore.chnNumList.length; j++) { // 录波项目初始化为UNKNOWN状态,其他项目使用传入的默认值 - if (item.code === 'wave_data' && checkTotal > 1) { + if ((item.code === 'wave_data' || item.code === 'PST')&& checkTotal > 1) { tempChnResult.push(CheckData.ChnCheckResultEnum.UNKNOWN) } else { tempChnResult.push(defaultValue)