From cc2020f3d6a948a408b9e06a98521a6e90cc1a04 Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Tue, 14 Jan 2025 14:17:05 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=9A=82=E5=81=9C=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/home/components/test.vue | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue
index 94f30f4..d322e70 100644
--- a/frontend/src/views/home/components/test.vue
+++ b/frontend/src/views/home/components/test.vue
@@ -296,6 +296,7 @@ watch(testStatus, function (newValue, oldValue) {
if (newValue == 'start') {
ElMessage.success('初始化开始!')
+ startData.value = new Date();
showTestLog()
if (oldValue == 'error') {
@@ -423,16 +424,16 @@ watch(webMsgSend, function (newValue, oldValue) {
break;
case 'Pause_Success':
ElMessage.success('暂停成功')
- emit('update:testStatus', 'paused')
handlePauseTest()
+ emit('update:testStatus', 'paused')
break;
// case 'Pause_Fail':
// ElMessage.error('暂停失败')
// break;
case 'Resume_Success':
ElMessage.success('开始继续检测')
- emit('update:testStatus', 'process')
handleResumeTest()
+ emit('update:testStatus', 'process')
break;
// case 'Resume_Fail':
// ElMessage.error('无法继续检测')
@@ -606,8 +607,6 @@ watch(webMsgSend, function (newValue, oldValue) {
}
break;
case 'Quit':
- //updatePercentage()
- //updateLog(false)
console.log('检测结束')
break;
}
@@ -750,6 +749,9 @@ function getTimeDifference(timeDifference: number): string {
return `: ${minutes} 分钟, ${seconds} 秒`
}
}
+watch(testLogList, () => {
+ scrollToBottom();
+}, {deep: true})
// 更新日志
const updateLog = (isStart: boolean) => {
@@ -763,7 +765,6 @@ const updateLog = (isStart: boolean) => {
// debugger
if (activeIndex <= checkTotal) {
if (isStart) {
- startData.value = new Date();
testLogList.push({
type: 'info',
log: currentTime.value + ` :${scriptData[activeIndex - 1].scriptName}准确度检测:开始`,
@@ -809,8 +810,6 @@ const updateLog = (isStart: boolean) => {
}
}
}
-
- scrollToBottom();
}
// 动态获取表格单元格样式
@@ -885,7 +884,7 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch
// chnResult: [1, 1, 1, 1],
// deviceId: "2957b271f39d4240a1c5e275c453676c",
// deviceName: "测试003"
- // },
+ // }
// ]
let temp = null
if (isStart) {
@@ -1019,12 +1018,6 @@ const handleClick = (item: any, chnNum: number, scriptType: string) => {
type: 'warning',
})
}
- // if (flag === 1) {
- // ElMessageBox.alert('该测试项数据异常', '数据异常', {
- // confirmButtonText: '确定',
- // type: 'warning',
- // })
- // }
if (flag === -1 || flag === 1) {
dataCheckSingleChannelSingleTestPopupRef.value?.open(item.deviceId, chnNum + '', scriptType);
}
From f5e78316efe56b28982255ae2419a36f17301a26 Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Tue, 14 Jan 2025 14:40:35 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=A2=AB=E6=A3=80=E6=B5=8B=E8=AE=BE?=
=?UTF-8?q?=E5=A4=87-=E6=A8=A1=E5=BC=8F=E5=AD=97=E6=AE=B5=E9=9A=90?=
=?UTF-8?q?=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../machine/device/components/devicePopup.vue | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue
index 06b1693..258652c 100644
--- a/frontend/src/views/machine/device/components/devicePopup.vue
+++ b/frontend/src/views/machine/device/components/devicePopup.vue
@@ -21,16 +21,16 @@
/>
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+