diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue
index 26f72a9..b3ba48f 100644
--- a/frontend/src/views/home/components/test.vue
+++ b/frontend/src/views/home/components/test.vue
@@ -48,12 +48,12 @@
- 重新检测
-
+
+
+
+
+
+
检测完成
@@ -324,17 +324,16 @@ watch(testStatus, function (newValue, oldValue) {
showTestLog()
- if (oldValue == 'error') {
- testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
- handleReCheck()
- }
+ // if (oldValue == 'error') {
+ // handleReCheck()
+ // }
emit('update:testStatus', 'test_init')
//startTimer() // todo 可移除
startData.value = new Date();
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()
}
})
@@ -428,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':
@@ -1336,10 +1336,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 +1350,12 @@ const handleReCheck = () => {
timeView.value = '00:00:00'
timeDifference.value = 0
testLogList.length = 0
+
errorCheckItem.length = 0
count = 0
showTestLog()
+ // handleResumeTest()
}
// 获取当前执行的大测试项序号
@@ -1382,10 +1381,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 = () => {
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;