5 files added
26 files modified
| | |
| | | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
| | | |
| | | import { DelonModule } from './delon.module'; |
| | | import { CoreModule } from './core/core.module'; |
| | | import { SharedModule } from './shared/shared.module'; |
| | | import { CoreModule } from '@core/core.module'; |
| | | import { SharedModule } from '@shared/shared.module'; |
| | | import { AppComponent } from './app.component'; |
| | | import { RoutesModule } from './routes/routes.module'; |
| | | import { LayoutModule } from './layout/layout.module'; |
| | |
| | | import { NgModule } from '@angular/core'; |
| | | import { CommonModule } from '@angular/common'; |
| | | import { TyepHandlePipe } from './tyep-handle.pipe'; |
| | | import { TyepHandlePipe } from '@business/pipe/tyep-handle.pipe'; |
| | | import { DateService } from '@business/services/util/date.service'; |
| | | |
| | | @NgModule({ |
| | |
| | | import { Injectable } from '@angular/core'; |
| | | import { _HttpClient } from '@delon/theme/services/http/http.client'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | | import { environment } from 'environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | |
| | | @Injectable() |
| | | export class AreacodeService { |
| | |
| | | import { environment } from 'environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { Injectable } from '@angular/core'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { environment } from 'environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { Injectable } from '@angular/core'; |
| | | import { ResultBean, PageBean } from '@business/entity/grid'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | |
| | | import { Authorization } from '@business/entity/token'; |
| | | import { HttpClient } from '@angular/common/http'; |
| | | import { environment } from 'environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | | import { Injectable, Inject } from '@angular/core'; |
| | | import { UserContext } from '@business/entity/data'; |
| | |
| | | import { PageBean, ResultBean } from '@business/entity/grid'; |
| | | import { ExampleService } from '@business/services/util/example.service'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { environment } from 'environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { RouteConfigLoadStart } from '@angular/router'; |
| | | import { Injectable } from '@angular/core'; |
| | | import { equal } from 'assert'; |
| | |
| | | import { NgModule, Optional, SkipSelf } from '@angular/core'; |
| | | import { throwIfAlreadyLoaded } from './module-import-guard'; |
| | | import { throwIfAlreadyLoaded } from '@core/module-import-guard'; |
| | | |
| | | import { I18NService } from './i18n/i18n.service'; |
| | | import { I18NService } from '@core/i18n/i18n.service'; |
| | | |
| | | @NgModule({ |
| | | providers: [ |
| | |
| | | import { TranslateService } from '@ngx-translate/core'; |
| | | import { MenuService, SettingsService, TitleService } from '@delon/theme'; |
| | | import { ACLService } from '@delon/acl'; |
| | | import { I18NService } from '../i18n/i18n.service'; |
| | | import { I18NService } from '@core/i18n/i18n.service'; |
| | | |
| | | /** |
| | | * 用于应用启动时 |
| | |
| | | import { environment } from '../../../../environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { zip } from 'rxjs/observable/zip'; |
| | | import { Component, OnInit, OnDestroy } from '@angular/core'; |
| | | import { NzMessageService } from 'ng-zorro-antd'; |
| | |
| | | import { ExampleService } from '@business/services/util/example.service'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | | import { OrganizationService } from '@business/services/http/organization.service'; |
| | | import { debug } from 'util'; |
| | | |
| | | @Component({ |
| | | selector: 'app-device-edit', |
| | |
| | | import { MonitorPoint } from '@business/entity/data'; |
| | | import { PageBean } from '@business/entity/grid'; |
| | | import { OrganizationService } from '@business/services/http//organization.service'; |
| | | import { OrganizationService } from '@business/services/http/organization.service'; |
| | | import { AreacodeService } from '@business/services/http/areacode.service'; |
| | | import { Component, OnInit } from '@angular/core'; |
| | | import { NzMessageService, NzModalSubject } from 'ng-zorro-antd'; |
| | |
| | | import { VersionService } from '@business/services/http/version.service'; |
| | | import { Types } from '@business/enum/types.enum'; |
| | | import { Column, Grid, PageBean } from '@business/entity/grid'; |
| | | import { VersionEditComponent } from 'app/routes/devices/version/version-edit/version-edit.component'; |
| | | import { VersionEditComponent } from './version-edit/version-edit.component'; |
| | | |
| | | |
| | | @Component({ |
| | |
| | | import { environment } from '../../../../environments/environment'; |
| | | import { environment } from '@env/environment'; |
| | | import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; |
| | | import { NzMessageService } from 'ng-zorro-antd'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | |
| | | ngAfterViewInit() { |
| | | const PM25 = echarts.init(document.getElementById('PM25')); |
| | | PM25.showLoading(); |
| | | const params = {
|
| | | const params = { |
| | | type: 'month', |
| | | sensors: JSON.stringify(['e1']), |
| | | items: JSON.stringify([ |
| | | {areaCode: 320583, formatTime: moment().format('YYYY-MM')}, |
| | | {areaCode: 320583, formatTime: moment().subtract(1, 'M').format('YYYY-MM')} |
| | | ])
|
| | | ]) |
| | | }; |
| | | this.http2.get(environment.SERVER_BASH_URL + 'report/compare', {params: params}).subscribe((res: any) => { |
| | | const PM25Option = $.extend(true, |
| | | {
|
| | | { |
| | | xAxis: {data: res.data.times}, |
| | | series: [ |
| | | {data: res.data.datas[0]['e1']}, |
| | | {data: res.data.datas[1]['e1']} |
| | | ]
|
| | | ] |
| | | }, |
| | | this.option); |
| | | PM25.setOption(PM25Option, false); |
| | |
| | | import {environment} from '../../../environments/environment';
|
| | | import {environment} from '@env/environment';
|
| | | import {HttpClient} from '@angular/common/http';
|
| | | import {Component, OnInit} from '@angular/core';
|
| | | import {_HttpClient} from '@delon/theme';
|
| | |
| | | this.isShow = true;
|
| | | this.initWarning();
|
| | | } else {
|
| | | this.isShow = false;
this.initForecasting();
|
| | | this.isShow = false;
|
| | | this.initForecasting();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | this.option.title.text = title + '(温度)';
|
| | | this.option.yAxis.name = '单位:℃';
|
| | | this.option.series[0].data = temp;
|
| | | this.option.series[0].itemStyle.color = this.colors[0];
forecasting_tempChart.setOption(this.option, false);
|
| | | this.option.series[0].itemStyle.color = this.colors[0];
|
| | | forecasting_tempChart.setOption(this.option, false);
|
| | |
|
| | | const forecasting_humidityChart = echarts.init(document.getElementById('forecasting_humidity'));
|
| | | this.option.title.text = title + '(湿度)';
|
| | |
| | | // 样式控制,设备名称列冻结偏移 |
| | | public sensorNameScrollLeft = 0; |
| | | public sensorNameScrollTop = 0; |
| | | @ViewChild(NzTreeComponent) private tree: NzTreeComponent; |
| | | // @ViewChild(NzTreeComponent) private tree: NzTreeComponent; |
| | | 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} = {}; |
New file |
| | |
| | | <!-- <ng-template [ngSwitch]="deviceControllerService.incumbent"> |
| | | <app-device-status *ngSwitchCase="status"></app-device-status> |
| | | </ng-template> --> |
| | | <ng-container [ngSwitch]="deviceControllerService.incumbent"> |
| | | <app-device-status *ngSwitchCase="'status'"></app-device-status> |
| | | <app-device-data *ngSwitchCase="'data'"></app-device-data> |
| | | <app-device-status *ngSwitchDefault> |
| | | </app-device-status> |
| | | </ng-container> |
New file |
| | |
| | | import { Component, OnInit } from '@angular/core'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { DeviceControllerService } from './device-controller.service'; |
| | | |
| | | @Component({ |
| | | selector: 'app-device-controller', |
| | | templateUrl: './device-controller.component.html', |
| | | providers:[DeviceControllerService] |
| | | }) |
| | | export class DeviceControllerComponent implements OnInit { |
| | | constructor( |
| | | private http: _HttpClient, |
| | | public deviceControllerService:DeviceControllerService |
| | | ) { } |
| | | ngOnInit() { |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | import { Injectable } from '@angular/core'; |
| | | |
| | | @Injectable() |
| | | export class DeviceControllerService { |
| | | public incumbent: 'data'|'status' = 'status'; |
| | | public data: any = {}; |
| | | constructor() { } |
| | | |
| | | } |
New file |
| | |
| | | <pro-header [title]="'名称:'+ deviceData.name"> |
| | | <ng-template #logo><img src="https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png"></ng-template> |
| | | <ng-template #action> |
| | | <button nz-button [nzType]="'primary'" [nzSize]="'large'" (click) ="toDeviceStatus()">返回</button> |
| | | </ng-template> |
| | | <ng-template #content> |
| | | <desc-list size="small" col="2"> |
| | | <desc-list-item term="创建人">曲丽丽</desc-list-item> |
| | | <desc-list-item term="订购产品">XX 服务</desc-list-item> |
| | | <desc-list-item term="创建时间">2017-07-07</desc-list-item> |
| | | <desc-list-item term="关联单据"><a (click)="msg.success('yes')">12421</a></desc-list-item> |
| | | <desc-list-item term="生效日期">2017-07-07 ~ 2017-08-08</desc-list-item> |
| | | <desc-list-item term="备注">请于两个工作日内确认</desc-list-item> |
| | | </desc-list> |
| | | </ng-template> |
| | | <ng-template #extra> |
| | | <div nz-row> |
| | | <div nz-col nzXs="24" nzSm="12"> |
| | | <p class="text-grey">状态</p> |
| | | <p class="text-lg">待审批</p> |
| | | </div> |
| | | <div nz-col nzXs="24" nzSm="12"> |
| | | <p class="text-grey">订单金额</p> |
| | | <p class="text-lg">¥ 568.08</p> |
| | | </div> |
| | | </div> |
| | | </ng-template> |
| | | <ng-template #tab> |
| | | <nz-tabset [nzSize]="'default'"> |
| | | <nz-tab><ng-template #nzTabHeading>详情</ng-template></nz-tab> |
| | | <nz-tab><ng-template #nzTabHeading>规则</ng-template></nz-tab> |
| | | </nz-tabset> |
| | | </ng-template> |
| | | </pro-header> |
| | | <nz-card [nzBordered]="false" class="mb-lg" nzTitle="流程进度"> |
| | | <nz-steps [nzCurrent]="1"> |
| | | <nz-step [nzTitle]="'创建项目'" [nzDescription]="createDesc"> |
| | | <ng-template #createDesc> |
| | | <p class="my-sm">曲丽丽<nz-icon nzType="dingding-o" class="ml-sm"></nz-icon></p> |
| | | <p>2016-12-12 12:32</p> |
| | | </ng-template> |
| | | </nz-step> |
| | | <nz-step [nzTitle]="'部门初审'" [nzDescription]="checkedDesc"> |
| | | <ng-template #checkedDesc> |
| | | <p class="my-sm">周毛毛<nz-icon nzType="dingding-o" style="color: #00A0E9" class="ml-sm"></nz-icon></p> |
| | | <a (click)="msg.success('click')">催一下</a> |
| | | </ng-template> |
| | | </nz-step> |
| | | <nz-step [nzTitle]="'财务复核'"></nz-step> |
| | | <nz-step [nzTitle]="'完成'"></nz-step> |
| | | </nz-steps> |
| | | <div class="steps-content"></div> |
| | | </nz-card> |
| | | <nz-card [nzBordered]="false" nzTitle="用户信息" class="mb-lg"> |
| | | <desc-list class="mb-lg"> |
| | | <desc-list-item term="用户姓名">付小小</desc-list-item> |
| | | <desc-list-item term="会员卡号">32943898021309809423</desc-list-item> |
| | | <desc-list-item term="身份证">3321944288191034921</desc-list-item> |
| | | <desc-list-item term="联系方式">18112345678</desc-list-item> |
| | | <desc-list-item term="联系地址">曲丽丽 18100000000 浙江省杭州市西湖区黄姑山路工专路交叉路口</desc-list-item> |
| | | </desc-list> |
| | | <desc-list class="mb-lg" title="信息组"> |
| | | <desc-list-item term="某某数据">725</desc-list-item> |
| | | <desc-list-item term="该数据更新时间">2017-08-08</desc-list-item> |
| | | <desc-list-item> </desc-list-item> |
| | | <desc-list-item [term]="term"> |
| | | <ng-template #term> |
| | | 某某数据 |
| | | <nz-tooltip [nzTitle]="'数据说明'"> |
| | | <span nz-tooltip><i class="anticon anticon-info-circle-o"></i></span> |
| | | </nz-tooltip> |
| | | </ng-template> |
| | | 725 |
| | | </desc-list-item> |
| | | <desc-list-item term="该数据更新时间">2017-08-08</desc-list-item> |
| | | </desc-list> |
| | | <h4 class="mb-md">信息组</h4> |
| | | <nz-card nzType="inner" nzTitle="多层级信息组"> |
| | | <desc-list size="small" title="组名称" class="mb-md"> |
| | | <desc-list-item term="负责人">林东东</desc-list-item> |
| | | <desc-list-item term="角色码">1234567</desc-list-item> |
| | | <desc-list-item term="所属部门">XX公司 - YY部</desc-list-item> |
| | | <desc-list-item term="过期时间">2017-08-08</desc-list-item> |
| | | <desc-list-item term="描述">这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</desc-list-item> |
| | | </desc-list> |
| | | <nz-divider class="mb-md"></nz-divider> |
| | | <desc-list size="small" title="组名称" col="1" class="mb-md"> |
| | | <desc-list-item term="学名"> |
| | | Citrullus lanatus (Thunb.) Matsum. et Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗.. |
| | | </desc-list-item> |
| | | </desc-list> |
| | | <nz-divider class="mb-md"></nz-divider> |
| | | <desc-list size="small" title="组名称"> |
| | | <desc-list-item term="负责人">付小小</desc-list-item> |
| | | <desc-list-item term="角色码">1234568</desc-list-item> |
| | | </desc-list> |
| | | </nz-card> |
| | | </nz-card> |
| | | <nz-card [nzBordered]="false" nzTitle="用户近半年来电记录" class="mb-lg"> |
| | | <div class="no-data"> |
| | | <i class="anticon anticon-frown-o"></i>暂无数据 |
| | | </div> |
| | | </nz-card> |
| | | <nz-card [nzBordered]="false"> |
| | | <nz-card-tab nzTabHeading="操作日志一"> |
| | | <nz-table [nzDataSource]="data.advancedOperation1" [nzIsPagination]="false"> |
| | | <thead nz-thead> |
| | | <tr> |
| | | <th nz-th><span>操作类型</span></th> |
| | | <th nz-th><span>操作人</span></th> |
| | | <th nz-th><span>执行结果</span></th> |
| | | <th nz-th><span>操作时间</span></th> |
| | | <th nz-th><span>备注</span></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody nz-tbody> |
| | | <tr nz-tbody-tr *ngFor="let i of data.advancedOperation1"> |
| | | <td nz-td>{{i.type}}</td> |
| | | <td nz-td>{{i.name}}</td> |
| | | <td nz-td> |
| | | <nz-badge *ngIf="i.status === 'success'" [nzStatus]="'success'" [nzText]="'成功'"></nz-badge> |
| | | <nz-badge *ngIf="i.status !== 'success'" [nzStatus]="'processing'" [nzText]="'进行中'"></nz-badge> |
| | | </td> |
| | | <td nz-td>{{i.updatedAt | _date}}</td> |
| | | <td nz-td>{{i.memo}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </nz-table> |
| | | </nz-card-tab> |
| | | <nz-card-tab nzTabHeading="操作日志二"> |
| | | <nz-table [nzDataSource]="data.advancedOperation2" [nzIsPagination]="false"> |
| | | <thead nz-thead> |
| | | <tr> |
| | | <th nz-th><span>操作类型</span></th> |
| | | <th nz-th><span>操作人</span></th> |
| | | <th nz-th><span>执行结果</span></th> |
| | | <th nz-th><span>操作时间</span></th> |
| | | <th nz-th><span>备注</span></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody nz-tbody> |
| | | <tr nz-tbody-tr *ngFor="let i of data.advancedOperation2"> |
| | | <td nz-td>{{i.type}}</td> |
| | | <td nz-td>{{i.name}}</td> |
| | | <td nz-td> |
| | | <nz-badge *ngIf="i.status === 'success'" [nzStatus]="'success'" [nzText]="'成功'"></nz-badge> |
| | | <nz-badge *ngIf="i.status !== 'success'" [nzStatus]="'processing'" [nzText]="'进行中'"></nz-badge> |
| | | </td> |
| | | <td nz-td>{{i.updatedAt | _date}}</td> |
| | | <td nz-td>{{i.memo}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </nz-table> |
| | | </nz-card-tab> |
| | | <nz-card-tab nzTabHeading="操作日志三"> |
| | | <nz-table [nzDataSource]="data.advancedOperation3" [nzIsPagination]="false"> |
| | | <thead nz-thead> |
| | | <tr> |
| | | <th nz-th><span>操作类型</span></th> |
| | | <th nz-th><span>操作人</span></th> |
| | | <th nz-th><span>执行结果</span></th> |
| | | <th nz-th><span>操作时间</span></th> |
| | | <th nz-th><span>备注</span></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody nz-tbody> |
| | | <tr nz-tbody-tr *ngFor="let i of data.advancedOperation3"> |
| | | <td nz-td>{{i.type}}</td> |
| | | <td nz-td>{{i.name}}</td> |
| | | <td nz-td> |
| | | <nz-badge *ngIf="i.status === 'success'" [nzStatus]="'success'" [nzText]="'成功'"></nz-badge> |
| | | <nz-badge *ngIf="i.status !== 'success'" [nzStatus]="'processing'" [nzText]="'进行中'"></nz-badge> |
| | | </td> |
| | | <td nz-td>{{i.updatedAt | _date}}</td> |
| | | <td nz-td>{{i.memo}}</td> |
| | | </tr> |
| | | </tbody> |
| | | </nz-table> |
| | | </nz-card-tab> |
| | | </nz-card> |
| | | |
New file |
| | |
| | | import { Component, OnInit } from '@angular/core'; |
| | | import { NzMessageService } from 'ng-zorro-antd'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { DeviceControllerService } from '../device-controller/device-controller.service'; |
| | | |
| | | @Component({ |
| | | selector: 'app-device-data', |
| | | templateUrl: './device-data.component.html' |
| | | }) |
| | | export class DeviceDataComponent implements OnInit { |
| | | data = { |
| | | advancedOperation1: [], |
| | | advancedOperation2: [], |
| | | advancedOperation3: [] |
| | | }; |
| | | public get deviceData() { |
| | | return this.deviceControllerService.data; |
| | | } |
| | | constructor( |
| | | public msg: NzMessageService, |
| | | private http: _HttpClient, |
| | | private deviceControllerService:DeviceControllerService, |
| | | ) {} |
| | | /** |
| | | * toDeviceStatus |
| | | */ |
| | | public toDeviceStatus() { |
| | | this.deviceControllerService.incumbent = 'status'; |
| | | } |
| | | ngOnInit() { |
| | | this.http.get('/profile/advanced').subscribe((res: any) => this.data = res); |
| | | } |
| | | } |
| | |
| | | import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; |
| | | import { SimpleTableColumn, SimpleTableComponent } from '@delon/abc'; |
| | | import { Subject } from 'rxjs/Subject'; |
| | | import { CoordinatesPickerComponent } from 'app/routes/map/coordinates-picker/coordinates-picker.component'; |
| | | import { CoorPickerService } from 'app/routes/map/coordinates-picker/coordinates-picker.service'; |
| | | import { CoordinatesPickerComponent } from '../../map/coordinates-picker/coordinates-picker.component'; |
| | | import { CoorPickerService } from '../../map/coordinates-picker/coordinates-picker.service'; |
| | | import { OrganizationService } from '@business/services/http/organization.service'; |
| | | import { ExampleService, Criteria } from '@business/services/util/example.service'; |
| | | import { AdjustConfigComponent } from '../../devices/basic-info/adjust-config/adjust-config.component'; |
| | |
| | | { |
| | | text: '删除', |
| | | type: 'del', |
| | | click: (record: any) => this.delete(record.id) |
| | | click: (record: any) => this.addOrModify(record.id) |
| | | }, |
| | | { |
| | | text: '更多', |
| | |
| | | import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; |
| | | import { SimpleTableColumn, SimpleTableComponent } from '@delon/abc'; |
| | | import { Subject } from 'rxjs/Subject'; |
| | | import { CoordinatesPickerComponent } from 'app/routes/map/coordinates-picker/coordinates-picker.component'; |
| | | import { CoorPickerService } from 'app/routes/map/coordinates-picker/coordinates-picker.service'; |
| | | import { CoordinatesPickerComponent } from '../../map/coordinates-picker/coordinates-picker.component'; |
| | | import { CoorPickerService } from '../../map/coordinates-picker/coordinates-picker.service'; |
| | | import { OrganizationService } from '@business/services/http/organization.service'; |
| | | import { ExampleService, Criteria } from '@business/services/util/example.service'; |
| | | import { AdjustConfigComponent } from '../../devices/basic-info/adjust-config/adjust-config.component'; |
| | | import { DeviceEditComponent } from '../../devices/basic-info/device-edit/device-edit.component'; |
| | | import { DeviceControllerService } from '../device-controller/device-controller.service'; |
| | | |
| | | @Component({ |
| | | selector: 'app-device-status', |
| | |
| | | { title: '维护人', index: 'operateUser.name' }, |
| | | { title: '生产时间', width: '100px', type: 'date', index: 'createTime' }, |
| | | { title: '安装时间', width: '100px', type: 'date', index: 'installTime' }, |
| | | { |
| | | title: '操作区', |
| | | buttons: [ |
| | | { |
| | | text: '详细', |
| | | type: 'none', |
| | | click: (record: any) => this.addOrModify(record) |
| | | }, |
| | | { |
| | | text: '数据', |
| | | type: 'none', |
| | | click: (record: any) => { |
| | | this.deviceControllerService.data = record; |
| | | this.deviceControllerService.incumbent = 'data'; |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ]; |
| | | queryTextStream: Subject<string> = new Subject<string>(); |
| | | public queryMap: {orgId?: number, mpointId?: number, devMacOrName?: string} |
| | |
| | | private modalHelper: ModalHelper, |
| | | private coorPickerService: CoorPickerService, |
| | | private organizationService: OrganizationService, |
| | | private http: _HttpClient |
| | | private http: _HttpClient, |
| | | private deviceControllerService: DeviceControllerService, |
| | | ) { } |
| | | |
| | | ngOnInit() { |
| | |
| | | if (!!configMap['mpointId'] && !d['monitorPoint']) { |
| | | data['monitorPoint'] = this.getMonitorPoint(configMap['mpointId']); |
| | | } |
| | | this.modalHelper.static(DeviceEditComponent, { data, configMap }).subscribe( |
| | | const isEditState = false; |
| | | this.modalHelper.static(DeviceEditComponent, { data,configMap,isEditState }).subscribe( |
| | | (ret: { data: any, close: Function }) => { |
| | | // 修改状态 |
| | | if (ret.data['id'] != null) { |
| | | const origData = d; |
| | | const isModified = Object.keys(ret.data).some( |
| | | (key: string) => { |
| | | return ret.data[key] !== origData[key]; |
| | | } |
| | | ); |
| | | // 未作修改 |
| | | if (!isModified) { |
| | | ret.close(); |
| | | this.msgSrv.success('数据未作任何修改!'); |
| | | return; |
| | | } |
| | | } |
| | | this.deviceService.save(ret.data).subscribe( |
| | | (res: any) => { |
| | | if (res.code === 1) { |
| | | this.load(); |
| | | ret.close(); |
| | | this.msgSrv.success('数据保存成功!'); |
| | | } |
| | | } |
| | | ); |
| | | // // 修改状态 |
| | | // if (ret.data['id'] != null) { |
| | | // const origData = d; |
| | | // const isModified = Object.keys(ret.data).some( |
| | | // (key: string) => { |
| | | // return ret.data[key] !== origData[key]; |
| | | // } |
| | | // ); |
| | | // // 未作修改 |
| | | // if (!isModified) { |
| | | // ret.close(); |
| | | // this.msgSrv.success('数据未作任何修改!'); |
| | | // return; |
| | | // } |
| | | // } |
| | | // this.deviceService.save(ret.data).subscribe( |
| | | // (res: any) => { |
| | | // if (res.code === 1) { |
| | | // this.load(); |
| | | // ret.close(); |
| | | // this.msgSrv.success('数据保存成功!'); |
| | | // } |
| | | // } |
| | | // ); |
| | | }); |
| | | } |
| | | private getMonitorPoint(mpointId: number) { |
| | |
| | | import { FormBuilder } from '@angular/forms'; |
| | | import { DeviceService } from '@business/services/http/device.service'; |
| | | import { OperateUserService } from '@business/services/http/operate-user.service'; |
| | | import { CoordinatesPickerComponent } from 'app/routes/map/coordinates-picker/coordinates-picker.component'; |
| | | import { MapModule } from 'app/routes/map/map.module'; |
| | | import { CoorPickerService } from 'app/routes/map/coordinates-picker/coordinates-picker.service'; |
| | | import { CoordinatesPickerComponent } from '../map/coordinates-picker/coordinates-picker.component'; |
| | | import { MapModule } from '../map/map.module'; |
| | | import { CoorPickerService } from '../map/coordinates-picker/coordinates-picker.service'; |
| | | import { AdjustConfigComponent } from '../devices/basic-info/adjust-config/adjust-config.component'; |
| | | import { DeviceEditComponent } from '../devices/basic-info/device-edit/device-edit.component'; |
| | | import { VersionEditComponent } from '../devices/version/version-edit/version-edit.component'; |
| | |
| | | import { NgxEchartsModule } from 'ngx-echarts'; |
| | | import { DeviceMaintenanceComponent } from './device-maintenance/device-maintenance.component'; |
| | | import { DevicesModule } from '../devices/devices.module'; |
| | | import { DeviceDataComponent } from './device-data/device-data.component'; |
| | | import { DeviceControllerComponent } from './device-controller/device-controller.component'; |
| | | const COMPONENTS_NOROUNT = []; |
| | | |
| | | const routes: Routes = [ |
| | |
| | | children: [ |
| | | { path: 'data-audit', component: DataAuditComponent }, |
| | | { path: 'device-status', component: DeviceStatusComponent }, |
| | | { path: 'device-maintenance', component: DeviceMaintenanceComponent } |
| | | { path: 'device-maintenance', component: DeviceMaintenanceComponent }, |
| | | { path: 'device-data', component: DeviceDataComponent }, |
| | | { path: 'device-controller', component: DeviceControllerComponent }, |
| | | ] |
| | | } |
| | | ]; |
| | |
| | | DevicesModule |
| | | ], |
| | | declarations: [ |
| | | ...COMPONENTS_NOROUNT, |
| | | DataAuditComponent, |
| | | DeviceStatusComponent, |
| | | DeviceMaintenanceComponent, |
| | | ...COMPONENTS_NOROUNT |
| | | DeviceDataComponent, |
| | | DeviceControllerComponent , |
| | | ], |
| | | providers: [CoorPickerService, DeviceAdjustValueService, OrganizationService, VersionService, |
| | | SensorsService, AreacodeService, MonitorPointService, |
| | |
| | | import {environment} from '../../../../environments/environment'; |
| | | import {environment} from '@env/environment'; |
| | | import {Component, OnInit, OnDestroy} from '@angular/core'; |
| | | import {NzMessageService} from 'ng-zorro-antd'; |
| | | import {_HttpClient} from '@delon/theme'; |
| | |
| | | import {environment} from '../../../environments/environment'; |
| | | import {environment} from '@env/environment'; |
| | | import {NzMessageService, NzModalService} from 'ng-zorro-antd'; |
| | | import {Component, OnInit, Injector} from '@angular/core'; |
| | | import {HttpClient} from '@angular/common/http'; |
| | |
| | | import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component'; |
| | | import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component'; |
| | | import { ReportComponent } from './report/report.component'; |
| | | import { UserLoginComponent } from 'app/routes/passport/login/login.component'; |
| | | import { UserLoginComponent } from './passport/login/login.component'; |
| | | |
| | | import { ForecastingWarningComponent } from './forecasting-warning/forecasting-warning.component'; |
| | | import { PollutionManagementComponent } from 'app/routes/pollution/management/management.component'; |
| | | import { EnvironmentManagementComponent } from 'app/routes/environment/management/management.component'; |
| | | import { PollutionManagementComponent } from './pollution/management/management.component'; |
| | | import { EnvironmentManagementComponent } from './environment/management/management.component'; |
| | | import { GridTraceComponent } from './grid-trace/grid-trace.component'; |
| | | import { ImageGrabbingComponent } from './raise-dust/image-grabbing/image-grabbing.component'; |
| | | import { SandTableComponent } from './sand-table/sand-table.component'; |
| | |
| | | } |
| | | |
| | | ngOnInit() { |
| | | const day = Number(moment().format('DD')); |
| | | // const day = Number(moment().format('DD')); |
| | | const day = 31; |
| | | for(let index = 1;index <= day; index++) { |
| | | this.calendarDayCells[('0'+index).slice(-2)] = { |
| | | status: 'processing', |
| | |
| | | data: {} |
| | | } |
| | | } |
| | | const startTime = this.getPeriodDate(new Date(),TimeUnits.DAY,'start'); |
| | | const endTime = this.getPeriodDate(new Date(),TimeUnits.HOUR,'end'); |
| | | // const startTime = this.getPeriodDate(new Date(),TimeUnits.DAY,'start'); |
| | | // const endTime = this.getPeriodDate(new Date(),TimeUnits.HOUR,'end'); |
| | | const mo = moment().subtract(1,"months"); |
| | | const startTime = this.getPeriodDate(mo.toDate(),TimeUnits.DAY,'start'); |
| | | const endTime = this.getPeriodDate(mo.toDate(),TimeUnits.DAY,'end'); |
| | | this.http.get( |
| | | 'demo/get-dayaqis',{ |
| | | startTime: startTime, |
| | |
| | | ).subscribe( |
| | | (res: any[]) => { |
| | | if(!!res && res.length >0) { |
| | | debugger; |
| | | Object.keys(this.calendarDayCells).forEach( |
| | | (key) => { |
| | | const index = Number(key) -1; |
| | |
| | | , |
| | | { |
| | | "text": "设备状态", |
| | | "link": "/operation/device-status" |
| | | "link": "/operation/device-controller" |
| | | } |
| | | , |
| | | { |
| | |
| | | import { enableProdMode, ViewEncapsulation } from '@angular/core'; |
| | | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; |
| | | |
| | | import { AppModule } from './app/app.module'; |
| | | import { environment } from './environments/environment'; |
| | | import { AppModule } from 'app/app.module'; |
| | | import { environment } from '@env/environment'; |
| | | |
| | | import { hmrBootstrap } from './hmr'; |
| | | import { hmrBootstrap } from 'hmr'; |
| | | |
| | | import { preloaderFinished } from '@delon/theme'; |
| | | preloaderFinished(); |
| | |
| | | import { I18NService } from '@core/i18n/i18n.service'; |
| | | import { CoreModule } from '@core/core.module'; |
| | | import { SharedModule } from '@shared/shared.module'; |
| | | import { DelonModule } from '../app/delon.module'; |
| | | import { DelonModule } from 'app/delon.module'; |
| | | import { AlainAuthModule } from '@delon/auth'; |
| | | import { HttpLoaderFactory } from '../app/app.module'; |
| | | import { HttpLoaderFactory } from 'app/app.module'; |
| | | |
| | | const resetTestingModule = TestBed.resetTestingModule, |
| | | preventAngularFromResetting = () => TestBed.resetTestingModule = () => TestBed; |