From e275f445241ed58e9c5a89d5840209ba8b7ac0a5 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 25 May 2021 17:02:03 +0800 Subject: [PATCH] fix --- .../common/Studentcommon/FictitiousList.vue | 5 ++++- src/components/common/Studentcommon/TeachingList.vue | 4 +++- .../common/Studentcommon/competitionList.vue | 4 +++- src/components/page/Assessment.vue | 3 +++ src/components/page/Dashboard.vue | 4 ++-- src/components/page/Project.vue | 4 +++- src/components/page/ProjectIntro.vue | 2 +- src/components/page/ProjectPattern.vue | 11 ++++++----- src/store/index.js | 4 ++++ 9 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/components/common/Studentcommon/FictitiousList.vue b/src/components/common/Studentcommon/FictitiousList.vue index 635c58a..21a7d80 100644 --- a/src/components/common/Studentcommon/FictitiousList.vue +++ b/src/components/common/Studentcommon/FictitiousList.vue @@ -33,6 +33,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -41,6 +42,7 @@ export default { }; }, created() { + console.log(11,this.$route) this.getData(); }, methods: { @@ -61,7 +63,8 @@ export default { page: this.pageNo, size: this.pageSize, source: 0, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/common/Studentcommon/TeachingList.vue b/src/components/common/Studentcommon/TeachingList.vue index f6c5b42..bd21723 100644 --- a/src/components/common/Studentcommon/TeachingList.vue +++ b/src/components/common/Studentcommon/TeachingList.vue @@ -45,6 +45,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -91,7 +92,8 @@ export default { size: this.pageSize, searchContent: this.core.encodeString(this.searchContent), source: 2, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/common/Studentcommon/competitionList.vue b/src/components/common/Studentcommon/competitionList.vue index c76964d..281fc8f 100644 --- a/src/components/common/Studentcommon/competitionList.vue +++ b/src/components/common/Studentcommon/competitionList.vue @@ -35,6 +35,7 @@ export default { data() { return { + pattern: Number(this.$store.state.pattern), totals: 0, tableData: [], userId: this.$store.state.userId, @@ -63,7 +64,8 @@ export default { page: this.pageNo, size: this.pageSize, source: 1, - systemId: 3 + systemId: 3, + pattern: this.pattern }) .then(res => { let data = res.data diff --git a/src/components/page/Assessment.vue b/src/components/page/Assessment.vue index b535cc6..68317ad 100644 --- a/src/components/page/Assessment.vue +++ b/src/components/page/Assessment.vue @@ -98,6 +98,7 @@ export default { name: 'project', data() { return { + pattern: Number(this.$store.state.pattern), userId: this.$store.state.userId, roleId: this.$store.state.accountRole, name: sessionStorage.getItem('ms_username'), @@ -145,6 +146,7 @@ export default { } }, mounted() { + console.log(22,this.pattern) this.getClass() this.getData() this.timer = setInterval(this.getData,1000) @@ -165,6 +167,7 @@ export default { status: this.form.status, pageNum: 1, pageSize: 10000, + pattern: this.pattern } this.$post(this.api.stuAssessmentByScreen,data).then(res => { let list = res.list.list diff --git a/src/components/page/Dashboard.vue b/src/components/page/Dashboard.vue index 4184b5b..3e0369e 100644 --- a/src/components/page/Dashboard.vue +++ b/src/components/page/Dashboard.vue @@ -151,7 +151,7 @@ export default { } }, mounted() { - this.getClass() + // this.getClass() this.addDefault() this.$once('hook:beforeDestroy', function () { clearInterval(this.timer) @@ -200,7 +200,7 @@ export default { if(hash == this.routeName){ location.hash = `${hash}#0` }else{ - let index = hash.replace(`${this.routeName}#`,'') + let index = hash.replace(`${this.routeName}#`,'').replace(/\?pattern=\d/,'') this.activeName = this.tabNameList[index] if(index == 3 && !isIndex){ diff --git a/src/components/page/Project.vue b/src/components/page/Project.vue index 61e69ed..64351a1 100644 --- a/src/components/page/Project.vue +++ b/src/components/page/Project.vue @@ -106,6 +106,7 @@ export default { name: 'project', data() { return { + pattern: Number(this.$store.state.pattern), userId: this.$store.state.userId, schoolId: this.$store.state.schoolId, name: sessionStorage.getItem('ms_username'), @@ -210,7 +211,8 @@ export default { page: this.pageNo, size: this.pageSize, rowId: '', - projectId: '' + projectId: '', + pattern: this.pattern } this.$get(this.api.userRecord,data).then(res => { diff --git a/src/components/page/ProjectIntro.vue b/src/components/page/ProjectIntro.vue index 2715258..7d49a6a 100644 --- a/src/components/page/ProjectIntro.vue +++ b/src/components/page/ProjectIntro.vue @@ -46,7 +46,7 @@ export default { this.$router.push('dashboard#1') }, toNext(index) { - this.$router.push(`ProjectPattern?type=${index}`) + this.$router.push(`ProjectPattern?pattern=${index}`) }, }, }; diff --git a/src/components/page/ProjectPattern.vue b/src/components/page/ProjectPattern.vue index 4cf4a74..fa2cea0 100644 --- a/src/components/page/ProjectPattern.vue +++ b/src/components/page/ProjectPattern.vue @@ -2,25 +2,25 @@