解决冲突
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-07 17:57:23
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 18:24:57
|
||||
* @LastEditTime : 2022-04-07 18:30:46
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\curve\\curve.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -76,7 +76,7 @@ export class DatatableCustomindexCurveMinComponent implements OnInit,OnChanges {
|
||||
this.chart = new Chart({
|
||||
container: el,
|
||||
autoFit: true,
|
||||
height: 500,
|
||||
height: 200,
|
||||
});
|
||||
let value: any = []
|
||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 18:02:07
|
||||
* @LastEditTime : 2022-04-07 18:30:12
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -42,17 +42,8 @@
|
||||
</nz-col>
|
||||
</nz-row>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="本月交易趋势">
|
||||
<!-- <g2-timeline
|
||||
[data]="monthData2"
|
||||
#timeline
|
||||
[titleMap]="{ y1: '订单数', y2: '运单数' }"
|
||||
[height]="200"
|
||||
[delay]='200'
|
||||
mask="MM"
|
||||
[slider]="false"
|
||||
></g2-timeline> -->
|
||||
<app-financetable-curve-min #curve [chartData]='chartData2'></app-financetable-curve-min>
|
||||
<nz-card nzTitle="本月交易趋势" >
|
||||
<app-financetable-curve-min #curve [chartData]='chartData2'></app-financetable-curve-min>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="实时货源">
|
||||
<st
|
||||
|
||||
@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 10:57:56
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-07 18:02:02
|
||||
* @LastEditTime : 2022-04-07 18:28:03
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -106,16 +106,6 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
// initLineData() {
|
||||
// this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||
// this.monthData = res;
|
||||
// if (this.timeline) {
|
||||
// console.log(this.timeline);
|
||||
// // 等待组件渲染
|
||||
// setTimeout(() => this.timeline.changeData(), 100);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
public genData(): G2MiniAreaData[] {
|
||||
let value: any = [];
|
||||
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
|
||||
@ -131,13 +121,7 @@ export class DatatableDatascreenComponent implements OnInit {
|
||||
return value;
|
||||
}
|
||||
initPillarData(){
|
||||
|
||||
this.service.request(this.service.$api_getTradingTrend).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData2 = res
|
||||
this.curve.reRender()
|
||||
}
|
||||
})
|
||||
}
|
||||
public genData2(): G2TimelineData[] {
|
||||
let value1: any[] = [];
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-04-06 11:02:17
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-04-06 17:22:44
|
||||
* @LastEditTime : 2022-04-07 18:29:39
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\datatable.module.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -42,6 +42,7 @@ import { BusitableCurveComponent } from './components/busitable/busiindex/curve/
|
||||
import { DatatableCustomindexCurveComponent } from './components/customtable/customindex/curve/curve.component';
|
||||
import { DatatableCustomindexMapComponent } from './components/datascreen/map/map.component';
|
||||
import { DatatableCustomindexCurveMinComponent } from './components/datascreen/curve/curve.component';
|
||||
import { DatatableReportingvViewTrackComponent } from './reporting/components/view-track/view-track.component';
|
||||
|
||||
const COMPONENTS: Type<void>[] = [
|
||||
DatatableDataindexComponent,
|
||||
@ -76,7 +77,8 @@ const COMPONENTS: Type<void>[] = [
|
||||
BusitableCurveComponent,
|
||||
DatatableCustomindexCurveComponent,
|
||||
DatatableCustomindexMapComponent,
|
||||
DatatableCustomindexCurveMinComponent
|
||||
DatatableCustomindexCurveMinComponent,
|
||||
DatatableReportingvViewTrackComponent
|
||||
]
|
||||
|
||||
|
||||
|
||||
@ -66,10 +66,10 @@
|
||||
</ng-template>
|
||||
|
||||
<ng-template st-row="car" let-item let-index="index">
|
||||
<a (click)="viewTrack(item)">查看轨迹</a>
|
||||
<a (click)="viewTrack(item,'car')">查看轨迹</a>
|
||||
</ng-template>
|
||||
<ng-template st-row="driver" let-item let-index="index">
|
||||
<a (click)="viewTrack(item)">查看轨迹</a>
|
||||
<a (click)="viewTrack(item,'driver')">查看轨迹</a>
|
||||
</ng-template>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
@ -7,6 +7,7 @@ import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ReportingService } from '../../services/reporting.service';
|
||||
import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component';
|
||||
import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component';
|
||||
import { DatatableReportingvViewTrackComponent } from '../view-track/view-track.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-order-reporting',
|
||||
@ -284,9 +285,9 @@ export class DatatableOrderReportingComponent implements OnInit {
|
||||
title: '订单号',
|
||||
render: 'billCode',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
width: '180px',
|
||||
},
|
||||
{ title: '运单号', render: 'wayBillCode', className: 'text-center', width: '150px', },
|
||||
{ title: '运单号', render: 'wayBillCode', className: 'text-center', width: '180px', },
|
||||
|
||||
{
|
||||
title: '网络货运人',
|
||||
@ -529,9 +530,20 @@ export class DatatableOrderReportingComponent implements OnInit {
|
||||
/**
|
||||
* 查看轨迹
|
||||
*/
|
||||
viewTrack(_record: any) {
|
||||
// const =;
|
||||
this.router.navigate([])
|
||||
viewTrack(_record: any, trajectory: string) {
|
||||
const title = trajectory === 'car' ? '车辆' : '司机'
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: `查看${title}轨迹`,
|
||||
nzWidth: 1000,
|
||||
nzContent: DatatableReportingvViewTrackComponent,
|
||||
nzComponentParams: {
|
||||
id: _record?.orderId,
|
||||
trajectory
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(res => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
<div>
|
||||
<!-- <amap-path-simplifier [mapList]="mapList" [mapHeight]="'600px'" [pois]="pois"></amap-path-simplifier> -->
|
||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [mapList]="mapList" [pois]="pois">
|
||||
</amap-path-simplifier>
|
||||
</div>
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { DatatableReportingvViewTrackComponent } from './view-track.component';
|
||||
|
||||
describe('DatatableReportingvViewTrackComponent', () => {
|
||||
let component: DatatableReportingvViewTrackComponent;
|
||||
let fixture: ComponentFixture<DatatableReportingvViewTrackComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [DatatableReportingvViewTrackComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DatatableReportingvViewTrackComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,92 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import format from 'date-fns/format';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { OrderManagementService } from 'src/app/routes/order-management/services/order-management.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-view-track',
|
||||
templateUrl: './view-track.component.html',
|
||||
})
|
||||
export class DatatableReportingvViewTrackComponent implements OnInit {
|
||||
mapList: any[] = []; //地图点位数据组
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
trajectory = "car";
|
||||
pois: any[] = [];
|
||||
id = '';
|
||||
constructor(public service: OrderManagementService, private modalRef: NzModalRef, public router: Router) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.trajectory === 'car') {
|
||||
this.getTrajectory();
|
||||
} else if (this.trajectory === 'driver') {
|
||||
this.getDriverTrajectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
selectTab(e: any) {
|
||||
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
|
||||
// 车辆轨迹
|
||||
getTrajectory() {
|
||||
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.cityArray];
|
||||
if (this.addressItems && this.addressItems.length > 0) {
|
||||
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 = item.vinOutTime ? this.getLocalTime(item.gtm) : '';
|
||||
item.cityName = item.appAdress;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user