This commit is contained in:
Lingzi
2022-03-31 19:21:24 +08:00
parent d34c9f21a8
commit 0fc8b927a1
25 changed files with 319 additions and 357 deletions

View File

@ -13,21 +13,30 @@ export class OperationtablePieComponent implements OnInit {
@ViewChild('pie', { static: false }) pie!: G2PieComponent;
chartData: any = [];
el: any;
enterpriseInfoIdPie = ''
interManlist: any = []
constructor(private service: DataService, private ngZone: NgZone) {
}
ngOnInit(): void {
this.initData()
this.initManData()
}
initData(){
this.service.request(this.service.$api_operationalReportWaybillStatusDistribution).subscribe(res => {
this.service.request(this.service.$api_operationalReportWaybillStatusDistribution, {id: this.enterpriseInfoIdPie}).subscribe(res => {
if (res) {
this.chartData = res
this.ngZone.runOutsideAngular(() => this.init(this.el));
}
})
}
initManData() {
this.service.getNetworkFreightForwarder().subscribe(res => {
this.interManlist = res
this.enterpriseInfoIdPie = res[0].value
})
}
render(el: ElementRef<HTMLDivElement>): void {
this.el = el.nativeElement
}