|
@@ -386,12 +386,12 @@
|
|
}
|
|
}
|
|
this.filterYearList = arr
|
|
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.searchList = this.examList.length ? this.examList.map((item) => item.name) : []
|
|
this.$store.commit("updateExamList", res.examInfo);
|
|
this.$store.commit("updateExamList", res.examInfo);
|
|
this.isLoadingList = false;
|
|
this.isLoadingList = false;
|
|
-
|
|
|
|
|
|
+ console.log(this.originList.map(i => [i.period.name,i.name]))
|
|
this.doFilter()
|
|
this.doFilter()
|
|
} else {
|
|
} else {
|
|
this$Message.error('API ERROR!')
|
|
this$Message.error('API ERROR!')
|
|
@@ -537,10 +537,12 @@
|
|
item.term = this.compareTerm(this.getTermRange(this.filterPeriod), this.$tools.formatTime(item
|
|
item.term = this.compareTerm(this.getTermRange(this.filterPeriod), this.$tools.formatTime(item
|
|
.createTime, 'MM-dd').split('-'))
|
|
.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) => {
|
|
this.examList = this.originList.filter((item) => {
|
|
return (
|
|
return (
|
|
- JSON.stringify(item.period.name).indexOf(this.filterConditions.period || "") >
|
|
|
|
|
|
+ JSON.stringify(item.period.id).indexOf(curPeriodId || "") >
|
|
-1 &&
|
|
-1 &&
|
|
JSON.stringify(item.grades.map(i => i.id)).indexOf(this.filterConditions.grade || "") >
|
|
JSON.stringify(item.grades.map(i => i.id)).indexOf(this.filterConditions.grade || "") >
|
|
-1 &&
|
|
-1 &&
|