From 6a6d3bbb3748c12c2dc94beec05d21d82d0faba1 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Tue, 13 Mar 2018 14:43:01 +0800
Subject: [PATCH] 数据报表
---
src/app/routes/report/report.component.ts | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/app/routes/report/report.component.ts b/src/app/routes/report/report.component.ts
index f898999..8b4f516 100644
--- a/src/app/routes/report/report.component.ts
+++ b/src/app/routes/report/report.component.ts
@@ -14,6 +14,7 @@
export class ReportComponent implements OnInit {
[x: string]: any;
+ spinning: boolean = true;
constructor(
public injector: Injector,
public http: HttpClient,
@@ -82,6 +83,7 @@
sensorArr: any = [];
ngOnInit() {
+
this.activeRoute.queryParams.subscribe(params => {
const items = JSON.parse(params.items);
const query = params;
@@ -91,15 +93,15 @@
} else {
const option = this.echartOption;
const datas = res.data.datas;
- const times = res.data.times
- const sensors = res.data.sensors
+ const times = res.data.times;
+ const sensors = res.data.sensors;
option.xAxis.data = times;
option.xAxis.name = query.xAxisName;
for (let index = 0; index < sensors.length; index++) {
- let sensorKey = sensors[index];
- let split = sensorKey.split('-');
+ const sensorKey = sensors[index];
+ const split = sensorKey.split('-');
option.title.text = split[1] + query.label + '������������';
- option.yAxis.name = split[2] && split[2] != 'null' ? split[2] : '';
+ option.yAxis.name = split[2] && split[2] !== 'null' ? split[2] : '';
option.series = [];
option.legend.data = [];
@@ -123,7 +125,9 @@
$('#mydiv' + i).remove();
}
});
+ $('#content').attr({style:"display: inline;"});
}
+ this.spinning = false;
});
});
}
--
Gitblit v1.8.0