|
|
|
@ -8,6 +8,7 @@ import { Base64 } from 'js-base64';
|
|
|
|
|
import { NzNotificationService } from 'ng-zorro-antd/notification'; |
|
|
|
|
import { NzSafeAny } from 'ng-zorro-antd/core/types'; |
|
|
|
|
import { SelectedMenu } from 'src/app/service/selectedMenu.service'; |
|
|
|
|
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast'; |
|
|
|
|
|
|
|
|
|
declare var abp: any |
|
|
|
|
@Component({ |
|
|
|
@ -98,6 +99,7 @@ export class LoginComponent implements OnInit {
|
|
|
|
|
userMenu = [] |
|
|
|
|
tap = [] |
|
|
|
|
menuList = [] |
|
|
|
|
name="" |
|
|
|
|
submitForm(): void { |
|
|
|
|
|
|
|
|
|
if (!this.remember) { |
|
|
|
@ -161,10 +163,20 @@ export class LoginComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (let index = 0; index < this.tap.length; index++) { |
|
|
|
|
if(this.tap[index]=="今日预警") {this.name="今日预警"} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
sessionStorage.setItem("isGasStation", 'true'); |
|
|
|
|
if(this.name=="今日预警"){ |
|
|
|
|
this.router.navigate(['/todaywarning/petrolStation']) |
|
|
|
|
this.message.create('success', `登录成功`); |
|
|
|
|
sessionStorage.setItem('selectedMenu', '今日预警') |
|
|
|
|
}else{ |
|
|
|
|
this.router.navigate([this.menuList[0].url]) |
|
|
|
|
this.message.create('success', `登录成功`); |
|
|
|
|
sessionStorage.setItem('selectedMenu', this.menuList[0].name) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
let a = sessionStorage.getItem('userdata') |
|
|
|
|
this.userMenu = JSON.parse(a).menus |
|
|
|
@ -179,10 +191,20 @@ export class LoginComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (let index = 0; index < this.tap.length; index++) { |
|
|
|
|
if(this.tap[index]=="首页") {this.name="首页"} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
sessionStorage.setItem("isGasStation", 'false'); |
|
|
|
|
if(this.name=="首页"){ |
|
|
|
|
this.router.navigate(['/homepage']) |
|
|
|
|
this.message.create('success', `登录成功`); |
|
|
|
|
sessionStorage.setItem('selectedMenu', '首页') |
|
|
|
|
}else{ |
|
|
|
|
this.router.navigate([this.menuList[0].url]) |
|
|
|
|
this.message.create('success', `登录成功`); |
|
|
|
|
sessionStorage.setItem('selectedMenu', this.menuList[0].name) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, err => { |
|
|
|
|