From 3fd1912c55767b75ecbf5c970a1f65599be98897 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Wed, 4 Jan 2023 16:45:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=89=A9=E4=BD=99=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 45 +++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 60419fc9..2c18aab3 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -6,6 +6,7 @@
搜索
重置
导出
+
导出学员信息
@@ -57,7 +58,7 @@ width="100px" prop="score" > - +
@@ -109,10 +110,11 @@ export default { methods: { + // 导出所有记录 exportFile(){ let req = { userId: this.userInfo.sysId - // teacherId:"70F80F4E-34BA-10AB-894A-8FA812B19637" + // userId:"70F80F4E-34BA-10AB-894A-8FA812B19637" } apiCourse.courseRecordExport(req).then(res=>{ const link = document.createElement('a');// 创建a标签 @@ -126,9 +128,42 @@ export default { }) }, + + // 导出课程下的学员信息 + exportStudentOfCourse(courseId){ + let userId = this.userInfo.sysId; + apiCourse.exportStudentOfCourse(userId,courseId).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); + }) + }, + + // 导出教师下的所有授课记录下的学员信息 + exportStudentOfTearcher(){ + let userId = this.userInfo.sysId; + // let userId = '5D36C207-64F4-C512-312D-C9598257695C'; + apiCourse.exportStudentOfTearcher(userId).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); + }) + }, + + recordList(pageIndex){ let req = { - //     teacherId:"70F80F4E-34BA-10AB-894A-8FA812B19637", + //     userId:"6B049FAF-C314-7CCF-0D28-0D23F4C42531", userId: this.userInfo.sysId, keyword:this.keyword,     page:pageIndex,