洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

205 lines
5.1 KiB

<template>
<view class="topInfo card">
<view class="user_row">
<view class="avatar">
<image :src="vuex_userInfo.photoPath" mode="aspectFill" v-if="vuex_userInfo.photoPath"></image>
<!-- <image src="https://lyjp-bucket-main.oss-cn-beijing.aliyuncs.com/985114ca01ff35554333927a5d1d52883d3ad21301caac4b637df56169b2c916.png" mode="aspectFill" v-if="vuex_userInfo.photoPath"></image> -->
</view>
<view class="rightTxt">
<view style="display: flex;align-items: center;" @click="topClick">
<view class="name">{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'点击跳转到登录 ' }}</view>
<view class="arrowRight" >
<u-icon name="arrow-right" color="#333" size="14" style="margin-top: 4rpx;"></u-icon>
</view>
</view>
<view class="btn_row" @click="showType=true">
<view class="txt">{{ carType.name }}</view>
<u-icon name="arrow-down-fill" color="#fff" size="10"></u-icon>
</view>
</view>
</view>
<view class="bg">
<view class="row">
<view class="timeItem">
<view class="flex">
<view class="time">{{dynamics.validTime||0}}</view>
<view class="uni">分钟</view>
</view>
<view class="lab">已完成学时</view>
</view>
<view class="timeItem">
<view class="flex">
<view class="time">{{dynamics.classHour||0}}</view>
<view class="uni">分钟</view>
</view>
<view class="lab">应完成学时</view>
</view>
</view>
<!-- <view class="row" v-if="carType=='科目三'">
<view class="timeItem">
<view class="flex ">
<view class="time">120</view>
<view class="uni">km</view>
</view>
<view class="lab">已完里程</view>
</view>
<view class="timeItem">
<view class="flex ">
<view class="time ">120</view>
<view class="uni">km</view>
</view>
<view class="lab">已完里程</view>
</view>
</view> -->
</view>
<!-- v-if="dynamics.classHourReachStatus" -->
<view class="timerFlex" v-if="dynamics.classHourReachStatus&&dynamics.confirmStatus">
<view class="link-arrow" @click="$goPage('/pages/carEntry/signature/signature?subject='+carType.id)">
<view class="txt">确认学时</view>
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon>
</view>
</view>
<u-picker :show="showType" :columns="typeArr" keyName="name" @confirm="confirmType" @cancel="showType=false"></u-picker>
</view>
</template>
<script>
export default {
props: ['carType', 'dynamics'],
data() {
return {
showType: false,
typeArr: [
[
{name: '科目一', id: 1},
{name: '科目二', id: 2},
{name: '科目三', id: 3},
{name: '科目四', id: 4},
]
],
}
},
methods: {
topClick() {
if(!this.vuex_userInfo.phone) {
this.$store.commit('goLogin')
}else {
this.$goPage('/pages/mineEntry/personaInfo/personaInfo')
}
},
confirmType(val) {
let item = val.value[0]
// console.log(item)
this.showType = false
this.$emit('changeSubject', item)
}
}
}
</script>
<style scoped lang="scss">
.topInfo.card {
padding: 0rpx 20rpx 20rpx 20rpx;
.user_row {
display: flex;
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
background: url('../../../../static/images/mineIcon/avatar.png');
background-size: 100% 100%;
margin-top: -36rpx;
}
.rightTxt {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
width: 0;
padding: 0 0 0 20rpx;
.name {
font-size: 28rpx;
color: #333;
}
.btn_row {
display: flex;
align-items: center;
justify-content: center;
background: $themC;
width: 160rpx;
height: 60rpx;
color: #fff;
border-radius: 10rpx;
font-size: 24rpx;
lighting-color: 50rpx;
.txt {
margin-right: 10rpx;
}
}
}
}
.bg {
background: #F6F7FA;
border-radius: 20rpx;
padding: 20rpx;
margin-top: 30rpx;
.row {
border-top: 1rpx solid #EDEDED;
display: flex;
&:first-child {
border: none;
}
.timeItem {
border-left: 1px solid #EDEDED;
flex: 1;
align-items: center;
justify-content: center;
color: #999;
font-size: 24rpx;
padding: 20rpx 0;
&:first-child {
border: none;
}
.flex {
justify-content: center;
.time {
font-size: 36rpx;
color: #333;
font-weight: 700;
}
.uni {
margin-top: -6rpx;
margin-left: 4rpx;
}
}
.lab {
text-align: center;
}
}
}
}
}
.timerFlex {
display: flex;
justify-content: flex-end;
padding: 20rpx 0 0 0;
.link-arrow {
display: flex;
align-items: center;
font-size: 28rpx;
color: $themC;
height: 50rpx;
.txt {
margin-right: 4rpx;
}
}
}
</style>