From 2336fe7fbe335d9c6177ee1ad00da6eb80dc53de Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 26 May 2020 13:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/jsxt/refereeList/index.vue | 43 +++++++++++++++------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/src/views/jsxt/refereeList/index.vue b/src/views/jsxt/refereeList/index.vue index d7fd57e4a..9dc8ef9ef 100644 --- a/src/views/jsxt/refereeList/index.vue +++ b/src/views/jsxt/refereeList/index.vue @@ -35,7 +35,6 @@ export default { } }, queryList: { - data:[], paginationHiden:true, query: this.queryFunction, selectCheckShow: false, @@ -126,6 +125,7 @@ export default { created() { }, mounted() { + this.getData(); }, beforeDestroy() { this.isLeaving = true; @@ -135,16 +135,19 @@ export default { const statusDict = {'0':'尚未参赛', '1':'进入赛场', '2':'理论赛场', '3':'实操赛场', '4':'完成比赛', '5':'完成理论', '6':'完成实操'}; return statusDict[status]; }, - // getData() { - // refereeGetCompetitionList(1).then(response=>{ - // this.tableData = response.data; - // setTimeout(() => { - // if (!this.isLeaving) { - // this.getData(); - // } - // }, 2000); - // }); - // }, + getData() { + const params = {raceId:this.$route.query.raceId, pageSize:999, pageNum:1}; + getRaceUserList(params).then(response=>{ + this.queryList.data = response.data.list; + this.refresh(); + clearTimeout(this.inter); + this.inter = setTimeout(() => { + if (!this.isLeaving) { + this.getData(); + } + }, 2000); + }); + }, handleAdd() { loadingPaper(this.$route.query.raceId, {}).then((response)=>{ this.$message('试题加载成功'); @@ -172,16 +175,16 @@ export default { gradeScore(index, row) { }, - afterQuery(data) { - clearTimeout(this.inter); - this.inter = setTimeout(() => { - if (!this.isLeaving) { - this.refresh(); - } - }, 3000); - }, + // afterQuery(data) { + // clearTimeout(this.inter); + // this.inter = setTimeout(() => { + // if (!this.isLeaving) { + // this.refresh(); + // } + // }, 3000); + // }, refresh() { - this.$refs.queryListPage.refresh(true); + this.$refs.queryListPage.refresh(false); } // loadQuestions() { // this.$refs.questionList.doShow();