From 0e1e92f2e14b07942f2d8c21b4d96468322aecfe Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 19 Dec 2017 10:00:41 +0800
Subject: [PATCH] updates
---
src/app/routes/users/installer/installer.component.ts | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/app/routes/users/installer/installer.component.ts b/src/app/routes/users/installer/installer.component.ts
index d7ce8aa..4ab218f 100644
--- a/src/app/routes/users/installer/installer.component.ts
+++ b/src/app/routes/users/installer/installer.component.ts
@@ -42,7 +42,7 @@
this.q.pi = 1;
}
this.http.get('./assets/users-installer-data.json', this.q).subscribe((res: any) => {
- const data = res.data;
+ let data = res.data;
const total = res.total;
if (this.q.sorter !== '') {
@@ -55,15 +55,22 @@
});
}
+ if (this.q.u_name) {
+ data = data.filter(d => d.name.indexOf(this.q.u_name) > -1);
+ }
+ if (this.q.u_mobile) {
+ data = data.filter(d => d.mobile.toString().indexOf(this.q.u_mobile) > -1);
+ }
+
const start = (this.q.pi - 1) * this.q.ps;
this.data = data.slice(start, start + this.q.ps);
this.total = total;
});
}
- edit(i) {
- this.modalHelper.static(UserInstallerEditComponent, { i }).subscribe(() => {
- this.load();
+ edit(user) {
+ this.modalHelper.static(UserInstallerEditComponent, { user }).subscribe(() => {
+ this.load(true);
this.msgSrv.info('���������������������������������');
});
}
--
Gitblit v1.8.0