林旭祥 vor 1 Monat
Ursprung
Commit
92e5af6d9a
1 geänderte Dateien mit 69 neuen und 69 gelöschten Zeilen
  1. 69 69
      src/views/train/test.vue

+ 69 - 69
src/views/train/test.vue

@@ -760,27 +760,27 @@ const initHand = () => {
       return false;
     }
     //左滑动
-    if (e?.data?.result == "next_item") {
-      proxy?.$modal.msgSuccess('手势指令:左滑动');
-      // if(examState.value == 43 && time.value.ready){
-      //   return false;
-      // }
-      // if (examState.value == 43 || examState.value == 42) {
-      //   speckCancel();//停止播报
-      //   if (needStart.value == false) {
-      //     //自动流程项目重新识别直接返回3
-      //     closeOneTest();
-      //   } else {
-      //     //手动流程项目重新识别43返回41,42返回3
-      //     if (examState.value == 43) {
-      //       cleanData();
-      //       startFace();
-      //     } else {
-      //       closeOneTest();
-      //     }
-      //   }
-      // }
-    }
+    // if (e?.data?.result == "next_item") {
+    //   proxy?.$modal.msgSuccess('手势指令:左滑动');
+    //   if(examState.value == 43 && time.value.ready){
+    //     return false;
+    //   }
+    //   if (examState.value == 43 || examState.value == 42) {
+    //     speckCancel();//停止播报
+    //     if (needStart.value == false) {
+    //       //自动流程项目重新识别直接返回3
+    //       closeOneTest();
+    //     } else {
+    //       //手动流程项目重新识别43返回41,42返回3
+    //       if (examState.value == 43) {
+    //         cleanData();
+    //         startFace();
+    //       } else {
+    //         closeOneTest();
+    //       }
+    //     }
+    //   }
+    // }
     //举左手
     if (e?.data?.result == "left_hand") {
       proxy?.$modal.msgSuccess('手势指令:举左手');
@@ -823,54 +823,54 @@ const initHand = () => {
       }
     }
     //退出
-    if (e?.data?.result == "exit") {
-      proxy?.$modal.msgSuccess('手势指令:交叉手');
-      // console.log("exitStatus.value", exitStatus.value)
-      if (exitStatus.value == 0) {
-        speckText("请保持两秒确认退出");
-        //第一次才弹出
-        confirmExit();
-        setTimeout(() => {
-          let keyEvent: any = null;
-          let myKey = null;
-          //如果交叉手两秒后返回超过4次就确认退出
-          if (exitStatus.value >= 4) {
-            myKey = 'Enter';
-          } else {
-            myKey = 'Esc';
-          }
-          if (myKey == 'Esc') {
-            keyEvent = new KeyboardEvent('keydown', {
-              key: 'Escape', // 键值
-              code: 'Escape', // 键盘代码
-              keyCode: 27, // 旧的键盘代码
-              which: 27, // 新的键盘代码
-              shiftKey: false, // 是否按下Shift键
-              ctrlKey: false, // 是否按下Ctrl键
-              metaKey: false, // 是否按下Meta键(Win键或Command键)
-              bubbles: true, // 事件是否冒泡
-              cancelable: true // 是否可以取消事件的默认行为
-            });
-            exitStatus.value = 0;
-          }
-          if (myKey == 'Enter') {
-            keyEvent = new KeyboardEvent('keydown', {
-              key: 'Enter', // 键值
-              code: 'Enter', // 键盘代码
-              keyCode: 13, // 旧的键盘代码
-              which: 13, // 新的键盘代码
-              shiftKey: false, // 是否按下Shift键
-              ctrlKey: false, // 是否按下Ctrl键
-              metaKey: false, // 是否按下Meta键(Win键或Command键)
-              bubbles: true, // 事件是否冒泡
-              cancelable: true // 是否可以取消事件的默认行为
-            });
-          }
-          document.activeElement?.dispatchEvent(keyEvent);
-        }, 2500)
-      }
-      exitStatus.value = exitStatus.value + 1
-    }
+    // if (e?.data?.result == "exit") {
+    //   proxy?.$modal.msgSuccess('手势指令:交叉手');
+    //   // console.log("exitStatus.value", exitStatus.value)
+    //   if (exitStatus.value == 0) {
+    //     speckText("请保持两秒确认退出");
+    //     //第一次才弹出
+    //     confirmExit();
+    //     setTimeout(() => {
+    //       let keyEvent: any = null;
+    //       let myKey = null;
+    //       //如果交叉手两秒后返回超过4次就确认退出
+    //       if (exitStatus.value >= 4) {
+    //         myKey = 'Enter';
+    //       } else {
+    //         myKey = 'Esc';
+    //       }
+    //       if (myKey == 'Esc') {
+    //         keyEvent = new KeyboardEvent('keydown', {
+    //           key: 'Escape', // 键值
+    //           code: 'Escape', // 键盘代码
+    //           keyCode: 27, // 旧的键盘代码
+    //           which: 27, // 新的键盘代码
+    //           shiftKey: false, // 是否按下Shift键
+    //           ctrlKey: false, // 是否按下Ctrl键
+    //           metaKey: false, // 是否按下Meta键(Win键或Command键)
+    //           bubbles: true, // 事件是否冒泡
+    //           cancelable: true // 是否可以取消事件的默认行为
+    //         });
+    //         exitStatus.value = 0;
+    //       }
+    //       if (myKey == 'Enter') {
+    //         keyEvent = new KeyboardEvent('keydown', {
+    //           key: 'Enter', // 键值
+    //           code: 'Enter', // 键盘代码
+    //           keyCode: 13, // 旧的键盘代码
+    //           which: 13, // 新的键盘代码
+    //           shiftKey: false, // 是否按下Shift键
+    //           ctrlKey: false, // 是否按下Ctrl键
+    //           metaKey: false, // 是否按下Meta键(Win键或Command键)
+    //           bubbles: true, // 事件是否冒泡
+    //           cancelable: true // 是否可以取消事件的默认行为
+    //         });
+    //       }
+    //       document.activeElement?.dispatchEvent(keyEvent);
+    //     }, 2500)
+    //   }
+    //   exitStatus.value = exitStatus.value + 1
+    // }
     // if (e?.data?.result == "exit") {
     //   console.log("exitStatus.value", exitStatus.value)
     //   if (exitStatus.value == 0) {