| | |
| | | import { DeviceVersion } from './version.service'; |
| | | import { ExampleService } from './../../../core/services/example.service'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { environment } from './../../../../environments/environment.prod'; |
| | |
| | | import { PageBean } from '@core/entity/grid'; |
| | | |
| | | |
| | | export interface DeviceVersion { |
| | | createTime?: any; |
| | | description?: string; |
| | | id?: number; |
| | | name?: string; |
| | | version?: number; |
| | | } |
| | | |
| | | @Injectable() |
| | | export class VersionService { |
| | | private urls = { |
| | | edit: environment.SERVER_BASH_URL + '/device-version/page-list' |
| | | edit: environment.SERVER_BASH_URL + '/device-version/page-list', |
| | | save: environment.SERVER_BASH_URL + '/device-version/add-or-modify', |
| | | delete: environment.SERVER_BASH_URL + '/device-version/delete-by-ids' |
| | | }; |
| | | public loading = this.http.loading; |
| | | constructor(private http: _HttpClient) { } |
| | | public getPagingList(page: PageBean, queryText: string): Observable<PageBean> { |
| | | const example = new ExampleService(); |
| | |
| | | const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex, queryParams: example.getSqlParam()}; |
| | | return this.http.get(this.urls.edit, param); |
| | | } |
| | | public save(data: any): Observable<any> { |
| | | return this.http.post(this.urls.save, data); |
| | | } |
| | | public delete(...ids: number[]): Observable<any> { |
| | | return this.http.post(this.urls.delete, ids); |
| | | } |
| | | } |