p-safety-monitoring-content-1.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view>
  3. <view class="p-i-s-content-1">
  4. <view class="top">
  5. <view class="list_item">
  6. <view class="item" v-for="(item,index) in simulation" :key="index" :class="item.type"
  7. @click="go_status_detail(item.type,item.name)">
  8. <view class="name">{{item.name}}</view>
  9. <view class="num">{{item.count}}个</view>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="inner">
  14. <view class="list_item">
  15. <view class="item" v-for="(item,index) in simulationList" :key="index"
  16. @click="go_name_detail(item.typeCodeDesc)">
  17. <view class="item_title">
  18. <view class="item_name">{{item.typeCodeDesc}}</view>
  19. </view>
  20. <view class="item_content">
  21. <view class="item_content_list">
  22. <view class="content_item" v-for="(inner,index) in item.normalCount" :key="index">
  23. <view class="name">{{inner.name}}</view>
  24. <view class="num" v-if="index == 0" :class="index==0?'normal':''">{{inner.count}}个
  25. </view>
  26. <view class="num" v-if="index == 1" :class="index==1?'alarm':''">{{inner.count}}个
  27. </view>
  28. <view class="num" v-if="index == 2" :class="index==2?'sign':''">{{inner.count}}个
  29. </view>
  30. <view class="num" v-if="index == 3" :class="index==3?'fault':''">{{inner.count}}个
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. props: [
  44. "mine",
  45. "simulation",
  46. "simulationList"
  47. ],
  48. data() {
  49. return {
  50. imglist: []
  51. };
  52. },
  53. computed: {
  54. imgUrl: function(index) {
  55. console.log(index)
  56. }
  57. },
  58. methods: {
  59. go_status_detail(status, title) {
  60. uni.navigateTo({
  61. url: "../../production/safety_monitoring/safety_monitoring_status_detail/safety_monitoring_status_detail?status=" +
  62. status + "&title=" + title + "&type=simulation" + "&mine=" + this.mine
  63. })
  64. },
  65. go_name_detail(name) {
  66. uni.navigateTo({
  67. url: "../../production/safety_monitoring/safety_monitoring_name_detail/safety_monitoring_name_detail?name=" +
  68. name + "&mine=" + this.mine
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss">
  75. .p-i-s-content-1 {
  76. .top {
  77. height: 202rpx;
  78. background: #FFFFFF;
  79. border-bottom: 1rpx solid #f3f3f3;
  80. .list_item {
  81. height: 202rpx;
  82. display: flex;
  83. justify-content: space-around;
  84. align-items: center;
  85. .item {
  86. width: 106rpx;
  87. height: 106rpx;
  88. border-radius: 50%;
  89. text-align: center;
  90. line-height: 53rpx;
  91. .name {
  92. margin-top: 21rpx;
  93. font-size: 25rpx;
  94. font-family: PingFangSC-Regular, PingFang SC;
  95. font-weight: 400;
  96. color: #FFFFFF;
  97. line-height: 34rpx;
  98. }
  99. .num {
  100. margin-top: 4rpx;
  101. font-size: 21rpx;
  102. font-family: PingFangSC-Regular, PingFang SC;
  103. font-weight: 400;
  104. color: #FFFFFF;
  105. line-height: 29rpx;
  106. }
  107. }
  108. .item_1 {
  109. background: #27AE60;
  110. }
  111. .item_2 {
  112. background: #E74C3C;
  113. }
  114. .item_3 {
  115. background: #2C3E50;
  116. }
  117. .item_4 {
  118. background: #2873FF;
  119. }
  120. // 模拟量 统计
  121. .normal {
  122. background: #2C3E50;
  123. }
  124. .alarm {
  125. background: #E74C3C;
  126. }
  127. .sign {
  128. background: #27AE60;
  129. }
  130. .fault {
  131. background: #2873FF;
  132. }
  133. }
  134. }
  135. .inner {
  136. .list_item {
  137. .item {
  138. border-top: 1rpx solid #f3f3f3;
  139. border-bottom: 1rpx solid #f3f3f3;
  140. box-sizing: border-box;
  141. padding: 0 30rpx;
  142. padding-top: 28rpx;
  143. padding-bottom: 26rpx;
  144. .item_title {
  145. display: flex;
  146. box-sizing: border-box;
  147. padding-bottom: 18rpx;
  148. border-bottom: 1rpx solid #f3f3f3;
  149. .item_icon {
  150. margin-left: 6rpx;
  151. image {
  152. width: 83rpx;
  153. height: 83rpx;
  154. }
  155. }
  156. .item_name {
  157. margin-left: 23rpx;
  158. font-size: 29rpx;
  159. font-family: PingFangSC-Regular, PingFang SC;
  160. font-weight: 400;
  161. color: #002257;
  162. line-height: 83rpx;
  163. }
  164. }
  165. .item_content {
  166. .item_content_list {
  167. display: flex;
  168. justify-content: space-between;
  169. .content_item {
  170. width: 158rpx;
  171. text-align: center;
  172. .name {
  173. margin-top: 22rpx;
  174. font-size: 25rpx;
  175. font-family: PingFangSC-Regular, PingFang SC;
  176. font-weight: 400;
  177. color: #97A3B4;
  178. line-height: 33rpx;
  179. }
  180. .num {
  181. margin-top: 6rpx;
  182. font-size: 28rpx;
  183. font-family: PingFangSC-Medium, PingFang SC;
  184. font-weight: 500;
  185. line-height: 33rpx;
  186. }
  187. .normal {
  188. color: #2C3E50;
  189. }
  190. .alarm {
  191. color: #E74C3C;
  192. }
  193. .sign {
  194. color: #2ECC71;
  195. }
  196. .fault {
  197. color: #2F54EB;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }
  204. }
  205. }
  206. </style>