教学日志管理

This commit is contained in:
2026-08-23 15:57:09 +08:00
parent 8a8aa0c7ca
commit 776ffaac4f
3 changed files with 67 additions and 89 deletions
@@ -221,9 +221,7 @@
import { formatDate } from '@/utils/index'
import {
getTeachingLogList,
deleteTeachingLog,
batchReportTeachingLog,
recheckTeachingLog,
submitTeachingLog,
exportTeachingLog,
importTeachingLogExcel,
downloadTeachingLogTemplate,
@@ -380,43 +378,36 @@ export default {
},
handleDeleteSelected() {
const ids = this.getSelectedBhs()
if (ids.length === 0) return
this.$confirm(`确定要删除选中的 ${ids.length} 条记录吗?`, '删除确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => deleteTeachingLog(ids))
.then(() => {
this.$message.success(`已删除 ${ids.length} 条记录`)
this.fetchList()
})
.catch(() => {})
// 后端暂未提供删除接口,仅作提示
this.$message.info('后端暂未提供该接口')
},
handleBatchReport() {
const ids = this.getSelectedBhs()
if (ids.length === 0) return
this.$confirm(`确定要批量上报选中的 ${ids.length} 条记录吗?`, '上报确认', {
this.$confirm(`确定要上报选中的 ${ids.length} 条记录吗?`, '上报确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => batchReportTeachingLog(ids))
.then(() => {
this.$message.success(`已批量上报 ${ids.length} 条记录`)
// 提交教学日志审核,逐条上报至「已上报」状态
let settled = Promise.resolve()
ids.forEach((bh) => {
settled = settled.then(() => submitTeachingLog(bh, '已上报'))
})
return settled
})
.then(() => {
this.$message.success(`已上报 ${ids.length} 条记录`)
this.fetchList()
})
.catch(() => {})
},
handleRecheck() {
recheckTeachingLog()
.then(() => {
this.$message.success('重新检查完成')
})
.catch(() => {})
// 后端暂未提供重新检查接口,仅作提示
this.$message.info('后端暂未提供该接口')
},
downloadBlob(blob, fileName) {