Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-03-02 16:42:27 +08:00
15 changed files with 209 additions and 188 deletions

View File

@ -202,11 +202,11 @@
<nz-card nzTitle="轨迹信息" style="width: 100%" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [MapList]="MapList"></amap-path-simplifier>
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
</div>
</div>
</nz-card>

View File

@ -125,17 +125,18 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
if (res) {
const points = res.trackArray;
let list :any[] = [];
points?.forEach((item: any) => {
this.MapList.push({
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.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.parkBte = this.getLocalTime(item.parkBte);
item.parkEte = this.getLocalTime(item.parkEte);
item.vinOutTime = this.getLocalTime(item.vinOutTime);
});
}
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-28 14:42:03
* @LastEditors : Shiming
* @LastEditTime : 2022-03-02 11:11:04
* @LastEditTime : 2022-03-02 16:28:37
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -195,11 +195,11 @@
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12">
<amap-path-simplifier [mapWidth]="'100%'" [MapList]="MapList"></amap-path-simplifier>
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
</div>
</div>
</nz-card>

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2021-12-28 14:42:03
* @LastEditors : Shiming
* @LastEditTime : 2022-03-02 11:11:05
* @LastEditTime : 2022-03-02 16:19:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -37,24 +37,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
approvalLsit: any;
isVisible = false;
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
{ title: '小计(元)', render: 'price' },
{ title: '运输费(元)', render: 'price' },
{ title: '附加费(元)', render: 'surcharge' },
{ title: '支付时间', index: 'paymentTime' },
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' }
}
}
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
];
trajectory = 'car';
addressItems: any[] = []; //打点地址数据组
@ -69,7 +53,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
ngOnInit(): void {
this.initData();
this.MapInit();
this.MapInit()
}
initData() {
@ -124,39 +108,23 @@ export class OrderManagementVehicleDetailComponent implements OnInit {
// elf['elementRef'].nativeElement.className = 'target-fix'
}
}
// MapInit() {
// this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => {
// if (res?.trackArray) {
// const points = res?.trackArray;
// const 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))]
// });
// });
// console.log(list);
// this.MapList = list;
// }
// });
// }
// 获取轨迹
MapInit() {
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
if (res) {
const points = res.trackArray;
let list :any[] = [];
points?.forEach((item: any) => {
this.MapList.push({
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.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.parkBte = this.getLocalTime(item.parkBte);
item.parkEte = this.getLocalTime(item.parkEte);
item.vinOutTime = this.getLocalTime(item.vinOutTime);
});
}
}

View File

@ -894,7 +894,7 @@ resourceStatus: any;
const modalRef = this.modal.create({
nzTitle: '查看轨迹',
nzContent: OneCarOrderViewtrackComponent,
nzWidth: 1200,
nzWidth: '800px',
nzComponentParams: {
i: item,
},

View File

@ -4,19 +4,19 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-02-28 16:47:04
* @LastEditTime : 2022-03-02 16:18:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<div nz-row>
<div>
<nz-card nzTitle="轨迹信息" [nzExtra]="extraTemplate" >
<div nz-row>
<div nz-col [nzSpan]="12">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
<div style="display: flex; flex: 1;">
<div style=" flex: 1;">
<st #st [scroll]="{y: '500px'}" [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div nz-col [nzSpan]="12" class="mapBox">
<amap-path-simplifier [mapWidth]="'400px'" [MapList]="MapList"></amap-path-simplifier>
<div style="flex: 1;" >
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
</div>
</div>
</nz-card>

View File

@ -1,10 +1,10 @@
:host {
::ng-deep {
.mapBox {
iframe, canvas {
width: 400px !important;
}
}
// .mapBox {
// iframe, canvas {
// width: 400px !important;
// }
// }
}

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-03-02 15:58:57
* @LastEditTime : 2022-03-02 16:02:51
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -37,24 +37,8 @@ export class OneCarOrderViewtrackComponent implements OnInit {
trajectory = 'car';
addressItems: any[] = []; //打点地址数据组
logColumns: STColumn[] = [
{ title: '款项', index: 'expenseCodeLabel' },
{ title: '小计(元)', render: 'price' },
{ title: '运输费(元)', render: 'price' },
{ title: '附加费(元)', render: 'surcharge' },
{ title: '支付时间', index: 'paymentTime' },
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' }
}
}
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
];
constructor(
private modalRef: NzModalRef,
@ -81,11 +65,11 @@ export class OneCarOrderViewtrackComponent implements OnInit {
});
});
this.MapList = list;
this.addressItems = res.parkArray;
if (this.addressItems && this.addressItems.length > 0) {
// this.addressItems = res.parkArray;
this.addressItems = res.cityArray;
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.parkBte = this.getLocalTime(item.parkBte);
item.parkEte = this.getLocalTime(item.parkEte);
item.vinOutTime = this.getLocalTime(item.vinOutTime);
});
}
}

View File

@ -13,29 +13,40 @@
<div nz-row>
<div nz-col nzSpan="14" class="text-grey-darker">网络货运人:{{ i?.enterpriseInfoName }}</div>
<div nz-col nzSpan="10">
<<<<<<< HEAD <button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-cancelSupply']">取消货源</button>
<button nz-button (click)="assignedCar(i)" *ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehicleAnew']">重新指派</button>
<button nz-button (click)="updateGoodsSource(i)" *ngIf="i?.resourceStatus === '1'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']">修改货源</button>
<button nz-button nzType="primary" nzGhost (click)="nextOrder(i)" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehiclePlaceOrder']">再下一单</button>
=======
<button nz-button (click)="cancleGoodsSource()" *ngIf="i?.resourceStatus === '1'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-cancelSupply']">取消货源</button>
<button nz-button (click)="assignedCar(i)" *ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehicleAnew']">重新指派</button>
<button nz-button (click)="updateGoodsSource(i)" *ngIf="i?.resourceStatus === '1'" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']">修改货源</button>
<button nz-button nzType="primary" nzGhost (click)="nextOrder(i)" acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehiclePlaceOrder']">再下一单</button>
>>>>>>> 82c3801cc6ea10d8f6b895d85fe5553850672cea
<button
nz-button
(click)="cancleGoodsSource()"
*ngIf="i?.resourceStatus === '1'"
acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-cancelSupply']"
>取消货源</button
>
<button
nz-button
(click)="assignedCar(i)"
*ngIf="i?.resourceStatus === '1' && i?.serviceType === '2'"
acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehicleAnew']"
>重新指派</button
>
<button
nz-button
(click)="updateGoodsSource(i)"
*ngIf="i?.resourceStatus === '1'"
acl
[acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']"
>修改货源</button
>
<button nz-button nzType="primary" nzGhost (click)="nextOrder(i)" acl [acl-ability]="['SUPPLY-VEHICLE-DETAIL-vehiclePlaceOrder']"
>再下一单</button
>
</div>
</div>
<div class="mt-sm mb-sm" nz-row>
<div>
<b>总费用:<span class="text-red-light text-md">{{ i?.totalAmount | currency: '¥' }}</span></b>
<b
>总费用:<span class="text-red-light text-md">{{ i?.totalAmount | currency: '¥' }}</span></b
>
</div>
</div>
<nz-divider></nz-divider>
@ -52,13 +63,27 @@
<div class="approval-status">
<div style="width: 60%; margin: 0 auto">
<nz-steps [nzLabelPlacement]="'vertical'">
<nz-step [nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'" nzIcon="solution"
[nzDescription]="i?.createAt" nzTitle="下单" [nzSubtitle]="i?.createTime"></nz-step>
<nz-step *ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'"
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'" nzIcon="file-done" [nzTitle]="'接单'"
[nzSubtitle]="i?.orderReceivingTime"></nz-step>
<nz-step nzStatus="finish" nzIcon="close-circle" nzTitle="取消货源" *ngIf="i?.resourceStatus === '3'"
[nzSubtitle]="i?.endTime"></nz-step>
<nz-step
[nzStatus]="i?.resourceStatus !== '1' ? 'finish' : 'process'"
nzIcon="solution"
[nzDescription]="i?.createAt"
nzTitle="下单"
[nzSubtitle]="i?.createTime"
></nz-step>
<nz-step
*ngIf="i?.resourceStatus === '1' || i?.resourceStatus === '2'"
[nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'"
nzIcon="file-done"
[nzTitle]="'接单'"
[nzSubtitle]="i?.orderReceivingTime"
></nz-step>
<nz-step
nzStatus="finish"
nzIcon="close-circle"
nzTitle="取消货源"
*ngIf="i?.resourceStatus === '3'"
[nzSubtitle]="i?.endTime"
></nz-step>
</nz-steps>
</div>
</div>
@ -87,8 +112,10 @@
</sv>
</sv-container>
<div class="mt-md">
<h4 class="text-md">装货卸货信息
<span class="ml-sm text-sm">(
<h4 class="text-md"
>装货卸货信息
<span class="ml-sm text-sm"
>(
<label>{{ i?.loadingCount }}装</label>
<label>{{ i?.unloadingCount }}卸</label>
)

View File

@ -148,12 +148,12 @@ export class NetworkFreightNewComponent implements OnInit {
});
}
submitForm() {
// if (!this.sf1.valid || !this.sf.valid) {
// this.sf.validator({ emitError: true });
// this.sf1.validator({ emitError: true });
// this.service.msgSrv.warning('请修改填写错误信息');
// return;
// }
if (!this.sf1.valid || !this.sf.valid) {
this.sf.validator({ emitError: true });
this.sf1.validator({ emitError: true });
this.service.msgSrv.warning('请修改填写错误信息');
return;
}
const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime);
const operatingStartTime = new Date(this.sf1.value.operatingStartTime);
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {

View File

@ -205,17 +205,23 @@
<nz-card>
<div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%;" #distannce5>
<div nz-row >
<div nz-col [nzSpan]='12'>
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st> -->
</div>
<div nz-col [nzSpan]='12'>
<amap-path-simplifier></amap-path-simplifier>
</div>
</div>
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [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">
<label nz-radio-button nzValue="car">车辆轨迹</label>
<label nz-radio-button nzValue="driver">司机轨迹</label>
</nz-radio-group>
</ng-template>
</div>
</nz-card>

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime : 2022-02-21 19:52:43
* @LastEditTime : 2022-03-02 16:24:32
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.ts
@ -13,6 +13,7 @@ import { _HttpClient } from '@delon/theme';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import format from 'date-fns/format';
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
import { WaybillManagementServe } from '../../services/waybill-management.service';
@ -28,27 +29,15 @@ export class WaybillManagementBulkeDetailComponent implements OnInit {
totalObj: any;
attObj: any;
isVisible = false;
logColumns: STColumn[] = [
{ title: '款项', index: 'costName' },
{ title: '运输费(元)', index: 'price',render: 'price' },
{ title: '支付时间', index: 'paymentTime' },
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' },
},
},
];
MapList: any[]=[];
imges: any;
unLoadingPlaceVOList: any = [];
logColumns: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
];
trajectory = 'car';
addressItems: any[] = []; //打点地址数据组
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
@ -61,7 +50,7 @@ export class WaybillManagementBulkeDetailComponent implements OnInit {
ngOnInit(): void {
this.initData()
this.MapInit()
}
initData() {
const params = {
@ -148,4 +137,30 @@ sureArrive(item: any) {
this.initData()
});
}
// 获取轨迹
MapInit() {
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
if (res) {
const points = res.trackArray;
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.parkArray;
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
});
}
}
});
}
getLocalTime(time: any) {
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
}
}

View File

@ -189,20 +189,25 @@
</sv>
</sv-container>
</nz-card>
<nz-card>
<div nz-row>
<nz-card nzTitle="轨迹信息" style="width: 100%;" #distannce5>
<div nz-row >
<div nz-col [nzSpan]='12'>
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st> -->
</div>
<div nz-col [nzSpan]='12'>
<amap-path-simplifier></amap-path-simplifier>
</div>
</div>
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
<div nz-row>
<div nz-col [nzSpan]="12">
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [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">
<label nz-radio-button nzValue="car">车辆轨迹</label>
<label nz-radio-button nzValue="driver">司机轨迹</label>
</nz-radio-group>
</ng-template>
</div>
</nz-card>

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 15:31:52
* @LastEditTime : 2022-02-21 19:46:47
* @LastEditTime : 2022-03-02 16:26:15
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.ts
@ -10,6 +10,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import format from 'date-fns/format';
import { NzCardComponent } from 'ng-zorro-antd/card';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -24,30 +25,19 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
export class WaybillManagementVehicleDetailComponent implements OnInit {
id = this.route.snapshot.params.id;
MapList: any[]=[];
i: any;
totalObj: any;
attObj: any;
isVisible = false;
logColumns: STColumn[] = [
{ title: '款项', index: 'costName' },
{ title: '运输费(元)', index: 'price', render: 'price' },
{ title: '支付时间', render: 'paymentTime' },
{
title: '支付状态',
className: 'text-center',
index: 'paymentStatus',
type: 'badge',
width: '120px',
badge: {
'1': { text: '待申请', color: 'warning' },
'2': { text: '已支付', color: 'success' },
'3': { text: '已拒绝', color: 'warning' },
'4': { text: '申请中', color: 'warning' },
},
},
];
imges: any;
unLoadingPlaceVOList: any = [];
logColumns: STColumn[] = [
{ title: '时间', index: 'vinOutTime' },
{ title: '地点', index: 'cityName' },
];
trajectory = 'car';
addressItems: any[] = []; //打点地址数据组
constructor(
private route: ActivatedRoute,
@ -60,7 +50,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit {
ngOnInit(): void {
this.initData()
this.MapInit()
}
initData() {
const params = {
@ -140,4 +130,30 @@ goDistance(elf: NzCardComponent) {
});
}
// 获取轨迹
MapInit() {
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
if (res) {
const points = res.trackArray;
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.parkArray;
if(this.addressItems && this.addressItems.length > 0){
this.addressItems.forEach(item => {
item.vinOutTime = this.getLocalTime(item.vinOutTime);
});
}
}
});
}
getLocalTime(time: any) {
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
}
}

View File

@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
/*
* @Author: your name
* @Date: 2021-12-07 14:52:29
* @LastEditTime : 2022-03-02 14:30:55
* @LastEditTime : 2022-03-02 16:22:23
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
@ -15,8 +15,6 @@ import { BaseService } from 'src/app/shared/services';
})
export class WaybillManagementServe extends BaseService {
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
$api_del_driver = ``;
// 据 手机号/姓名 查询 车队长/司机
$api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`;
// 查询整车运单-运营后台
@ -56,7 +54,8 @@ export class WaybillManagementServe extends BaseService {
$api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage';
// 查询运营端已回复异常上报
$api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage';
// 获取轨迹
$api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`;
// 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
constructor(public injector: Injector) {