This commit is contained in:
潘晓云
2022-05-11 17:44:00 +08:00
parent ba22540580
commit c188d27792
2 changed files with 22 additions and 18 deletions

View File

@ -19,7 +19,7 @@
</p>
</ng-template>
<ng-template #AdvanceDepositFooter>
<g2-custom #AdvanceDeposit delay="100"></g2-custom>
<g2-custom #AdvanceDeposit></g2-custom>
<!-- <g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
(clickItem)="handleClick($event)">
</g2-mini-area> -->

View File

@ -1,4 +1,4 @@
import { ChangeDetectorRef, Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, NgZone, OnInit, ViewChild } from '@angular/core';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie';
@ -18,7 +18,7 @@ import { GeometryLabelCfg } from '@antv/g2/lib/interface';
styleUrls: ['./dataindex.component.less'],
providers: [CurrencyPipe]
})
export class DatatableDataindexComponent implements OnInit {
export class DatatableDataindexComponent implements OnInit, AfterViewInit {
@ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent;
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
@ -39,12 +39,15 @@ export class DatatableDataindexComponent implements OnInit {
regionalPerformanceCompletion: DataPerformanceTrendVO[] = [];
constructor(private service: DataService, private currency: CurrencyPipe) { }
ngOnInit(): void {
ngAfterViewInit(): void {
this.initMiniAreaData();
this.initOthersData();
}
ngOnInit(): void {
}
private initMiniAreaData() {
// 客户预存款总额
this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
@ -101,7 +104,6 @@ export class DatatableDataindexComponent implements OnInit {
if (res) {
const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType })));
console.log(billTypeDatas);
this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas);
}
});
@ -351,6 +353,8 @@ export class DatatableDataindexComponent implements OnInit {
}
return {};
});
console.log(chart);
chart.render();
}