From 7805ca191c114beed26246b19bf42a8ef4771e6a Mon Sep 17 00:00:00 2001 From: xzx Date: Fri, 10 Jul 2020 10:12:42 +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 | 42 +++++++++----------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index 60829a6d..3d404e08 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -2993,23 +2993,6 @@ export default { }); } }, - /** - * 获取协作文件 - */ - listCollaborationFiles: function() { - var thisApp = this; - thisApp.nowFolderId = - thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID - this.$axios({ - method: "put", - url: encodeURI(process.env.API_HOST + "projects/projuser"), - data: projUserData - }) - .then(response => {}) - .catch(error => { - console.log(error); - }); - }, /** * 获取当前工作下文件 */ @@ -3059,6 +3042,10 @@ export default { console.log(error); }); } else { + if(this.fileindex == 2) + { + this.fileindex = 0; + } this.$axios({ method: "get", url: encodeURI( @@ -3121,23 +3108,16 @@ export default { arch.modifyTime = arch.modifyTime.replace(/T/g, " "); arch.modifyTime = arch.modifyTime.replace(/\+/g, " "); } + arch.isShowFile = true; }); thisApp.myCollFilesList = []; - thisApp.myCollFilesList = response.data.data; - for (var i = 0; i < thisApp.myCollFilesList.length; i++) { - thisApp.myCollFilesList[i].isShowFile = true; - } - if ( - thisApp.myCollFilesList == null || - thisApp.myCollFilesList.length == 0 - ) { - thisApp.myCollaborationFilesList = []; - } else { - thisApp.scrollIndex = 7; - // 非滚动模式,直接设置数据 - // thisApp.myCollaborationFilesList =thisApp.myCollFilesList ; - thisApp.scrollLoad(); + if(response.data.data!=null && response.data.data.length > 0){ + thisApp.myCollFilesList = response.data.data; } + if (thisApp.myCollFilesList.length > 0) { + thisApp.scrollIndex = 7; + thisApp.scrollLoad(); + } }) .catch(error => { console.log(error);