src/app/routes/devices/basic-info/basic-info.component.ts
@@ -158,19 +158,35 @@ }); } configCoord(record: Device): void { Object.assign(this.coorPickerService.data, record); const _data = this.coorPickerService.data; //当前 坐标未设置 取监控点地址 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 = null; let adress = ''; if (areaNames != null) { adress = areaNames.provinceName + areaNames.cityName + areaNames.areaName + res.data.address; adress += !!areaNames.provinceName?areaNames.provinceName:''; adress += ' '; adress += !!areaNames.cityName?areaNames.cityName:''; adress += ' '; adress += !!areaNames.areaName?areaNames.areaName:''; adress += ' '; adress += !!res.data.address?res.data.address:''; } this.coorPickerService.data.address = adress; this.coorPickerService.data['describe'] = '设备名称'; this.openMap(record); } } ); }else{ this.openMap(record); } } private openMap(record: Device){ Object.assign(this.coorPickerService.data, record); const _data = this.coorPickerService.data; this.coorPickerService.data['describe'] = '设备名称'; this.modalHelper.static(CoordinatesPickerComponent).subscribe( (staticComp) => { const data: Device = { @@ -185,8 +201,6 @@ this.load(); this.msgSrv.success('坐标配置成功!'); } } ); } ); } src/app/routes/devices/monitor-point/monitor-point.component.ts
@@ -181,9 +181,15 @@ Object.assign(this.coorPickerService.data, record); 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'] = '监控站点名称'; src/app/routes/map/coordinates-picker/coordinates-picker.component.ts
@@ -91,11 +91,13 @@ this._localSearch = new this._BMap.LocalSearch(map, { renderOptions: {map: map} }); if (this.data.latitude === this.Default_LAT && this.data.longitude === this.Default_LNG && this.data.address != null) { debugger; if (this.data.latitude === this.Default_LAT && this.data.longitude === this.Default_LNG && !!this.data.address && !!this.data.address.trim()) { this._localSearch.search(this.data.address); } } queryTest: string; mapSearch(param: any) { src/app/routes/reports/query/query.component.html
@@ -41,7 +41,7 @@ </div> <div nz-col [nzSpan]="9" class="mb-md"> <div nz-form-item class="d-flex"> <div [ngStyle]="{'width': '120px'}" nz-form-label> <div [ngStyle]="{'width': '128px'}" nz-form-label> <label>时间类型</label> </div> <div nz-form-control class="flex-1"> @@ -88,7 +88,7 @@ </div> <div nz-col [nzSpan]="9" class="mb-md"> <div nz-form-item class="d-flex"> <div [ngStyle]="{'width': '120px'}" nz-form-label> <div [ngStyle]="{'width': '128px'}" nz-form-label> <label> <nz-dropdown> <button nz-button nz-dropdown ><span>{{dimensionItem.label}}</span> <i class="anticon anticon-down"></i></button> @@ -115,7 +115,7 @@ <label>设 备</label> </div> <div nz-form-control class="flex-1"> <nz-select name="device" style="width: 100%;" [(ngModel)]="device" nzAllowClear [nzPlaceHolder]="'先选择 监控站点(输入名称搜索)'" nzShowSearch <nz-select name="device" style="width: 100%;" [(ngModel)]="device" nzAllowClear [nzPlaceHolder]="'先选择 '+ dimensionItem.label +'(输入名称搜索设备)'" nzShowSearch (nzSearchChange)="devicesChange($event)" [nzNotFoundContent]="'无法找到'"> <nz-option *ngFor="let option of deviceOptions" [nzLabel]="option.name" [nzValue]="option"> </nz-option> src/app/routes/reports/query/query.component.ts