| | |
| | | export class ReportComponent implements OnInit { |
| | | [x: string]: any; |
| | | |
| | | public spinning: boolean = true; |
| | | public spinning = true; |
| | | |
| | | private echartOption = { |
| | | backgroundColor: '', |
| | |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: "{a} <br/>{b}: {c} ({d}%)" |
| | | formatter: '{a} <br/>{b}: {c} ({d}%)' |
| | | }, |
| | | legend: { |
| | | //x : 'center', |
| | | // x : 'center', |
| | | top: '10%', |
| | | data: ['PM 2.5', 'PM 10', '一氧化碳(CO)', '二氧化硫(SO₂)', '臭氧(O₃)', '二氧化氮(NO₂)'] |
| | | }, |
| | |
| | | center: ['25%', '50%'], |
| | | label: { |
| | | normal: { |
| | | formatter: "{b}:{d}%" |
| | | formatter: '{b}:{d}%' |
| | | } |
| | | }, |
| | | labelLine: { |
| | |
| | | center: ['75%', '50%'], |
| | | label: { |
| | | normal: { |
| | | formatter: "{b}:{d}%", |
| | | formatter: '{b}:{d}%', |
| | | } |
| | | }, |
| | | labelLine: { |
| | |
| | | }; |
| | | |
| | | ngOnInit() { |
| | | const params = JSON.parse(sessionStorage.getItem("queryParams")); |
| | | const params = JSON.parse(sessionStorage.getItem('queryParams')); |
| | | if (!!params) { |
| | | localStorage.removeItem("queryParams"); |
| | | localStorage.removeItem('queryParams'); |
| | | const items = this.items = JSON.parse(params.items); |
| | | const timeType = params.type; |
| | | this.http.get(environment.SERVER_BASH_URL + 'report/compare', {params: params}).subscribe((res: any) => { |
| | |
| | | this.title = items[i].formatTime; |
| | | items[i].deviceCount = deviceCounts[i]; |
| | | if (!items[i].monitorPointid) { |
| | | items[i].monitorPointName = items[i].areaName |
| | | items[i].monitorPointName = items[i].areaName; |
| | | } |
| | | const legendName = items[i].formatTime + label + (items[i].mac ? '设备:' + items[i].deviceName : (items[i].monitorPointid ? '监测点:' + items[i].monitorPointName : items[i].areaName)); |
| | | option.legend.data[i] = legendName; |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | this.msgSrv.error("页面错误,将关闭该页面!"); |
| | | setTimeout("window.close();", 1000); |
| | | this.msgSrv.error('页面错误,将关闭该页面!'); |
| | | setTimeout('window.close();', 1000); |
| | | } |
| | | } |
| | | } |