p-i-o-section-2.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view class="title">
  5. 井下人员(区域分布)
  6. </view>
  7. <view class="inner">
  8. <view class="list_item">
  9. <view class="item" v-for="item in regionList" :key="item.area_id" @click="openDrawer(item),getMineList(item.area_id)">
  10. <view class="left">
  11. <view class="icon">
  12. <image :src="item.thumb" mode=""></image>
  13. </view>
  14. <view class="name">{{item.area_name}}</view>
  15. </view>
  16. <view class="right">{{item.pepole_num}}人</view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <uni-drawer ref="drawer" maskClick mode="right">
  22. <view class="drawer">
  23. <view class="top"></view>
  24. <view class="title">{{drawer.name}}</view>
  25. <view class="list_item">
  26. <view class="item" v-for="item in mineList" :key="item.station_id" @click="go_number(item.station_id,item.station_name)">
  27. <view class="name">{{item.station_name}}</view>
  28. <view class="right">
  29. <view class="num">{{item.pepole_num}}人</view>
  30. <view class="icon">
  31. <uni-icons type="arrowright"></uni-icons>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </uni-drawer>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. props:[
  43. "regionList",
  44. "mineList"
  45. ],
  46. data() {
  47. return {
  48. drawer:{
  49. name:"矿井"
  50. }
  51. };
  52. },
  53. methods:{
  54. openDrawer(item){
  55. this.$refs.drawer.open();
  56. this.drawer.name = item.area_name
  57. },
  58. // 向页面传矿井id
  59. getMineList(area_id){
  60. this.$emit("getMineList",area_id)
  61. console.log(area_id)
  62. },
  63. go_number(station_id,station_name){
  64. uni.navigateTo({
  65. url:"../../pages/p-i-orientation/p-i-o-s2-number/p-i-o-s2-number?station_id="+station_id+"&station_name="+station_name
  66. })
  67. }
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. .content{
  73. margin-top: 16rpx;
  74. background: #FFFFFF;
  75. box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
  76. border-radius: 20rpx;
  77. .title{
  78. line-height: 96rpx;
  79. text-align: center;
  80. font-size: 30rpx;
  81. font-family: PingFangSC-Regular, PingFang SC;
  82. font-weight: 400;
  83. color: #232627;
  84. border-bottom: 2rpx solid #f3f3f3;
  85. }
  86. .inner{
  87. box-sizing: border-box;
  88. padding-left: 30rpx;
  89. padding-right: 20rpx;
  90. padding-bottom: 20rpx;
  91. .list_item{
  92. background: #FFFFFF;
  93. .item{
  94. height: 110rpx;
  95. border-bottom: 1px solid #f3f3f3;
  96. display: flex;
  97. justify-content: space-between;
  98. align-items: center;
  99. .left{
  100. height: 110rpx;
  101. display: flex;
  102. align-items: center;
  103. .icon{
  104. image{
  105. width: 83rpx;
  106. height: 83rpx;
  107. }
  108. }
  109. .name{
  110. margin-left: 36rpx;
  111. font-size: 29rpx;
  112. font-family: PingFangSC-Regular, PingFang SC;
  113. font-weight: 400;
  114. color: #232627;
  115. }
  116. }
  117. .right{
  118. font-size: 29rpx;
  119. font-family: PingFangSC-Medium, PingFang SC;
  120. font-weight: 500;
  121. color: #27AE60;
  122. }
  123. }
  124. }
  125. }
  126. }
  127. .drawer{
  128. .top{
  129. height: var(--status-bar-height);
  130. background-color: #009FE8;
  131. }
  132. .title{
  133. box-sizing: border-box;
  134. padding-left: 20rpx;
  135. text-align: left;
  136. border-bottom: 1rpx solid #009FE8;
  137. line-height: 90rpx;
  138. font-size: 29rpx;
  139. font-family: PingFangSC-Regular, PingFang SC;
  140. font-weight: 400;
  141. color: #232627;
  142. }
  143. .list_item{
  144. .item{
  145. display: flex;
  146. justify-content: space-between;
  147. box-sizing: border-box;
  148. margin: 0 20rpx;
  149. border-bottom: 1rpx solid #f3f3f3;
  150. line-height: 70rpx;
  151. font-size: 29rpx;
  152. font-family: PingFangSC-Regular, PingFang SC;
  153. font-weight: 400;
  154. color: #232627;
  155. .name{
  156. }
  157. .right{
  158. display: flex;
  159. .num{
  160. }
  161. .icon{
  162. margin-left: 4rpx;
  163. }
  164. }
  165. }
  166. }
  167. }
  168. </style>