Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -968,7 +968,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -991,7 +992,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
|
||||
@ -39,7 +39,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
isVisible = false;
|
||||
logColumns2: STColumn[] = [
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
{ title: '地点', index: 'cityName' }
|
||||
];
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseCodeLabel' },
|
||||
@ -70,8 +70,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
private service: OrderManagementService,
|
||||
private router: Router,
|
||||
private modal: NzModalService
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.route?.snapshot?.queryParams?.sts);
|
||||
@ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
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 = [
|
||||
{
|
||||
markerLabel: '起',
|
||||
markerLabel: '装',
|
||||
color: 'blue',
|
||||
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
||||
title: res.startingPoint.detailedAddress
|
||||
title: '发货地:' + res.startingPoint.detailedAddress,
|
||||
time: '计划出发时间:' + res.loadPlanTime
|
||||
},
|
||||
{
|
||||
markerLabel: '卸',
|
||||
color: 'red',
|
||||
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 => {
|
||||
if (res) {
|
||||
console.log('风险详情')
|
||||
console.log(res)
|
||||
this.abnormalList = res
|
||||
console.log('风险详情');
|
||||
console.log(res);
|
||||
this.abnormalList = res;
|
||||
}
|
||||
});
|
||||
this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log('异常预警')
|
||||
console.log(res)
|
||||
console.log('异常预警');
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -172,7 +173,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -195,7 +197,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -211,7 +214,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
}
|
||||
trajectoryChange(event: any) {
|
||||
if (event === 'car') {
|
||||
this.getTrajectory()
|
||||
this.getTrajectory();
|
||||
} else if (event === 'driver') {
|
||||
this.getDriverTrajectory();
|
||||
}
|
||||
|
||||
@ -923,7 +923,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -946,7 +947,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
|
||||
@ -77,16 +77,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
this.i = res;
|
||||
this.pois = [
|
||||
{
|
||||
markerLabel: '起',
|
||||
markerLabel: '装',
|
||||
color: 'blue',
|
||||
position: [res.startingPoint.longitude, res.startingPoint.latitude],
|
||||
title: res.startingPoint.detailedAddress
|
||||
title: '发货地:' + res.startingPoint.detailedAddress,
|
||||
time: '计划出发时间:' +res.loadPlanTime
|
||||
},
|
||||
{
|
||||
markerLabel: '卸',
|
||||
color: 'red',
|
||||
position: [res.endPoint.longitude, res.endPoint.latitude],
|
||||
title: res.endPoint.detailedAddress
|
||||
title: '卸货地地:' + res.endPoint.detailedAddress,
|
||||
time: '计划卸货时间:' + res.unloadPlanTime
|
||||
}
|
||||
];
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter(
|
||||
@ -188,7 +190,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -210,6 +213,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
getLocalTime(time: any) {
|
||||
if (!time) {
|
||||
return '';
|
||||
}
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -88,7 +89,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
|
||||
@ -51,7 +51,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
|
||||
beforeReq = (requestOptions: STRequestOptions) => {let a: string = '';
|
||||
switch (this.subjectType) {
|
||||
case '0':
|
||||
a = this.record?.networkTransporter;
|
||||
a = this.record?.networkTransporterId;
|
||||
break
|
||||
case '1':
|
||||
a = this.record?.shipperId;
|
||||
@ -60,7 +60,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit {
|
||||
a = this.record?.driverId;
|
||||
break
|
||||
case '3':
|
||||
a = this.record?.billId;
|
||||
a = this.record?.wayBillId;
|
||||
break
|
||||
}
|
||||
Object.assign(requestOptions.body, {
|
||||
|
||||
@ -167,7 +167,8 @@ sureArrive(item: any) {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -190,7 +191,8 @@ sureArrive(item: any) {
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
|
||||
@ -160,7 +160,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
@ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
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;
|
||||
|
||||
@ -48,15 +48,18 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
@Output()
|
||||
readonly clcikPointEvent = new EventEmitter<any>();
|
||||
|
||||
constructor(public service: BaseService, private amapService: AmapService) {}
|
||||
constructor(public service: BaseService, private amapService: AmapService) {
|
||||
this.mapInit();
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
// 路线图变更: 设置路线图, 指定路线图
|
||||
if (changes?.pathList?.currentValue && this?.pathSimplifierIns) {
|
||||
this.setData(changes.pathList?.currentValue);
|
||||
this.setPathIndex(this.selectedIndex);
|
||||
}
|
||||
|
||||
// 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点
|
||||
if (changes?.mapList?.currentValue && this?.pathSimplifierIns && changes.mapList?.currentValue.length > 0) {
|
||||
if (changes?.mapList?.currentValue) {
|
||||
// console.log(this.mapList);
|
||||
this.pathList = [
|
||||
{
|
||||
@ -64,22 +67,29 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
points: changes.mapList?.currentValue
|
||||
}
|
||||
];
|
||||
if (this?.pathSimplifierIns) {
|
||||
this.setData(this.pathList);
|
||||
if (changes.mapList?.currentValue.length > 0) {
|
||||
this.setPathIndex(this.selectedIndex);
|
||||
this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat);
|
||||
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
||||
this.getPoiByPositon(
|
||||
'终',
|
||||
'red',
|
||||
this.mapList[this.mapList?.length - 1]?.lnglat,
|
||||
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 标点列表变更: 更新标点数据, 绘画标点
|
||||
if (changes?.pois?.currentValue) {
|
||||
// console.log(this.pois);
|
||||
this._pois = changes?.pois?.currentValue;
|
||||
if (this?.markerList && this._pois.length > 0) {
|
||||
this.markerList.render(this._pois);
|
||||
}
|
||||
}
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.mapInit();
|
||||
}
|
||||
ngOnInit(): void {}
|
||||
ngOnDestroy(): void {
|
||||
// 销毁地图数据
|
||||
if (this.aMap) {
|
||||
@ -145,6 +155,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
|
||||
if (this.pathList.length > 0) {
|
||||
this.setPathIndex(this.selectedIndex);
|
||||
this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time));
|
||||
this.getPoiByPositon(
|
||||
'终',
|
||||
'red',
|
||||
this.mapList[this.mapList?.length - 1]?.lnglat,
|
||||
'时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time)
|
||||
);
|
||||
}
|
||||
|
||||
this.pathSimplifierIns.on('pointClick', (e: any, info: any) => {
|
||||
@ -159,6 +176,9 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
content: `
|
||||
<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].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/>
|
||||
`
|
||||
});
|
||||
@ -179,12 +199,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
//返回数据项对应的Marker
|
||||
getMarker: (dataItem: POI, context: any, recycledMarker: any) => {
|
||||
//存在可回收利用的marker
|
||||
if (recycledMarker) {
|
||||
//直接更新内容返回
|
||||
recycledMarker.setIconLabel(context.id);
|
||||
recycledMarker.setIconStyle(dataItem.color);
|
||||
return recycledMarker;
|
||||
}
|
||||
// if (recycledMarker) {
|
||||
// //直接更新内容返回
|
||||
// recycledMarker.setIconLabel(context.id);
|
||||
// recycledMarker.setIconStyle(dataItem.color);
|
||||
// return recycledMarker;
|
||||
// }
|
||||
|
||||
this.SimpleMarker = SimpleMarker;
|
||||
//返回一个新的Marker
|
||||
return new SimpleMarker({
|
||||
@ -212,6 +233,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
});
|
||||
|
||||
if (this._pois?.length > 0) {
|
||||
console.log(this._pois);
|
||||
|
||||
//展示该数据
|
||||
this.markerList.render(this._pois);
|
||||
}
|
||||
@ -241,7 +264,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
startNav() {
|
||||
this.navigator = this.pathSimplifierIns?.createPathNavigator(this.selectedIndex, {
|
||||
loop: true, //循环播放
|
||||
speed: 500000 * this.navSpeed //巡航速度,单位千米/小时
|
||||
speed: 50000 * this.navSpeed //巡航速度,单位千米/小时
|
||||
});
|
||||
this.navigator?.start();
|
||||
}
|
||||
@ -269,11 +292,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
}
|
||||
|
||||
/** 根据标点经纬度获取地址信息 */
|
||||
getPoiByPositon(position: string[]) {
|
||||
getPoiByPositon(label: string, color: string, position: string[], time: string) {
|
||||
this.geocoder.getAddress(position, (status: any, result: any) => {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
// result中对应详细地理坐标信息
|
||||
this._pois = [...this.pois, { markerLabel: '终', color: 'red', position: position, title: result.regeocode.formattedAddress }];
|
||||
this._pois = [...this._pois, { markerLabel: label, color: color, position, title: result.regeocode.formattedAddress, time }];
|
||||
if (this.markerList) {
|
||||
this.markerList.render(this._pois);
|
||||
}
|
||||
@ -287,7 +310,14 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy
|
||||
* @param infoItem
|
||||
*/
|
||||
selectedPOI(infoItem: InfoItem) {
|
||||
this.infoWindow.setContent(infoItem.content || `地址: <pre style="font-weight: bold;">${infoItem.title}</pre>`);
|
||||
this.infoWindow.setContent(
|
||||
infoItem.content ||
|
||||
`
|
||||
<label style="font-weight: bold;">${infoItem.title}</label><br/>
|
||||
东经:${infoItem.position?.[0]}, 北纬:${infoItem.position?.[1]}<br/>
|
||||
${infoItem.time}
|
||||
`
|
||||
);
|
||||
this.infoWindow.open(this.aMap, infoItem.position);
|
||||
this.infoWindow.setPosition(infoItem.position);
|
||||
// 地图定位居中
|
||||
|
||||
@ -114,6 +114,9 @@ export class AmapService {
|
||||
}
|
||||
|
||||
formatTime(time: string): string {
|
||||
if (!time) {
|
||||
return '';
|
||||
}
|
||||
return `${time.slice(0, 4)}-${time.slice(4, 6)}-${time.slice(6, 8)} ${time.slice(9, 11)}:${time.slice(11, 13)}:${time.slice(13, 15)}`;
|
||||
}
|
||||
}
|
||||
@ -128,6 +131,7 @@ export interface POI {
|
||||
export interface InfoItem {
|
||||
title?: string;
|
||||
content?: string;
|
||||
time?: string;
|
||||
position: string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user