From 27cd36be226ca2434f06b1ae9e4d43f1fea639ab Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Mon, 25 Jun 2018 16:40:28 +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