From bee67825c36d362fb28a03339182e4bd8e7c735e Mon Sep 17 00:00:00 2001 From: kim131 <1035828775@qq.com> Date: Tue, 1 Dec 2020 10:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=8C=87=E6=B4=BE=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4=E9=A1=B9=E7=9B=AE=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E4=BA=BAbug=E4=BF=AE=E6=94=B9=20=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E8=8A=82=E7=82=B9=E5=88=97=E8=A1=A8=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/css/main.css | 4 +- .../components_web/distWork/distWork.vue | 52 +++++++++++++++---- src/views/main_web/watchall/watchall.vue | 4 +- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/public/static/css/main.css b/public/static/css/main.css index 5b17571a..2b1b486a 100644 --- a/public/static/css/main.css +++ b/public/static/css/main.css @@ -4254,8 +4254,8 @@ button:focus { } .dialogcontentbodyrow{ margin: 0 10px; - /* height: calc(100vh - 144px); - overflow-y: auto; */ + height: calc(100vh - 144px); + overflow-y: scroll; } .icon-icon_yunpan{ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); diff --git a/src/views/components_web/distWork/distWork.vue b/src/views/components_web/distWork/distWork.vue index 7c3dedbe..5173dd40 100644 --- a/src/views/components_web/distWork/distWork.vue +++ b/src/views/components_web/distWork/distWork.vue @@ -75,7 +75,7 @@
-
+
@@ -316,7 +316,7 @@ export default { isShowFirstPage: true, isShowSecondPage: false, isShowThreePage: false, - InitData: [], + InitData: {}, listNewFolder: [], listProjProp: [], listDept: [], @@ -355,6 +355,7 @@ export default { this.fetchProjectDetail(); }, computed: { + /** * 是否可以点击职员 */ @@ -431,6 +432,12 @@ export default { } }, methods: { + /* + * 是否有权限可以删除自己 + */ + isAllowedDelete(item) { + return (!this.listManagerUser.includes(item) && this.currUser.id !== item.id && this.InitData.manageUser && this.InitData.manageUser.length > 0 && this.InitData.manageUser[0].id == sessionStorage.userId && !this.allChildrenLists.includes(this.InitData) && item.id == this.InitData.manageUser[0].id) + }, /** * 点击切换项目负责人 同一个用户点击两次可以切换状态 */ @@ -440,6 +447,18 @@ export default { return; } + const tempManagerMap = this.listManagerUser.map(m => m.id) || []; + //不是创建者 不是项目不负责人 且也不是顶级节点的负责人 + if(!tempManagerMap.includes(sessionStorage.userId) && this.currUser.id !== sessionStorage.userId && this.InitData.manageUser && this.InitData.manageUser.length > 0 && this.InitData.manageUser[0].id == sessionStorage.userId && !this.allChildrenLists.includes(this.InitData) ) + { + this.$notify.info({ + title: "温馨提示", + message: "没有权限更换工作负责人。", + offset: 100, + duration: 5000 + }); + return; + } this.selectedUser.forEach(user => { user.folderPerm = (user.id === clickUser.id) ? 2 : 1; if(user.folderPerm === 2) { @@ -686,6 +705,7 @@ export default { * 进入时,重置权限 */ setFolderPerm: function (data) { + this.listDept=JSON.parse(JSON.stringify(this.currListDeptUserData)); for (var j = 0; j < this.listDept.length; j++) { for (var k = 0; k < this.listDept[j].listUser.length; k++) { @@ -703,7 +723,8 @@ export default { if(!this.isShowManager)//选择添加项目负责人职员 { // if(this.currUser.accountId == sessionStorage.userId && sessionStorage.accountId == this.listDept[j].listUser[k].userID ) - if(this.currUser.id == sessionStorage.userId && sessionStorage.userId == this.listDept[j].listUser[k].id) + // 让项目的创建者显示出来 + if(this.currUser.id == this.listDept[j].listUser[k].id) { this.listDept[j].listUser[k].selected = true; } @@ -812,9 +833,7 @@ export default { * e:点击触发的事件 */ handleCheckedOne(topIndex, user, e) { - if(!this.isShowManager) - { - if(user.id == sessionStorage.userId) + if(this.isAllowedDelete(user)) { this.$notify.info({ @@ -825,7 +844,9 @@ export default { user.selected=true; return; } - if(user.id == this.currUser.accountId) + if(!this.isShowManager) + { + if(user.id == this.currUser.id) { this.$notify.info({ @@ -837,10 +858,10 @@ export default { return; } } - // 跳过负责人 - if(user.folderPerm == 2) + //点击左侧的人员列表删除 + if(user.folderPerm == 2 && !user.selected) { - return; + this.removeManageUser(user); } //三级change事件 if (e) { @@ -923,6 +944,15 @@ export default { * 移除选中人员 */ removeSelectUser: function (item) { + if(item.id == this.currUser.id && !this.isShowManager) + { + this.$notify.info({ + message: "没有权限删除项目创建者。", + offset: 100, + duration: 5000 + }); + return; + } if(item.id == sessionStorage.userId && !this.isShowManager) { this.$notify.info({ @@ -934,7 +964,7 @@ export default { } // 如果当前登录者是项目负责人分配的某个节点的负责人(不是项目负责人) 那么不能删除自己 // 自己指派自己是可以移除的 - if(this.InitData.manageUser != ''&& this.InitData.manageUser[0].id == sessionStorage.userId && !this.allChildrenLists.includes(this.InitData)) + if(this.isAllowedDelete(item)) { this.$notify.info({ title: "温馨提示", diff --git a/src/views/main_web/watchall/watchall.vue b/src/views/main_web/watchall/watchall.vue index d90336bd..31ac9777 100644 --- a/src/views/main_web/watchall/watchall.vue +++ b/src/views/main_web/watchall/watchall.vue @@ -51,9 +51,9 @@ isShowLeftPage: true,//是否显示左边部分的信息 btnLeft: 24,//控制按钮的位置 iconRotateDeg: 90, - rightPartUrl: 'http://10.240.5.17:8088/ForgeModelData/fhy/index.html', + rightPartUrl: 'http://www.lockingos.org:9000/fhy-model/fhy/index.html', superMapUrl: 'http://www.lockingos.org:9001/?scene=http://cim.azut.cn:8090/iserver/services/3D-FuHuaYuan/rest/realspace', - forgeModelUrl: 'http://10.240.5.17:8088/ForgeModelData/fhy/index.html', + forgeModelUrl: 'http://www.lockingos.org:9000/fhy-model/fhy/index.html', } }, mounted() {