diff --git a/src/components/page/Dashboard.vue b/src/components/page/Dashboard.vue index c00909a..d6249f9 100644 --- a/src/components/page/Dashboard.vue +++ b/src/components/page/Dashboard.vue @@ -60,7 +60,7 @@

班级名称: - {{item.className}}日 + {{item.className}}

创建时间: diff --git a/src/components/page/classExperimentAss.vue b/src/components/page/classExperimentAss.vue index 1c63519..0b938d8 100644 --- a/src/components/page/classExperimentAss.vue +++ b/src/components/page/classExperimentAss.vue @@ -132,25 +132,30 @@ export default { let data = { id: this.id, classId: this.classId, - isRead: this.isRead == 1 ? '' : (this.isRead == 2 ? 0 : 1), //全部:'',已批阅:0,待批阅:1 + isRead: this.isRead == 1 ? '' : (this.isRead == 2 ? 1 : 0), //全部:'',已批阅:1,待批阅:0 searchContent: this.encodeString(this.keyword), } this.$get(this.api.getKdAchievement,data).then(res => { let list = res.data let score = 0 - let already = 0 - let not = 0 + if(this.isRead == '1'){ + let already = 0 + let not = 0 + list.map(n => { + n.class = this.className + if(!n.isRead){ + not++ + }else{ + already++ + } + }) + this.already = already + this.not = not + } + list.map(n => { - n.class = this.className score += n.score - if(!n.isRead){ - already++ - }else{ - not++ - } }) - this.already = already - this.not = not this.listDataAll = list this.handlePage()