From 27cd36be226ca2434f06b1ae9e4d43f1fea639ab Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Mon, 25 Jun 2018 16:40:28 +0800 Subject: [PATCH] 组织配置单位和页面显示 --- src/app/business/services/http/organization.service.ts | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/business/services/http/organization.service.ts b/src/app/business/services/http/organization.service.ts index 6f3ff0b..20fb068 100644 --- a/src/app/business/services/http/organization.service.ts +++ b/src/app/business/services/http/organization.service.ts @@ -1,4 +1,4 @@ -import { Organization, AlarmConfig } from '@business/entity/data'; +import { Organization, AlarmConfig, OrganizationSensorUnit, SensorUnit } from '@business/entity/data'; import { ExampleService } from '@business/services/util/example.service'; import { _HttpClient } from '@delon/theme'; import { environment } from 'environments/environment'; @@ -11,10 +11,10 @@ @Injectable() export class OrganizationService { - handle: 'list'|'config' = 'list'; - config: {pageBean: PageBean, resultBean: ResultBean<AlarmConfig>}; + handle: 'list'|'config'|'unit'|'screen' = 'list'; + config: {pageBean?: PageBean, resultBean?: ResultBean<AlarmConfig|any>} = {}; data: Organization; - title: '������������'|'������������' = '������������'; + title: '������������'|'������������������'|'������������������'|'������������������' = '������������'; private urls = { list: environment.SERVER_BASH_URL + '/organization/page-list', save: environment.SERVER_BASH_URL + '/organization/add-or-modify', @@ -40,4 +40,12 @@ public delete(...ids: number[]): Observable<any> { return this.http.post(this.urls.delete, ids); } + public getResultBeanData(key: string) { + if (!!this.config.resultBean + && !!this.config.resultBean.code + && !!this.config.resultBean.data) { + return this.config.resultBean.data[key]; + } + return null; + } } -- Gitblit v1.8.0