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

201 lines
4.8 KiB

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