jdgl.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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="radius-wrap"></view>
  14. </view>
  15. <view class="detail-info-wrap">
  16. <page-card style="margin-bottom: 30rpx;" :notShow="true" :name="activeData.name">
  17. <template v-slot:content>
  18. <simple-table :tableHead="tableHead" :list="paramsList"></simple-table>
  19. </template>
  20. </page-card>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. pageData: {},
  30. activeData: {},
  31. list: [{
  32. name: '1#甲带给料机',
  33. status: 1
  34. },{
  35. name: '2#甲带给料机',
  36. status: 1
  37. },{
  38. name: '3#甲带给料机',
  39. status: 0
  40. },{
  41. name: '4#甲带给料机',
  42. status: 1
  43. }],
  44. tableHead: ['名称', '参数/状态'],
  45. paramsList: [{
  46. name: '控制方式',
  47. params: ['就地']
  48. },
  49. {
  50. name: '变频器母线电压(V)',
  51. params: ['9999']
  52. },
  53. {
  54. name: '变频器输出电压(V)',
  55. params: ['9999']
  56. },
  57. {
  58. name: '变频器输出电流(A)',
  59. params: ['20.23']
  60. },
  61. {
  62. name: '变频器输出频率(Hz)',
  63. params: ['9364']
  64. },
  65. {
  66. name: '变频器温度(℃)',
  67. params: ['80.24']
  68. },
  69. {
  70. name: '变频器故障',
  71. params: [{
  72. status: 1
  73. }]
  74. }
  75. ]
  76. }
  77. },
  78. onLoad(option) {
  79. this.pageData = JSON.parse(option.data)
  80. this.activeData = this.list[0]
  81. },
  82. methods: {
  83. goBack() { // 返回上一頁面
  84. uni.navigateBack()
  85. },
  86. activeChange(item) { // 切换状态
  87. this.activeData = item
  88. }
  89. }
  90. }
  91. </script>
  92. <style scoped lang="scss">
  93. .page-body {
  94. .scroll-wrap {
  95. height: calc(100vh - 85rpx);
  96. overflow: scroll;
  97. .basic-info-wrap {
  98. position: relative;
  99. height: auto;
  100. padding: 50rpx 49rpx 40rpx;
  101. background: url(../../../static/page_bg.png);
  102. background-size: 120%;
  103. .info-wrap {
  104. display: flex;
  105. flex-wrap: wrap;
  106. padding-bottom: 30rpx;
  107. .item {
  108. display: flex;
  109. padding: 24rpx 14rpx;
  110. justify-content: space-between;
  111. width: 50%;
  112. color: #fff;
  113. font-size: 26rpx;
  114. .status-wrap {
  115. width: 100%;
  116. /deep/ .tip-wrap {
  117. justify-content: space-between;
  118. }
  119. }
  120. .params {
  121. color: #FFFF00;
  122. }
  123. }
  124. .active {
  125. background: #3495FA;
  126. box-shadow: 0px 3px 7px 0px rgba(0, 8, 35, 0.31);
  127. border-radius: 14px;
  128. }
  129. }
  130. .img-wrap {
  131. padding: 49rpx 0;
  132. text-align: center;
  133. image {
  134. width: 310rpx;
  135. height: 138rpx;
  136. }
  137. view {
  138. margin-top: 25rpx;
  139. color: #fff;
  140. }
  141. }
  142. .radius-wrap {
  143. position: absolute;
  144. left: 0;
  145. bottom: 0;
  146. width: 100vw;
  147. height: 30rpx;
  148. background-color: #fff;
  149. border-radius: 35rpx 35rpx 0 0;
  150. }
  151. }
  152. .detail-info-wrap {
  153. padding: 40rpx 35rpx;
  154. /deep/ .card-wrap:last-child {
  155. margin-bottom: 0 !important;
  156. }
  157. }
  158. }
  159. }
  160. </style>