From 7e9d0247c2f453b5ed90778c05379e88e217a406 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 2 Jun 2021 10:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E7=BB=A9=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/Dashboard.vue | 2 +- src/components/page/classExperimentAss.vue | 27 +++++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) 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()