引入暂停、继续检测接口

This commit is contained in:
caozehui
2025-01-09 16:27:05 +08:00
parent 40520a7d30
commit e5f201515e
4 changed files with 30 additions and 19 deletions

View File

@@ -77,7 +77,7 @@ import timeTest from './timeTest.vue'
import {Device} from '@/api/device/interface/device';
import socketClient from '@/utils/webSocketClient';
import {useCheckStore} from "@/stores/modules/check";
import {startPreTest, startTest, pauseTest, resumeTest} from '@/api/socket/socket'
import {startPreTest, pauseTest, resumeTest} from '@/api/socket/socket'
//import SvgIcon from '@/components/SvgIcon.vue';
@@ -378,18 +378,29 @@ watch(ActiveStatue, function (newValue, oldValue) {
})
const sendPause = () => {
console.log('发暂停指令')
console.log('发暂停请求')
Object.assign(webMsgSend.value, {
requestId: 'Pause_Success'
}) // todo 可移除
pauseTest().then(res => {
Object.assign(webMsgSend.value, {
requestId: 'Pause_Success'
})
})
}
const sendResume = () => {
console.log('发继续检测指令')
console.log('发继续检测请求')
Object.assign(webMsgSend.value, {
requestId: 'Resume_Success'
}) // todo 可移除
resumeTest({
userPageId: "cdf",
devIds: checkStore.devices.map((item) => item.deviceId),
planId: checkStore.planId,
errorSysId: 'cb407009f9894a8a8933b5d9b1e2f71d',
scriptId: "a303b2224845fcc6f60198b8ca23dca9",
operateType: '2' // '1'为预检测、2为正式检测
}).then(res => {
Object.assign(webMsgSend.value, {
requestId: 'Resume_Success'
})
})
}
const sendReCheck = () => {