From 032fc00c96bbf65177cbc22524025e9a8b760fe0 Mon Sep 17 00:00:00 2001
From: AfyerCu <20569838@qq.com>
Date: Sat, 27 Sep 2025 23:24:48 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9D=E6=AC=A1=E8=BF=9B=E5=85=A5?=
=?UTF-8?q?=E9=98=85=E5=8D=B7=E9=A1=B5=E6=97=A0=E6=B3=95=E9=80=89=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/marking/grading.vue | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/pages/marking/grading.vue b/src/pages/marking/grading.vue
index 0b57355..b13bd0a 100644
--- a/src/pages/marking/grading.vue
+++ b/src/pages/marking/grading.vue
@@ -211,6 +211,14 @@ const currentQuestions = computed(() => questionsList.value[currentQuestionIndex
const currentQuestion = computed(() => questions.value[0])
const currentTask = computed(() => currentQuestions.value?.tasks?.[taskType.value])
+let isFirst = true
+whenever(questionsList, () => {
+ if (isFirst) {
+ isFirst = false
+ currentQuestionIndex.value = questionsList.value.findIndex(q => q.question_id === questionId.value)
+ }
+})
+
const queryClient = useQueryClient()
whenever(currentTask, (task, oldTask) => {
taskId.value = task?.id
@@ -265,18 +273,17 @@ function handleQuickScoreSelect(score: number) {