|
|
@ -68,11 +68,11 @@ export class HomeComponent implements OnInit { |
|
|
|
{ name: '资产类证照管理', url: '/system/fileOfLicense' }, |
|
|
|
{ name: '资产类证照管理', url: '/system/fileOfLicense' }, |
|
|
|
{ name: '菜单管理', url: '/system/menu' }, |
|
|
|
{ name: '菜单管理', url: '/system/menu' }, |
|
|
|
] |
|
|
|
] |
|
|
|
xitongguanli=false |
|
|
|
xitongguanli = false |
|
|
|
userMenu=[] |
|
|
|
userMenu = [] |
|
|
|
tap=[] |
|
|
|
tap = [] |
|
|
|
menuList1=[] |
|
|
|
menuList1 = [] |
|
|
|
menuList2=[] |
|
|
|
menuList2 = [] |
|
|
|
selectedItem |
|
|
|
selectedItem |
|
|
|
routerChange(item) { |
|
|
|
routerChange(item) { |
|
|
|
if (item.name == this.selectedItem) { |
|
|
|
if (item.name == this.selectedItem) { |
|
|
@ -84,12 +84,12 @@ export class HomeComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
let a= sessionStorage.getItem('userdata') |
|
|
|
let a = sessionStorage.getItem('userdata') |
|
|
|
this.userMenu=JSON.parse(a).menus |
|
|
|
this.userMenu = JSON.parse(a).menus |
|
|
|
for (let index = 0; index < this.userMenu.length; index++) { |
|
|
|
for (let index = 0; index < this.userMenu.length; index++) { |
|
|
|
let a=this.userMenu[index].name |
|
|
|
let a = this.userMenu[index].name |
|
|
|
this.tap.push(a) |
|
|
|
this.tap.push(a) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (sessionStorage.getItem('selectedMenu')) { |
|
|
|
if (sessionStorage.getItem('selectedMenu')) { |
|
|
|
this.selectedItem = sessionStorage.getItem('selectedMenu') |
|
|
|
this.selectedItem = sessionStorage.getItem('selectedMenu') |
|
|
@ -101,8 +101,8 @@ export class HomeComponent implements OnInit { |
|
|
|
this.isGasStationNav = true |
|
|
|
this.isGasStationNav = true |
|
|
|
for (let index = 0; index < this.menu2.length; index++) { |
|
|
|
for (let index = 0; index < this.menu2.length; index++) { |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
if (this.tap[k]==this.menu2[index].name) { |
|
|
|
if (this.tap[k] == this.menu2[index].name) { |
|
|
|
this.menuList1.push(this.menu2[index])
|
|
|
|
this.menuList1.push(this.menu2[index]) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -112,16 +112,16 @@ export class HomeComponent implements OnInit { |
|
|
|
this.isGasStationBack = false |
|
|
|
this.isGasStationBack = false |
|
|
|
for (let index = 0; index < this.menu1.length; index++) { |
|
|
|
for (let index = 0; index < this.menu1.length; index++) { |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
if (this.tap[k]==this.menu1[index].name) { |
|
|
|
if (this.tap[k] == this.menu1[index].name) { |
|
|
|
this.menuList1.push(this.menu1[index]) |
|
|
|
this.menuList1.push(this.menu1[index]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for (let index = 0; index < this.tap.length; index++) { |
|
|
|
for (let index = 0; index < this.tap.length; index++) { |
|
|
|
if (this.tap[index]=="系统管理") { |
|
|
|
if (this.tap[index] == "系统管理") { |
|
|
|
this.xitongguanli=true |
|
|
|
this.xitongguanli = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -246,7 +246,7 @@ export class HomeComponent implements OnInit { |
|
|
|
console.log('推送信息后获取信息', data) |
|
|
|
console.log('推送信息后获取信息', data) |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
let copydata = data.result |
|
|
|
let copydata = data.result |
|
|
|
if (item.notification.data.properties.EventSystemName == '灭火器维护') { |
|
|
|
if (copydata.violation.violationType == '设备监测') { |
|
|
|
copydata.violatedItemSnapshotObj = JSON.parse(copydata.violatedItemSnapshot) |
|
|
|
copydata.violatedItemSnapshotObj = JSON.parse(copydata.violatedItemSnapshot) |
|
|
|
const modal = this.modal.create({ |
|
|
|
const modal = this.modal.create({ |
|
|
|
nzContent: DisposeequipmentComponent, |
|
|
|
nzContent: DisposeequipmentComponent, |
|
|
@ -453,15 +453,15 @@ export class HomeComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
navChange2() { |
|
|
|
navChange2() { |
|
|
|
for (let index = 0; index < this.menu3.length; index++) { |
|
|
|
for (let index = 0; index < this.menu3.length; index++) { |
|
|
|
let url="" |
|
|
|
let url = "" |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
for (let k = 0; k < this.tap.length; k++) { |
|
|
|
if (this.tap[k]==this.menu3[index].name) { |
|
|
|
if (this.tap[k] == this.menu3[index].name) { |
|
|
|
this.menuList2.push(this.menu3[index])
|
|
|
|
this.menuList2.push(this.menu3[index]) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.router.navigate([this.menuList2[0].url]) |
|
|
|
this.router.navigate([this.menuList2[0].url]) |
|
|
|
} |
|
|
|
} |
|
|
|