是否需要相序检测
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<el-step :status="step1" title="设备通讯校验"/>
|
||||
<el-step :status="step2" title="模型一致性校验"/>
|
||||
<el-step :status="step3" title="数据对齐验证" v-if="!props.onlyWave"/>
|
||||
<el-step :status="step4" title="相序校验"/>
|
||||
<el-step :status="step4" title="相序校验" v-if="props.xiangXuIsShow"/>
|
||||
<!-- <el-step :status="step6" title="遥控录波功能验证"/> -->
|
||||
<el-step :status="step5" :title="ts === 'error'? '检测失败':ts === 'process'? '检测中':ts === 'success'? '检测成功':'待检测'"/>
|
||||
</el-steps>
|
||||
@@ -52,7 +52,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="相序校验" name="4">
|
||||
<el-collapse-item title="相序校验" name="4" v-if="props.xiangXuIsShow">
|
||||
<div class="div-log">
|
||||
<p v-for="(item, index) in step4InitLog" :key="index"
|
||||
:style="{ color: item.type === 'error' ? '#F56C6C' : 'var(--el-text-color-regular)' }">
|
||||
@@ -84,6 +84,28 @@
|
||||
import { ElMessage, ElMessageBox, StepProps } from 'element-plus'
|
||||
import { computed, PropType, ref, toRef, watch } from 'vue'
|
||||
import RealTimeData from './realTimeDataAlign.vue'
|
||||
const props = defineProps({
|
||||
testStatus: {
|
||||
type: String,
|
||||
default: 'wait'
|
||||
},
|
||||
webMsgSend: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
mapping: {
|
||||
type: Object as PropType<Record<string, Record<string, string>>>,
|
||||
default: () => ({})
|
||||
},
|
||||
onlyWave: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
xiangXuIsShow:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const realTimeDataRef = ref()
|
||||
|
||||
@@ -122,10 +144,13 @@ const isShowDialog = ref(false)
|
||||
const collapseActiveName = ref('1')
|
||||
const activeIndex = ref(0)
|
||||
const activeTotalNum = computed(() => {
|
||||
let count = 4; // 基础步骤数:设备通讯校验、模型一致性校验、相序校验、最终状态
|
||||
if (props.onlyWave) {
|
||||
let count = 3; // 基础步骤数:设备通讯校验、模型一致性校验、最终状态
|
||||
if (!props.onlyWave) {
|
||||
count++; // 添加数据对齐验证步骤
|
||||
}
|
||||
if(props.xiangXuIsShow){//添加相序校验
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
});
|
||||
const step1 = ref<StepProps['status']>('wait')
|
||||
@@ -150,35 +175,18 @@ const detectionOptions = ref([
|
||||
{
|
||||
id: 2,
|
||||
name: "数据对齐验证",
|
||||
selected: true,
|
||||
selected: !props.onlyWave,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "相序校验",
|
||||
selected: true,
|
||||
selected: props.xiangXuIsShow,
|
||||
},
|
||||
]);
|
||||
|
||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||
|
||||
const props = defineProps({
|
||||
testStatus: {
|
||||
type: String,
|
||||
default: 'wait'
|
||||
},
|
||||
webMsgSend: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
mapping: {
|
||||
type: Object as PropType<Record<string, Record<string, string>>>,
|
||||
default: () => ({})
|
||||
},
|
||||
onlyWave: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const testStatus = toRef(props, 'testStatus');
|
||||
@@ -332,6 +340,11 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
if (newValue.code == 25001) { //最终成功
|
||||
step2.value = 'success'
|
||||
step3.value = 'process'
|
||||
if(props.onlyWave === true && props.xiangXuIsShow === false )//只有录波,相序不选
|
||||
{
|
||||
step5.value = 'success'
|
||||
ts.value = 'success'
|
||||
}
|
||||
activeIndex.value = 2
|
||||
}
|
||||
if (newValue.code == 25003) { //最终失败
|
||||
@@ -374,6 +387,11 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
isShowDialog.value = true
|
||||
step3.value = 'success'
|
||||
step4.value = 'process'
|
||||
if(props.onlyWave === false && props.xiangXuIsShow === false )//相序不选
|
||||
{
|
||||
step5.value = 'success'
|
||||
ts.value = 'success'
|
||||
}
|
||||
activeIndex.value = 3
|
||||
testDataStructure.value = newValue.data
|
||||
}
|
||||
@@ -514,18 +532,30 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
// })
|
||||
|
||||
watch(activeIndex, function (newValue, oldValue) {
|
||||
if(props.onlyWave === true)
|
||||
|
||||
if(props.onlyWave === true && props.xiangXuIsShow === false )
|
||||
{
|
||||
if (Number(collapseActiveName.value) < activeTotalNum.value - 2) {
|
||||
if (Number(collapseActiveName.value) < activeTotalNum.value) {
|
||||
if(newValue == 2){
|
||||
collapseActiveName.value = '2'
|
||||
}else{
|
||||
collapseActiveName.value = (newValue + 1).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(props.onlyWave === true && props.xiangXuIsShow === true )
|
||||
{
|
||||
if (Number(collapseActiveName.value) < activeTotalNum.value) {
|
||||
if(newValue == 2){
|
||||
collapseActiveName.value = '4'
|
||||
}else{
|
||||
collapseActiveName.value = (newValue + 1).toString()
|
||||
}
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Number(collapseActiveName.value) < activeTotalNum.value) {
|
||||
if (Number(collapseActiveName.value) < activeTotalNum.value - 1) {
|
||||
collapseActiveName.value = (newValue + 1).toString()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user