fleetMember.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="center">
  3. <view class="avatars flex">
  4. <view class="" v-for="(item,index) in formData.fleetMemberInfoList" class="avatars_item">
  5. <u-avatar :src="item.driverPortrait" size="64"></u-avatar>
  6. <view class="captain" v-if="item.captainFlag == 1">
  7. <image src="../../static/images/riders/captainSign.png" mode="" style="width: 35rpx;height: 35rpx;"></image>
  8. </view>
  9. <view class="avatars_name">{{item.driverNickname}}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. fleetId: "",
  19. formData: {}
  20. }
  21. },
  22. onShow() {
  23. },
  24. onLoad(options) {
  25. this.fleetId = options.id
  26. this.getList()
  27. },
  28. methods: {
  29. getList() {
  30. this.$request.baseRequest('get', '/fleetInfo/getFleetInfo', {
  31. id: this.fleetId
  32. }).then(res => {
  33. this.formData = res.data
  34. if(this.formData.fleetMemberInfoList > 0){
  35. uni.setNavigationBarTitle({
  36. title: '车队成员'+'('+this.formData.fleetMemberInfoList.length +'/500)'
  37. })
  38. }
  39. })
  40. .catch(res => {
  41. uni.$u.toast(res.message);
  42. });
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .center {
  49. padding: 40rpx;
  50. }
  51. .avatars {
  52. display: flex;
  53. flex-wrap: wrap;
  54. overflow: hidden;
  55. width: 100%;
  56. .captain{
  57. width: 44rpx;
  58. height: 44rpx;
  59. background: #FFD13F;
  60. border-radius: 23rpx;
  61. position: absolute;
  62. top: 90rpx;
  63. right: 5rpx;
  64. }
  65. .avatars_name{
  66. margin: 26rpx 0;
  67. overflow: hidden;
  68. height: 40rpx;
  69. text-overflow: ellipsis;
  70. white-space: nowrap;
  71. }
  72. .avatars_item {
  73. width: 20%;
  74. height: 200rpx;
  75. text-align: center;
  76. margin: 10rpx 16rpx 0;
  77. font-size: 28rpx;
  78. font-weight: 500;
  79. position: relative;
  80. }
  81. }
  82. </style>