修改正式检测逻辑

This commit is contained in:
guanj
2025-08-21 09:33:13 +08:00
parent bc03ba88f0
commit 8e3368bd29
3 changed files with 42 additions and 30 deletions

View File

@@ -40,7 +40,7 @@
<!-- 手动检测-勾选检测项弹窗 -->
<SelectTestItemPopup ref="selectTestItemPopupRef" @openTestDialog="openTestDialog"></SelectTestItemPopup>
<CompareTestPopup ref="testPopup"></CompareTestPopup>
<CompareTestPopup ref="testPopup" v-if="CompareTestVisible"></CompareTestPopup>
</template>
<script lang="ts" setup>
@@ -64,7 +64,7 @@ const testPopup = ref()
const dialogTitle = ref('手动检测')
// 计算对话框高度
const dialogHeight = ref(600)
const CompareTestVisible = ref(false)
// 初始化 VueFlow注册自定义连线类型
const { edges, setViewport } = useVueFlow({
edgeTypes: {
@@ -225,14 +225,16 @@ const handleNext = async () => {
})
}
})
console.log('🚀 ~ handleNext ~ edges.value:', edges.value)
await checkStore.setChnNum(chnNumList)
CompareTestVisible.value = false
dialogVisible.value = false
selectTestItemPopupRef.value?.open()
}
const openTestDialog = async () => {
CompareTestVisible.value = true
// 转换连接信息只保留设备ID和通道号
const connections = edges.value.reduce(
(map, edge) => {
@@ -250,15 +252,17 @@ const openTestDialog = async () => {
generateChannelMapping()
testPopup.value?.open(
dialogTitle.value,
channelMapping.value,
planId.value,
jwtUtil.getLoginName(),
devIds.value,
standardDevIds.value,
connections
)
setTimeout(() => {
testPopup.value?.open(
dialogTitle.value,
channelMapping.value,
planId.value,
jwtUtil.getLoginName(),
devIds.value,
standardDevIds.value,
connections
)
}, 100)
}
// 转换 edges.value 为 channelMapping 格式