|
|
|
@ -58,6 +58,17 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
{ name: '预警记录', url: '/records_nav/petrolStation' }, |
|
|
|
|
{ name: '证照管理', url: '/license/petrolStation' }, |
|
|
|
|
] |
|
|
|
|
menu3 = [ |
|
|
|
|
{ name: '组织机构管理', url: '/system/organization' }, |
|
|
|
|
{ name: '用户管理', url: '/system/user' }, |
|
|
|
|
{ name: '角色管理', url: '/system/role' }, |
|
|
|
|
{ name: '分析主机管理', url: '/system/host' }, |
|
|
|
|
{ name: '推送管理', url: '/system/push' }, |
|
|
|
|
{ name: '经营类证照管理', url: '/system/updateOfLicense' }, |
|
|
|
|
{ name: '资产类证照管理', url: '/system/fileOfLicense' }, |
|
|
|
|
{ name: '菜单管理', url: '/system/menu' }, |
|
|
|
|
] |
|
|
|
|
xitongguanli = false |
|
|
|
|
userMenu = [] |
|
|
|
|
tap = [] |
|
|
|
|
menuList1 = [] |
|
|
|
@ -91,12 +102,11 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
for (let index = 0; index < this.menu2.length; index++) { |
|
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
|
if (this.tap[k] == this.menu2[index].name) { |
|
|
|
|
this.menuList2.push(this.menu2[index]) |
|
|
|
|
this.menuList1.push(this.menu2[index]) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log(this.menuList2); |
|
|
|
|
} else {//初始化登陆 如果是管理者用户
|
|
|
|
|
this.isGasStationNav = false |
|
|
|
|
this.isGasStationBack = false |
|
|
|
@ -107,8 +117,13 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (let index = 0; index < this.tap.length; index++) { |
|
|
|
|
if (this.tap[index] == "系统管理") { |
|
|
|
|
this.xitongguanli = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.router.events.pipe( |
|
|
|
|
filter(event => event instanceof NavigationEnd) |
|
|
|
@ -436,7 +451,20 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
navChange(router) { |
|
|
|
|
this.router.navigate([router]) |
|
|
|
|
} |
|
|
|
|
navChange2() { |
|
|
|
|
for (let index = 0; index < this.menu3.length; index++) { |
|
|
|
|
let url = "" |
|
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
|
if (this.tap[k] == this.menu3[index].name) { |
|
|
|
|
this.menuList2.push(this.menu3[index]) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.router.navigate([this.menuList2[0].url]) |
|
|
|
|
} |
|
|
|
|
goback() { |
|
|
|
|
this.router.navigate(['/plan']) |
|
|
|
|
this.isGasStationNav = false |
|
|
|
|