fix bug
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-23 13:39:58
|
* @Date : 2021-12-23 13:39:58
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-11 11:24:29
|
* @LastEditTime : 2022-03-11 17:57:24
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -93,11 +93,11 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
trajectory = 'car';
|
trajectory = 'car';
|
||||||
mapList:any[] = []; //地图点位数据组
|
mapList: any[] = []; //地图点位数据组
|
||||||
addressItems:any[] = []; //打点地址数据组
|
addressItems: any[] = []; //打点地址数据组
|
||||||
logColumns2: STColumn[] = [
|
logColumns2: STColumn[] = [
|
||||||
{ title: '时间', index: 'vinOutTime' },
|
{ title: '时间', index: 'vinOutTime' },
|
||||||
{ title: '地点', index: 'cityName' },
|
{ title: '地点', index: 'cityName' }
|
||||||
];
|
];
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@ -204,14 +204,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
listType: 'picture-card'
|
listType: 'picture-card'
|
||||||
} as SFUploadWidgetSchema
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
no4: {
|
|
||||||
type: 'string',
|
|
||||||
title: '',
|
|
||||||
ui: {
|
|
||||||
widget: 'text'
|
|
||||||
},
|
|
||||||
default: ''
|
|
||||||
},
|
|
||||||
no7: {
|
no7: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '',
|
title: '',
|
||||||
@ -405,7 +397,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 对装货凭证进行初始化
|
// 对装货凭证进行初始化
|
||||||
if (res?.loadingLadingBillFilePath) {
|
if(res?.loadingLadingBillFilePath || res?.loadingPeopleVehiclesGoodsFilePath || res?.unloadingLadingBillFilePath || res?.unloadingPeopleVehiclesGoodsFilePath) {
|
||||||
this.formData = {
|
this.formData = {
|
||||||
loadingLadingBillFilePath: [
|
loadingLadingBillFilePath: [
|
||||||
{
|
{
|
||||||
@ -425,7 +417,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
||||||
response: {
|
response: {
|
||||||
url: res?.loadingPeopleVehiclesGoodsFilePath
|
url: res?.loadingPeopleVehiclesGoodsFilePath,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -453,6 +445,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发车时间到车时间初始化
|
// 发车时间到车时间初始化
|
||||||
this.loadTime = res?.loadTime;
|
this.loadTime = res?.loadTime;
|
||||||
this.unloadTime = res?.unloadTime;
|
this.unloadTime = res?.unloadTime;
|
||||||
@ -683,7 +676,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
|||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 110,
|
spanLabelFixed: 110,
|
||||||
grid: { span: 12 }
|
grid: { span: 12 }
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
changeGoodsType(value: string, data: any) {
|
changeGoodsType(value: string, data: any) {
|
||||||
@ -921,60 +914,60 @@ export class OrderManagementVehicleDetailChangeComponent 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))]
|
||||||
});
|
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
});
|
||||||
this.addressItems = res?.cityArray;
|
this.mapList = list;
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
this.addressItems = res?.cityArray;
|
||||||
this.addressItems.forEach(item => {
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
this.addressItems.forEach(item => {
|
||||||
});
|
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取司机轨迹
|
|
||||||
getDriverTrajectory(){
|
|
||||||
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
|
||||||
if (res) {
|
|
||||||
const points = res?.tracks;
|
|
||||||
let list :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))]
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
this.mapList = list;
|
|
||||||
this.addressItems = [...res?.enclosureDataAppTrack];
|
|
||||||
if(this.addressItems && this.addressItems.length > 0){
|
|
||||||
this.addressItems.forEach(item => {
|
|
||||||
item.vinOutTime = this.getLocalTime(item.gtm);
|
|
||||||
item.cityName = item.appAdress;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
trajectoryChange(event:any){
|
|
||||||
if(event ==='car'){
|
|
||||||
this.getTrajectory()
|
|
||||||
}else if(event ==='driver'){
|
|
||||||
this.getDriverTrajectory();
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
getLocalTime(time: any) {
|
}
|
||||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
|
||||||
|
// 获取司机轨迹
|
||||||
|
getDriverTrajectory() {
|
||||||
|
this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
const points = res?.tracks;
|
||||||
|
let list: 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))]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.mapList = list;
|
||||||
|
this.addressItems = [...res?.enclosureDataAppTrack];
|
||||||
|
if (this.addressItems && this.addressItems.length > 0) {
|
||||||
|
this.addressItems.forEach(item => {
|
||||||
|
item.vinOutTime = this.getLocalTime(item.gtm);
|
||||||
|
item.cityName = item.appAdress;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
trajectoryChange(event: any) {
|
||||||
|
if (event === 'car') {
|
||||||
|
this.getTrajectory();
|
||||||
|
} else if (event === 'driver') {
|
||||||
|
this.getDriverTrajectory();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
getLocalTime(time: any) {
|
||||||
|
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user