diff --git a/src/pages/ass/list/index.vue b/src/pages/ass/list/index.vue index b18e2e3..e21895a 100644 --- a/src/pages/ass/list/index.vue +++ b/src/pages/ass/list/index.vue @@ -202,6 +202,8 @@ export default { assessmentId:'', classId:'', stopTime:'', + sss:1, + datassdata:0, }; }, computed: { @@ -238,6 +240,7 @@ export default { mounted() { // 页面离开的时候销毁手机和邮箱验证码定时器 this.$once("hook:beforeDestroy", function() { + this.sss = 0 clearInterval(this.ticker); this.ticker = null; }); @@ -255,7 +258,6 @@ export default { } else { if (countDown.status == 1){ this.$post(`${this.api.collectPaper}?id=${countDown.assessmentId}`).then(res => { - }) }else{ @@ -264,6 +266,11 @@ export default { } }, beginTimer() { + this.ticker = setInterval(() => { + if(this.sss == 0){ + this.ticker = null; + clearInterval(this.ticker); + }else{ for (let i = 0; i < this.listData.length; i++) { const ticker = setInterval(() => { const item = this.listData[i]; @@ -283,7 +290,8 @@ export default { this.tickerArr.push(ticker) } - + } + }, 1000); // this.ticker = setInterval(() => { // for (let i = 0; i < this.listData.length; i++) { // const item = this.listData[i]; @@ -304,6 +312,7 @@ export default { }, getData() { this.listLoading = true; + this.sss = 0 this.listData.splice(0); if (this.ticker) { clearInterval(this.ticker); @@ -340,13 +349,17 @@ export default { } } }); - this.beginTimer(); + this.sss = 1; + if(this.datassdata == 1){ + this.beginTimer() + } this.listLoading = false; }).catch(err => { this.listLoading = false; }); }, initData() { + this.sss = 0 this.page = 1; this.getData(); }, @@ -364,6 +377,7 @@ export default { }, handleCurrentChange(val) { // 切换页码 this.page = val; + this.sss = 0 this.getData(); }, entry(row) { // 进入考核 diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index eb56ba5..c3a841d 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -314,7 +314,7 @@ export default { // href = `${host}bank/#/`; let token = util.local.get(Setting.tokenKey); href = "http://39.108.250.202/banksystem/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime="; - // href = "http://http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime="; + // href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+this.courseId+'&systemId='+this.assessmentList[0].systemId+"&projectId=&assessmentId=&classId=&stopTime="; } else if (id == 21) { window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`); } else if (id == 22) {