|
@@ -11,7 +11,8 @@
|
|
|
</div>
|
|
|
</Transition>
|
|
|
<div class="name" :class="{ 'name2': faceCheckStu.student_id }">
|
|
|
- {{ faceCheckStu.student_id ? faceCheckStu.name : area && ![0].includes(examState) ? "虚位以待":area && [0].includes(examState)?"离线" : "未启用" }}
|
|
|
+ {{ faceCheckStu.student_id ? faceCheckStu.name : area && ![0].includes(examState) ? "虚位以待" : area &&
|
|
|
+ [0].includes(examState) ? "离线" : "未启用" }}
|
|
|
</div>
|
|
|
<div class="ctrlBox" v-if="props.examState == 43 && examState == 43 && handcontroller && ctrl == area">
|
|
|
<img src="@/assets/images/test/jushou.png" />
|
|
@@ -26,18 +27,15 @@
|
|
|
|| 0 }}
|
|
|
</div>
|
|
|
<!-- <div>当前状态:({{ examState == 3 ? "初始化完成" : examState == 40 ? "创建测试" : examState == 41 ? "正在人脸识别" :examState == 43 ? "停止人脸识别" : examState == 42 ? "正在测试" : "离线状态" }})</div> -->
|
|
|
- <ChooseStudent ref="chooseStudentRef" @returnData="returnStudent" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { initSpeech, speckText, playMusic, controlMusic, speckCancel, chineseNumber } from '@/utils/speech'
|
|
|
import { openOneTest, startFace, stopFace, faceConfirmOnly, startOneTest, finishOneTest, closeOneTest, suspendFaceRecognitionChannels, resumeFaceRecognitionChannels } from '@/utils/ws'
|
|
|
import dataDictionary from "@/utils/dataDictionary"
|
|
|
const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance() as any;
|
|
|
-const chooseStudentRef = ref();
|
|
|
-const emit = defineEmits(['returnData']);
|
|
|
+const emit = defineEmits(['returnData', 'getChooseStudent']);
|
|
|
|
|
|
//父值
|
|
|
const props = defineProps({
|
|
@@ -288,37 +286,46 @@ const getChooseStudent = () => {
|
|
|
}
|
|
|
console.log("examState.value", examState.value)
|
|
|
if (examState.value == 0) {
|
|
|
- proxy?.$modal.msgWarning(`当前状态:${examState.value}`);
|
|
|
+ proxy?.$modal.msgWarning(`【${area}】当前状态:${examState.value}`);
|
|
|
return false;
|
|
|
}
|
|
|
if (props.examState == 3 && (examState.value == 3 || examState.value == 40)) {
|
|
|
if (props.needStart) {
|
|
|
- proxy?.$modal.msgWarning(`请点击右下角的【开始识别】,当前状态:${examState.value}`);
|
|
|
+ proxy?.$modal.msgWarning(`请点击右下角的【开始识别】,【${area}】当前状态:${examState.value}`);
|
|
|
} else {
|
|
|
- proxy?.$modal.msgWarning(`当前状态:${examState.value}`);
|
|
|
+ proxy?.$modal.msgWarning(`【${area}】当前状态:${examState.value}`);
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
if (props.examState == 41 && (examState.value == 3 || examState.value == 40)) {
|
|
|
- proxy?.$modal.msgWarning(`当前状态:${examState.value}`);
|
|
|
+ proxy?.$modal.msgWarning(`【${area}】当前状态:${examState.value}`);
|
|
|
return false;
|
|
|
}
|
|
|
if (examState.value == 41) {
|
|
|
- chooseStudentRef.value.open();
|
|
|
+ chooseStudent();
|
|
|
}
|
|
|
if (examState.value == 43) {
|
|
|
getRetestFace();
|
|
|
}
|
|
|
if (props.examState == 42) {
|
|
|
- proxy?.$modal.msgWarning(`【${area}】正在测试请结束后再操作:${examState.value}`);
|
|
|
+ proxy?.$modal.msgWarning(`【${area}】正在测试请结束后再操作,当前状态:${examState.value}`);
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * 选择学生
|
|
|
+*/
|
|
|
+const chooseStudent = () => {
|
|
|
+ // chooseStudentRef.value.open();
|
|
|
+ emit('getChooseStudent', { area: area });
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
* 返回被选学生
|
|
|
*/
|
|
|
const returnStudent = (data: any) => {
|
|
|
+ console.log("11111", data)
|
|
|
faceCheckStu.value = data;
|
|
|
getStopFace();
|
|
|
};
|
|
@@ -498,6 +505,7 @@ defineExpose({
|
|
|
getStartOneTest,
|
|
|
getAgain,
|
|
|
getAllRetestFace,
|
|
|
+ returnStudent
|
|
|
})
|
|
|
</script>
|
|
|
|