edit
This commit is contained in:
@ -968,7 +968,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
@ -991,7 +992,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import format from 'date-fns/format';
|
|||||||
styleUrls: ['./bulk-detail.component.less']
|
styleUrls: ['./bulk-detail.component.less']
|
||||||
})
|
})
|
||||||
export class OrderManagementBulkeDetailComponent implements OnInit {
|
export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||||
MapList: any[]=[];
|
MapList: any[] = [];
|
||||||
id = this.route.snapshot.params.id;
|
id = this.route.snapshot.params.id;
|
||||||
billExpenses: any[] = []; //运费信息表格信息
|
billExpenses: any[] = []; //运费信息表格信息
|
||||||
pois: any[] = [];
|
pois: any[] = [];
|
||||||
@ -35,11 +35,11 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
totalObj: any;
|
totalObj: any;
|
||||||
attObj: any;
|
attObj: any;
|
||||||
modalcontent: any;
|
modalcontent: any;
|
||||||
modalTitle:string = '';
|
modalTitle: string = '';
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
logColumns2: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' }
|
||||||
];
|
];
|
||||||
logColumns: STColumn[] = [
|
logColumns: STColumn[] = [
|
||||||
{ title: '款项', index: 'expenseCodeLabel' },
|
{ title: '款项', index: 'expenseCodeLabel' },
|
||||||
@ -62,20 +62,19 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList:any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
addressItems:any[] = []; //打点地址数据组
|
addressItems: any[] = []; //打点地址数据组
|
||||||
constructor(
|
constructor(
|
||||||
public route: ActivatedRoute,
|
public route: ActivatedRoute,
|
||||||
private msgSrv: NzMessageService,
|
private msgSrv: NzMessageService,
|
||||||
private service: OrderManagementService,
|
private service: OrderManagementService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private modal: NzModalService
|
private modal: NzModalService
|
||||||
) {
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.route?.snapshot?.queryParams?.sts);
|
console.log(this.route?.snapshot?.queryParams?.sts);
|
||||||
|
|
||||||
this.initData();
|
this.initData();
|
||||||
this.getTrajectory();
|
this.getTrajectory();
|
||||||
}
|
}
|
||||||
@ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
if (res) {
|
if (res) {
|
||||||
this.i = res;
|
this.i = res;
|
||||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE');
|
||||||
this.pois = [
|
this.pois = [
|
||||||
{
|
{
|
||||||
markerLabel: '起',
|
markerLabel: '装',
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
||||||
title: res.startingPoint.detailedAddress
|
title: '发货地:' + res.startingPoint.detailedAddress,
|
||||||
|
time: '计划出发时间:' + res.loadPlanTime
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
markerLabel: '卸',
|
markerLabel: '卸',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
position: [res.endPoint.longitude, res.endPoint.latitude],
|
position: [res.endPoint.longitude, res.endPoint.latitude],
|
||||||
title: res.endPoint.detailedAddress
|
title: '卸货地地:' + res.endPoint.detailedAddress,
|
||||||
|
time: '计划卸货时间:' + res.unloadPlanTime
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('风险详情')
|
console.log('风险详情');
|
||||||
console.log(res)
|
console.log(res);
|
||||||
this.abnormalList = res
|
this.abnormalList = res;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('异常预警')
|
console.log('异常预警');
|
||||||
console.log(res)
|
console.log(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -125,12 +126,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
this.router.navigate(['order-management/bulk-detailChange', this.id]);
|
this.router.navigate(['order-management/bulk-detailChange', this.id]);
|
||||||
}
|
}
|
||||||
agreement(value: any) {
|
agreement(value: any) {
|
||||||
if(value ==='1'){
|
if (value === '1') {
|
||||||
this.modalTitle = '附件信息';
|
this.modalTitle = '附件信息';
|
||||||
// this.modalcontent = this.i?.contractContent?.contractContent;
|
// this.modalcontent = this.i?.contractContent?.contractContent;
|
||||||
// this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
|
// this.service.reviewPDF(this.i?.contractContent?.contractFilePath)
|
||||||
this.service.openURL(this.i?.contractContent?.contractFilePath);
|
this.service.openURL(this.i?.contractContent?.contractFilePath);
|
||||||
}else if(value === '2'){
|
} else if (value === '2') {
|
||||||
this.modalTitle = '补充协议';
|
this.modalTitle = '补充协议';
|
||||||
this.modalcontent = this.i?.supplementContent?.contractContent;
|
this.modalcontent = this.i?.supplementContent?.contractContent;
|
||||||
this.isVisible = true;
|
this.isVisible = true;
|
||||||
@ -164,20 +165,21 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取车辆轨迹
|
// 获取车辆轨迹
|
||||||
getTrajectory(){
|
getTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.trackArray;
|
const points = res.trackArray;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = res.cityArray;
|
this.addressItems = res.cityArray;
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
});
|
});
|
||||||
@ -186,21 +188,22 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取司机轨迹
|
// 获取司机轨迹
|
||||||
getDriverTrajectory(){
|
getDriverTrajectory() {
|
||||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
const points = res.tracks;
|
const points = res.tracks;
|
||||||
let list :any[] = [];
|
let list: any[] = [];
|
||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
this.addressItems = [...res.enclosureDataAppTrack];
|
this.addressItems = [...res.enclosureDataAppTrack];
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
this.addressItems.forEach(item => {
|
this.addressItems.forEach(item => {
|
||||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
item.cityName = item.appAdress;
|
item.cityName = item.appAdress;
|
||||||
@ -208,14 +211,14 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
trajectoryChange(event:any){
|
trajectoryChange(event: any) {
|
||||||
if(event ==='car'){
|
if (event === 'car') {
|
||||||
this.getTrajectory()
|
this.getTrajectory();
|
||||||
}else if(event ==='driver'){
|
} else if (event === 'driver') {
|
||||||
this.getDriverTrajectory();
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getLocalTime(time: any) {
|
getLocalTime(time: any) {
|
||||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -923,7 +923,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
@ -946,7 +947,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -190,7 +190,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -65,7 +65,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
@ -88,7 +89,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -167,7 +167,8 @@ sureArrive(item: any) {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
@ -190,7 +191,8 @@ sureArrive(item: any) {
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -160,7 +160,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
@ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
|
|||||||
points?.forEach((item: any) => {
|
points?.forEach((item: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
name: item.hgt,
|
name: item.hgt,
|
||||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))],
|
||||||
|
time: item.gtm
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
this.mapList = list;
|
||||||
|
|||||||
@ -71,9 +71,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
this.setData(this.pathList);
|
this.setData(this.pathList);
|
||||||
if (changes.mapList?.currentValue.length > 0) {
|
if (changes.mapList?.currentValue.length > 0) {
|
||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
||||||
this.getPoiByPositon(
|
this.getPoiByPositon(
|
||||||
'终',
|
'终',
|
||||||
|
'red',
|
||||||
this.mapList[this.mapList?.length - 1]?.lnglat,
|
this.mapList[this.mapList?.length - 1]?.lnglat,
|
||||||
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
||||||
);
|
);
|
||||||
@ -82,8 +83,6 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
}
|
}
|
||||||
// 标点列表变更: 更新标点数据, 绘画标点
|
// 标点列表变更: 更新标点数据, 绘画标点
|
||||||
if (changes?.pois?.currentValue) {
|
if (changes?.pois?.currentValue) {
|
||||||
console.log(changes?.pois?.currentValue);
|
|
||||||
|
|
||||||
this._pois = changes?.pois?.currentValue;
|
this._pois = changes?.pois?.currentValue;
|
||||||
if (this?.markerList && this._pois.length > 0) {
|
if (this?.markerList && this._pois.length > 0) {
|
||||||
this.markerList.render(this._pois);
|
this.markerList.render(this._pois);
|
||||||
@ -156,9 +155,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
|
|
||||||
if (this.pathList.length > 0) {
|
if (this.pathList.length > 0) {
|
||||||
this.setPathIndex(this.selectedIndex);
|
this.setPathIndex(this.selectedIndex);
|
||||||
this.getPoiByPositon('起', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
||||||
this.getPoiByPositon(
|
this.getPoiByPositon(
|
||||||
'终',
|
'终',
|
||||||
|
'red',
|
||||||
this.mapList[this.mapList?.length - 1]?.lnglat,
|
this.mapList[this.mapList?.length - 1]?.lnglat,
|
||||||
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
||||||
);
|
);
|
||||||
@ -176,6 +176,9 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
content: `
|
content: `
|
||||||
<label style="font-weight: bold;">${result.regeocode.formattedAddress}<label/><br/>
|
<label style="font-weight: bold;">${result.regeocode.formattedAddress}<label/><br/>
|
||||||
<label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}<label/><br/>
|
<label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}<label/><br/>
|
||||||
|
<label style="font-weight: 400;">东经: ${info.pathData.points[info.pointIndex].lnglat?.[0]}, 北纬:${
|
||||||
|
info.pathData.points[info.pointIndex].lnglat?.[1]
|
||||||
|
}<label/><br/>
|
||||||
<label style="font-weight: 400;">时间: ${this.amapService.formatTime(info.pathData.points[info.pointIndex].time)}<label/>
|
<label style="font-weight: 400;">时间: ${this.amapService.formatTime(info.pathData.points[info.pointIndex].time)}<label/>
|
||||||
`
|
`
|
||||||
});
|
});
|
||||||
@ -289,14 +292,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 根据标点经纬度获取地址信息 */
|
/** 根据标点经纬度获取地址信息 */
|
||||||
getPoiByPositon(label: string, position: string[], time: string) {
|
getPoiByPositon(label: string, color: string, position: string[], time: string) {
|
||||||
this.geocoder.getAddress(position, (status: any, result: any) => {
|
this.geocoder.getAddress(position, (status: any, result: any) => {
|
||||||
if (status === 'complete' && result.info === 'OK') {
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
// result中对应详细地理坐标信息
|
// result中对应详细地理坐标信息
|
||||||
this._pois = [
|
this._pois = [...this._pois, { markerLabel: label, color: color, position, title: result.regeocode.formattedAddress, time }];
|
||||||
...this.pois,
|
|
||||||
{ markerLabel: label, color: 'red', position, title: result.regeocode.formattedAddress, time }
|
|
||||||
];
|
|
||||||
if (this.markerList) {
|
if (this.markerList) {
|
||||||
this.markerList.render(this._pois);
|
this.markerList.render(this._pois);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user