From bbd438d23f3e7863c7c9b1f2cba4c9a9f17e4919 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 17 Sep 2025 15:42:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AF=94=E5=AF=B9=E5=BC=8F?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/home/components/channelPairing.vue | 3 +-- .../views/home/components/deviceConnectionPopup.vue | 11 +++++++++-- .../src/views/home/components/realTimeDataAlign.vue | 2 +- frontend/src/views/home/components/table.vue | 12 ++++++++---- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/frontend/src/views/home/components/channelPairing.vue b/frontend/src/views/home/components/channelPairing.vue index b308d49..64a96c5 100644 --- a/frontend/src/views/home/components/channelPairing.vue +++ b/frontend/src/views/home/components/channelPairing.vue @@ -262,8 +262,7 @@ const handleNext = async () => { {} as Record ) await generateChannelMapping() - console.log('通道映射:', channelMapping.value) - return + await checkStore.setChnNum(chnNumList) return { title: dialogTitle.value, diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 4d05bf3..240b787 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -208,14 +208,21 @@ const open = async ( device: Device.ResPqDev[], standardDev: StandardDevice.ResPqStandardDevice[], fatherPlanId: string, - DeviceMonitoringMap: Map + DeviceMonitoringMap: Map, + checkType: string ) => { CompareTestVisible.value = false - selectTestItemPopupRef.value?.open() + devIdList.value = device pqStandardDevList.value = standardDev planIdKey.value = fatherPlanId deviceMonitor.value = DeviceMonitoringMap + if(checkType == "一键检测"){ + openTestDialog() + }else{ + selectTestItemPopupRef.value?.open() + } + // edges.value = [] // devIds.value = device.map(d => d.id) diff --git a/frontend/src/views/home/components/realTimeDataAlign.vue b/frontend/src/views/home/components/realTimeDataAlign.vue index 7281edb..e5d344b 100644 --- a/frontend/src/views/home/components/realTimeDataAlign.vue +++ b/frontend/src/views/home/components/realTimeDataAlign.vue @@ -132,7 +132,7 @@ const getMappedDutChannel = (deviceName: string, stdChannel: string) => { const formatDutChannelLabel = (dutChannel: string) => { // 如果是"被检设备X通道Y"格式,则转换为"被检设备X-通道Y" if (!dutChannel) return '未映射'; - return dutChannel.replace(/(被检设备\d+)(通道\d+)/, '$1-$2'); + return dutChannel.replace(/(.+)(通道\d+)/, '$1-$2'); }; // 处理标准设备通道切换 diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 5386f74..f11c860 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -80,7 +80,7 @@ 手动检测 @@ -696,7 +696,7 @@ function refreshStatusList() { * 通道配对功能处理函数(比对模式专用) * 校验选中设备的一致性,然后打开通道配对弹窗 */ -const handleTest2 = async () => { +const handleTest2 = async (val: string) => { // 检查是否选择了设备 if (devNum == 0) { @@ -829,7 +829,7 @@ const handleTest2 = async () => { // 只传递有监测点的设备 - deviceConnectionPopupRef.value?.open(filteredChannelsSelection, pqStandardDevList.value, props.id,filteredDeviceMonitoringMap) + deviceConnectionPopupRef.value?.open(filteredChannelsSelection, pqStandardDevList.value, props.id,filteredDeviceMonitoringMap,val) } /** @@ -964,7 +964,11 @@ const handleTest = async (val: string) => { checkStore.setSelectTestItems({ preTest: false, timeTest: false, channelsTest: false, test: true }) } else { checkStore.setReCheckType(1) - openTestDialog(true) + if(modeStore.currentMode == '比对式'){ + handleTest2('一键检测') + }else{ + openTestDialog(true) + } } } }