Selaa lähdekoodia

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

zhouj1203@hotmail.com 3 vuotta sitten
vanhempi
commit
3dc5ef309c

+ 6 - 4
TEAMModelOS/ClientApp/src/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue

@@ -386,12 +386,12 @@
 								}
 								this.filterYearList = arr
 							}
-							this.examList = res.examInfo.filter(i => i.progress === 'finish')
-							this.originList = res.examInfo.filter(i => i.progress === 'finish')
+							this.examList = res.examInfo.filter(i => i.progress === 'finish' && i.period.id)
+							this.originList = res.examInfo.filter(i => i.progress === 'finish' && i.period.id)
 							this.searchList = this.examList.length ? this.examList.map((item) => item.name) : []
 							this.$store.commit("updateExamList", res.examInfo);
 							this.isLoadingList = false;
-
+							console.log(this.originList.map(i => [i.period.name,i.name]))
 							this.doFilter()
 						} else {
 							this$Message.error('API ERROR!')
@@ -537,10 +537,12 @@
 					item.term = this.compareTerm(this.getTermRange(this.filterPeriod), this.$tools.formatTime(item
 						.createTime, 'MM-dd').split('-'))
 				})
+				let curPeriodId = this.schoolData.period.find(i => i.name === this.filterConditions.period).id
+				// console.log(curPeriodId)
 				// 根据条件过滤所有的测验数据
 				this.examList = this.originList.filter((item) => {
 					return (
-						JSON.stringify(item.period.name).indexOf(this.filterConditions.period || "") >
+						JSON.stringify(item.period.id).indexOf(curPeriodId || "") >
 						-1 &&
 						JSON.stringify(item.grades.map(i => i.id)).indexOf(this.filterConditions.grade || "") >
 						-1 &&