mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
修改教师端我的授课记录查询和导出
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button>
|
||||
</div>
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-button type="primary" @click="exportStudentOfTearcher()" icon="el-icon-search" size="small" round>
|
||||
导出学员信息
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- <div style="padding: 0px 5px;">-->
|
||||
<!-- <el-button type="primary" @click="exportStudentOfTearcher()" icon="el-icon-search" size="small" round>-->
|
||||
<!-- 导出学员信息-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="Export">
|
||||
<!-- <div style="padding-left: 10px;"><el-button type="primary" @click="exportFile()" icon="el-icon-search" size="small" round>导出</el-button></div> -->
|
||||
@@ -155,7 +155,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiCourse from '../../api/boe/courseRecord.js';
|
||||
import apiTeacher from '../../api/boe/teacher.js';
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
@@ -181,7 +181,7 @@ export default {
|
||||
let req = {
|
||||
userId: this.userInfo.sysId
|
||||
}
|
||||
apiCourse.courseRecordExport2(req).then(res => {
|
||||
apiTeacher.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";
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
|
||||
// 导出课程下的学员信息
|
||||
exportStudentOfCourse(courseId, courseType) {
|
||||
apiCourse.exportStudentOfCourse2(courseId, courseType).then(res => {
|
||||
apiTeacher.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";
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
// 导出教师下的所有授课记录下的学员信息
|
||||
exportStudentOfTearcher() {
|
||||
let userId = this.userInfo.sysId;
|
||||
apiCourse.exportStudentOfTearcher2(userId).then(res => {
|
||||
apiTeacher.exportStudentOfTearcher2(userId).then(res => {
|
||||
const link = document.createElement('a');// 创建a标签
|
||||
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'}); // 设置文件类型
|
||||
link.style.display = "none";
|
||||
@@ -223,15 +223,12 @@ export default {
|
||||
},
|
||||
|
||||
recordList() {
|
||||
console.log('========pageIndex', this.pageInfo.pageIndex)
|
||||
console.log('========pageSize', this.pageInfo.pageSize)
|
||||
|
||||
let req = {
|
||||
courseName: this.keyword,
|
||||
pageNo: this.pageInfo.pageIndex,
|
||||
pageSize: this.pageInfo.pageSize
|
||||
}
|
||||
apiCourse.getListByToken(req).then(res => {
|
||||
apiTeacher.getListByToken(req).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.pageData = res.data.records;
|
||||
this.pageInfo.pageSize = Number(res.data.size);
|
||||
@@ -259,7 +256,6 @@ export default {
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user