实现考试归档并永久锁定成绩流程
This commit is contained in:
@@ -227,6 +227,14 @@ document.addEventListener('click', async event => {
|
||||
await api(`/api/admin/exams/${target.dataset.id}`, { method: 'PATCH', body: { status: target.dataset.status } });
|
||||
toast(target.dataset.status === 'published' ? '考试已发布' : '考试已撤回', '公开页面状态已同步'); return refreshPublic().then(renderRoute);
|
||||
}
|
||||
if (action === 'archive-exam') {
|
||||
const confirmed = window.confirm(`确认归档“${target.dataset.name}”吗?\n\n归档不可撤销;本场成绩、Excel 导入和复议改分将永久锁定。`);
|
||||
if (!confirmed) return;
|
||||
const result = await api(`/api/admin/exams/${target.dataset.id}/archive`, { method: 'POST' });
|
||||
state.resultImportPreview = null;
|
||||
toast('考试已归档', result.message || '全部成绩已永久锁定');
|
||||
return refreshPublic().then(renderRoute);
|
||||
}
|
||||
if (action === 'toggle-notice') {
|
||||
await api(`/api/admin/notices/${target.dataset.id}`, { method: 'PATCH', body: { status: target.dataset.status } });
|
||||
toast(target.dataset.status === 'published' ? '通知已发布' : '通知已撤回', '首页展示状态已更新'); return refreshPublic().then(renderRoute);
|
||||
|
||||
Reference in New Issue
Block a user