2024-08-14 18:55:18 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
<div class="tip">*随机抽题下每道分数根据管理员的设置可能不同,最高分以得分率计算(得分率=得分/总分*100%)</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="list-item" v-for="(item, index) in list" :key="index" @click="handleExamList(item)">
|
2024-08-23 16:00:43 +08:00
|
|
|
|
<div class="title">{{ item.name }}</div>
|
2024-08-14 18:55:18 +08:00
|
|
|
|
<div class="item-title">
|
2024-08-23 16:00:43 +08:00
|
|
|
|
<div class="item-time">{{ item.endTime }}</div>
|
2024-08-14 18:55:18 +08:00
|
|
|
|
<div class="item-tip" v-if="index == 0">最新</div>
|
2024-08-23 16:00:43 +08:00
|
|
|
|
<div class="pass" :class="{ 'un-pass': item.isPass == '不通过' }">{{ item.isPass }}</div>
|
2024-08-14 18:55:18 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="item-content">
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
作答用时:
|
|
|
|
|
|
<span class="item-info">{{ item.answerTime }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
得分/总分:
|
2024-09-03 16:07:30 +08:00
|
|
|
|
<span class="item-info">{{ item.examGrade }}/{{ item.score }}</span>
|
2024-08-14 18:55:18 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="item">
|
|
|
|
|
|
得分率:
|
2024-08-23 16:00:43 +08:00
|
|
|
|
<span class="item-info">{{ item.gradeAverage }}</span>
|
2024-08-14 18:55:18 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="all">已显示全部</div>
|
|
|
|
|
|
<!-- 底部按钮 -->
|
2024-08-23 16:00:43 +08:00
|
|
|
|
<!-- <div class="bottom-btn">
|
2024-08-14 18:55:18 +08:00
|
|
|
|
<div class="btn">
|
|
|
|
|
|
<u-button type="primary" size="small" shape="circle" text="重新考试" />
|
|
|
|
|
|
</div>
|
2024-08-23 16:00:43 +08:00
|
|
|
|
</div> -->
|
2024-08-14 18:55:18 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-08-23 16:00:43 +08:00
|
|
|
|
import { getExamRecordById } from '@/api/eduApp'
|
2024-08-28 09:51:05 +08:00
|
|
|
|
import config from '@/config'
|
2024-08-23 16:00:43 +08:00
|
|
|
|
|
2024-08-14 18:55:18 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-08-23 16:00:43 +08:00
|
|
|
|
examId: '', // 考试id
|
2024-08-28 09:51:05 +08:00
|
|
|
|
list: []
|
2024-08-14 18:55:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-08-23 16:00:43 +08:00
|
|
|
|
onLoad(opt) {
|
|
|
|
|
|
opt = JSON.parse(opt.params)
|
|
|
|
|
|
this.examId = opt.examId
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
},
|
2024-08-14 18:55:18 +08:00
|
|
|
|
methods: {
|
2024-08-23 16:00:43 +08:00
|
|
|
|
// 获取列表
|
|
|
|
|
|
async getList() {
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
examId: this.examId,
|
2024-08-26 21:46:08 +08:00
|
|
|
|
userId: uni.getStorageSync('userId'),
|
2024-08-23 16:00:43 +08:00
|
|
|
|
page: 1,
|
|
|
|
|
|
limit: 999
|
|
|
|
|
|
}
|
2024-08-28 09:51:05 +08:00
|
|
|
|
// const res = await getExamRecordById(params)
|
|
|
|
|
|
// console.log('🚀 ~ getList ~ res:', res)
|
|
|
|
|
|
// this.list = res.data
|
2024-09-06 14:53:49 +08:00
|
|
|
|
this.$verificationToken()
|
2024-08-28 09:51:05 +08:00
|
|
|
|
uni.request({
|
|
|
|
|
|
url: config.baseUrl + '/exam-student/studentExam/getExamRecordById',
|
|
|
|
|
|
method: 'get',
|
|
|
|
|
|
data: params,
|
|
|
|
|
|
header: {
|
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
|
|
Authorization: uni.getStorageSync('access_token')
|
|
|
|
|
|
},
|
|
|
|
|
|
success: res => {
|
|
|
|
|
|
console.log('🚀 ~ getList ~ res:', res)
|
|
|
|
|
|
res = res.data
|
|
|
|
|
|
this.list = res.data
|
|
|
|
|
|
},
|
|
|
|
|
|
fail: err => {
|
|
|
|
|
|
console.log(err)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2024-08-23 16:00:43 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 处理考试列表
|
|
|
|
|
|
handleExamList(item) {
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
examId: this.examId,
|
|
|
|
|
|
recordId: item.id
|
|
|
|
|
|
}
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: '/pages/YNEduApp/exam/examinationResultDetails?params=' + JSON.stringify(params)
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-08-14 18:55:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.content {
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
.tip {
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
color: #8a8a8a;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.list-item {
|
|
|
|
|
|
width: calc(100% - 20px);
|
|
|
|
|
|
height: 142px;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
box-shadow: 0px 3px 5px 0px rgba(231, 231, 231, 0.5);
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
|
2024-08-23 16:00:43 +08:00
|
|
|
|
.title {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-14 18:55:18 +08:00
|
|
|
|
.item-title {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
2024-08-23 16:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
.item-time {
|
|
|
|
|
|
font-size: 14px;
|
2024-08-14 18:55:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
.item-tip {
|
|
|
|
|
|
width: 40px;
|
|
|
|
|
|
height: 23px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
background: #1989fa;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.pass {
|
|
|
|
|
|
font-size: 12px;
|
2024-08-23 16:00:43 +08:00
|
|
|
|
color: #67c23a;
|
|
|
|
|
|
&.un-pass {
|
|
|
|
|
|
color: #f0514c;
|
|
|
|
|
|
}
|
2024-08-14 18:55:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.item-content {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #8a8a8a;
|
|
|
|
|
|
|
|
|
|
|
|
.item {
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
.item-info {
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.all {
|
2024-08-23 16:00:43 +08:00
|
|
|
|
margin: 40px auto;
|
|
|
|
|
|
text-align: center;
|
2024-08-14 18:55:18 +08:00
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: #8a8a8a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.bottom-btn {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|