|
@@ -199,8 +199,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
itemClick(item,index) {
|
|
|
- console.log(item)
|
|
|
+ // console.log(item)
|
|
|
this.activeDate = item.date;
|
|
|
+ this.workList = this.getStudyCourseByDay();
|
|
|
},
|
|
|
/**
|
|
|
* 根据选中日期获取需要学习的课程
|
|
@@ -209,9 +210,19 @@ export default {
|
|
|
let courseList = [];
|
|
|
this.showDayList.forEach(day => {
|
|
|
if(day.date == this.activeDate) {
|
|
|
-
|
|
|
+ if(day.daySectionList) {
|
|
|
+ day.daySectionList.forEach(section => {
|
|
|
+ this.listItem.goodsVos.forEach(vos => {
|
|
|
+ if(vos.goodsId == section.goodsId) {
|
|
|
+ courseList.push(vos)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ return courseList;
|
|
|
},
|
|
|
planNow(){
|
|
|
uni.switchTab({
|
|
@@ -246,7 +257,9 @@ export default {
|
|
|
this.currentMonth = this.currentMonth + index;
|
|
|
let item = this.listItem.calendarStudyVo[this.monthIndex];
|
|
|
this.calendarStudyVo = item;
|
|
|
- this.workList = this.calendarStudyVo.goodsVos;
|
|
|
+ this.activeDate = '';
|
|
|
+ // this.workList = this.calendarStudyVo.goodsVos;
|
|
|
+ this.workList = this.getStudyCourseByDay();
|
|
|
if (this.monthIndex > 0) {
|
|
|
this.havePreviousMonth = true;
|
|
|
}
|
|
@@ -260,7 +273,8 @@ export default {
|
|
|
let currentMonth = date.getMonth() + 1;
|
|
|
this.haveNextMonth = false;
|
|
|
this.havePreviousMonth = false;
|
|
|
- this.workList = this.listItem.goodsVos;
|
|
|
+ this.workList = this.getStudyCourseByDay();
|
|
|
+ // this.workList = this.listItem.goodsVos;
|
|
|
if (this.listItem !== undefined) {
|
|
|
for (let i = 0; i < this.listItem.calendarStudyVo.length; i++) {
|
|
|
let item = this.listItem.calendarStudyVo[i];
|
|
@@ -279,6 +293,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
openEdit(item) {
|
|
|
+ this.activeDate = '';
|
|
|
this.listItem = item;
|
|
|
this.isOpen = false;
|
|
|
this.dealMonth();
|