| | |
| | | if (d == "保安公司管理员") { |
| | | // console.log(k); |
| | | for (var n in k) { |
| | | if (k[n].title == "保安" || k[n].title == "保安公司管理员") { |
| | | if (k[n].title == "保安" || k[n].title == "保安公司管理员" || k[n].title == "分公司管理员") { |
| | | b.push(k[n]); |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | } else if (d == "公安管理员") { |
| | | } else if (d == "分公司管理员") { |
| | | for (var j in k) { |
| | | if (k[j].title == "分公司管理员" || k[j].title == "保安") { |
| | | b.push(k[j]); |
| | | } |
| | | if(k[j].children){ |
| | | for (var h in k[j].children) { |
| | | if (k[j].children[h].title == "分公司管理员" || k[j].children[h].title == "保安") { |
| | | b.push(k[j].children[h]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | }else if (d == "公安管理员") { |
| | | for (var i in k) { |
| | | if (k[i].title == "公安管理员") { |
| | | b.push(k[i]); |
| | |
| | | //公安局进入 |
| | | if ( |
| | | this.userInfo.role_name == "公安管理员" |
| | | |
| | | ) { |
| | | var parentId = this.userInfo.dept_id; |
| | | var userId = this.userInfo.Id; |
| | |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | } else { |
| | | // getDeptLazyTree(0).then((res) => { |
| | | // const column = this.findObject(this.option.group, "deptId"); |
| | | // column.dicData = res.data.data; |
| | | // }); |
| | | } else if( this.userInfo.role_name == "administrator"){ |
| | | getDeptLazyTree(0).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }else { |
| | | getSecurityDeptTree(null,null,this.userInfo.dept_id).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |