|
|
|
@ -6,6 +6,8 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dial
|
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
import { IsLoginService } from '../is-login.service' |
|
|
|
|
import { AllFileComponent } from '../ui/all-file/all-file.component'; |
|
|
|
|
import { ComponentServiceService } from '../component-service.service'; |
|
|
|
|
import { Router,ActivatedRoute } from '@angular/router' |
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-navigation', |
|
|
|
|
templateUrl: './navigation.component.html', |
|
|
|
@ -13,7 +15,7 @@ import { AllFileComponent } from '../ui/all-file/all-file.component';
|
|
|
|
|
}) |
|
|
|
|
export class NavigationComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(public navmenus:CacheTokenService,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public islogin:IsLoginService) { } |
|
|
|
|
constructor(private router:Router,public emitService: ComponentServiceService,public navmenus:CacheTokenService,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public islogin:IsLoginService) { } |
|
|
|
|
|
|
|
|
|
@ViewChild('child') child:AllFileComponent; //父组件中获得子组件的引用
|
|
|
|
|
|
|
|
|
@ -134,8 +136,10 @@ export class NavigationComponent implements OnInit {
|
|
|
|
|
clickLi(item){ |
|
|
|
|
this.selectedDataBank = item.id |
|
|
|
|
//触发子组件的方法
|
|
|
|
|
this.child.getALLFileList(item.id); |
|
|
|
|
this.child.selection.clear(); |
|
|
|
|
// this.child.getALLFileList(item.id);
|
|
|
|
|
// this.child.selection.clear();
|
|
|
|
|
this.router.navigate([`/home`]) |
|
|
|
|
this.emitService.eventEmit.emit(item.id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|