预检测,正式检测,数据查询能处理只有录波的情况

This commit is contained in:
sjl
2025-09-22 15:51:58 +08:00
parent 44cdb3273c
commit 783e1c080b
7 changed files with 81 additions and 50 deletions

View File

@@ -15,7 +15,7 @@
finish-status="success">
<el-step :status="step1" title="设备通讯校验"/>
<el-step :status="step2" title="模型一致性校验"/>
<el-step :status="step3" title="实时数据对齐验证"/>
<el-step :status="step3" title="实时数据对齐验证" v-if="!props.onlyWave"/>
<el-step :status="step4" title="相序校验"/>
<!-- <el-step :status="step6" title="遥控录波功能验证"/> -->
<el-step :status="step5" :title="ts === 'error'? '检测失败':ts === 'process'? '检测中':ts === 'success'? '检测成功':'待检测'"/>
@@ -39,7 +39,7 @@
</p>
</div>
</el-collapse-item>
<el-collapse-item name="3">
<el-collapse-item name="3" v-if="!props.onlyWave">
<template #title>
实时数据对齐验证
<el-icon class="title-icon" @click="openDialog" v-if="isShowDialog"><InfoFilled/></el-icon>
@@ -82,7 +82,7 @@
</template>
<script lang="tsx" setup name="preTest">
import {ElMessage, ElMessageBox, StepProps} from "element-plus";
import {defineExpose, PropType, ref, toRef, watch} from 'vue';
import {computed, defineExpose, PropType, ref, toRef, watch} from 'vue';
import RealTimeData from './realTimeDataAlign.vue'
const realTimeDataRef = ref()
@@ -121,7 +121,13 @@ const step4InitLog = ref([
const isShowDialog = ref(false)
const collapseActiveName = ref('1')
const activeIndex = ref(0)
const activeTotalNum = ref(5)
const activeTotalNum = computed(() => {
let count = 4; // 基础步骤数:设备通讯校验、模型一致性校验、相序校验、最终状态
if (props.onlyWave) {
count++; // 添加实时数据对齐验证步骤
}
return count;
});
const step1 = ref<StepProps['status']>('wait')
const step2 = ref<StepProps['status']>('wait')
const step3 = ref<StepProps['status']>('wait')
@@ -167,6 +173,10 @@ const props = defineProps({
mapping: {
type: Object as PropType<Record<string, Record<string, string>>>,
default: () => ({})
},
onlyWave: {
type: Boolean,
default: false
}
})
@@ -201,6 +211,9 @@ interface DeviceData {
const testDataStructure = ref<Record<string, DeviceData>>({});
watch(webMsgSend, function (newValue, oldValue) {
if(testStatus.value == 'success' || testStatus.value == 'error'){
return
}
if (testStatus.value !== 'waiting') {
if(newValue.code == 25004){
ElMessage.error('接收数据超时!')
@@ -454,11 +467,19 @@ watch(webMsgSend, function (newValue, oldValue) {
}
})
// watch(activeIndex, function (newValue, oldValue) {
// if (newValue <= activeTotalNum.value - 2) {
// collapseActiveName.value = (newValue + 1).toString()
// } else {
// collapseActiveName.value = newValue.toString()
// }
// })
watch(activeIndex, function (newValue, oldValue) {
if (newValue <= activeTotalNum.value - 2) {
collapseActiveName.value = (newValue + 1).toString()
} else {
collapseActiveName.value = newValue.toString()
collapseActiveName.value = (activeTotalNum.value - 1).toString()
}
})
@@ -483,6 +504,7 @@ watch(testStatus, function (newValue, oldValue) {
}
})
const emit = defineEmits(['update:testStatus']);
//监听sn
watch(ts, function (newValue, oldValue) {