666
This commit is contained in:
@ -66,16 +66,22 @@ export class FinanceTableCurveComponent implements OnInit,OnChanges {
|
||||
this.chart.axis('number', {
|
||||
label: {
|
||||
formatter: (val: any) => {
|
||||
return val;
|
||||
return val*100+ ' %';
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
this.chart
|
||||
.line()
|
||||
.position('time*number')
|
||||
.color('name')
|
||||
|
||||
.tooltip('name*number', (name:any, value:any) => {
|
||||
return {
|
||||
name: name,
|
||||
value: value*100 + '%'
|
||||
};
|
||||
});
|
||||
|
||||
this.chart.render();
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01">
|
||||
<ng-template #extraTemplate01>
|
||||
<div class="chooseBox">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="changeCurve()">
|
||||
<nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
|
||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
|
||||
</nz-select>
|
||||
<div class="timeBox">
|
||||
@ -66,10 +66,10 @@
|
||||
</ng-template>
|
||||
<div nz-row [nzGutter]="64">
|
||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||
<app-operation-curve #curve [chartData]="chartData.lineChart"></app-operation-curve>
|
||||
<app-financetable-curve #curve [chartData]="chartData.lineChart"></app-financetable-curve>
|
||||
</div>
|
||||
<div nz-col class="gutter-row" [nzSpan]="12">
|
||||
<app-operation-pillar #pillar [chartData]="chartData.histogram"></app-operation-pillar>
|
||||
<app-financetable-pillar #pillar [chartData]="chartData.histogram"></app-financetable-pillar>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -6,6 +6,8 @@ import { DataService } from '../../services/data.service';
|
||||
import { differenceInCalendarDays } from 'date-fns';
|
||||
import { OperationCurveComponent } from '../operationtable/curve/curve.component';
|
||||
import { OperationPillarComponent } from '../operationtable/pillar/pillar.component';
|
||||
import { FinanceTableCurveComponent } from './curve/curve.component';
|
||||
import { FinancetablePillarComponent } from './pillar/pillar.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-datatable-financetable',
|
||||
@ -14,8 +16,8 @@ import { OperationPillarComponent } from '../operationtable/pillar/pillar.compon
|
||||
providers: [DatePipe]
|
||||
})
|
||||
export class DatatableFinancetableComponent implements OnInit {
|
||||
@ViewChild('curve') private readonly curve!: OperationCurveComponent;
|
||||
@ViewChild('pillar') private readonly pillar!: OperationPillarComponent;
|
||||
@ViewChild('curve') private readonly curve!: FinanceTableCurveComponent;
|
||||
@ViewChild('pillar') private readonly pillar!: FinancetablePillarComponent;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
type = 1;
|
||||
mode = 'year';
|
||||
@ -85,7 +87,7 @@ export class DatatableFinancetableComponent implements OnInit {
|
||||
enterpriseInfoId: this.enterpriseInfoId
|
||||
};
|
||||
this.flag = true
|
||||
this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => {
|
||||
this.service.request(this.service.$api_financialReportHistogram, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.chartData = res
|
||||
if(this.flag) {
|
||||
@ -148,6 +150,7 @@ export class DatatableFinancetableComponent implements OnInit {
|
||||
} else if(this.mode === 'month') {
|
||||
this.timeNext = [this.datePipe.transform(this.dateNext, 'yyyy-MM') + '-01 00:00:00']
|
||||
}
|
||||
this.initPillarData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user