|
@@ -35,10 +35,6 @@ const emit = defineEmits(['returnData']);
|
|
|
|
|
|
//父值
|
|
|
const props = defineProps({
|
|
|
- itemNumber: {
|
|
|
- type: Number,
|
|
|
- default: null
|
|
|
- },
|
|
|
area: {
|
|
|
type: String,
|
|
|
default: ""
|
|
@@ -57,7 +53,6 @@ const props = defineProps({
|
|
|
},
|
|
|
});
|
|
|
|
|
|
-
|
|
|
let project: any = route.query.project;
|
|
|
let area: any = props.area;
|
|
|
let examId: string = `${project}_${area}`; //项目+区
|
|
@@ -262,12 +257,18 @@ const getChooseStudent = () => {
|
|
|
proxy?.$modal.msgWarning(`未启用`);
|
|
|
return false;
|
|
|
}
|
|
|
- if (props.examState == 42) {
|
|
|
- proxy?.$modal.msgWarning(`【${area}】正在测试请结束后再操作`);
|
|
|
+ console.log("examState.value", examState.value)
|
|
|
+ if (examState.value == 0) {
|
|
|
+ proxy?.$modal.msgWarning(`当前状态:${examState.value}`);
|
|
|
return false;
|
|
|
}
|
|
|
- if (props.needStart && props.examState == 3) {
|
|
|
- proxy?.$modal.msgWarning(`请点击开始识别按钮`);
|
|
|
+ if (examState.value == 3) {
|
|
|
+ if (!props.needStart) {
|
|
|
+ proxy?.$modal.msgWarning(`当前状态:${examState.value}`);
|
|
|
+ }
|
|
|
+ if (props.needStart) {
|
|
|
+ proxy?.$modal.msgWarning(`请点击开始识别按钮`);
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
if (examState.value == 41) {
|
|
@@ -276,6 +277,10 @@ const getChooseStudent = () => {
|
|
|
if (examState.value == 43) {
|
|
|
getRetestFace();
|
|
|
}
|
|
|
+ if (props.examState == 42) {
|
|
|
+ proxy?.$modal.msgWarning(`【${area}】正在测试请结束后再操作`);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -299,18 +304,22 @@ const cleanData = () => {
|
|
|
* 自动初始化项目
|
|
|
*/
|
|
|
const initProject = () => {
|
|
|
+ if (!area) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
//自动项目定时进入下一步
|
|
|
if (props.needStart == false) {
|
|
|
let time = 0;
|
|
|
//控制新建测试的时间,第一次快,之后就慢
|
|
|
if (!faceCheckStu.value.student_id) {
|
|
|
- time = 1000;
|
|
|
+ time = 500;
|
|
|
} else {
|
|
|
time = 7000;
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
//再加一个判断以免和再测一次冲突
|
|
|
if (examState.value == 3 || examState.value == 43) {
|
|
|
+ console.log("执行了执行了执行了执行了执行了")
|
|
|
getOpenOneTestAndStartFace();
|
|
|
}
|
|
|
}, time)
|
|
@@ -418,7 +427,7 @@ const getAchievement = (data: any) => {
|
|
|
* 状态抛给父组件
|
|
|
*/
|
|
|
watch(() => examState.value, (newVal, oldVal) => {
|
|
|
- console.log("6666", examState.value)
|
|
|
+ console.log(area, examState.value)
|
|
|
emit('returnData', { examState: examState.value, area: area });
|
|
|
}, { deep: true });
|
|
|
|
|
@@ -430,7 +439,7 @@ watch(() => faceCheckStu.value, (newVal, oldVal) => {
|
|
|
}, { deep: true });
|
|
|
|
|
|
/**
|
|
|
- * 如果结束了仍然在43就重新执行一次
|
|
|
+ * 如果总流程结束了个别区仍然在43就重新执行一次,用于没有开的区自动复位
|
|
|
*/
|
|
|
watch(() => props.examState, (newVal, oldVal) => {
|
|
|
if (newVal == 3 && examState.value == 43) {
|