|
@@ -14,13 +14,14 @@ import { httpApp } from "@/plugins/axiosApp";
|
|
import { useTimers } from "@/setups/useTimers";
|
|
import { useTimers } from "@/setups/useTimers";
|
|
import { checkMainExe } from "@/utils/nativeMethods";
|
|
import { checkMainExe } from "@/utils/nativeMethods";
|
|
import { showLogout } from "@/utils/utils";
|
|
import { showLogout } from "@/utils/utils";
|
|
-import { onBeforeUpdate, onMounted } from "vue";
|
|
|
|
|
|
+import { onBeforeUpdate, onMounted, watch } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
import { store } from "@/store/store";
|
|
import { store } from "@/store/store";
|
|
import { useRemoteAppChecker } from "@/features/UserLogin/useRemoteAppChecker";
|
|
import { useRemoteAppChecker } from "@/features/UserLogin/useRemoteAppChecker";
|
|
import { ExamQuestion, PaperStruct, Store } from "@/types/student-client";
|
|
import { ExamQuestion, PaperStruct, Store } from "@/types/student-client";
|
|
import router from "@/router";
|
|
import router from "@/router";
|
|
import { useWebSocket } from "@/setups/useWebSocket";
|
|
import { useWebSocket } from "@/setups/useWebSocket";
|
|
|
|
+import { useScreenTop } from "./setups/useScreenTop";
|
|
|
|
|
|
const { startWS } = useWebSocket();
|
|
const { startWS } = useWebSocket();
|
|
|
|
|
|
@@ -28,8 +29,10 @@ type PRACTICE_TYPE = "IN_PRACTICE" | "NO_ANSWER";
|
|
|
|
|
|
let loading = $ref(true);
|
|
let loading = $ref(true);
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
-const examId = route.params.examId;
|
|
|
|
-const examRecordDataId = route.params.examRecordDataId;
|
|
|
|
|
|
+const examId = +route.params.examId;
|
|
|
|
+const examRecordDataId = +route.params.examRecordDataId;
|
|
|
|
+
|
|
|
|
+useScreenTop(examRecordDataId);
|
|
|
|
|
|
let courseName = $ref("");
|
|
let courseName = $ref("");
|
|
|
|
|
|
@@ -38,6 +41,17 @@ onBeforeUpdate(() => {
|
|
void answerAllQuestions();
|
|
void answerAllQuestions();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+watch(
|
|
|
|
+ () => store.exam.isExceededSwitchCount,
|
|
|
|
+ () => {
|
|
|
|
+ logger({ cnl: ["server"], act: "切屏超出次数自动交卷" });
|
|
|
|
+ void router.push({
|
|
|
|
+ name: "SubmitPaper",
|
|
|
|
+ params: { examId, examRecordDataId },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+
|
|
// computed: {
|
|
// computed: {
|
|
// ...mapState([
|
|
// ...mapState([
|
|
// "exam",
|
|
// "exam",
|
|
@@ -48,7 +62,6 @@ onBeforeUpdate(() => {
|
|
// "remainTime",
|
|
// "remainTime",
|
|
// "questionAnswerFileUrl",
|
|
// "questionAnswerFileUrl",
|
|
// "uploadModalVisible",
|
|
// "uploadModalVisible",
|
|
-// "exceedSwitchCount",
|
|
|
|
// ]),
|
|
// ]),
|
|
// previousQuestionOrder: (vm) => {
|
|
// previousQuestionOrder: (vm) => {
|
|
// if (vm.examQuestion().order > 1) {
|
|
// if (vm.examQuestion().order > 1) {
|
|
@@ -126,11 +139,7 @@ onBeforeUpdate(() => {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
-// exceedSwitchCount(val) {
|
|
|
|
-// if (val) {
|
|
|
|
-// this.logger({ action: "切屏超出次数自动交卷" });
|
|
|
|
-// this.realSubmitPaper();
|
|
|
|
-// }
|
|
|
|
|
|
+
|
|
// },
|
|
// },
|
|
// // examQuestionList(val, oldVal) {
|
|
// // examQuestionList(val, oldVal) {
|
|
// // // console.log(val, oldVal);
|
|
// // // console.log(val, oldVal);
|
|
@@ -221,7 +230,6 @@ onMounted(async () => {
|
|
// pictureAnswer: {},
|
|
// pictureAnswer: {},
|
|
// snapNow: false,
|
|
// snapNow: false,
|
|
// snapProcessingCount: 0,
|
|
// snapProcessingCount: 0,
|
|
-// exceedSwitchCount: false,
|
|
|
|
// });
|
|
// });
|
|
// // TODO: 是否是个错误点?this.$Modal 不存在?
|
|
// // TODO: 是否是个错误点?this.$Modal 不存在?
|
|
// this.$Modal.remove();
|
|
// this.$Modal.remove();
|