pool-system.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 class="status-list">
  8. <view class="item-wrap" v-for="(item, index) in sbList" :key="item.id">
  9. <view class="name">{{ item.name }}</view>
  10. <status-tip class="status" v-for="(item1, index1) in item.status" :key="index1" :name="''" :status="item1.status" :tip="item1.tip"></status-tip>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="img-wrap">
  15. <image src="@/static/pool.png" />
  16. </view>
  17. <view class="radius-wrap"></view>
  18. </view>
  19. <view class="detail-info-wrap">
  20. <page-card v-for="(item, index) in 2" style="margin-bottom: 30rpx;" :notShow="true" :name="`${index + 1}号水池`">
  21. <template v-slot:content>
  22. <simple-table :tableHead="tableHead" :list="paramsList"></simple-table>
  23. </template>
  24. </page-card>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. activeData: {}, // 当前选中的数据
  34. sbList: [{ // 水泵列表
  35. id: 0,
  36. name: '来自950水泵房',
  37. status: [{
  38. tip: '1号闸阀',
  39. status: 1
  40. }, {
  41. tip: '3号闸阀',
  42. status: 1
  43. }]
  44. }, {
  45. id: 1,
  46. name: '来自五分区水泵房',
  47. status: [{
  48. tip: '2号闸阀',
  49. status: 1
  50. }, {
  51. tip: '4号闸阀',
  52. status: 1
  53. }]
  54. }],
  55. pageData: {}, // 页头信息
  56. tableHead: ['名称', '参数'], // 表头信息
  57. paramsList: [{ // 液位列表
  58. name: '液位(m)',
  59. params: ['2.98'],
  60. }, {
  61. name: '超高液位设定值(m)',
  62. params: ['3'],
  63. }, {
  64. name: '高液位设定值(m)',
  65. params: ['2.8'],
  66. }, {
  67. name: '低液位设定值(m)',
  68. params: ['1'],
  69. }]
  70. }
  71. },
  72. onLoad(option) {
  73. this.pageData = JSON.parse(option.data)
  74. this.activeData = this.sbList[0]
  75. },
  76. methods: {
  77. goBack() { // 返回上一頁面
  78. uni.navigateBack()
  79. },
  80. kindChange(data) { // 切换水泵状态
  81. this.activeData = data
  82. }
  83. }
  84. }
  85. </script>
  86. <style scoped lang="scss">
  87. .page-body {
  88. .scroll-wrap {
  89. height: calc(100vh - 85rpx);
  90. overflow: scroll;
  91. .basic-info-wrap {
  92. position: relative;
  93. height: 531rpx;
  94. padding: 0 49rpx;
  95. background: url(../../../../static/page_bg.png);
  96. background-size: 150%;
  97. .info-wrap {
  98. display: flex;
  99. flex-wrap: wrap;
  100. border-bottom: 1rpx dashed #fff;
  101. }
  102. .img-wrap {
  103. padding-top: 54rpx;
  104. text-align: center;
  105. image {
  106. width: 324rpx;
  107. height: 128rpx;
  108. }
  109. view {
  110. margin-top: 26rpx;
  111. color: #fff;
  112. font-size: 26rpx;
  113. }
  114. }
  115. .status-list {
  116. width: 100%;
  117. padding: 60rpx 0;
  118. .item-wrap {
  119. display: flex;
  120. width: 100%;
  121. font-size: 26rpx;
  122. color: #FFFFFF;
  123. padding: 23rpx 32rpx;
  124. .name {
  125. width: 40%;
  126. }
  127. .status {
  128. width: 30%;
  129. }
  130. }
  131. .active {
  132. background: #3495FA;
  133. box-shadow: 0rpx 3rpx 7rpx 0rpx rgba(0,8,35,0.31);
  134. border-radius: 14rpx;
  135. }
  136. /deep/ .tip-wrap {
  137. margin-left: 12rpx;
  138. }
  139. }
  140. .radius-wrap {
  141. position: absolute;
  142. left: 0;
  143. bottom: 0;
  144. width: 100vw;
  145. height: 30rpx;
  146. background-color: #fff;
  147. border-radius: 35rpx 35rpx 0 0;
  148. }
  149. }
  150. .detail-info-wrap {
  151. padding: 40rpx 35rpx;
  152. /deep/ .card-wrap:last-child {
  153. margin-bottom: 0 !important;
  154. }
  155. }
  156. }
  157. }
  158. </style>