|
|
@@ -1102,18 +1102,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
// 对协作文件的relativePath处理 生成文件夹 |
|
|
|
dealWithCoopFiles(fileList) { |
|
|
|
dealWithCoopFiles(fileList, nestCoordinationFileList) { |
|
|
|
const folderList = []; |
|
|
|
const folderMap = {}; |
|
|
|
|
|
|
|
fileList.forEach(file => { |
|
|
|
const relativePath = [file.nodeName, file.relativePath].filter(a => a).join('/'); |
|
|
|
file.relativePath = relativePath; |
|
|
|
// const nodeFolderName = file.nodeName; |
|
|
|
// const nodeFolderId = file.folderId; |
|
|
|
// const nodeFolder = new VirtualFolder(nodeFolderName, nodeFolderId); |
|
|
|
// folderList.push(nodeFolder); |
|
|
|
// folderMap[nodeFolderId] = nodeFolder; |
|
|
|
const resolvefile = (file) => { |
|
|
|
const relativePath = file.relativePath; |
|
|
|
const paths = relativePath.split('/'); |
|
|
|
paths.forEach((folderName, idx) => { |
|
|
|
const fullRelativePath = paths.slice(0, idx + 1).join('/'); |
|
|
@@ -1127,8 +1120,14 @@ export default { |
|
|
|
folderMap[parentRelativePath].childCount++; |
|
|
|
} |
|
|
|
}); |
|
|
|
folderMap[relativePath].fileCount++; |
|
|
|
// folderMap[relativePath].fileCount++; |
|
|
|
} |
|
|
|
fileList.forEach(file => { |
|
|
|
const relativePath = [file.nodeName, file.relativePath].filter(a => a).join('/'); |
|
|
|
file.relativePath = relativePath; |
|
|
|
resolvefile(file); |
|
|
|
}); |
|
|
|
nestCoordinationFileList.forEach(resolvefile); |
|
|
|
return folderList; |
|
|
|
}, |
|
|
|
// 接收到了一个文件的右键菜单点击事件 |
|
|
@@ -1467,9 +1466,9 @@ export default { |
|
|
|
// this.workSubFolderList = uniqBy(this.workSubFolderList.concat(folderResInfo.folder), folder => folder.id); |
|
|
|
// resolve dupilicate folders |
|
|
|
this.tempWorkSubFolderList = this.tempWorkSubFolderList.filter(tempFolder => !folderResInfo.folder.some(folder => folder.id === tempFolder.id)); |
|
|
|
this.cooperationFileList = folderResInfo.coordinationFiles; |
|
|
|
this.cooperationFileList = folderResInfo.coordinationFiles.concat(folderResInfo.nestCoordinationFiles); |
|
|
|
|
|
|
|
this.coopSubFolderList = this.dealWithCoopFiles(this.cooperationFileList); |
|
|
|
this.coopSubFolderList = this.dealWithCoopFiles(folderResInfo.coordinationFiles, folderResInfo.nestCoordinationFiles); |
|
|
|
// this.exchangeNodeListsInCoop = |
|
|
|
// this.isShowStartNodeFolders && this.getExchangeNodesChild(); |
|
|
|
this.resolveUploadFileList(this.cooperationFileList); |
|
|
|