diff --git a/src/pages/achievement/ass/index.vue b/src/pages/achievement/ass/index.vue index c8821c7..e6f9822 100644 --- a/src/pages/achievement/ass/index.vue +++ b/src/pages/achievement/ass/index.vue @@ -104,18 +104,26 @@ export default { token: util.local.get(Setting.tokenKey), }; }, - mounted() { + created() { + this.getData(); this.classInfo = JSON.parse(this.$route.query.classInfo) for(var i=0;i item.id === activeName2)) { + this.classId = activeName2 + this.activeName = activeName2 + }else { + this.classId = this.classInfo[0].id; + this.activeName = this.classInfo[0].id; + } this.id = this.$route.query.id - this.getData(); }, methods: { handleClick(tab, event) { + sessionStorage.setItem('activeName2', tab.name) this.getData() }, getData() { @@ -144,6 +152,8 @@ export default { } }, show(row) { + // console.log(row) + if (this.systemId == 2) { this.$router.push(`showexperimentOption?id=${row.reportId}&stuId=${row.userId}&studentName=${row.studentName}&class=${row.class}`); } else if (this.systemId == 3) { diff --git a/src/pages/achievement/teach/index.vue b/src/pages/achievement/teach/index.vue index 191e0c8..b78f8d1 100644 --- a/src/pages/achievement/teach/index.vue +++ b/src/pages/achievement/teach/index.vue @@ -115,7 +115,7 @@ export default { created() { this.classList = JSON.parse(this.$route.query.classList); const activeName = sessionStorage.getItem('activeName') - if(activeName) { + if(activeName && this.classList.some(item => item.id === activeName)) { this.classId = activeName this.activeName = activeName }else { diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue index b923822..5e20733 100644 --- a/src/pages/assessment/list/index.vue +++ b/src/pages/assessment/list/index.vue @@ -236,8 +236,9 @@ export default { beginTimer() { this.ticker = setInterval(() => { if(this.sss == 0){ - this.ticker = null; + clearInterval(this.ticker); + this.ticker = null; }else{ for (let i = 0; i < this.listData.length; i++) { const item = this.listData[i]; diff --git a/src/pages/match/manage/index.vue b/src/pages/match/manage/index.vue index 882eaa4..2449f46 100644 --- a/src/pages/match/manage/index.vue +++ b/src/pages/match/manage/index.vue @@ -50,8 +50,8 @@ export default { }); }, beforeDestroy() { - // 关闭所以EventBus事件 - EventBus.$off() + // 关闭所有EventBus事件 + EventBus.$off() }, methods: { goBack() { diff --git a/src/router/index.js b/src/router/index.js index a8129e7..f0c8967 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -268,7 +268,7 @@ router.beforeEach(function(to, from, next) { } // 根据路由元信息设置文档标题 // window.document.title = to.meta.title ? to.meta.title : ""; - window.document.title = "职站教师端" + window.document.title = "教师管理端" next(); }); \ No newline at end of file