|
@@ -103,12 +103,12 @@ const data = reactive<any>({
|
|
|
multipleItemRefList: [],//获取区列表
|
|
|
styleType: null,//展示样式1:1-5个,2:6-10个,3:10个以上,4:1-4个,
|
|
|
showReportList: false,//显示隐藏测试记录
|
|
|
- exit: 0,//退出响应次数
|
|
|
+ exitStatus: 0,//退出响应次数
|
|
|
sid: null,//WS的id
|
|
|
chooseStudentArea: '',//弹出手动选择对应的区号
|
|
|
device_info: {},//设备信息
|
|
|
});
|
|
|
-const { timerManager, parameter, time, userInfo, examState, needStart, showTestAgain, testList, multipleItemRefList, styleType, showReportList, exit, sid, chooseStudentArea, device_info } = toRefs(data);
|
|
|
+const { timerManager, parameter, time, userInfo, examState, needStart, showTestAgain, testList, multipleItemRefList, styleType, showReportList, exitStatus, sid, chooseStudentArea, device_info } = toRefs(data);
|
|
|
|
|
|
/**
|
|
|
* 创建组件实例
|
|
@@ -650,6 +650,7 @@ const initHand = () => {
|
|
|
}
|
|
|
//左滑动
|
|
|
if (e?.data?.result == "next_item") {
|
|
|
+
|
|
|
if(examState.value == 43 && time.value.ready){
|
|
|
return false;
|
|
|
}
|
|
@@ -661,8 +662,8 @@ const initHand = () => {
|
|
|
//举左手
|
|
|
if (e?.data?.result == "left_hand") {
|
|
|
//举左手确认退出
|
|
|
- // if (exit.value) {
|
|
|
- // exit.value = 0;
|
|
|
+ // if (exitStatus.value) {
|
|
|
+ // exitStatus.value = 0;
|
|
|
// //确认退出
|
|
|
// let keyEvent: any = null;
|
|
|
// keyEvent = new KeyboardEvent('keydown', {
|
|
@@ -697,8 +698,8 @@ const initHand = () => {
|
|
|
}
|
|
|
//退出
|
|
|
if (e?.data?.result == "exit") {
|
|
|
- // console.log("exit.value", exit.value)
|
|
|
- if (exit.value == 0) {
|
|
|
+ // console.log("exitStatus.value", exitStatus.value)
|
|
|
+ if (exitStatus.value == 0) {
|
|
|
speckText("请保持两秒确认退出");
|
|
|
//第一次才弹出
|
|
|
confirmExit();
|
|
@@ -706,11 +707,11 @@ const initHand = () => {
|
|
|
let keyEvent: any = null;
|
|
|
let myKey = null;
|
|
|
//如果交叉手两秒后返回超过4次就确认退出
|
|
|
- if (exit.value >= 4) {
|
|
|
+ if (exitStatus.value >= 4) {
|
|
|
myKey = 'Enter';
|
|
|
} else {
|
|
|
myKey = 'Esc';
|
|
|
- exit.value = 0;
|
|
|
+ exitStatus.value = 0;
|
|
|
}
|
|
|
if (myKey == 'Esc') {
|
|
|
keyEvent = new KeyboardEvent('keydown', {
|
|
@@ -741,12 +742,12 @@ const initHand = () => {
|
|
|
document.activeElement?.dispatchEvent(keyEvent);
|
|
|
}, 2500)
|
|
|
}
|
|
|
- exit.value = exit.value + 1
|
|
|
+ exitStatus.value = exitStatus.value + 1
|
|
|
}
|
|
|
// if (e?.data?.result == "exit") {
|
|
|
- // console.log("exit.value", exit.value)
|
|
|
- // if (exit.value == 0) {
|
|
|
- // exit.value = 1
|
|
|
+ // console.log("exitStatus.value", exitStatus.value)
|
|
|
+ // if (exitStatus.value == 0) {
|
|
|
+ // exitStatus.value = 1
|
|
|
// speckText("请5秒内举左手确认退出");
|
|
|
// //第一次才弹出
|
|
|
// confirmExit();
|
|
@@ -756,7 +757,7 @@ const initHand = () => {
|
|
|
// console.log("取消倒计时", time.value.exit)
|
|
|
// proxy?.$modal.msgWarning(`取消倒计时:${time.value.exit}`)
|
|
|
// if (time.value.exit == 0) {
|
|
|
- // exit.value = 0;
|
|
|
+ // exitStatus.value = 0;
|
|
|
// getClearTimer("exitTimer");
|
|
|
// let keyEvent: any = null;
|
|
|
// keyEvent = new KeyboardEvent('keydown', {
|