From c3b5f1baf08cbd632373ab9b18e29740b2a2a360 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 11:23:45 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 49 +++- src/views/course/Mylecnotes.vue | 393 +++++++++++++++++--------------- 2 files changed, 260 insertions(+), 182 deletions(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index 5fcdc1ef..7f143d9d 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -65,12 +65,59 @@ const getListByToken = function(data) { return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&page=${data.page}&pageSize=${data.pageSize}`); } +/** + * 导出授课记录 + * + * @param {Object} data + */ +const courseRecordExport2 = function(data) { + return axios.request({ + baseURL, + url: '/manageApi/admin/export/exportInTeacherRecord', + method: 'post', + data:data, + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} + +/** + * 导出课程下的学员信息 + * + */ +const exportStudentOfCourse2 = function(courseId,courseType) { + return axios.request({ + baseURL, + url: '/manageApi/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType, + method: 'get' + // headers:{'Content-Type':'application/json;charset=utf-8'}, + // responseType: 'blob' + }) +} + +/** + * 导出教师下的所有授课记录下的学员信息 + * + */ +const exportStudentOfTearcher2 = function(userId) { + return axios.request({ + baseURL, + url: '/b1/system/teacher/teacher-course-student-export?userId='+userId, + method: 'post', + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} + export default { courseRecordExport, + courseRecordExport2, courseRecordList, getListByToken, exportStudentOfCourse, - exportStudentOfTearcher + exportStudentOfCourse2, + exportStudentOfTearcher, + exportStudentOfTearcher2, } diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 7e7c2c83..7989e3dc 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -1,206 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + -
- -
+
+ +
- + From 7cee4b5ad1adb6ca5fc8eb8593f09e3e9fbbc686 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 11:33:51 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 7989e3dc..6a61e268 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -201,9 +201,8 @@ export default { } apiCourse.getListByToken(req).then(res => { if (res.status == 200) { - this.pageData = res.result.records; - // this.pageInfo = res.result.pageInfo; - // this.pageInfo.total = Number(20); + this.pageData = res.data.records; + this.pageInfo.total = res.data.pages; } else { this.$message({ type: 'error', From 9a6727e52f256c6b5fb9d917a453733876b1ee1b Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 11:40:29 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 6a61e268..4fe55cae 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -202,7 +202,9 @@ export default { apiCourse.getListByToken(req).then(res => { if (res.status == 200) { this.pageData = res.data.records; + this.pageInfo.pageSize = res.data.size; this.pageInfo.total = res.data.pages; + this.pageInfo.page = res.data.current; } else { this.$message({ type: 'error', From a3c85cbd19b894cca1fcb1af0348a0ef5f73af1e Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 11:46:40 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 4fe55cae..0dc5323f 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -202,9 +202,9 @@ export default { apiCourse.getListByToken(req).then(res => { if (res.status == 200) { this.pageData = res.data.records; - this.pageInfo.pageSize = res.data.size; - this.pageInfo.total = res.data.pages; - this.pageInfo.page = res.data.current; + this.pageInfo.pageSize = Number(res.data.size); + this.pageInfo.total = Number(res.data.pages); + this.pageInfo.page = Number(res.data.current); } else { this.$message({ type: 'error', From a9de4ad77cc00648af0fdae3228db6656c2cbe3d Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 11:49:39 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 0dc5323f..00b3081a 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -203,7 +203,7 @@ export default { if (res.status == 200) { this.pageData = res.data.records; this.pageInfo.pageSize = Number(res.data.size); - this.pageInfo.total = Number(res.data.pages); + this.pageInfo.total = Number(res.data.total); this.pageInfo.page = Number(res.data.current); } else { this.$message({ From adc33e58922319308ad543121edfb3db9aecfb5b Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 13:36:24 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 00b3081a..df00b3a5 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -133,11 +133,14 @@ export default { return { pageData: [], keyword: '', - pageInfo: {}, + pageInfo: { + pageIndex:1, + pageSize:10, + }, } }, mounted() { - this.recordList(1); + this.recordList(); }, computed: { ...mapGetters(['userInfo']) @@ -189,15 +192,14 @@ export default { }) }, - recordList(pageIndex) { - // 如果pageIndex未定义或未赋值,则默认初始值 - pageIndex = pageIndex || 1; + recordList() { + console.log('========pageIndex', this.pageInfo.pageIndex) + console.log('========pageSize', this.pageInfo.pageSize) let req = { - userId: this.userInfo.sysId, courseName: this.keyword, - page: pageIndex, - pageSize: 10 + page: this.pageInfo.pageIndex, + pageSize: this.pageInfo.pageSize } apiCourse.getListByToken(req).then(res => { if (res.status == 200) { @@ -216,8 +218,9 @@ export default { // 每页显示的条数事件 handleSizeChange(val) { + this.pageInfo.pageIndex = 1; this.pageInfo.pageSize = val; - this.recordList(1); + this.recordList(); }, // 显示制定页的数据 handleCurrentChange(val) { From 78cbb211557a59666ff214f1fdb64e17cbe41f0b Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 13:47:56 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index df00b3a5..d36c9dc9 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -198,7 +198,7 @@ export default { let req = { courseName: this.keyword, - page: this.pageInfo.pageIndex, + pageNo: this.pageInfo.pageIndex, pageSize: this.pageInfo.pageSize } apiCourse.getListByToken(req).then(res => { From b5f01c635794d9bb6b4e4b283f7f154c4faefb71 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 13:55:05 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index 7f143d9d..fb87fd57 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -62,7 +62,7 @@ const courseRecordList = function(data) { return ajax.postJson('/b1/system/teacher/teacher-course-list',data); } const getListByToken = function(data) { - return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&page=${data.page}&pageSize=${data.pageSize}`); + return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`); } /** From 4be009a6d888e890cc2f0a98810d2f191a6f755f Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 14:13:34 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 72 +++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index d36c9dc9..749a560e 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -27,26 +27,31 @@
+ + + + - - @@ -63,20 +68,16 @@ + label="授课/课程日期" + prop="teachingDate" + width="200px"> + + - + label="内容分类" + prop="courseTypeName" + width="200px"> + + + + + + + Date: Tue, 29 Apr 2025 14:53:24 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 50 ----------------------------- src/api/modules/teacher.js | 57 +++++++++++++++++++++++++++++++-- src/views/course/Mylecnotes.vue | 24 ++++++-------- 3 files changed, 65 insertions(+), 66 deletions(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index fb87fd57..8f0eeb49 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -61,63 +61,13 @@ const exportStudentOfTearcher = function(userId) { const courseRecordList = function(data) { return ajax.postJson('/b1/system/teacher/teacher-course-list',data); } -const getListByToken = function(data) { - return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`); -} - -/** - * 导出授课记录 - * - * @param {Object} data - */ -const courseRecordExport2 = function(data) { - return axios.request({ - baseURL, - url: '/manageApi/admin/export/exportInTeacherRecord', - method: 'post', - data:data, - headers:{'Content-Type':'application/json;charset=utf-8'}, - responseType: 'blob' - }) -} - -/** - * 导出课程下的学员信息 - * - */ -const exportStudentOfCourse2 = function(courseId,courseType) { - return axios.request({ - baseURL, - url: '/manageApi/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType, - method: 'get' - // headers:{'Content-Type':'application/json;charset=utf-8'}, - // responseType: 'blob' - }) -} - -/** - * 导出教师下的所有授课记录下的学员信息 - * - */ -const exportStudentOfTearcher2 = function(userId) { - return axios.request({ - baseURL, - url: '/b1/system/teacher/teacher-course-student-export?userId='+userId, - method: 'post', - headers:{'Content-Type':'application/json;charset=utf-8'}, - responseType: 'blob' - }) -} export default { courseRecordExport, - courseRecordExport2, courseRecordList, getListByToken, exportStudentOfCourse, - exportStudentOfCourse2, exportStudentOfTearcher, - exportStudentOfTearcher2, } diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index 3d075b5b..4535a7c1 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -1,5 +1,6 @@ import ajax from '@/utils/xajax.js' import ajax2 from '../unionAjax.js'; +import axios from "axios"; /** * 按名称查询 @@ -38,7 +39,7 @@ const detailTeacher=function (id){ * tlevelId级别 * salaryId发薪地 * tsystemId - + * } query * @returns */ @@ -211,6 +212,55 @@ const findAllCourses=function(query){ return ajax.postJson('/xboe/teacher/update-sync',data); } + +const getListByToken = function(data) { + return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`); +} + +/** + * 导出授课记录 + * + * @param {Object} data + */ +const courseRecordExport2 = function(data) { + return axios.request({ + baseURL, + url: '/manageApi/admin/export/exportInTeacherRecord', + method: 'post', + data:data, + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} + +/** + * 导出课程下的学员信息 + * + */ +const exportStudentOfCourse2 = function(courseId,courseType) { + return axios.request({ + baseURL, + url: '/manageApi/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType, + method: 'get' + // headers:{'Content-Type':'application/json;charset=utf-8'}, + // responseType: 'blob' + }) +} + +/** + * 导出教师下的所有授课记录下的学员信息 + * + */ +const exportStudentOfTearcher2 = function(userId) { + return axios.request({ + baseURL, + url: '/b1/system/teacher/teacher-course-student-export?userId='+userId, + method: 'post', + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} + export default { findByName, getInfoById, @@ -227,5 +277,8 @@ export default { exports, syncUpdate, detailTeacher, - updateTeacher + updateTeacher, + courseRecordExport2, + exportStudentOfCourse2, + exportStudentOfTearcher2, } diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 749a560e..da545bb9 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -14,11 +14,11 @@
导出
-
- - 导出学员信息 - -
+ + + + +
@@ -155,7 +155,7 @@ From f92954aa6be02da173503f74f5afac89aff8c8b2 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 14:53:51 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 1 - src/api/modules/teacher.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index 8f0eeb49..23475313 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -66,7 +66,6 @@ const courseRecordList = function(data) { export default { courseRecordExport, courseRecordList, - getListByToken, exportStudentOfCourse, exportStudentOfTearcher, diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index 4535a7c1..c5b8eb84 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -281,4 +281,5 @@ export default { courseRecordExport2, exportStudentOfCourse2, exportStudentOfTearcher2, + getListByToken, } From 577357ccd063149f8d1e21026ce4b60fc02ae222 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 15:03:58 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 51 ++++++++++++++++++++++++++++++ src/api/modules/teacher.js | 56 +-------------------------------- src/views/course/Mylecnotes.vue | 11 +++---- 3 files changed, 57 insertions(+), 61 deletions(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index 23475313..0018efaf 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -61,12 +61,63 @@ const exportStudentOfTearcher = function(userId) { const courseRecordList = function(data) { return ajax.postJson('/b1/system/teacher/teacher-course-list',data); } +const getListByToken = function(data) { + return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`); +} + +/** + * 导出授课记录 + * + * @param {Object} data + */ +const courseRecordExport2 = function(data) { + return axios.request({ + baseURL: "/manageApi", + url: '/admin/export/exportInTeacherRecord', + method: 'post', + data:data, + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} + +/** + * 导出课程下的学员信息 + * + */ +const exportStudentOfCourse2 = function(courseId,courseType) { + return axios.request({ + baseURL: "/manageApi", + url: '/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType, + method: 'get' + // headers:{'Content-Type':'application/json;charset=utf-8'}, + // responseType: 'blob' + }) +} + +/** + * 导出教师下的所有授课记录下的学员信息 + * + */ +const exportStudentOfTearcher2 = function(userId) { + return axios.request({ + baseURL: "/manageApi", + url: '/b1/system/teacher/teacher-course-student-export?userId='+userId, + method: 'post', + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) +} export default { courseRecordExport, + courseRecordExport2, courseRecordList, + getListByToken, exportStudentOfCourse, + exportStudentOfCourse2, exportStudentOfTearcher, + exportStudentOfTearcher2, } diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index c5b8eb84..e862885f 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -1,6 +1,5 @@ import ajax from '@/utils/xajax.js' import ajax2 from '../unionAjax.js'; -import axios from "axios"; /** * 按名称查询 @@ -212,55 +211,6 @@ const findAllCourses=function(query){ return ajax.postJson('/xboe/teacher/update-sync',data); } - -const getListByToken = function(data) { - return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`); -} - -/** - * 导出授课记录 - * - * @param {Object} data - */ -const courseRecordExport2 = function(data) { - return axios.request({ - baseURL, - url: '/manageApi/admin/export/exportInTeacherRecord', - method: 'post', - data:data, - headers:{'Content-Type':'application/json;charset=utf-8'}, - responseType: 'blob' - }) -} - -/** - * 导出课程下的学员信息 - * - */ -const exportStudentOfCourse2 = function(courseId,courseType) { - return axios.request({ - baseURL, - url: '/manageApi/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType, - method: 'get' - // headers:{'Content-Type':'application/json;charset=utf-8'}, - // responseType: 'blob' - }) -} - -/** - * 导出教师下的所有授课记录下的学员信息 - * - */ -const exportStudentOfTearcher2 = function(userId) { - return axios.request({ - baseURL, - url: '/b1/system/teacher/teacher-course-student-export?userId='+userId, - method: 'post', - headers:{'Content-Type':'application/json;charset=utf-8'}, - responseType: 'blob' - }) -} - export default { findByName, getInfoById, @@ -277,9 +227,5 @@ export default { exports, syncUpdate, detailTeacher, - updateTeacher, - courseRecordExport2, - exportStudentOfCourse2, - exportStudentOfTearcher2, - getListByToken, + updateTeacher } diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index da545bb9..48b431f7 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -155,7 +155,7 @@ From 45e006a4e78553f1af774cb7102fb09b2a8f432f Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 15:34:09 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 48b431f7..39356407 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -130,7 +130,7 @@ fixed="right" > From 4784b02ca42eedb657239458a74b13a0c2db350b Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 15:44:55 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/boe/courseRecord.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js index 0018efaf..d85a8eb1 100644 --- a/src/api/boe/courseRecord.js +++ b/src/api/boe/courseRecord.js @@ -74,7 +74,7 @@ const courseRecordExport2 = function(data) { return axios.request({ baseURL: "/manageApi", url: '/admin/export/exportInTeacherRecord', - method: 'post', + method: 'get', data:data, headers:{'Content-Type':'application/json;charset=utf-8'}, responseType: 'blob' From 65dfa4f0e336c96a137ff30c3294a9a0e1c2768c Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 16:01:30 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 39356407..1b49b43d 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -195,16 +195,20 @@ export default { // 导出课程下的学员信息 exportStudentOfCourse(courseId, courseType) { - apiCourse.exportStudentOfCourse2(courseId, courseType).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); - }) + // apiCourse.exportStudentOfCourse2(courseId, courseType).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/exportTeacherRecordStudentInfo?courseId=${courseId}&courseType=${courseType}` + ); }, // 导出教师下的所有授课记录下的学员信息 From e79abe7aee68ca3846ccddd97cd2d5451375f8d8 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 16:07:35 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 1b49b43d..2de099a8 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -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` + ); }, // 导出课程下的学员信息 From b4538150df1bb72e8c571e8bb34e8ecd44d27805 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 16:20:57 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 2de099a8..d4e79054 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -190,9 +190,9 @@ export default { // link.click(); // document.body.removeChild(link); // }) - + let userNo = this.userInfo.userNo; window.open( - `/manageApi/admin/export/exportInTeacherRecord` + `/manageApi/admin/export/exportInTeacherRecord?userNo=${userNo}` ); }, From a810da8978bdaf0575b75518282b63a1744c6d64 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 16:29:36 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index d4e79054..575a961c 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -190,9 +190,9 @@ export default { // link.click(); // document.body.removeChild(link); // }) - let userNo = this.userInfo.userNo; + let teacherId = this.userInfo.sysId; window.open( - `/manageApi/admin/export/exportInTeacherRecord?userNo=${userNo}` + `/manageApi/admin/export/exportInTeacherRecord?teacherId=${teacherId}` ); }, From 7a67aca62022c15d0b2047bd2f6363603e535479 Mon Sep 17 00:00:00 2001 From: sunhonglai Date: Tue, 29 Apr 2025 16:33:42 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E6=8E=88=E8=AF=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/Mylecnotes.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue index 575a961c..5657fcc8 100644 --- a/src/views/course/Mylecnotes.vue +++ b/src/views/course/Mylecnotes.vue @@ -190,10 +190,13 @@ export default { // link.click(); // document.body.removeChild(link); // }) - let teacherId = this.userInfo.sysId; - window.open( - `/manageApi/admin/export/exportInTeacherRecord?teacherId=${teacherId}` - ); + // 取pageData记录第一条 + if (this.pageData.length > 0) { + let teacherId = this.pageData[0].teacherId; + window.open( + `/manageApi/admin/export/exportInTeacherRecord?teacherId=${teacherId}` + ); + } }, // 导出课程下的学员信息