|
@@ -21,7 +21,7 @@
|
|
:leave-active-class="proxy?.animate.dialog.leave">
|
|
:leave-active-class="proxy?.animate.dialog.leave">
|
|
<div class="time" v-show="needStart && [42].includes(examState)">{{
|
|
<div class="time" v-show="needStart && [42].includes(examState)">{{
|
|
time.countdownNum
|
|
time.countdownNum
|
|
- }}</div>
|
|
|
|
|
|
+ }}</div>
|
|
</Transition>
|
|
</Transition>
|
|
<div class="tips" v-if="examState == 41">
|
|
<div class="tips" v-if="examState == 41">
|
|
<img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
|
|
<img v-if="parameter.gesture" src="@/assets/images/test/ready1.png" />
|
|
@@ -157,7 +157,7 @@ const getMessage = (e: any) => {
|
|
//console.log("WS响应:", e)
|
|
//console.log("WS响应:", e)
|
|
//获取sid
|
|
//获取sid
|
|
if (e.cmd === 'mySid') {
|
|
if (e.cmd === 'mySid') {
|
|
- console.log("e.data.sid", e.data.id)
|
|
|
|
|
|
+ console.log("e.data.sid", e.data.sid)
|
|
sid.value = e.data.sid;
|
|
sid.value = e.data.sid;
|
|
}
|
|
}
|
|
//实时状态
|
|
//实时状态
|
|
@@ -170,11 +170,18 @@ const getMessage = (e: any) => {
|
|
}
|
|
}
|
|
//测试违规
|
|
//测试违规
|
|
if (e.cmd === 'warning_result') {
|
|
if (e.cmd === 'warning_result') {
|
|
-
|
|
|
|
|
|
+ console.log("eeeeeeeeeee", e)
|
|
|
|
+ if ((e.status + "")[0] === "2") {
|
|
|
|
+ proxy?.$modal.msgError(e.data.message);
|
|
|
|
+ speckText(e.data.message);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//后端播报语音
|
|
//后端播报语音
|
|
if (e.cmd === 'return_audio_msg') {
|
|
if (e.cmd === 'return_audio_msg') {
|
|
-
|
|
|
|
|
|
+ if (e.data.message) {
|
|
|
|
+ proxy?.$modal.msgError(e.data.message);
|
|
|
|
+ speckText(e.data.message);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//错误提示
|
|
//错误提示
|
|
if (e.cmd === 'info_result') {
|
|
if (e.cmd === 'info_result') {
|
|
@@ -186,7 +193,14 @@ const getMessage = (e: any) => {
|
|
}
|
|
}
|
|
//测试中违规提示
|
|
//测试中违规提示
|
|
if (e.cmd === 'warning_notify') {
|
|
if (e.cmd === 'warning_notify') {
|
|
-
|
|
|
|
|
|
+ let message = e.data.message;
|
|
|
|
+ if (message) {
|
|
|
|
+ proxy?.$modal.msgError(message);
|
|
|
|
+ speckText(message);
|
|
|
|
+ }
|
|
|
|
+ if (message == "工作站已断开!") {
|
|
|
|
+ getExit();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//断线状态
|
|
//断线状态
|
|
if (e.cmd === 'disconnect_request') {
|
|
if (e.cmd === 'disconnect_request') {
|
|
@@ -202,10 +216,6 @@ const getMessage = (e: any) => {
|
|
examState.value = e.data;
|
|
examState.value = e.data;
|
|
if (e.data === 3) {
|
|
if (e.data === 3) {
|
|
initProject();
|
|
initProject();
|
|
- if (faceCheckStu.value.student_id) {
|
|
|
|
- reportListRef.value.getIniReportList();
|
|
|
|
- faceWindowRef.value.open("right");
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
if (e.data === 40) {
|
|
if (e.data === 40) {
|
|
cleanData();
|
|
cleanData();
|
|
@@ -512,7 +522,8 @@ const getCounting = (type: string) => {
|
|
/**
|
|
/**
|
|
* 人脸窗口
|
|
* 人脸窗口
|
|
*/
|
|
*/
|
|
-const getFaceWindow = (data: boolean) => {
|
|
|
|
|
|
+const getFaceWindow = (data: boolean, num: number = 0) => {
|
|
|
|
+ let total = num + 1;//叠加三次后不再播放
|
|
let txt = parameter.value.gesture === true ? "请举右手看摄像头人脸识别" : "请看摄像头进行人脸识别";
|
|
let txt = parameter.value.gesture === true ? "请举右手看摄像头人脸识别" : "请看摄像头进行人脸识别";
|
|
speckText(txt);
|
|
speckText(txt);
|
|
//data=true为弹出框,data=false为不要弹出框
|
|
//data=true为弹出框,data=false为不要弹出框
|
|
@@ -526,12 +537,13 @@ const getFaceWindow = (data: boolean) => {
|
|
}, 3000)
|
|
}, 3000)
|
|
}
|
|
}
|
|
//定时检查如果一直停留在人脸识别就提示
|
|
//定时检查如果一直停留在人脸识别就提示
|
|
|
|
+ let timeout = 15000;
|
|
timerManager.value.face = setInterval(() => {
|
|
timerManager.value.face = setInterval(() => {
|
|
getClearTimer("face");
|
|
getClearTimer("face");
|
|
- if (examState.value == 41) {
|
|
|
|
- getFaceWindow(false);
|
|
|
|
|
|
+ if (examState.value == 41 && total < 3) {
|
|
|
|
+ getFaceWindow(false, total);
|
|
}
|
|
}
|
|
- }, 15000)
|
|
|
|
|
|
+ }, timeout)
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -566,14 +578,17 @@ const getAchievement = (data: any) => {
|
|
if (['jump', 'longjump', 'verticaljump'].includes(type)) {
|
|
if (['jump', 'longjump', 'verticaljump'].includes(type)) {
|
|
if (data?.startline_check == 0) {
|
|
if (data?.startline_check == 0) {
|
|
let txt = "踩线违规";
|
|
let txt = "踩线违规";
|
|
|
|
+ speckText(txt);
|
|
arr.push(txt)
|
|
arr.push(txt)
|
|
}
|
|
}
|
|
if (data?.singleleg_jump_check == 0) {
|
|
if (data?.singleleg_jump_check == 0) {
|
|
let txt = "单脚跳违规";
|
|
let txt = "单脚跳违规";
|
|
|
|
+ speckText(txt);
|
|
arr.push(txt)
|
|
arr.push(txt)
|
|
}
|
|
}
|
|
if (data?.outside_check == 0) {
|
|
if (data?.outside_check == 0) {
|
|
let txt = "跳出测试区违规";
|
|
let txt = "跳出测试区违规";
|
|
|
|
+ speckText(txt);
|
|
arr.push(txt)
|
|
arr.push(txt)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -581,6 +596,7 @@ const getAchievement = (data: any) => {
|
|
data?.elbow_check == false
|
|
data?.elbow_check == false
|
|
) {
|
|
) {
|
|
let txt = "肘部违规";
|
|
let txt = "肘部违规";
|
|
|
|
+ speckText(txt);
|
|
arr.push(txt);
|
|
arr.push(txt);
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
@@ -588,39 +604,42 @@ const getAchievement = (data: any) => {
|
|
data?.knee_check === false
|
|
data?.knee_check === false
|
|
) {
|
|
) {
|
|
let txt = "腿部违规";
|
|
let txt = "腿部违规";
|
|
- if (!arr.includes(txt)) {
|
|
|
|
- arr.push(txt);
|
|
|
|
- }
|
|
|
|
|
|
+ speckText(txt);
|
|
|
|
+ if (!arr.includes(txt)) { }
|
|
|
|
+ arr.push(txt);
|
|
|
|
+
|
|
}
|
|
}
|
|
if (["situp"].indexOf(type) > -1 && data?.hand_check === false) {
|
|
if (["situp"].indexOf(type) > -1 && data?.hand_check === false) {
|
|
let txt = "手部违规";
|
|
let txt = "手部违规";
|
|
- if (!arr.includes(txt)) {
|
|
|
|
- arr.push(txt);
|
|
|
|
- }
|
|
|
|
|
|
+ speckText(txt);
|
|
|
|
+ if (!arr.includes(txt)) { }
|
|
|
|
+ arr.push(txt);
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
["pullup"].indexOf(type) > -1 &&
|
|
["pullup"].indexOf(type) > -1 &&
|
|
data?.["0"]?.elbow_check === false
|
|
data?.["0"]?.elbow_check === false
|
|
) {
|
|
) {
|
|
let txt = "手部违规";
|
|
let txt = "手部违规";
|
|
- if (!arr.includes(txt)) {
|
|
|
|
- arr.push(txt);
|
|
|
|
- }
|
|
|
|
|
|
+ speckText(txt);
|
|
|
|
+ if (!arr.includes(txt)) { }
|
|
|
|
+ arr.push(txt);
|
|
|
|
+
|
|
}
|
|
}
|
|
if (["situp"].indexOf(type) > -1 && data?.["0"]?.back_check === false) {
|
|
if (["situp"].indexOf(type) > -1 && data?.["0"]?.back_check === false) {
|
|
let txt = "背部违规";
|
|
let txt = "背部违规";
|
|
- if (!arr.includes(txt)) {
|
|
|
|
- arr.push(txt);
|
|
|
|
- }
|
|
|
|
|
|
+ speckText(txt);
|
|
|
|
+ if (!arr.includes(txt)) { }
|
|
|
|
+ arr.push(txt);
|
|
|
|
+
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
["sidepullup", "situp"].indexOf(type) > -1 &&
|
|
["sidepullup", "situp"].indexOf(type) > -1 &&
|
|
data?.["0"]?.hip_check === false
|
|
data?.["0"]?.hip_check === false
|
|
) {
|
|
) {
|
|
let txt = "臀部违规";
|
|
let txt = "臀部违规";
|
|
- if (!arr.includes(txt)) {
|
|
|
|
- arr.push(txt);
|
|
|
|
- }
|
|
|
|
|
|
+ speckText(txt);
|
|
|
|
+ if (!arr.includes(txt)) { }
|
|
|
|
+ arr.push(txt);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
backReason.value = arr;
|
|
backReason.value = arr;
|
|
@@ -635,6 +654,8 @@ const getAchievement = (data: any) => {
|
|
} else {
|
|
} else {
|
|
speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(count) || 0) + unit.value + ",请下一位准备!" || "");
|
|
speckText(faceCheckStu?.value.name + "成绩为" + (chineseNumber(count) || 0) + unit.value + ",请下一位准备!" || "");
|
|
}
|
|
}
|
|
|
|
+ reportListRef.value.getIniReportList();
|
|
|
|
+ faceWindowRef.value.open("right");
|
|
//然后定时自动关闭
|
|
//然后定时自动关闭
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
faceWindowRef.value.close();
|
|
faceWindowRef.value.close();
|
|
@@ -760,7 +781,7 @@ watch(() => time.value.countdownNum, (newData) => {
|
|
/**
|
|
/**
|
|
* 成绩整数播报
|
|
* 成绩整数播报
|
|
*/
|
|
*/
|
|
-watch(() => currentResultObj, (newData: any, oldData: any) => {
|
|
|
|
|
|
+watch(() => currentResultObj.value, (newData: any, oldData: any) => {
|
|
if (examState.value != 42 || newData.count <= 0) {
|
|
if (examState.value != 42 || newData.count <= 0) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|