fengxiang
2018-06-19 27bd4a08bf807f4f6132bb524da33490b6d22f87
省市区兼容旧版本
1 files renamed
1 files deleted
1 files added
2 files modified
18 ■■■■■ changed files
src/app/business/services/http/areacode.service.ts 4 ●●●● patch | view | raw | blame | history
src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts 5 ●●●●● patch | view | raw | blame | history
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit.component.html 3 ●●●●● patch | view | raw | blame | history
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit.component.ts patch | view | raw | blame | history
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit/sensor-unit.component.html 6 ●●●●● patch | view | raw | blame | history
src/app/business/services/http/areacode.service.ts
@@ -34,13 +34,13 @@
       }
    );
   }
   getAreas(cityCode: string): Observable<{label: string, value: string}[]> {
   getAreas(cityCode: string, isLeaf ?: Boolean): Observable<{label: string, value: string}[]> {
    return this.http.get( this.baseUrl + '/area/get-areas', {cityCode: cityCode}).map(
       (res: {code: number, data: any}) => {
          let areas = [];
          if (res !== null && res['code'] === 1 ) {
            areas = res['data'].map((item) => {
                 return {label: item.areaName , value: item.areaCode};
                 return {label: item.areaName , value: item.areaCode, isLeaf: isLeaf === undefined ? true : isLeaf};
               });
          }
          return areas;
src/app/routes/devices/monitor-point/monitor-point-edit/monitor-point-edit.component.ts
@@ -77,7 +77,7 @@
     }
  }
  areaLazyLoad(event: { option: CascaderOption, index: number, resolve: (children: CascaderOption[]) => void, reject: () => void }) {
    console.info(event);
    // console.info(event);
    const index = event['index'];
    const option = event.option;  
    switch (index) {
@@ -94,7 +94,8 @@
         }
       ); break;
       case 1:
       this.areacodeService.getAreas(option.value).subscribe(
       // 区不是叶节点 兼容旧组件
       this.areacodeService.getAreas(option.value , false).subscribe(
         (res: {label: string, value: string}[]) => {
             event.resolve( res );
         }
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit.component.html
New file
@@ -0,0 +1,3 @@
<div class="modal-header">
    <div class="modal-title">配置-传感器单位</div>
</div>
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit.component.ts
src/app/routes/sensors/basic-info/sensor-unit/sensor-unit/sensor-unit.component.html
File was deleted