revive před 4 roky
rodič
revize
9d02e35ef9
4 změnil soubory, kde provedl 46 přidání a 40 odebrání
  1. +1
    -2
      src/components/app-header/app-header.vue
  2. +2
    -0
      src/views/main_web/proj-item.vue
  3. +42
    -36
      src/views/main_web/workspace/components/recycle-file.vue
  4. +1
    -2
      src/views/main_web/workspace/recyclebin.vue

+ 1
- 2
src/components/app-header/app-header.vue Zobrazit soubor

@@ -31,11 +31,10 @@
</div>
<div class="app-header-content-right">
<slot name="right"></slot>
<span @click="toRecycle" v-if="false">
<span @click="toRecycle" v-if ="showUserCenter">
<i
class="Cicon icon font_family icon-icon_huishouzhan"
:class="{inRecycle:isInRecycle}"
v-if ="showUserCenter"
/>
</span>
<user-center v-if="showUserCenter" />


+ 2
- 0
src/views/main_web/proj-item.vue Zobrazit soubor

@@ -208,6 +208,8 @@ export default {
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: left;
cursor: pointer;
}


+ 42
- 36
src/views/main_web/workspace/components/recycle-file.vue Zobrazit soubor

@@ -92,9 +92,9 @@
:title="file.archName + '.' + file.extension"
>{{ file.archName }}<span v-show="!oneOf(file.extension, RecExtensionList)">.{{file.extension}}</span></strong>

<span
<!-- <span
class="yiyunwenjian_infodesc"
>5天后删除</span>
>5天后删除</span> -->
</div>
</div>
</div>
@@ -172,40 +172,40 @@ export default {
/**
* 客户端下载方法
*/
clientDownLoad: function (file, type) {
if(!this.isClient) return;
console.log('下载的文件对象', file);
const { ipfsCid, archName: fileName, extension, folderId } = file;
const folderMap = this.folderMap;
const { folderName, levelId } = folderMap[folderId] || {};
const extensionedFileName = `${fileName}${extension ? `.${extension}`:''}`;
this.updateFileLoadState(file, 0);
system.downloadFile(ipfsCid, sessionStorage.projName, extensionedFileName, folderName, (resMessage, socketIns) => {
console.log('receive download file message:', resMessage, socketIns);
// {"size":"11","currentSize":"11","unit":"B","process":100,"hash":""}
try {
const { process } = JSON.parse(resMessage.data);
this.updateFileLoadState(file, process);
if(process !== 100) return;
socketIns.close();
// file.downloadStatus = 2;
// file.isDownload = true;
// 注入到文件下载检测表中
const key = `${folderName}\\${extensionedFileName}`;
this.fileDownloadStatusHash[key] = ipfsCid;
this.refreshFileStatus();
//notify.success(`${fileName},下载完成。`);
this.$notify({
type:["success","download"],
title:"文件已下载",
message:'${fileName}'
})
// this.$forceUpdate();
} catch (e) {
console.error('socket-download-file parse data have error:', e);
}
});
},
// clientDownLoad: function (file, type) {
// if(!this.isClient) return;
// console.log('下载的文件对象', file);
// const { ipfsCid, archName: fileName, extension, folderId } = file;
// const folderMap = this.folderMap;
// const { folderName, levelId } = folderMap[folderId] || {};
// const extensionedFileName = `${fileName}${extension ? `.${extension}`:''}`;
// this.updateFileLoadState(file, 0);
// system.downloadFile(ipfsCid, sessionStorage.projName, extensionedFileName, folderName, (resMessage, socketIns) => {
// console.log('receive download file message:', resMessage, socketIns);
// // {"size":"11","currentSize":"11","unit":"B","process":100,"hash":""}
// try {
// const { process } = JSON.parse(resMessage.data);
// this.updateFileLoadState(file, process);
// if(process !== 100) return;
// socketIns.close();
// // file.downloadStatus = 2;
// // file.isDownload = true;
// // 注入到文件下载检测表中
// const key = `${folderName}\\${extensionedFileName}`;
// this.fileDownloadStatusHash[key] = ipfsCid;
// this.refreshFileStatus();
// //notify.success(`${fileName},下载完成。`);
// this.$notify({
// type:["success","download"],
// title:"文件已下载",
// message:'${fileName}'
// })
// // this.$forceUpdate();
// } catch (e) {
// console.error('socket-download-file parse data have error:', e);
// }
// });
// },
}
}
</script>
@@ -258,5 +258,11 @@ export default {
height: 16px;
z-index: 1;
}
.top_btn{
opacity: 0;
}
.yiyun_wenjian_list:hover .top_btn{
opacity: 1;
}

</style>

+ 1
- 2
src/views/main_web/workspace/recyclebin.vue Zobrazit soubor

@@ -49,9 +49,7 @@ export default {
this.fileList = res;
},
isRecycle(flag){
debugger;
if(flag){
debugger;
this.getRecycleFiles();
}
}
@@ -75,4 +73,5 @@ export default {
margin-bottom: 13px;
cursor: pointer;
}

</style>

Načítá se…
Zrušit
Uložit