shs.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <view class="page-body">
  3. <page-header :name="pageData.name" :bg="'#1560e0'" :showLeft="true" @goBack="goBack()"></page-header>
  4. <view class="scroll-wrap">
  5. <view class="basic-info-wrap">
  6. <view class="info-wrap">
  7. <view v-for="(item,index) in list" class="data-item-wrap">
  8. <view class="title">{{ item.name }}</view>
  9. <view class="data">{{ item.data }}</view>
  10. </view>
  11. </view>
  12. <view class="img-wrap">
  13. <image src="@/static/pool.png" />
  14. </view>
  15. <view class="radius-wrap"></view>
  16. </view>
  17. <view class="detail-info-wrap">
  18. <page-card style="margin-bottom: 30rpx;" :notShow="true" :name="'设备状态'">
  19. <template v-slot:content>
  20. <view class="detail-wrap">
  21. <template v-for="(item, index) in statusList">
  22. <view class="item" v-if="!item.data">
  23. <status-tip class="status-wrap" :name="item.name" :status="item.status"></status-tip>
  24. </view>
  25. <view class="item" v-else>
  26. <view>{{ item.name }}</view>
  27. <view class="params">{{ item.data }}</view>
  28. </view>
  29. </template>
  30. </view>
  31. </template>
  32. </page-card>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. list: [{
  42. name: '液位高限',
  43. data: '300m'
  44. }, {
  45. name: '液位低限',
  46. data: '206m³/h'
  47. }, {
  48. name: '净水瞬时流量',
  49. data: '20.0m³/h'
  50. }, {
  51. name: '累计流量',
  52. data: '46512.0m³'
  53. }, {
  54. name: '原水池液位',
  55. data: '243m'
  56. }, {
  57. name: '变频器运行频率',
  58. data: '39.00Hz'
  59. }, {
  60. name: '变频器运行电流',
  61. data: '25.00A'
  62. }, {
  63. name: '供电压力',
  64. data: '3.45V'
  65. }, {
  66. name: '设定压力',
  67. data: '0.20MPa'
  68. }, {
  69. name: '压力高报值',
  70. data: '1.20MPa'
  71. }, {
  72. name: '压力低报值',
  73. data: '0.03MPa'
  74. }, {
  75. name: '消防水池液位',
  76. data: '2.69m'
  77. }],
  78. statusList: [{
  79. name: '1#阀门',
  80. status: 1,
  81. }, {
  82. name: '2#阀门',
  83. status: 1,
  84. }, {
  85. name: '3#阀门',
  86. status: 1,
  87. }, {
  88. name: '4#阀门',
  89. status: 1,
  90. }],
  91. pageData: {}
  92. }
  93. },
  94. onLoad(option) {
  95. this.pageData = JSON.parse(option.data)
  96. this.getData()
  97. },
  98. methods: {
  99. goBack() { // 返回上一頁面
  100. uni.navigateBack()
  101. },
  102. async getData() {
  103. let res = await this.$http({
  104. url: `/qsy/dcs/transform/shs`,
  105. method: 'POST'
  106. })
  107. this.list = res.data.data.list
  108. this.statusList = res.data.data.statusList
  109. }
  110. }
  111. }
  112. </script>
  113. <style scoped lang="scss">
  114. .page-body {
  115. .scroll-wrap {
  116. height: calc(100vh - 85rpx);
  117. overflow: scroll;
  118. .basic-info-wrap {
  119. position: relative;
  120. height: auto;
  121. padding: 50rpx 49rpx 0;
  122. background: url(../../../static/page_bg.png);
  123. background-size: 140%;
  124. .info-wrap {
  125. display: flex;
  126. flex-wrap: wrap;
  127. .data-item-wrap {
  128. width: 33.33%;
  129. padding: 9rpx 0;
  130. min-height: 81rpx;
  131. text-align: center;
  132. margin-top: 48rpx;
  133. border-right: 1px solid #FFFFFF;
  134. .title {
  135. font-size: 22rpx;
  136. color: #FFFFFF;
  137. margin-bottom: 14rpx;
  138. }
  139. .data {
  140. font-weight: 700;
  141. font-size: 32rpx;
  142. color: #FFF600;
  143. }
  144. }
  145. .data-item-wrap:nth-child(-n+3) {
  146. margin-top: 0;
  147. }
  148. .data-item-wrap:nth-child(3n) {
  149. border: none;
  150. }
  151. }
  152. .img-wrap {
  153. padding: 38rpx 0 57rpx;
  154. text-align: center;
  155. image {
  156. width: 350rpx;
  157. height: 194rpx;
  158. }
  159. }
  160. .radius-wrap {
  161. position: absolute;
  162. left: 0;
  163. bottom: 0;
  164. width: 100vw;
  165. height: 30rpx;
  166. background-color: #fff;
  167. border-radius: 35rpx 35rpx 0 0;
  168. }
  169. }
  170. .detail-info-wrap {
  171. padding: 40rpx 35rpx;
  172. .detail-wrap {
  173. display: flex;
  174. flex-wrap: wrap;
  175. padding: 35rpx 55rpx 18rpx 55rpx;
  176. color: #8D8D8D;
  177. .item {
  178. display: flex;
  179. font-size: 26rpx;
  180. justify-content: space-between;
  181. width: calc(50% - 61rpx);
  182. margin-bottom: 50rpx;
  183. .params {
  184. color: #00BD00;
  185. }
  186. .status-wrap {
  187. width: 100%;
  188. /deep/ .tip-wrap {
  189. width: 100%;
  190. justify-content: space-between;
  191. }
  192. }
  193. }
  194. .item:nth-child(2n) {
  195. margin-left: 120rpx;
  196. }
  197. }
  198. .params-wrap {
  199. display: flex;
  200. flex-wrap: wrap;
  201. font-size: 26rpx;
  202. padding: 35rpx 55rpx;
  203. .item {
  204. width: calc(50% - 32rpx);
  205. display: flex;
  206. justify-content: space-between;
  207. margin-top: 50rpx;
  208. view:first-child {
  209. color: #8D8D8D;
  210. }
  211. }
  212. .item:nth-child(2n) {
  213. margin-left: 62rpx;
  214. }
  215. .item:nth-child(-n+2) {
  216. margin-top: 0;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. </style>