examTeamApp/pages/score/report.vue

168 lines
3.2 KiB
Vue

<template>
<view class="content">
<!-- 估分 -->
<view class="box">
<view class="title bold">本次估分成绩为</view>
<view class="charts">
<qiun-data-charts type="arcbar" :chartData="chartData" />
</view>
<view class="name">{{score}}</view>
<view class="time text_c">{{create_time}}</view>
</view>
<!-- -->
<view v-for="(item,index) in selectllist">
<view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
<view class="indexCarList">
<view class="card" v-for="(ite,ind) in item.list">
<view class="title">
<view class="name">{{ite.name}}</view>
</view>
<view class="item3" v-for="(it,id) in ite.list">
<view class="name">{{it.name}}</view>
<view class="weight">
<view class="input">{{it.value}}{{it.unit}}</view>
<view class="cblue bold" >{{it.proportion_value}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
export default {
data() {
return {
chartData: {
series: [{
name: "正确率",
color: "#4687F9",
data: 0
}]
},
score: 0,
create_time: "",
selectllist: []
}
},
components: {
qiunDataCharts
},
onLoad(options) {
let that = this
that.getList(options.id)
},
methods: {
getList(id) {
let that = this
that.$model.getSportshistorydetail({
id: Number(id),
}).then((res) => {
console.log("历史记录详情", res)
if (res.code != 0) return
that.selectllist = res.data.list
that.score = res.data.total_score
that.create_time = res.data.create_time
that.chartData.series[0].data = res.data.total_score / 50
})
},
}
}
</script>
<style scoped lang="scss">
.content {
min-height: 100vh;
padding-top: 15px;
padding-bottom: 15px;
background-color: #f7f7f7;
}
.box {
margin: 15px 10px 0;
padding: 15px 10px 10px;
background-color: #fff;
width: calc(100% - 40px);
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
border-radius: 10px;
position: relative;
.name {
position: absolute;
top: 42%;
margin: auto;
font-size: 35px;
color: #4687F9;
}
}
.indexCarList {
width: calc(100% - 40px);
margin: 10px;
padding: 5px 10px;
background-color: #fff;
border-radius: 10px;
.title {
color: #000;
background-color: #f5f5f5 !important;
border-bottom: 1px solid #d9d9d9;
padding-left: 10px;
border-radius: 5px;
height: 35px;
display: flex;
align-items: center;
width: calc(100% - 10px);
.name {
font-weight: bold;
margin-top: 3px;
}
.right {
width: 30%;
color: $textcolor;
font-size: 12px;
text-align: right;
margin-top: 5px;
margin-right: 10px;
}
}
.item3 {
display: flex;
background: #fff;
padding: 0 10px;
height: 50px;
border-bottom: 1px solid #f7f7f7;
.name {
width: 35%;
line-height: 50px;
}
.weight {
width: 65%;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
}
}
}
.charts {
width: 100%;
height: 130px;
margin: 10px 0;
}
</style>