|  |  | 
 |  |  |  | 
 |  |  | export interface AlarmMode { | 
 |  |  |   enable: boolean|any[]; | 
 |  |  |   interval: number; | 
 |  |  |   level1: AlarmStyle[]|any[]; | 
 |  |  |   level2: AlarmStyle[]|any[]; | 
 |  |  |   level3: AlarmStyle[]|any[]; | 
 
 |  |  | 
 |  |  |          let alarmMode = _alarmConfig.value.alarmMode; | 
 |  |  |          alarmMode = alarmMode == null ? { | 
 |  |  |           enable: false, | 
 |  |  |           interval: 120, | 
 |  |  |           level1: null, | 
 |  |  |           level2: null, | 
 |  |  |           level3: null | 
 
 |  |  | 
 |  |  |                 <div class="item" nz-dropdown> | 
 |  |  |                     <i class="anticon anticon-setting"></i> | 
 |  |  |                 </div> | 
 |  |  |                 <div nz-menu style="width:200px"> | 
 |  |  |                 <div nz-menu style="width:200px;"> | 
 |  |  |                     <div nz-menu-item class="theme-switch"> | 
 |  |  |                         <header-theme></header-theme> | 
 |  |  |                     </div> | 
 
 |  |  | 
 |  |  |         for (let i = 0; i < 12; i += 1) { | 
 |  |  |             this.totalDeviceCountList.push({ | 
 |  |  |                 x: moment(today).subtract(-1*i, 'months').format( | 
 |  |  |                     "YYYY-MM" | 
 |  |  |                     'YYYY-MM' | 
 |  |  |                 ), | 
 |  |  |                 y: fakeDC[i] | 
 |  |  |             }); | 
 |  |  | 
 |  |  |         for (let i = 0; i < fakeY.length; i += 1) { | 
 |  |  |             visitData.push({ | 
 |  |  |                 x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format( | 
 |  |  |                     "YYYY-MM-DD" | 
 |  |  |                     'YYYY-MM-DD' | 
 |  |  |                 ), | 
 |  |  |                 y: fakeY[i] | 
 |  |  |             }); | 
 |  |  | 
 |  |  |         for (let i = 0; i < fakeY2.length; i += 1) { | 
 |  |  |             visitData2.push({ | 
 |  |  |                 x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format( | 
 |  |  |                     "YYYY-MM-DD" | 
 |  |  |                     'YYYY-MM-DD' | 
 |  |  |                 ), | 
 |  |  |                 y: fakeY2[i] | 
 |  |  |             }); | 
 |  |  | 
 |  |  |                 status: Math.floor((Math.random() * 10) % 2) | 
 |  |  |             }); | 
 |  |  |         } | 
 |  |  |         var res = { | 
 |  |  |         const res = { | 
 |  |  |             alarmData: alarmData, | 
 |  |  |             alarmData_1: alarmData_1, | 
 |  |  |             alarmData_2: alarmData_2, | 
 |  |  | 
 |  |  |             'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png'  // Webpack | 
 |  |  |         ]; | 
 |  |  |  | 
 |  |  |         var activities = [ | 
 |  |  |         const activities = [ | 
 |  |  |             { | 
 |  |  |                 id: 'trend-1', | 
 |  |  |                 updatedAt: new Date(), | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     handlePieValueFormat(value: any) { | 
 |  |  |         return value + "次"; | 
 |  |  |         return value + '次'; | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | export class ReportComponent implements OnInit { | 
 |  |  |   [x: string]: any; | 
 |  |  |  | 
 |  |  |   public spinning: boolean = true; | 
 |  |  |   public spinning = true; | 
 |  |  |  | 
 |  |  |   private echartOption = { | 
 |  |  |     backgroundColor: '', | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     tooltip: { | 
 |  |  |       trigger: 'item', | 
 |  |  |       formatter: "{a} <br/>{b}: {c} ({d}%)" | 
 |  |  |       formatter: '{a} <br/>{b}: {c} ({d}%)' | 
 |  |  |     }, | 
 |  |  |     legend: { | 
 |  |  |       //x : 'center', | 
 |  |  | 
 |  |  |         center: ['25%', '50%'], | 
 |  |  |         label: { | 
 |  |  |           normal: { | 
 |  |  |             formatter: "{b}:{d}%" | 
 |  |  |             formatter: '{b}:{d}%' | 
 |  |  |           } | 
 |  |  |         }, | 
 |  |  |         labelLine: { | 
 |  |  | 
 |  |  |         center: ['75%', '50%'], | 
 |  |  |         label: { | 
 |  |  |           normal: { | 
 |  |  |             formatter: "{b}:{d}%", | 
 |  |  |             formatter: '{b}:{d}%', | 
 |  |  |           } | 
 |  |  |         }, | 
 |  |  |         labelLine: { | 
 |  |  | 
 |  |  |   }; | 
 |  |  |  | 
 |  |  |   ngOnInit() { | 
 |  |  |     const params = JSON.parse(sessionStorage.getItem("queryParams")); | 
 |  |  |     const params = JSON.parse(sessionStorage.getItem('queryParams')); | 
 |  |  |     if (!!params) { | 
 |  |  |       localStorage.removeItem("queryParams"); | 
 |  |  |       localStorage.removeItem('queryParams'); | 
 |  |  |       const items = this.items = JSON.parse(params.items); | 
 |  |  |       const timeType = params.type; | 
 |  |  |       this.http.get(environment.SERVER_BASH_URL + 'report/compare', {params: params}).subscribe((res: any) => { | 
 |  |  | 
 |  |  |               this.title = items[i].formatTime; | 
 |  |  |               items[i].deviceCount = deviceCounts[i]; | 
 |  |  |               if (!items[i].monitorPointid) { | 
 |  |  |                 items[i].monitorPointName = items[i].areaName | 
 |  |  |                 items[i].monitorPointName = items[i].areaName; | 
 |  |  |               } | 
 |  |  |               const legendName = items[i].formatTime + label + (items[i].mac ? '设备:' + items[i].deviceName : (items[i].monitorPointid ? '监测点:' + items[i].monitorPointName : items[i].areaName)); | 
 |  |  |               option.legend.data[i] = legendName; | 
 |  |  | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |     } else { | 
 |  |  |       this.msgSrv.error("页面错误,将关闭该页面!"); | 
 |  |  |       setTimeout("window.close();", 1000); | 
 |  |  |       this.msgSrv.error('页面错误,将关闭该页面!'); | 
 |  |  |       setTimeout('window.close();', 1000); | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |     let validate = true; | 
 |  |  |     const queryItems = []; | 
 |  |  |     for (let i = 0; i < this.items.length; i++) { | 
 |  |  |       let areaName = ''; | 
 |  |  |       let item = this.items[i]; | 
 |  |  |       let queryItem: any = {}; | 
 |  |  |       const areaName = ''; | 
 |  |  |       const item = this.items[i]; | 
 |  |  |       const queryItem: any = {}; | 
 |  |  |       if ((!!item.time) && (item.monitorPointOptions.length > 0)) { | 
 |  |  |         for (var key in item) { | 
 |  |  |         for (const key in item) { | 
 |  |  |           if (item[key]) { | 
 |  |  |             queryItem[key] = item[key]; | 
 |  |  |           } | 
 |  |  | 
 |  |  |     if (validate && this.timeType && query.reportType) { | 
 |  |  |       if (this._sensors) { | 
 |  |  |         const sensors = []; | 
 |  |  |         for (var key in this._sensors) { | 
 |  |  |         for (const key in this._sensors) { | 
 |  |  |           sensors.push(this._sensors[key]); | 
 |  |  |         } | 
 |  |  |         if (sensors.length > 0) { | 
 |  |  | 
 |  |  |       } | 
 |  |  |       query.items = JSON.stringify(queryItems); | 
 |  |  |       query.type = this.timeType.value; | 
 |  |  |       sessionStorage.setItem("queryParams", JSON.stringify(query)); | 
 |  |  |       sessionStorage.setItem('queryParams', JSON.stringify(query)); | 
 |  |  |     } else { | 
 |  |  |       this.msgSrv.error('请完善搜索项或删除查询条目'); | 
 |  |  |       return false; | 
 
 |  |  | 
 |  |  |       query.type = this.timeType.value; | 
 |  |  |       if (this._sensors) { | 
 |  |  |         const sensors = []; | 
 |  |  |         for (var key in this._sensors) { | 
 |  |  |         for (const key in this._sensors) { | 
 |  |  |           sensors.push(this._sensors[key]); | 
 |  |  |         } | 
 |  |  |         if (sensors.length > 0) { | 
 
 |  |  | 
 |  |  |             <br/> | 
 |  |  |             <br/> | 
 |  |  |             <div *ngFor="let i of [1,2,3]" nz-form-item nz-row class="mb-sm"> | 
 |  |  |                 <div nz-form-label nz-col [nzSm]="3" [nzXs]="24"> | 
 |  |  |                 <div nz-form-label nz-col [nzSm]="4" [nzXs]="24"> | 
 |  |  |                     <span [ngSwitch]="i"> | 
 |  |  |                         <label *ngSwitchCase="1">一级报警方式:</label> | 
 |  |  |                         <label *ngSwitchCase="2">二级报警方式:</label> | 
 |  |  | 
 |  |  |                 <br/> | 
 |  |  |                 <br/> | 
 |  |  |             </div> | 
 |  |  |             <br/> | 
 |  |  |             <div nz-form-item nz-row class="mb-sm"> | 
 |  |  |                 <div nz-form-label nz-col [nzSm]="5" [nzXs]="24"> | 
 |  |  |                     <span [ngSwitch]="i"> | 
 |  |  |                         <label>报警间隔时间<small>(单位:分)</small>:</label> | 
 |  |  |                     </span> | 
 |  |  |                 </div> | 
 |  |  |                 <div nz-form-control nz-col [nzSpan]="12"> | 
 |  |  |                     <nz-input-number style="width: 200px;"  formControlName="interval" [nzParser]="parserInt" nzMin="1" nzStep="1" nzDisabled="{{ !f.value['alarmMode']['enable'] }}"></nz-input-number> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |     </nz-card> | 
 |  |  |     <footer-toolbar errorCollect> | 
 
 |  |  | 
 |  |  |         alarmMode: this.formBuilder.group( | 
 |  |  |           { | 
 |  |  |             enable: [alarmMode.enable], | 
 |  |  |             interval: [alarmMode.interval], | 
 |  |  |             level1: [alarmMode.level1], | 
 |  |  |             level2: [alarmMode.level2], | 
 |  |  |             level3: [alarmMode.level3] | 
 |  |  | 
 |  |  |           ); | 
 |  |  |        } | 
 |  |  |    } | 
 |  |  |    // 转整型 | 
 |  |  |    parserInt = (value) => parseInt(value , 10); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |   } | 
 |  |  |    | 
 |  |  |   registration(row){ | 
 |  |  |       sessionStorage.setItem("organization", JSON.stringify(row)); | 
 |  |  |       sessionStorage.setItem('organization', JSON.stringify(row)); | 
 |  |  |   } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | import {environment} from "../../../../environments/environment";
 | 
 |  |  | import {environment} from '../../../../environments/environment';
 | 
 |  |  | import {Component, OnInit, ViewChild} from '@angular/core';
 | 
 |  |  | import {SimpleTableColumn} from "@delon/abc";
 | 
 |  |  | import {SimpleTableColumn} from '@delon/abc';
 | 
 |  |  | import {_HttpClient} from '@delon/theme';
 | 
 |  |  | import {Subject} from "rxjs";
 | 
 |  |  | import * as moment from 'moment';
 | 
 |  |  | import {NzMessageService} from "ng-zorro-antd";
 | 
 |  |  | import {NzMessageService} from 'ng-zorro-antd';
 | 
 |  |  | import { Subject } from 'rxjs/Subject';
 | 
 |  |  | @Component({
 | 
 |  |  |   selector: 'app-registration',
 | 
 |  |  |   templateUrl: './registration.component.html',
 | 
 |  |  | 
 |  |  |       }
 | 
 |  |  |     },
 | 
 |  |  |   ];
 | 
 |  |  |   isVisible: boolean = false;
 | 
 |  |  |   isVisible = false;
 | 
 |  |  |   _date = new Date(Date.now() + 3600 * 24 * 1 * 1000);
 | 
 |  |  | 
 | 
 |  |  |   ngOnInit() {
 | 
 |  |  |     const organization = this.organization = JSON.parse(sessionStorage.getItem("organization"));
 | 
 |  |  |     const organization = this.organization = JSON.parse(sessionStorage.getItem('organization'));
 | 
 |  |  |     this.extraParams.organizationId = organization.id;
 | 
 |  |  |     this.queryTextStream.debounceTime(900).distinctUntilChanged().subscribe(value => {
 | 
 |  |  |       this.load();
 | 
 
 |  |  | 
 |  |  | import { AreacodeService } from '@business/services/http/areacode.service'; | 
 |  |  | import { OrganizationConfigComponent } from './organization/organization-config/organization-config.component'; | 
 |  |  | import { OrganizationListComponent } from './organization/organization-list/organization-list.component'; | 
 |  |  | import { RegistrationComponent } from "./registration/registration.component"; | 
 |  |  | import { RegistrationComponent } from './registration/registration.component'; | 
 |  |  | import { SensorsService } from '@business/services/http/sensors.service'; | 
 |  |  | import { BusinessModule } from '@business/business.module'; | 
 |  |  |  | 
 
 |  |  | 
 |  |  |     <link rel="icon" type="image/x-icon" href="favicon.ico"> | 
 |  |  |     <!-- Apple Touch Icon --> | 
 |  |  |     <!-- <link rel="apple-touch-icon" href="custom-icon.png"> --> | 
 |  |  |     <style type="text/css">.preloader{position:fixed;top:0;left:0;width:100%;height:100%;overflow:hidden;background:#49a9ee;z-index:9999;transition:opacity .65s}.preloader-hidden-add{opacity:1;display:block}.preloader-hidden-add-active{opacity:0}.preloader-hidden{display:none}.cs-loader{position:absolute;top:0;left:0;height:100%;width:100%}.cs-loader-inner{transform:translateY(-50%);top:50%;position:absolute;width:100%;color:#fff;text-align:center}.cs-loader-inner label{font-size:20px;opacity:0;display:inline-block}@keyframes lol{0%{opacity:0;transform:translateX(-300px)}33%{opacity:1;transform:translateX(0)}66%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(300px)}}.cs-loader-inner label:nth-child(6){animation:lol 3s infinite ease-in-out}.cs-loader-inner label:nth-child(5){animation:lol 3s .1s infinite ease-in-out}.cs-loader-inner label:nth-child(4){animation:lol 3s .2s infinite ease-in-out}.cs-loader-inner label:nth-child(3){animation:lol 3s .3s infinite ease-in-out}.cs-loader-inner label:nth-child(2){animation:lol 3s .4s infinite ease-in-out}.cs-loader-inner label:nth-child(1){animation:lol 3s .5s infinite ease-in-out}</style> | 
 |  |  |     <style type="text/css"> | 
 |  |  |         .preloader { | 
 |  |  |             position: fixed; | 
 |  |  |             top: 0; | 
 |  |  |             left: 0; | 
 |  |  |             width: 100%; | 
 |  |  |             height: 100%; | 
 |  |  |             overflow: hidden; | 
 |  |  |             background: #49a9ee; | 
 |  |  |             z-index: 9999; | 
 |  |  |             transition: opacity 0.65s; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .preloader-hidden-add { | 
 |  |  |             opacity: 1; | 
 |  |  |             display: block; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .preloader-hidden-add-active { | 
 |  |  |             opacity: 0; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .preloader-hidden { | 
 |  |  |             display: none; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader { | 
 |  |  |             position: absolute; | 
 |  |  |             top: 0; | 
 |  |  |             left: 0; | 
 |  |  |             height: 100%; | 
 |  |  |             width: 100%; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner { | 
 |  |  |             transform: translateY(-50%); | 
 |  |  |             top: 50%; | 
 |  |  |             position: absolute; | 
 |  |  |             width: 100%; | 
 |  |  |             color: #fff; | 
 |  |  |             text-align: center; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label { | 
 |  |  |             font-size: 20px; | 
 |  |  |             opacity: 0; | 
 |  |  |             display: inline-block; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         @keyframes lol { | 
 |  |  |             0% { | 
 |  |  |                 opacity: 0; | 
 |  |  |                 transform: translateX(-300px); | 
 |  |  |             } | 
 |  |  |             33% { | 
 |  |  |                 opacity: 1; | 
 |  |  |                 transform: translateX(0); | 
 |  |  |             } | 
 |  |  |             66% { | 
 |  |  |                 opacity: 1; | 
 |  |  |                 transform: translateX(0); | 
 |  |  |             } | 
 |  |  |             100% { | 
 |  |  |                 opacity: 0; | 
 |  |  |                 transform: translateX(300px); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(6) { | 
 |  |  |             animation: lol 3s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(5) { | 
 |  |  |             animation: lol 3s .1s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(4) { | 
 |  |  |             animation: lol 3s .2s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(3) { | 
 |  |  |             animation: lol 3s .3s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(2) { | 
 |  |  |             animation: lol 3s .4s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         .cs-loader-inner label:nth-child(1) { | 
 |  |  |             animation: lol 3s .5s infinite ease-in-out; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     </style> | 
 |  |  | </head> | 
 |  |  |  | 
 |  |  | <body> | 
 
 |  |  | 
 |  |  |     "no-switch-case-fall-through": true, | 
 |  |  |     "no-trailing-whitespace": false, | 
 |  |  |     "no-unnecessary-initializer": true, | 
 |  |  |     "no-unused-expression": false,     | 
 |  |  |     "no-unused-expression": true, | 
 |  |  |     "no-use-before-declare": true, | 
 |  |  |     "no-var-keyword": true, | 
 |  |  |     "object-literal-sort-keys": false, |