Merge branch 'master-20250428-shl' into test20250220

This commit is contained in:
joshen
2025-04-29 16:08:06 +08:00

View File

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