|
@@ -9,27 +9,42 @@
|
|
|
</p>
|
|
|
<div class='count-data'>
|
|
|
<div class='outdoor'>
|
|
|
- <div class='outdoor-left' :style='{"height":maxArr[0]==undefined?0+ "px":((current.tempOutdoor)/maxArr[0])*160 + "px"}'>
|
|
|
- <span>{{maxArr[0]==undefined?0:current.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
+ <div
|
|
|
+ class='outdoor-left'
|
|
|
+ :style='{"height":maxArr[0]=="--"?0+ "px":((current.tempOutdoor!="--"?current.tempOutdoor:0)/maxArr[0])*160 + "px"}'
|
|
|
+ >
|
|
|
+ <span>{{current.tempOutdoor=="--"?"--":current.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
</div>
|
|
|
- <div class='outdoor-right' :style='{"height":maxArr[0]==undefined?0+ "px":((similarDay.tempOutdoor)/maxArr[0])*160 + "px"}'>
|
|
|
- <span>{{maxArr[0]==undefined?0:similarDay.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
+ <div
|
|
|
+ class='outdoor-right'
|
|
|
+ :style='{"height":maxArr[0]=="--"?0+ "px":((similarDay.tempOutdoor!="--"?similarDay.tempOutdoor:0)/maxArr[0])*160 + "px"}'
|
|
|
+ >
|
|
|
+ <span>{{similarDay.tempOutdoor=="--"?"--":similarDay.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class='indoor'>
|
|
|
- <div class='indoor-left' :style='{"height":maxArr[1]==undefined?0+ "px": ((current.tempIndoor)/maxArr[1])*160 + "px"}'>
|
|
|
- <span>{{maxArr[1]==undefined?0:current.tempIndoor.toFixed(1)}}℃</span>
|
|
|
+ <div
|
|
|
+ class='indoor-left'
|
|
|
+ :style='{"height":maxArr[1]=="--"?0+ "px": ((current.tempIndoor!="--"?current.tempIndoor:0)/maxArr[1])*160 + "px"}'
|
|
|
+ >
|
|
|
+ <span>{{current.tempIndoor=="--"?"--":current.tempIndoor.toFixed(1)}}℃</span>
|
|
|
</div>
|
|
|
- <div class='indoor-right' :style='{"height":maxArr[1]==undefined?0+ "px": ((similarDay.tempIndoor)/maxArr[1])*160 + "px"}'>
|
|
|
- <span>{{maxArr[1]==undefined?0:similarDay.tempIndoor.toFixed(1)}}℃</span>
|
|
|
+ <div
|
|
|
+ class='indoor-right'
|
|
|
+ :style='{"height":maxArr[1]=="--"?0+ "px": ((similarDay.tempIndoor!="--"?similarDay.tempIndoor:0)/maxArr[1])*160 + "px"}'
|
|
|
+ >
|
|
|
+ <span>{{similarDay.tempIndoor=="--"?"--":similarDay.tempIndoor.toFixed(1)}}℃</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class='coldWar'>
|
|
|
- <div class='coldWar-left' :style='{"height":maxArr[2]==undefined?0+ "px": ((current.energy)/maxArr[2])*160 + "px"}'>
|
|
|
- <span>{{maxArr[2]==undefined?0:current.energy.toFixed(0)}}kWh</span>
|
|
|
+ <div class='coldWar-left' :style='{"height":maxArr[2]=="--"?0+ "px": ((current.energy!="--"?current.energy:0)/maxArr[2])*160 + "px"}'>
|
|
|
+ <span>{{current.energy=="--"?"--":current.energy.toFixed(0)}}kWh</span>
|
|
|
</div>
|
|
|
- <div class='coldWar-right' :style='{"height": maxArr[2]==undefined?0+ "px":((similarDay.energy)/maxArr[2])*160 + "px"}'>
|
|
|
- <span>{{maxArr[2]==undefined?0:similarDay.energy.toFixed(0)}}kWh</span>
|
|
|
+ <div
|
|
|
+ class='coldWar-right'
|
|
|
+ :style='{"height": maxArr[2]=="--"?0+ "px":((similarDay.energy!="--"?similarDay.energy:0)/maxArr[2])*160 + "px"}'
|
|
|
+ >
|
|
|
+ <span>{{similarDay.energy=="--"?"--":similarDay.energy.toFixed(0)}}kWh</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -53,15 +68,18 @@ export default {
|
|
|
init() {
|
|
|
if (this.current) {
|
|
|
if (this.current.tempOutdoor == '-9999' || this.current.tempOutdoor == '-9998') {
|
|
|
- this.current.tempOutdoor = 0
|
|
|
+ this.current.tempOutdoor = '--'
|
|
|
}
|
|
|
if (this.current.tempIndoor == '-9999' || this.current.tempIndoor == '-9998') {
|
|
|
- this.current.tempIndoor = 0
|
|
|
+ this.current.tempIndoor = '--'
|
|
|
}
|
|
|
if (this.current.energy == '-9999' || this.current.energy == '-9998') {
|
|
|
- this.current.energy = 0
|
|
|
+ this.current.energy = '--'
|
|
|
}
|
|
|
}
|
|
|
+ console.log('11111', this.current.tempOutdoor, this.current.tempIndoor, this.current.energy)
|
|
|
+ console.log('22222', this.similarDay.tempOutdoor, this.similarDay.tempIndoor, this.similarDay.energy)
|
|
|
+ console.log('33333', this.maxArr)
|
|
|
}
|
|
|
},
|
|
|
watch: {
|