# up humidity
This commit is contained in:
parent
a56751b0b6
commit
cc95c8d0ce
|
@ -143,10 +143,10 @@ export default {
|
|||
}
|
||||
},
|
||||
legend: {
|
||||
data: [title]
|
||||
data: title
|
||||
},
|
||||
series: [{
|
||||
name: title, itemStyle: {
|
||||
name: title[0], itemStyle: {
|
||||
normal: {
|
||||
color: '#FF005A',
|
||||
lineStyle: {
|
||||
|
@ -157,7 +157,23 @@ export default {
|
|||
},
|
||||
smooth: true,
|
||||
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,
|
||||
animationEasing: 'cubicInOut'
|
||||
}]
|
||||
|
|
|
@ -96,9 +96,12 @@ export default {
|
|||
},
|
||||
HumitureData: {
|
||||
total: {
|
||||
historyData: [],
|
||||
historyData: {
|
||||
temperature: [],
|
||||
humidity: []
|
||||
},
|
||||
xAxis: [],
|
||||
title: 'Humiture'
|
||||
title: ['temperature', 'humidity']
|
||||
}
|
||||
},
|
||||
listLoading: true,
|
||||
|
@ -142,7 +145,8 @@ export default {
|
|||
this.deviceTempLogs = response.data.results
|
||||
this.deviceTempLogs.forEach((item, index) => {
|
||||
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))
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue