Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -48,12 +48,12 @@
|
|||||||
<!-- :icon="Failed"-->
|
<!-- :icon="Failed"-->
|
||||||
<!-- disabled>连接超时-->
|
<!-- disabled>连接超时-->
|
||||||
<!-- </el-button>-->
|
<!-- </el-button>-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
:icon="RefreshLeft"
|
<!-- :icon="RefreshLeft"-->
|
||||||
v-if="testStatus === 'test_recheck'"
|
<!-- v-if="testStatus === 'test_recheck'"-->
|
||||||
@click="emit('sendReCheck')">重新检测
|
<!-- @click="emit('sendReCheck')">重新检测-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
|
|
||||||
|
|
||||||
<el-button type="success" v-if="percentage >= 100" :icon="Check" disabled>检测完成</el-button>
|
<el-button type="success" v-if="percentage >= 100" :icon="Check" disabled>检测完成</el-button>
|
||||||
@@ -324,17 +324,16 @@ watch(testStatus, function (newValue, oldValue) {
|
|||||||
|
|
||||||
showTestLog()
|
showTestLog()
|
||||||
|
|
||||||
if (oldValue == 'error') {
|
// if (oldValue == 'error') {
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
|
// handleReCheck()
|
||||||
handleReCheck()
|
// }
|
||||||
}
|
|
||||||
emit('update:testStatus', 'test_init')
|
emit('update:testStatus', 'test_init')
|
||||||
//startTimer() // todo 可移除
|
//startTimer() // todo 可移除
|
||||||
startData.value = new Date();
|
startData.value = new Date();
|
||||||
timeDifference.value = 0;
|
timeDifference.value = 0;
|
||||||
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:初始化开始!`})
|
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()
|
stopTimeCount()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -428,7 +427,8 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
|
log: `${new Date().toLocaleString()}:存在已经初始化步骤,执行自动关闭,请重新发起检测!`
|
||||||
})
|
})
|
||||||
emit('update:testStatus', 'test_recheck')
|
// emit('update:testStatus', 'test_recheck')
|
||||||
|
emit('update:testStatus', 'test_init_fail')
|
||||||
} else {
|
} else {
|
||||||
switch (newValue.requestId) {
|
switch (newValue.requestId) {
|
||||||
case 'server_error':
|
case 'server_error':
|
||||||
@@ -1336,10 +1336,7 @@ const todoItem = (code: string) => {
|
|||||||
const handleResumeTest = () => {
|
const handleResumeTest = () => {
|
||||||
//activeIndex++
|
//activeIndex++
|
||||||
startData.value = new Date();
|
startData.value = new Date();
|
||||||
testLogList.push({
|
testLogList.push({type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!`})
|
||||||
type: 'info',
|
|
||||||
log: `${new Date().toLocaleString()}:继续检测`,
|
|
||||||
})
|
|
||||||
//startTimer()
|
//startTimer()
|
||||||
resumeTimeCount()
|
resumeTimeCount()
|
||||||
console.log('开始继续检测')
|
console.log('开始继续检测')
|
||||||
@@ -1353,10 +1350,12 @@ const handleReCheck = () => {
|
|||||||
timeView.value = '00:00:00'
|
timeView.value = '00:00:00'
|
||||||
timeDifference.value = 0
|
timeDifference.value = 0
|
||||||
testLogList.length = 0
|
testLogList.length = 0
|
||||||
|
|
||||||
errorCheckItem.length = 0
|
errorCheckItem.length = 0
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
showTestLog()
|
showTestLog()
|
||||||
|
// handleResumeTest()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前执行的大测试项序号
|
// 获取当前执行的大测试项序号
|
||||||
@@ -1382,11 +1381,13 @@ const getNextActiveIndex = (code: string = ''): number => {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
const startTimeCount = () => {
|
const startTimeCount = () => {
|
||||||
|
if(!timer){
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
timeCount.value = timeCount.value + 1
|
timeCount.value = timeCount.value + 1
|
||||||
timeView.value = secondToTime(timeCount.value)
|
timeView.value = secondToTime(timeCount.value)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const stopTimeCount = () => {
|
const stopTimeCount = () => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
检测中
|
检测中
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="warning" :icon="VideoPlay" v-if="TestStatus === 'paused'" @click="handleSubmit">继续检测</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="TestStatus === 'test_recheck'" @click="handleSubmit">重新检测</el-button>-->
|
||||||
<el-button type="primary" v-if="TestStatus === 'test_init'" disabled>
|
<el-button type="primary" v-if="TestStatus === 'test_init'" disabled>
|
||||||
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||||
<component :is="Refresh"/>
|
<component :is="Refresh"/>
|
||||||
@@ -308,12 +308,14 @@ const handleSubmit = () => {
|
|||||||
} else if (TestStatus.value == 'paused') {
|
} else if (TestStatus.value == 'paused') {
|
||||||
// 发送继续指令
|
// 发送继续指令
|
||||||
sendResume()
|
sendResume()
|
||||||
} else if (TestStatus.value == 'test_recheck') {
|
} else
|
||||||
// 发送重新检测指令
|
// if (TestStatus.value == 'test_recheck') {
|
||||||
sendReCheck()
|
// // 发送重新检测指令
|
||||||
|
// sendReCheck()
|
||||||
|
//
|
||||||
}else if (TestStatus.value == 'success') {
|
//
|
||||||
|
// }else
|
||||||
|
if (TestStatus.value == 'success') {
|
||||||
emit('quitClicked'); // 触发事件
|
emit('quitClicked'); // 触发事件
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user