教学大纲下载功能

This commit is contained in:
2026-09-15 16:13:06 +08:00
parent 5d928bd303
commit 5903f0c590
6 changed files with 45 additions and 11 deletions
@@ -296,12 +296,14 @@ import {
deleteSyllabus,
batchDeleteSyllabus,
updateSyllabus,
listByZydhAndTy
listByZydhAndTy,
exportSyllabus
} from '@/api/teachBusiness/syllabus'
import { listMajor } from '@/api/subjectMajor/major'
import { listKb } from '@/api/teachOffice/kb'
import { listOffice } from '@/api/teachOffice/office'
import { getDicts } from '@/api/system/dict/data'
import { saveAs } from 'file-saver'
const REFERENCE_DATA_PAGE_SIZE = 10000
const COURSE_TYPE_DICT_CODE = 'course_type'
@@ -500,9 +502,15 @@ export default {
}).catch(() => {})
},
/* ---------- 下载(无后端接口) ---------- */
/* ---------- 下载 ---------- */
handleDownload() {
this.$message.warning('后端暂未提供该接口')
const query = {}
if (this.searchForm.zydh) query.zydh = this.searchForm.zydh
if (this.searchForm.ty === 0 || this.searchForm.ty === 1) query.ty = this.searchForm.ty
exportSyllabus(query).then(blob => {
saveAs(blob, '教学大纲.xlsx')
this.$message.success('导出成功')
}).catch(() => {})
},
/* ---------- 分页 ---------- */