p-i-s-content-2.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view>
  3. <view class="p-i-s-content-2">
  4. <view class="top">
  5. <view class="list_item">
  6. <view class="item" v-for="(item,index) in sluice" :key="index" :class="item.type" @click="go_status_detail(item.type,item.name)">
  7. <view class="name">{{item.name}}</view>
  8. <view class="num">{{item.count}}个</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="inner">
  13. <view class="list_item">
  14. <view class="item" v-for="(item,index) in sluiceList" :key="index" @click="go_name_detail(item.typeCodeDesc)">
  15. <view class="item_title">
  16. <view class="item_icon">
  17. <image src="./icon/dianliang.png" mode=""></image>
  18. </view>
  19. <view class="item_name">{{item.typeCodeDesc}}</view>
  20. </view>
  21. <view class="item_content">
  22. <view class="item_content_list">
  23. <view class="content_item" v-for="(inner,index) in item.normalCount" :key="index">
  24. <view class="name">{{inner.name}}</view>
  25. <view class="num" :class="inner.type">{{inner.count}}个</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. props:[
  38. "sluice",
  39. "sluiceList"
  40. ],
  41. data() {
  42. return {
  43. };
  44. },
  45. methods:{
  46. go_status_detail(status,title){
  47. // console.log(status)
  48. uni.navigateTo({
  49. url:"../../pages/p-i-safety-monitoring/p-i-s-sluice-status-detail/p-i-s-sluice-status-detail?status=" + status + "&title=" + title
  50. })
  51. },
  52. go_name_detail(name){
  53. uni.navigateTo({
  54. url:"../../pages/p-i-safety-monitoring/p-i-s-sluice-name-detail/p-i-s-sluice-name-detail?name=" + name
  55. })
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .p-i-s-content-2{
  62. .top{
  63. height: 202rpx;
  64. background: #FFFFFF;
  65. border-bottom: 1rpx solid #f3f3f3;
  66. .list_item{
  67. height: 202rpx;
  68. display: flex;
  69. justify-content: space-around;
  70. align-items: center;
  71. .item{
  72. width: 106rpx;
  73. height: 106rpx;
  74. border-radius: 50%;
  75. text-align: center;
  76. line-height: 53rpx;
  77. .name{
  78. margin-top: 21rpx;
  79. font-size: 25rpx;
  80. font-family: PingFangSC-Regular, PingFang SC;
  81. font-weight: 400;
  82. color: #FFFFFF;
  83. line-height: 34rpx;
  84. }
  85. .num{
  86. margin-top: 4rpx;
  87. font-size: 21rpx;
  88. font-family: PingFangSC-Regular, PingFang SC;
  89. font-weight: 400;
  90. color: #FFFFFF;
  91. line-height: 29rpx;
  92. }
  93. }
  94. .item_1{
  95. background: #27AE60;
  96. }
  97. .item_2{
  98. background: #E74C3C;
  99. }
  100. .item_3{
  101. background: #2C3E50;
  102. }
  103. .item_4{
  104. background: #2873FF;
  105. }
  106. // 开关量 统计
  107. .normal{
  108. background: #27AE60;
  109. }
  110. .alarm{
  111. background: #E74C3C;
  112. }
  113. .open{
  114. background: #2C3E50;
  115. }
  116. .close{
  117. background: #2873FF;
  118. }
  119. }
  120. }
  121. .inner{
  122. .list_item{
  123. .item{
  124. border-top: 1rpx solid #f3f3f3;
  125. border-bottom: 1rpx solid #f3f3f3;
  126. box-sizing: border-box;
  127. padding: 0 30rpx;
  128. padding-top: 28rpx;
  129. padding-bottom: 26rpx;
  130. .item_title{
  131. display: flex;
  132. box-sizing: border-box;
  133. padding-bottom: 18rpx;
  134. border-bottom: 1rpx solid #f3f3f3;
  135. .item_icon{
  136. margin-left: 6rpx;
  137. image{
  138. width: 83rpx;
  139. height: 83rpx;
  140. }
  141. }
  142. .item_name{
  143. margin-left: 23rpx;
  144. font-size: 29rpx;
  145. font-family: PingFangSC-Regular, PingFang SC;
  146. font-weight: 400;
  147. color: #002257;
  148. line-height: 83rpx;
  149. }
  150. }
  151. .item_content{
  152. .item_content_list{
  153. display: flex;
  154. justify-content: space-between;
  155. .content_item{
  156. width: 158rpx;
  157. text-align: center;
  158. .name{
  159. margin-top: 22rpx;
  160. font-size: 25rpx;
  161. font-family: PingFangSC-Regular, PingFang SC;
  162. font-weight: 400;
  163. color: #97A3B4;
  164. line-height: 33rpx;
  165. }
  166. .num{
  167. margin-top: 6rpx;
  168. font-size: 28rpx;
  169. font-family: PingFangSC-Medium, PingFang SC;
  170. font-weight: 500;
  171. line-height: 33rpx;
  172. }
  173. .normal{
  174. color: #2ECC71;
  175. }
  176. .alarm{
  177. color: #E74C3C;
  178. }
  179. .sign{
  180. color: #2C3E50;
  181. }
  182. .fault{
  183. color: #2F54EB;
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. </style>