|
@@ -7,6 +7,8 @@ import { tryLimit } from "@/utils/tryLimit";
|
|
import { useTimers } from "@/setups/useTimers";
|
|
import { useTimers } from "@/setups/useTimers";
|
|
import { WEEKDAY_NAMES } from "@/constants/constants";
|
|
import { WEEKDAY_NAMES } from "@/constants/constants";
|
|
import OnlineExamResultList from "./OnlineExamResultList.vue";
|
|
import OnlineExamResultList from "./OnlineExamResultList.vue";
|
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
+import { watch } from "vue";
|
|
|
|
|
|
const {
|
|
const {
|
|
courses = [],
|
|
courses = [],
|
|
@@ -18,9 +20,15 @@ const {
|
|
examType?: ExamType;
|
|
examType?: ExamType;
|
|
}>();
|
|
}>();
|
|
|
|
|
|
|
|
+const route = useRoute();
|
|
|
|
+
|
|
let selectedCourse: OnlineExam | null = $ref(null);
|
|
let selectedCourse: OnlineExam | null = $ref(null);
|
|
let selectExamState: "EXAMING" | "EXAM_END" = $ref("EXAMING");
|
|
let selectExamState: "EXAMING" | "EXAM_END" = $ref("EXAMING");
|
|
|
|
|
|
|
|
+watch(route, () => {
|
|
|
|
+ selectExamState = "EXAMING";
|
|
|
|
+});
|
|
|
|
+
|
|
const selectedCourseList = $computed(() =>
|
|
const selectedCourseList = $computed(() =>
|
|
selectExamState === "EXAMING" ? courses : endCourses
|
|
selectExamState === "EXAMING" ? courses : endCourses
|
|
);
|
|
);
|