|
@@ -274,27 +274,49 @@ export default {
|
|
|
if(data.length === 0){
|
|
|
return
|
|
|
}
|
|
|
- var wendu = data.find(item => item.name === '温度实值-实时')
|
|
|
- var shidu = data.find(item => item.name === '湿度实值-实时')
|
|
|
+ var wendu = data.find(item => item.name === '温度实值-实时' || item.name === '当前温度值')
|
|
|
+ var shidu = data.find(item => item.name === '湿度实值-实时' || item.name === '当前湿度值')
|
|
|
var fushe = data.find(item => item.name === '辐射强度值-实时')
|
|
|
var time = data.find(item => item.name === '实时曲线-时间分布')
|
|
|
- var wenduZ = data.find(item => item.name === '当前温度值')
|
|
|
- var shiduZ = data.find(item => item.name === '当前湿度值')
|
|
|
- // console.log('1111',wendu,shidu,fushe,time,wenduZ,shiduZ)
|
|
|
- this.wenduData = wendu ? wendu.subList.map(res =>{
|
|
|
- return res.tagvalue
|
|
|
- }) : []
|
|
|
- this.shiduData = shidu ? shidu.subList.map(res =>{
|
|
|
- return res.tagvalue
|
|
|
- }) : []
|
|
|
- this.timeData = wendu ? wendu.subList.map(res =>{
|
|
|
- return res.transtime
|
|
|
- }) : []
|
|
|
- if(wenduZ || shiduZ){
|
|
|
- this.wenduData.push(wenduZ.subList[0].tagvalue)
|
|
|
- this.shiduData.push(shiduZ.subList[0].tagvalue)
|
|
|
- this.timeData.push(wenduZ.subList[0].transtime)
|
|
|
+ // var wenduZ = data.find(item => item.name === '当前温度值')
|
|
|
+ // var shiduZ = data.find(item => item.name === '当前湿度值')
|
|
|
+ console.log(7878,this.wenduData)
|
|
|
+
|
|
|
+ if(wendu.subList.length >0){
|
|
|
+ var newData = wendu.subList.map(res =>{
|
|
|
+ return res.tagvalue
|
|
|
+ })
|
|
|
+ this.wenduData.push(...newData)
|
|
|
+ }
|
|
|
+ if(shidu.subList.length >0){
|
|
|
+ var newData = shidu.subList.map(res =>{
|
|
|
+ return res.tagvalue
|
|
|
+ })
|
|
|
+ this.shiduData.push(...newData)
|
|
|
+ }
|
|
|
+ if(wendu.subList.length >0){
|
|
|
+ var newData = wendu.subList.map(res =>{
|
|
|
+ return res.transtime
|
|
|
+ })
|
|
|
+ this.timeData.push(...newData)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ // console.log('1111',wendu,shidu,fushe,time,wenduZ,shiduZ)
|
|
|
+ // this.wenduData = wendu.subList.length >0 ? wendu.subList.map(res =>{
|
|
|
+ // return res.tagvalue
|
|
|
+ // }) : this.wenduData
|
|
|
+ // this.shiduData = shidu.subList.length >0 ? shidu.subList.map(res =>{
|
|
|
+ // return res.tagvalue
|
|
|
+ // }) : this.shiduData
|
|
|
+ // this.timeData = wendu.subList.length >0 ? wendu.subList.map(res =>{
|
|
|
+ // return res.transtime
|
|
|
+ // }) : this.timeData
|
|
|
+ // if(wenduZ || shiduZ){
|
|
|
+ // this.wenduData.push(wenduZ.subList[0].tagvalue)
|
|
|
+ // this.shiduData.push(shiduZ.subList[0].tagvalue)
|
|
|
+ // this.timeData.push(wenduZ.subList[0].transtime)
|
|
|
+ // }
|
|
|
// console.log('2222',this.wenduData,this.shiduData,this.timeData)
|
|
|
// this.wenduData = wendu ? wendu.Values : []
|
|
|
// this.shiduData = shidu ? shidu.Values : []
|