diff --git a/src/components/Study/manager.vue b/src/components/Study/manager.vue index 7ec869af..e0851d1b 100644 --- a/src/components/Study/manager.vue +++ b/src/components/Study/manager.vue @@ -510,14 +510,15 @@ export default { courseName:this.manageStudyData.name, contentId:this.contentId } + window.open(`/systemapi/xboe/m/course/portal/export?contentId=${params.contentId}&courseName=${params.courseName}`) apicourseStudy.homeworkExport(params).then(res=>{ console.log(res,'res') const link = document.createElement('a');// 创建a标签 - let blob = new Blob([res], { type: 'application/vnd.ms-excel;charset=UTF-8' }); // 设置文件类型 + let blob = new Blob([res], { type: 'application/zip' }); // 设置文件类型 link.style.display = "none"; link.href = URL.createObjectURL(blob); // 创建URL console.log(link.href); - link.setAttribute("download", "作业.xlsx"); + link.setAttribute("download", "作业.zip"); document.body.appendChild(link); link.click(); URL.revokeObjectURL(link.href)