|
|
@@ -1,6 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div @dblclick="dblclickFile"> |
|
|
|
|
|
|
|
<div class="yiyun_wenjian_list loding-mask-parent" ref="file" |
|
|
|
:class="{'yiyun_wenjian_list_add': !isLocalIpfsCidValidate && isClient}" |
|
|
|
@contextmenu.prevent.stop="fileRightBtnClick"> |
|
|
@@ -15,14 +14,14 @@ |
|
|
|
v-if="!oneOf(file.extension, imgExtensionList) && !oneOf(file.extension, VideoExtensionList)" |
|
|
|
class="defultImage-mid" |
|
|
|
:class="`${file.extension}-mid ${ |
|
|
|
fileIsLoading || (isInWorkFolder && otherUserIsWorking) ? 'toumin' : '' |
|
|
|
(fileIsLoading || (isInWorkFolder && otherUserIsWorking) && !enableSelect) ? 'toumin' : '' |
|
|
|
} ${!oneOf(file.extension,filePreviewList) ? '':''} ` " |
|
|
|
/> |
|
|
|
<!-- 图片文件图标 --> |
|
|
|
<div ref="file-img" |
|
|
|
v-else-if="oneOf(file.extension, imgExtensionList)" |
|
|
|
class="defultImage-mid img_bg-mid" |
|
|
|
:class=" fileIsLoading ||(isInWorkFolder && otherUserIsWorking) || showDownloadMask ? 'toumin' : ''" |
|
|
|
:class=" (fileIsLoading ||(isInWorkFolder && otherUserIsWorking) || showDownloadMask) && !enableSelect ? 'toumin' : ''" |
|
|
|
> |
|
|
|
<div class="file_Im gbox-mid"> |
|
|
|
<img v-lazy="file.alias" alt class="file_Img" /> |
|
|
@@ -32,7 +31,7 @@ |
|
|
|
<div ref="file-img" |
|
|
|
v-else |
|
|
|
class="defultImage-mid video-mid" |
|
|
|
:class="fileIsLoading || showDownloadMask ? 'toumin' : ''" |
|
|
|
:class="(fileIsLoading || showDownloadMask) && !enableSelect ? 'toumin' : ''" |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -49,14 +48,14 @@ |
|
|
|
<div |
|
|
|
class="downloadIcon" |
|
|
|
@click="clientDownLoad(file, 1)" |
|
|
|
v-if="showDownloadMask" |
|
|
|
v-if="showDownloadMask && !enableSelect" |
|
|
|
> |
|
|
|
<div class="readytodownload-icon"><img src="/static/img/download.svg" alt class="imgjuzhong" /></div> |
|
|
|
</div> |
|
|
|
<!-- 下载中 状态蒙板 --> |
|
|
|
<div |
|
|
|
class="downloadIcon" |
|
|
|
v-if="loadingState.type === DOWNLOADING" |
|
|
|
v-if="loadingState.type === DOWNLOADING && !enableSelect" |
|
|
|
> |
|
|
|
<div class="progress-circle"> |
|
|
|
<LottieSvg class="bg-pic" :width="40" :height="40" path="static/img/lottie.download.svg.json" /> |
|
|
@@ -69,7 +68,7 @@ |
|
|
|
<!-- 上传中 状态蒙板 todo: 调整样式--> |
|
|
|
<div |
|
|
|
class="downloadIcon" |
|
|
|
v-if="loadingState.type === UPLOADING" |
|
|
|
v-if="loadingState.type === UPLOADING && !enableSelect" |
|
|
|
> |
|
|
|
<div class="progress-circle"> |
|
|
|
<img class="bg-pic" src="/static/img/upload.png" alt="" :style="{ width: '24px' }" > |
|
|
@@ -117,13 +116,14 @@ |
|
|
|
>同步</div> |
|
|
|
<!-- 绿色钩 协作文件无绿色钩--> |
|
|
|
<div |
|
|
|
v-if="fileEnableShare" |
|
|
|
v-else-if="fileEnableShare && !enableSelect" |
|
|
|
class="yijianxietong isonselect" |
|
|
|
title="文件已协同" |
|
|
|
> |
|
|
|
<i class="icon font_family icon-icon_status_wenjianbiaojiwancheng yijianIcon" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<div v-if="!isFileModified && enableSelect" class="yijianIcon select-icon" :class="{ selected: false }" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@@ -240,6 +240,10 @@ export default { |
|
|
|
type: Object, |
|
|
|
default: () => ({}), |
|
|
|
}, |
|
|
|
enableSelect: { |
|
|
|
type: Boolean, |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
// rightShowMenu: { |
|
|
|
// type: Function, |
|
|
|
// default: () => () => {} |
|
|
@@ -293,13 +297,13 @@ export default { |
|
|
|
fileItemEl: null, |
|
|
|
workspaceEl: null,//工作文件区域 |
|
|
|
fileImgEl: null, |
|
|
|
fileImgClass: "" |
|
|
|
fileImgClass: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
fileStoreKey() { |
|
|
|
const { nodeName, extension, archName, relativePath } = this.file; |
|
|
|
const folderName = nodeName ? `${nodeName}\\协作文件` : this.nodeFolder.folderName; |
|
|
|
// const { nodeName, extension, archName, relativePath } = this.file; |
|
|
|
// const folderName = nodeName ? `${nodeName}\\协作文件` : this.nodeFolder.folderName; |
|
|
|
return getFileStoreKey(this.file, this.nodeFolder); |
|
|
|
}, |
|
|
|
isInWorkFolder() { |
|
|
@@ -358,7 +362,7 @@ export default { |
|
|
|
isFileModified() { |
|
|
|
const { ipfsCid } = this.file; |
|
|
|
const localIpfsCid = this.localIpfsCid; |
|
|
|
const [myLocalIpfsCid, status] = localIpfsCid.split(";"); |
|
|
|
const [myLocalIpfsCid, status] = (localIpfsCid || '').split(";"); |
|
|
|
//本地修改 即hash最后一位是 1 |
|
|
|
return localIpfsCid && status == "1"; |
|
|
|
}, |
|
|
@@ -624,6 +628,11 @@ export default { |
|
|
|
box-shadow: 0 1px 2px rgb(#666, 0.2); |
|
|
|
} |
|
|
|
} |
|
|
|
.select-icon { |
|
|
|
width: 24px; |
|
|
|
height: 24px; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|