YNUtdPlatform/pages/YNEduApp/exam/examinationList.vue

175 lines
3.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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)">
<div class="item-title">
<div class="title">{{ item.time }}</div>
<div class="item-tip" v-if="index == 0">最新</div>
<div class="pass">{{ item.pass ? '' : '不及格' }}</div>
</div>
<div class="item-content">
<div class="item">
作答用时:
<span class="item-info">{{ item.answerTime }}</span>
</div>
<div class="item">
得分/总分:
<span class="item-info">{{ item.score }}/{{ item.totalScore }}</span>
</div>
<div class="item">
得分率:
<span class="item-info">{{ item.scoreRate }}</span>
</div>
</div>
</div>
<div class="all">已显示全部</div>
<!-- 底部按钮 -->
<div class="bottom-btn">
<div class="btn">
<u-button type="primary" size="small" shape="circle" text="重新考试" />
</div>
</div>
</div>
</view>
</template>
<script>
export default {
data() {
return {
list: [
{
id: 1,
// 时间
time: '2023年04月27日 14:23',
// 是否及格
pass: false,
// 作答用时
answerTime: '30分钟',
// 得分
score: 60,
// 总分
totalScore: 100,
// 得分率
scoreRate: '60%'
},
{
id: 2,
// 时间
time: '2023年04月27日 14:23',
// 是否及格
pass: true,
// 作答用时
answerTime: '30分钟',
// 得分
score: 60,
// 总分
totalScore: 100,
// 得分率
scoreRate: '60%'
}
]
}
},
methods: {
handleExamList(item) {
uni.navigateTo({
url: '/pages/YNEduApp/exam/examinationResultDetails'
})
}
}
}
</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;
.item-title {
margin-top: 10px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 16px;
font-weight: bold;
}
.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;
color: #f0514c;
}
}
.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 {
margin: 30px auto;
text-align: center;
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>