This commit is contained in:
wangshiming
2022-03-08 13:56:54 +08:00
parent 3db73b9509
commit 5fd558627f
2 changed files with 20 additions and 16 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming
* @LastEditTime : 2022-03-08 13:47:15
* @LastEditTime : 2022-03-08 13:55:14
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -517,32 +517,36 @@ loadTime: any; // 货源单设置回显
// 打开地图
// 打开地图
// 打开地图
openMap(type: string, index: number) {
openMap(type: string, index: number, address: string) {
console.log(type);
console.log(index);
const modalRef = this.modalService.create({
nzTitle: '',
nzComponentParams: { selectedAddress: address },
nzContent: AmapPoiPickerComponent,
nzWidth: 900,
nzOnOk: item => {
const poi = item.poi;
const locList = poi.location.toString().split(',');
const locList = poi.pois;
switch (type) {
case 'start':
this.startInfo[index].detailedAddress = poi.district + poi.name;
this.startInfo[index].detailedAddress = poi.formattedAddress;
this.startInfo[index].longitude = locList[0];
this.startInfo[index].latitude = locList[1];
this.startInfo[index].province = poi.cityInfo.province;
this.startInfo[index].city = poi.cityInfo.city;
this.startInfo[index].area = poi.cityInfo.district;
this.startInfo[index].address = poi.name;
this.startInfo[index].province = poi.addressComponent.province;
this.startInfo[index].city = poi.addressComponent.city;
this.startInfo[index].area = poi.addressComponent.district;
this.startInfo[index].address = poi.formattedAddress;
break;
case 'end':
this.endInfo[index].detailedAddress = poi.district + poi.name;
this.endInfo[index].detailedAddress = poi.formattedAddress;
this.endInfo[index].longitude = locList[0];
this.endInfo[index].latitude = locList[1];
this.endInfo[index].province = poi.cityInfo.province;
this.endInfo[index].city = poi.cityInfo.city;
this.endInfo[index].area = poi.cityInfo.district;
this.endInfo[index].address = poi.name;
this.endInfo[index].province = poi.addressComponent.province;
this.endInfo[index].city = poi.addressComponent.city;
this.endInfo[index].area = poi.addressComponent.district;
this.endInfo[index].address = poi.formattedAddress;
break;
default:
break;