fix: 阅卷使用评分标准字段 & 阅卷后不清空评分标准
This commit is contained in:
+2
-4
@@ -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) {
|
||||
|
||||
@@ -123,7 +123,6 @@ async function startGrading() {
|
||||
|
||||
appStore.isGrading = true
|
||||
try {
|
||||
const q = questions[0]
|
||||
const result = await gradeQuestion(0)
|
||||
if (!result) return
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user