| | |
| | | ngOnInit() { |
| | | this.initPage(); |
| | | this.queryTextStream |
| | | .debounceTime(1000) |
| | | .debounceTime(500) |
| | | .distinctUntilChanged() |
| | | .subscribe(queryText => { |
| | | this.load(); |
| | | }); |
| | | } |
| | | queryTextChanged($event) { |
| | | // tslint:disable-next-line:no-debugger |
| | | debugger; |
| | | this.queryTextStream.next(this.queryText); |
| | | this.queryTextStream.next(this.queryMap.value); |
| | | } |
| | | load(reload: boolean = false) { |
| | | if (reload) { |
| | | this.grid.pageIndex = 1 ; |
| | | } |
| | | this.versionService.getPagingList(this.grid, this.queryText).subscribe( |
| | | 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(); |
| | | } |