| | |
| | | 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'; |
| | |
| | | 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; |
| | |
| | | public msgSrv: NzMessageService, |
| | | private modalHelper: ModalHelper, |
| | | private router: Router, |
| | | private sensorsService: SensorsService, |
| | | private alarmConfigService: AlarmConfigService, |
| | | ) {} |
| | | |
| | | ngOnInit() { |
| | |
| | | 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 = '组织配置'; |
| | | }); |
| | | } |
| | | } |