录波数据

This commit is contained in:
sjl
2025-10-09 15:47:00 +08:00
parent 8ea49f9609
commit 43c75c96a7
2 changed files with 11 additions and 6 deletions

View File

@@ -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,

View File

@@ -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
}