From f320f1970e5d80a423f377fb3253628bd1e7f5bf Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Thu, 08 Mar 2018 15:10:46 +0800 Subject: [PATCH] Merge branch 'develop' of ssh://121.40.92.176:29418/screen-frontend into develop --- src/app/routes/systems/organization/organization-list/organization-list.component.ts | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/src/app/routes/systems/organization/organization-list/organization-list.component.ts b/src/app/routes/systems/organization/organization-list/organization-list.component.ts index 24e80c5..abe84f8 100644 --- a/src/app/routes/systems/organization/organization-list/organization-list.component.ts +++ b/src/app/routes/systems/organization/organization-list/organization-list.component.ts @@ -1,3 +1,5 @@ +import { AlarmConfigService } from '@business/services/http/alarm-config.service'; +import { SensorsService } from '@business/services/http/sensors.service'; import { Router } from '@angular/router'; import { ModalHelper } from '@delon/theme'; import { NzModalService, NzMessageService } from 'ng-zorro-antd'; @@ -8,11 +10,13 @@ import { Subject } from 'rxjs/Subject'; import { Types } from '@business/enum/types.enum'; import { OrganizationEditComponent } from 'app/routes/systems/organization/organization-edit/organization-edit.component'; +import { zip } from 'rxjs/observable/zip'; @Component({ selector: 'app-organization-list', templateUrl: './organization-list.component.html', - styles: [] + styles: [], + providers: [AlarmConfigService] }) export class OrganizationListComponent implements OnInit { private organization: Organization; @@ -89,6 +93,8 @@ public msgSrv: NzMessageService, private modalHelper: ModalHelper, private router: Router, + private sensorsService: SensorsService, + private alarmConfigService: AlarmConfigService, ) {} ngOnInit() { @@ -205,8 +211,20 @@ this.load(); } config(row) { + // ������������������ExpressionChangedAfterItHasBeenCheckedError + setTimeout(() => { + this.grid.loading = true; + }, 1); + zip( + this.sensorsService.getPagingList({pageIndex: 0, pageSize: 0}, null), + this.alarmConfigService.getByOid( row.id ) + ).subscribe(([pageBean, resultBean]) => { + console.log(pageBean); + this.grid.loading = false; this.organizationService.handle = 'config' ; this.organizationService.data = row; + this.organizationService.config = {pageBean, resultBean}; this.organizationService.title = '������������'; + }); } } -- Gitblit v1.8.0