From 6c05c6e06e6f1a8bd41ccd89918bc943aca17cad Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Wed, 26 Feb 2025 09:14:27 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/home/components/test.vue | 22 ++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue
index 26f72a9..f64c964 100644
--- a/frontend/src/views/home/components/test.vue
+++ b/frontend/src/views/home/components/test.vue
@@ -325,7 +325,6 @@ watch(testStatus, function (newValue, oldValue) {
showTestLog()
if (oldValue == 'error') {
- testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
handleReCheck()
}
emit('update:testStatus', 'test_init')
@@ -334,7 +333,7 @@ watch(testStatus, function (newValue, oldValue) {
timeDifference.value = 0;
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
}
- if (newValue == 'test_init_fail' || newValue == 'connect_timeout' || newValue == 'error' || newValue == 'pause_timeout' || newValue == 'recheck') {
+ if (newValue == 'recheck' || newValue == 'error' || newValue == 'test_init_fail' || newValue == 'connect_timeout' || newValue == 'pause_timeout' || oldValue == 'error_flow_end') {
stopTimeCount()
}
})
@@ -551,7 +550,7 @@ watch(webMsgSend, function (newValue, oldValue) {
case 'Resume_Success':
ElMessage.success('开始继续检测')
emit('update:testStatus', 'process')
- handleResumeTest()
+ //handleResumeTest()
break;
// case 'Resume_Fail':
// ElMessage.error('无法继续检测')
@@ -1336,10 +1335,7 @@ const todoItem = (code: string) => {
const handleResumeTest = () => {
//activeIndex++
startData.value = new Date();
- testLogList.push({
- type: 'info',
- log: `${new Date().toLocaleString()}:继续检测`,
- })
+ testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
//startTimer()
resumeTimeCount()
console.log('开始继续检测')
@@ -1353,10 +1349,12 @@ const handleReCheck = () => {
timeView.value = '00:00:00'
timeDifference.value = 0
testLogList.length = 0
+
errorCheckItem.length = 0
count = 0
showTestLog()
+ handleResumeTest()
}
// 获取当前执行的大测试项序号
@@ -1382,10 +1380,12 @@ const getNextActiveIndex = (code: string = ''): number => {
return -1
}
const startTimeCount = () => {
- timer = setInterval(() => {
- timeCount.value = timeCount.value + 1
- timeView.value = secondToTime(timeCount.value)
- }, 1000)
+ if(!timer){
+ timer = setInterval(() => {
+ timeCount.value = timeCount.value + 1
+ timeView.value = secondToTime(timeCount.value)
+ }, 1000)
+ }
}
const stopTimeCount = () => {
From 15faac8079d24d48fc0fd1c0e3d11aa994d9f47b Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Wed, 26 Feb 2025 10:05:43 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E6=A3=80=E6=B5=8B-?=
=?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=87=8D=E6=96=B0=E6=A3=80=E6=B5=8B=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/home/components/test.vue | 21 ++++++++++---------
.../src/views/home/components/testPopup.vue | 16 +++++++-------
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue
index f64c964..08534f9 100644
--- a/frontend/src/views/home/components/test.vue
+++ b/frontend/src/views/home/components/test.vue
@@ -48,12 +48,12 @@
- 重新检测
-
+
+
+
+
+
+
检测完成
@@ -324,9 +324,9 @@ watch(testStatus, function (newValue, oldValue) {
showTestLog()
- if (oldValue == 'error') {
- handleReCheck()
- }
+ // if (oldValue == 'error') {
+ // handleReCheck()
+ // }
emit('update:testStatus', 'test_init')
//startTimer() // todo 可移除
startData.value = new Date();
@@ -427,7 +427,8 @@ watch(webMsgSend, function (newValue, oldValue) {
type: 'error',
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
})
- emit('update:testStatus', 'test_recheck')
+ // emit('update:testStatus', 'test_recheck')
+ emit('update:testStatus', 'test_init_fail')
} else {
switch (newValue.requestId) {
case 'server_error':
diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue
index e0e9cbd..9cbf2fd 100644
--- a/frontend/src/views/home/components/testPopup.vue
+++ b/frontend/src/views/home/components/testPopup.vue
@@ -35,7 +35,7 @@
检测中
继续检测
- 重新检测
+
@@ -308,12 +308,14 @@ const handleSubmit = () => {
} else if (TestStatus.value == 'paused') {
// 发送继续指令
sendResume()
- } else if (TestStatus.value == 'test_recheck') {
- // 发送重新检测指令
- sendReCheck()
-
-
- }else if (TestStatus.value == 'success') {
+ } else
+ // if (TestStatus.value == 'test_recheck') {
+ // // 发送重新检测指令
+ // sendReCheck()
+ //
+ //
+ // }else
+ if (TestStatus.value == 'success') {
emit('quitClicked'); // 触发事件
}
break;
From 79306d846f14c23f8629390f5d55ee262c96bb8c Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Wed, 26 Feb 2025 15:58:16 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/home/components/test.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue
index 08534f9..b3ba48f 100644
--- a/frontend/src/views/home/components/test.vue
+++ b/frontend/src/views/home/components/test.vue
@@ -551,7 +551,7 @@ watch(webMsgSend, function (newValue, oldValue) {
case 'Resume_Success':
ElMessage.success('开始继续检测')
emit('update:testStatus', 'process')
- //handleResumeTest()
+ handleResumeTest()
break;
// case 'Resume_Fail':
// ElMessage.error('无法继续检测')
@@ -1355,7 +1355,7 @@ const handleReCheck = () => {
count = 0
showTestLog()
- handleResumeTest()
+ // handleResumeTest()
}
// 获取当前执行的大测试项序号