修改教师端我的授课记录查询和导出

This commit is contained in:
sunhonglai
2025-04-29 16:07:35 +08:00
parent 65dfa4f0e3
commit e79abe7aee

View File

@@ -178,19 +178,22 @@ export default {
methods: {
// 导出所有记录
exportFile() {
let req = {
userId: this.userInfo.sysId
}
apiCourse.courseRecordExport2(req).then(res => {
const link = document.createElement('a');// 创建a标签
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "授课记录.xls");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
// let req = {
// }
// apiCourse.courseRecordExport2(req).then(res => {
// const link = document.createElement('a');// 创建a标签
// let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'}); // 设置文件类型
// link.style.display = "none";
// link.href = URL.createObjectURL(blob); // 创建URL
// link.setAttribute("download", "授课记录.xls");
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
// })
window.open(
`/manageApi/admin/export/exportInTeacherRecord`
);
},
// 导出课程下的学员信息