暂停正式检测
This commit is contained in:
@@ -145,6 +145,7 @@ import {CheckData} from "@/api/check/interface"
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {getBigTestItem} from "@/api/check/test";
|
||||
import {tryHideFullScreenLoading} from "@/components/Loading/fullScreen";
|
||||
|
||||
const checkStore = useCheckStore()
|
||||
|
||||
@@ -422,18 +423,21 @@ watch(webMsgSend, function (newValue, oldValue) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'Pause_Success':
|
||||
case 'preStopTest':
|
||||
if(newValue.operateCode == 'stop'){
|
||||
tryHideFullScreenLoading()
|
||||
ElMessage.success('暂停成功')
|
||||
handlePauseTest()
|
||||
emit('update:testStatus', 'paused')
|
||||
handlePauseTest()
|
||||
}
|
||||
break;
|
||||
// case 'Pause_Fail':
|
||||
// ElMessage.error('暂停失败')
|
||||
// break;
|
||||
case 'Resume_Success':
|
||||
ElMessage.success('开始继续检测')
|
||||
handleResumeTest()
|
||||
emit('update:testStatus', 'process')
|
||||
handleResumeTest()
|
||||
break;
|
||||
// case 'Resume_Fail':
|
||||
// ElMessage.error('无法继续检测')
|
||||
@@ -1281,7 +1285,7 @@ const handlePauseTest = () => {
|
||||
};
|
||||
|
||||
const handleResumeTest = () => {
|
||||
activeIndex++
|
||||
//activeIndex++
|
||||
startData.value = new Date();
|
||||
testLogList.push({
|
||||
type: 'info',
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
</el-icon>
|
||||
初始化中
|
||||
</el-button>
|
||||
<!-- <el-button type="warning" v-if="ActiveStatue === 'paused'" disabled>-->
|
||||
<!-- <el-icon class="loading-box" style="color: #fff;margin-right: 8px;">-->
|
||||
<!-- <component :is="Refresh"/>-->
|
||||
<!-- </el-icon>-->
|
||||
<!-- 暂停中-->
|
||||
<!-- </el-button>-->
|
||||
<el-button :type="ActiveStatue==='success'?'primary':'danger'" :icon="Right"
|
||||
v-if="ActiveStatue === 'success'||ActiveStatue==='error'||ActiveStatue==='test_init_fail'||ActiveStatue==='connect_timeout'"
|
||||
@click="nextStep">
|
||||
@@ -78,6 +84,7 @@ import {Device} from '@/api/device/interface/device';
|
||||
import socketClient from '@/utils/webSocketClient';
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {startPreTest, pauseTest, resumeTest} from '@/api/socket/socket'
|
||||
import {showFullScreenLoading} from "@/components/Loading/fullScreen";
|
||||
|
||||
|
||||
//import SvgIcon from '@/components/SvgIcon.vue';
|
||||
@@ -370,11 +377,8 @@ watch(ActiveStatue, function (newValue, oldValue) {
|
||||
const sendPause = () => {
|
||||
console.log('发起暂停请求')
|
||||
|
||||
pauseTest().then(res => {
|
||||
Object.assign(webMsgSend.value, {
|
||||
requestId: 'Pause_Success'
|
||||
})
|
||||
})
|
||||
pauseTest()
|
||||
showFullScreenLoading()
|
||||
}
|
||||
const sendResume = () => {
|
||||
console.log('发起继续检测请求')
|
||||
|
||||
Reference in New Issue
Block a user