-
-
-
-
-
-
-
-
- 全选
- 从部门中选择职员
-
-
-
-
-
- {{ dept.deptName }}
-
- 全选
-
-
-
-
-
-
![]()
-
{{
- user.cnName
- }}
-
-
- {{ user.position}}
-
-
{{
- user.roleName
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
已选职员
-
已选项目负责人
-
-
-
工作负责人
-
-
-
-
-
-
-
-
![]()
-
{{ user.cnName }}
-
-
- {{user.position}}
-
-
-
-
-
- 工作负责人有且仅有一人,其将对:{{
- currWorkName
- }},进行职员指派。
-
-
-
-
-
+
+
+
-
-
-
{{ dept.deptName }}
-
+
+ {{dept.deptName}}
+
-
-
-
-
![]()
-
{{ user.cnName }}
-
-
- {{
- user.position
- }}
-
-
-
-
-
-
-
-
-
+
+
+
+
![]()
+
{{user.cnName}}
+
+
+
@@ -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 @@
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+ {{ curProjCreatePeop }}
+
+ 项目概况
+ 指派职员
+ 指派工作负责人
+
+
+
+ 分配职员
+ 完成或跳过
+ 完成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
项目管理权限
+
+
+
+
+
+
![]()
+
+
{{currUser.cnName}}
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
![]()
+
+
+
{{user.cnName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ nowProject.cnName }}
+
+
+
+
+
+
+ {{ nowProject.strCreateTime }}
+
+
+
+
+
+
+ {{ prop.propValue }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 从部门中选择职员
+
+
+
+
+
+ {{ dept.deptName }}
+
+
+
+
+
+
+
![]()
+
{{
+ user.cnName
+ }}
+
+
+ {{user.position }}
+
+
{{
+ user.roleName
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
已选职员
+
+
+
工作负责人
+
+
+
+
+
+
+
+
![]()
+
{{ user.cnName }}
+
+
+ {{
+ user.position
+ }}
+
+
+
+
+
+
+
+ 工作负责人有且仅有一人,其将对:{{
+ currWorkName
+ }},进行职员指派。
+
+
+
+
+
+
+
+
+
![]()
+
{{user.cnName}}
+
+
+ {{user.position}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 全选
+ 从部门中选择职员
+
+
+
+
+
+ {{ dept.deptName }}
+
+ 全选
+
+
+
+
+
+
![]()
+
{{
+ user.cnName
+ }}
+
+
+ {{ user.position}}
+
+
{{
+ user.roleName
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
已选职员
+
已选项目负责人
+
+
+
工作负责人
+
+
+
+
+
+
+
+
![]()
+
{{ user.cnName }}
+
+
+ {{user.position}}
+
+
+
+
+
+ 工作负责人有且仅有一人,其将对:{{
+ currWorkName
+ }},进行职员指派。
+
+
+
+
+
+
+
+
+
{{ dept.deptName }}
+
+
+
+
+
+
![]()
+
{{ user.cnName }}
+
+
+ {{
+ user.position
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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,