邵佳豪 2 years ago
parent
commit
9552b95931
  1. 2
      src/app/pages/login/login.component.ts
  2. 7
      src/app/system-management/navigation/navigation.component.ts
  3. 1
      src/app/system-management/role/role.component.ts

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

@ -124,7 +124,7 @@ export class LoginComponent implements OnInit {
sessionStorage.setItem("encryptedAccessToken", data.result.encryptedAccessToken); sessionStorage.setItem("encryptedAccessToken", data.result.encryptedAccessToken);
this.http.get('/api/services/app/Session/GetCurrentLoginInformations').subscribe((data: any) => { this.http.get('/api/services/app/Session/GetCurrentLoginInformations').subscribe((data: any) => {
console.log('GetCurrentLoginInformations', data.result) console.log('GetCurrentLoginInformations', data.result)
if (data.result.user.menus.length == 0) { if (data.result.user.menus.length == 0 && data.result.name!="admin") {
this.message.create('error', `当前用户未分配菜单`); this.message.create('error', `当前用户未分配菜单`);
this.isLoading = false this.isLoading = false
return return

7
src/app/system-management/navigation/navigation.component.ts

@ -45,10 +45,12 @@ export class NavigationComponent implements OnInit {
this.menuList1.push(this.menu1[index]) this.menuList1.push(this.menu1[index])
} }
} }
console.log(this.menuList1); // console.log(this.menuList1);
} }
for (let index = 0; index < this.menu3.length; index++) { for (let index = 0; index < this.menu3.length; index++) {
let url="" if(JSON.parse(a).userName=="admin"){
this.menuList2=this.menu3
}else{
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])
@ -56,6 +58,7 @@ export class NavigationComponent implements OnInit {
} }
} }
}
} }

1
src/app/system-management/role/role.component.ts

@ -75,6 +75,7 @@ export class RoleComponent implements OnInit {
nzMaskClosable: false, nzMaskClosable: false,
nzOnOk: async () => { nzOnOk: async () => {
if (instance.validateForm.valid) { if (instance.validateForm.valid) {
await new Promise(resolve => { await new Promise(resolve => {
console.log('表单信息', instance.validateForm) console.log('表单信息', instance.validateForm)
let arr = [] let arr = []

Loading…
Cancel
Save