nitrogen-system.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 @click="activeChange(item)" v-for="(item,index) in list" :class="activeData.name === item.name ? 'active item' : 'item'"
  8. :key="index">
  9. <status-tip class="status-wrap" :name="item.name" :status="item.status"
  10. :tip="item.status ? '运行' : '停止'"></status-tip>
  11. </view>
  12. </view>
  13. <view class="img-wrap">
  14. <image v-if="activeData.status" src="@/static/nitrogen.jpg" />
  15. <image v-else src="@/static/nitrogen-static.png" />
  16. <view>
  17. {{ activeData.name }}
  18. </view>
  19. </view>
  20. <view class="radius-wrap"></view>
  21. </view>
  22. <view class="detail-info-wrap">
  23. <page-card style="margin-bottom: 30rpx;" :notShow="true" :name="activeData.name">
  24. <template v-slot:content>
  25. <simple-table :tableHead="tableHead" :list="paramsList"></simple-table>
  26. </template>
  27. </page-card>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. pageData: {},
  37. activeData: {},
  38. list: [{
  39. name: '1#空压',
  40. status: 1
  41. }, {
  42. name: '2#空压',
  43. status: 1
  44. }, {
  45. name: '3#空压',
  46. status: 1
  47. }],
  48. tableHead: ['名称', '参数/状态'],
  49. paramsList: [{
  50. name: '气压(Mpa)',
  51. params: ['0.59']
  52. },
  53. {
  54. name: '排空阀',
  55. params: [{
  56. status: 0
  57. }]
  58. },
  59. {
  60. name: '系统阀',
  61. params: [{
  62. status: 1
  63. }]
  64. },
  65. {
  66. name: '送气阀',
  67. params: [{
  68. status: 1
  69. }]
  70. },
  71. {
  72. name: '罐压(Mpa)',
  73. params: ['0.59']
  74. },
  75. {
  76. name: '罐温(℃)',
  77. params: ['31.0']
  78. },
  79. {
  80. name: '罐报警值(℃)',
  81. params: ['120.0']
  82. }
  83. ]
  84. }
  85. },
  86. onLoad(option) {
  87. this.pageData = JSON.parse(option.data)
  88. this.activeData = this.list[0]
  89. },
  90. methods: {
  91. goBack() { // 返回上一頁面
  92. uni.navigateBack()
  93. },
  94. activeChange(item) { // 切换状态
  95. this.activeData = item
  96. }
  97. }
  98. }
  99. </script>
  100. <style scoped lang="scss">
  101. .page-body {
  102. .scroll-wrap {
  103. height: calc(100vh - 85rpx);
  104. overflow: scroll;
  105. .basic-info-wrap {
  106. position: relative;
  107. height: auto;
  108. padding: 50rpx 49rpx 0;
  109. background: url(../../../../static/page_bg.png);
  110. background-size: 120%;
  111. .info-wrap {
  112. display: flex;
  113. flex-wrap: wrap;
  114. border-bottom: 1rpx dashed #fff;
  115. padding-bottom: 30rpx;
  116. .item {
  117. display: flex;
  118. padding: 24rpx 26rpx;
  119. justify-content: space-between;
  120. width: 50%;
  121. color: #fff;
  122. font-size: 26rpx;
  123. .status-wrap {
  124. width: 100%;
  125. /deep/ .tip-wrap {
  126. justify-content: space-between;
  127. }
  128. }
  129. .params {
  130. color: #FFFF00;
  131. }
  132. }
  133. .active {
  134. background: #3495FA;
  135. box-shadow: 0px 3px 7px 0px rgba(0, 8, 35, 0.31);
  136. border-radius: 14px;
  137. }
  138. }
  139. .img-wrap {
  140. padding: 49rpx 0;
  141. text-align: center;
  142. image {
  143. width: 310rpx;
  144. height: 138rpx;
  145. }
  146. view {
  147. margin-top: 25rpx;
  148. color: #fff;
  149. }
  150. }
  151. .radius-wrap {
  152. position: absolute;
  153. left: 0;
  154. bottom: 0;
  155. width: 100vw;
  156. height: 30rpx;
  157. background-color: #fff;
  158. border-radius: 35rpx 35rpx 0 0;
  159. }
  160. }
  161. .detail-info-wrap {
  162. padding: 40rpx 35rpx;
  163. /deep/ .card-wrap:last-child {
  164. margin-bottom: 0 !important;
  165. }
  166. }
  167. }
  168. }
  169. </style>