# up humidity
This commit is contained in:
parent
a56751b0b6
commit
cc95c8d0ce
|
@ -143,10 +143,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: [title]
|
data: title
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: title, itemStyle: {
|
name: title[0], itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: '#FF005A',
|
color: '#FF005A',
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
|
@ -157,7 +157,23 @@ export default {
|
||||||
},
|
},
|
||||||
smooth: true,
|
smooth: true,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: historyData,
|
data: historyData.temperature,
|
||||||
|
animationDuration: 2800,
|
||||||
|
animationEasing: 'cubicInOut'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: title[1], itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#3888fa',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#3888fa',
|
||||||
|
width: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
smooth: true,
|
||||||
|
type: 'line',
|
||||||
|
data: historyData.humidity,
|
||||||
animationDuration: 2800,
|
animationDuration: 2800,
|
||||||
animationEasing: 'cubicInOut'
|
animationEasing: 'cubicInOut'
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -96,9 +96,12 @@ export default {
|
||||||
},
|
},
|
||||||
HumitureData: {
|
HumitureData: {
|
||||||
total: {
|
total: {
|
||||||
historyData: [],
|
historyData: {
|
||||||
|
temperature: [],
|
||||||
|
humidity: []
|
||||||
|
},
|
||||||
xAxis: [],
|
xAxis: [],
|
||||||
title: 'Humiture'
|
title: ['temperature', 'humidity']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
|
@ -142,7 +145,8 @@ export default {
|
||||||
this.deviceTempLogs = response.data.results
|
this.deviceTempLogs = response.data.results
|
||||||
this.deviceTempLogs.forEach((item, index) => {
|
this.deviceTempLogs.forEach((item, index) => {
|
||||||
if (index % 2 === 0) {
|
if (index % 2 === 0) {
|
||||||
this.HumitureData.total.historyData.push(item.temperature)
|
this.HumitureData.total.historyData.temperature.push(item.temperature)
|
||||||
|
this.HumitureData.total.historyData.humidity.push(item.humidity)
|
||||||
dateList.push(item.last_time.substr(11, 5))
|
dateList.push(item.last_time.substr(11, 5))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue