|
|
@@ -3877,6 +3877,9 @@ export default { |
|
|
|
listOtherFiles: folderResInfo.workFile, |
|
|
|
listOtherFolderGroups: null, |
|
|
|
} |
|
|
|
// 协作文件 |
|
|
|
this.myCollaborationFilesList = folderResInfo.coordinationFiles; |
|
|
|
this.myCollFilesList = folderResInfo.coordinationFiles; |
|
|
|
|
|
|
|
if (this.currentPageType == 0) { |
|
|
|
// 加载我的文件 |
|
|
@@ -3897,7 +3900,7 @@ export default { |
|
|
|
this.listCollaborationFiles(); |
|
|
|
} else if (this.curactive == 1) { |
|
|
|
this.myPublicFilesList=[]; |
|
|
|
this.loadListCommonFiles(data, userId); |
|
|
|
this.loadListCommonFiles(); |
|
|
|
} |
|
|
|
} |
|
|
|
// debugger; |
|
|
@@ -3978,55 +3981,56 @@ export default { |
|
|
|
var thisApp = this; |
|
|
|
thisApp.nowFolderId = |
|
|
|
thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID |
|
|
|
this.$axios({ |
|
|
|
method: "get", |
|
|
|
url: encodeURI( |
|
|
|
process.env.API_HOST + |
|
|
|
"archives/collaboration/" + |
|
|
|
thisApp.nowFolderId + |
|
|
|
"/" + |
|
|
|
sessionStorage.userId |
|
|
|
), |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
response.data.data.forEach((arch) => { |
|
|
|
if (arch.createTime != null && arch.modifyTime != null) { |
|
|
|
if(!this.myCollaborationFilesList) return; |
|
|
|
if(!this.myCollaborationFilesList.length) return; |
|
|
|
this.myCollaborationFilesList.forEach((arch) => { |
|
|
|
if (arch.createTime != null && arch.modifyTime != null) { |
|
|
|
arch.createTime = arch.createTime.replace(/T/g, " "); |
|
|
|
arch.createTime = arch.createTime.replace(/\+/g, " "); |
|
|
|
arch.modifyTime = arch.modifyTime.replace(/T/g, " "); |
|
|
|
arch.modifyTime = arch.modifyTime.replace(/\+/g, " "); |
|
|
|
} |
|
|
|
arch.isShowFile = true; |
|
|
|
}); |
|
|
|
thisApp.myCollFilesList = []; |
|
|
|
if (response.data.data != null && response.data.data.length > 0) { |
|
|
|
thisApp.myCollFilesList = response.data.data; |
|
|
|
} |
|
|
|
if (thisApp.myCollFilesList.length > 0) { |
|
|
|
this.myCollaborationFilesList = this.myCollFilesList; |
|
|
|
} else { |
|
|
|
this.myCollaborationFilesList = []; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}) |
|
|
|
// this.$axios({ |
|
|
|
// method: "get", |
|
|
|
// url: encodeURI( |
|
|
|
// process.env.API_HOST + |
|
|
|
// "archives/collaboration/" + |
|
|
|
// thisApp.nowFolderId + |
|
|
|
// "/" + |
|
|
|
// sessionStorage.userId |
|
|
|
// ), |
|
|
|
// }) |
|
|
|
// .then((response) => { |
|
|
|
// response.data.data.forEach((arch) => { |
|
|
|
// if (arch.createTime != null && arch.modifyTime != null) { |
|
|
|
// arch.createTime = arch.createTime.replace(/T/g, " "); |
|
|
|
// arch.createTime = arch.createTime.replace(/\+/g, " "); |
|
|
|
// arch.modifyTime = arch.modifyTime.replace(/T/g, " "); |
|
|
|
// arch.modifyTime = arch.modifyTime.replace(/\+/g, " "); |
|
|
|
// } |
|
|
|
// arch.isShowFile = true; |
|
|
|
// }); |
|
|
|
// thisApp.myCollFilesList = []; |
|
|
|
// if (response.data.data != null && response.data.data.length > 0) { |
|
|
|
// thisApp.myCollFilesList = response.data.data; |
|
|
|
// } |
|
|
|
// if (thisApp.myCollFilesList.length > 0) { |
|
|
|
// this.myCollaborationFilesList = this.myCollFilesList; |
|
|
|
// } else { |
|
|
|
// this.myCollaborationFilesList = []; |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch((error) => { |
|
|
|
// console.log(error); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 获取公共文件 |
|
|
|
*/ |
|
|
|
async loadListCommonFiles(currentFolder,userId) { |
|
|
|
//this.myPublicFilesList=[]; |
|
|
|
this.myPublicFilesList.push(currentFolder.myFile); |
|
|
|
this.myPublicFilesList.push(currentFolder.workFile); |
|
|
|
if(currentFolder.folder.length==0){ |
|
|
|
return this.myPublicFilesList; |
|
|
|
} |
|
|
|
await Promise.all(currentFolder.folder.map(async (item) => { |
|
|
|
//耗时操作 |
|
|
|
const data=await services.fetchFolderFileList(currentFolder.id,userId); |
|
|
|
this.loadListCommonFiles(data,userId) |
|
|
|
})); |
|
|
|
async loadListCommonFiles() { |
|
|
|
|
|
|
|
// var thisApp = this; |
|
|
|
// //thisApp.myPublicFilesList = []; |
|
|
|
// this.$axios({ |
|
|
|