Ver Fonte

日常开发

林旭祥 há 8 meses atrás
pai
commit
95df5fc9c9

+ 4 - 0
src/components/ChooseStudent/index.vue

@@ -520,6 +520,10 @@ defineExpose({
 ::v-deep(.table .el-table__body tr:hover>td.el-table__cell) {
   background: #dddddd;
   cursor: pointer;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
 }
 
 ::v-deep(.table .el-table__body-wrapper .el-table-column--selection .el-checkbox) {

+ 1 - 1
src/components/MultipleItem/index.vue

@@ -187,7 +187,7 @@ const getFaceConfirmOnly = (data?: any) => {
   }
   faceConfirmOnly({
     exam_id: examId,
-    result_id: resultId.value,
+    // result_id: resultId.value,
     student_id: faceCheckStu.value.student_id,
     gender: faceCheckStu.value.gender
   }, () => {

+ 1 - 1
src/utils/ws.ts

@@ -310,7 +310,7 @@ export const stopFace = (data?: any) => {
  * 确认并提交人脸
  */
 export const faceConfirmOnly = (data: any, callback?: any) => {
-  let examId = data.exam_id ? data.examId : parameter.examId;
+  let examId = data.exam_id ? data.exam_id : parameter.examId;
   let myData = null;
   if (Array.isArray(data)) {
     //数组类型

+ 3 - 3
src/views/gesture/index.vue

@@ -101,15 +101,15 @@ onBeforeMount(() => {
   //加载手势WS
   handWs((e: any) => {
     //左滑动
-    if (e.data.result == "next_item") {
+    if (e?.data?.result == "next_item") {
       slideNext();
     }
     //举左手
-    if (e.data.result == "left_hand") {
+    if (e?.data?.result == "left_hand") {
 
     }
     //退出
-    if (e.data.result == "exit") {
+    if (e?.data?.result == "exit") {
 
     }
   });

+ 5 - 5
src/views/train/multiple.vue

@@ -473,21 +473,21 @@ const getAddTestList = (num: number) => {
 const initHand = () => {
   handWs((e: any) => {
     //左滑动
-    if (e.data.result == "next_item") {
+    if (e?.data?.result == "next_item") {
     }
     //举左手
-    if (e.data.result == "left_hand") {
+    if (e?.data?.result == "left_hand") {
       getReady();
     }
     //退出
-    if (e.data.result == "exit") {
+    if (e?.data?.result == "exit") {
       // console.log("exit.value", exit.value)
       if (exit.value == 0) {
         console
         //第一次才弹出
         confirmExit();
         setTimeout(() => {
-          let keyEvent = null;
+          let keyEvent: any = null;
           let myKey = null;
           //如果交叉手两秒后返回超过4次就确认退出
           if (exit.value >= 4) {
@@ -522,7 +522,7 @@ const initHand = () => {
               cancelable: true // 是否可以取消事件的默认行为
             });
           }
-          document.activeElement.dispatchEvent(keyEvent);
+          document.activeElement?.dispatchEvent(keyEvent);
         }, 2500)
       }
       exit.value = exit.value + 1

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

@@ -21,7 +21,7 @@
               :leave-active-class="proxy?.animate.dialog.leave">
               <div class="time" v-show="needStart && [42].includes(examState)">{{
                 time.countdownNum
-                }}</div>
+              }}</div>
             </Transition>
             <div class="tips" v-if="examState == 41">
               <img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
@@ -653,14 +653,14 @@ const getReady = () => {
 const initHand = () => {
   handWs((e: any) => {
     //左滑动
-    if (e.data.result == "next_item") {
+    if (e?.data?.result == "next_item") {
     }
     //举左手
-    if (e.data.result == "left_hand") {
+    if (e?.data?.result == "left_hand") {
       getReady();
     }
     //退出
-    if (e.data.result == "exit") {
+    if (e?.data?.result == "exit") {
       // console.log("exit.value", exit.value)
       if (exit.value == 0) {
         console