diff --git a/src/views/main_web/project/components/plain-folder-list.vue b/src/views/main_web/project/components/plain-folder-list.vue index 0c3343e2..e1b31d2b 100644 --- a/src/views/main_web/project/components/plain-folder-list.vue +++ b/src/views/main_web/project/components/plain-folder-list.vue @@ -197,7 +197,7 @@ export default { methods: { //判断是否存在可嵌套节点 canNest(folder) { - console.log(folder); + // console.log(folder); return true; // let len = this.nestNodeList.length; // for (let i = 0; i < len; i++) { diff --git a/src/views/main_web/workspace/components/file-explorer/index.vue b/src/views/main_web/workspace/components/file-explorer/index.vue index c4412c6b..95fb64d5 100644 --- a/src/views/main_web/workspace/components/file-explorer/index.vue +++ b/src/views/main_web/workspace/components/file-explorer/index.vue @@ -1922,12 +1922,12 @@ export default { 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); - // this.fetchFolderFiles(); + this.fetchFolderFiles(); }, /** * 点击文件事件:直接打开文件 @@ -1935,38 +1935,37 @@ export default { fileClick: async function (file) { //debugger; if(!this.isClient) return; - // const { archName, extension, id: fileId, nodeName } = file; + const { archName, extension, id: fileId, nodeName } = file; // const folderName = nodeName || this.currentFolder.folderName; const localWorkspacePrefix = this.localWorkspacePrefix; - // const isCooperationFile = !!nodeName; + const isCooperationFile = !!nodeName; // const fileStoreKey = `${folderName}${isCooperationFile ? '\\协作文件': ''}\\${archName}${extension ? `.${extension}` : ''}`; const fileStoreKey = getFileStoreKey(file, this.currentNodeFolder); if(!this.localFileHashMap[fileStoreKey]) return; const filePath = `${localWorkspacePrefix}\\${fileStoreKey}`; - // if(!isCooperationFile && (file.workStatus === 2 && sessionStorage.userId !== file.modifyUserId)) { + if(!isCooperationFile && (file.workStatus === 2 && sessionStorage.userId !== file.modifyUserId)) { // console.log("1111") - // this.$notify({ - // type:["warning"], - // title:"暂不能打开此文件", - // message:`${file.modifyName}正在编辑此文件,请在“工作中”标识消失后再尝试打开。` - // }) - // return; - // } + this.$notify({ + type:["warning"], + title:"暂不能打开此文件", + message:`${file.modifyName}正在编辑此文件,请在“工作中”标识消失后再尝试打开。` + }) + return; + } - // // 若文件在协作文件中,则不更改状态 - // if(isCooperationFile) { system.openFile(filePath); return; } - // // 将文件状态设置为编辑中 - - // if(file.workStatus !== 2) { - // file.workStatus = 2; - // const flagRes = await services.changeFileWorkStatus(fileId, 2); - // if(flagRes.Code !== 0) return; - // } + // 若文件在协作文件中,则不更改状态 + if(isCooperationFile) { system.openFile(filePath); return; } + // 将文件状态设置为编辑中 + if(file.workStatus !== 2) { + file.workStatus = 2; + const flagRes = await services.changeFileWorkStatus(fileId, 2); + if(flagRes.Code !== 0) return; + } file.modifyUserId = sessionStorage.userId; system.openFile(filePath); - // this.fetchFolderFiles(); + this.fetchFolderFiles(); }, /** * 右键菜单 diff --git a/src/views/main_web/workspace/components/file-item.vue b/src/views/main_web/workspace/components/file-item.vue index fbf2a68d..cbc69ac5 100644 --- a/src/views/main_web/workspace/components/file-item.vue +++ b/src/views/main_web/workspace/components/file-item.vue @@ -15,14 +15,14 @@ v-if="!oneOf(file.extension, imgExtensionList) && !oneOf(file.extension, VideoExtensionList)" class="defultImage-mid" :class="`${file.extension}-mid ${ - fileIsLoading || showDownloadMask ? 'toumin' : '' + fileIsLoading || (isInWorkFolder && otherUserIsWorking) ? 'toumin' : '' } ${!oneOf(file.extension,filePreviewList) ? '':''} ` " />
@@ -39,6 +39,12 @@