From 27bd4a08bf807f4f6132bb524da33490b6d22f87 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Tue, 19 Jun 2018 11:45:11 +0800 Subject: [PATCH] 省市区兼容旧版本 --- src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts b/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts index faa04fe..826af7e 100644 --- a/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts +++ b/src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts @@ -77,6 +77,7 @@ } } areaLazyLoad(event: { option: CascaderOption, index: number, resolve: (children: CascaderOption[]) => void, reject: () => void }) { + // console.info(event); const index = event['index']; const option = event.option; switch (index) { @@ -93,7 +94,20 @@ } ); break; case 1: - this.areacodeService.getAreas(option.value).subscribe( + // ������������������ ��������������� + this.areacodeService.getAreas(option.value , false).subscribe( + (res: {label: string, value: string}[]) => { + event.resolve( res ); + } + ); break; + case 2: + this.areacodeService.getTowns(option.value).subscribe( + (res: {label: string, value: string}[]) => { + event.resolve( res ); + } + ); break; + case 3: + this.areacodeService.getVillages(option.value).subscribe( (res: {label: string, value: string}[]) => { event.resolve( res ); } @@ -104,6 +118,8 @@ this.data.provinceCode = codes[0]; this.data.cityCode = codes[1]; this.data.areaCode = codes[2]; + this.data.townCode = codes[3]; + this.data.villageCode = codes[4]; } OrgSelectChange(text) { const pageBean: PageBean = {pageIndex: 0, pageSize: 20}; -- Gitblit v1.8.0