|
@@ -180,6 +180,7 @@ export function useWs() {
|
|
|
}
|
|
|
//状态变更
|
|
|
if (e.cmd === 'set_exam_state') {
|
|
|
+ getClearExamStateTimer();
|
|
|
let index = examStateList.findIndex((item: any) => {
|
|
|
return item.examId == e.exam_id;
|
|
|
});
|
|
@@ -639,6 +640,13 @@ export function useWs() {
|
|
|
timerManager[key] = null;
|
|
|
}
|
|
|
}
|
|
|
+ getClearExamStateTimer();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 清空状态更新定时任务
|
|
|
+ */
|
|
|
+ function getClearExamStateTimer() {
|
|
|
for(let i = 0;i<examStateList.length;i++){
|
|
|
if (examStateList[i].hasOwnProperty('timer1')) {
|
|
|
clearInterval(examStateList[i].timer1);
|