forked from liweijie/education
新增教研室和教员的时候,同步创建部门和教员账号
This commit is contained in:
@@ -75,9 +75,16 @@
|
||||
<el-table-column prop="jssj" label="结束时间" width="200" align="center" :formatter="fmtDateTime" />
|
||||
<el-table-column prop="cjsj" label="创建时间" width="200" align="center" :formatter="fmtDateTime" />
|
||||
<el-table-column prop="jcxqscsj" label="教材需求生成时间" width="200" align="center" :formatter="fmtDateTime" />
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" size="small" @click="handleDetail(row)">详情</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
:loading="exportingBh === row.bh"
|
||||
@click="handleExport(row)"
|
||||
>导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -127,8 +134,9 @@
|
||||
* 仅提供 分页查询 list + 详情 get?bh=,不做增删改发(避免与教学任务计划管理页重复操作同一实体)
|
||||
* 增删改发统一在 src/views/teachOffice/taskPlan/index.vue(教学任务计划管理)完成
|
||||
*/
|
||||
import { listTeachingTask, getTeachingTask } from '@/api/teachBusiness/teachingTask'
|
||||
import { listTeachingTask, getTeachingTask, exportTaskBook } from '@/api/teachBusiness/teachingTask'
|
||||
import { listAllSemester } from '@/api/teachBusiness/semester'
|
||||
import { saveAs } from 'file-saver'
|
||||
|
||||
export default {
|
||||
name: 'TeachingTask',
|
||||
@@ -156,7 +164,10 @@ export default {
|
||||
// ==================== 3. 详情 ====================
|
||||
detailVisible: false,
|
||||
detailLoading: false,
|
||||
detailData: {}
|
||||
detailData: {},
|
||||
|
||||
// ==================== 4. 导出 ====================
|
||||
exportingBh: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -242,6 +253,18 @@ export default {
|
||||
}).catch(() => {
|
||||
this.detailLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
/* ---------- 导出教学任务书 ---------- */
|
||||
handleExport(row) {
|
||||
if (this.exportingBh) return
|
||||
this.exportingBh = row.bh
|
||||
exportTaskBook(row.bh).then(blob => {
|
||||
saveAs(blob, `教学任务书_${row.rwmc || row.bh}.xlsx`)
|
||||
this.$message.success('导出成功')
|
||||
}).catch(() => {}).finally(() => {
|
||||
this.exportingBh = ''
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user