diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue index 91566e7f..658580c6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue @@ -102,14 +102,14 @@ export default { let times = [], datas = []; qsData.rows.forEach(item => { if (lastPath == 'deviceHour') { - times.push(item.timeSlot); + times.push(item.date); } else if (lastPath == 'deviceDay') { times.push(new Date(item.date).format('dd')); } else if (lastPath == 'deviceYears') { times.push(new Date(item.month).format('MM')); } - datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility) + datas.push(this.btnType == 1 ? item.temperature : item.visibility) }) // console.log('datas',datas) @@ -121,8 +121,8 @@ export default { lineChartOption.xAxis.name = '月' } lineChartOption.xAxis.data = times; - lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米'; - lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)' + lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '千米'; + lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(千米)' lineChartOption.series[0].data = datas; const chartIns = echarts.init(this.$refs.LineChartRef);