diff --git a/src/views/main_web/recycle.vue b/src/views/main_web/recycle.vue
index 32bd9c07..677066b9 100644
--- a/src/views/main_web/recycle.vue
+++ b/src/views/main_web/recycle.vue
@@ -12,7 +12,10 @@
回收站暂时没有文件!
-
+
@@ -33,22 +36,22 @@
-
+
+ file.extension != 'jpeg'">
+ file.extension == 'jpeg'">
@@ -65,16 +68,29 @@
-
{{
- file.archName
- }}
-
我的文件
-
+
+ {{file.archName}}
+
+
我的文件
+
+
+
+
+
+
+ {{foldergroup.folderGroupName}}
+
+
{{foldergroup.childCount}}个项目
+
+
-
+
+
+
@@ -101,7 +125,10 @@
top: 0,
left: 0,
rightMenuvisible: false,
- isShowRecycleTip:false
+ isShowRecycleTip:false,
+ /*********分组菜单 ***************/
+ rightFoldergroupMenuvisible:false,
+ btnRightFoldergroup:{},
};
},
mounted: function () {
@@ -112,9 +139,9 @@
* 获取当前工作下文件
*/
listFiles: function () {
- this.rightMenuvisible = false;
var thisApp = this;
- this.$axios({
+ thisApp.rightMenuvisible = false;
+ thisApp.$axios({
method: "get",
url: encodeURI(
process.env.API_HOST + "folders/resource/recycle/" + thisApp.userId
@@ -177,7 +204,7 @@
* 删除我的文件
* file:源数据
*/
- delMyFile: function (file) {
+ delMyFile: function (file) {
var thisApp = this;
this.$confirm("您正在删除 " + file.archName + " 文件是否继续?", "", {
confirmButtonText: "确定",
@@ -246,9 +273,10 @@
});
},
/**
- * 右键
+ * 右键文件
*/
rightShowMenu: function (e, file) {
+ console.log(file)
const menuMinWidth = 10;
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
const offsetWidth = this.$el.offsetWidth; // container width
@@ -262,6 +290,7 @@
this.left = e.clientX; // fix 位置bug
this.top = e.clientY; // fix 位置bug
this.rightMenuvisible = true;
+ this.rightFoldergroupMenuvisible = false;
this.BtnRightFile = file;
},
/**
@@ -269,7 +298,98 @@
*/
closeShowMenu: function () {
this.rightMenuvisible = false;
- }
+ },
+ /******* 右键文件分组菜单 *********/
+ /**
+ * 右键文件分组
+ */
+ rightFoldergroupShowMenu: function (e, foldergroup){
+ console.log(foldergroup)
+ const menuMinWidth = 10;
+ const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
+ const offsetWidth = this.$el.offsetWidth; // container width
+ const maxLeft = offsetWidth - menuMinWidth; // left boundary
+ const left = e.clientX - offsetLeft; // 15: margin right
+ if (left > maxLeft) {
+ this.left = maxLeft;
+ } else {
+ this.left = left;
+ }
+ this.left = e.clientX; // fix 位置bug
+ this.top = e.clientY; // fix 位置bug
+ this.rightMenuvisible = false;
+ this.rightFoldergroupMenuvisible = true;
+ this.btnRightFoldergroup = foldergroup;
+ },
+ /**
+ * 下载
+ */
+ downLoadMyFoldergroup(){
+ this.rightFoldergroupMenuvisible = false;
+ },
+ /**
+ * 返回原处
+ */
+ returnMyFoldergroup(){
+ alert(111)
+ this.$confirm("您确定要还原 " + this.btnRightFoldergroup.folderGroupName + " 文件夹,是否继续?", "", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ this.$axios({
+ method: "get",
+ url: encodeURI(process.env.API_HOST + "folders/recycle/update/" +this.btnRightFoldergroup.folderGroupID+'/'+sessionStorage.userId),
+ })
+ .then(function (response) {
+ if (response.data.state == 1) {
+ this.$notify({
+ title: "恭喜您",
+ message: response.data.message,
+ type: "success",
+ offset: 100,
+ duration: 2500
+ });
+ this.rightFoldergroupMenuvisible = false;
+ this.listFiles();
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ });
+ },
+ /**
+ * 彻底删除
+ */
+ delMyFoldergroup(){
+ this.$confirm("您正在删除 " + this.btnRightFoldergroup.folderGroupName + " 文件夹,是否继续?", "", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ this.$axios({
+ method: "delete",
+ url: encodeURI(process.env.API_HOST + "folders/recycle/delete/" +this.btnRightFoldergroup.folderGroupID+'/'+sessionStorage.userId),
+ })
+ .then(function (response) {
+ if (response.data.state == 1) {
+ this.$notify({
+ title: "恭喜您",
+ message: response.data.message,
+ type: "success",
+ offset: 100,
+ duration: 2500
+ });
+ this.rightFoldergroupMenuvisible = false;
+ this.listFiles();
+ }
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ });
+ },
},
watch: {
rightMenuvisible(value) {
diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue
index 165068f7..0d131305 100644
--- a/src/views/main_web/workspace.vue
+++ b/src/views/main_web/workspace.vue
@@ -849,12 +849,10 @@
>
+ @dblclick="intoFoldergroup(foldergroup)">
+ @contextmenu.prevent="rightShowMenu($event, foldergroup, 4)">
转移至其他工作
复制至其它工作
重命名
- 移到回收站
+ 移到回收站
@@ -4141,6 +4139,7 @@ export default {
file.deleted = 1;
file.createTime = new Date(file.createTime);
file.modifyTime = new Date(file.modifyTime);
+ file.modifyUserID = sessionStorage.userId
this.$axios({
method: "put",
url: encodeURI(process.env.API_HOST + "archives/update/del"),
@@ -5917,6 +5916,53 @@ export default {
console.log(error);
});
},
+ /**
+ * 文件分组- 移到回收站
+ */
+ removeRecycle:function(btnRightFoldergoup){
+ var thisApp = this
+ this.$axios({
+ method: "get",
+ url: encodeURI(process.env.API_HOST + "folders/foldergroup/del/update/"+btnRightFoldergoup.folderGroupID+"/"+sessionStorage.userId),
+ data: {
+ foldergroupId:btnRightFoldergoup.folderGroupID,
+ userId:sessionStorage.userId
+ }
+ }).then(response => {
+ if (response.data.state == 1) {
+ if (thisApp.dbClickSelectedFolderGroupData == null || JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == '{}') {
+ thisApp.folderGroupBreads=[]
+ thisApp.listFiles();
+ }else {
+ thisApp.intoFoldergroup(thisApp.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: {