| | |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | } else if (d == "公安管理员" || d=="民警") { |
| | | } else if (d == "公安管理员") { |
| | | for (var i in k) { |
| | | if (k[i].title == "公安管理员" || k[i].title == "民警") { |
| | | b.push(k[i]); |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | }else if (d == "民警") { |
| | | for (var z in k) { |
| | | if (k[z].title == "民警") { |
| | | b.push(k[z]); |
| | | } |
| | | if (k[z].children) { |
| | | for (var ff in k[z].children) { |
| | | if ( |
| | | k[z].children[ff].title == "民警" |
| | | ) { |
| | | b.push(k[z].children[ff]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | column.dicData = b; |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name == "民警") { |
| | | if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name != "民警") { |
| | | const column = this.findObject(this.option.group, "code"); |
| | | column.display = false; |
| | | } |
| | |
| | | }); |
| | | } |
| | | if (["add"].includes(type)) { |
| | | if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name == "民警") { |
| | | if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name !== "民警") { |
| | | const column = this.findObject(this.option.group, "code"); |
| | | column.display = false; |
| | | } |