From 5984251cfbaa9c30e529a5ff8c300646ecb1b56f Mon Sep 17 00:00:00 2001 From: kim131 <1035828775@qq.com> Date: Thu, 19 Nov 2020 16:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=8C=87=E6=B4=BE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=95=B4=E5=90=88=20=E5=BC=B9=E7=AA=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/css/main.css | 8 +- .../components_web/distWork/distWork.vue | 546 +----- .../components_web/distWork/distWorkCopy.vue | 1605 +++++++++++++++++ .../components_web/distWork/folder-list.vue | 4 +- src/views/components_web/newProj/newProj.vue | 2 +- vue.config.js | 4 +- 6 files changed, 1712 insertions(+), 457 deletions(-) create mode 100644 src/views/components_web/distWork/distWorkCopy.vue diff --git a/public/static/css/main.css b/public/static/css/main.css index 5ace66ca..07080109 100644 --- a/public/static/css/main.css +++ b/public/static/css/main.css @@ -7132,10 +7132,12 @@ border-radius:2em; top: -26px; } .middlehuangguan{ - font-size: 49px; + /* font-size: 49px; */ + font-size: 30px; + line-height:30px; color: #FFD232; - position: relative; - top: -10px; + /* position: relative; */ + /* top: -10px; */ margin-right: 10px; } .mainpeople_H{ diff --git a/src/views/components_web/distWork/distWork.vue b/src/views/components_web/distWork/distWork.vue index d4ee7862..47248dc9 100644 --- a/src/views/components_web/distWork/distWork.vue +++ b/src/views/components_web/distWork/distWork.vue @@ -46,7 +46,7 @@
- +
@@ -55,13 +55,13 @@ {{ curProjCreatePeop }}

项目概况

-

指派职员

-

指派工作负责人

+ +

指派职员

- 分配职员 - 完成或跳过 + 确定 + 确定 完成
@@ -134,167 +134,6 @@ :aloneAddUserOnlyStaff="aloneAddUserOnlyStaff" :allChildrenLists="allChildrenLists" /> - -
@@ -326,7 +165,7 @@ -
+
@@ -349,36 +188,17 @@ )" :label="user" :key="index"> --> - -
-
- -
-
- - - - - - - - - - - - - - -
-
-
- -
-

已选职员

-

已选项目负责人

-
-
- 工作负责人 -
- -
- -
-
- -
- -
-

- 工作负责人有且仅有一人,其将对:{{ - currWorkName - }},进行职员指派。 -

-
- -
-
+
+
+
-
-
- {{ dept.deptName }} -
+
+ {{dept.deptName}} +
-
- @@ -640,6 +240,8 @@
+ +
@@ -810,7 +412,24 @@ export default { } }, methods: { + /** + * 点击切换项目负责人 同一个用户点击两次可以切换状态 + */ + changeManagerClick(clickUser) { + if(!this.isShowManager) { + // 如果是选择项目负责人 则不需要进行状态切换 + return; + } + this.selectedUser.forEach(user => { + user.folderPerm = (user.id === clickUser.id) ? 2 : 1; + if(user.folderPerm === 2) { + this.InitData.manageUser.splice(0, 1, user); + } else { + this.InitData.manageUser.splice(0, 1);//取消选中的负责人状态 + } + }) + }, /** * 判断用户是否是项目负责人 */ @@ -1059,10 +678,10 @@ export default { this.listDept[j].listUser[k].selected = true; } - if(!this.isShowManager) + if(!this.isShowManager)//选择添加项目负责人职员 { // if(this.currUser.accountId == sessionStorage.userId && sessionStorage.accountId == this.listDept[j].listUser[k].userID ) - if(this.currUser.accountId == sessionStorage.userId && sessionStorage.accountId == this.listDept[j].listUser[k].id) + if(this.currUser.id == sessionStorage.userId && sessionStorage.userId == this.listDept[j].listUser[k].id) { this.listDept[j].listUser[k].selected = true; } @@ -1124,7 +743,12 @@ export default { data.listUser=this.listManagerUser; this.setFolderPerm(data); - this.selectedUser =data.listUser; + this.selectedUser = data.listUser; + let find = data.listUser.find(user => user.id === this.currUser.id); + if(!find) { + this.currUser.folderPerm = 2;//给项目的创建者设置权限 让它带上皇冠 + data.listUser.push(this.currUser); + } this.selectedManageUser = []; this.isShowThreePage = true; this.isShowFirstPage = false; @@ -1210,24 +834,24 @@ export default { /** * 选择负责人 */ - handleCheckedOnlyOne(topIndex, user, e) { - //三级change事件 - if (e) { - //将选中的人员返回给添加合作人页面 - this.checkDeptUserName(e, user); - this.setManagerUser(user); - this.isSlectPal = false; - } else { - //将选中的人员返回给添加合作人页面 - this.checkDeptUserName(e, user); - this.InitData.manageUser =[]; - this.isSlectPal = true; - //debugger; - } + // handleCheckedOnlyOne(topIndex, user, e) { + // //三级change事件 + // if (e) { + // //将选中的人员返回给添加合作人页面 + // this.checkDeptUserName(e, user); + // this.setManagerUser(user); + // this.isSlectPal = false; + // } else { + // //将选中的人员返回给添加合作人页面 + // this.checkDeptUserName(e, user); + // this.InitData.manageUser =[]; + // this.isSlectPal = true; + // //debugger; + // } - this.getIsCheckSecondLevel(topIndex); - this.getIsCheckAll(); - }, + // this.getIsCheckSecondLevel(topIndex); + // this.getIsCheckAll(); + // }, /** * 当前二级选中状态修正 */ @@ -1281,14 +905,31 @@ export default { { this.$notify.info({ title: "温馨提示", - message: "不能移除自己哦", + message: "不能移除自己。", offset: 100, duration: 5000 }); return; } - this.checkDeptUserName(false, item); - this.cancelCheck(item.id); + // 如果当前登录者是项目负责人分配的某个节点的负责人(不是项目负责人) 那么不能删除自己 + // 自己指派自己是可以移除的 + if(this.InitData.manageUser != ''&& this.InitData.manageUser[0].id == sessionStorage.userId && !this.allChildrenLists.includes(this.InitData)) + { + this.$notify.info({ + title: "温馨提示", + message: "没有权限移除自己。", + offset: 100, + duration: 5000 + }); + return; + } + if(item.folderPerm == 2) { + this.removeManageUser(item); + } else { + this.checkDeptUserName(false, item); + this.cancelCheck(item.id); + } + }, /** * 移除负责人 @@ -1549,7 +1190,7 @@ export default { const folderList = mergeFolderList(folder, userHash); this.getfolderPerm(folderList) this.listNewFolder = folderList; - console.log('得到的listNewFolder', this.listNewFolder); + // console.log('得到的listNewFolder', this.listNewFolder); this.getAllChildrenLists(this.listNewFolder,this.userId,this.allChildrenLists); }, async getUserList(){ @@ -1605,7 +1246,9 @@ export default { Work: [], }; params.ProjectManagerId = this.listManagerUser.length > 0 ? this.listManagerUser.map(projManager => { - return projManager.id; + if(projManager.id !== sessionStorage.createUserID) { + return projManager.id; + } }).join(',') : ''; circleGetWorkData(this.listNewFolder); @@ -1761,6 +1404,11 @@ function mergeFolderList(plainFolderList, userHash) { .notclick .avtarface { cursor:not-allowed; } - + .set-crown-position { + margin: 4px 10px 0 0; + } + .set-yiyun-line { + margin: 0 0 0 15px; + } \ No newline at end of file diff --git a/src/views/components_web/distWork/distWorkCopy.vue b/src/views/components_web/distWork/distWorkCopy.vue new file mode 100644 index 00000000..11afa365 --- /dev/null +++ b/src/views/components_web/distWork/distWorkCopy.vue @@ -0,0 +1,1605 @@ + + + + + \ No newline at end of file diff --git a/src/views/components_web/distWork/folder-list.vue b/src/views/components_web/distWork/folder-list.vue index eab4b152..e8461be5 100644 --- a/src/views/components_web/distWork/folder-list.vue +++ b/src/views/components_web/distWork/folder-list.vue @@ -150,8 +150,8 @@ export default { isAllowedAssignedFolder(user) { return this.allManager.id == this.id //总负责人 || (this.allManagerChild.length > 0 && this.allManagerChild.find(item=>item.id ==this.id))//是不是总负责人 - ||(this.allChildrenLists.length > 0 &&this.allChildrenLists.includes(user))//它的所有子节点 - ||user.manageUser != ''&&user.manageUser[0].id==this.id + ||(this.allChildrenLists.length > 0 && this.allChildrenLists.includes(user))//它的所有子节点 + //||user.manageUser != ''&&user.manageUser[0].id==this.id }, isAllowedAssignedStaffFolder(folder){ return folder.manageUser != ''&&folder.manageUser[0].id==this.id||this.isAllowedAssignedFolder(folder) diff --git a/src/views/components_web/newProj/newProj.vue b/src/views/components_web/newProj/newProj.vue index a45e02d0..ece5f1b7 100644 --- a/src/views/components_web/newProj/newProj.vue +++ b/src/views/components_web/newProj/newProj.vue @@ -800,7 +800,7 @@ this.$confirm("放弃当前的新建项目,内容即将被清空。是否放弃?", "", { confirmButtonText: "放弃", cancelButtonText: "取消", - showClose:false, + // showClose:false, type: "warning", beforeClose: function(action, instance, done) { if (action == 'confirm') { diff --git a/vue.config.js b/vue.config.js index 5d441659..81eac918 100644 --- a/vue.config.js +++ b/vue.config.js @@ -31,8 +31,8 @@ module.exports = { devServer: { proxy: { '/api/pms': { - // target: 'http://47.104.91.134:8089', - target:'http://10.240.32.217:8089', + target: 'http://47.104.91.134:8089', + // target:'http://10.240.32.217:8089', changeOrigin: true, secure: false,