实时数据对齐

This commit is contained in:
sjl
2025-08-07 14:43:56 +08:00
parent d2f92ecde4
commit 022d80f30e
7 changed files with 1410 additions and 310 deletions

View File

@@ -1,7 +1,7 @@
<template>
<el-dialog title="设备通道配对" v-model='dialogVisible' v-bind="dialogBig">
<div class="flow-container" style="overflow: hidden; position: relative;">
<el-button @click="logConnections">打印当前配对</el-button>
<el-dialog title="设备通道配对" v-model='dialogVisible' v-bind="dialogBig" >
<div class="flow-container" style="overflow: hidden; position: relative" :style="{ height: dialogHeight + 'px' }">
<!-- <el-button @click="logConnections">打印当前配对</el-button> -->
<VueFlow
:nodes="nodes"
:edges="edges"
@@ -36,7 +36,7 @@
</el-dialog>
<!-- 手动检测-勾选检测项弹窗 -->
<SelectTestItemPopup ref="selectTestItemPopupRef" @openTestDialog="openTestDialog"></SelectTestItemPopup>
<SelectTestItemPopup ref="selectTestItemPopupRef" @openTestDialog="openTestDialog" ></SelectTestItemPopup>
<CompareTestPopup ref='testPopup'></CompareTestPopup>
</template>
@@ -51,11 +51,16 @@ import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue
import CompareTestPopup from './compareTestPopup.vue'
import { ElMessage } from 'element-plus';
import CustomEdge from './RemoveableEdge.vue' // 导入自定义连接线组件
import {contrastTest} from '@/api/socket/socket'
import { jwtUtil } from "@/utils/jwtUtil";
const dialogVisible = ref(false)
const selectTestItemPopupRef = ref<InstanceType<typeof SelectTestItemPopup>>()
const testPopup = ref()
const dialogTitle = ref('手动检测')
// 计算对话框高度
const dialogHeight = ref(600)
// 初始化 VueFlow注册自定义连线类型
const { edges, setViewport } = useVueFlow({
@@ -213,7 +218,7 @@ const handleNext = () => {
selectTestItemPopupRef.value?.open(sourceIdArray.value)
}
const openTestDialog = () => {
const openTestDialog = async () => {
testPopup.value?.open(dialogTitle.value,sourceIdArray.value)
}
@@ -365,6 +370,10 @@ const createNodes = (device: Device.ResPqDev[], standardDev: StandardDevice.ResP
}
})
console.log(newNodes)
return newNodes
}
@@ -373,7 +382,6 @@ defineExpose({ open })
<style>
.flow-container {
height: 600px;
width: 100%;
overflow: hidden;
}