|
@@ -57,6 +57,7 @@ export function useWs() {
|
|
clearTimeout(loadingTime);
|
|
clearTimeout(loadingTime);
|
|
for (const item of testList) {
|
|
for (const item of testList) {
|
|
let examId = `${parameter.project}_${item}`;
|
|
let examId = `${parameter.project}_${item}`;
|
|
|
|
+ console.log(`【${examId}】前端发送disconnect_request,code:1`)
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: 'WS连接超时' } });
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: 'WS连接超时' } });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -75,6 +76,7 @@ export function useWs() {
|
|
}
|
|
}
|
|
getNetWork(examId, (e: any) => {
|
|
getNetWork(examId, (e: any) => {
|
|
if (!e.status) {
|
|
if (!e.status) {
|
|
|
|
+ console.log(`【${examId}】前端发送disconnect_request,code:2`)
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: '工作站未响应' } });
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: '工作站未响应' } });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -112,6 +114,7 @@ export function useWs() {
|
|
}
|
|
}
|
|
getNetWork(examId, (e: any) => {
|
|
getNetWork(examId, (e: any) => {
|
|
if (!e.status) {
|
|
if (!e.status) {
|
|
|
|
+ console.log(`【${examId}】前端发送disconnect_request,code:3`)
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: '工作站未响应' } });
|
|
callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: '工作站未响应' } });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -159,7 +162,9 @@ export function useWs() {
|
|
//测试中违规提示
|
|
//测试中违规提示
|
|
if (e.cmd === 'warning_notify') {
|
|
if (e.cmd === 'warning_notify') {
|
|
if ([233].includes(e.status)) {
|
|
if ([233].includes(e.status)) {
|
|
- callback({ cmd: 'disconnect_request', exam_id: e.exam_id, data: { message: e.data.message } });
|
|
|
|
|
|
+ let examId = e.exam_id;
|
|
|
|
+ console.log(`【${examId}】前端发送disconnect_request,code:4`)
|
|
|
|
+ callback({ cmd: 'disconnect_request', exam_id: examId, data: { message: e.data.message } });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//断线状态
|
|
//断线状态
|