| | |
| | | }
|
| | | ]
|
| | | };
|
| | | public type = 'warning';
|
| | | ngOnInit() {
|
| | | this.initWarning();
|
| | | }
|
| | |
| | | const PM2_5 = []; const PM10 = []; const CO = []; const NO2 = []; const O3 = []; const SO2 = [];
|
| | | const title = '空气质量因子';
|
| | | this.option.xAxis.data = [];
|
| | | this.http.get(environment.SERVER_BASH_URL + 'demo/list').subscribe((res: any) => {
|
| | | const params = {size: '7'};
|
| | | this.http.get(environment.SERVER_BASH_URL + 'demo/list', {params: params}).subscribe((res: any) => {
|
| | | res.forEach(data => {
|
| | | const json = JSON.parse(data.aqi_json);
|
| | | PM2_5.push(json.PM2_5);
|