From 1d09e1fcd5772b6d3e42bbc99644c9f799575f2b Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 28 Jun 2022 09:29:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/system-management/role/role.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/system-management/role/role.component.ts b/src/app/system-management/role/role.component.ts index 6e19603..a721692 100644 --- a/src/app/system-management/role/role.component.ts +++ b/src/app/system-management/role/role.component.ts @@ -75,6 +75,7 @@ export class RoleComponent implements OnInit { nzMaskClosable: false, nzOnOk: async () => { if (instance.validateForm.valid) { + await new Promise(resolve => { console.log('表单信息', instance.validateForm) let arr = [] From bc3ae214e22ae0fe332f04b4967f35ec694b28ce Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 28 Jun 2022 15:05:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/login/login.component.ts | 2 +- .../navigation/navigation.component.ts | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 3781b06..74e9357 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -124,7 +124,7 @@ export class LoginComponent implements OnInit { sessionStorage.setItem("encryptedAccessToken", data.result.encryptedAccessToken); this.http.get('/api/services/app/Session/GetCurrentLoginInformations').subscribe((data: any) => { 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.isLoading = false return diff --git a/src/app/system-management/navigation/navigation.component.ts b/src/app/system-management/navigation/navigation.component.ts index 8696ee7..4804bc1 100644 --- a/src/app/system-management/navigation/navigation.component.ts +++ b/src/app/system-management/navigation/navigation.component.ts @@ -45,16 +45,20 @@ export class NavigationComponent implements OnInit { this.menuList1.push(this.menu1[index]) } } - console.log(this.menuList1); + // console.log(this.menuList1); } for (let index = 0; index < this.menu3.length; index++) { let url="" - for (let k = 0; k < this.tap.length; k++) { - if (this.tap[k]==this.menu3[index].name) { - this.menuList2.push(this.menu3[index]) - + if(JSON.parse(a).userName=="admin"){ + this.menuList2=this.menu3 + }else{ + for (let k = 0; k < this.tap.length; k++) { + if (this.tap[k]==this.menu3[index].name) { + this.menuList2.push(this.menu3[index]) + + } + } - } } From acfeca7437cb1e558be93ce162b2f5172ee9beea Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 28 Jun 2022 15:08:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/system-management/navigation/navigation.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/system-management/navigation/navigation.component.ts b/src/app/system-management/navigation/navigation.component.ts index 4804bc1..75d3a85 100644 --- a/src/app/system-management/navigation/navigation.component.ts +++ b/src/app/system-management/navigation/navigation.component.ts @@ -48,7 +48,6 @@ export class NavigationComponent implements OnInit { // console.log(this.menuList1); } for (let index = 0; index < this.menu3.length; index++) { - let url="" if(JSON.parse(a).userName=="admin"){ this.menuList2=this.menu3 }else{