From 4caa17aadb24f94ea45d345d230414c44fc1c573 Mon Sep 17 00:00:00 2001 From: lmj <3407000732@qq.com> Date: Wed, 16 Nov 2022 14:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E6=8A=A5=E5=90=8D=E7=9A=84=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/study/index.vue | 83 +++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 27 deletions(-) diff --git a/pages/study/index.vue b/pages/study/index.vue index 60b58da..5564aca 100644 --- a/pages/study/index.vue +++ b/pages/study/index.vue @@ -4,11 +4,16 @@ - + + + + + @@ -20,14 +25,25 @@ - + 筛选 - - {{status.label}} + + {{status.name}} + + + + + + 筛选 + + + + + {{status.name}} @@ -108,11 +124,13 @@ - - - + + + + @@ -295,7 +313,7 @@ couresList: '', switch: '', hisswitch: '', - classType: 0, + classType: '', hisclassType: '', historyList: '', studyList: [], @@ -413,6 +431,10 @@ }, 500); }, methods: { + removecour(item){ + console.log(item); + item.delcour = !item.delcour + }, rowbtn(row) { this.delData = row; this.btnsShow = true; @@ -427,6 +449,7 @@ }); this.studyList.forEach((item, index) => { if (item.id === this.delData.id) { + // item.delcour = false; this.studyList.splice(index, 1); } }) @@ -514,16 +537,17 @@ }) }, autonomyStatus(num) { - // this.isSelect = num; - this.autonomy.status = num; - this.searchData(); + this.status = num; + this.getLearning(); + }, + taskStatus(num) { + this.boeStatus = num; + this.loadBoeData(true); }, closeBtns() { this.btnsShow = false; }, searchData() { - // this.page.pageIndex = 1; - // this.isListOne = true; let list = this.studyData; let type; let wei; @@ -580,13 +604,10 @@ } apiBoeCourse.cmtaskList(params).then(res => { this.taskCount = res.result.count; - // let userIds=[]; res.result.list.forEach(item => { let time = this.formatDate(item.created_at * 1000); item.created_at = time.split(' ')[0]; - // userIds.push(item.sysCreateAid); }); - // this.loadUserInfos(rs.result.list, userIds); this.couresList = res.result.list; if (this.taskCount > this.taskPageIndex * this.taskPageSize) { this.taskHasMore = true; @@ -700,23 +721,20 @@ title: '加载中...' }); this.loadStatus = 'loading'; - // let classType = null; - let data = []; let lear = { pageIndex: 1, //第几页 pageSize: 200, courseName: this.learkeyword, - // courseType: classType, status: this.status, } - // if(this.classType == 'online-course' || this.classType == '') { await apicourseStudy.myStudyList(lear).then(res => { if (res.status == 200) { // 我报名的接口 //console.log(res) let courseIds = []; res.result.list.forEach(item => { + item.delcour = false; item.teachersName = ''; item.addTime = item.addTime.split(' ')[0]; courseIds.push(item.courseId); @@ -733,10 +751,14 @@ type: this.classType } await apiBoeCourse.myLearning(learData).then(res => { - + if (res.status == 200) { + res.result.dataList.forEach(item => { + item.delcour = false; + }) let list = this.filterConversion(res.result.dataList); data.push(...list); + } }) this.loadStatus = 'noMore'; @@ -865,6 +887,18 @@