1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view class="center">
- <view class="avatars flex">
- <view class="" v-for="(item,index) in formData.fleetMemberInfoList" class="avatars_item">
- <u-avatar :src="item.driverPortrait" size="64"></u-avatar>
- <view class="captain" v-if="item.captainFlag == 1">
- <image src="../../static/images/riders/captainSign.png" mode="" style="width: 35rpx;height: 35rpx;"></image>
- </view>
- <view class="avatars_name">{{item.driverNickname}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- fleetId: "",
- formData: {}
- }
- },
- onShow() {
- },
- onLoad(options) {
- this.fleetId = options.id
- this.getList()
-
- },
- methods: {
- getList() {
- this.$request.baseRequest('get', '/fleetInfo/getFleetInfo', {
- id: this.fleetId
- }).then(res => {
- this.formData = res.data
- if(this.formData.fleetMemberInfoList > 0){
- uni.setNavigationBarTitle({
- title: '车队成员'+'('+this.formData.fleetMemberInfoList.length +'/500)'
- })
- }
-
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .center {
- padding: 40rpx;
- }
- .avatars {
- display: flex;
- flex-wrap: wrap;
- overflow: hidden;
- width: 100%;
- .captain{
- width: 44rpx;
- height: 44rpx;
- background: #FFD13F;
- border-radius: 23rpx;
- position: absolute;
- top: 90rpx;
- right: 5rpx;
- }
- .avatars_name{
- margin: 26rpx 0;
- overflow: hidden;
- height: 40rpx;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .avatars_item {
- width: 20%;
- height: 200rpx;
- text-align: center;
- margin: 10rpx 16rpx 0;
- font-size: 28rpx;
- font-weight: 500;
- position: relative;
-
- }
- }
- </style>
|