From 9d02e35ef962822829f9da90fdda6f348d757729 Mon Sep 17 00:00:00 2001
From: revive <1664535558@qq.com>
Date: Fri, 8 Jan 2021 23:09:13 +0800
Subject: [PATCH] commit
---
src/components/app-header/app-header.vue | 3 +-
src/views/main_web/proj-item.vue | 2 +
.../workspace/components/recycle-file.vue | 78 ++++++++++---------
src/views/main_web/workspace/recyclebin.vue | 3 +-
4 files changed, 46 insertions(+), 40 deletions(-)
diff --git a/src/components/app-header/app-header.vue b/src/components/app-header/app-header.vue
index db0a86e7..a1d64b86 100644
--- a/src/components/app-header/app-header.vue
+++ b/src/components/app-header/app-header.vue
@@ -31,11 +31,10 @@
@@ -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);
+ // }
+ // });
+ // },
}
}
@@ -258,5 +258,11 @@ export default {
height: 16px;
z-index: 1;
}
+.top_btn{
+ opacity: 0;
+}
+.yiyun_wenjian_list:hover .top_btn{
+ opacity: 1;
+}
\ No newline at end of file
diff --git a/src/views/main_web/workspace/recyclebin.vue b/src/views/main_web/workspace/recyclebin.vue
index e09d7a20..9185d1d0 100644
--- a/src/views/main_web/workspace/recyclebin.vue
+++ b/src/views/main_web/workspace/recyclebin.vue
@@ -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;
}
+
\ No newline at end of file