洛阳学员端
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.

202 lines
4.8 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="topInfo card">
  3. <view class="user_row">
  4. <view class="avatar">
  5. <image :src="vuex_userInfo.photoPath" mode="aspectFill" v-if="vuex_userInfo.photoPath"></image>
  6. </view>
  7. <view class="rightTxt">
  8. <view style="display: flex;align-items: center;" @click="topClick">
  9. <view class="name">{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'点击跳转到登录 ' }}</view>
  10. <view class="arrowRight" >
  11. <u-icon name="arrow-right" color="#333" size="14" style="margin-top: 4rpx;"></u-icon>
  12. </view>
  13. </view>
  14. <view class="btn_row" @click="showType=true">
  15. <view class="txt">{{ carType.name }}</view>
  16. <u-icon name="arrow-down-fill" color="#fff" size="10"></u-icon>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="bg">
  21. <view class="row">
  22. <view class="timeItem">
  23. <view class="flex">
  24. <view class="time">{{dynamics.validTime||0}}</view>
  25. <view class="uni">分钟</view>
  26. </view>
  27. <view class="lab">已完成学时</view>
  28. </view>
  29. <view class="timeItem">
  30. <view class="flex">
  31. <view class="time">{{dynamics.classHour||0}}</view>
  32. <view class="uni">分钟</view>
  33. </view>
  34. <view class="lab">应完成学时</view>
  35. </view>
  36. </view>
  37. <!-- <view class="row" v-if="carType=='科目三'">
  38. <view class="timeItem">
  39. <view class="flex ">
  40. <view class="time">120</view>
  41. <view class="uni">km</view>
  42. </view>
  43. <view class="lab">已完里程</view>
  44. </view>
  45. <view class="timeItem">
  46. <view class="flex ">
  47. <view class="time ">120</view>
  48. <view class="uni">km</view>
  49. </view>
  50. <view class="lab">已完里程</view>
  51. </view>
  52. </view> -->
  53. </view>
  54. <!-- v-if="dynamics.classHourReachStatus" -->
  55. <view class="timerFlex" v-if="dynamics.classHourReachStatus">
  56. <view class="link-arrow" @click="$goPage('/pages/carEntry/signature/signature?subject='+carType.id)">
  57. <view class="txt">确认学时</view>
  58. <u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon>
  59. </view>
  60. </view>
  61. <u-picker :show="showType" :columns="typeArr" keyName="name" @confirm="confirmType" @cancel="showType=false"></u-picker>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. props: ['carType', 'dynamics'],
  67. data() {
  68. return {
  69. showType: false,
  70. typeArr: [
  71. [
  72. {name: '科目一', id: 1},
  73. {name: '科目二', id: 2},
  74. {name: '科目三', id: 3},
  75. {name: '科目四', id: 4},
  76. ]
  77. ],
  78. }
  79. },
  80. methods: {
  81. topClick() {
  82. if(!this.vuex_userInfo.phone) {
  83. this.$store.commit('goLogin')
  84. }else {
  85. this.$goPage('/pages/mineEntry/personaInfo/personaInfo')
  86. }
  87. },
  88. confirmType(val) {
  89. let item = val.value[0]
  90. // console.log(item)
  91. this.showType = false
  92. this.$emit('changeSubject', item)
  93. }
  94. }
  95. }
  96. </script>
  97. <style scoped lang="scss">
  98. .topInfo.card {
  99. padding: 0rpx 20rpx 20rpx 20rpx;
  100. .user_row {
  101. display: flex;
  102. .avatar {
  103. width: 120rpx;
  104. height: 120rpx;
  105. border-radius: 50%;
  106. overflow: hidden;
  107. background: url('../../../../static/images/mineIcon/avatar.png');
  108. background-size: 100% 100%;
  109. margin-top: -36rpx;
  110. }
  111. .rightTxt {
  112. display: flex;
  113. align-items: center;
  114. justify-content: space-between;
  115. flex: 1;
  116. width: 0;
  117. padding: 0 0 0 20rpx;
  118. .name {
  119. font-size: 28rpx;
  120. color: #333;
  121. }
  122. .btn_row {
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. background: $themC;
  127. width: 160rpx;
  128. height: 60rpx;
  129. color: #fff;
  130. border-radius: 10rpx;
  131. font-size: 24rpx;
  132. lighting-color: 50rpx;
  133. .txt {
  134. margin-right: 10rpx;
  135. }
  136. }
  137. }
  138. }
  139. .bg {
  140. background: #F6F7FA;
  141. border-radius: 20rpx;
  142. padding: 20rpx;
  143. margin-top: 30rpx;
  144. .row {
  145. border-top: 1rpx solid #EDEDED;
  146. display: flex;
  147. &:first-child {
  148. border: none;
  149. }
  150. .timeItem {
  151. border-left: 1px solid #EDEDED;
  152. flex: 1;
  153. align-items: center;
  154. justify-content: center;
  155. color: #999;
  156. font-size: 24rpx;
  157. padding: 20rpx 0;
  158. &:first-child {
  159. border: none;
  160. }
  161. .flex {
  162. justify-content: center;
  163. .time {
  164. font-size: 36rpx;
  165. color: #333;
  166. font-weight: 700;
  167. }
  168. .uni {
  169. margin-top: -6rpx;
  170. margin-left: 4rpx;
  171. }
  172. }
  173. .lab {
  174. text-align: center;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. .timerFlex {
  181. display: flex;
  182. justify-content: flex-end;
  183. padding: 20rpx 0 0 0;
  184. .link-arrow {
  185. display: flex;
  186. align-items: center;
  187. font-size: 28rpx;
  188. color: $themC;
  189. height: 50rpx;
  190. .txt {
  191. margin-right: 4rpx;
  192. }
  193. }
  194. }
  195. </style>