From 996d1b58f665f87d7b5a24bdd70b8346e8ce3ed1 Mon Sep 17 00:00:00 2001 From: zxm Date: Tue, 9 Jun 2020 17:34:12 +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)优化回收站放回原处功能 (2)编码拖拽功能 --- src/views/main_web/workspace.vue | 119 +++++++++++++++++++++++-------- 1 file changed, 91 insertions(+), 28 deletions(-) diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index fc6e54f9..4d97886e 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -613,11 +613,14 @@ - +
@@ -850,18 +853,20 @@ {{ file.version }}
-
-
+ + - +
+ @mouseout="ishideIcon">
@@ -877,8 +882,10 @@ {{foldergroup.childCount}}个项目
- +
+
@@ -5703,18 +5710,6 @@ export default { this.showAllAppManagement(); }, /****协作空间 拖拽功能方法 start*/ - draggableStart: function (evt) { - }, - draggableEnd: function (evt) { - }, - draggableChange: function (evt) { - }, - draggableMove: function (evt, orginoverflow) { - }, - draggableClone: function (evt) { - }, - handleListChange: function (event) { - }, /** * 新建文件夹显示弹窗 */ @@ -6008,7 +6003,75 @@ export default { duration: 5000 }); }); - } + }, + /** + * 托拽移动 + */ + draggableMove: function (evt) { + var thisApp = this + var sourceData = evt.draggedContext.element + var targetData =evt.relatedContext.element + var draggableData = {} + console.log(sourceData) + console.log(targetData) + if(sourceData.archID != null){ + alert("把文件拖拽到文件分组"); + //把文件拖拽到文件分组 + draggableData={ + sourceArchData:sourceData, + targetFolderGroupData:targetData, + userID:sessionStorage.userId + } + } + if(sourceData.folderGroupID != null){ + alert("把文件分组拖拽到文件分组"); + //把文件分组拖拽到文件分组 + draggableData={ + sourceFolderGroupData:sourceData, + targetFolderGroupData:targetData, + userID:sessionStorage.userId + } + } + //说明目标数据时文件分组 + this.$axios({ + method: "post", + url: encodeURI(process.env.API_HOST + "folders/foldergroup/draggable"), + data: draggableData + }).then(response => { + if (response.data.state == 1) { + if (this.dbClickSelectedFolderGroupData == null || JSON.stringify(this.dbClickSelectedFolderGroupData) == '{}') { + this.folderGroupBreads=[] + this.listFiles(); + }else { + this.intoFoldergroup(this.dbClickSelectedFolderGroupData); + } + this.$notify({ + title: "恭喜您", + message: "操作成功!", + type: "success", + offset: 100, + duration: 2500 + }); + } else { + this.$notify({ + title: "温馨提示", + message: response.data.message, + type: "error", + offset: 100, + duration: 5000 + }); + } + }).catch(error => { + console.log(error); + this.$notify({ + title: "温馨提示", + message: "操作失败!", + type: "error", + offset: 100, + duration: 5000 + }); + }); + }, /****协作空间 拖拽功能方法 end*/ }, watch: {