From 7ae8cc955fe6f41fb2e140a4d4492b52150da200 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 18 May 2021 14:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=80=80=E5=87=BA=EF=BC=8C?= =?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/Achievement.vue | 2 ++ src/components/page/ExperimentAss.vue | 34 +++++++++++++------------ src/components/page/ExperimentTeach.vue | 14 ++++++++++ src/components/page/Login.vue | 3 ++- src/config/index.js | 4 +++ src/main.js | 3 ++- src/store/index.js | 4 +++ src/utils/api.js | 1 + src/utils/core.js | 28 +++++++++++++++++++- src/utils/http.js | 29 ++++++++++++--------- 10 files changed, 91 insertions(+), 31 deletions(-) diff --git a/src/components/page/Achievement.vue b/src/components/page/Achievement.vue index 84ddaa7..3701743 100644 --- a/src/components/page/Achievement.vue +++ b/src/components/page/Achievement.vue @@ -123,6 +123,7 @@ export default { data() { return { userId: this.$store.state.userLoginId, + roleId: this.$store.state.userRoleId.includes(',') ? 13 : Number(this.$store.state.userRoleId), keyword: '', systemId: this.$config.systemId, projectPermissions: 0, @@ -213,6 +214,7 @@ export default { type: '', status: '', classId: '', + role: this.roleId } this.$post(this.api.getAssessmentList,data).then(res => { this.listData = res.data.list diff --git a/src/components/page/ExperimentAss.vue b/src/components/page/ExperimentAss.vue index 93aa294..0227d6a 100644 --- a/src/components/page/ExperimentAss.vue +++ b/src/components/page/ExperimentAss.vue @@ -114,10 +114,10 @@ export default { not: 0, reviewList: [ { - id: 0, + id: 1, name: '已批阅' },{ - id: 1, + id: 0, name: '待批阅' } ] @@ -132,25 +132,27 @@ 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 - list.map(n => { - n.class = this.className - score += n.score - if(!n.isRead){ - already++ - }else{ - not++ - } - }) - this.already = already - this.not = not + if(this.isRead == '1'){ + let already = 0 + let not = 0 + list.map(n => { + n.class = this.className + score += n.score + if(!n.isRead){ + not++ + }else{ + already++ + } + }) + this.already = already + this.not = not + } this.listDataAll = list this.handlePage() diff --git a/src/components/page/ExperimentTeach.vue b/src/components/page/ExperimentTeach.vue index 5b61e84..2721611 100644 --- a/src/components/page/ExperimentTeach.vue +++ b/src/components/page/ExperimentTeach.vue @@ -67,6 +67,11 @@ + + +