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

189 lines
4.3 KiB

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