verticalScreen.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="verticalWrap">
  3. <div class="pageHead">
  4. <pageHead />
  5. </div>
  6. <div v-show="nowPage == 1">
  7. <NowData screenType="ver" />
  8. <AirSwitchVer />
  9. <TemChart screenType="ver" :showPing="nowPage" />
  10. <LastMonthData screenType="ver" />
  11. </div>
  12. <div v-show="nowPage == 2">
  13. <FloorSpace :showPing="nowPage" @donetowpage="doneTowPage" />
  14. </div>
  15. <div v-show="nowPage == 3">
  16. <div class="lastTotalEnergy verticalClass">
  17. <div class="head-title">
  18. <span>上月总能耗</span>
  19. </div>
  20. <div class="subhead-title">低能耗亲自然</div>
  21. <div class="bottomCont">
  22. <img src="@/assets/circleEnergy.png" />
  23. <div class="showData">
  24. <div class="title">比基准能耗</div>
  25. <div class="energySave">
  26. 节能<span>{{ lastAllEnergy.energyCompare }}%</span>
  27. </div>
  28. <div class="totalEnergy">
  29. 总能耗<span>{{ lastAllEnergy.energyTotal }}</span
  30. >KWh
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <lastSaveEnergy screenType="ver" />
  36. <lastEnergyChart
  37. screenType="ver"
  38. :showPing="nowPage"
  39. @donethreepage="doneThreePage"
  40. />
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import NowData from "./valueDelivery/NowData.vue";
  46. import LastMonthData from "./valueDelivery/LastMonthData.vue";
  47. import AirSwitchVer from "./valueDelivery/AirSwitchVer.vue";
  48. import FloorSpace from "./valueDelivery/FloorSpace.vue";
  49. import TemChart from "./valueDelivery/TemChart.vue";
  50. import lastEnergyChart from "./valueDelivery/lastEnergyChart.vue";
  51. import lastSaveEnergy from "./valueDelivery/lastSaveEnergy.vue";
  52. import pageHead from "./valueDelivery/pageHead.vue";
  53. import { mapState } from "vuex";
  54. export default {
  55. components: {
  56. NowData,
  57. FloorSpace,
  58. LastMonthData,
  59. AirSwitchVer,
  60. TemChart,
  61. lastEnergyChart,
  62. lastSaveEnergy,
  63. pageHead,
  64. },
  65. data() {
  66. return {
  67. nowPage: null,
  68. verticalInterval: null,
  69. };
  70. },
  71. mounted() {
  72. this.nowPage = 1;
  73. this.timePageShow();
  74. },
  75. destroyed() {
  76. clearInterval(this.verticalInterval);
  77. },
  78. computed: {
  79. ...mapState({
  80. lastAllEnergy: (state) => {
  81. // debugger;
  82. var lastAllEnergy = JSON.parse(
  83. JSON.stringify(state.lastAllEnergy)
  84. );
  85. lastAllEnergy.energyCompare = Number(
  86. (lastAllEnergy.energyCompare * 100).toFixed(0)
  87. );
  88. return lastAllEnergy;
  89. },
  90. }),
  91. },
  92. methods: {
  93. doneThreePage() {
  94. //第三屏刷新结束 通知
  95. this.nowPage = 1;
  96. this.timePageShow(); //1屏变2屏
  97. },
  98. doneTowPage() {
  99. //第二屏刷新结束 通知
  100. this.nowPage = 3;
  101. },
  102. timePageShow() {
  103. var timeoutsign = setTimeout(() => {
  104. this.nowPage = this.nowPage + 1;
  105. if (this.nowPage == 4) {
  106. this.nowPage = 1;
  107. }
  108. }, 6000);
  109. },
  110. },
  111. };
  112. </script>
  113. <style lang="less" scoped>
  114. .verticalWrap {
  115. background: #f3fdff;
  116. padding: 50px 40px 60px;
  117. }
  118. .pageHead {
  119. padding-bottom: 50px;
  120. }
  121. .lastTotalEnergy {
  122. height: 535px;
  123. .bottomCont {
  124. width: 580px;
  125. margin: 4px auto;
  126. position: relative;
  127. img {
  128. width: 100%;
  129. }
  130. .showData {
  131. position: absolute;
  132. top: 0;
  133. left: 0;
  134. width: 100%;
  135. height: 100%;
  136. box-sizing: border-box;
  137. padding-top: 90px;
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. flex-direction: column;
  142. .title {
  143. font-size: 28px;
  144. color: #575271;
  145. }
  146. .energySave {
  147. margin-top: 14px;
  148. font-size: 56px;
  149. span {
  150. font-size: 60px;
  151. }
  152. }
  153. .totalEnergy {
  154. margin-top: 18px;
  155. color: #2ec5f5;
  156. font-size: 28px;
  157. }
  158. }
  159. }
  160. }
  161. </style>