|
@@ -4,11 +4,12 @@
|
|
<transition :enter-active-class="proxy?.animate.dialog.enter" :leave-active-class="proxy?.animate.dialog.leave">
|
|
<transition :enter-active-class="proxy?.animate.dialog.enter" :leave-active-class="proxy?.animate.dialog.leave">
|
|
<div class="time" v-show="[42].includes(examState)">{{
|
|
<div class="time" v-show="[42].includes(examState)">{{
|
|
countdownNumFormat
|
|
countdownNumFormat
|
|
- }}</div>
|
|
|
|
|
|
+ }}</div>
|
|
</transition>
|
|
</transition>
|
|
<div class="main">
|
|
<div class="main">
|
|
<template v-if="isLongRun">
|
|
<template v-if="isLongRun">
|
|
- <swiper :slides-per-view="2" :slides-per-group="2" :space-between="20">
|
|
|
|
|
|
+ <swiper :slides-per-view="testListArr.length >= 2 ? 2 : 1" :slides-per-group="testListArr.length >= 2 ? 2 : 1"
|
|
|
|
+ :space-between="20">
|
|
<swiper-slide v-for="(items, indexs) in testListArr " :key="indexs">
|
|
<swiper-slide v-for="(items, indexs) in testListArr " :key="indexs">
|
|
<div class="main-left main-left2">
|
|
<div class="main-left main-left2">
|
|
<div class="trackItem">
|
|
<div class="trackItem">
|
|
@@ -33,8 +34,8 @@
|
|
}}</i></span>
|
|
}}</i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="menuBtn" v-if="examState < 42 && !item.isfinish" @click="getChooseStudent(item.track)">检录
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- <div class="menuBtn" v-if="examState < 42 && !item.isfinish" @click="getChooseStudent(item.track)">检录
|
|
|
|
+ </div> -->
|
|
<div class="menuBtn menuBtn2" v-if="examState == 43 && item.student_id">等待开始测试</div>
|
|
<div class="menuBtn menuBtn2" v-if="examState == 43 && item.student_id">等待开始测试</div>
|
|
<div class="menuBtn menuBtn2" v-if="examState == 42 && item.student_id">正在测试</div>
|
|
<div class="menuBtn menuBtn2" v-if="examState == 42 && item.student_id">正在测试</div>
|
|
<div class="menuBtn" v-if="examState == 3 && !item.timeStr && item.isfinish && item.student_id">
|
|
<div class="menuBtn" v-if="examState == 3 && !item.timeStr && item.isfinish && item.student_id">
|
|
@@ -101,13 +102,11 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<!-- <div>当前状态:({{ examState == 3 ? "初始化完成" : examState == 40 ? "创建测试" : examState == 41 ? "正在人脸识别":examState ==43 ? "停止人脸识别" : examState == 42 ? "正在测试" : "请初始化" }})</div> -->
|
|
<!-- <div>当前状态:({{ examState == 3 ? "初始化完成" : examState == 40 ? "创建测试" : examState == 41 ? "正在人脸识别":examState ==43 ? "停止人脸识别" : examState == 42 ? "正在测试" : "请初始化" }})</div> -->
|
|
<div class="footerBtn">
|
|
<div class="footerBtn">
|
|
<template v-if="needStart">
|
|
<template v-if="needStart">
|
|
<div class="btn" @click="getOpenOneTestAndStartFace" v-if="examState == 3 || examState == 40">开始识别</div>
|
|
<div class="btn" @click="getOpenOneTestAndStartFace" v-if="examState == 3 || examState == 40">开始识别</div>
|
|
|
|
+ <div class="btn" @click="getChooseStudent()" v-if="examState == 41 && isLongRun">检录</div>
|
|
<div class="btn" @click="getStopFace" v-if="examState == 41">停止识别</div>
|
|
<div class="btn" @click="getStopFace" v-if="examState == 41">停止识别</div>
|
|
<div class="btn startBtn" @click="getStartOneTest" v-if="examState == 43">开始测试</div>
|
|
<div class="btn startBtn" @click="getStartOneTest" v-if="examState == 43">开始测试</div>
|
|
</template>
|
|
</template>
|
|
@@ -116,7 +115,7 @@
|
|
<div class="btn" @click="getAgain" v-if="showTestAgain">再测一次</div>
|
|
<div class="btn" @click="getAgain" v-if="showTestAgain">再测一次</div>
|
|
<div class="btn" @click="getRetestFace" v-if="examState == 43">重新识别</div>
|
|
<div class="btn" @click="getRetestFace" v-if="examState == 43">重新识别</div>
|
|
</div>
|
|
</div>
|
|
- <ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
|
|
|
|
|
|
+ <ChooseStudent ref="chooseStudentRef" :selectType="isLongRun ? 'multiple' : 'single'" @returnData="returnStudent" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -165,14 +164,14 @@ const getMessage = (e: any) => {
|
|
}
|
|
}
|
|
//工作站状态
|
|
//工作站状态
|
|
if (e.cmd === 'init_result') {
|
|
if (e.cmd === 'init_result') {
|
|
- if (isLongRun.value) {
|
|
|
|
- let num = 80;
|
|
|
|
- let list: any = [];
|
|
|
|
- for (let i = 1; i <= num; i++) {
|
|
|
|
- list.push({ track: i });
|
|
|
|
- }
|
|
|
|
- faceStudentList.value = list
|
|
|
|
- }
|
|
|
|
|
|
+ // if (isLongRun.value) {
|
|
|
|
+ // let num = 80;
|
|
|
|
+ // let list: any = [];
|
|
|
|
+ // for (let i = 1; i <= num; i++) {
|
|
|
|
+ // list.push({ track: i });
|
|
|
|
+ // }
|
|
|
|
+ // faceStudentList.value = list
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
|
|
|
|
//获取跑道配置
|
|
//获取跑道配置
|
|
@@ -452,7 +451,7 @@ const getClearTimer = (data?: any) => {
|
|
/**
|
|
/**
|
|
* 选择学生
|
|
* 选择学生
|
|
*/
|
|
*/
|
|
-const getChooseStudent = (track: number) => {
|
|
|
|
|
|
+const getChooseStudent = (track?: number) => {
|
|
if (examState.value < 41) {
|
|
if (examState.value < 41) {
|
|
proxy?.$modal.msgWarning("请点击开始识别");
|
|
proxy?.$modal.msgWarning("请点击开始识别");
|
|
return false;
|
|
return false;
|
|
@@ -469,6 +468,19 @@ const getChooseStudent = (track: number) => {
|
|
* 返回被选学生
|
|
* 返回被选学生
|
|
*/
|
|
*/
|
|
const returnStudent = (data: any) => {
|
|
const returnStudent = (data: any) => {
|
|
|
|
+ if (isLongRun.value) {
|
|
|
|
+ //长跑
|
|
|
|
+ longStudent(data)
|
|
|
|
+ } else {
|
|
|
|
+ //短跑
|
|
|
|
+ sprintStudent(data)
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 处理短跑返回被选学生
|
|
|
|
+*/
|
|
|
|
+const sprintStudent = (data: any) => {
|
|
let obj = {
|
|
let obj = {
|
|
result_id: resultId.value,
|
|
result_id: resultId.value,
|
|
face_pic: data.face_pic || data.logo_url,
|
|
face_pic: data.face_pic || data.logo_url,
|
|
@@ -494,6 +506,24 @@ const returnStudent = (data: any) => {
|
|
currentTrack.value = null;
|
|
currentTrack.value = null;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 处理长跑返回被选学生
|
|
|
|
+*/
|
|
|
|
+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,
|
|
|
|
+ student_name: item.name,
|
|
|
|
+ gender: item.gender,
|
|
|
|
+ }
|
|
|
|
+ return obj;
|
|
|
|
+ })
|
|
|
|
+ faceStudentList.value = list;
|
|
|
|
+};
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 清除历史记录
|
|
* 清除历史记录
|
|
*/
|
|
*/
|
|
@@ -637,6 +667,7 @@ const testListArr: any = computed(() => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ console.log("111", list)
|
|
return list;
|
|
return list;
|
|
});
|
|
});
|
|
|
|
|