代码调整

This commit is contained in:
joylink_cuiweidong 2020-05-26 13:33:12 +08:00
parent 187024b5b7
commit 2336fe7fbe

View File

@ -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();