|
|
|
@ -88,9 +88,10 @@ export class OilUnloadingProcessListComponent implements OnInit {
|
|
|
|
|
let loginUserInfo |
|
|
|
|
if (sessionStorage.getItem('isGasStation') == 'true') { |
|
|
|
|
loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) |
|
|
|
|
this.returnLastMenus() |
|
|
|
|
this.returnLastMenus(true) |
|
|
|
|
} else { |
|
|
|
|
loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) |
|
|
|
|
this.returnLastMenus(false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (loginUserInfo.roles.find((item) => { |
|
|
|
@ -133,15 +134,28 @@ export class OilUnloadingProcessListComponent implements OnInit {
|
|
|
|
|
ngOnDestroy(): void { |
|
|
|
|
this.resizeListener.unsubscribe() |
|
|
|
|
} |
|
|
|
|
returnLastMenus() { |
|
|
|
|
let userMenu = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).menus |
|
|
|
|
|
|
|
|
|
for (let index = 0; index < userMenu.length; index++) { |
|
|
|
|
if (userMenu[index].parentId==6) { |
|
|
|
|
this.button=true |
|
|
|
|
returnLastMenus(e) { |
|
|
|
|
if(e){ |
|
|
|
|
let userMenu = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).menus |
|
|
|
|
for (let index = 0; index < userMenu.length; index++) { |
|
|
|
|
if (userMenu[index].parentId==6) { |
|
|
|
|
this.button=true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
let userMenu = JSON.parse(sessionStorage.getItem('userdata')).menus |
|
|
|
|
console.log(userMenu); |
|
|
|
|
|
|
|
|
|
for (let index = 0; index < userMenu.length; index++) { |
|
|
|
|
if (userMenu[index].parentId==6) { |
|
|
|
|
this.button=true |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//刷新饼图图表数据
|
|
|
|
|
num |
|
|
|
@ -486,8 +500,8 @@ export class OilUnloadingProcessListComponent implements OnInit {
|
|
|
|
|
this.num = data.totalCount |
|
|
|
|
//饼图
|
|
|
|
|
this.oilchartpieOptionPieData1 = [ |
|
|
|
|
{ name: '预警事件', value: data.notCorrectCount }, |
|
|
|
|
{ name: '正常操作', value: data.correctCount }, |
|
|
|
|
{ name: '预警车次', value: data.notCorrectCount }, |
|
|
|
|
{ name: '合规车次', value: data.correctCount }, |
|
|
|
|
] |
|
|
|
|
this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1 |
|
|
|
|
this.myChart.setOption(this.oilchartpieOption); |
|
|
|
@ -497,7 +511,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
|
|
|
|
|
this.myChart.setOption({ |
|
|
|
|
legend: { selected: { [params.name]: true } } |
|
|
|
|
}) |
|
|
|
|
if (params.name == '预警事件') { |
|
|
|
|
if (params.name == '预警车次') { |
|
|
|
|
this.isgoback = true |
|
|
|
|
this.refreshEchartsData2(this.echartsData) |
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
@ -509,7 +523,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.myChart.on('click', (params) => { |
|
|
|
|
if (params.name == '预警事件') { |
|
|
|
|
if (params.name == '预警车次') { |
|
|
|
|
this.isgoback = true |
|
|
|
|
this.refreshEchartsData2(this.echartsData) |
|
|
|
|
this.validateForm.patchValue({ |
|
|
|
|