This commit is contained in:
wangshiming
2022-04-14 16:19:54 +08:00
parent c64ae3a93a
commit 67ca5f4cb3
3 changed files with 13 additions and 18 deletions

View File

@ -5,7 +5,7 @@ import { map } from 'rxjs/operators';
* @Author : Shiming
* @Date : 2022-04-06 10:57:56
* @LastEditors : Shiming
* @LastEditTime : 2022-04-14 14:05:01
* @LastEditTime : 2022-04-14 16:19:06
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -44,7 +44,7 @@ export class DatatableDatascreenComponent implements OnInit {
monthData: G2TimelineData[] = [];
monthData2:G2TimelineData[] =[];
salesData2: Array<any> = this.genData();
salesData2: Array<any> = [];
constructor(public service: DataService) {}
ngOnChanges(changes: any): void {
console.log(changes);
@ -81,6 +81,7 @@ export class DatatableDatascreenComponent implements OnInit {
this.service.request(this.service.$api_getAnnualTransactions).subscribe((res: any) => {
this.allDeal = res;
});
this.initPillarData()
this.service.request(this.service.$api_getTransactionAmount).subscribe((res: any) => {
this.headDeal = res;
});
@ -105,8 +106,12 @@ export class DatatableDatascreenComponent implements OnInit {
}
});
}
public genData(): G2MiniAreaData[] {
genData(): any{
let value: any = [];
console.log('9999999');
// let value: any = [{city: '深圳市', weight: 5070.4}
// ,{city: '济宁市', weight: 338}];
this.service.request(this.service.$api_getShipmentRanking).subscribe((res: any) => {
console.log(res);
res.forEach((element: any) => {
@ -115,12 +120,13 @@ export class DatatableDatascreenComponent implements OnInit {
y: element.weight
});
});
this.salesData2 = value
});
console.log(value);
return value;
}
initPillarData(){
this.curve.reRender()
// this.curve.reRender()
this.genData();
}
/**
* 初始化数据列表