林旭祥 vor 6 Monaten
Ursprung
Commit
5a9ab73069
2 geänderte Dateien mit 12 neuen und 5 gelöschten Zeilen
  1. 10 4
      src/views/train/multiple.vue
  2. 2 1
      src/views/train/test.vue

+ 10 - 4
src/views/train/multiple.vue

@@ -3,7 +3,7 @@
     <Header @confirmExit="confirmExit"></Header>
     <Transition :enter-active-class="proxy?.animate.dialog.enter" :leave-active-class="proxy?.animate.dialog.leave">
       <div class="time" :class="{ 'time1': styleType == 1, 'time2': styleType == 2, 'time3': styleType == 3 }"
-        v-show="[42].includes(examState)">{{
+        v-show="needStart && [42].includes(examState)">{{
           time.countdownNum
         }}</div>
     </Transition>
@@ -28,7 +28,7 @@
         <div class="btn" @click="getAllRetestFace" v-if="examState == 43 || examState == 42">重新识别</div>
       </template>
       <template v-else>
-        <div class="btn startBtn" @click="getReady" v-if="examState == 43">开始测试</div>
+        <div class="btn startBtn" @click="getStartOneTest" v-if="examState == 43">开始测试</div>
       </template>
       <div class="btn" :class="{ testRecordBtn: showReportList }" @click="getTestRecord"
         v-if="![43, 42].includes(examState)">
@@ -582,7 +582,11 @@ const initHand = () => {
       }
       //开始测试
       if (examState.value == 43) {
-        getReady()
+        if (needStart.value) {
+          getReady()
+        } else {
+          getStartOneTest();
+        }
       }
       //确认退出
       if (exit.value) {
@@ -689,9 +693,11 @@ onBeforeMount(() => {
     return obj;
   });
   //需要开始按钮的项目
-  if (testList.value.length > 10) {
+  let myList = ["situp", "jumprope", "jumpingjack", "footballv1", "basketballv1", "volleyball", "pingpong"];
+  if (myList.includes(project) || testList.value.length > 10) {
     needStart.value = true;
   }
+
   //展示样式控制
   if (testList.value.length <= 5) {
     styleType.value = 1;

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

@@ -855,7 +855,8 @@ onBeforeMount(() => {
     parameter.value.gesture = false
   }
   //需要开始按钮的项目
-  if (["jumprope", "skiprope", "jumpingjack", "situp", "basketballv1"].includes(project)) {
+  let myList = ["situp", "jumprope", "jumpingjack", "footballv1", "basketballv1", "volleyball", "pingpong"];
+  if (myList.includes(project)) {
     needStart.value = true;
   }
   //加载WS