林旭祥 il y a 8 mois
Parent
commit
e6654d2adc
2 fichiers modifiés avec 46 ajouts et 6 suppressions
  1. 1 0
      src/components/ChooseStudent/index.vue
  2. 45 6
      src/views/train/run.vue

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

@@ -377,6 +377,7 @@ defineExpose({
           li {
             margin-right: 20px;
             text-align: center;
+            flex-shrink: 0;
           }
 
           &::-webkit-scrollbar {

+ 45 - 6
src/views/train/run.vue

@@ -4,7 +4,7 @@
     <transition :enter-active-class="proxy?.animate.dialog.enter" :leave-active-class="proxy?.animate.dialog.leave">
       <div class="time" v-show="[42].includes(examState)">{{
         countdownNumFormat
-      }}</div>
+        }}</div>
     </transition>
     <div class="main">
       <template v-if="isLongRun">
@@ -15,7 +15,7 @@
               <div class="trackItem">
                 <div v-for="(item, index) in items" :key="item" class="li">
                   <div class="left">
-                    <div class="track">{{ item.track }}</div>
+                    <div class="track">{{ (index + 1) + (8 * indexs) }}</div>
                     <div class="userInfo" @click="getChooseStudent(item.track)">
                       <div class="pic pic2" v-if="item.face_pic"> <img :src="item.face_pic" /></div>
                       <div class="pic" v-else>
@@ -41,6 +41,7 @@
                   <div class="menuBtn" v-if="examState == 3 && !item.timeStr && item.isfinish && item.student_id">
                     异常
                   </div>
+                  <div class="close" @click="close(item)" v-if="examState == 41"></div>
                 </div>
               </div>
             </div>
@@ -288,6 +289,13 @@ const getFaceConfirmOnly = (data?: any) => {
       return item.student_id;
     });
   }
+  //长跑自动拼接跑道
+  if (isLongRun.value) {
+    list = list.map((item: any, index: any) => {
+      item.track = index + 1;
+      return item;
+    })
+  }
   faceConfirmOnly(list, () => {
   });
 };
@@ -453,7 +461,11 @@ const getClearTimer = (data?: any) => {
 */
 const getChooseStudent = (track?: number) => {
   if (examState.value < 41) {
-    proxy?.$modal.msgWarning("请点击开始识别");
+    if (needStart.value) {
+      proxy?.$modal.msgWarning("请点击开始识别");
+    } else {
+      proxy?.$modal.msgWarning("请稍等...");
+    }
     return false;
   }
   if (examState.value == 43) {
@@ -512,7 +524,6 @@ const sprintStudent = (data: any) => {
 const longStudent = (data: any) => {
   let list = data.map((item: any, index: any) => {
     let obj = {
-      track: index + 1,
       result_id: resultId.value,
       face_pic: item.face_pic || item.logo_url,
       student_id: item.id,
@@ -641,7 +652,6 @@ const getReportList = () => {
     start_date: dayjs().format("YYYY-MM-DD"),
     end_date: dayjs().format("YYYY-MM-DD"),
     exam_name: parameter.value.project,
-
     page: 1,
     per_page: 9000
   };
@@ -652,6 +662,16 @@ const getReportList = () => {
   });
 };
 
+/**
+ * 当天成绩列表
+*/
+const close = (data: any) => {
+  faceStudentList.value = JSON.parse(JSON.stringify(faceStudentList.value)).filter((item: any) => {
+    return item.student_id != data.student_id;
+  })
+};
+
+
 /**
  * 将测试列表分页
 */
@@ -718,7 +738,6 @@ const faceStudentListLongRun: any = computed(() => {
   }
 });
 
-
 onBeforeMount(() => {
   parameter.value = route.query;
   let project = parameter.value.project;
@@ -934,6 +953,26 @@ $waiPadding: 6.51rem;
           background: radial-gradient(159% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
           box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1874), inset 0px 1px 0px 2px rgba(255, 255, 255, 0.5577);
         }
+
+        .close {
+          width: 2rem;
+          height: 2rem;
+          box-sizing: border-box;
+          border: 1px solid #979797;
+          background-image: url("@/assets/images/common/close.png");
+          background-position: center;
+          background-repeat: no-repeat;
+          background-size: 45% 45%;
+          background-color: rgba(216, 216, 216, 0.8);
+          border-radius: 50%;
+          transition: all 0.5s;
+          cursor: pointer;
+
+          &:hover {
+            transform: rotate(180deg);
+            background-color: rgba(216, 216, 216, 1);
+          }
+        }
       }
     }
   }