| | |
| | | export class ReportComponent implements OnInit { |
| | | [x: string]: any; |
| | | |
| | | spinning: boolean = true; |
| | | constructor( |
| | | public injector: Injector, |
| | | public http: HttpClient, |
| | |
| | | sensorArr: any = []; |
| | | |
| | | ngOnInit() { |
| | | |
| | | this.activeRoute.queryParams.subscribe(params => { |
| | | const items = JSON.parse(params.items); |
| | | const query = params; |
| | |
| | | } 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 = []; |
| | | |
| | |
| | | $('#mydiv' + i).remove(); |
| | | } |
| | | }); |
| | | $('#content').attr({style:"display: inline;"}); |
| | | } |
| | | this.spinning = false; |
| | | }); |
| | | }); |
| | | } |