fix(admin): 中职/高职管理后台「Word」口径改为「大题分」并清理死列
问题(用户 2026-09-22 报障):
管理后台 试卷管理 → 考生答题记录 中,
①「答题情况」显示的是「Word分」,与现行综合大题口径不符;
② 多出一列「Word 答案」(针对已废弃的 Word 上传通道,中职/高职恒为空)。
改动(5 处):
①「答题情况」列标签:Word分 → 大题分
② 删除整列「Word 答案」(含 hasWordFile 判断与下载按钮)
③ 评分弹窗 label:Word 答案分 → 大题分
④ 删除孤儿方法 downloadExamWord()(删除后已无调用者)
⑤ 成绩管理区中职/高职分支:删「Word文件」列,Word分 → 大题分
(v-else 本科/教师分支的「文档分(Word)」保持不变)
影响面:仅中职/高职分支显示口径;本科/教师组 Word 通道不受影响。
数据列仍为 contestants.word_score(历史列名沿用),仅文案口径调整。
验证:vite build EXIT=0(9.88s);产物指纹「大题分」1 次 /「Word分」0 /「Word 答案」0;
GET /api/admin/submissions/zhongzhi 返回 6 行字段齐全,零回归。
This commit is contained in:
@@ -654,24 +654,10 @@
|
|||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>已答 {{ row.answeredCount || 0 }} / {{ row.totalQuestions || 0 }} 题</span>
|
<span>已答 {{ row.answeredCount || 0 }} / {{ row.totalQuestions || 0 }} 题</span>
|
||||||
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">客观分:{{ row.examScore ?? 0 }}</span>
|
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">客观分:{{ row.examScore ?? 0 }}</span>
|
||||||
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">Word分:{{ row.wordScore ?? 0 }}</span>
|
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">大题分:{{ row.wordScore ?? 0 }}</span>
|
||||||
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">总分:{{ row.totalScore ?? 0 }}</span>
|
<span style="margin-left:10px;color:#1a3a5c;font-weight:600">总分:{{ row.totalScore ?? 0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Word 答案" width="180" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span v-if="row.hasWordFile" style="color:#67c23a;font-size:12px">已上传</span>
|
|
||||||
<span v-else style="color:#909399;font-size:12px">未上传</span>
|
|
||||||
<el-button
|
|
||||||
v-if="row.hasWordFile"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
style="margin-left:8px"
|
|
||||||
v-guard="() => downloadExamWord(row)"
|
|
||||||
>下载</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" align="center">
|
<el-table-column label="操作" width="100" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button text type="warning" size="small" @click="openExamScoreDialog(row)">评分</el-button>
|
<el-button text type="warning" size="small" @click="openExamScoreDialog(row)">评分</el-button>
|
||||||
@@ -692,14 +678,14 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 考生答题评分弹窗(Objective 客观分只读,Word 答案分可改) -->
|
<!-- 考生大题评分弹窗(客观分只读,大题得分可改) -->
|
||||||
<el-dialog v-model="examScoreDialogVisible" title="评分" width="460px">
|
<el-dialog v-model="examScoreDialogVisible" title="评分" width="460px">
|
||||||
<el-form label-width="100px" v-if="examScoreDialogRow">
|
<el-form label-width="100px" v-if="examScoreDialogRow">
|
||||||
<el-form-item label="选手">{{ examScoreDialogRow.userName }}</el-form-item>
|
<el-form-item label="选手">{{ examScoreDialogRow.userName }}</el-form-item>
|
||||||
<el-form-item label="客观分(卷面)">
|
<el-form-item label="客观分(卷面)">
|
||||||
<span>{{ examScoreDialogRow.examScore ?? 0 }} 分(系统自动评分,不可修改)</span>
|
<span>{{ examScoreDialogRow.examScore ?? 0 }} 分(系统自动评分,不可修改)</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Word 答案分">
|
<el-form-item label="大题分">
|
||||||
<el-input-number v-model="examScoreDialogWord" :min="0" :max="100" />
|
<el-input-number v-model="examScoreDialogWord" :min="0" :max="100" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -923,13 +909,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-if="scoreExportGroup === 'zhongzhi' || scoreExportGroup === 'gaozhi'">
|
<template v-if="scoreExportGroup === 'zhongzhi' || scoreExportGroup === 'gaozhi'">
|
||||||
<el-table-column prop="answeredCount" label="答题数" width="80" align="center" />
|
<el-table-column prop="answeredCount" label="答题数" width="80" align="center" />
|
||||||
<el-table-column label="Word文件" width="100" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag :type="row.hasWordFile ? 'success' : 'info'" size="small">
|
|
||||||
{{ row.hasWordFile ? '已上传' : '未上传' }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="卷面分" width="90" align="center">
|
<el-table-column label="卷面分" width="90" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span :style="{ color: (row.examScore ?? 0) > 0 ? '#67c23a' : '#909399' }">
|
<span :style="{ color: (row.examScore ?? 0) > 0 ? '#67c23a' : '#909399' }">
|
||||||
@@ -937,7 +916,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Word分" width="90" align="center">
|
<el-table-column label="大题分" width="90" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span :style="{ color: (row.wordScore ?? 0) > 0 ? '#67c23a' : '#909399' }">
|
<span :style="{ color: (row.wordScore ?? 0) > 0 ? '#67c23a' : '#909399' }">
|
||||||
{{ row.wordScore ?? 0 }}
|
{{ row.wordScore ?? 0 }}
|
||||||
@@ -2038,16 +2017,6 @@ async function fetchExamSubmissions() {
|
|||||||
} finally { examSubmissionsLoading.value = false }
|
} finally { examSubmissionsLoading.value = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadExamWord(row) {
|
|
||||||
if (!row.hasWordFile) {
|
|
||||||
ElMessage.warning('该考生未上传 Word 答案')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const url = `/api/admin/submissions/${questionGroup.value}/${row.aggregationUid || row.userId}/word`
|
|
||||||
// safeDownload 自带「HTTP 状态 + content-type」双重校验,绝不会把后端错误 JSON 存成 .docx
|
|
||||||
await safeDownload(url, { fallbackName: row.wordFileName || '答题答案.docx' })
|
|
||||||
}
|
|
||||||
|
|
||||||
function onExamSubsFilterChange() {
|
function onExamSubsFilterChange() {
|
||||||
examSubmissionsPage.value = 1
|
examSubmissionsPage.value = 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user