Browse Source

油站高亮以及登录判断

beijing
陈鹏飞 3 years ago
parent
commit
be017e684f
  1. 7
      src/app/pages/login/login.component.ts

7
src/app/pages/login/login.component.ts

@ -97,11 +97,12 @@ export class LoginComponent implements OnInit {
]
init3D
async getGasStationBaseInfo() {
new Promise((resolve, reject) => {
await new Promise((resolve, reject) => {
let params = { organizationUnitId: (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization.id }
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => {
resolve(data.result)
this.init3D = data.result.hasBuildingInfo
})
})
}
@ -145,10 +146,8 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem('isDefaultPassword', JSON.stringify(data.result.user.isDefaultPassword))
sessionStorage.setItem('isPasswordExpired', JSON.stringify(data.result.user.isPasswordExpired))
this.isLoading = false;
if (data.result.user.organization.isGasStation) {
if (data.result.user.organization.isGasStation) {
await this.getGasStationBaseInfo()
if (data.result.user.menus[0].name == "数字油站" && data.result.user.menus.length == 1 && !this.init3D) {
this.message.create('error', `当前用户油站未开通3D且仅分配油站菜单`);
return

Loading…
Cancel
Save