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

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