From bf1f9e0d8325f4ded6e7bc6f07dbe9be89a23a3b Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Mon, 18 Dec 2017 21:22:56 +0800
Subject: [PATCH] updates
---
src/app/routes/users/installer/installer.component.html | 2
src/app/routes/users/users.module.ts | 9 +++-
src/app/routes/users/installer/installer.component.ts | 15 +++++--
src/assets/pois.json | 59 +++++++++++++++++++++++++++++
4 files changed, 77 insertions(+), 8 deletions(-)
diff --git a/src/app/routes/users/installer/installer.component.html b/src/app/routes/users/installer/installer.component.html
index b28c063..7210492 100644
--- a/src/app/routes/users/installer/installer.component.html
+++ b/src/app/routes/users/installer/installer.component.html
@@ -83,7 +83,7 @@
<td nz-td>{{i.nickname}}</td>
<td nz-td>{{i.updatedAt | _date}}</td>
<td nz-td>
- <a (click)="msg.success('���������' + i.name)">������</a>
+ <a (click)="edit(i)">������</a>
<span nz-table-divider></span>
<a (click)="msg.success('���������' + i.name)">������</a>
</td>
diff --git a/src/app/routes/users/installer/installer.component.ts b/src/app/routes/users/installer/installer.component.ts
index 51d9a85..0b6766e 100644
--- a/src/app/routes/users/installer/installer.component.ts
+++ b/src/app/routes/users/installer/installer.component.ts
@@ -4,6 +4,7 @@
import { _HttpClient } from '@delon/theme';
import { getInstaller, deleteInstaller } from '../../../../../_mock/installer.service';
import * as moment from 'moment';
+import { UserInstallerEditComponent } from './edit/edit.component';
@Component({
selector: 'app-installer',
@@ -25,13 +26,11 @@
curRows: any[] = [];
allChecked = false;
indeterminate = false;
-
sortMap: any = {};
- modalVisible = false;
constructor(
- public msg: NzMessageService,
public http: _HttpClient,
+ public msgSrv: NzMessageService,
private modalHelper: ModalHelper) {}
ngOnInit() {
@@ -62,8 +61,16 @@
});
}
+ edit(i) {
+ this.modalHelper.static(UserInstallerEditComponent, { i }).subscribe(() => {
+ this.load();
+ this.msgSrv.info('���������������������������������');
+ });
+ }
+
add() {
- this.modalVisible = true;
+ const i = {};
+ this.modalHelper.static(UserInstallerEditComponent, { i });
}
save() {
diff --git a/src/app/routes/users/users.module.ts b/src/app/routes/users/users.module.ts
index d82f4af..22ed02d 100644
--- a/src/app/routes/users/users.module.ts
+++ b/src/app/routes/users/users.module.ts
@@ -5,7 +5,7 @@
import { SharedModule } from '@shared/shared.module';
import { ReceiverComponent } from './receiver/receiver.component';
-import { EditComponent } from './installer/edit/edit.component';
+import { UserInstallerEditComponent } from './installer/edit/edit.component';
const routes: Routes = [
{
@@ -17,6 +17,8 @@
}
];
+const COMPONENTS_NOROUNT = [ UserInstallerEditComponent ];
+
@NgModule({
imports: [
CommonModule,
@@ -26,7 +28,8 @@
declarations: [
InstallerComponent,
ReceiverComponent,
- EditComponent
- ]
+ ...COMPONENTS_NOROUNT
+ ],
+ entryComponents: COMPONENTS_NOROUNT
})
export class UsersModule { }
diff --git a/src/assets/pois.json b/src/assets/pois.json
new file mode 100644
index 0000000..721280f
--- /dev/null
+++ b/src/assets/pois.json
@@ -0,0 +1,59 @@
+{
+ "total": 2,
+ "data": [{
+ "id": 10000,
+ "user_id": 1,
+ "name": "������������",
+ "branch_name": "������������",
+ "geo": 310105,
+ "country": "������",
+ "province": "������",
+ "city": "���������",
+ "district": "���������",
+ "address": "������������",
+ "tel": "15900000000",
+ "categories": "������,������,���������",
+ "lng": 121.41707989151003,
+ "lat": 31.218656214644792,
+ "recommend": "���������",
+ "special": "������������",
+ "introduction": "������������",
+ "open_time": "������������",
+ "avg_price": 260,
+ "reason": null,
+ "status": 1,
+ "status_str": "���������",
+ "status_wx": 1,
+ "modified": 1505826527288,
+ "created": 1505826527288
+ },
+ {
+ "id": 10001,
+ "user_id": 2,
+ "name": "������������2",
+ "branch_name": "������������2",
+ "geo": 310105,
+ "country": "������",
+ "province": "������",
+ "city": "���������",
+ "district": "���������",
+ "address": "������������",
+ "tel": "15900000000",
+ "categories": "������,������,���������",
+ "lng": 121.41707989151003,
+ "lat": 31.218656214644792,
+ "recommend": "���������",
+ "special": "������������",
+ "introduction": "������������",
+ "open_time": "������������",
+ "avg_price": 260,
+ "reason": null,
+ "status": 1,
+ "status_str": "���������",
+ "status_wx": 1,
+ "modified": 1505826527288,
+ "created": 1505826527288
+ }
+ ]
+
+}
--
Gitblit v1.8.0