2025-02-14 09:08:47 +08:00
|
|
|
|
<template>
|
2025-02-18 10:53:50 +08:00
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="content__titletop">
|
2025-02-22 17:21:46 +08:00
|
|
|
|
<view class="content__title">试卷名称:{{info.examname}}</view>
|
|
|
|
|
<view class="content__subtitle">(满分: {{info.paperexamscore}}分)</view>
|
|
|
|
|
<view class="content__subtitle">(合格分: {{info.passscore}}分)</view>
|
2025-02-18 10:53:50 +08:00
|
|
|
|
</view>
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
<view class="content__info">
|
2025-02-22 17:21:46 +08:00
|
|
|
|
<view>姓名: {{info.username}}</view>
|
|
|
|
|
<view>分数: {{info.examscore}}分</view>
|
|
|
|
|
<view>考试时间: {{info.examtimeend}}</view>
|
2025-02-18 10:53:50 +08:00
|
|
|
|
</view>
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
<view class="content__sign">
|
|
|
|
|
<view style="margin-right: 10rpx">签字: </view>
|
2025-02-22 17:21:46 +08:00
|
|
|
|
<u-image width="120rpx" height="70rpx" model="widthFix" :src="$filePath + info.signaturePath" @click="previewImage" />
|
2025-02-18 10:53:50 +08:00
|
|
|
|
</view>
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
<view class="counter">
|
2025-02-21 18:08:09 +08:00
|
|
|
|
当前试题: <text style="color: orange">{{ current + 1 }}</text>/{{ questionList.length }}
|
2025-02-18 10:53:50 +08:00
|
|
|
|
</view>
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
<view class="topic">
|
|
|
|
|
<view class="title">
|
|
|
|
|
<text class="tag_title">
|
|
|
|
|
{{ handleCalcQuestType(questionList[current].questiontype) }}
|
|
|
|
|
</text>
|
|
|
|
|
{{ current + 1 }}.
|
|
|
|
|
<text>{{ questionList[current].questiondry }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="questionList[current].questiontype === '1'" class="options">
|
|
|
|
|
<view v-for="(item, index) in ['A', 'B', 'C', 'D']" :key="index" :class="['item', questionList[current].answer === item ? 'active' : '']">
|
|
|
|
|
<text class="option">{{ item }}</text>
|
|
|
|
|
<text class="text">
|
|
|
|
|
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="questionList[current].questiontype === '2'" class="options">
|
|
|
|
|
<view v-for="(item, index) in ['A', 'B', 'C', 'D']" :key="index" :class="['item', questionList[current].answer && questionList[current].answer.indexOf(item) !== -1 ? 'active' : '']">
|
|
|
|
|
<text class="option">{{ item }}</text>
|
|
|
|
|
<text class="text">
|
|
|
|
|
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
|
|
|
|
</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="questionList[current].questiontype === '3'" class="options">
|
|
|
|
|
<view v-for="(item, index) in ['A', 'B']" :key="index" :class="['item', questionList[current].answer === item ? 'active' : '']">
|
|
|
|
|
<text class="option">
|
|
|
|
|
{{ questionList[current]['option' + item.toLocaleLowerCase()] }}
|
|
|
|
|
</text>
|
|
|
|
|
<text class="text"></text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="correct-answer">
|
|
|
|
|
<text>正确答案</text>
|
|
|
|
|
<view v-if="questionList[current].questiontype === '3'">
|
|
|
|
|
{{ questionList[current].answerright === 'A' ? '对' : '错' }}
|
|
|
|
|
</view>
|
|
|
|
|
<view v-else>{{ questionList[current].answerright || '无' }}</view>
|
|
|
|
|
<text>权威解读</text>
|
|
|
|
|
<view>{{ questionList[current].descr || "无" }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="footer">
|
|
|
|
|
<block v-if="current !== 0">
|
|
|
|
|
<u-button
|
|
|
|
|
shape="circle"
|
|
|
|
|
:custom-style="{
|
|
|
|
|
width: current === questionList.length - 1 ? '100%' : '45%'
|
|
|
|
|
}"
|
|
|
|
|
text="上一题"
|
|
|
|
|
@click="current--"
|
|
|
|
|
/>
|
|
|
|
|
</block>
|
|
|
|
|
<block v-if="current !== questionList.length - 1">
|
|
|
|
|
<u-button
|
|
|
|
|
shape="circle"
|
|
|
|
|
type="primary"
|
|
|
|
|
:custom-style="{
|
|
|
|
|
width: current === 0 ? '100%' : '45%',
|
|
|
|
|
marginLeft: current === 0 ? '0' : '10%'
|
|
|
|
|
}"
|
|
|
|
|
text="下一题"
|
|
|
|
|
@click="current++"
|
|
|
|
|
/>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-14 09:08:47 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-02-21 18:08:09 +08:00
|
|
|
|
import { getTaskScoreInfo } from "@/api";
|
2025-02-19 18:13:40 +08:00
|
|
|
|
|
2025-02-14 09:08:47 +08:00
|
|
|
|
export default {
|
2025-02-18 10:53:50 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2025-02-22 17:21:46 +08:00
|
|
|
|
info:{},
|
2025-02-18 10:53:50 +08:00
|
|
|
|
questionList: [],
|
2025-02-19 18:13:40 +08:00
|
|
|
|
current: 0, // 新增当前激活的题目索引
|
2025-02-18 10:53:50 +08:00
|
|
|
|
questionTypeMap: {
|
|
|
|
|
1: '单选题',
|
|
|
|
|
2: '多选题',
|
|
|
|
|
3: '判断题',
|
|
|
|
|
4: '填空题',
|
|
|
|
|
5: '简答题'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-19 18:13:40 +08:00
|
|
|
|
onLoad(query) {
|
|
|
|
|
const { stagestudentrelationId, classId } = query
|
|
|
|
|
this.getData(stagestudentrelationId, classId)
|
2025-02-18 10:53:50 +08:00
|
|
|
|
},
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
mounted() {},
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
methods: {
|
2025-02-19 18:13:40 +08:00
|
|
|
|
async getData(stagestudentrelationId, classId) {
|
2025-02-22 17:21:46 +08:00
|
|
|
|
const resData = await getTaskScoreInfo({
|
|
|
|
|
stagestudentrelationId,
|
|
|
|
|
classId
|
|
|
|
|
})
|
|
|
|
|
this.questionList = resData.pd.questionList
|
|
|
|
|
this.info = resData.pd
|
2025-02-18 10:53:50 +08:00
|
|
|
|
},
|
|
|
|
|
handleCalcQuestType(type) {
|
|
|
|
|
return `(${this.questionTypeMap[type]})`
|
2025-02-22 17:21:46 +08:00
|
|
|
|
},
|
|
|
|
|
previewImage(){
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
urls: [this.$filePath + this.info.signaturePath],
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-02-18 10:53:50 +08:00
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.content {
|
2025-02-18 10:53:50 +08:00
|
|
|
|
padding: 16rpx;
|
|
|
|
|
|
|
|
|
|
.content__titletop {
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
.content__title {
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content__subtitle {
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content__info {
|
|
|
|
|
font-size: 34rpx;
|
2025-02-22 17:21:46 +08:00
|
|
|
|
view{
|
|
|
|
|
margin-top: 18rpx;
|
|
|
|
|
}
|
2025-02-18 10:53:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content__sign {
|
|
|
|
|
margin-top: 18rpx;
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.counter {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
margin: 15rpx 0;
|
|
|
|
|
text-align: end;
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.topic {
|
|
|
|
|
box-sizing: border-box;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.tag_title {
|
|
|
|
|
font-size: 28rpx;
|
2025-02-22 17:21:46 +08:00
|
|
|
|
background-color: #fff;
|
2025-02-18 10:53:50 +08:00
|
|
|
|
color: #5ac725;
|
|
|
|
|
border-radius: 8rpx;
|
|
|
|
|
padding: 2rpx 8rpx;
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.title {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 600;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.question-type {
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
padding: 4rpx 14rpx;
|
|
|
|
|
border: 1rpx solid #3c9cff;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #3c9cff;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.options {
|
|
|
|
|
margin-top: 40rpx;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.item {
|
|
|
|
|
position: relative;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
color: #696868;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
&.active {
|
|
|
|
|
color: #3c9cff;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.option {
|
|
|
|
|
background-color: #3c9cff;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.option {
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
border-radius: 80rpx;
|
|
|
|
|
width: 65rpx;
|
|
|
|
|
height: 65rpx;
|
|
|
|
|
line-height: 65rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.text {
|
|
|
|
|
margin-left: 30rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
line-height: 60rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.correct-answer {
|
|
|
|
|
margin-top: 40rpx;
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
text {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
color: #696868;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
view {
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
color: #333;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
|
2025-02-18 10:53:50 +08:00
|
|
|
|
.footer {
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
left: 0;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
background: #fff;
|
|
|
|
|
text-align: center;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
2025-02-14 09:08:47 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|