linxuxiang 5 miesięcy temu
rodzic
commit
74713a3aa3
2 zmienionych plików z 23 dodań i 9 usunięć
  1. 2 1
      src/views/train/multiple.vue
  2. 21 8
      src/views/train/test.vue

+ 2 - 1
src/views/train/multiple.vue

@@ -15,7 +15,7 @@
         <div class="ul"
           :class="{ 'overlap': (examState == 43 && time.ready) || [42].includes(examState) || (showTestAgain && ![41].includes(examState)), 'ready': [41].includes(examState), 'hands': parameter.gesture }"
           v-for="(items, indexs) in testListArr " :key="indexs">
-          <MultipleItem :ref="(el) => { multipleItemRef(el, item.itemNumber, item.area) }" v-for="(item, index) in items"
+          <MultipleItem :ref="(el:any) => { multipleItemRef(el, item.itemNumber, item.area) }" v-for="(item, index) in items"
             :query="parameter" :area="item.area" :key="index" @returnData="returnData"
             @getChooseStudent="getChooseStudent" :examState="examState" :needStart="needStart" :styleType="styleType"
             :parentTrainWsMethod="{ initWs, examEnds, openOneTest, startFace, stopFace, faceConfirmOnly, startOneTest, finishOneTest, closeOneTest, suspendFaceRecognitionChannels, resumeFaceRecognitionChannels }"
@@ -650,6 +650,7 @@ const initHand = () => {
     }
     //左滑动
     if (e?.data?.result == "next_item") {
+      getAllRetestFace();
     }
     //举左手
     if (e?.data?.result == "left_hand") {

+ 21 - 8
src/views/train/test.vue

@@ -19,9 +19,11 @@
           <div class="top-right">
             <Transition :enter-active-class="proxy?.animate.dialog.enter"
               :leave-active-class="proxy?.animate.dialog.leave">
-              <div class="time" v-show="needStart && [42].includes(examState) && !['basketballv1','footballv1'].includes(parameter.project)">{{
-                time.countdownNum
-              }}</div>
+              <div class="time"
+                v-show="needStart && [42].includes(examState) && !['basketballv1', 'footballv1'].includes(parameter.project)">
+                {{
+                  time.countdownNum
+                }}</div>
             </Transition>
             <div class="tips" v-if="examState == 41">
               <img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
@@ -29,7 +31,7 @@
             </div>
             <div class="complete" :class="{ 'complete2': needStart && [42].includes(examState) }"
               v-if="faceCheckStu.student_id && time.ready <= 0 && examState != 43 && examState != 41">
-              <div class="scoreBox" v-if="['basketballv1','footballv1'].includes(parameter.project)">
+              <div class="scoreBox" v-if="['basketballv1', 'footballv1'].includes(parameter.project)">
                 <div class="score">{{ currentResultObj.count || 0 }}</div>
               </div>
               <div class="scoreBox" v-else>
@@ -48,8 +50,7 @@
               </div>
             </div>
             <div class="foulBox" v-if="examState == 42 && backReason.length">
-              <Transition :enter-active-class="proxy?.animate.mask.enter"
-                :leave-active-class="proxy?.animate.mask.leave">
+              <Transition :enter-active-class="proxy?.animate.mask.enter" :leave-active-class="proxy?.animate.mask.leave">
                 <div class="foul" v-show="backReasonStr ? true : false">
                   <div class="lable">!</div>
                   <div class="value">{{ backReasonStr }}</div>
@@ -570,7 +571,7 @@ const getAchievement = (data: any) => {
       data?.[dic.typeResultKey[type]]?.toFixed(2);
     count = Math.round(count) / 100;
   }
-  if (["basketballv1","footballv1"].includes(type)) {
+  if (["basketballv1", "footballv1"].includes(type)) {
     count = proxy?.$utils.runTime(data?.[dic.typeResultKey[type]], true, 1)
   }
   data.count = count || "0";
@@ -659,7 +660,7 @@ const getAchievement = (data: any) => {
       speckText("请重新测试");
       return false;
     }
-    if (["basketballv1","footballv1"].includes(type)) {
+    if (["basketballv1", "footballv1"].includes(type)) {
       speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(proxy?.$utils.runTime(data?.[dic.typeResultKey[type]], false, 0,
         1)) || 0) + ",请下一位准备!" || "");
     } else {
@@ -752,6 +753,18 @@ const initHand = () => {
     }
     //左滑动
     if (e?.data?.result == "next_item") {
+      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") {