belt.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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 src="@/static/pd.png"/>
  15. </view>
  16. <view class="radius-wrap"></view>
  17. </view>
  18. <view class="detail-info-wrap">
  19. <page-card style="margin-bottom: 30rpx;" :notShow="true" :name="'皮带参数'">
  20. <template v-slot:content>
  21. <simple-table :tableHead="tableHead" :list="paramsList"></simple-table>
  22. </template>
  23. </page-card>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. activeData: {},
  33. list: [{
  34. name: '1#皮带',
  35. status: 1
  36. },{
  37. name: '2#皮带',
  38. status: 1
  39. },{
  40. name: '3#皮带',
  41. status: 1
  42. }],
  43. tableHead: ['名称', '参数/状态'],
  44. paramsList: [{
  45. name: '速度',
  46. params: ['23m/s']
  47. },{
  48. name: '远近控状态',
  49. params: ['正常']
  50. },{
  51. name: '联锁模式',
  52. params: ['暂无']
  53. },{
  54. name: '区域闯入',
  55. params: ['暂无']
  56. },{
  57. name: '急停',
  58. params: ['暂无']
  59. },{
  60. name: '备要信号',
  61. params: [{
  62. status: 1
  63. }]
  64. },{
  65. name: '烟雾',
  66. params: [{
  67. status: 1
  68. }]
  69. },{
  70. name: '堆煤',
  71. params: [{
  72. status: 1
  73. }]
  74. },{
  75. name: '纵断',
  76. params: [{
  77. status: 1
  78. }]
  79. },{
  80. name: '跑偏',
  81. params: [{
  82. status: 1
  83. }]
  84. }]
  85. }
  86. },
  87. onLoad(option) {
  88. this.pageData = JSON.parse(option.data)
  89. this.activeData = this.list[0]
  90. },
  91. methods: {
  92. goBack() { // 返回上一頁面
  93. uni.navigateBack()
  94. },
  95. activeChange(item) { // 切换状态
  96. this.activeData = item
  97. }
  98. }
  99. }
  100. </script>
  101. <style scoped lang="scss">
  102. .page-body {
  103. .scroll-wrap {
  104. height: calc(100vh - 85rpx);
  105. overflow: scroll;
  106. .basic-info-wrap {
  107. position: relative;
  108. height: auto;
  109. padding: 50rpx 49rpx 0;
  110. background: url(../../../../static/page_bg.png);
  111. background-size: 100%;
  112. .info-wrap {
  113. display: flex;
  114. flex-wrap: wrap;
  115. border-bottom: 1rpx dashed #fff;
  116. padding-bottom: 20rpx;
  117. .item {
  118. display: flex;
  119. justify-content: space-between;
  120. width: calc(50% - 64rpx);
  121. padding: 20rpx;
  122. color: #fff;
  123. font-size: 26rpx;
  124. .status-wrap {
  125. width: 100%;
  126. /deep/ .tip-wrap {
  127. justify-content: space-between;
  128. }
  129. }
  130. .params {
  131. color: #FFFF00;
  132. }
  133. }
  134. .item:nth-child(2n-1) {
  135. margin-right: 120rpx
  136. }
  137. .active {
  138. background: #3495FA;
  139. box-shadow: 0px 3px 7px 0px rgba(0, 8, 35, 0.31);
  140. border-radius: 14px;
  141. }
  142. }
  143. .img-wrap {
  144. padding: 70rpx 0;
  145. text-align: center;
  146. image {
  147. width: 443rpx;
  148. height: 48rpx;
  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>