From 6a6d3bbb3748c12c2dc94beec05d21d82d0faba1 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Tue, 13 Mar 2018 14:43:01 +0800 Subject: [PATCH] 数据报表 --- src/app/app.component.ts | 47 ++++++++++++++++++++++++++++++++++++----------- 1 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c1ba478..00faf0f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,8 +1,10 @@ +import { element } from 'protractor'; +import { LoginService } from '@business/services/http/login.service'; import { Component, HostBinding, OnInit } from '@angular/core'; -import { Router, NavigationEnd } from '@angular/router'; +import { Router, NavigationEnd, NavigationStart } from '@angular/router'; import { ThemesService, SettingsService, TitleService } from '@delon/theme'; -import { filter, map } from 'rxjs/operators'; - +import { filter } from 'rxjs/operators'; +import * as $ from 'jquery'; @Component({ selector: 'app-root', template: `<router-outlet></router-outlet>` @@ -17,16 +19,39 @@ private theme: ThemesService, private settings: SettingsService, private router: Router, - private titleSrv: TitleService) { + private titleSrv: TitleService, + private loginService: LoginService) { } ngOnInit() { - this.router.events.pipe( - filter(evt => evt instanceof NavigationEnd), - map(() => this.router.url) - ) - .subscribe(url => { - this.titleSrv.setTitleByUrl(url); - }); + this.router.events + .pipe(filter(evt => evt instanceof NavigationEnd)) + .subscribe(() => this.titleSrv.setTitle()); + this.router.events.pipe( + filter(evt => evt instanceof NavigationStart) + ) + .subscribe(() => { + // ��������������������������������� + const cdkOverlayContainer = $('.cdk-overlay-container'); + if (cdkOverlayContainer != null && cdkOverlayContainer.children().length > 1) { + cdkOverlayContainer.children('div:first-child').nextAll().each( + function(index, el) { + if ($(el).hasClass('cdk-overlay-backdrop-showing')) { + $(el).remove(); + } else { + $(el).empty(); + } + } + ); + } + // ������������������������ + if ($('.ant-modal-close').length > 0) { + $('.ant-modal-close').click(); + } + // ������������������������ + if ($('.ant-select-open').length > 0) { + $('.ant-select-open').click(); + } + }); } } -- Gitblit v1.8.0