From 684bd9784c09a862e6f36f940ab198ba34f35c8d Mon Sep 17 00:00:00 2001 From: zxm Date: Sun, 21 Jun 2020 17:21:24 +0800 Subject: [PATCH] [VersionBeta] V.1.0.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Adds] 1.修改协作空间实时刷新,并且进入文件分组退出的回来的问题 --- src/views/main_web/workspace.vue | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index 3094871d..6ed02804 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -2272,7 +2272,8 @@ export default { strFoldergroupCopyOrMove: "", //右键菜单 文件分组 是复制还是移动标记 strFileOrFoldergroup: "", //右键菜单 移动/复制到其他工作 是文件还是文件分组标记 draggableData: {}, //记录要移动的数据 - timer:{},//计时器对象 + timer:{},//文件计时器对象 + timer1:{},//文件分组分组计时器 /**新建文件夹 end*/ }; }, @@ -2977,6 +2978,7 @@ export default { * 获取当前工作下文件 */ listFiles: function() { + console.log("zxm-文件") var thisApp = this; thisApp.isCommonPage = false; //thisApp.myFilesList = []; @@ -3010,7 +3012,7 @@ export default { // 加载我的文件夹 zxm+ thisApp.myListFolderGroups = thisApp.folderFileList.listFolderGroups; - thisApp.loadCommitedComFiles(); + thisApp.loadCommitedComFiles(); }) .catch(error => { console.log(error); @@ -4855,6 +4857,7 @@ export default { * 当前工作点击 */ nowFolderClick(index) { + console.log("zxm点击当前节点") this.isShowRightManager = false; this.nowFolderIndex = index; sessionStorage.nowFolderIndex = index; @@ -4863,7 +4866,9 @@ export default { this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑 this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件 this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑 - this.listFiles(); + clearInterval(this.timer)//zxm+ 切换节点清空一下文件定时器 避免加载数据乱跳 + clearInterval(this.timer1)//zxm+ 切换节点清空一下文件文件分组定时器 避免加载数据乱跳 + this.timer1 = setInterval(()=>{this.listFiles()}, 3 * 1000); // this.loadMyAppInstanceList();//zxm }, /** @@ -4879,7 +4884,9 @@ export default { this.folderGroupBreads = []; //zxm+ 点击工作链节点时 清空面包屑 this.isShowWorkt = true; //zxm+ 点击工作链节点时 显示我的文件和工作文件 this.isShowBread = false; //zxm+ 点击工作链节点时 隐藏面包屑 - this.listFiles(); + clearInterval(this.timer)//zxm+ 切换节点清空一下文件定时器 避免加载数据乱跳 + clearInterval(this.timer1)//zxm+ 切换节点清空一下文件文件分组定时器 避免加载数据乱跳 + this.timer1 = setInterval(()=>{this.listFiles()}, 3 * 1000); // this.loadMyAppInstanceList(); } else { this.$notify({ @@ -5566,6 +5573,7 @@ export default { * 双击文件夹组名称 进入文件夹 */ intoFoldergroup: function(foldergroup) { + console.log("zxm-文件分组 ") this.dbClickSelectedFolderGroupData = foldergroup; this.isShowWorkt = false; this.isShowBread = true; @@ -5598,7 +5606,10 @@ export default { this.myListFolderGroups = response.data.data.listOtherFolderGroups; //zxm+ 加载文件分组面包屑 this.folderGroupBreads = response.data.data.listBreadFolderGroups; - } + } + clearInterval(this.timer) + clearInterval(this.timer1) + this.timer1 = setInterval(()=>{this.intoFoldergroup(foldergroup)}, 3 * 1000); // // 加载我的文件 // this.myFilesList = response.data.data.listMyFiles; // //zxm+ 加载我的文件夹组 @@ -5615,12 +5626,14 @@ export default { */ breadNodeClickEvent: function(obj, isBreadFirstNode) { var thisApp = this; + clearInterval(thisApp.timer) + clearInterval(thisApp.timer1) thisApp.folderGroupBreads = []; if (isBreadFirstNode) { thisApp.isShowWorkt = true; thisApp.isShowBread = false; thisApp.dbClickSelectedFolderGroupData = {}; - thisApp.listFiles(); + thisApp.timer1 = setInterval(()=>{this.listFiles()}, 3 * 1000); } else { thisApp.intoFoldergroup(obj); } @@ -5948,11 +5961,12 @@ export default { }, outWorkSpace(data) { this.hideWorklinkPage(); - } + }, }, destroyed: function() { window.removeEventListener("scroll", this.onscroll); clearInterval(this.timer) + clearInterval(this.timer1) }, components: { Forgeview: forgeview,