Commit 2d01aa09 authored by wangqinghua's avatar wangqinghua

服务器

parent 50514109
...@@ -38,4 +38,5 @@ Module ng g module my-module ...@@ -38,4 +38,5 @@ Module ng g module my-module
版本更新: 版本更新:
v2.0.1 修复选择节点之后 流量查询不出来 v2.0.1 修复选择节点之后 流量查询不出来
\ No newline at end of file scp -r 22 build/www root@10.10.38.99:/home/nginx
...@@ -92,9 +92,16 @@ ...@@ -92,9 +92,16 @@
</nz-select> </nz-select>
</div> </div>
<div class="host-item-content"> <div class="host-item-content">
<nz-spin [nzSpinning]="isTrendLoading"> <ng-container *ngIf="noData">
<div echarts [options]="charTrendOption" style="height: 360px;width: 100%"></div> <div class="img-noData" style="min-height: 400px">
</nz-spin> <div class="noData" title="暂无数据"></div>
</div>
</ng-container>
<ng-container *ngIf="noData">
<nz-spin [nzSpinning]="isTrendLoading">
<div echarts [options]="charTrendOption" style="height: 360px;width: 100%"></div>
</nz-spin>
</ng-container>
</div> </div>
</nz-col> </nz-col>
<nz-col class="padding-10" nzSpan="12"> <nz-col class="padding-10" nzSpan="12">
......
...@@ -28,6 +28,7 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -28,6 +28,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
obj = { obj = {
leftGroupId: '', leftGroupId: '',
}; };
noData = false;
groupList; //分组数组 groupList; //分组数组
timeList = [ timeList = [
{'label': '最近一小时', value: '0'}, {'label': '最近一小时', value: '0'},
...@@ -199,11 +200,11 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -199,11 +200,11 @@ export class HomeComponent implements OnInit, AfterViewInit {
{ {
title: { title: {
text: '' + this.leftOneTotal + ' 台\n设备', text: '' + this.leftOneTotal + ' 台\n设备',
x: '41%', x: '36%',
y: '40%', y: '40%',
itemGap: 50, itemGap: 50,
textStyle: { textStyle: {
color: '#fff', color: '#8a8a8a',
fontSize: 18, fontSize: 18,
fontWeight: 'normal', fontWeight: 'normal',
}, },
...@@ -286,11 +287,11 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -286,11 +287,11 @@ export class HomeComponent implements OnInit, AfterViewInit {
{ {
title: { title: {
text: this.leftTwoTotal + '个\n监测点', text: this.leftTwoTotal + '个\n监测点',
x: '41%', x: '36%',
y: '40%', y: '40%',
itemGap: 50, itemGap: 50,
textStyle: { textStyle: {
color: '#fff', color: '#8a8a8a',
fontSize: 18, fontSize: 18,
fontWeight: 'normal', fontWeight: 'normal',
}, },
...@@ -431,12 +432,14 @@ export class HomeComponent implements OnInit, AfterViewInit { ...@@ -431,12 +432,14 @@ export class HomeComponent implements OnInit, AfterViewInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
if (res.data.length > 0) { if (res.data.length > 0) {
this.noData = false;
const response = res.data; const response = res.data;
this.setAlarmTrend(response); this.setAlarmTrend(response);
} else { } else {
this.message.warning('告警趋势暂无数据'); this.noData = true;
} }
} else { } else {
this.noData = true;
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
this.isTrendLoading = false; this.isTrendLoading = false;
......
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