解决冲突
This commit is contained in:
@ -106,7 +106,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
|||||||
type: 'map',
|
type: 'map',
|
||||||
callback: (obj: { trend: string; value: number }) => {
|
callback: (obj: { trend: string; value: number }) => {
|
||||||
|
|
||||||
obj.trend = obj.value > 100 ? '蓝色地区' : '红色地区';
|
obj.trend = obj.value > 100 ? '蓝色地区' : '灰色地区';
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -120,7 +120,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
|||||||
console.log(this.userView);
|
console.log(this.userView);
|
||||||
console.log('45545');
|
console.log('45545');
|
||||||
|
|
||||||
this.userView.polygon().position('longitude*latitude').color('trend', ['#000', '#76ddb2']).tooltip('').style({fillOpacity: 0.85 })
|
this.userView.polygon().position('longitude*latitude').color('trend', ['#c7daf3', '#1779f3']).tooltip('').style({fillOpacity: 0.85 })
|
||||||
// .animate({
|
// .animate({
|
||||||
// leave: {
|
// leave: {
|
||||||
// animation: 'fade-out'
|
// animation: 'fade-out'
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @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 16:37:05
|
* @LastEditTime : 2022-04-07 16:57:05
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -44,11 +44,11 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card nzTitle="本月交易趋势">
|
<nz-card nzTitle="本月交易趋势">
|
||||||
<g2-timeline repaint='true'
|
<g2-timeline repaint='true'
|
||||||
[data]="monthData"
|
[data]="monthData2"
|
||||||
#timeline
|
#timeline
|
||||||
[titleMap]="{ y1: '订单数', y2: '运单数' }"
|
[titleMap]="{ y1: '订单数', y2: '运单数' }"
|
||||||
[height]="200"
|
[height]="200"
|
||||||
[delay]='500'
|
[delay]='200'
|
||||||
mask="MM月DD日"
|
mask="MM月DD日"
|
||||||
[slider]="false"
|
[slider]="false"
|
||||||
></g2-timeline>
|
></g2-timeline>
|
||||||
|
|||||||
@ -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 16:31:17
|
* @LastEditTime : 2022-04-07 16:58:19
|
||||||
* @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.
|
||||||
*/
|
*/
|
||||||
@ -37,10 +37,10 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
headDeal: any;
|
headDeal: any;
|
||||||
classifyDeal: any;
|
classifyDeal: any;
|
||||||
todaysDeal: any;
|
todaysDeal: any;
|
||||||
todayTime: string ='';
|
todayTime: string = '';
|
||||||
|
|
||||||
monthData: G2TimelineData[] = [];
|
monthData: G2TimelineData[] = [];
|
||||||
salesData: any;
|
monthData2: Array<any> = this.genData2();
|
||||||
salesData2: Array<any> = this.genData();
|
salesData2: Array<any> = this.genData();
|
||||||
constructor(public service: DataService) {}
|
constructor(public service: DataService) {}
|
||||||
ngOnChanges(changes: any): void {
|
ngOnChanges(changes: any): void {
|
||||||
@ -58,16 +58,15 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
return { ...params };
|
return { ...params };
|
||||||
}
|
}
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.setTime()
|
this.setTime();
|
||||||
},1000)
|
}, 1000);
|
||||||
this.initST();
|
this.initST();
|
||||||
this.initOrderST();
|
this.initOrderST();
|
||||||
this.initData();
|
this.initData();
|
||||||
this.initLineData();
|
// this.initLineData();
|
||||||
}
|
}
|
||||||
setTime () {
|
setTime() {
|
||||||
var myDate = new Date();
|
var myDate = new Date();
|
||||||
var mytime = myDate.toLocaleTimeString(); //获取当前时间
|
var mytime = myDate.toLocaleTimeString(); //获取当前时间
|
||||||
myDate.getFullYear(); //获取完整的年份(4位,1970-????)
|
myDate.getFullYear(); //获取完整的年份(4位,1970-????)
|
||||||
@ -103,43 +102,16 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initLineData() {
|
// initLineData() {
|
||||||
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
// this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||||
this.monthData = res;
|
// this.monthData = res;
|
||||||
if (this.timeline) {
|
// if (this.timeline) {
|
||||||
console.log(this.timeline);
|
// console.log(this.timeline);
|
||||||
|
// // 等待组件渲染
|
||||||
// 等待组件渲染
|
// setTimeout(() => this.timeline.changeData(), 100);
|
||||||
setTimeout(() => this.timeline.changeData());
|
// }
|
||||||
}
|
// });
|
||||||
// for (let i = 0; i < 20; i += 1) {
|
// }
|
||||||
// this.monthData.push({
|
|
||||||
// time: new Date().getTime() + 1000 * 60 * 60 * 24 * i,
|
|
||||||
// y1: Math.floor(Math.random() * 100) + 1000,
|
|
||||||
// y2: Math.floor(Math.random() * 100) + 10,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
let value: any = [];
|
|
||||||
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
|
|
||||||
console.log(res);
|
|
||||||
res.forEach((element: any) => {
|
|
||||||
value.push({
|
|
||||||
x: element.city,
|
|
||||||
y: element.weight
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.salesData = value;
|
|
||||||
// if (this.pie) {
|
|
||||||
// // 等待组件渲染
|
|
||||||
// setTimeout(() => {
|
|
||||||
// console.log('a')
|
|
||||||
// this.pie.changeData()
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
console.log(this.salesData);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public genData(): G2MiniAreaData[] {
|
public genData(): G2MiniAreaData[] {
|
||||||
let value: any = [];
|
let value: any = [];
|
||||||
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
|
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
|
||||||
@ -154,6 +126,25 @@ export class DatatableDatascreenComponent implements OnInit {
|
|||||||
console.log(value);
|
console.log(value);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
private genData2(): G2TimelineData[] {
|
||||||
|
let ress: G2TimelineData[] = [];
|
||||||
|
this.service.request(this.service.$api_getTradingTrend).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
res.forEach((element: any) => {
|
||||||
|
ress.push({
|
||||||
|
time: element.time,
|
||||||
|
y1: element.billQuantity,
|
||||||
|
y2: element.wayBillQuantity
|
||||||
|
});
|
||||||
|
});
|
||||||
|
console.log(ress);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(!ress) {
|
||||||
|
setTimeout(() => {},100)
|
||||||
|
}
|
||||||
|
return ress;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化数据列表
|
* 初始化数据列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user