|
@@ -11,9 +11,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState } from "vuex";
|
|
|
+import { mapState, createNamespacedHelpers } from "vuex";
|
|
|
import { nodeCheckProcess } from "./utils/nativeExe";
|
|
|
import { isElectron } from "./utils/util";
|
|
|
+const { mapMutations } = createNamespacedHelpers("examingHomeModule");
|
|
|
|
|
|
export default {
|
|
|
name: "APP",
|
|
@@ -65,10 +66,31 @@ export default {
|
|
|
"学生端不是置顶状态",
|
|
|
]);
|
|
|
if (this.$route.name === "OnlineExamingHome") {
|
|
|
- this.$http.post(
|
|
|
- "/api/ecs_oe_student/examControl/switchScreen?examRecordDataId=" +
|
|
|
- this.$route.params.examRecordDataId
|
|
|
- );
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ "/api/ecs_oe_student/examControl/switchScreen?examRecordDataId=" +
|
|
|
+ this.$route.params.examRecordDataId
|
|
|
+ )
|
|
|
+ .then((res) => {
|
|
|
+ if (
|
|
|
+ this.QECSConfig.PREVENT_CHEATING_CONFIG.includes[
|
|
|
+ "RECORD_SWITCH_SCREEN"
|
|
|
+ ]
|
|
|
+ ) {
|
|
|
+ if (res.data) {
|
|
|
+ // console.log(res.data);
|
|
|
+ const [switchScreenCount, maxSwitchScreenCount] = res.data;
|
|
|
+ if (
|
|
|
+ typeof switchScreenCount === "number" &&
|
|
|
+ typeof maxSwitchScreenCount === "number"
|
|
|
+ ) {
|
|
|
+ if (switchScreenCount > maxSwitchScreenCount) {
|
|
|
+ this.updateExceedSwitchCount(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
return;
|
|
|
|
|
@@ -115,6 +137,7 @@ export default {
|
|
|
clearInterval(this.processInterval);
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations(["updateExceedSwitchCount"]),
|
|
|
async sendOnlineSignal() {
|
|
|
if (!window.sessionStorage.getItem("token")) {
|
|
|
return;
|