diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index 6a4b3d1..2544536 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -395,31 +395,24 @@ watch( setLogList('error', '设备主动关闭连接!') stopTimeCount() break - case 'yjc_xyjy' : - switch (newValue.operateCode) { - - case 'INIT_GATHER$03': - if (newValue.code == 10552) { - ElMessageBox.alert('重复的初始化操作!', '检测失败', { - confirmButtonText: '确定', - type: 'error', - }) - setLogList('error', '重复的初始化操作!') - stopTimeCount() - } - } - break; + case 'yjc_xyjy' : + if (newValue.code == 10552) { + ElMessageBox.alert('重复的初始化操作!', '检测失败', { + confirmButtonText: '确定', + type: 'error', + }) + setLogList('error', '重复的初始化操作!') + stopTimeCount() + } + break; case 'yjc_sbtxjy' : - switch (newValue.operateCode) { - case 'INIT_GATHER$02': - ElMessageBox.alert('重复的初始化操作!', '检测失败', { - confirmButtonText: '确定', - type: 'error', - }) - setLogList('error', '重复的初始化操作!') - stopTimeCount() - } - break; + ElMessageBox.alert('重复的初始化操作!', '检测失败', { + confirmButtonText: '确定', + type: 'error', + }) + setLogList('error', '重复的初始化操作!') + stopTimeCount() + break; } if (checkStore.selectTestItems.preTest == false && newValue.requestId != 'formal_real') { if (testLogList[0].log == '正在检测,请稍等...' || testLogList[0].log == '暂无数据,等待检测开始') { @@ -432,7 +425,7 @@ watch( : newValue.requestId == 'yjc_mxyzxjy' ? '模型一致性检验' : newValue.requestId == 'yjc_align' - ? '实时数据对齐检验' + ? '数据对齐检验' : newValue.requestId == 'YJC_xujy' ? '相序校验' : '' @@ -468,7 +461,10 @@ watch( let result: CheckData.ScriptChnItem[] = [] let message = JSON.parse(newValue.data) - // 当收到 25005 消息时,录波项目开始loading + + + // 当收到 25005/25006 消息时,录波项目开始loading + if (newValue.code == 25005 || newValue.code == 25006) { // 设置录波项目为LOADING状态 const waveResultItem = checkResult.find(item => item.code === 'wave_data') @@ -490,6 +486,7 @@ watch( // 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目,则使用已设置的状态 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 @@ -541,7 +538,6 @@ watch( if(newValue.code == 25006){ setLogList("error", '统计数据校验失败!开始录波校验...') } - break }