|
@@ -486,6 +486,7 @@ |
|
|
<file-milestone v-if="checkMilestoneShow" |
|
|
<file-milestone v-if="checkMilestoneShow" |
|
|
:fileMilestoneInfo="fileMilestoneInfo" |
|
|
:fileMilestoneInfo="fileMilestoneInfo" |
|
|
@closeMilestonePain="closeMilestonePain" |
|
|
@closeMilestonePain="closeMilestonePain" |
|
|
|
|
|
@makeCopy="copyWorkFileBtnClick" |
|
|
:fileHistoryList ="fileHistoryList" |
|
|
:fileHistoryList ="fileHistoryList" |
|
|
:file = "currentFile" |
|
|
:file = "currentFile" |
|
|
> |
|
|
> |
|
@@ -1970,12 +1971,12 @@ export default { |
|
|
|
|
|
|
|
|
if(isCooperationFile) { system.clientOpenFileWith(filePath); return; } |
|
|
if(isCooperationFile) { system.clientOpenFileWith(filePath); return; } |
|
|
// 将文件状态设置为编辑中 |
|
|
// 将文件状态设置为编辑中 |
|
|
const flagRes = await services.changeFileWorkStatus(fileId, 2); |
|
|
|
|
|
if(flagRes.Code !== 0) return; |
|
|
|
|
|
file.workStatus = 2; |
|
|
|
|
|
file.modifyUserId = sessionStorage.userId; |
|
|
|
|
|
|
|
|
// const flagRes = await services.changeFileWorkStatus(fileId, 2); |
|
|
|
|
|
// if(flagRes.Code !== 0) return; |
|
|
|
|
|
// file.workStatus = 2; |
|
|
|
|
|
// file.modifyUserId = sessionStorage.userId; |
|
|
system.clientOpenFileWith(filePath); |
|
|
system.clientOpenFileWith(filePath); |
|
|
this.fetchFolderFiles(); |
|
|
|
|
|
|
|
|
// this.fetchFolderFiles(); |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 点击文件事件:直接打开文件 |
|
|
* 点击文件事件:直接打开文件 |
|
@@ -2101,16 +2102,20 @@ export default { |
|
|
/** |
|
|
/** |
|
|
* 点击了复制文件副本的按钮 |
|
|
* 点击了复制文件副本的按钮 |
|
|
*/ |
|
|
*/ |
|
|
async copyWorkFileBtnClick(targetFile) { |
|
|
|
|
|
const copyFile = {...targetFile}; |
|
|
|
|
|
|
|
|
async copyWorkFileBtnClick(targetFile, version) { |
|
|
|
|
|
// console.log(targetFile, version); |
|
|
|
|
|
const copyFile = cloneDeep(targetFile); |
|
|
let nowNum = 1, tempName = ""; |
|
|
let nowNum = 1, tempName = ""; |
|
|
|
|
|
if(version) { |
|
|
|
|
|
copyFile.archName = `${copyFile.archName}-版本${version}`; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//先添加 - 副本字样 再判断是否重复 如果重复就修改版本信息 |
|
|
//先添加 - 副本字样 再判断是否重复 如果重复就修改版本信息 |
|
|
tempName = targetFile.archName + '-副本'; |
|
|
|
|
|
|
|
|
tempName = copyFile.archName + '-副本'; |
|
|
let isExists = this.workFileList.find(file => file.archName === tempName); |
|
|
let isExists = this.workFileList.find(file => file.archName === tempName); |
|
|
while(isExists) { |
|
|
while(isExists) { |
|
|
// - 副本存在 -》修改为 -副本(x) 的字样 |
|
|
// - 副本存在 -》修改为 -副本(x) 的字样 |
|
|
tempName = targetFile.archName + `-副本(${ ++ nowNum})`; |
|
|
|
|
|
|
|
|
tempName = copyFile.archName + `-副本(${ ++ nowNum})`; |
|
|
isExists = this.workFileList.find(file => file.archName === tempName); |
|
|
isExists = this.workFileList.find(file => file.archName === tempName); |
|
|
} |
|
|
} |
|
|
let hour = '0' + new Date().getHours(); |
|
|
let hour = '0' + new Date().getHours(); |
|
@@ -2125,9 +2130,8 @@ export default { |
|
|
copyFile.modifyTime = new Date(); |
|
|
copyFile.modifyTime = new Date(); |
|
|
copyFile.createUserId = sessionStorage.userId; |
|
|
copyFile.createUserId = sessionStorage.userId; |
|
|
copyFile.createTime = new Date(); |
|
|
copyFile.createTime = new Date(); |
|
|
// console.log(copyFile); |
|
|
|
|
|
|
|
|
|
|
|
const addFileRes = await services.addFile(copyFile); |
|
|
|
|
|
|
|
|
copyFile.historyCurrentIpfsCid = ''; |
|
|
|
|
|
await services.addFile(copyFile); |
|
|
this.fetchFolderFiles(); |
|
|
this.fetchFolderFiles(); |
|
|
}, |
|
|
}, |
|
|
deleteFileClick(fileId, createUserId, archName, ipfscid) { |
|
|
deleteFileClick(fileId, createUserId, archName, ipfscid) { |
|
@@ -2168,7 +2172,7 @@ export default { |
|
|
this.checkMilestoneShow = true; |
|
|
this.checkMilestoneShow = true; |
|
|
const localWorkspacePrefix = this.localWorkspacePrefix; |
|
|
const localWorkspacePrefix = this.localWorkspacePrefix; |
|
|
const fileStoreKey = getFileStoreKey(file, this.currentNodeFolder); |
|
|
const fileStoreKey = getFileStoreKey(file, this.currentNodeFolder); |
|
|
if(!this.localFileHashMap[fileStoreKey]) return; |
|
|
|
|
|
|
|
|
if(!this.localFileHashMap[fileStoreKey]) return; |
|
|
const filePath = `${localWorkspacePrefix}\\${fileStoreKey}`; |
|
|
const filePath = `${localWorkspacePrefix}\\${fileStoreKey}`; |
|
|
this.fileMilestoneInfo.path = filePath; |
|
|
this.fileMilestoneInfo.path = filePath; |
|
|
const res = await services.queryProjArchiveHistory(file.id); |
|
|
const res = await services.queryProjArchiveHistory(file.id); |
|
|