From 3ab77260db42470b71a470e0fee3d38c1945408d Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 27 Dec 2017 10:41:35 +0800
Subject: [PATCH] 恢复默认 server_bash_url
---
src/app/routes/devices/version/version.service.ts | 6 ++++--
src/app/core/entity/grid.ts | 6 +++---
src/app/core/enum/types.enum.ts | 2 +-
src/app/routes/devices/version/version.component.ts | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/app/core/entity/grid.ts b/src/app/core/entity/grid.ts
index 65331b3..b96a8dd 100644
--- a/src/app/core/entity/grid.ts
+++ b/src/app/core/entity/grid.ts
@@ -38,11 +38,11 @@
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}) {
diff --git a/src/app/core/enum/types.enum.ts b/src/app/core/enum/types.enum.ts
index c00636d..e030afe 100644
--- a/src/app/core/enum/types.enum.ts
+++ b/src/app/core/enum/types.enum.ts
@@ -1,3 +1,3 @@
export enum Types {
- Date,json
+ Date, json
}
diff --git a/src/app/routes/devices/version/version.component.ts b/src/app/routes/devices/version/version.component.ts
index f2bb2d3..72fddc4 100644
--- a/src/app/routes/devices/version/version.component.ts
+++ b/src/app/routes/devices/version/version.component.ts
@@ -66,7 +66,7 @@
ngOnInit() {
this.initPage();
this.queryTextStream
- .debounceTime(1000)
+ .debounceTime(500)
.distinctUntilChanged()
.subscribe(queryText => {
this.load();
@@ -81,7 +81,7 @@
}
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();
}
diff --git a/src/app/routes/devices/version/version.service.ts b/src/app/routes/devices/version/version.service.ts
index 8e75fbe..43988c2 100644
--- a/src/app/routes/devices/version/version.service.ts
+++ b/src/app/routes/devices/version/version.service.ts
@@ -25,8 +25,10 @@
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);
}
--
Gitblit v1.8.0