Browse Source

太阳能板弹窗修改

wangqin
zhoule 6 months ago
parent
commit
25d2ef1343
  1. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue

8
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue

@ -102,14 +102,14 @@ export default {
let times = [], datas = []; let times = [], datas = [];
qsData.rows.forEach(item => { qsData.rows.forEach(item => {
if (lastPath == 'deviceHour') { if (lastPath == 'deviceHour') {
times.push(item.timeSlot); times.push(item.date);
} else if (lastPath == 'deviceDay') { } else if (lastPath == 'deviceDay') {
times.push(new Date(item.date).format('dd')); times.push(new Date(item.date).format('dd'));
} else if (lastPath == 'deviceYears') { } else if (lastPath == 'deviceYears') {
times.push(new Date(item.month).format('MM')); 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) // console.log('datas',datas)
@ -121,8 +121,8 @@ export default {
lineChartOption.xAxis.name = '月' lineChartOption.xAxis.name = '月'
} }
lineChartOption.xAxis.data = times; lineChartOption.xAxis.data = times;
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米'; lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)' lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.series[0].data = datas; lineChartOption.series[0].data = datas;
const chartIns = echarts.init(this.$refs.LineChartRef); const chartIns = echarts.init(this.$refs.LineChartRef);

Loading…
Cancel
Save