|
@@ -9,27 +9,27 @@
|
|
|
</p>
|
|
|
<div class='count-data'>
|
|
|
<div class='outdoor'>
|
|
|
- <div class='outdoor-left' :style='{"height":((current.tempOutdoor)/maxArr[0])*160 + "px"}'>
|
|
|
- <span>{{current.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
+ <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>
|
|
|
- <div class='outdoor-right' :style='{"height":((similarDay.tempOutdoor)/maxArr[0])*160 + "px"}'>
|
|
|
- <span>{{similarDay.tempOutdoor.toFixed(1)}}℃</span>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
<div class='indoor'>
|
|
|
- <div class='indoor-left' :style='{"height": ((current.tempIndoor)/maxArr[1])*160 + "px"}'>
|
|
|
- <span>{{current.tempIndoor.toFixed(1)}}℃</span>
|
|
|
+ <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>
|
|
|
- <div class='indoor-right' :style='{"height": ((similarDay.tempIndoor)/maxArr[1])*160 + "px"}'>
|
|
|
- <span>{{similarDay.tempIndoor.toFixed(1)}}℃</span>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
<div class='coldWar'>
|
|
|
- <div class='coldWar-left' :style='{"height": ((current.energy)/maxArr[2])*160 + "px"}'>
|
|
|
- <span>{{current.energy.toFixed(0)}}kWh</span>
|
|
|
+ <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>
|
|
|
- <div class='coldWar-right' :style='{"height": ((similarDay.energy)/maxArr[2])*160 + "px"}'>
|
|
|
- <span>{{similarDay.energy.toFixed(0)}}kWh</span>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
p {
|
|
|
margin: 0;
|
|
|
margin-top: 20px;
|
|
|
- margin-bottom: 50px;
|
|
|
+ margin-bottom: 30px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
span {
|