diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index a73fe78c..8fc0573d 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -198,7 +198,10 @@ @hideWorklinkPage="hideWorklinkPage" >
-
+
@@ -323,7 +326,7 @@ v-if="nowFolder.folderPerm == 0" type="primary" @click="newCreateFolderGroup" - >新建文件夹 --> + >新建文件夹--> -
工作中
+ +
工作中
-
- -
-
- -
-
- -
-
- -
- -
- -
-
- - -
下载中
-
-
- -
- - - +
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+ + +
下载中
- - + + + + + + - 在线查看 - - - 打开 - - - 打开方式 - - - 搞定 - - - 开启协同 - - - 取消协同 - - - 保存历史文件 - - - 选择历史文件 - - - 建立副本 - - - 提交至项目公共文件夹 - - - 取消至项目公共文件夹 - - - 转移至其他工作 - - - 复制至其他工作 - - - 下载至本地 - - - 分享 - - - 重命名 - - - 移到回收站 - - - -
- {{ file.archName }} - - 由我创建 - {{file.cnName}}创建 - - + 由我创建 + {{file.cnName}}创建 + + + >由我创建
--> + {{file.cnName}}创建 +
+ +
+ 文件编辑中 +
{{file.cnName}}创建 -
- -
- 文件编辑中 + v-if="file.version != 1" + class="visontext" + @click="showFileMilestone(file)" + > + 版本 + {{ file.version }} +
- - 版本 - {{ file.version }} - -
@@ -588,7 +603,8 @@ :list="myListFolderGroups" group="group" :move="draggableMove" - @end="draggableEnd"> + @end="draggableEnd" + >
+ class="contextmenu" + >
@@ -2110,7 +2142,7 @@ export default { createTime: "", modifyUserID: "", modifyTime: "" - }, + }, myListFolderGroups: [], // 我的文件分组数据 dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹分组对象 isShowWorkt: true, //是否显示我的文件和工作文件 @@ -2121,20 +2153,23 @@ export default { strFileOrFoldergroup: "", //右键菜单 移动/复制到其他工作 是文件还是文件分组标记 draggableData: {}, //记录要移动的数据 timer: {}, //文件计时器对象 - isShowMenuFoldergroup:true,//右键分组菜单项-显隐 - isShowMenuFile:true,//右键文件菜单项-显隐 - isShowMenuItemCreateFoldergroup:true,//右键分组"新建文件夹"菜单项-显隐 + isShowMenuFoldergroup: true, //右键分组菜单项-显隐 + isShowMenuFile: true, //右键文件菜单项-显隐 + isShowMenuItemCreateFoldergroup: true //右键分组"新建文件夹"菜单项-显隐 /**新建文件分组 end*/ }; }, mounted: function() { - window["refreshFiles"]=()=>{ - if(this.dbClickSelectedFolderGroupData!=null && JSON.stringify(this.dbClickSelectedFolderGroupData)!='{}'){ + window["refreshFiles"] = () => { + if ( + this.dbClickSelectedFolderGroupData != null && + JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}" + ) { this.intoFoldergroup(); - }else{ + } else { this.listFiles(); } - } + }; window.addEventListener("scroll", this.onscroll, true); this.loadProjManager(); this.loadSettings(); @@ -2904,18 +2939,18 @@ export default { // } // } if (this.currentPageType == 0) { - // 加载我的文件 - thisApp.myFilesList = thisApp.folderFileList.listMyFiles; - // 加载我的文件夹 zxm+ - thisApp.myListFolderGroups = - thisApp.folderFileList.listFolderGroups; - } else { - // 加载工作文件 - thisApp.myFilesList = thisApp.folderFileList.listOtherFiles; - // 加载工作文件分组 zxm+ - thisApp.myListFolderGroups = - thisApp.folderFileList.listOtherFolderGroups; - } + // 加载我的文件 + thisApp.myFilesList = thisApp.folderFileList.listMyFiles; + // 加载我的文件夹 zxm+ + thisApp.myListFolderGroups = + thisApp.folderFileList.listFolderGroups; + } else { + // 加载工作文件 + thisApp.myFilesList = thisApp.folderFileList.listOtherFiles; + // 加载工作文件分组 zxm+ + thisApp.myListFolderGroups = + thisApp.folderFileList.listOtherFolderGroups; + } thisApp.listCollaborationFiles(); }) .catch(error => { @@ -3727,7 +3762,10 @@ export default { clientUpload() { if (this.isClient) { this.isShowNewFiledialog = false; - back.uploadFile(this.listUserFolders[this.nowFolderIndex].folderID,sessionStorage.userId); + back.uploadFile( + this.listUserFolders[this.nowFolderIndex].folderID, + sessionStorage.userId + ); } }, /** @@ -3761,12 +3799,15 @@ export default { offset: 100, duration: 2500 }); - if(thisApp.isClient) - { - var newFileName=file.archName +"." +file.extension; + if (thisApp.isClient) { + var newFileName = file.archName + "." + file.extension; // 客户端重命名文件 // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID - back.renameFile(file.archID,newFileName,sessionStorage.userId); + back.renameFile( + file.archID, + newFileName, + sessionStorage.userId + ); } } }) @@ -4275,16 +4316,15 @@ export default { * 设置历史文件界面 */ showFileMilestone: function(file) { - if(file.status == 1 && file.modifyUserID != sessionStorage.userId) - { + if (file.status == 1 && file.modifyUserID != sessionStorage.userId) { this.$notify({ - title: "温馨提示", - message: "其他人编辑中,不能设置历史文件", - type: "warning", - offset: 100, - duration: 5000 - }); - return; + title: "温馨提示", + message: "其他人编辑中,不能设置历史文件", + type: "warning", + offset: 100, + duration: 5000 + }); + return; } this.dialogFileHistory = true; @@ -4329,16 +4369,15 @@ export default { if (this.isCreating) { return; } - if(file.status == 1 && file.modifyUserID != sessionStorage.userId) - { + if (file.status == 1 && file.modifyUserID != sessionStorage.userId) { this.$notify({ - title: "温馨提示", - message: "其他人编辑中,不能设置历史文件", - type: "warning", - offset: 100, - duration: 5000 - }); - return; + title: "温馨提示", + message: "其他人编辑中,不能设置历史文件", + type: "warning", + offset: 100, + duration: 5000 + }); + return; } this.isCreating = true; var thisApp = this; @@ -4493,13 +4532,17 @@ export default { duration: 2500 }); thisApp.goFolder(thisApp.nowFolderIndex); - var nowFile=response.data.data; - var newFileName=nowFile.archName+"."+nowFile.extension; - if(thisApp.isClient) - { + var nowFile = response.data.data; + var newFileName = nowFile.archName + "." + nowFile.extension; + if (thisApp.isClient) { // 客户复制文件 // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID - back.copyFile(nowFile.archID,newFileName,sessionStorage.userId,nowFile.folderID); + back.copyFile( + nowFile.archID, + newFileName, + sessionStorage.userId, + nowFile.folderID + ); } } else { this.$notify({ @@ -4593,21 +4636,29 @@ export default { }); thisApp.dialogCopyAndMove = false; thisApp.listFiles(); - var nowFile=response.data.data; - var newFileName=nowFile.archName+"."+nowFile.extension; - if(thisApp.isClient) - { + var nowFile = response.data.data; + var newFileName = nowFile.archName + "." + nowFile.extension; + if (thisApp.isClient) { var file = response.data.data; - if(thisApp.classif == "copy") - { + if (thisApp.classif == "copy") { // 客户复制文件 // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID;5:strNewFileID:新文件ID - back.copyFile(thisApp.BtnRightFile.archID,newFileName,sessionStorage.userId,nowFile.folderID,nowFile.archID); - } - else{ + back.copyFile( + thisApp.BtnRightFile.archID, + newFileName, + sessionStorage.userId, + nowFile.folderID, + nowFile.archID + ); + } else { // 客户端移动文件 // 1.strFileId:文件ID;2.strNewFileName:新文件名;3.strUserId:用户ID;4.strFolderId:目的文件夹ID - back.moveFile(nowFile.archID,newFileName,sessionStorage.userId,nowFile.folderID); + back.moveFile( + nowFile.archID, + newFileName, + sessionStorage.userId, + nowFile.folderID + ); } } } else { @@ -5255,10 +5306,9 @@ export default { this.dialogNewCloudFileVisible = false; this.isShowNewFiledialog = false; this.createCloudFileName = ""; - var file=response.data.data; - if(this.isClient) - { - this.clientDownLoad(file,1); + var file = response.data.data; + if (this.isClient) { + this.clientDownLoad(file, 1); } } else { this.$notify({ @@ -5317,6 +5367,8 @@ export default { const offsetWidth = this.$el.offsetWidth; // container width const maxLeft = offsetWidth - menuMinWidth; // left boundary const left = e.clientX - offsetLeft; // 15: margin right + console.log(e.clientX); + console.log(offsetLeft); if (left > maxLeft) { this.left = maxLeft; } else { @@ -5330,10 +5382,10 @@ export default { } if (type == 2 || type == 3) { //工作文件下 指定显示某些菜单项 - if(this.currentPageType==1){ - this.isShowMenuFile = true - }else{ - this.isShowMenuFile = false + if (this.currentPageType == 1) { + this.isShowMenuFile = true; + } else { + this.isShowMenuFile = false; } if (file.status == 2) { if (this.isClient) { @@ -5341,40 +5393,40 @@ export default { } else { this.top = this.top - 50; } - } else { + } else { if (this.isClient) { this.top = this.top - 100; } else { this.top = this.top - 50; } } - }else if (type == 4) { + } else if (type == 4) { //工作文件下 不显示“新建文件夹”菜单项 - if(this.currentPageType==1){ - this.isShowMenuFoldergroup = false - }else{ - this.isShowMenuFoldergroup = true + if (this.currentPageType == 1) { + this.isShowMenuFoldergroup = false; + } else { + this.isShowMenuFoldergroup = true; } //点击空白处只显示“新建文件夹” - if(file=="新建文件夹"){ - this.isShowMenuItemCreateFoldergroup = true - }else{ - this.isShowMenuItemCreateFoldergroup = false + if (file == "新建文件夹") { + this.isShowMenuItemCreateFoldergroup = true; + } else { + this.isShowMenuItemCreateFoldergroup = false; } //显示分组菜单的位置 if (this.isClient) { - this.top = this.top - 100; + this.top = this.top - 0; } else { - this.top = this.top - 5; + this.top = this.top + 75; } - }else{ - //工作文件下 指定显示某些菜单项 - if(this.currentPageType==1){ - this.isShowMenuFile = true - }else{ - this.isShowMenuFile = false + } else { + //工作文件下 指定显示某些菜单项 + if (this.currentPageType == 1) { + this.isShowMenuFile = true; + } else { + this.isShowMenuFile = false; } - //显示分组菜单的位置 + //显示分组菜单的位置 if (this.isClient) { this.top = this.top - 100; } else { @@ -5385,9 +5437,9 @@ export default { this.showType = type; this.BtnRightFile = file; //鼠标右击的文件 //this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组 - if(file=="新建文件夹"){ - this.btnRightFoldergoup={} - }else{ + if (file == "新建文件夹") { + this.btnRightFoldergoup = {}; + } else { this.btnRightFoldergoup = file; //zxm+ 鼠标右击的文件分组 } }, @@ -5543,7 +5595,7 @@ export default { * 双击文件夹组名称 进入文件夹 */ intoFoldergroup: function(foldergroup) { - if(foldergroup==null || JSON.stringify(foldergroup)=='{}'){ + if (foldergroup == null || JSON.stringify(foldergroup) == "{}") { this.$notify({ title: "温馨提示", message: "请选中文件夹或新建文件夹", @@ -5551,7 +5603,7 @@ export default { offset: 100, duration: 2500 }); - return + return; } this.dbClickSelectedFolderGroupData = foldergroup; this.isShowWorkt = false; @@ -5622,7 +5674,10 @@ export default { */ renameFoldergroup: function(btnRightFoldergoup) { var thisApp = this; - if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + if ( + thisApp.btnRightFoldergoup == null || + JSON.stringify(thisApp.btnRightFoldergoup) == "{}" + ) { thisApp.$notify({ title: "温馨提示", message: "请选中文件夹或新建文件夹", @@ -5630,7 +5685,7 @@ export default { offset: 100, duration: 2500 }); - return + return; } this.$prompt( "当前文件夹名称: " + btnRightFoldergoup.folderGroupName, @@ -5682,7 +5737,10 @@ export default { */ copyAndMoveFoldergroup: function(btnRightFoldergoup, strCopyOrMove) { var thisApp = this; - if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + if ( + thisApp.btnRightFoldergoup == null || + JSON.stringify(thisApp.btnRightFoldergoup) == "{}" + ) { thisApp.$notify({ title: "温馨提示", message: "请选中文件夹或新建文件夹", @@ -5690,7 +5748,7 @@ export default { offset: 100, duration: 2500 }); - return + return; } if (strCopyOrMove == "move") { thisApp.dialogTtile = "移动到其它文件夹"; @@ -5780,7 +5838,10 @@ export default { */ removeRecycle: function(btnRightFoldergoup) { var thisApp = this; - if(thisApp.btnRightFoldergoup==null || JSON.stringify(thisApp.btnRightFoldergoup)=='{}'){ + if ( + thisApp.btnRightFoldergoup == null || + JSON.stringify(thisApp.btnRightFoldergoup) == "{}" + ) { thisApp.$notify({ title: "温馨提示", message: "请选中文件夹或新建文件夹", @@ -5788,7 +5849,7 @@ export default { offset: 100, duration: 2500 }); - return + return; } thisApp .$axios({