From c735e7a5bb69acfb60e1094c210a68194f455e06 Mon Sep 17 00:00:00 2001
From: sjl <1716605279@qq.com>
Date: Fri, 12 Sep 2025 16:09:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=A3=80?=
=?UTF-8?q?=E6=B5=8B=E6=AC=A1=E6=95=B0=E9=BB=98=E8=AE=A4=E6=9C=80=E5=90=8E?=
=?UTF-8?q?=E4=B8=80=E6=AC=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...eDataCheckSingleChannelSingleTestPopup.vue | 37 +++++++++++++++++--
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
index 7737ef2..7bec915 100644
--- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
+++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
@@ -34,7 +34,7 @@
-
+
@@ -305,7 +305,7 @@ const getBasicInformation = async () => {
formContent.deviceName = res.data.deviceName
formContent.errorSysId = res.data.errorSysId
chnMapList.value = res.data.chnMap
- formContent.num = res.data.checkNum
+ //formContent.num = res.data.checkNum
let chnMap: string[] = []
for (let key in res.data.chnMap) {
@@ -313,6 +313,12 @@ const getBasicInformation = async () => {
}
chnList.value = chnMap
formContent.chnNum = formContent.chnNum == null ? chnList.value[0] : formContent.chnNum
+ // 新增:设置检测次数默认值为chnMap数组的最后一位
+ if (chnMapList.value[formContent.chnNum] && chnMapList.value[formContent.chnNum].length > 0) {
+ // 获取当前通道号对应的检测次数数组,并设置为最后一个值(最大值)
+ const numList = chnMapList.value[formContent.chnNum]
+ formContent.num = numList[numList.length - 1]
+ }
waveNumCount.value = res.data.waveNumTotal
// 查询表格数据
@@ -343,6 +349,24 @@ const getBasicInformation = async () => {
})
}
+
+const handleChnNumChange = (value: string) => {
+ formContent.chnNum = value
+ // 更新检测次数为当前通道的最后一条记录
+ updateCheckNumForChn(value)
+ // 获取结果数据
+ getResults('')
+}
+
+// 更新检测次数为指定通道的最后一条记录
+const updateCheckNumForChn = (chnNum: string) => {
+ if (chnMapList.value[chnNum] && chnMapList.value[chnNum].length > 0) {
+ // 获取当前通道号对应的检测次数数组,并设置为最后一个值(最大值)
+ const numList = chnMapList.value[chnNum]
+ formContent.num = numList[numList.length - 1]
+ }
+}
+
// 左边树变化
const handleNodeClick = (data: any) => {
rowList.value.scriptName = data.scriptName
@@ -377,17 +401,22 @@ const handleNodeClick = (data: any) => {
}
// 获取结果
const getResults = async (code: any) => {
+ console.log('getResults', code)
checkResultData.value = []
rawTableData.value = []
+
+ // 判断是否为录波数据请求
+ const isWaveDataRequest = code === 'wave_data' || isWaveData.value
+
getContrastResult({
planId: checkStore.plan.id,
scriptType: rowList.value.scriptType,
deviceId: formContent.deviceId,
chnNum: formContent.chnNum,
num: formContent.num == '' ? null : formContent.num,
- waveNum: code == 'wave_data' ? waveNumber.value : null,
- isWave: code == 'wave_data' ? true : false ,
+ waveNum: isWaveDataRequest ? waveNumber.value : null,
+ isWave: isWaveDataRequest ,
patternId: pattern.value
}).then((res: any) => {
let list: string[] = []