xufenglei
2018-06-12 8924ddb98072a5621d5cf01ed26e2cb424d71908
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) {
@@ -98,12 +99,26 @@
             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 );
         }
       ); break;
    }
  }
  setAreaCodes(codes: string[]) {
      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};