|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | configCoord(record: Device): void { | 
|---|
|  |  |  | //当前 坐标未设置 取监控点地址 | 
|---|
|  |  |  | if((!!record.latitude||!!record.longitude)&&!!record.monitorPointId){ | 
|---|
|  |  |  | // 复制数据放在此处,放在后面,adress会被覆盖 | 
|---|
|  |  |  | Object.assign(this.coorPickerService.data, record); | 
|---|
|  |  |  | this.coorPickerService.data['describe'] = '设备名称'; | 
|---|
|  |  |  | // 当前 坐标未设置 取监控点地址 | 
|---|
|  |  |  | if ((!record.latitude || !record.longitude) && !!record.monitorPointId) { | 
|---|
|  |  |  | this.monitorPointService.getEntity(record.monitorPointId).subscribe( | 
|---|
|  |  |  | res => { | 
|---|
|  |  |  | if (res != null && res.code === 1 && res.data != null) { | 
|---|
|  |  |  | const areaNames = res.data.areaNames; | 
|---|
|  |  |  | let adress = ''; | 
|---|
|  |  |  | if (areaNames != null) { | 
|---|
|  |  |  | adress += !!areaNames.provinceName?areaNames.provinceName:''; | 
|---|
|  |  |  | adress += !!areaNames.provinceName ? areaNames.provinceName : ''; | 
|---|
|  |  |  | adress += ' '; | 
|---|
|  |  |  | adress += !!areaNames.cityName?areaNames.cityName:''; | 
|---|
|  |  |  | adress += !!areaNames.cityName ? areaNames.cityName : ''; | 
|---|
|  |  |  | adress += ' '; | 
|---|
|  |  |  | adress += !!areaNames.areaName?areaNames.areaName:''; | 
|---|
|  |  |  | adress += !!areaNames.areaName ? areaNames.areaName : ''; | 
|---|
|  |  |  | adress += ' '; | 
|---|
|  |  |  | adress += !!res.data.address?res.data.address:''; | 
|---|
|  |  |  | adress += !!res.data.address ? res.data.address : ''; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.coorPickerService.data.address = adress; | 
|---|
|  |  |  | this.openMap(record); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | this.openMap(record); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private openMap(record: Device){ | 
|---|
|  |  |  | Object.assign(this.coorPickerService.data, record); | 
|---|
|  |  |  | const _data = this.coorPickerService.data; | 
|---|
|  |  |  | this.coorPickerService.data['describe'] = '设备名称'; | 
|---|
|  |  |  | private openMap(record: Device) { | 
|---|
|  |  |  | const _data = this.coorPickerService.data; | 
|---|
|  |  |  | this.modalHelper.static(CoordinatesPickerComponent).subscribe( | 
|---|
|  |  |  | (staticComp) => { | 
|---|
|  |  |  | const data: Device = { | 
|---|