解决冲突
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-04-07 17:57:23
|
* @Date : 2022-04-07 17:57:23
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-04-07 18:30:46
|
* @LastEditTime : 2022-04-07 19:28:24
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\curve\\curve.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\curve\\curve.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -25,25 +25,24 @@ export class DatatableCustomindexCurveMinComponent implements OnInit,OnChanges {
|
|||||||
chart: any;
|
chart: any;
|
||||||
data = [
|
data = [
|
||||||
{ time: '01', type: '订单数', temperature: 7 },
|
{ time: '01', type: '订单数', temperature: 7 },
|
||||||
{ time: '02', city: '运单数', temperature: 3.9 },
|
{ time: '02', type: '运单数', temperature: 3.9 },
|
||||||
{ time: '03', city: '订单数', temperature: 6.9 },
|
{ time: '03', type: '订单数', temperature: 6.9 },
|
||||||
{ time: '04', city: '订单数', temperature: 4.2 },
|
{ time: '04', type: '订单数', temperature: 4.2 },
|
||||||
{ time: '05', city: '订单数', temperature: 9.5 },
|
{ time: '05', type: '订单数', temperature: 9.5 },
|
||||||
{ time: '06', city: '订单数', temperature: 5.7 },
|
{ time: '06', type: '订单数', temperature: 5.7 },
|
||||||
{ time: '06', city: '运单数', temperature: 5.7 },
|
{ time: '06', type: '运单数', temperature: 5.7 },
|
||||||
{ time: '07', city: '运单数', temperature: 14.5 },
|
{ time: '07', type: '运单数', temperature: 14.5 },
|
||||||
{ time: '08', city: '订单数', temperature: 8.5 },
|
{ time: '08', type: '订单数', temperature: 8.5 },
|
||||||
{ time: '09', city: '订单数', temperature: 18.4 },
|
{ time: '09', type: '订单数', temperature: 18.4 },
|
||||||
{ time: '10', city: '订单数', temperature: 11.9 },
|
{ time: '10', type: '订单数', temperature: 11.9 },
|
||||||
{ time: '11', city: '订单数', temperature: 21.5 },
|
{ time: '11', type: '订单数', temperature: 21.5 },
|
||||||
{ time: '12', city: '订单数', temperature: 15.2 },
|
{ time: '12', type: '订单数', temperature: 15.2 },
|
||||||
{ time: '08', city: '运单数', temperature: 8.5 },
|
{ time: '08', type: '运单数', temperature: 8.5 },
|
||||||
{ time: '09', city: '运单数', temperature: 18.4 },
|
{ time: '09', type: '运单数', temperature: 18.4 },
|
||||||
{ time: '10', city: '运单数', temperature: 11.9 },
|
{ time: '10', type: '运单数', temperature: 11.9 },
|
||||||
{ time: '11', city: '运单数', temperature: 21.5 },
|
{ time: '11', type: '运单数', temperature: 21.5 },
|
||||||
{ time: '12', city: '订单数', temperature: 15.2 },
|
{ time: '12', type: '订单数', temperature: 15.2 },
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private service: DataService, private ngZone: NgZone) {
|
constructor(private service: DataService, private ngZone: NgZone) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -84,7 +83,7 @@ export class DatatableCustomindexCurveMinComponent implements OnInit,OnChanges {
|
|||||||
res.forEach((element: any) => {
|
res.forEach((element: any) => {
|
||||||
value.push({
|
value.push({
|
||||||
time: element?.time,
|
time: element?.time,
|
||||||
type: element?.type,
|
type: element?.type == 'DD' ? '订单数' : '运单数',
|
||||||
temperature: element?.value,
|
temperature: element?.value,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -116,13 +115,13 @@ export class DatatableCustomindexCurveMinComponent implements OnInit,OnChanges {
|
|||||||
this.chart
|
this.chart
|
||||||
.line()
|
.line()
|
||||||
.position('time*temperature')
|
.position('time*temperature')
|
||||||
.color('city')
|
.color('type')
|
||||||
.shape('smooth');
|
.shape('smooth');
|
||||||
|
|
||||||
this.chart
|
this.chart
|
||||||
.point()
|
.point()
|
||||||
.position('time*temperature')
|
.position('time*temperature')
|
||||||
.color('city')
|
.color('type')
|
||||||
.shape('circle');
|
.shape('circle');
|
||||||
this.chart.render();
|
this.chart.render();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-04-06 10:57:56
|
* @Date : 2022-04-06 10:57:56
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-04-07 18:28:03
|
* @LastEditTime : 2022-04-07 19:24:15
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -67,7 +67,6 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
this.initST();
|
this.initST();
|
||||||
this.initOrderST();
|
this.initOrderST();
|
||||||
this.initData();
|
this.initData();
|
||||||
this.genData2();
|
|
||||||
// this.initLineData();
|
// this.initLineData();
|
||||||
}
|
}
|
||||||
setTime() {
|
setTime() {
|
||||||
@ -123,38 +122,6 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
initPillarData(){
|
initPillarData(){
|
||||||
this.curve.reRender()
|
this.curve.reRender()
|
||||||
}
|
}
|
||||||
public genData2(): G2TimelineData[] {
|
|
||||||
let value1: any[] = [];
|
|
||||||
this.monthData2 =[];
|
|
||||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
|
||||||
if (res) {
|
|
||||||
// var data1 = new Date('2022.1.1')
|
|
||||||
// var time1 = data1.getTime();
|
|
||||||
// console.log(time1);
|
|
||||||
|
|
||||||
var data2 = new Date('2022.2.1')
|
|
||||||
var time2 = data2.getTime();
|
|
||||||
console.log(time2);
|
|
||||||
|
|
||||||
var data3 = new Date('2022.3.1')
|
|
||||||
res.forEach((element: any,i:any) => {
|
|
||||||
console.log(element);
|
|
||||||
console.log(new Date().getTime() + 1000 * 60 * 60 * 24 * 2);
|
|
||||||
console.log(time2);
|
|
||||||
value1.push({
|
|
||||||
time:'Feb',
|
|
||||||
y1: element?.y1,
|
|
||||||
y2: element?.y2
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.monthData2 = res;
|
|
||||||
console.log(this.monthData2);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log(this.monthData2);
|
|
||||||
return value1;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
@ -170,9 +137,10 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
initOrderST() {
|
initOrderST() {
|
||||||
this.orderColumns = [
|
this.orderColumns = [
|
||||||
{ title: '运单号', index: 'wayCode', className: 'text-center', width: '120px' },
|
{ title: '运单号', index: 'wayCode', className: 'text-center', width: '120px' },
|
||||||
|
{ title: '司机/车辆', index: 'carNo', className: 'text-center', width: '120px' },
|
||||||
{ title: '货主', index: 'shipperName', className: 'text-center', width: '70px' },
|
{ title: '货主', index: 'shipperName', className: 'text-center', width: '70px' },
|
||||||
{ title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
|
{ title: '时间', index: 'createTime', className: 'text-center', width: '200px' },
|
||||||
{ title: '风险等级', index: 'warningType', className: 'text-center', width: '90px' }
|
{ title: '异常预警', index: 'warningTypeLabel', className: 'text-center', width: '90px' }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user