Commit face4507 authored by wangqinghua's avatar wangqinghua

update

parent 808838e6
......@@ -72,13 +72,28 @@
</div>
</div>
<nz-spin [nzSpinning]="isLoading">
<div style="height: 400px">
<ng-container *ngIf="echartType == 'now'">
<div echarts [options]="nowChartOption" (chartInit)="onEchartInit($event)"
style="height: 400px;width: 100%"></div>
<ng-container *ngIf="data.now">
<div class="img-noData">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngIf="!data.now">
<div echarts [options]="nowChartOption" (chartInit)="onEchartInit($event)" style="height: 400px;width: 100%"></div>
</ng-container>
</ng-container>
<ng-container *ngIf="echartType == 'history'">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
<ng-container *ngIf="data.history">
<div class="img-noData">
<div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngIf="!data.history">
<div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</ng-container>
</ng-container>
</div>
</nz-spin>
<div class="padding-15-0">
<ng-container *ngIf="echartType == 'history'">
......
......@@ -55,6 +55,11 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
time_;
data = {
now:false,
history:false
}
constructor(private topologySer: TopologyService, private overAllSer: OverAllService,
private message: NzMessageService, private datePipe: DatePipe) {
}
......@@ -232,7 +237,13 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
if (res.errCode == 10000) {
this.inNowEchartData=res.data.in;
this.outNowEchartData=res.data.out;
this.flashEcharts();
if(this.inNowEchartData.length == 0 && this.outNowEchartData.length == 0){
this.data.now = true;
this.message.warning("实时流量数据暂无");
}else{
this.data.now = false;
this.flashEcharts();
}
} else {
this.message.warning(res.errMsg);
}
......@@ -385,11 +396,17 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
});
this.setEacharts();
} else {
this.inEchartData = [];
this.outEchartData = [];
this.message.warning('出口流量图表暂无数据');
this.isLoading = false;
this.setEacharts();
}
if( this.inEchartData.length == 0 && this.outEchartData.length == 0){
this.data.history = true;
}else{
this.data.history = false;
}
}
);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment