fix bug
This commit is contained in:
@ -33,9 +33,9 @@ export class OperationCurveComponent implements OnInit, OnChanges {
|
||||
}
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.el = el.nativeElement
|
||||
setTimeout(() => {
|
||||
if(!this.service.http.loading){
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
private init(el: HTMLElement): void {
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
|
||||
<ng-template #extraTemplate01>
|
||||
<div class="chooseBox">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData(true)">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
|
||||
</nz-select>
|
||||
<div class="timeBox">
|
||||
|
||||
@ -31,19 +31,19 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
|
||||
interManlist: any = []
|
||||
chartData: any = {}
|
||||
flag = false;
|
||||
flag: boolean = false;
|
||||
columns: STColumn[] = [
|
||||
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
|
||||
{ title: '订单数', index: 'zsl', className: 'text-center' },
|
||||
{ title: '应收金额', index: 'yingsje', className: 'text-center' },
|
||||
{ title: '应收金额', index: 'yingsje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yingsje }) } },
|
||||
{ title: '承运数', index: 'cys', className: 'text-center' },
|
||||
{ title: '应付运费', index: 'yingfyf', className: 'text-center' },
|
||||
{ title: '应付运费', index: 'yingfyf', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yingfyf }) } },
|
||||
{ title: '运量(吨)', index: 'yl', className: 'text-center' },
|
||||
{ title: '待接单数', index: 'djd', className: 'text-center' },
|
||||
{ title: '在途数', index: 'ysz', className: 'text-center' },
|
||||
{ title: '运输完成', index: 'yswc', className: 'text-center' },
|
||||
{ title: '已收金额', index: 'yisje', className: 'text-center' },
|
||||
{ title: '已付运费', index: 'yifyf', className: 'text-center' }
|
||||
{ title: '已收金额', index: 'yisje', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yisje }) } },
|
||||
{ title: '已付运费', index: 'yifyf', className: 'text-center', type: 'widget', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yifyf }) } },
|
||||
];
|
||||
/**
|
||||
* 查询参数
|
||||
@ -72,7 +72,7 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
this.initData()
|
||||
this.initPillarData()
|
||||
}
|
||||
initPillarData(){
|
||||
initPillarData(flag?: boolean){
|
||||
let type = 1
|
||||
if(this.mode === 'year') {
|
||||
type = 1
|
||||
@ -84,7 +84,7 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
type,
|
||||
enterpriseInfoId: this.enterpriseInfoId
|
||||
};
|
||||
this.flag = true
|
||||
this.flag = flag ? flag : false
|
||||
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
@ -144,6 +144,9 @@ export class DatatableOperationtableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
onChangeNext(result: any) {
|
||||
if(result === null) {
|
||||
return
|
||||
}
|
||||
if(this.mode === 'year') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy') + '-01-01 00:00:00']
|
||||
} else if(this.mode === 'month') {
|
||||
|
||||
@ -28,15 +28,14 @@ export class OperationPillarComponent implements OnInit, OnChanges {
|
||||
reRender() {
|
||||
setTimeout(() => {
|
||||
this.chart.data(this.chartData);
|
||||
console.log(this.chartData)
|
||||
this.chart.render();
|
||||
}, 1000)
|
||||
}
|
||||
render(el: ElementRef<HTMLDivElement>): void {
|
||||
this.el = el.nativeElement
|
||||
setTimeout(() => {
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
},1000)
|
||||
if(!this.service.http.loading){
|
||||
this.ngZone.runOutsideAngular(() => this.init(this.el));
|
||||
}
|
||||
}
|
||||
|
||||
private init(el: HTMLElement): void {
|
||||
|
||||
Reference in New Issue
Block a user