update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-14 01:21:15 +08:00
parent 9ecabf9eb9
commit 0bca7eccec

View File

@@ -46,12 +46,18 @@ const { renderError, renderFlowchart } = useMermaid()
// 状态管理 // 状态管理
const loading = ref(false) const loading = ref(false)
const rating = ref<Rating | null>(null) const rating = ref<Rating>({ score: 0, grade: "" })
const submissionCount = ref(0) const submissionCount = ref(0)
const myFlowchartZippedStr = ref("") const myFlowchartZippedStr = ref("")
const myMermaidCode = ref("") const myMermaidCode = ref("")
const showDetailModal = ref(false) const showDetailModal = ref(false)
const evaluation = ref<Evaluation | null>(null) const evaluation = ref<Evaluation>({
score: 0,
grade: "",
feedback: "",
suggestions: "",
criteria_details: {},
})
// ==================== WebSocket 相关函数 ==================== // ==================== WebSocket 相关函数 ====================
// 处理 WebSocket 消息 // 处理 WebSocket 消息
@@ -225,7 +231,7 @@ onUnmounted(() => {
<!-- 评分结果按钮 --> <!-- 评分结果按钮 -->
<n-button <n-button
secondary secondary
v-if="rating" v-if="rating.score > 0"
@click="openDetailModal" @click="openDetailModal"
:type="getScoreType(rating.score)" :type="getScoreType(rating.score)"
> >
@@ -264,17 +270,17 @@ onUnmounted(() => {
<n-gi :span="2"> <n-gi :span="2">
<!-- AI反馈 --> <!-- AI反馈 -->
<n-card <n-card
v-if="evaluation?.feedback" v-if="evaluation.feedback"
size="small" size="small"
title="AI反馈" title="AI反馈"
style="margin-bottom: 16px" style="margin-bottom: 16px"
> >
<n-text>{{ evaluation.feedback }}</n-text> <n-text>{{ evaluation.feedback }}</n-text> </n-card
</n-card>score >score
<!-- 改进建议 --> <!-- 改进建议 -->
<n-card <n-card
v-if="evaluation?.suggestions" v-if="evaluation.suggestions"
size="small" size="small"
title="改进建议" title="改进建议"
style="margin-bottom: 16px" style="margin-bottom: 16px"
@@ -284,7 +290,7 @@ onUnmounted(() => {
<!-- 详细评分 --> <!-- 详细评分 -->
<n-card <n-card
v-if="evaluation?.criteria_details" v-if="evaluation.criteria_details"
size="small" size="small"
title="详细评分" title="详细评分"
> >