修改教师端我的授课记录查询和导出

This commit is contained in:
sunhonglai
2025-04-29 13:36:24 +08:00
parent a9de4ad77c
commit adc33e5892

View File

@@ -133,11 +133,14 @@ export default {
return { return {
pageData: [], pageData: [],
keyword: '', keyword: '',
pageInfo: {}, pageInfo: {
pageIndex:1,
pageSize:10,
},
} }
}, },
mounted() { mounted() {
this.recordList(1); this.recordList();
}, },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(['userInfo'])
@@ -189,15 +192,14 @@ export default {
}) })
}, },
recordList(pageIndex) { recordList() {
// 如果pageIndex未定义或未赋值则默认初始值 console.log('========pageIndex', this.pageInfo.pageIndex)
pageIndex = pageIndex || 1; console.log('========pageSize', this.pageInfo.pageSize)
let req = { let req = {
userId: this.userInfo.sysId,
courseName: this.keyword, courseName: this.keyword,
page: pageIndex, page: this.pageInfo.pageIndex,
pageSize: 10 pageSize: this.pageInfo.pageSize
} }
apiCourse.getListByToken(req).then(res => { apiCourse.getListByToken(req).then(res => {
if (res.status == 200) { if (res.status == 200) {
@@ -216,8 +218,9 @@ export default {
// 每页显示的条数事件 // 每页显示的条数事件
handleSizeChange(val) { handleSizeChange(val) {
this.pageInfo.pageIndex = 1;
this.pageInfo.pageSize = val; this.pageInfo.pageSize = val;
this.recordList(1); this.recordList();
}, },
// 显示制定页的数据 // 显示制定页的数据
handleCurrentChange(val) { handleCurrentChange(val) {