From 7047fc75d8d33ad7608c05f655e760f4e824808b Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 13 Jul 2018 10:08:33 +0800
Subject: [PATCH] 提交修改

---
 src/app/routes/routes.module.ts                                       |    7 
 src/environments/environment.chore.ts                                 |    3 
 src/environments/environment.hmr.ts                                   |    2 
 src/app/routes/reports/query/query.component.html                     |   96 +-----
 src/assets/app-data.json                                              |   32 +-
 src/app/routes/pollution/management/management.component.html         |   45 +++
 src/app/routes/pollution/management/management.component.ts           |   56 ++++
 src/app/routes/reports/query/query.component.ts                       |   97 +++---
 src/app/routes/forecasting-warning/forecasting-warning.component.html |   13 +
 src/app/routes/forecasting-warning/forecasting-warning.component.ts   |   17 +
 src/app/routes/routes-routing.module.ts                               |    7 
 src/environments/environment.ts                                       |    2 
 src/app/app.component.ts                                              |    2 
 src/app/routes/pollution/management/management.component.less         |  389 +++++++++++++++++++++++++++++
 14 files changed, 623 insertions(+), 145 deletions(-)

diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 8879e25..f6b033d 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -29,7 +29,7 @@
   ngOnInit() {
     // ������Token������
     this.tokenService.set({
-      token: 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsIm9pZCI6NSwibW9kZSI6IldlYiIsInNjb3BlcyI6WyJ0ZW1wIl0sImlzcyI6Imh0dHA6Ly9tb25pdG9yLjdkcmxiLmNvbSIsImlhdCI6MTUzMTMxNjU4MCwiZXhwIjoxNTM5MDkyNTgwfQ.tWE7AqGfLwwK-nO1FUveJ8xKqpxitqG1GdhKHp9JDyRPjNDYX7ocgkEw0W2G8hKL_tJIjjrQ1pc0zvCmLTJ-pg',
+      token: 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsIm9pZCI6NSwibW9kZSI6IldlYiIsInNjb3BlcyI6WyJ0ZW1wIl0sImlzcyI6Imh0dHA6Ly9tb25pdG9yLjdkcmxiLmNvbSIsImlhdCI6MTUzMTM4MTIyMiwiZXhwIjoxNTMxMzgxNTIyfQ.iIlgjuDQP1C2mOWUSd0DT6sKxg7Wavsu3oOiHxGf58BZmrwl3OEIFH71yHo9DbXTRWnm5QzEeyjdxLXcWBA3mQ',
       name: 'admin',
       email: `admin@qq.com`,
       id: 10000,
diff --git a/src/app/routes/forecasting-warning/forecasting-warning.component.html b/src/app/routes/forecasting-warning/forecasting-warning.component.html
new file mode 100644
index 0000000..a448091
--- /dev/null
+++ b/src/app/routes/forecasting-warning/forecasting-warning.component.html
@@ -0,0 +1,13 @@
+<div class="content__title">
+    <h1>������������������������</h1>
+</div>
+<nz-card [nzBordered]="false">
+<div class="sales-type-radio">
+	<nz-radio-group >
+		<label nz-radio-button [nzValue]="'warning'"><span>������</span></label>
+		<label nz-radio-button [nzValue]="'forecasting'"><span>������</span></label>
+	</nz-radio-group>
+</div>
+
+</nz-card>
+<nz-card [nzBordered]="false"></nz-card>
diff --git a/src/app/routes/forecasting-warning/forecasting-warning.component.ts b/src/app/routes/forecasting-warning/forecasting-warning.component.ts
new file mode 100644
index 0000000..66640f0
--- /dev/null
+++ b/src/app/routes/forecasting-warning/forecasting-warning.component.ts
@@ -0,0 +1,17 @@
+import { Component, OnInit } from '@angular/core';
+import { _HttpClient } from '@delon/theme';
+
+@Component({
+  selector: 'app-forecasting-warning',
+  templateUrl: './forecasting-warning.component.html',
+})
+export class ForecastingWarningComponent implements OnInit {
+
+    constructor(
+        private http: _HttpClient
+    ) { }
+
+    ngOnInit() {
+    }
+
+}
diff --git a/src/app/routes/pollution/management/management.component.html b/src/app/routes/pollution/management/management.component.html
new file mode 100644
index 0000000..9f31405
--- /dev/null
+++ b/src/app/routes/pollution/management/management.component.html
@@ -0,0 +1,45 @@
+
+<div nz-row [nzGutter]="24">
+    <div nz-col nzXs="24" nzSm="24" nzMd="24" nzLg="24">
+        <nz-card [nzLoading]="loading" [nzBordered]="false" nzTitle="������������������" [nzBodyStyle]="{'padding.px': 24}" class="sales-card" style="min-height: 482px;">
+            <ng-template #extra>
+                <div class="sales-card-extra">
+                    <div class="sales-type-radio">
+                        <nz-radio-group [(ngModel)]="salesType" (ngModelChange)="changeSaleType()" [nzSize]="'large'">
+                            <label nz-radio-button [nzValue]="'1'"><span>PM2.5</span></label>
+                            <label nz-radio-button [nzValue]="'2'"><span>PM10</span></label>
+                            <label nz-radio-button [nzValue]="'3'"><span>SO2</span></label>
+                            <label nz-radio-button [nzValue]="'4'"><span>NO3</span></label>
+                            <label nz-radio-button [nzValue]="'5'"><span>O3</span></label>
+                            <label nz-radio-button [nzValue]="'6'"><span>CO</span></label>
+                        </nz-radio-group>
+                    </div>
+                </div>
+            </ng-template>
+            <ng-template #body>
+                <h4 class="margin:8px 0 32px 0;">������������������</h4>
+
+                <nz-table #keyTable [nzDataSource]="data.searchData" [nzPageSize]="5" nzSize="small">
+                    <thead nz-thead>
+                    <tr>
+                        <th nz-th><span>������</span></th>
+                        <th nz-th><span>������������</span></th>
+                        <th nz-th class="text-right">
+                            <span>������������ mg/m3</span>
+                            <nz-table-sort (nzValueChange)="sort('count',$event)"></nz-table-sort>
+                        </th>
+                    </tr>
+                    </thead>
+                    <tbody nz-tbody>
+                    <tr nz-tbody-tr *ngFor="let i of keyTable.data">
+                        <td nz-td>{{i.index}}</td>
+                        <td nz-td><a (click)="msg.success(i.point)">{{i.point}}</a></td>
+                        <td nz-td class="text-right">{{i.value}}</td>
+                    </tr>
+                    </tbody>
+                </nz-table>
+            </ng-template>
+        </nz-card>
+    </div>
+</div>
+
diff --git a/src/app/routes/pollution/management/management.component.less b/src/app/routes/pollution/management/management.component.less
new file mode 100644
index 0000000..c732176
--- /dev/null
+++ b/src/app/routes/pollution/management/management.component.less
@@ -0,0 +1,389 @@
+@import '~@delon/theme/styles/antd/themes/default.less';
+@import '~@delon/abc/utils/utils.less';
+
+:host ::ng-deep {
+	.page-header {
+		display: flex;
+		.avatar {
+			flex: 0 1 72px;
+			margin-bottom: 8px;
+			.ant-avatar {
+				border-radius: 72px;
+				display: block;
+				width: 72px;
+				height: 72px;
+			}
+		}
+		.desc {
+			position: relative;
+			top: 4px;
+			margin-left: 24px;
+			flex: 1 1 auto;
+			color: @text-color-secondary;
+			line-height: 22px;
+			.desc-title {
+				font-size: 20px;
+				line-height: 28px;
+				font-weight: 500;
+				color: @heading-color;
+				margin-bottom: 12px;
+			}
+		}
+	}
+
+	.page-extra {
+        .clearfix();
+		float: right;
+		& > div {
+			padding: 0 32px;
+			position: relative;
+			float: left;
+			& > p:first-child {
+				color: @text-color-secondary;
+				font-size: @font-size-base;
+				line-height: 22px;
+				margin-bottom: 4px;
+			}
+			& > p {
+				color: @heading-color;
+				font-size: 30px;
+				line-height: 38px;
+				margin: 0;
+				& > span {
+					color: @text-color-secondary;
+					font-size: 20px;
+				}
+			}
+			&:after {
+				background-color: @border-color-split;
+				position: absolute;
+				top: 8px;
+				right: 0;
+				width: 1px;
+				height: 40px;
+				content: "";
+			}
+		}
+		& > div:last-child {
+			padding-right: 0;
+			&:after {
+				display: none;
+			}
+		}
+    }
+
+    .project-list {
+        .ant-card-meta-description {
+            color: @text-color-secondary;
+            height: 44px;
+            line-height: 22px;
+            overflow: hidden;
+        }
+        .card-title {
+            font-size: 0;
+            a {
+                color: @heading-color;
+                margin-left: 12px;
+                line-height: 24px;
+                height: 24px;
+                display: inline-block;
+                vertical-align: top;
+                font-size: @font-size-base;
+                &:hover {
+                    color: @primary-color;
+                }
+            }
+        }
+
+        .project-grid {
+            width: 33.33%;
+        }
+
+        .project-item {
+            display: flex;
+            margin-top: 8px;
+            overflow: hidden;
+            font-size: 12px;
+            height: 20px;
+            line-height: 20px;
+            .textOverflow();
+            a {
+                color: @text-color-secondary;
+                display: inline-block;
+                flex: 1 1 0;
+                .textOverflow();
+                &:hover {
+                    color: @primary-color;
+                }
+            }
+            .datetime {
+                color: @disabled-color;
+                flex: 0 0 auto;
+                float: right;
+            }
+        }
+    }
+
+    .activities {
+        padding: 0 24px 8px;
+        .username {
+            color: @text-color;
+        }
+        .event {
+            font-weight: normal;
+        }
+    }
+
+    .members {
+        a {
+          display: block;
+          margin: 12px 0;
+          line-height: 24px;
+          height: 24px;
+          .textOverflow();
+          .member {
+            font-size: @font-size-base;
+            color: @text-color;
+            line-height: 24px;
+            max-width: 100px;
+            vertical-align: top;
+            margin-left: 12px;
+            transition: all .3s;
+            display: inline-block;
+            .textOverflow();
+          }
+          &:hover {
+            span {
+              color: @primary-color;
+            }
+          }
+        }
+    }
+
+    .datetime {
+        color: @disabled-color;
+    }
+
+    .links {
+        padding: 20px 0 8px 24px;
+        font-size: 0;
+        > a {
+            color: rgba(0, 0, 0, 0.65);
+            display: inline-block;
+            font-size: 14px;
+            margin-bottom: 13px;
+            width: 25%;
+        }
+    }
+
+	@media screen and (max-width: @screen-xl) and (min-width: @screen-lg) {
+        .active-card {
+            margin-bottom: 24px;
+        }
+        .members {
+            margin-bottom: 0;
+        }
+		.page-extra {
+			margin-left: -44px;
+			& > div {
+				padding: 0 16px;
+			}
+		}
+	}
+
+	@media screen and (max-width: @screen-lg) {
+        .active-card {
+            margin-bottom: 24px;
+        }
+        .members {
+            margin-bottom: 0;
+        }
+		.page-extra {
+			float: none;
+			margin-right: 0;
+			& > div {
+				padding: 0 16px;
+				text-align: left;
+				&:after {
+					display: none;
+				}
+			}
+		}
+	}
+
+	@media screen and (max-width: @screen-md) {
+		.page-extra {
+			margin-left: -16px;
+		}
+	}
+
+	@media screen and (max-width: @screen-sm) {
+		.page-header {
+			display: block;
+			.desc {
+				margin-left: 0;
+			}
+		}
+		.page-extra {
+			& > div {
+				float: none;
+			}
+		}
+	}
+
+	@media screen and (max-width: @screen-xs) {
+        .project-list {
+            .project-grid {
+                width: 100%;
+            }
+        }
+	}
+
+
+
+    .icon-group {
+        transition: color 0.32s;
+        color: @text-color-secondary;
+        cursor: pointer;
+        margin-left: 16px;
+        &:hover {
+            color: @text-color;
+        }
+    }
+
+    .rank-list {
+        padding: 0px 32px 32px 72px;
+        ul {
+            margin-top: 25px;
+        }
+        li {
+            zoom: 1;
+            margin-top: 16px;
+            display: flex;
+            justify-content: space-between;
+            .icon {
+                background-color: #f5f5f5;
+                border-radius: 20px;
+                display: inline-block;
+                font-size: 12px;
+                font-weight: 600;
+                margin-right: 24px;
+                height: 20px;
+                line-height: 20px;
+                width: 20px;
+                text-align: center;
+            }
+            .active {
+                background-color: #314659;
+                color: #fff;
+            }
+        }
+    }
+
+    .sales-extra {
+        display: inline-block;
+        margin-right: 24px;
+        a {
+            margin-left: 24px;
+        }
+    }
+
+    .sales-card {
+        .bar {
+            padding: 0px 0px 32px 32px;
+        }
+        .rank {
+            padding: 0 32px 32px 72px;
+        }
+        .ant-tabs-tab {
+            padding-top: 16px;
+            padding-bottom: 14px;
+            line-height: 24px;
+        }
+
+        .ant-tabs-extra-content {
+            padding-right: 24px;
+            line-height: 55px;
+        }
+
+        .ant-card-head {
+            position: relative;
+        }
+    }
+
+    .sales-card-extra {
+        height: 68px;
+    }
+
+    .sales-type-radio {
+        position: absolute;
+        left: 24px;
+        bottom: 15px;
+    }
+
+    .offline-card {
+        .ant-tabs-ink-bar {
+            bottom: auto;
+        }
+        .ant-tabs-bar {
+            border-bottom: none;
+        }
+        .ant-tabs-nav-container-scrolling {
+            padding-left: 40px;
+            padding-right: 40px;
+        }
+        .ant-tabs-tab-prev-icon:before {
+            position: relative;
+            left: 6px;
+        }
+        .ant-tabs-tab-next-icon:before {
+            position: relative;
+            right: 6px;
+        }
+    }
+
+    .trend-text {
+        margin-left: 8px;
+        color: @heading-color;
+    }
+
+    @media screen and (max-width: @screen-lg) {
+        .sales-extra {
+            display: none;
+        }
+
+        .rank-list {
+            li {
+                span:first-child {
+                    margin-right: 8px;
+                }
+            }
+        }
+    }
+
+    @media screen and (max-width: @screen-md) {
+        .rank-title {
+            margin-top: 16px;
+        }
+
+        .sales-card .bar {
+            padding: 16px;
+        }
+    }
+
+    @media screen and (max-width: @screen-sm) {
+        .sales-extra-wrap {
+            display: none;
+        }
+
+        .sales-card {
+            .ant-tabs-content {
+                padding-top: 30px;
+            }
+        }
+    }
+
+    .ant-table-pagination {
+        margin-bottom: 0;
+    }
+}
diff --git a/src/app/routes/pollution/management/management.component.ts b/src/app/routes/pollution/management/management.component.ts
new file mode 100644
index 0000000..3f97f26
--- /dev/null
+++ b/src/app/routes/pollution/management/management.component.ts
@@ -0,0 +1,56 @@
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { HttpClient } from '@angular/common/http';
+import * as moment from 'moment';
+import { DeviceService } from '@business/services/http/device.service';
+
+@Component({
+    selector: 'pollution-management',
+    templateUrl: './management.component.html',
+    styleUrls: ['./management.component.less'],
+    providers: [DeviceService]
+})
+export class PollutionManagementComponent implements OnInit, OnDestroy {
+
+    data: any = {};
+
+    constructor(
+        private deviceService: DeviceService,
+        private http: _HttpClient,
+        public msg: NzMessageService,
+        private http2: HttpClient) {
+    }
+
+    ngOnInit() {
+        const searchData = [];
+        for (let i = 0; i < 50; i += 1) {
+            searchData.push({
+                index: i + 1,
+                point: `������������-${i}`,
+                value: Math.floor(Math.random() * 100)
+            });
+        }
+
+        this.data = {
+            searchData: searchData
+        };
+    }
+
+    ngOnDestroy(): void {
+    }
+
+    sort(sortName, sortValue) {
+        this.data.searchData = [
+            ...(<any[]>this.data.searchData).sort((a, b) => {
+                if (a[sortName] > b[sortName]) {
+                    return (sortValue === 'ascend') ? 1 : -1;
+                } else if (a[sortName] < b[sortName]) {
+                    return (sortValue === 'ascend') ? -1 : 1;
+                } else {
+                    return 0;
+                }
+            })
+        ];
+    }
+}
diff --git a/src/app/routes/reports/query/query.component.html b/src/app/routes/reports/query/query.component.html
index cae4d8e..ea66909 100644
--- a/src/app/routes/reports/query/query.component.html
+++ b/src/app/routes/reports/query/query.component.html
@@ -4,12 +4,10 @@
 <nz-card [nzBordered]="false">
     <form nz-form  [nzLayout]="'inline'">
         <div nz-row [nzGutter]="24">
-            <div nz-col [nzSpan]="8" class="mb-md">
+            <div nz-col [nzSpan]="6" class="mb-md">
                 <div nz-form-item class="d-flex">
                     <div  [ngStyle]="{'width': '100px'}" nz-form-label>
-                        <label>
-                            ������({{ sensorsSelect+'/'+sensorsLength }})
-                        </label>
+                        <label>������������</label>
                     </div>
                     <div nz-form-control class="flex-1">
                         <nz-popover   [nzPlacement]="'bottomLeft'" [(nzVisible)]="sensorSelectVisible" [nzTrigger]="'click'">
@@ -29,20 +27,13 @@
                                 </div>
                             </ng-template>
                         </nz-popover>
-                        <!-- <div style="top:0; right: -62px; position:absolute; font-size: 16px; color: #696969;">
-                            <span>(</span>
-                            <span style="display: inline-block; width: 50px; text-align: center;">
-                                {{ sensorsSelect+'/'+sensorsLength }}
-                            </span>
-                            <span>)</span>
-                        </div> -->
                     </div>
                 </div>
             </div>
-            <div nz-col [nzSpan]="9" class="mb-md">
+            <div nz-col [nzSpan]="4" class="mb-md">
                 <div nz-form-item class="d-flex">
                     <div [ngStyle]="{'width': '128px'}" nz-form-label>
-                        <label>������������</label>
+                        <label>������</label>
                     </div>
                     <div nz-form-control class="flex-1">
                         <nz-select name="timeUnit" [(ngModel)]="timeUnit" [nzPlaceHolder]="'������ ������������'" (ngModelChange)="setTimeUnit($event)" [nzNotFoundContent]="'������������'">
@@ -54,8 +45,22 @@
             </div>
             <div nz-col [nzSpan]="7" class="mb-md">
                 <div nz-form-item class="d-flex">
+                    <div [ngStyle]="{'width': '128px'}" nz-form-label>
+                        <label>������������</label>
+                    </div>
+                    <div nz-form-control class="flex-1">
+                        <nz-select name="deviceDimension" style="width: 100%;" [(ngModel)]="deviceDimension" nzAllowClear [nzPlaceHolder]="'������ '+ dimensionItem.label +'(������������������)'"
+                                   nzShowSearch (nzSearchChange)="dimensionsChange($event)" [nzNotFoundContent]="'������������'">
+                            <nz-option *ngFor="let option of dimensionOptions" [nzLabel]="option.name" [nzValue]="option">
+                            </nz-option>
+                        </nz-select>
+                    </div>
+                </div>
+            </div>
+            <div nz-col [nzSpan]="5" class="mb-md">
+                <div nz-form-item class="d-flex">
                     <div  nz-form-label>
-                        <label>������������</label>
+                        <label>������:</label>
                     </div>
                     <div *ngIf="timeUnit.value!='MONTH'; else elseBlock" nz-form-control class="flex-1">
                         <nz-datepicker [ngStyle]="{'width': '100%'}" name="actualTime" [(ngModel)]="actualTime" [nzAllowClear]="false" [nzShowTime]="_timeType.showTime"
@@ -72,68 +77,11 @@
                     </ng-template>
                 </div>
             </div>
-        </div>
-        <div [ngStyle]="{'display':isCollapse ? 'none' : 'block' }" nz-row [nzGutter]="24">
-            <div nz-col [nzSpan]="8" class="mb-md">
-                <div nz-form-item class="d-flex">
-                    <div [ngStyle]="{'width': '100px'}" nz-form-label>
-                        <label>���������</label>
-                    </div>
-                    <div nz-form-control class="flex-1">
-                        <nz-cascader [class.class123]="true" (nzLoad)="areaLazyLoad($event)" [nzPlaceHolder]="'������ ���/���/���'" (nzSelectionChange)="setAreasData($event)"
-                            [nzAllowClear]="false" [nzChangeOnSelect]="true" [ngModel]="_areas" name="areasData">
-                        </nz-cascader>
-                    </div>
-                </div>
-            </div>
-            <div nz-col [nzSpan]="9" class="mb-md">
-                <div nz-form-item class="d-flex">
-                    <div [ngStyle]="{'width': '128px'}" nz-form-label>
-                            <label>
-                                    <nz-dropdown>
-                                        <button nz-button nz-dropdown ><span>{{dimensionItem.label}}</span> <i class="anticon anticon-down"></i></button>
-                                            <ul nz-menu>
-                                              <li *ngFor="let option of otherDimensions;let i = index;"  nz-menu-item>
-                                                <a (click)="selectDimension(option)">{{option.label}}</a>
-                                              </li>
-                                            </ul>
-                                    </nz-dropdown>
-                            </label>
-                    </div>
-                    <div nz-form-control class="flex-1">
-                        <nz-select name="deviceDimension" style="width: 100%;" [(ngModel)]="deviceDimension" nzAllowClear [nzPlaceHolder]="'������ '+ dimensionItem.label +'(������������������)'"
-                            nzShowSearch (nzSearchChange)="dimensionsChange($event)" [nzNotFoundContent]="'������������'">
-                            <nz-option *ngFor="let option of dimensionOptions" [nzLabel]="option.name" [nzValue]="option">
-                            </nz-option>
-                        </nz-select>
-                    </div>
-                </div>
-            </div>
-            <div nz-col [nzSpan]="7" class="mb-md">
-                <div nz-form-item class="d-flex">
-                    <div [ngStyle]="{'width': '70px'}" nz-form-label>
-                        <label>��� ���</label>
-                    </div>
-                    <div nz-form-control class="flex-1">
-                        <nz-select name="device" style="width: 100%;" [(ngModel)]="device" nzAllowClear [nzPlaceHolder]="'��������� '+ dimensionItem.label +'(������������������������)'" nzShowSearch
-                            (nzSearchChange)="devicesChange($event)" [nzNotFoundContent]="'������������'">
-                            <nz-option *ngFor="let option of deviceOptions" [nzLabel]="option.name" [nzValue]="option">
-                            </nz-option>
-                        </nz-select>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div nz-row>
-            <div nz-col [nzSpan]="24" class="text-right">
+            <div nz-col [nzSpan]="2" class="mb-md">
                 <button nz-button [nzType]="'primary'" (click)="loadGrid()">
                     <i class="anticon anticon-search"></i>
                     <span>������</span>
                 </button>
-                <a class="pl-sm" (click)="toggleCollapse()">
-                    ������
-                    <i class="anticon" [class.anticon-down]="isCollapse" [class.anticon-up]="!isCollapse"></i>
-                </a>
             </div>
         </div>
     </form>
@@ -211,6 +159,8 @@
                     </tr>
                 </tbody>
             </nz-table>
+
+            <!--
             <div *ngIf="grid.data.length>0" [ngClass]="{'table-scroll':true,'table-scroll-box-shadow': sensorNameScrollLeft>2 }" style="position: absolute; top:0;">
                 <nz-table #nzTable [nzDataSource]="grid.data" [nzIsPagination]="false">
                     <thead nz-thead>
@@ -234,6 +184,8 @@
                     </tbody>
                 </nz-table>
             </div>
+            -->
+
         </div>
     </div>
 </nz-card>
diff --git a/src/app/routes/reports/query/query.component.ts b/src/app/routes/reports/query/query.component.ts
index 923a8c7..03517bf 100644
--- a/src/app/routes/reports/query/query.component.ts
+++ b/src/app/routes/reports/query/query.component.ts
@@ -23,7 +23,7 @@
   styleUrls: ['./query.component.less']
 })
 export class QueryComponent implements OnInit {
-    
+
     // aqi������������
     private aqiSort = {
         e1: 1,
@@ -43,7 +43,7 @@
     // };
     public expandForm: boolean; // ��������� ������������
     // public sensors: any[] = [];
-    public sensorOptions: any[] = [];    
+    public sensorOptions: any[] = [];
     /**
      * ���������������������������������
      * ���������������������������������������������������������������������
@@ -72,7 +72,7 @@
      private _timeType: {showTime: boolean|{[key: string]: Function|boolean}, mode:  'month' | 'day', dateFormat: string  } = {showTime: false, mode: 'day', dateFormat: 'YYYY���MM���DD���'};
      // ���key-value������,������������������
      private _sensors: {[key: string]: string} = {};
-     private _sensorNames: string;     
+     private _sensorNames: string;
      get sensorNames(): string {
          return this._sensorNames;
      }
@@ -85,27 +85,29 @@
             this.reloadChart();
             this.switchSensor(this.chartSelectedIndex);
             // this.chartLoading = false;
-         }        
+         }
          this.isChartCollapse = !this.isChartCollapse;
      }
      public deviceOptions: Device[] = [];
      public dataCondition: DataCondition = {areaRangeId: 320583, areaRange: AreaRange.AREA, deviceDimension: DeviceDimension.NONE};
 
      public dimensionOptions: MonitorPoint[] = [];
-    
+
      get actualYear(): number {
          return this.actualTime.getFullYear();
      }
-     set actualYear(year) { 
+     set actualYear(year) {
          this.actualTime.setFullYear(Number(year));
      }
      dimensionsChange(text?: string) {
-        switch (this.dimensionItem.value) {
-            case DeviceDimension.MONITORPOINT:
-            this.monitorPointsChange(text); break;
-            case DeviceDimension.PROFESSION:
-            this.professionsChange(text); break;
-        }
+        // switch (this.dimensionItem.value) {
+        //     case DeviceDimension.MONITORPOINT:
+        //     this.monitorPointsChange(text); break;
+        //     case DeviceDimension.PROFESSION:
+        //     this.professionsChange(text); break;
+        // }
+
+         this.monitorPointsChange(text);
      }
      professionsChange(text?: string) {
         this.http.get<ResultBean<any[]>>('profession/getall').subscribe(
@@ -146,7 +148,7 @@
      devicesChange(text?: string) {
         if (!!this.deviceDimension) {
             const example = new ExampleService();
-            const deviceDimensionProperty = 
+            const deviceDimensionProperty =
             this.dimensionItem.value === DeviceDimension.MONITORPOINT ? 'monitorPointId' : 'professionId';
             if (!!text) {
             example.or().andEqualTo({ name: deviceDimensionProperty, value: this.deviceDimension.id })
@@ -175,7 +177,7 @@
     public onChartInit(e): void {
         this.echartsIntance = e;
     }
-    constructor(        
+    constructor(
     private http: _HttpClient,
     private sensorsService: SensorsService,
     private deviceService: DeviceService,
@@ -183,13 +185,13 @@
     private monitorPointService: MonitorPointService,
     private msg: NzMessageService,
     private dateService: DateService,
-    ) { }    
-    ngOnInit() { 
+    ) { }
+    ngOnInit() {
         this.initPage();
         // ������������ tree click ������
         this.treeClickStream.debounceTime(1).subscribe( event => {
-            const data = event.node.data;  
-            // console.log(data);    
+            const data = event.node.data;
+            // console.log(data);
             if (data.id === -1) {
                 const children = data.children;
                 // ������������
@@ -220,7 +222,7 @@
                     delete this._sensors [data.id];
                 }
                 const length = Object.keys(this._sensors).length;
-                parentData['halfChecked'] = length > 0 
+                parentData['halfChecked'] = length > 0
                 && this.sensorOptions[0].children.length > length;
                 parentData['checked'] = !parentData['halfChecked'] && length !== 0;
             }
@@ -241,7 +243,7 @@
                         if (res.code === ResultCode.SUCCESS) {
                             const org = res.data;
                             const areas = new Array(3);
-                            if (!!org.areaNames) {                              
+                            if (!!org.areaNames) {
                                 const areaNames = org.areaNames;
                                 Object.keys(areaNames).forEach(
                                     key => {
@@ -257,7 +259,7 @@
                                             }
                                         }
                                     }
-                                );                               
+                                );
                             } else {
                                 for (let i = 0; i < areas.length; i++) {
                                     switch (i) {
@@ -312,8 +314,8 @@
         let isChanged = false;
         isChanged = areas.some( (item , index: number) => {
             // this._areas[index] ���null ������ ������������������
-            return this._areas.length < areas.length 
-            || !this._areas[index] 
+            return this._areas.length < areas.length
+            || !this._areas[index]
             || this._areas[index].value !== item.value;
         });
         if ( isChanged ) {
@@ -350,7 +352,7 @@
      get deviceDimension(): {id: number, name: string} {
          return this._deviceDimension;
      }
-     set deviceDimension(value) {        
+     set deviceDimension(value) {
         if (!!value) {
               // ������ ������������������
              if (this._deviceDimension !== value) {
@@ -364,7 +366,7 @@
              this.device = null;
              this.deviceOptions = null;
         }
-        
+
      }
     // ��������� ������ ������������
     public _device: Device;
@@ -375,15 +377,15 @@
     get device(): Device {
         return this._device;
     }
-   
+
 
     /**
      * ������ ���������������
-     * 
+     *
      * @readonly
      * @type {string}
      * @memberof QueryComponent
-     */  
+     */
     private treeClickStream: Subject<any> = new Subject<any>();
     public onTreeClickSelect(event): void {
           this.treeClickStream.next(event);
@@ -424,13 +426,13 @@
             this._sensorNames = sensorNameList.join(', ');
         }, 1);
     }
-    public setTimeUnit(val: {label: string, value: TimeUnits} ) {       
+    public setTimeUnit(val: {label: string, value: TimeUnits} ) {
         switch (val.value) {
             // YYYY-MM-DD HH:mm:ss
             case TimeUnits.MONTH:
             this._timeType.dateFormat = 'YYYY���';
                 // this._timeType.dateFormat = 'YYYY-MM';
-                // this._timeType.mode = 'month';                
+                // this._timeType.mode = 'month';
                 // this._timeType.endShowTime = null;
                 break;
             case TimeUnits.DAY:
@@ -476,7 +478,7 @@
         }
         return result;
     }
-    public loadGrid(): void {        
+    public loadGrid(): void {
         // ������������
         const sensors = Object.values(this._sensors);
         if ( sensors.length === 0 ) {
@@ -504,18 +506,18 @@
                 this.dataCondition.areaRangeId = item;
                 switch (index) {
                     case 0: this.dataCondition.areaRange = AreaRange.DEVICE; break;
-                    case 1:                   
+                    case 1:
                     // ������������������
                     if (this.dimensionItem.value === DeviceDimension.MONITORPOINT) {
-                         this.dataCondition.areaRange = AreaRange.MONITORPOINT;                        
+                         this.dataCondition.areaRange = AreaRange.MONITORPOINT;
                     // ���������������
                     } else {
                          // ������������������������
                          this.switchAreas();
                          // ���������������������
-                         this.dataCondition.areaRangeId = areasData.slice(-1).pop();                         
+                         this.dataCondition.areaRangeId = areasData.slice(-1).pop();
                     } break;
-                    case 2: 
+                    case 2:
                         this.switchAreas();
                     break;
                 }
@@ -556,9 +558,9 @@
                 return {text: item};
             }
           ); break;
-      }   
+      }
         // ���������������������������������
-        this.tableWidth =  this.grid.columns.length * 80 + 160;   
+        this.tableWidth =  this.grid.columns.length * 80 + 160;
       this.reloadChart();
       // ������������������
       this.reloadChartTitle();
@@ -616,7 +618,7 @@
           }
     }
     private reloadChart(): void {
-        const  timeList = this.grid.columns.map(item => item.text);  
+        const  timeList = this.grid.columns.map(item => item.text);
          if (!!this.echartsIntance) {
              this.chartOption = null;
              this.echartsIntance.clear();
@@ -625,7 +627,6 @@
         //  if ( this.chartSelectedIndex < this.grid.data.length ) {
         //     series = [{type: 'line', data: this.grid.data[this.chartSelectedIndex]}];
         //  }
-         debugger;
          this.initOpton({ xAxis : [{data : timeList}]});
          this.chartLoading = true;
       }
@@ -685,13 +686,13 @@
         switch ( this.dataCondition.areaRange ) {
             case AreaRange.MONITORPOINT :
             names[0] = '������������';
-            names[1] = this._deviceDimension.name; break;          
+            names[1] = this._deviceDimension.name; break;
             case AreaRange.DEVICE :
             names[0] = '������';
             names[1] = this._device.name; break;
             default :
             names[0] = '';
-            names[1] = this._areas.map( item => item.label).join('/'); 
+            names[1] = this._areas.map( item => item.label).join('/');
             break;
         }
         // ������������
@@ -711,7 +712,7 @@
         names[3] = moment(this.actualTime).format(this._timeType.dateFormat);
         if ( this.grid.data.length > this.chartSelectedIndex) {
             names[4] = this.grid.data[this.chartSelectedIndex].sensor.name;
-        }        
+        }
         const title = names.join('  ') + ' ������';
         if (title.trim() !== this._chartTitleTemp.trim()) {
              this._chartTitleTemp = title;
@@ -723,8 +724,8 @@
     }
     public switchSensor(index: number): void {
         this.chartSelectedIndex = index;
-        this.chartLoading = true; 
-          this.reloadChartTitle();      
+        this.chartLoading = true;
+          this.reloadChartTitle();
         setTimeout(() => {
             const series = [{type: 'line', data: this.grid.data[index].data}];
             this.echartsIntance.setOption({
@@ -738,15 +739,15 @@
                 ],
                 series: series
             });
-           this.chartLoading = false; 
-        }, 600); 
+           this.chartLoading = false;
+        }, 600);
     }
     private getPeriodDate(value: Date , type?: 'start'|'end' ): Date {
         let month = 0;
         let day = 1;
         let hour = 0;
         let minute = 0;
-        let second = 0; 
+        let second = 0;
         let millisecond = 0;
         if ('end' === type) {
             month = 11;
@@ -775,7 +776,7 @@
     public sensorTableFocus(index) {
         this.sensorTableFocusIndex = index;
     }
-   
+
     public sensorTableBlur(index) {
         this.sensorTableFocusIndex = -1;
     }
diff --git a/src/app/routes/routes-routing.module.ts b/src/app/routes/routes-routing.module.ts
index ae052a2..7cec853 100644
--- a/src/app/routes/routes-routing.module.ts
+++ b/src/app/routes/routes-routing.module.ts
@@ -13,6 +13,8 @@
 import { ReportComponent } from './report/report.component';
 import { UserLoginComponent } from 'app/routes/passport/login/login.component';
 
+import { ForecastingWarningComponent } from './forecasting-warning/forecasting-warning.component';
+import { PollutionManagementComponent } from 'app/routes/pollution/management/management.component';
 
 const routes: Routes = [
     {
@@ -33,7 +35,10 @@
             { path: 'devices', loadChildren: './devices/devices.module#DevicesModule' },
             { path: 'sensors', loadChildren: './sensors/sensors.module#SensorsModule' },
             { path: 'systems', loadChildren: './systems/systems.module#SystemsModule' },
-            { path: 'reports', loadChildren: './reports/reports.module#ReportsModule' }
+            { path: 'reports', loadChildren: './reports/reports.module#ReportsModule' },
+
+            { path: 'forecasting-warning', component: ForecastingWarningComponent },
+            { path: 'pollution/management', component: PollutionManagementComponent }
         ]
     },    // passport
     {
diff --git a/src/app/routes/routes.module.ts b/src/app/routes/routes.module.ts
index 776196a..2653f7a 100644
--- a/src/app/routes/routes.module.ts
+++ b/src/app/routes/routes.module.ts
@@ -12,7 +12,10 @@
 import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component';
 import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component';
 import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component';
+import { ForecastingWarningComponent } from './forecasting-warning/forecasting-warning.component';
 import { ReportComponent } from './report/report.component';
+import { PollutionManagementComponent } from './pollution/management/management.component';
+
 // Statics
 import 'rxjs/add/observable/throw';
 
@@ -35,7 +38,9 @@
         DashboardMonitorComponent,
         DashboardWorkplaceComponent,
         UserLoginComponent,
-        ReportComponent
+        ReportComponent,
+        ForecastingWarningComponent,
+        PollutionManagementComponent
     ],
     providers: [
         _HttpClient,
diff --git a/src/assets/app-data.json b/src/assets/app-data.json
index 921a5c0..75b4660 100644
--- a/src/assets/app-data.json
+++ b/src/assets/app-data.json
@@ -22,22 +22,7 @@
             {
               "text": "������������",
               "icon": "icon-pie-chart",
-              "children": [
-                  {
-                    "text": "������",
-                    "link": "/"
-                  }
-                  ,
-                  {
-                    "text": "������",
-                    "link": "/"
-                  }
-                  ,
-                  {
-                    "text": "������������",
-                    "link": "/"
-                  }
-              ]
+              "link": "/forecasting-warning"
             },
             {
               "text": "������������",
@@ -57,7 +42,7 @@
             {
               "text": "������������",
               "icon": "icon-chemistry",
-              "link": "/"
+              "link": "/pollution/management"
             },
             {
               "text": "������������������",
@@ -82,7 +67,16 @@
             {
               "text": "������������",
               "icon": "icon-note",
-              "link": "/"
+                "children": [{
+                        "text": "������������",
+                        "link": "/"
+                }, {
+                        "text": "������������",
+                        "link": "/"
+                }, {
+                        "text": "������������������",
+                        "link": "/"
+                }]
             },
             {
               "text": "������������",
@@ -95,7 +89,7 @@
               "children": [
             {
                   "text": "������������",
-                  "link": "/maintenance/data-check"
+                  "link": "/reports/query"
                 }
                 ,
                 {
diff --git a/src/environments/environment.chore.ts b/src/environments/environment.chore.ts
index 206d19c..db0ba3a 100644
--- a/src/environments/environment.chore.ts
+++ b/src/environments/environment.chore.ts
@@ -3,5 +3,6 @@
     SERVER_URL: `./`,
     production: true,
     hmr: false,
-    useHash: false
+    useHash: false,
+    SERVER_BASH_URL: `http://monitor-api2.7drlb.com/`
 };
diff --git a/src/environments/environment.hmr.ts b/src/environments/environment.hmr.ts
index 23a52db..f094f44 100644
--- a/src/environments/environment.hmr.ts
+++ b/src/environments/environment.hmr.ts
@@ -1,7 +1,7 @@
 export const environment = {
     chore: false,
     SERVER_URL: `./`,
-    production: false,
+    production: true,
     hmr: true,
     useHash: true,
     SERVER_BASH_URL: `http://monitor-api2.7drlb.com/`
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 0fc0b3c..5691149 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -9,5 +9,5 @@
     production: false,
     hmr: false,
     useHash: true,
-    SERVER_BASH_URL: `http://127.0.0.1:8080/`
+    SERVER_BASH_URL: `http://monitor-api2.7drlb.com/`
 };

--
Gitblit v1.8.0