From e788dc0fcd0de0d493f8a6f366c5911d8c411607 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 24 Jun 2022 10:06:07 +0800 Subject: [PATCH] =?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 +- .../file-license-list.component.html | 2 +- .../file-license-list.component.ts | 14 ++++++++++++-- .../update-license-list.component.html | 2 +- .../update-license-list.component.ts | 15 ++++++++++++--- .../criminal-records.component.html | 2 +- .../criminal-records.component.ts | 16 ++++++++++++++-- .../oil-unloading-process-list.component.html | 2 +- .../oil-unloading-process-list.component.ts | 13 ++++++++++++- .../warning-statistics-list.component.html | 2 +- .../warning-statistics-list.component.ts | 14 +++++++++++++- 11 files changed, 69 insertions(+), 15 deletions(-) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index bd20bbc..d386273 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("token", data.result.accessToken); sessionStorage.setItem("encryptedAccessToken", data.result.encryptedAccessToken); 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) { this.message.create('error', `当前用户未分配菜单`); this.isLoading = false diff --git a/src/app/pages/plan-admin/file-license-list/file-license-list.component.html b/src/app/pages/plan-admin/file-license-list/file-license-list.component.html index cbb47c7..052e3ed 100644 --- a/src/app/pages/plan-admin/file-license-list/file-license-list.component.html +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.html @@ -41,7 +41,7 @@ - diff --git a/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts b/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts index 2b58e4b..398f033 100644 --- a/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts +++ b/src/app/pages/plan-admin/file-license-list/file-license-list.component.ts @@ -23,7 +23,7 @@ export class FileLicenseListComponent implements OnInit { validateForm!: FormGroup; constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router, private message: NzMessageService) { } - + button=false tableScrollHeight tableScrollWeight resizeListener @@ -46,7 +46,7 @@ export class FileLicenseListComponent implements OnInit { await this.getAllOrganization() this.getStationLicenses() - + this.returnLastMenus() } ngOnDestroy(): void { this.resizeListener.unsubscribe() @@ -227,6 +227,16 @@ export class FileLicenseListComponent implements OnInit { } + returnLastMenus() { + let userMenu = JSON.parse(sessionStorage.getItem('userdata')).menus + + for (let index = 0; index < userMenu.length; index++) { + if (userMenu[index].parentId==10) { + this.button=true + } + } + return + } exportExcel() { // console.log(this.validateForm) diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.html b/src/app/pages/plan-admin/update-license-list/update-license-list.component.html index 0d4c1a8..eb08465 100644 --- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.html +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.html @@ -52,7 +52,7 @@ - diff --git a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts index c4ee292..229d678 100644 --- a/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts +++ b/src/app/pages/plan-admin/update-license-list/update-license-list.component.ts @@ -21,7 +21,7 @@ export class UpdateLicenseListComponent implements OnInit { validateForm!: FormGroup; constructor(private modal: NzModalService, private viewContainerRef: ViewContainerRef, private element: ElementRef, private navChangeService: NavChangeService, private http: HttpClient, private toTree: TreeService, private fb: FormBuilder, private nzContextMenuService: NzContextMenuService, private router: Router, private message: NzMessageService) { } - + button=false tableScrollHeight tableScrollWeight resizeListener @@ -45,7 +45,7 @@ export class UpdateLicenseListComponent implements OnInit { this.tableSpin = true await this.getAllOrganization() this.getStationLicenses() - + this.returnLastMenus() } ngOnDestroy(): void { this.resizeListener.unsubscribe() @@ -222,7 +222,16 @@ export class UpdateLicenseListComponent implements OnInit { } - + returnLastMenus() { + let userMenu = JSON.parse(sessionStorage.getItem('userdata')).menus + + for (let index = 0; index < userMenu.length; index++) { + if (userMenu[index].parentId==9) { + this.button=true + } + } + return + } exportExcel() { // console.log(this.validateForm) diff --git a/src/app/pages/records/criminal-records/criminal-records.component.html b/src/app/pages/records/criminal-records/criminal-records.component.html index b6c7cbb..7fe7735 100644 --- a/src/app/pages/records/criminal-records/criminal-records.component.html +++ b/src/app/pages/records/criminal-records/criminal-records.component.html @@ -126,7 +126,7 @@ - diff --git a/src/app/pages/records/criminal-records/criminal-records.component.ts b/src/app/pages/records/criminal-records/criminal-records.component.ts index 48f15ac..8ec4bfd 100644 --- a/src/app/pages/records/criminal-records/criminal-records.component.ts +++ b/src/app/pages/records/criminal-records/criminal-records.component.ts @@ -304,7 +304,7 @@ export class CriminalRecordsComponent implements OnInit { enddate isMisinformation: boolean = false//误报按钮的显隐 - + button=false tableScrollHeight resizeListener ngOnInit(): void { @@ -312,7 +312,7 @@ export class CriminalRecordsComponent implements OnInit { // this.isShowEcharts.getMessage().subscribe((message: any) => { // this.isEchartsShow() // }); - + this.tableScrollHeight = '100px' // 页面监听 this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { @@ -322,8 +322,10 @@ export class CriminalRecordsComponent implements OnInit { let loginUserInfo if (sessionStorage.getItem('isGasStation') == 'true') { loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + this.returnLastMenus() } else { loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + } if (loginUserInfo.roles.find((item) => { @@ -370,6 +372,16 @@ export class CriminalRecordsComponent 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==5) { + this.button=true + } + } + return + } //刷新饼图图表数据 num echartsData: any diff --git a/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html b/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html index c1673bc..b27841f 100644 --- a/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html +++ b/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html @@ -91,7 +91,7 @@ - diff --git a/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts b/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts index 0221075..a0cf459 100644 --- a/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts +++ b/src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts @@ -75,7 +75,7 @@ export class OilUnloadingProcessListComponent implements OnInit { isMisinformation: boolean = false//误报按钮的显隐 - + button=false tableScrollHeight resizeListener ngOnInit(): void { @@ -88,6 +88,7 @@ export class OilUnloadingProcessListComponent implements OnInit { let loginUserInfo if (sessionStorage.getItem('isGasStation') == 'true') { loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + this.returnLastMenus() } else { loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) } @@ -132,6 +133,16 @@ 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 + } + } + return + } //刷新饼图图表数据 num echartsData: any diff --git a/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html b/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html index 784a636..21b1f97 100644 --- a/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html +++ b/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html @@ -98,7 +98,7 @@ - diff --git a/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts b/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts index 5d61ac7..0f2ab3d 100644 --- a/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts +++ b/src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts @@ -38,7 +38,7 @@ export class WarningStatisticsListComponent implements OnInit { isOrShow: boolean isMisinformation: boolean = false//误报按钮的显隐 - + button=false tableScrollHeight resizeListener ngOnInit(): void { @@ -53,8 +53,10 @@ export class WarningStatisticsListComponent implements OnInit { let loginUserInfo if (sessionStorage.getItem('isGasStation') == 'true') { loginUserInfo = JSON.parse(sessionStorage.getItem('userdataOfgasstation')) + this.returnLastMenus() } else { loginUserInfo = JSON.parse(sessionStorage.getItem('userdata')) + this.button=false } if (loginUserInfo.roles.find((item) => { @@ -99,6 +101,16 @@ export class WarningStatisticsListComponent 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==7) { + this.button=true + } + } + return + } listOfData//证照列表 //获取证照列表 getLicense() {