feat: 参考答案图片上传 + AI提示词分有无标准答案图片两种流程

This commit is contained in:
2026-07-16 10:07:09 +08:00
parent 499a55af77
commit 25b8cfb787
6 changed files with 113 additions and 15 deletions
+9
View File
@@ -28,6 +28,7 @@
<div class="result-section" v-if="currentQuestion.referenceAnswer">
<div class="section-title">参考答案</div>
<div class="reference-text">{{ currentQuestion.referenceAnswer }}</div>
<img v-if="currentQuestion.referenceAnswerImage" class="ref-image" :src="'data:image/png;base64,' + currentQuestion.referenceAnswerImage" />
</div>
<div class="result-score">
@@ -143,6 +144,7 @@ async function gradeAt(idx: number) {
rubric: q.rubric || `请根据答案内容评分,满分${q.maxScore}`,
maxScore: q.maxScore,
referenceAnswer: q.referenceAnswer,
referenceAnswerImage: q.referenceAnswerImage,
questionTitle: q.questionTitle,
apiConfig: {
apiKey: settingsStore.settings.apiKey,
@@ -353,6 +355,13 @@ async function confirmScore() {
border-radius: 6px;
white-space: pre-wrap;
}
.ref-image {
max-width: 100%;
max-height: 300px;
border-radius: 6px;
margin-top: 8px;
border: 1px solid #e4e7ed;
}
.error-message {
background: #fef0f0;
color: #f56c6c;