-
This commit is contained in:
@ -19,7 +19,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #AdvanceDepositFooter>
|
<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 || []"
|
<!-- <g2-mini-area line color="#cceafe" height="45" [data]="totalAdvanceDeposit?.list || []"
|
||||||
(clickItem)="handleClick($event)">
|
(clickItem)="handleClick($event)">
|
||||||
</g2-mini-area> -->
|
</g2-mini-area> -->
|
||||||
|
|||||||
@ -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 { ModalHelper, _HttpClient } from '@delon/theme';
|
||||||
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
import { G2MiniAreaClickItem, G2MiniAreaData } from '@delon/chart/mini-area';
|
||||||
import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie';
|
import { G2PieClickItem, G2PieComponent, G2PieData } from '@delon/chart/pie';
|
||||||
@ -18,7 +18,7 @@ import { GeometryLabelCfg } from '@antv/g2/lib/interface';
|
|||||||
styleUrls: ['./dataindex.component.less'],
|
styleUrls: ['./dataindex.component.less'],
|
||||||
providers: [CurrencyPipe]
|
providers: [CurrencyPipe]
|
||||||
})
|
})
|
||||||
export class DatatableDataindexComponent implements OnInit {
|
export class DatatableDataindexComponent implements OnInit, AfterViewInit {
|
||||||
@ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent;
|
@ViewChild('AdvanceDeposit', { static: false }) AdvanceDeposit!: G2CustomComponent;
|
||||||
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
|
@ViewChild('g2custom', { static: false }) g2custom!: G2CustomComponent;
|
||||||
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
|
@ViewChild('RegionalPerforman', { static: false }) RegionalPerforman!: G2CustomComponent;
|
||||||
@ -38,13 +38,16 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
|
|
||||||
regionalPerformanceCompletion: DataPerformanceTrendVO[] = [];
|
regionalPerformanceCompletion: DataPerformanceTrendVO[] = [];
|
||||||
|
|
||||||
constructor(private service: DataService, private currency: CurrencyPipe) {}
|
constructor(private service: DataService, private currency: CurrencyPipe) { }
|
||||||
|
ngAfterViewInit(): void {
|
||||||
ngOnInit(): void {
|
|
||||||
this.initMiniAreaData();
|
this.initMiniAreaData();
|
||||||
this.initOthersData();
|
this.initOthersData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private initMiniAreaData() {
|
private initMiniAreaData() {
|
||||||
// 客户预存款总额
|
// 客户预存款总额
|
||||||
this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
|
this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => {
|
||||||
@ -80,7 +83,7 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
const billTypeDatas2 = this.formatCoordinateData(res);
|
const billTypeDatas2 = this.formatCoordinateData(res);
|
||||||
console.log(billTypeDatas2);
|
console.log(billTypeDatas2);
|
||||||
|
|
||||||
this.initBillChart(this.g2custom['el'].nativeElement as any,billTypeDatas2);
|
this.initBillChart(this.g2custom['el'].nativeElement as any, billTypeDatas2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 大区业绩完成情况
|
// 大区业绩完成情况
|
||||||
@ -101,7 +104,6 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
if (res) {
|
if (res) {
|
||||||
const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType })));
|
const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType })));
|
||||||
console.log(billTypeDatas);
|
console.log(billTypeDatas);
|
||||||
|
|
||||||
this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas);
|
this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -145,7 +147,7 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
|
|
||||||
chart.scale('percent', {
|
chart.scale('percent', {
|
||||||
formatter: val => {
|
formatter: val => {
|
||||||
val = (val * 100 ).toFixed(0)+ '%';
|
val = (val * 100).toFixed(0) + '%';
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -202,7 +204,7 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
.label('percent', percent => {
|
.label('percent', percent => {
|
||||||
return {
|
return {
|
||||||
content: data => {
|
content: data => {
|
||||||
return (percent * 100).toFixed(0)+`%`;
|
return (percent * 100).toFixed(0) + `%`;
|
||||||
},
|
},
|
||||||
style: { fontSize: 14 }
|
style: { fontSize: 14 }
|
||||||
};
|
};
|
||||||
@ -351,6 +353,8 @@ export class DatatableDataindexComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
});
|
});
|
||||||
|
console.log(chart);
|
||||||
|
|
||||||
chart.render();
|
chart.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user