chenxiong 3 лет назад
Родитель
Сommit
29f5fa83dc
2 измененных файлов с 20 добавлено и 4 удалено
  1. 1 0
      pages2/order/confirm_list.vue
  2. 19 4
      pages2/plan/index.vue

+ 1 - 0
pages2/order/confirm_list.vue

@@ -52,6 +52,7 @@
 											<u-radio
 												shape="circle"
 												:name="index"
+												:disabled="item.studentNum == item.studentUpper"
 											>
 												<view :class="item.checked?'white-box blue-box':'white-box'" >
 													<view>

+ 19 - 4
pages2/plan/index.vue

@@ -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();