From 820cc14842e73c9980b87002eae127af626622fd Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Mon, 14 May 2018 15:59:45 +0800 Subject: [PATCH] 报表展示 增加行业筛选 --- src/app/routes/reports/alarm/alarm.component.ts | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/routes/reports/alarm/alarm.component.ts b/src/app/routes/reports/alarm/alarm.component.ts index 0a7a2b1..d337dd7 100644 --- a/src/app/routes/reports/alarm/alarm.component.ts +++ b/src/app/routes/reports/alarm/alarm.component.ts @@ -43,7 +43,7 @@ ]; public dimensionOptions = [ {value: 'sensor', label: '������'}, - {value: 'monitorPoint', label: '���������'} + {value: 'monitorPoint', label: '������������'} ]; isDisable = false; private treeClickStream: Subject<any> = new Subject<any>(); @@ -273,14 +273,16 @@ index = index + 1; } } else { - option.title.text = '������������������������'; option.series = []; - this.serie.data = res.data.list; - option.series.push(this.serie); - const myChart = echarts.init(document.getElementById('mydiv' + index)); - myChart.setOption(option, true); - window.onresize = myChart.resize; - index = index + 1; + if (!!res.data.list && res.data.list.length > 0) { + option.title.text = '������������������������'; + this.serie.data = res.data.list; + option.series.push(this.serie); + const myChart = echarts.init(document.getElementById('mydiv' + index)); + myChart.setOption(option, true); + window.onresize = myChart.resize; + index = index + 1; + } // this.setOption(option,index); } @@ -295,7 +297,7 @@ }); } else { - this.msgSrv.error('������������������������'); + this.msgSrv.error('���������������������������'); } } -- Gitblit v1.8.0