Sfoglia il codice sorgente

工作空间 协作文件增加路径

master
unknown 4 anni fa
parent
commit
2cf051bc08
2 ha cambiato i file con 8 aggiunte e 5 eliminazioni
  1. +1
    -1
      src/views/main_web/workspace/components/file-item.vue
  2. +7
    -4
      src/views/main_web/workspace/workspace.new.vue

+ 1
- 1
src/views/main_web/workspace/components/file-item.vue Vedi File

@@ -249,7 +249,7 @@ export default {
computed: {
fileStoreKey() {
const { nodeName, extension, archName } = this.file;
const folderName = nodeName || this.nodeFolder.folderName;
const folderName = nodeName ? `${nodeName}\\协作文件` : this.nodeFolder.folderName;
return `${folderName}\\${archName}${extension ? `.${extension}` : ''}`;
},
isInWorkFolder() {


+ 7
- 4
src/views/main_web/workspace/workspace.new.vue Vedi File

@@ -711,12 +711,14 @@ export default {
// const { levelId } = folderMap[folderId] || {};
const nodeFolderName = nodeName || this.currentNodeFolder.folderName;
const extensionedFileName = `${fileName}${extension ? `.${extension}`:''}`;
const fileStoreKey = `${nodeFolderName}\\${extensionedFileName}`;
const isCooperateFile = !!nodeName;
const targetFolderName = `${nodeFolderName}${isCooperateFile ? '\\协作文件': ''}`;
const fileStoreKey = `${targetFolderName}\\${extensionedFileName}`;
const errorHandler = () => {
this.removeFileLoadingState(file.id);
}
this.updateFileLoadState(file.id, DOWNLOADING, 0);
system.downloadFile(ipfsCid, sessionStorage.projName, extensionedFileName, nodeFolderName, (resMessage, socketIns) => {
system.downloadFile(ipfsCid, sessionStorage.projName, extensionedFileName, targetFolderName, (resMessage, socketIns) => {
console.log('receive download file message:', resMessage, socketIns);
// {"size":"11","currentSize":"11","unit":"B","process":100,"hash":""}
try {
@@ -783,14 +785,15 @@ export default {
* 点击文件事件:直接打开文件
*/
fileClick: async function (file) {
debugger;
if(!this.isClient) return;
const { archName, extension, id: fileId, nodeName } = file;
const folderName = nodeName || this.currentFolder.folderName;
const localWorkspacePrefix = this.localWorkspacePrefix;
const fileStoreKey = `${folderName}\\${archName}${extension ? `.${extension}` : ''}`;
const isCooperationFile = !!nodeName;
const fileStoreKey = `${folderName}${isCooperationFile ? '\\协作文件': ''}\\${archName}${extension ? `.${extension}` : ''}`;
if(!this.localFileHashMap[fileStoreKey]) return;
const filePath = `${localWorkspacePrefix}\\${fileStoreKey}`;
const isCooperationFile = !!nodeName;
if(!isCooperationFile && (file.workStatus === 2 && sessionStorage.userId !== file.modifyUserId)) {
notify.warning('文件正在工作编辑中,请耐心等待');
return;


Caricamento…
Annulla
Salva