修复复盘保存 405:复盘改走成绩更新接口,并修正 API 404 回退。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -9,7 +9,7 @@
|
||||
<meta name="author" content="马建军" />
|
||||
<meta name="copyright" content="Copyright (c) 马建军. All rights reserved." />
|
||||
<title>中学成绩档案</title>
|
||||
<script type="module" crossorigin src="/assets/index-C801hcLu.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BlbLMdT7.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BSTLtBBx.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -64,13 +64,14 @@ export default function ExamReviewPanel({ exams, onRefresh }: Props) {
|
||||
}
|
||||
setSaving(true)
|
||||
try {
|
||||
await examApi.updateReview(
|
||||
selectedExam.id,
|
||||
selectedExam.scores.map((score) => ({
|
||||
await examApi.update(selectedExam.id, {
|
||||
scores: selectedExam.scores.map((score) => ({
|
||||
subject_id: score.subject_id,
|
||||
total_score: Number(score.total_score),
|
||||
obtained_score: Number(score.obtained_score),
|
||||
review_statuses: statusMap[score.subject_id] || [],
|
||||
})),
|
||||
)
|
||||
})
|
||||
message.success('复盘已保存')
|
||||
onRefresh()
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user