forked from liweijie/education
教学日志管理
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -208,10 +208,8 @@
|
||||
import { formatDate } from '@/utils/index'
|
||||
import {
|
||||
getReportedTeachingLogList,
|
||||
deleteTeachingLog,
|
||||
batchAuditTeachingLog,
|
||||
approveTeachingLog,
|
||||
rejectTeachingLog,
|
||||
recheckTeachingLog,
|
||||
exportTeachingLog,
|
||||
getTeachingLogByBh
|
||||
} from '@/api/log'
|
||||
@@ -375,19 +373,8 @@ export default {
|
||||
},
|
||||
|
||||
handleDelete() {
|
||||
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('后端暂未提供该接口')
|
||||
},
|
||||
|
||||
handleAudit() {
|
||||
@@ -398,7 +385,14 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => batchAuditTeachingLog(ids))
|
||||
.then(() => {
|
||||
// 审核通过教学日志,逐条审核
|
||||
let settled = Promise.resolve()
|
||||
ids.forEach((bh) => {
|
||||
settled = settled.then(() => approveTeachingLog(bh, ''))
|
||||
})
|
||||
return settled
|
||||
})
|
||||
.then(() => {
|
||||
this.$message.success(`已审核通过 ${ids.length} 条记录`)
|
||||
this.fetchList()
|
||||
@@ -432,11 +426,8 @@ export default {
|
||||
},
|
||||
|
||||
handleRecheck() {
|
||||
recheckTeachingLog()
|
||||
.then(() => {
|
||||
this.$message.success('重新检查变更情况完成')
|
||||
})
|
||||
.catch(() => {})
|
||||
// 后端暂未提供重新检查接口,仅作提示
|
||||
this.$message.info('后端暂未提供该接口')
|
||||
},
|
||||
|
||||
downloadBlob(blob, fileName) {
|
||||
|
||||
Reference in New Issue
Block a user