| | |
| | | this.reloadChartTitle(); |
| | | // 清空数据 |
| | | this.grid.data = []; |
| | | console.log(lineChartCriteria); |
| | | this.http.post(environment.SERVER_BASH_URL + '/report/line-chart', lineChartCriteria).subscribe( |
| | | (res: ResultBean<{[key: string]: Array<Array<number>>}>) => { |
| | | if (res.code === 1) { |
| | |
| | | weight = !!value ? weight : weight + 1; |
| | | } |
| | | // 四舍五入,保留2位 |
| | | return !!value ? String(Math.round(value * 100) / 100) : '-'; |
| | | return value != null ? String(Math.round(value * 100) / 100) : '-'; |
| | | } |
| | | ); |
| | | this.grid.data.push({sensor: sensor, data: sensorData, weight: weight}); |