fix bug
This commit is contained in:
@ -25,10 +25,9 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
dateNext: any = null;
|
||||
modeNext = 'year';
|
||||
timeNext: any = ['2022-01-01 00:00:00']
|
||||
dateFormat = 'yyyy-MM-dd';
|
||||
dateFormat = 'yyyy';
|
||||
today = new Date();
|
||||
chartData: any = {}
|
||||
flag = false;
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '运营主体', index: 'networkTransporterName', className: 'text-center' },
|
||||
@ -67,7 +66,7 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.initData()
|
||||
}
|
||||
initData(){
|
||||
initData(flag?: boolean){
|
||||
let type = 1
|
||||
if(this.mode === 'year') {
|
||||
type = 1
|
||||
@ -81,7 +80,7 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
this.service.request(this.service.$api_performanceReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
if(this.flag) {
|
||||
if(flag) {
|
||||
this.pillar.reRender()
|
||||
this.curve.reRender()
|
||||
}
|
||||
@ -126,10 +125,7 @@ export class DatatableBusiindexComponent implements OnInit {
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
|
||||
|
||||
this.flag = true
|
||||
this.initData()
|
||||
this.initData(true)
|
||||
}
|
||||
disabledDate = (current: Date): boolean =>
|
||||
// Can not select days before today and today
|
||||
|
||||
Reference in New Issue
Block a user