p-i-o-s2-number.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view>
  3. <view class="inner_box">
  4. <view class="inner_title">
  5. <view class="name name_1">姓名</view>
  6. <view class="name name_2">部门</view>
  7. <view class="name name_3">下井时间</view>
  8. </view>
  9. <view class="list_item">
  10. <view class="item" v-for="(item,index) in peoples" :key="index">
  11. <view class="text text_1">{{item.name}}</view>
  12. <view class="text text_2">{{item.depart_name}}</view>
  13. <view class="text text_3">{{item.down_time}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. peoples:[]
  24. };
  25. },
  26. onLoad(options) {
  27. const station_id = console.log(options.station_id)
  28. this.getPeoples(options.station_id)
  29. uni.setNavigationBarTitle({
  30. title:options.station_name
  31. })
  32. },
  33. methods:{
  34. async getPeoples(station_id){
  35. const res = await this.$myRequest({
  36. method:"POST",
  37. url: '/personnel/mine/people',
  38. header: {
  39. 'Content-Type': 'application/json',
  40. },
  41. data:{
  42. station_id:station_id
  43. }
  44. })
  45. const data = res.data.data
  46. this.peoples = data
  47. console.log(this.peoples)
  48. },
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .inner_box{
  54. .inner_title{
  55. padding: 0 25rpx;
  56. height: 94rpx;
  57. background: #F3F6FA;
  58. display: flex;
  59. align-items: center;
  60. .name{
  61. font-size: 27rpx;
  62. font-family: PingFangSC-Regular, PingFang SC;
  63. font-weight: 400;
  64. color: #232627;
  65. text-align: center;
  66. }
  67. .name_1{
  68. width: 125rpx;
  69. }
  70. .name_2{
  71. margin: 0 15rpx;
  72. width: 420rpx;
  73. }
  74. .name_3{
  75. width: 125rpx;
  76. }
  77. }
  78. .list_item{
  79. .item{
  80. padding: 0 24rpx;
  81. display: flex;
  82. justify-content: space-between;
  83. align-items: center;
  84. border-bottom: 1px solid #f3f3f3;
  85. .text{
  86. font-size: 25rpx;
  87. font-family: PingFangSC-Regular, PingFang SC;
  88. font-weight: 400;
  89. line-height: 94rpx;
  90. text-align: center;
  91. }
  92. .text_1{
  93. width: 125rpx;
  94. }
  95. .text_2{
  96. margin: 0 15rpx;
  97. width: 420rpx;
  98. }
  99. .text_3{
  100. width: 125rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>