正式检测代码提交

This commit is contained in:
2025-01-07 16:27:51 +08:00
parent 689cc39bbc
commit fe04ad1573
2 changed files with 25 additions and 13 deletions

View File

@@ -254,6 +254,13 @@ watch(webMsgSend,function (newValue,oldValue){
ElMessage.error(newValue.code) ElMessage.error(newValue.code)
step1.value = 'error' step1.value = 'error'
ts.value = 'error' ts.value = 'error'
}else if(newValue.code == 10523){
step1.value = 'error'
ts.value = 'error'
step1InitLog.value = [{
type: 'error',
log: '源连接失败!',
}];
} }
break; break;
@@ -503,6 +510,9 @@ watch(webMsgSend,function (newValue,oldValue){
ts.value = 'error' ts.value = 'error'
break; break;
} }
break;
case 'unknown_operate':
break; break;
} }

View File

@@ -199,7 +199,7 @@ const detectionOptions = ref([
data.socketServe = socketClient.Instance; data.socketServe = socketClient.Instance;
data.socketServe.registerCallBack('aaa', (res) => { data.socketServe.registerCallBack('aaa', (res) => {
// 处理来自服务器的消息 // 处理来自服务器的消息
console.log('Received message:', res); // console.log('Received message:', res);
// 根据需要在这里添加更多的处理逻辑 // 根据需要在这里添加更多的处理逻辑
if(res.code === 20000){ if(res.code === 20000){
@@ -236,10 +236,12 @@ const detectionOptions = ref([
background: 'rgb(255, 255, 255, 0)', background: 'rgb(255, 255, 255, 0)',
})*/ })*/
startPreTest({ startPreTest({
userPageId: "cdf", userPageId: "cdfee",
devIds:deviceIds, devIds:deviceIds,
planId:planId, planId:planId,
operateType:'0' // '0'为预检测、1为正式检测 errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
scriptId:"a303b2224845fcc6f60198b8ca23dca9",
operateType:'0' // '1'为预检测、2为正式检测
}).then(res=>{ }).then(res=>{
@@ -253,22 +255,22 @@ const detectionOptions = ref([
// break; // break;
case 2: case 2:
if (TestStatus.value == "waiting") { if (TestStatus.value == "waiting") {
// startPreTest({ startPreTest({
// userPageId: "cdf", userPageId: "cdfee",
// devIds:deviceIds, devIds:deviceIds,
// planId:planId, planId:planId,
// errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d', errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
// scriptId:"a303b2224845fcc6f60198b8ca23dca9", scriptId:"a303b2224845fcc6f60198b8ca23dca9",
// operateType:'1' // '0'为预检测、‘1‘为正式检测 operateType:'2' // '1'为预检测、‘2‘为正式检测
// }).then(res => { }).then(res => {
// console.log(res) console.log(res)
/* if (res.code === 20000) { /* if (res.code === 20000) {
TestStatus.value = 'start' TestStatus.value = 'start'
webMsgSend.value = '' webMsgSend.value = ''
} else { } else {
ElMessage.error(res.message) ElMessage.error(res.message)
}*/ }*/
// }) })
TestStatus.value = 'start' TestStatus.value = 'start'
} else if (TestStatus.value == 'process') { } else if (TestStatus.value == 'process') {
// 发送暂停指令 // 发送暂停指令