@@ -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() {