|
|
@@ -3803,8 +3803,6 @@ export default { |
|
|
|
const data = await services.fetchFolderFileList(currentFolder.id, userId, commonFolderId); |
|
|
|
if(!data) return; |
|
|
|
const folderResInfo = data; |
|
|
|
console.log(111) |
|
|
|
console.log(data); |
|
|
|
const folderFileList = this.folderFileList = { |
|
|
|
listAllFiles:null, |
|
|
|
listBreadFolderGroups: null, |
|
|
@@ -3818,6 +3816,19 @@ export default { |
|
|
|
// 协作文件 |
|
|
|
this.myCollaborationFilesList = folderResInfo.coordinationFiles; |
|
|
|
this.myCollFilesList = folderResInfo.coordinationFiles; |
|
|
|
|
|
|
|
// 协作文件处理 |
|
|
|
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; |
|
|
|
}) |
|
|
|
// 公共文件 |
|
|
|
this.myPublicFilesList = folderResInfo.public.length > 0 ? folderResInfo.public : this.myPublicFilesList; |
|
|
|
|
|
|
|
if (this.currentPageType == 0) { |
|
|
|
// 加载我的文件 |
|
|
@@ -3833,14 +3844,15 @@ export default { |
|
|
|
|
|
|
|
if(isCommonFolder) { |
|
|
|
this.loadCommitedComFiles(); |
|
|
|
} else { |
|
|
|
if (this.curactive == 0) { |
|
|
|
this.listCollaborationFiles(); |
|
|
|
} else if (this.curactive == 1) { |
|
|
|
this.myPublicFilesList=[]; |
|
|
|
this.loadListCommonFiles(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// else { |
|
|
|
// if (this.curactive == 0) { |
|
|
|
// this.listCollaborationFiles(); |
|
|
|
// } else if (this.curactive == 1) { |
|
|
|
// this.myPublicFilesList=[]; |
|
|
|
// this.loadListCommonFiles(); |
|
|
|
// } |
|
|
|
// } |
|
|
|
this.refreshFileStatus(); |
|
|
|
// debugger; |
|
|
|
// if (currentFolder.folderName == "公共文件夹") { |
|
|
@@ -3917,20 +3929,20 @@ export default { |
|
|
|
* 获取协作文件 |
|
|
|
*/ |
|
|
|
listCollaborationFiles: function () { |
|
|
|
var thisApp = this; |
|
|
|
thisApp.nowFolderId = |
|
|
|
thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID |
|
|
|
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; |
|
|
|
}) |
|
|
|
// var thisApp = this; |
|
|
|
// thisApp.nowFolderId = |
|
|
|
// thisApp.listUserFolders[thisApp.nowFolderIndex].folderID; // 设置当前打开工作文件夹ID |
|
|
|
// 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; |
|
|
|
// }) |
|
|
|
// this.$axios({ |
|
|
|
// method: "get", |
|
|
|
// url: encodeURI( |
|
|
@@ -3969,7 +3981,13 @@ export default { |
|
|
|
* 获取公共文件 |
|
|
|
*/ |
|
|
|
async loadListCommonFiles() { |
|
|
|
|
|
|
|
// const currentFolderIdx = this.nowFolderIndex; |
|
|
|
// const currentFolder = this.listUserFolders[currentFolderIdx]; |
|
|
|
// const commonFolder = this.listUserFolders.find(f => f.folderName === '公共文件夹'); |
|
|
|
// const commonFolderId = commonFolder && commonFolder.id; |
|
|
|
// const userId = this.userId; |
|
|
|
// const res = await services.fetchFolderFileList(currentFolder.id, userId, commonFolderId); |
|
|
|
// this.myPublicFilesList = res.public && res.public.length > 0 ? res.public : this.myPublicFilesList; |
|
|
|
// var thisApp = this; |
|
|
|
// //thisApp.myPublicFilesList = []; |
|
|
|
// this.$axios({ |
|
|
@@ -4156,11 +4174,11 @@ export default { |
|
|
|
/** |
|
|
|
* 获取历史文件过滤 |
|
|
|
*/ |
|
|
|
getMilstoneFile(archName){ |
|
|
|
getMilstoneFile(file){ |
|
|
|
var files=this.folderFileList.listMyFiles.concat([]); |
|
|
|
files.push(...this.folderFileList.listOtherFiles); |
|
|
|
return files.filter(file=>{ |
|
|
|
return(file.archName===archName && file.milestone===2) |
|
|
|
return files.filter(item=>{ |
|
|
|
return item.archName==file.archName&&item.id!=file.id; |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
@@ -5282,7 +5300,8 @@ export default { |
|
|
|
} |
|
|
|
this.currentMilestone=file; |
|
|
|
this.dialogFileHistory = true; |
|
|
|
this.listMilestones=this.getMilstoneFile(file.archName); |
|
|
|
//返回与该文件同名的所有文件并把自己过滤掉 |
|
|
|
this.listMilestones=this.getMilstoneFile(file); |
|
|
|
this.currentArchID = file.archID; |
|
|
|
}, |
|
|
|
/** |
|
|
@@ -5454,49 +5473,52 @@ export default { |
|
|
|
/** |
|
|
|
* 设置历史文件 |
|
|
|
*/ |
|
|
|
setMilestones: function () { |
|
|
|
if (this.currentMileArchID == this.currentMilestone.id) { |
|
|
|
this.dialogFileHistory = false; |
|
|
|
return; |
|
|
|
} |
|
|
|
var thisApp = this; |
|
|
|
this.$axios({ |
|
|
|
method: "get", |
|
|
|
url: encodeURI( |
|
|
|
process.env.API_HOST + |
|
|
|
"archives/milestone/set/" + |
|
|
|
this.currentArchID + |
|
|
|
"/" + |
|
|
|
this.currentMileArchID + |
|
|
|
"/" + |
|
|
|
sessionStorage.userId |
|
|
|
), |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
if (response.data.state == 1) { |
|
|
|
this.$notify({ |
|
|
|
title: "恭喜您", |
|
|
|
message: response.data.message, |
|
|
|
type: "success", |
|
|
|
offset: 100, |
|
|
|
duration: 5000, |
|
|
|
}); |
|
|
|
thisApp.dialogFileHistory = false; |
|
|
|
thisApp.refreshPages(); |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: "温馨提示", |
|
|
|
message: response.data.message, |
|
|
|
type: "error", |
|
|
|
offset: 100, |
|
|
|
duration: 5000, |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
setMilestones(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// setMilestones: function () { |
|
|
|
// if (this.currentMileArchID == this.currentMilestone.id) { |
|
|
|
// this.dialogFileHistory = false; |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// var thisApp = this; |
|
|
|
// this.$axios({ |
|
|
|
// method: "get", |
|
|
|
// url: encodeURI( |
|
|
|
// process.env.API_HOST + |
|
|
|
// "archives/milestone/set/" + |
|
|
|
// this.currentArchID + |
|
|
|
// "/" + |
|
|
|
// this.currentMileArchID + |
|
|
|
// "/" + |
|
|
|
// sessionStorage.userId |
|
|
|
// ), |
|
|
|
// }) |
|
|
|
// .then((response) => { |
|
|
|
// if (response.data.state == 1) { |
|
|
|
// this.$notify({ |
|
|
|
// title: "恭喜您", |
|
|
|
// message: response.data.message, |
|
|
|
// type: "success", |
|
|
|
// offset: 100, |
|
|
|
// duration: 5000, |
|
|
|
// }); |
|
|
|
// thisApp.dialogFileHistory = false; |
|
|
|
// thisApp.refreshPages(); |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: "温馨提示", |
|
|
|
// message: response.data.message, |
|
|
|
// type: "error", |
|
|
|
// offset: 100, |
|
|
|
// duration: 5000, |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch((error) => { |
|
|
|
// console.log(error); |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
/** |
|
|
|
* 右键复制文件 |
|
|
|
*/ |
|
|
|