From 2d4abafa63b21b54be09b4a652e93dbb62a72bb0 Mon Sep 17 00:00:00 2001 From: zxm Date: Wed, 24 Jun 2020 09:02:30 +0800 Subject: [PATCH] [VersionBeta] V.1.0.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Adds] 1.修改“新建文件夹”为右键菜单添加 --- src/views/main_web/workspace.vue | 100 ++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index 27fb4781..eca40f98 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -198,7 +198,7 @@ @hideWorklinkPage="hideWorklinkPage" >
-
+
@@ -319,11 +319,11 @@
- 新建文件夹 + >新建文件夹 --> +
    +
  • 新建文件夹
  • 打开
  • 转移至其他工作
  • 复制至其它工作
  • @@ -2061,9 +2059,9 @@ export default { mapAddress: "北京天安门", isClient: false, // 是否是客户端 - /**新建文件夹 start*/ - dialogNewFolderGroup: false, //新建文件夹组弹窗 - //文件夹组数据 + /**新建文件分组 start*/ + dialogNewFolderGroup: false, //新建文件分组组弹窗 + //文件分组数据 folderGroupData: { folderGroupID: "", folderID: "", @@ -2076,8 +2074,8 @@ export default { modifyUserID: "", modifyTime: "" }, - myListFolderGroups: [], // 我的文件夹组数据 - dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹组对象 + myListFolderGroups: [], // 我的文件分组数据 + dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹分组对象 isShowWorkt: true, //是否显示我的文件和工作文件 isShowBread: false, //是否显示面包屑 folderGroupBreads: [], //文件分组面包屑集合 @@ -2085,8 +2083,8 @@ export default { strFoldergroupCopyOrMove: "", //右键菜单 文件分组 是复制还是移动标记 strFileOrFoldergroup: "", //右键菜单 移动/复制到其他工作 是文件还是文件分组标记 draggableData: {}, //记录要移动的数据 - timer: {} //文件计时器对象 - /**新建文件夹 end*/ + timer: {}, //文件计时器对象 + /**新建文件分组 end*/ }; }, mounted: function() { @@ -5214,7 +5212,7 @@ export default { } else { this.top = e.clientY; // fix 位置bug } - + if (type == 2 || type == 3) { if (file.status == 2) { if (this.isClient) { @@ -5223,6 +5221,7 @@ export default { this.top = this.top - 50; } } else if (type == 4) { + //显示分组菜单的位置 if (this.isClient) { this.top = this.top - 100; } else { @@ -5239,7 +5238,12 @@ export default { this.rightMenuvisible = true; this.showType = type; this.BtnRightFile = file; //鼠标右击的文件 - this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组 + //this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组 + if(file=="新建文件夹"){ + this.btnRightFoldergoup={} + }else{ + this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组 + } }, /** * 关闭 @@ -5393,6 +5397,16 @@ export default { * 双击文件夹组名称 进入文件夹 */ intoFoldergroup: function(foldergroup) { + if(foldergroup==null || JSON.stringify(foldergroup)=='{}'){ + this.$notify({ + title: "温馨提示", + message: "请选中文件或新建文件夹", + type: "info", + offset: 100, + duration: 2500 + }); + return + } this.dbClickSelectedFolderGroupData = foldergroup; this.isShowWorkt = false; this.isShowBread = true; @@ -5462,6 +5476,16 @@ export default { */ renameFoldergroup: function(btnRightFoldergoup) { var thisApp = this; + if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + thisApp.$notify({ + title: "温馨提示", + message: "请选中文件或新建文件夹", + type: "info", + offset: 100, + duration: 2500 + }); + return + } this.$prompt( "当前文件夹名称: " + btnRightFoldergoup.folderGroupName, "重命名", @@ -5512,6 +5536,16 @@ export default { */ copyAndMoveFoldergroup: function(btnRightFoldergoup, strCopyOrMove) { var thisApp = this; + if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + thisApp.$notify({ + title: "温馨提示", + message: "请选中文件或新建文件夹", + type: "info", + offset: 100, + duration: 2500 + }); + return + } if (strCopyOrMove == "move") { thisApp.dialogTtile = "移动到其它文件夹"; } @@ -5600,6 +5634,16 @@ export default { */ removeRecycle: function(btnRightFoldergoup) { var thisApp = this; + if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + thisApp.$notify({ + title: "温馨提示", + message: "请选中文件或新建文件夹", + type: "info", + offset: 100, + duration: 2500 + }); + return + } thisApp .$axios({ method: "get",