equipmentElectricity.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view>
  3. <view class="navbar-c">
  4. <view class="back">
  5. <u-icon name="arrow-left" color="#101010" size="36"></u-icon>
  6. </view>
  7. <view class="title">
  8. 设备用电量<image class="img" src="@/assets/img/refresh-line.svg"></image>
  9. </view>
  10. </view>
  11. <!-- 标签 -->
  12. <view class="tabs-box">
  13. <view class="tabs">
  14. <u-tabs :list="list" :is-scroll="false" inactive-color="#999999" active-color="#666666" :current="current" @change="change"></u-tabs>
  15. </view>
  16. <view class="icon">
  17. <u-icon name="arrow-down" color="#999999"></u-icon>
  18. </view>
  19. </view>
  20. <!-- 用电量 -->
  21. <view class="main">
  22. <view class="item" v-for="item in 3">
  23. <view class="icon">
  24. <image class="img" src="@/assets/img/energyMeter.svg" mode=""></image>
  25. </view>
  26. <view class="equipment">
  27. <view class="equipment1">
  28. 荆鹏软件园01
  29. </view>
  30. <view class="equipment2">
  31. 荆鹏集团
  32. </view>
  33. </view>
  34. <view class="electricity">
  35. <view class="electricity-item">
  36. <view class="number">
  37. 120.5
  38. </view>
  39. <view class="date">
  40. 昨日
  41. </view>
  42. </view>
  43. <view class="electricity-item">
  44. <view class="number">
  45. 120.5
  46. </view>
  47. <view class="date">
  48. 本月
  49. </view>
  50. </view>
  51. <view class="electricity-item">
  52. <view class="number">
  53. 120.5
  54. </view>
  55. <view class="date">
  56. 上月
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. list: [{
  69. name: '全部'
  70. }, {
  71. name: '荆鹏集团'
  72. }, {
  73. name: '青少年宫',
  74. }, {
  75. name: '荆州院子',
  76. }],
  77. current: 0
  78. }
  79. },
  80. methods: {
  81. change(index) {
  82. this.current = index;
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .tabs-box{
  89. background-color: #fff;
  90. display: flex;
  91. align-items: center;
  92. .tabs{
  93. width: 80%;
  94. }
  95. .icon{
  96. margin-left: auto;
  97. margin-right: 24rpx;
  98. }
  99. }
  100. // 用电量
  101. .main{
  102. background-color: #fff;
  103. .item{
  104. padding: 32rpx;
  105. display: flex;
  106. align-items: center;
  107. border-bottom: 1px solid rgba(245,245,245,1);
  108. .icon{
  109. width: 72rpx;
  110. height: 72rpx;
  111. border-radius: 4px;
  112. background-color: rgba(219,234,255,1);
  113. display: flex;
  114. align-items: center;
  115. justify-content: center;
  116. .img{
  117. width: 48rpx;
  118. height: 48rpx;
  119. }
  120. }
  121. .equipment{
  122. margin-left: 16rpx;
  123. .equipment1{
  124. color: rgba(51,51,51,1);
  125. font-size: 32rpx;
  126. }
  127. .equipment2{
  128. color: rgba(119,119,119,1);
  129. }
  130. }
  131. .electricity{
  132. display: flex;
  133. justify-content: space-between;
  134. flex: 1;
  135. margin-left: 48rpx;
  136. text-align: center;
  137. .electricity-item{
  138. .number{
  139. color: rgba(51,51,51,1);
  140. font-size: 32rpx;
  141. font-weight: bold;
  142. }
  143. .date{
  144. color: rgba(119,119,119,1);
  145. margin-top: 4rpx;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. </style>