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.
|
|
<template> <view class="content"> <up-navbar leftText=" " :leftIconColor="'#fff'" :safeAreaInsetTop="true" :autoBack="true" title="成绩单" :bgColor="'transparent'" :titleStyle="{color: '#fff'}" :fixed="false"> </up-navbar> <view class="padding"> <view class="useInfo flex"> <view class="avatar"> <image src="" mode=""></image> </view> <view class="rightBox"> <view class="name">{{ phone }}</view> </view> </view>
<view class="card"> <view class="bigNum"> <view class="num">{{ info.exampassRate || '--' }}%</view> <view class="lab">预测通过率</view> </view> <view class="huiBg"> <view class="li"> <view class="num">{{ info.accumulate || '--' }}</view> <view class="lab">累计考试次数</view> </view> <view class="li"> <view class="num">{{ info.pass || '--' }}</view> <view class="lab">合格次数</view> </view> <view class="li"> <view class="num">{{ info.score || '--' }}</view> <view class="lab">平均分数</view> </view> </view> <view class="btnBox"> <oneBtn text="快速提升通过率" @oneBtnClick="$goPage('/pages/vip/vipEntry/vipEntry')"></oneBtn> </view> </view> <statistics tit="模拟考试成绩" :chartData="chartData" :listData="listData" key="1" :subject="usecarStore.carInfo.stepType"></statistics>
<!-- <view class="card card2"> <view class="chartTab"> <view class="h3">模拟考试成绩</view> <view class="btn_row"> <view class="btn" @click="changeChart(1)" :class="{bg: currentChart==1}">曲线</view> <view class="btn" @click="changeChart(2)" :class="{bg: currentChart==2}">明细</view> </view> </view> <view class="tip">近30次科目一模拟考试成绩</view> <view class="con" v-if="currentChart==1"> 图表 <view class="tips">按住可左右滑动查看更多成绩</view> </view> <view class="con" v-if="currentChart==2"> <view class="tables"> <view class="fristTab li"> <view class="item">考试成绩</view> <view class="item">考试用时</view> <view class="item">考试时间</view> </view> <view class="li"> <view class="item">90分</view> <view class="item">10分30秒</view> <view class="item">2024-8-28</view> </view> </view> </view> </view> -->
</view>
</view> </template>
<script setup> import gaugeChart from '@/components/columnChart/gaugeChart.vue' import { ref } from 'vue' import nodata from '@/components/nodata/nodata.vue' import { examTranscript } from '@/config/api.js' import carStore from '@/store/modules/car.js' import statistics from '../myStudy/comp/statistics.vue' let usecarStore = carStore() const value = ref(false) const currentNav = ref(1) function changeNav(val) { currentNav.value = val }
const currentChart = ref(1) function changeChart(num) { currentChart.value = num } let phone = uni.getStorageSync('loginInfo')?.phone const info = ref({}) let chartData = ref({}) let listData = ref([]) async function examTranscriptFn() { const {data: res} = await examTranscript({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType}) info.value = res console.log(res) if(!res.examRecord?.length) return listData.value = res.examRecord chartData.value = { categories: res.examRecord.map(item=>item.formatStartTime), series: [ { name: "目标值", data: res.examRecord.map(item=>item.score) } ] } } examTranscriptFn() </script>
<style lang="scss" scoped> .content { width: 100%; min-height: 100vh; padding: 0rpx 0rpx 30rpx 0rpx; background: url('../../../static/images/topbg.png') #F6F7FA no-repeat; background-size: 100% 410rpx;
.useInfo { padding: 10rpx 0 0 0 ;
.avatar { width: 140rpx; height: 140rpx; overflow: hidden; border-radius: 50%; background: url('../../../static/images/avatarbg.png') no-repeat; background-size: 100% 100%;
image { display: block; width: 100%; height: 100%; } }
.rightBox { flex: 1; width: 0; padding-left: 30rpx;
.name { font-size: 36rpx; color: #FFFFFF; font-weight: 500; } } } .bigNum { padding: 20rpx 0 20rpx 0; text-align: center; .num { font-weight: bold; font-size: 72rpx; color: #3776FF; } .lab { font-weight: 400; font-size: 24rpx; color: #CCCCCC; } } .huiBg { width: 100%; height: 164rpx; display: flex; justify-content: space-between; align-items: center; text-align: center; padding-bottom: 30rpx ; .li { flex: 1; .num { font-family: DIN; font-weight: bold; font-size: 48rpx; } .lab { font-size: 24rpx; margin-top: 10rpx; color: #999999; } } } .card { background: #FFFFFF; border-radius: 20rpx; overflow: hidden; margin-top: 20rpx; padding: 30rpx; } .tables { width: 100%; .fristTab.li { background: #F4F4F4; border-radius: 8rpx 8rpx 0 0; .item { color: $themC; } } .li { height: 76rpx; line-height: 76rpx; border-bottom: 1rpx solid #F4F4F4; display: flex; .item { text-align: center; flex: 1; font-size: 28rpx; } } } .tip { font-size: 24rpx; color: #ccc; padding: 10rpx 0 30rpx; } .tips { width: 360rpx; height: 48rpx; background: #DCE7FF; border-radius: 24rpx; font-size: 24rpx; color: $themC; text-align: center; line-height: 48rpx; margin-top: 30rpx; } .chartTab { display: flex; justify-content: space-between; .btn_row { display: flex; width: 170rpx; height: 44rpx; border-radius: 8rpx; overflow: hidden; border: 1px solid $themC; .btn.bg { background: #3776FF; color: #fff; } .btn { color: $themC; text-align: center; font-size: 28rpx; flex: 1; } } } } </style>
|