Browse Source

调整我的项目界面的定时查询逻辑,毕竟请求重叠

master
unknown 4 years ago
parent
commit
71bdd562ed
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/views/main_web/index/index.vue

+ 8
- 2
src/views/main_web/index/index.vue View File

@@ -251,7 +251,7 @@ export default {
projPageList: [], // 分页项目数据
isEmpty: false,
createUserId:'',
isProjectManager:0,
isProjectManager: false,
newProjData: {
projectData: {
projID: "",
@@ -305,6 +305,7 @@ export default {
isShowProjSetting: false,
isEditProjFolder: false,
fetchTickIns: null,
};
},
mounted: function () {
@@ -312,10 +313,14 @@ export default {
//this.setDateTime();
//setInterval(this.setDateTime, 1000);
this.listProjects();
setInterval(this.listProjects, 1000 * 60);
// setInterval(this.listProjects, 1000 * 60);
},
beforeDestroy() {
sessionStorage.dotIndex = this.ind;
if(this.fetchTickIns) {
clearTimeout(this.fetchTickIns);
this.fetchTickIns = null;
}
},
methods: {
/**
@@ -418,6 +423,7 @@ export default {
const projectListRes = await prjService.queryProjectsByUserId(this.$store.state.accountId);
this.projList=projectListRes.Data;
this.projectsWithPage();
this.fetchTickIns = setTimeout(() => this.listProjects(), 1000 * 60);
},
/**
* 设置分页项目数据


Loading…
Cancel
Save