| | |
| | | import { Organization } from '@business/entity/data'; |
| | | import { Organization, AlarmConfig } from '@business/entity/data'; |
| | | import { ExampleService } from '@business/services/util/example.service'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { environment } from 'environments/environment'; |
| | |
| | | import { Injectable } from '@angular/core'; |
| | | import { equal } from 'assert'; |
| | | import { Observable } from 'rxjs/Observable'; |
| | | import { PageBean } from '@business/entity/grid'; |
| | | import { PageBean, ResultBean } from '@business/entity/grid'; |
| | | |
| | | |
| | | @Injectable() |
| | | export class OrganizationService { |
| | | handle: 'list'|'config' = 'list'; |
| | | |
| | | config: {pageBean: PageBean, resultBean: ResultBean<AlarmConfig>}; |
| | | data: Organization; |
| | | title: '组织列表'|'组织配置' = '组织列表'; |
| | | private urls = { |
| | | edit: environment.SERVER_BASH_URL + '/organization/page-list', |
| | | list: environment.SERVER_BASH_URL + '/organization/page-list', |
| | | save: environment.SERVER_BASH_URL + '/organization/add-or-modify', |
| | | delete: environment.SERVER_BASH_URL + '/organization/delete-by-ids' |
| | | }; |
| | |
| | | } |
| | | const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex, |
| | | queryParams: example.getSqlParam(), orderByClause: orderByClause}; |
| | | return this.http.get(this.urls.edit, param); |
| | | return this.http.get(this.urls.list, param); |
| | | } |
| | | public save(data: any): Observable<any> { |
| | | return this.http.post(this.urls.save, data); |