From 565f5b26ee306966f0b4b9447b7a8f9b04a9fe00 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 15 Jun 2018 09:21:00 +0800
Subject: [PATCH] 改变暂存

---
 src/app/routes/devices/monitor-point/monitor-point.component.ts |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/app/routes/devices/monitor-point/monitor-point.component.ts b/src/app/routes/devices/monitor-point/monitor-point.component.ts
index 2b2d1c4..0fd59a7 100644
--- a/src/app/routes/devices/monitor-point/monitor-point.component.ts
+++ b/src/app/routes/devices/monitor-point/monitor-point.component.ts
@@ -52,12 +52,12 @@
         width: '300px'
       }
     };
-    this.grid.title = '���������';
+    this.grid.title = '������������';
     this.grid.setColumns(this.monitorPoint);
     this.grid.pageSize = 10;
   }
   constructor(
-    private coorPickerService:CoorPickerService,
+    private coorPickerService: CoorPickerService,
     private monitorPointService: MonitorPointService,
 
     private confirmServ: NzModalService,
@@ -179,21 +179,27 @@
   }
   configCoord(record: MonitorPoint): void {
     Object.assign(this.coorPickerService.data, record);
-    let _data = this.coorPickerService.data;
+    const _data = this.coorPickerService.data;
     const areaNames = record.areaNames;
-    let adress = null;
+    let adress = '';
     if (areaNames != null) {
-      adress = areaNames.provinceName + areaNames.cityName + areaNames.areaName + record.address;
+      adress += !!areaNames.provinceName ? areaNames.provinceName : '';
+      adress += ' ';
+      adress += !!areaNames.cityName ? areaNames.cityName : '';
+      adress += ' ';
+      adress += !!areaNames.areaName ? areaNames.areaName : '';
+      adress += ' ';
+      adress += !!record.address ? record.address : '';
     }
     this.coorPickerService.data.address = adress;
-    this.coorPickerService.data['describe'] = '���������������';
+    this.coorPickerService.data['describe'] = '������������������';
     this.modalHelper.static(CoordinatesPickerComponent).subscribe(
       (staticComp) => {
         const data: MonitorPoint = {
           id: record.id,
           longitude: _data.longitude,
           latitude: _data.latitude,
-        }
+        };
         this.monitorPointService.save(data).subscribe(
           (res: any) => {
             if (res.code === 1) {

--
Gitblit v1.8.0