From 032ca75e238cc2f2a96b3bf27532b5a243d9a24a Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 13 Mar 2018 16:00:41 +0800
Subject: [PATCH] 工作台数据统计页面
---
src/app/app.component.ts | 32 ++++++++++++++------------------
1 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index efcceed..00faf0f 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -3,7 +3,7 @@
import { Component, HostBinding, OnInit } from '@angular/core';
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',
@@ -20,40 +20,36 @@
private settings: SettingsService,
private router: Router,
private titleSrv: TitleService,
- private loginService:LoginService) {
+ 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(() => {
// ���������������������������������
- let cdkOverlayContainer = $('.cdk-overlay-container');
- if(cdkOverlayContainer!=null&&cdkOverlayContainer.children().length>1){
+ const cdkOverlayContainer = $('.cdk-overlay-container');
+ if (cdkOverlayContainer != null && cdkOverlayContainer.children().length > 1) {
cdkOverlayContainer.children('div:first-child').nextAll().each(
- function(index,element){
- if($(element).hasClass('cdk-overlay-backdrop-showing')){
- $(element).remove();
- }else{
- $(element).empty();
+ function(index, el) {
+ if ($(el).hasClass('cdk-overlay-backdrop-showing')) {
+ $(el).remove();
+ } else {
+ $(el).empty();
}
}
);
}
// ������������������������
- if($('.ant-modal-close').length>0){
+ if ($('.ant-modal-close').length > 0) {
$('.ant-modal-close').click();
}
// ������������������������
- if($('.ant-select-open').length>0){
+ if ($('.ant-select-open').length > 0) {
$('.ant-select-open').click();
}
});
--
Gitblit v1.8.0