|
@@ -31,7 +31,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" />
|
|
@@ -56,10 +56,13 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="foulBox" v-if="examState == 42 && backReason.length">
|
|
|
- <div class="foul" v-for="(item, index) in backReason" :key="index">
|
|
|
- <div class="lable">!</div>
|
|
|
- <div class="value">{{ item }}</div>
|
|
|
- </div>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ </transition>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="examState == 43 && time.ready">
|
|
@@ -86,8 +89,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<div class="btn" @click="getReady" v-if="needStart && examState == 43 && !time.ready">开 始</div>
|
|
|
<!-- <div v-if="needStart"> -->
|
|
|
<!-- <div class="btn" @click="getOpenOneTestAndStartFace" v-if="examState == 3 || examState == 40">开始识别</div> -->
|
|
@@ -166,12 +167,13 @@ const data = reactive<any>({
|
|
|
faceCheckStu: {},//人脸信息
|
|
|
unit: "",//单位
|
|
|
backReason: [],//犯规项
|
|
|
+ backReasonStr: "",//犯规提示
|
|
|
needStart: false,//是否需要按钮
|
|
|
showTestAgain: false,//再测一次按钮
|
|
|
reportList: [],//测试列表
|
|
|
date: "",//当前时间
|
|
|
});
|
|
|
-const { timerManager, parameter, time, userInfo, examState, resultId, faceCheckStu, currentResultObj, unit, backReason, needStart, showTestAgain, reportList, date } = toRefs(data);
|
|
|
+const { timerManager, parameter, time, userInfo, examState, resultId, faceCheckStu, currentResultObj, unit, backReason, backReasonStr, needStart, showTestAgain, reportList, date } = toRefs(data);
|
|
|
|
|
|
/**
|
|
|
* 接收消息
|
|
@@ -226,7 +228,6 @@ const getMessage = (e: any) => {
|
|
|
getFaceWindow(true);
|
|
|
}
|
|
|
if (e.data == 43) {
|
|
|
-
|
|
|
}
|
|
|
if (e.data == 42) {
|
|
|
getClearTimer("readyTimer");
|
|
@@ -277,7 +278,9 @@ const getStopFace = async () => {
|
|
|
// return false;
|
|
|
// }
|
|
|
getClearTimer("face");
|
|
|
- speckText(faceCheckStu.value.name + ",请准备");
|
|
|
+ if (needStart.value) {
|
|
|
+ speckText(faceCheckStu.value.name + parameter.value.gesture ? ",请举手开始测试" : ",请准备");
|
|
|
+ }
|
|
|
await stopFace();
|
|
|
if (faceCheckStu.value.student_id) {
|
|
|
getFaceConfirmOnly();
|
|
@@ -421,7 +424,7 @@ const getClearTimer = (data?: any) => {
|
|
|
*/
|
|
|
const getChooseStudent = () => {
|
|
|
if (examState.value < 41) {
|
|
|
- proxy?.$modal.msgError("请等待");
|
|
|
+ proxy?.$modal.msgWarning("请等待");
|
|
|
}
|
|
|
if (examState.value == 41) {
|
|
|
chooseStudentRef.value.open();
|
|
@@ -621,7 +624,6 @@ const getAchievement = (data: any) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- arr.push("哈哈哈哈");
|
|
|
backReason.value = arr;
|
|
|
if (data.isfinish) {
|
|
|
if (['jump'].includes(type) && backReason.value.length) {
|
|
@@ -680,7 +682,7 @@ const getReady = () => {
|
|
|
time.value.ready = 5;
|
|
|
speckText(time.value.ready);
|
|
|
timerManager.value.readyTimer = setInterval(() => {
|
|
|
- if (time.value.ready <= 1) {
|
|
|
+ if (time.value.ready <= 0) {
|
|
|
getClearTimer("readyTimer");
|
|
|
getStartOneTest();
|
|
|
} else {
|
|
@@ -690,6 +692,16 @@ const getReady = () => {
|
|
|
}, 1000);
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * 输出犯规
|
|
|
+*/
|
|
|
+watch(() => backReason.value.length, (v) => {
|
|
|
+ backReasonStr.value = backReason.value[backReason.value.length - 1];
|
|
|
+ setTimeout(() => {
|
|
|
+ backReasonStr.value = "";
|
|
|
+ }, 1500)
|
|
|
+}, { immediate: true });
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
setDate();
|
|
|
parameter.value = route.query;
|