细节处理。

This commit is contained in:
musteven 2025-05-07 14:53:22 +08:00
parent f53d9efe79
commit 60eb127de1
2 changed files with 6 additions and 3 deletions

View File

@ -32,7 +32,8 @@ const getJudgeInfo = async () => {
ElMessage.warning("尚未提交作业!")
}
else {
comment.value = res.data.comment; // 更新教师评语
// 更新教师或AI评语,如果教师评语为空,则使用AI评语
comment.value = res.data.comment || res.data.autocomment;
plagiarismStatus.value = res.data.plagiarismStatus; // 更新抄袭状态
}
} catch (error) {

View File

@ -179,9 +179,11 @@ public class ProblemServiceImpl implements ProblemServiceI {
pmProblem.setStatus("已撤回");
}
// 如果score不为空,则将status设置为score的具体值
// 如果score或者autoscore不为空,则将status设置为score的具体值
if (reportStatus.getScore() != null) {
pmProblem.setStatus(String.format("%.2f", reportStatus.getScore()));
} else if (reportStatus.getAutoscore() != null) {
pmProblem.setStatus(String.format("%.2f", reportStatus.getAutoscore()));
}
}
}