From 4a6db824ba22077d56ef06b0382ca9cd61bacd71 Mon Sep 17 00:00:00 2001 From: guanj Date: Tue, 26 Aug 2025 20:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=9A=E9=81=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/home/components/channelPairing.vue | 496 ++++++++++++++++++ .../home/components/compareTestPopup.vue | 77 ++- .../home/components/deviceConnectionPopup.vue | 48 +- frontend/src/views/home/components/table.vue | 8 +- 4 files changed, 594 insertions(+), 35 deletions(-) create mode 100644 frontend/src/views/home/components/channelPairing.vue diff --git a/frontend/src/views/home/components/channelPairing.vue b/frontend/src/views/home/components/channelPairing.vue new file mode 100644 index 0000000..e8cff00 --- /dev/null +++ b/frontend/src/views/home/components/channelPairing.vue @@ -0,0 +1,496 @@ + + + + + diff --git a/frontend/src/views/home/components/compareTestPopup.vue b/frontend/src/views/home/components/compareTestPopup.vue index 8627c0a..6a396ef 100644 --- a/frontend/src/views/home/components/compareTestPopup.vue +++ b/frontend/src/views/home/components/compareTestPopup.vue @@ -17,7 +17,11 @@ process-status="finish" finish-status="success" > - + - + + + | null>(null) const testRef: any = ref(null) +const prop = defineProps({ + devIdList: { + type: Array as any, + default: [] + }, + pqStandardDevList: { + type: Array as any, + default: [] + }, + planIdKey: { + type: String, + default: '' + } +}) const dataSocket = reactive({ socketServe: socketClient.Instance }) @@ -178,7 +201,7 @@ const initOperate = () => { TestStatus.value = 'waiting' - stepsActiveIndex.value = 1 + stepsActiveIndex.value = 0 showComponent.value = true // 初始化勾选的检测内容 preTestSelected.value = checkStore.selectTestItems.preTest @@ -193,13 +216,13 @@ const initOperate = () => { stepsTotalNum.value = count + 1 if (preTestSelected.value) { - stepsActiveView.value = 1 - stepsActive.value = 1 + stepsActiveView.value = 0 + stepsActive.value = 0 return } if (testSelected.value) { - stepsActiveView.value = 2 - stepsActive.value = 2 + stepsActiveView.value = 0 + stepsActive.value = 0 return } } @@ -224,6 +247,7 @@ const open = async ( if (checkStore.selectTestItems.preTest && !checkStore.selectTestItems.test) { testAgain.value = true } + dialogTitle.value = title channelMapping.value = mapping planId.value = plan loginName.value = login @@ -259,12 +283,6 @@ const open = async ( //预检测-重新检测 const handleSubmitAgain = async () => { - console.log( - '🚀 ~ handleSubmitAgain ~ stepsActive.value:', - stepsActiveIndex.value, - stepsActiveView.value, - stepsActive.value - ) if (checkStore.selectTestItems.preTest) { stepsActiveIndex.value = 1 stepsActiveView.value = 1 @@ -311,10 +329,31 @@ const handleSubmitAgain = async () => { //开始检测 const handleSubmitFast = async () => { + if (channelPairingRef.value) { + const res = await channelPairingRef.value.handleNext() + console.log('🚀 ~ handleSubmitFast ~ res:', res) + if (!res) return + dialogTitle.value = res.title + channelMapping.value = res.mapping + planId.value = res.plan + loginName.value = res.login + devIds.value = res.devIdsArray + standardDevIds.value = res.standardDevIdsArray + pairs.value = res.pair + } if (!dataSocket.socketServe.connected) { ElMessage.error('webSocket连接中断!') return } + if (checkStore.selectTestItems.preTest) { + stepsActiveIndex.value = 1 + stepsActiveView.value = 1 + stepsActive.value = 1 + } else { + stepsActiveIndex.value = 1 + stepsActiveView.value = 2 + stepsActive.value = 2 + } switch (stepsActive.value) { case 1: @@ -534,6 +573,8 @@ const nextStep = () => { } const handleStepClick = (step: number) => { + console.log('🚀 ~ handleStepClick ~ step > stepsActive.value:', step, stepsActive.value) + if (step > stepsActive.value) { return } else { diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 69f7397..14b1b13 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -1,11 +1,10 @@