From efe936a73370a55d4c3336fb9973a92fcf87efff Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 08 Mar 2018 09:22:09 +0800
Subject: [PATCH] ts语法修正,报表部分功能实现

---
 src/app/app.component.ts |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 7b0f672..00faf0f 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,10 +1,57 @@
-import { Component } from '@angular/core';
-
+import { element } from 'protractor';
+import { LoginService } from '@business/services/http/login.service';
+import { Component, HostBinding, OnInit } from '@angular/core';
+import { Router, NavigationEnd, NavigationStart } from '@angular/router';
+import { ThemesService, SettingsService, TitleService } from '@delon/theme';
+import { filter } from 'rxjs/operators';
+import * as $ from 'jquery';
 @Component({
   selector: 'app-root',
-  templateUrl: './app.component.html',
-  styleUrls: ['./app.component.css']
+  template: `<router-outlet></router-outlet>`
 })
-export class AppComponent {
-  title = 'app';
+export class AppComponent implements OnInit {
+
+  @HostBinding('class.layout-fixed') get isFixed() { return this.settings.layout.fixed; }
+  @HostBinding('class.layout-boxed') get isBoxed() { return this.settings.layout.boxed; }
+  @HostBinding('class.aside-collapsed') get isCollapsed() { return this.settings.layout.collapsed; }
+
+  constructor(
+    private theme: ThemesService,
+    private settings: SettingsService,
+    private router: Router,
+    private titleSrv: TitleService,
+    private loginService: LoginService) {
+  }
+
+  ngOnInit() {
+    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