This commit is contained in:
Taric Xin
2022-04-15 17:34:59 +08:00
parent aacf116e4b
commit df09ed518a
19 changed files with 688 additions and 707 deletions

View File

@ -317,26 +317,22 @@
</nz-card>
<nz-card>
<p class="detail_title" #distannce5><span>|</span> 轨迹信息</p>
<div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st [scroll]="{y: '500px'}" style="min-height: 600px;" #st [data]="addressItems" [columns]="logColumns2" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList"></amap-path-simplifier>
</div>
</div>
</nz-card>
<ng-template #extraTemplate>
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)">
<div nz-col [nzSpan]="24">
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList">
</amap-path-simplifier>
<st [scroll]="{ y: '350px' }" #st [data]="addressItems" [columns]="logColumns2" [ps]="0"
[page]="{ show: false, showSize: false }" size="small" class="map_st">
</st>
<nz-radio-group [(ngModel)]="trajectory" (ngModelChange)="trajectoryChange($event)" class="map_radio">
<label nz-radio-button nzValue="car">车辆轨迹</label>
<label nz-radio-button nzValue="driver">司机轨迹</label>
</nz-radio-group>
</ng-template>
</div>
</div>
</nz-card>
<nz-modal [(nzVisible)]="isVisible" nzWidth="1000px" [nzFooter]="nzModalFooter" [nzTitle]="modalTitle" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div *ngIf="!modalcontent">暂无附件信息</div>

View File

@ -34,7 +34,7 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
@Component({
selector: 'app-supply-management-vehicle-detail-change',
templateUrl: './vehicle-detail-change.component.html',
styleUrls: ['./vehicle-detail-change.component.less']
styleUrls: ['./vehicle-detail-change.component.less', '../../../commom/less/trajectory.less']
})
export class OrderManagementVehicleDetailChangeComponent implements OnInit {
validateForm1: FormGroup;
@ -317,8 +317,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
}
initData() {
this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => {
console.log(res);
console.log(JSON.stringify(res));
// console.log(res);
// console.log(JSON.stringify(res));
if (res) {
this.i = res;
// this.initSF();
@ -871,7 +871,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
handleOK() {
this.isVisible = false;
}
goDistance(elf: NzCardComponent) {
goDistance(elf: any) {
if (elf) {
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
// elf['elementRef'].nativeElement.className = 'target-fix'
@ -952,12 +952,16 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
});
});
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;
const addressItems = [...res.tracks];
if (addressItems) {
addressItems.forEach(item => {
// item.parkBte = item.gtm;
item.parkBte = this.getLocalTime(item.gtm);
item.parkAdr = item.appAdress;
});
this.addressItems = [...addressItems];
} else {
this.addressItems = [];
}
}
});