From 8dde1243d8eb3baff6045bb32dfe978c9e4d52e0 Mon Sep 17 00:00:00 2001 From: brianling Date: Thu, 16 Jul 2026 06:14:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=85=E5=8D=B7=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=AF=84=E5=88=86=E6=A0=87=E5=87=86=E5=AD=97=E6=AE=B5=20&=20?= =?UTF-8?q?=E9=98=85=E5=8D=B7=E5=90=8E=E4=B8=8D=E6=B8=85=E7=A9=BA=E8=AF=84?= =?UTF-8?q?=E5=88=86=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 6 ++---- src/components/FloatingToolbar.vue | 1 - src/components/ResultDrawer.vue | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index 63249e3..b6b7683 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,11 +33,9 @@ onMounted(async () => { const data = await window.electronAPI?.grading.getData() if (data) { if (data.image) gradingStore.setImage(data.image) - if (data.rubric) gradingStore.setRubric(data.rubric) + if (data.questions) gradingStore.setQuestions(data.questions) if (data.result) gradingStore.setResult(data.result) - if (data.questionTitle) gradingStore.setQuestionTitle(data.questionTitle) - if (data.maxScore) gradingStore.setMaxScore(data.maxScore) - if (data.referenceAnswer) gradingStore.setReferenceAnswer(data.referenceAnswer) + if (data.currentQuestionIndex !== undefined) gradingStore.setCurrentQuestionIndex(data.currentQuestionIndex) } appStore.openResultDrawer() } else if (dialogType) { diff --git a/src/components/FloatingToolbar.vue b/src/components/FloatingToolbar.vue index f1cda4b..5f1acb0 100644 --- a/src/components/FloatingToolbar.vue +++ b/src/components/FloatingToolbar.vue @@ -123,7 +123,6 @@ async function startGrading() { appStore.isGrading = true try { - const q = questions[0] const result = await gradeQuestion(0) if (!result) return diff --git a/src/components/ResultDrawer.vue b/src/components/ResultDrawer.vue index 0bf2ed9..b2075bd 100644 --- a/src/components/ResultDrawer.vue +++ b/src/components/ResultDrawer.vue @@ -141,11 +141,6 @@ async function gradeAt(idx: number) { gradingStore.setResult(result) currentIdx.value = idx gradingStore.setCurrentQuestionIndex(idx) - // update rubric bridge currentIndex - await window.electronAPI?.rubric.storeData({ - questions: questions.value, - currentIndex: idx - }) // update grading bridge await window.electronAPI?.grading.storeData({ result,