fix bug
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user