| | |
| | | |
| | | checkAll(value: boolean) { |
| | | this.data.forEach( |
| | | row => {row.checked = value;} |
| | | ) |
| | | row => {row.checked = value; } |
| | | ); |
| | | this.refreshStatus(); |
| | | } |
| | | getData():any[]{ |
| | | getData(): any [] { |
| | | return this.data; |
| | | } |
| | | initData(pageData: {data?: any[], total?: number}) { |
| | |
| | | export enum Types { |
| | | Date,json |
| | | Date, json |
| | | } |
| | |
| | | ngOnInit() { |
| | | this.initPage(); |
| | | this.queryTextStream |
| | | .debounceTime(1000) |
| | | .debounceTime(500) |
| | | .distinctUntilChanged() |
| | | .subscribe(queryText => { |
| | | this.load(); |
| | |
| | | } |
| | | this.versionService.getPagingList(this.grid, this.queryMap.value).subscribe( |
| | | (res: PageBean) => { |
| | | if (res.total > 0 && res.data != null) { |
| | | if (res != null && res.data != null) { |
| | | this.grid.initData(res); |
| | | this.grid.refreshStatus(); |
| | | } |
| | |
| | | constructor(private http: _HttpClient) { } |
| | | public getPagingList(page: PageBean, queryText: string): Observable<PageBean> { |
| | | const example = new ExampleService(); |
| | | example.or().andLike({name: 'name', value: '%' + queryText + '%'}); |
| | | example.or().andEqualTo({name: 'version', value: queryText}); |
| | | if (queryText != null && queryText !== '') { |
| | | example.or().andLike({name: 'name', value: '%' + queryText + '%'}); |
| | | example.or().andEqualTo({name: 'version', value: queryText}); |
| | | } |
| | | const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex, queryParams: example.getSqlParam()}; |
| | | return this.http.get(this.urls.edit, param); |
| | | } |