This commit is contained in:
wangshiming
2022-03-02 16:30:31 +08:00
parent 46f30b73d1
commit 01a406dcef
10 changed files with 130 additions and 120 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

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-22 13:53:29
* @LastEditors : Shiming
* @LastEditTime : 2022-03-02 16:10:44
* @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.
-->
@ -12,11 +12,11 @@
<nz-card nzTitle="轨迹信息" [nzExtra]="extraTemplate" >
<div style="display: flex; flex: 1;">
<div style=" flex: 1;">
<st #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
<st #st [scroll]="{y: '500px'}" [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</div>
<div style="flex: 1;" >
<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

@ -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) {