fix: 阅卷使用评分标准字段 & 阅卷后不清空评分标准
This commit is contained in:
+2
-4
@@ -33,11 +33,9 @@ onMounted(async () => {
|
|||||||
const data = await window.electronAPI?.grading.getData()
|
const data = await window.electronAPI?.grading.getData()
|
||||||
if (data) {
|
if (data) {
|
||||||
if (data.image) gradingStore.setImage(data.image)
|
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.result) gradingStore.setResult(data.result)
|
||||||
if (data.questionTitle) gradingStore.setQuestionTitle(data.questionTitle)
|
if (data.currentQuestionIndex !== undefined) gradingStore.setCurrentQuestionIndex(data.currentQuestionIndex)
|
||||||
if (data.maxScore) gradingStore.setMaxScore(data.maxScore)
|
|
||||||
if (data.referenceAnswer) gradingStore.setReferenceAnswer(data.referenceAnswer)
|
|
||||||
}
|
}
|
||||||
appStore.openResultDrawer()
|
appStore.openResultDrawer()
|
||||||
} else if (dialogType) {
|
} else if (dialogType) {
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ async function startGrading() {
|
|||||||
|
|
||||||
appStore.isGrading = true
|
appStore.isGrading = true
|
||||||
try {
|
try {
|
||||||
const q = questions[0]
|
|
||||||
const result = await gradeQuestion(0)
|
const result = await gradeQuestion(0)
|
||||||
if (!result) return
|
if (!result) return
|
||||||
|
|
||||||
|
|||||||
@@ -141,11 +141,6 @@ async function gradeAt(idx: number) {
|
|||||||
gradingStore.setResult(result)
|
gradingStore.setResult(result)
|
||||||
currentIdx.value = idx
|
currentIdx.value = idx
|
||||||
gradingStore.setCurrentQuestionIndex(idx)
|
gradingStore.setCurrentQuestionIndex(idx)
|
||||||
// update rubric bridge currentIndex
|
|
||||||
await window.electronAPI?.rubric.storeData({
|
|
||||||
questions: questions.value,
|
|
||||||
currentIndex: idx
|
|
||||||
})
|
|
||||||
// update grading bridge
|
// update grading bridge
|
||||||
await window.electronAPI?.grading.storeData({
|
await window.electronAPI?.grading.storeData({
|
||||||
result,
|
result,
|
||||||
|
|||||||
Reference in New Issue
Block a user