|
@@ -120,9 +120,8 @@ import vls from "@/utils/storage";
|
|
|
|
|
|
const studentIds = $ref(vls.get("check-students", []));
|
|
const studentIds = $ref(vls.get("check-students", []));
|
|
|
|
|
|
-const currentIndex = $computed(() =>
|
|
|
|
- studentIds.indexOf(store.currentTask?.studentId)
|
|
|
|
-);
|
|
|
|
|
|
+let currentStudentId = $ref("");
|
|
|
|
+const currentIndex = $computed(() => studentIds.indexOf(currentStudentId));
|
|
const isFirst = $computed(() => currentIndex === 0);
|
|
const isFirst = $computed(() => currentIndex === 0);
|
|
const isLast = $computed(() => currentIndex === studentIds.length - 1);
|
|
const isLast = $computed(() => currentIndex === studentIds.length - 1);
|
|
const isMultiStudent = $computed(() => studentIds.length > 1);
|
|
const isMultiStudent = $computed(() => studentIds.length > 1);
|
|
@@ -201,6 +200,7 @@ async function updateTask(studentId) {
|
|
? newTask.headerTagList
|
|
? newTask.headerTagList
|
|
: newTask.specialTagList;
|
|
: newTask.specialTagList;
|
|
store.currentTask = newTask;
|
|
store.currentTask = newTask;
|
|
|
|
+ currentStudentId = studentId;
|
|
updateTaskGroupInfo();
|
|
updateTaskGroupInfo();
|
|
}
|
|
}
|
|
|
|
|