沈斌
2017-12-18 bf1f9e0d8325f4ded6e7bc6f07dbe9be89a23a3b
updates
1 files added
3 files modified
85 ■■■■■ changed files
src/app/routes/users/installer/installer.component.html 2 ●●● patch | view | raw | blame | history
src/app/routes/users/installer/installer.component.ts 15 ●●●● patch | view | raw | blame | history
src/app/routes/users/users.module.ts 9 ●●●●● patch | view | raw | blame | history
src/assets/pois.json 59 ●●●●● patch | view | raw | blame | history
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>
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() {
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 { }
src/assets/pois.json
New file
@@ -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
        }
    ]
}