微调
This commit is contained in:
@@ -51,12 +51,12 @@
|
||||
<!-- :icon="Failed"-->
|
||||
<!-- disabled>连接超时-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="RefreshLeft"
|
||||
v-if="testStatus === 'test_recheck'"
|
||||
@click="emit('sendReCheck')">重新检测
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- :icon="RefreshLeft"-->
|
||||
<!-- v-if="testStatus === 'recheck'"-->
|
||||
<!-- @click="emit('sendReCheck')">重新检测-->
|
||||
<!-- </el-button>-->
|
||||
|
||||
|
||||
<el-button type="success" v-if="percentage >= 100" :icon="Check" disabled>检测完成</el-button>
|
||||
@@ -328,16 +328,19 @@ watch(testStatus, function (newValue, oldValue) {
|
||||
|
||||
showTestLog()
|
||||
|
||||
if (oldValue == 'error') {
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
|
||||
handleReCheck()
|
||||
}
|
||||
// if (oldValue == 'recheck' || oldValue == 'error' || oldValue == 'test_init_fail' || oldValue == 'connect_timeout' || oldValue == 'pause_timeout' || oldValue == 'error_flow_end') {
|
||||
// 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 == 'recheck' || newValue == 'error' || newValue == 'test_init_fail' || newValue == 'connect_timeout' || newValue == 'pause_timeout' || oldValue == 'error_flow_end') {
|
||||
stopTimeCount()
|
||||
}
|
||||
})
|
||||
|
||||
// 次数
|
||||
@@ -429,7 +432,8 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
type: 'error',
|
||||
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
|
||||
})
|
||||
emit('update:testStatus', 'test_recheck')
|
||||
// emit('update:testStatus', 'recheck')
|
||||
emit('update:testStatus', 'test_init_fail')
|
||||
} else {
|
||||
switch (newValue.requestId) {
|
||||
case 'server_error':
|
||||
@@ -552,7 +556,7 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
case 'Resume_Success':
|
||||
ElMessage.success('开始继续检测')
|
||||
emit('update:testStatus', 'process')
|
||||
handleResumeTest()
|
||||
//handleResumeTest()
|
||||
break;
|
||||
// case 'Resume_Fail':
|
||||
// ElMessage.error('无法继续检测')
|
||||
@@ -1336,11 +1340,8 @@ const todoItem = (code: string) => {
|
||||
const handleResumeTest = () => {
|
||||
//activeIndex++
|
||||
startData.value = new Date();
|
||||
testLogList.push({
|
||||
type: 'info',
|
||||
log: `${new Date().toLocaleString()}:继续检测`,
|
||||
})
|
||||
//startTimer()
|
||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
|
||||
startTimer()
|
||||
resumeTimeCount()
|
||||
console.log('开始继续检测')
|
||||
};
|
||||
@@ -1353,10 +1354,12 @@ const handleReCheck = () => {
|
||||
timeView.value = '00:00:00'
|
||||
timeDifference.value = 0
|
||||
testLogList.length = 0
|
||||
|
||||
errorCheckItem.length = 0
|
||||
count = 0
|
||||
|
||||
showTestLog()
|
||||
handleResumeTest()
|
||||
}
|
||||
|
||||
// 获取当前执行的大测试项序号
|
||||
@@ -1382,10 +1385,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 = () => {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-button type="primary" :icon="DArrowRight" v-if="stepsActiveIndex < stepsTotalNum && ActiveStatue != 'success'" @click="nextStep">跳过</el-button>
|
||||
<el-button type="primary" :icon="VideoPlay" v-if="ActiveStatue === 'waiting'" @click="handleSubmit">开始检测</el-button>
|
||||
<el-button type="primary"
|
||||
v-if="ActiveStatue!=='success'&& ActiveStatue !== 'test_init' && ActiveStatue !=='paused_ing' && ActiveStatue !=='paused' && ActiveStatue!=='test_recheck' && ActiveStatue !== 'waiting' && ActiveStatue !== 'error' && ActiveStatue !== 'test_init_fail' && ActiveStatue !== 'connect_timeout' && ActiveStatue!=='pause_timeout'"
|
||||
v-if="ActiveStatue!=='success'&& ActiveStatue !== 'test_init' && ActiveStatue !=='paused_ing' && ActiveStatue !=='paused' && ActiveStatue!=='recheck' && ActiveStatue !== 'waiting' && ActiveStatue !== 'error' && ActiveStatue !== 'test_init_fail' && ActiveStatue !== 'connect_timeout' && ActiveStatue!=='pause_timeout'"
|
||||
disabled>
|
||||
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||
<component :is="Refresh"/>
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- 检测中-->
|
||||
<!-- </el-button>-->
|
||||
<el-button type="warning" :icon="VideoPlay" v-if="TestStatus === 'paused'" @click="handleSubmit">继续检测</el-button>
|
||||
<el-button type="primary" :icon="RefreshLeft" v-if="TestStatus === 'test_recheck'" @click="handleSubmit">重新检测</el-button>
|
||||
<!-- <el-button type="primary" :icon="RefreshLeft" v-if="ActiveStatue === 'recheck' || ActiveStatue ==='error' || ActiveStatue ==='test_init_fail' || ActiveStatue === 'pause_timeout' || ActiveStatue === 'connect_timeout'" @click="handleSubmit">重新检测</el-button>-->
|
||||
<el-button type="primary" v-if="TestStatus === 'test_init'" disabled>
|
||||
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||
<component :is="Refresh"/>
|
||||
@@ -230,10 +230,11 @@ const handleSubmit = () => {
|
||||
} else if (TestStatus.value == 'paused') {
|
||||
// 发送继续指令
|
||||
sendResume()
|
||||
} else if (TestStatus.value == 'test_recheck') {
|
||||
// 发送重新检测指令
|
||||
sendReCheck()
|
||||
}
|
||||
// else if (TestStatus.value == 'recheck') {
|
||||
// // 发送重新检测指令
|
||||
// sendReCheck()
|
||||
// }
|
||||
// else if (TestStatus.value == 'success') {
|
||||
// handleClose()
|
||||
// }
|
||||
@@ -287,7 +288,8 @@ watch(ActiveStatue, function (newValue, oldValue) {
|
||||
}
|
||||
if (newValue === 'pause_timeout' && stepsActive.value === 4) {
|
||||
stepsActiveIndex.value += 2
|
||||
nextStepText.value = '结束测试'
|
||||
// nextStepText.value = '结束测试'
|
||||
nextStepText.value = '暂停超时'
|
||||
}
|
||||
if (newValue === 'success' && nextStepText.value === '下一步') {
|
||||
nextStep() // 实现自动点击,进入下一个测试内容
|
||||
|
||||
Reference in New Issue
Block a user