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.

263 lines
6.0 KiB

1 week ago
  1. <template>
  2. <view class="content">
  3. <up-navbar leftText=" " :leftIconColor="'#fff'" :safeAreaInsetTop="true" :autoBack="true" title="成绩单"
  4. :bgColor="'transparent'" :titleStyle="{color: '#fff'}" :fixed="false">
  5. </up-navbar>
  6. <view class="padding">
  7. <view class="useInfo flex">
  8. <view class="avatar">
  9. <image src="" mode=""></image>
  10. </view>
  11. <view class="rightBox">
  12. <view class="name">{{ phone }}</view>
  13. </view>
  14. </view>
  15. <view class="card">
  16. <view class="bigNum">
  17. <view class="num">{{ info.exampassRate || '--' }}%</view>
  18. <view class="lab">预测通过率</view>
  19. </view>
  20. <view class="huiBg">
  21. <view class="li">
  22. <view class="num">{{ info.accumulate || '--' }}</view>
  23. <view class="lab">累计考试次数</view>
  24. </view>
  25. <view class="li">
  26. <view class="num">{{ info.pass || '--' }}</view>
  27. <view class="lab">合格次数</view>
  28. </view>
  29. <view class="li">
  30. <view class="num">{{ info.score || '--' }}</view>
  31. <view class="lab">平均分数</view>
  32. </view>
  33. </view>
  34. <view class="btnBox">
  35. <oneBtn text="快速提升通过率" @oneBtnClick="$goPage('/pages/vip/vipEntry/vipEntry')"></oneBtn>
  36. </view>
  37. </view>
  38. <statistics tit="模拟考试成绩" :chartData="chartData" :listData="listData" key="1" :subject="usecarStore.carInfo.stepType"></statistics>
  39. <!-- <view class="card card2">
  40. <view class="chartTab">
  41. <view class="h3">模拟考试成绩</view>
  42. <view class="btn_row">
  43. <view class="btn" @click="changeChart(1)" :class="{bg: currentChart==1}">曲线</view>
  44. <view class="btn" @click="changeChart(2)" :class="{bg: currentChart==2}">明细</view>
  45. </view>
  46. </view>
  47. <view class="tip">近30次科目一模拟考试成绩</view>
  48. <view class="con" v-if="currentChart==1">
  49. 图表
  50. <view class="tips">按住可左右滑动查看更多成绩</view>
  51. </view>
  52. <view class="con" v-if="currentChart==2">
  53. <view class="tables">
  54. <view class="fristTab li">
  55. <view class="item">考试成绩</view>
  56. <view class="item">考试用时</view>
  57. <view class="item">考试时间</view>
  58. </view>
  59. <view class="li">
  60. <view class="item">90</view>
  61. <view class="item">10分30秒</view>
  62. <view class="item">2024-8-28</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view> -->
  67. </view>
  68. </view>
  69. </template>
  70. <script setup>
  71. import gaugeChart from '@/components/columnChart/gaugeChart.vue'
  72. import { ref } from 'vue'
  73. import nodata from '@/components/nodata/nodata.vue'
  74. import { examTranscript } from '@/config/api.js'
  75. import carStore from '@/store/modules/car.js'
  76. import statistics from '../myStudy/comp/statistics.vue'
  77. let usecarStore = carStore()
  78. const value = ref(false)
  79. const currentNav = ref(1)
  80. function changeNav(val) {
  81. currentNav.value = val
  82. }
  83. const currentChart = ref(1)
  84. function changeChart(num) {
  85. currentChart.value = num
  86. }
  87. let phone = uni.getStorageSync('loginInfo')?.phone
  88. const info = ref({})
  89. let chartData = ref({})
  90. let listData = ref([])
  91. async function examTranscriptFn() {
  92. const {data: res} = await examTranscript({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
  93. info.value = res
  94. console.log(res)
  95. if(!res.examRecord?.length) return
  96. listData.value = res.examRecord
  97. chartData.value = {
  98. categories: res.examRecord.map(item=>item.formatStartTime),
  99. series: [
  100. {
  101. name: "目标值",
  102. data: res.examRecord.map(item=>item.score)
  103. }
  104. ]
  105. }
  106. }
  107. examTranscriptFn()
  108. </script>
  109. <style lang="scss" scoped>
  110. .content {
  111. width: 100%;
  112. min-height: 100vh;
  113. padding: 0rpx 0rpx 30rpx 0rpx;
  114. background: url('../../../static/images/topbg.png') #F6F7FA no-repeat;
  115. background-size: 100% 410rpx;
  116. .useInfo {
  117. padding: 10rpx 0 0 0 ;
  118. .avatar {
  119. width: 140rpx;
  120. height: 140rpx;
  121. overflow: hidden;
  122. border-radius: 50%;
  123. background: url('../../../static/images/avatarbg.png') no-repeat;
  124. background-size: 100% 100%;
  125. image {
  126. display: block;
  127. width: 100%;
  128. height: 100%;
  129. }
  130. }
  131. .rightBox {
  132. flex: 1;
  133. width: 0;
  134. padding-left: 30rpx;
  135. .name {
  136. font-size: 36rpx;
  137. color: #FFFFFF;
  138. font-weight: 500;
  139. }
  140. }
  141. }
  142. .bigNum {
  143. padding: 20rpx 0 20rpx 0;
  144. text-align: center;
  145. .num {
  146. font-weight: bold;
  147. font-size: 72rpx;
  148. color: #3776FF;
  149. }
  150. .lab {
  151. font-weight: 400;
  152. font-size: 24rpx;
  153. color: #CCCCCC;
  154. }
  155. }
  156. .huiBg {
  157. width: 100%;
  158. height: 164rpx;
  159. display: flex;
  160. justify-content: space-between;
  161. align-items: center;
  162. text-align: center;
  163. padding-bottom: 30rpx ;
  164. .li {
  165. flex: 1;
  166. .num {
  167. font-family: DIN;
  168. font-weight: bold;
  169. font-size: 48rpx;
  170. }
  171. .lab {
  172. font-size: 24rpx;
  173. margin-top: 10rpx;
  174. color: #999999;
  175. }
  176. }
  177. }
  178. .card {
  179. background: #FFFFFF;
  180. border-radius: 20rpx;
  181. overflow: hidden;
  182. margin-top: 20rpx;
  183. padding: 30rpx;
  184. }
  185. .tables {
  186. width: 100%;
  187. .fristTab.li {
  188. background: #F4F4F4;
  189. border-radius: 8rpx 8rpx 0 0;
  190. .item {
  191. color: $themC;
  192. }
  193. }
  194. .li {
  195. height: 76rpx;
  196. line-height: 76rpx;
  197. border-bottom: 1rpx solid #F4F4F4;
  198. display: flex;
  199. .item {
  200. text-align: center;
  201. flex: 1;
  202. font-size: 28rpx;
  203. }
  204. }
  205. }
  206. .tip {
  207. font-size: 24rpx;
  208. color: #ccc;
  209. padding: 10rpx 0 30rpx;
  210. }
  211. .tips {
  212. width: 360rpx;
  213. height: 48rpx;
  214. background: #DCE7FF;
  215. border-radius: 24rpx;
  216. font-size: 24rpx;
  217. color: $themC;
  218. text-align: center;
  219. line-height: 48rpx;
  220. margin-top: 30rpx;
  221. }
  222. .chartTab {
  223. display: flex;
  224. justify-content: space-between;
  225. .btn_row {
  226. display: flex;
  227. width: 170rpx;
  228. height: 44rpx;
  229. border-radius: 8rpx;
  230. overflow: hidden;
  231. border: 1px solid $themC;
  232. .btn.bg {
  233. background: #3776FF;
  234. color: #fff;
  235. }
  236. .btn {
  237. color: $themC;
  238. text-align: center;
  239. font-size: 28rpx;
  240. flex: 1;
  241. }
  242. }
  243. }
  244. }
  245. </style>