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

204 lines
5.1 KiB

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