Browse Source

菜单管理

beijing
陈鹏飞 2 years ago
parent
commit
e788dc0fcd
  1. 2
      src/app/pages/login/login.component.ts
  2. 2
      src/app/pages/plan-admin/file-license-list/file-license-list.component.html
  3. 14
      src/app/pages/plan-admin/file-license-list/file-license-list.component.ts
  4. 2
      src/app/pages/plan-admin/update-license-list/update-license-list.component.html
  5. 15
      src/app/pages/plan-admin/update-license-list/update-license-list.component.ts
  6. 2
      src/app/pages/records/criminal-records/criminal-records.component.html
  7. 16
      src/app/pages/records/criminal-records/criminal-records.component.ts
  8. 2
      src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html
  9. 13
      src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts
  10. 2
      src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html
  11. 14
      src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts

2
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

2
src/app/pages/plan-admin/file-license-list/file-license-list.component.html

@ -41,7 +41,7 @@
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="exportExcel()"><i nz-icon
<button nz-button type="button" *ngIf="button" class="reset" (click)="exportExcel()"><i nz-icon
[nzType]="'file'"></i>导出</button>
</nz-form-control>
</nz-form-item>

14
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)

2
src/app/pages/plan-admin/update-license-list/update-license-list.component.html

@ -52,7 +52,7 @@
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="exportExcel()"><i nz-icon
<button nz-button type="button" *ngIf="button" class="reset" (click)="exportExcel()"><i nz-icon
[nzType]="'file'"></i>导出</button>
</nz-form-control>
</nz-form-item>

15
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)

2
src/app/pages/records/criminal-records/criminal-records.component.html

@ -126,7 +126,7 @@
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="exportExcel()"><i nz-icon
<button nz-button type="button" *ngIf="button" class="reset" (click)="exportExcel()"><i nz-icon
[nzType]="'file'"></i>导出</button>
</nz-form-control>
</nz-form-item>

16
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

2
src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.html

@ -91,7 +91,7 @@
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="exportExcel()"><i nz-icon
<button nz-button type="button" *ngIf="button" class="reset" (click)="exportExcel()"><i nz-icon
[nzType]="'file'"></i>导出</button>
</nz-form-control>
</nz-form-item>

13
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

2
src/app/pages/records/warning-statistics-list/warning-statistics-list.component.html

@ -98,7 +98,7 @@
</nz-form-item>
<nz-form-item class="btn">
<nz-form-control>
<button nz-button type="button" class="reset" (click)="exportExcel()"><i nz-icon
<button nz-button *ngIf="button" type="button" class="reset" (click)="exportExcel()"><i nz-icon
[nzType]="'file'"></i>导出</button>
</nz-form-control>
</nz-form-item>

14
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() {

Loading…
Cancel
Save