Ver código fonte

workspace update

master
unknown 4 anos atrás
pai
commit
93481f4e9b
3 arquivos alterados com 7 adições e 7 exclusões
  1. +4
    -2
      src/services/system.js
  2. +3
    -3
      src/views/main_web/workspace/components/file-item.vue
  3. +0
    -2
      src/views/main_web/workspace/workspace.new.vue

+ 4
- 2
src/services/system.js Ver arquivo

@@ -172,7 +172,9 @@ const system = {
// const maybeFile = fileList.find(iFile => `${iFile.archName}${iFile.extension ? `.${iFile.extension}` : ''}` === extensionedFileName);
uploadFile.FileSize = +size;
uploadFile.IpfsCid = hash;
delete uploadFile.Id;
if(!maybeFile) {
delete uploadFile.Id;
}
const res = await fetchApi(`file/${maybeFile ? 'updateFile' : 'addFile'}`, uploadFile);
wrapErrorHint(res);
if(res.Code !== 0) return;
@@ -207,7 +209,7 @@ const system = {
onProgressHandler(progressData);
if(process !== 100 || !hash) return;
socket.close();
const copyFile = firstCharToUpperCase({ ...file, ipfsCid: hash, ModifyUserId: sessionStorage.userId });
const copyFile = firstCharToUpperCase({ ...file, ipfsCid: hash, size: +size, ModifyUserId: sessionStorage.userId });

const res = await fetchApi('file/updateFile', copyFile);
wrapErrorHint(res);


+ 3
- 3
src/views/main_web/workspace/components/file-item.vue Ver arquivo

@@ -13,7 +13,7 @@
v-if="!oneOf(file.extension, imgExtensionList)"
class="defultImage-mid"
:class="`${file.extension}-mid ${
fileIsLoading || otherUserIsWorking || showDownloadMask ? 'toumin' : ''
fileIsLoading || (isInWorkFolder && otherUserIsWorking) || showDownloadMask ? 'toumin' : ''
}`"
@contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
/>
@@ -21,7 +21,7 @@
<div
v-else
class="defultImage-mid img_bg-mid"
:class=" fileIsLoading || otherUserIsWorking || showDownloadMask ? 'toumin' : ''"
:class=" fileIsLoading || (isInWorkFolder && otherUserIsWorking) || showDownloadMask ? 'toumin' : ''"
@contextmenu.prevent.stop="rightShowMenu($event, file, 1)"
>
<div class="file_Im gbox-mid">
@@ -162,7 +162,7 @@
{{ file.version }}
</span>
<span v-if="!isInWorkFolder" class="yiyunwenjian_infodesc">{{file.nodeName}}</span>
<!-- <span class="yiyunwenjian_infodesc">{{loadingState.loadProgress}}</span> -->
<!-- <span v-if="loadingState.type === UPLOADING" class="yiyunwenjian_infodesc">{{`${loadingState.loadSize} / ${loadingState.totalSize} ${loadingState.unit}`}}</span> -->
</div>
</div>
</el-tooltip>


+ 0
- 2
src/views/main_web/workspace/workspace.new.vue Ver arquivo

@@ -756,8 +756,6 @@ export default {
const {IpfsCid} = fileNewState;
// 注入到文件下载检测表中
// 同时更新文件队列中file对象的ipfsCid属性这样才能在下次刷新前使文件的记录保持一致
file.ipfsCid = IpfsCid;
file.workStatus = NOT_WORKING;
this.addLocalFileRecord(fileKey, IpfsCid);
this.removeFileLoadingState(fileId);
this.workFileList = this.workFileList.map(iFile => iFile.id === file.id ? { ...iFile, ipfsCid: IpfsCid, workStatus: NOT_WORKING } : iFile);


Carregando…
Cancelar
Salvar