Commit d636ab64 authored by zhengke's avatar zhengke

修改

parent 95dc6497
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -47,31 +47,35 @@
item1.Answer
}}</view>
</template>
</view>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -162,6 +166,14 @@ export default {
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -182,6 +194,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -226,7 +262,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -17,7 +17,7 @@
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -69,13 +69,17 @@
</view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate&&item1.AnswerParse" style="margin-top:20px;">
<view style="margin-top: 20rpx; word-wrap: break-word">
<text style="color: #8c8a94">解析:</text>
<text style="color: #000">{{ item1.AnswerParse }}</text>
<view class="AnswerContent" v-if="!isOperate&&item1.AnswerParse" style="margin-top:20px;">
<view style="word-wrap: break-word;display: flex;align-items: center;" >
<text style="color: #8c8a94">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -174,6 +178,14 @@
}
});
});
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
......@@ -195,6 +207,31 @@
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -265,6 +302,7 @@
.item1 {
align-items: center;
overflow: auto;
}
.item2 {
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -51,36 +51,40 @@
<view class="viewAnswerContent" v-html="item2.Content"></view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -169,6 +173,14 @@ export default {
});
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -189,6 +201,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -255,6 +291,7 @@ export default {
.item1 {
align-items: center;
overflow-y: auto;
}
.item2 {
......@@ -276,7 +313,7 @@ export default {
}
.chooseName {
font-size: 28rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -51,36 +51,40 @@
<view class="viewAnswerContent" v-html="item2.Content"></view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word;" class="flex" v-if="item1.AnswerParse">
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word;" class="flex" v-if="item1.AnswerParse">
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -174,6 +178,14 @@ export default {
});
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -194,6 +206,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -236,7 +272,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......@@ -258,6 +294,7 @@ export default {
.item1 {
align-items: center;
overflow-y: auto;
}
.item2 {
......
......@@ -20,7 +20,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -47,36 +47,40 @@
<view class="viewAnswerContent" v-html="item2.Content"></view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:25rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<view
v-for="(cItem, cIndex) in item1.AnswerList"
class="flex"
style="margin-top: 20rpx"
>
<view class="chooseNum">{{ cIndex + 1 }}</view>
<view class="viewAnswerContent">
{{ cItem == "" ? "未作答" : cItem }}
</view>
</view>
</template>
</view>
<view style="margin:25rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -162,6 +166,14 @@ export default {
return e.Content != "" && e.Content;
});
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -181,6 +193,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -243,6 +279,7 @@ export default {
.item1 {
align-items: center;
overflow: auto;
}
.item2 {
......
<template>
<!-- 听力题 -->
<view class="listen">
<view class="item" style="padding: 0 20px">
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text class="Exam_Score">(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text>
</view>
<view class="ExamIndex_Box">
<text class="Single_Before">{{ ExamIndex }}</text
>/<text class="Exam_Total">{{ data.DetailsList.length }}</text>
</view>
</view>
<swiper
class="swiper-box"
:style="{
<!-- 听力题 -->
<view class="listen">
<view class="item" style="padding: 0 20px">
<view class="name">
<view>
{{ changeNumToHan(sortIndex) }}{{ data.GroupName }}
<text class="Exam_Score">(共{{ data.DetailsList.length }}道,{{ data.GScore }}分)</text>
</view>
<view class="ExamIndex_Box">
<text class="Single_Before">{{ ExamIndex }}</text>/<text
class="Exam_Total">{{ data.DetailsList.length }}</text>
</view>
</view>
<swiper class="swiper-box" :style="{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}"
:autoplay="autoplay"
:current="current"
@change="onchange"
:skip-hidden-item-layout="true"
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="flex flex_start_center">
<audio style="text-align: left" poster="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7fbf26a0-4f4a-11eb-b680-7980c8a877b8.png" :src="item1.Src" name="日语听力" :action="audioAction" controls></audio>
<!-- <view
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="flex flex_start_center">
<audio style="text-align: left"
poster="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7fbf26a0-4f4a-11eb-b680-7980c8a877b8.png"
:src="item1.Src" name="日语听力" :action="audioAction" controls></audio>
<!-- <view
class="audioBox flex flex_center_center"
@click="audioManage(item1.Src)"
>
......@@ -44,567 +39,531 @@
format="mm:ss"
/>
</view> -->
</view>
<view
class="questionView"
:style="{
height: `calc(100vh - 334rpx - ${statusBarHeight}px)`,
}"
>
<view
v-for="(item2, index2) in item1.QuestionContentObj"
:key="index2"
class="item2"
>
<view class="flex questionTitle">
<view
>{{ index2 + 1 }}、({{
</view>
<view class="questionView" :style="{
height: `calc(100vh - 549rpx)`,
}">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2" class="item2">
<view class="flex questionTitle">
<view>{{ index2 + 1 }}、({{
item2.QuestionName.slice(0, 2)
}})</view
>
<view v-html="item2.SubTitle"></view>
<text class=".Exam_Score">{{item1.Score}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view
class="flex flex_start_center item3"
v-if="
}})</view>
<view v-html="item2.SubTitle"></view>
<text class=".Exam_Score">{{item1.Score}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view class="flex flex_start_center item3" v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
"
>
<template v-if="isOperate">
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)"
>{{ item3.Name }}
</view>
<view
class="chooseName"
@click="singerChange(item2, item3)"
v-html="item3.Content"
></view>
</template>
<template v-else>
<view
class="chooseNum"
:class="{ isTrueAnswer: item3.IsAnswer }"
>
{{ item3.Name }}
</view>
<view
class="chooseName"
:class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"
></view>
</template>
</view>
<!-- 多选 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'multiple'"
>
<template v-if="isOperate">
<view
class="chooseNum"
:class="{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)"
>{{ item3.Name }}
</view>
<view
class="chooseName"
@click="multipleChange(item2, item3)"
v-html="item3.Content"
></view>
</template>
<template v-else>
<view
class="chooseNum"
:class="{ isTrueAnswer: item3.IsAnswer }"
>
{{ item3.Name }}
</view>
<view
class="chooseName"
:class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"
></view>
</template>
</view>
<!-- 填空 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'fill-in'"
>
<view class="chooseNum">{{ index3 + 1 }} </view>
<template v-if="isOperate">
<input
v-for="cItem in item2.SubAnwser"
type="text"
v-model="cItem.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
</template>
<template v-else>
<view
v-for="cItem in item2.SubAnwser"
class="viewAnswerContent"
v-html="cItem.Content"
></view>
</template>
</view>
<!-- 简答 -->
<view
class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'"
>
<template v-if="isOperate">
<textarea
type="text"
v-for="cItem in item2.SubAnwser"
v-model="cItem.Content"
class="chooseName chooseName2"
placeholder="请填写答案"
@input="AnswerChange(item2)"
/>
</template>
<template v-else>
<view
v-for="cItem in item2.SubAnwser"
class="viewAnswerContent"
v-html="cItem.Content"
></view>
</template>
</view>
</view>
<template
v-if="!isOperate"
>
<view class="AnswerContent">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{
">
<template v-if="isOperate">
<view class="chooseNum" :class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)">{{ item3.Name }}
</view>
<view class="chooseName" @click="singerChange(item2, item3)"
v-html="item3.Content"></view>
</template>
<template v-else>
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"></view>
</template>
</view>
<!-- 多选 -->
<view class="flex flex_start_center item3" v-if="item2.QuestionKey === 'multiple'">
<template v-if="isOperate">
<view class="chooseNum" :class="{ myAnswer: item3.IsAnswer }"
@click="multipleChange(item2, item3)">{{ item3.Name }}
</view>
<view class="chooseName" @click="multipleChange(item2, item3)"
v-html="item3.Content"></view>
</template>
<template v-else>
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
<view class="chooseName" :class="{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content"></view>
</template>
</view>
<!-- 填空 -->
<view class="flex flex_start_center item3" v-if="item2.QuestionKey === 'fill-in'">
<view class="chooseNum">{{ index3 + 1 }} </view>
<template v-if="isOperate">
<input v-for="cItem in item2.SubAnwser" type="text" v-model="cItem.Content"
class="chooseName chooseName2" placeholder="请填写答案"
@input="AnswerChange(item2)" />
</template>
<template v-else>
<view v-for="cItem in item2.SubAnwser" class="viewAnswerContent"
v-html="cItem.Content"></view>
</template>
</view>
<!-- 简答 -->
<view class="flex flex_start_center item3"
v-if="item2.QuestionKey === 'short-answer'">
<template v-if="isOperate">
<textarea type="text" v-for="cItem in item2.SubAnwser"
v-model="cItem.Content" class="chooseName chooseName2"
placeholder="请填写答案" @input="AnswerChange(item2)" />
</template>
<template v-else>
<view v-for="cItem in item2.SubAnwser" class="viewAnswerContent"
v-html="cItem.Content"></view>
</template>
</view>
</view>
<template v-if="!isOperate">
<view class="AnswerContent">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{
item1.QuestionAnswerList[index2].SubAnswer
}}</text
>
<text>
您的答案:
<template
v-if="item1.AnswerList && item1.AnswerList.length > 0"
>
<text
v-if="
}}</text>
<text>
您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length > 0">
<text v-if="
item1.QuestionAnswerList[index2].SubAnswer ==
item1.AnswerList[index2].SubAnswer
"
class="isTrueAnswer"
>
{{ item1.AnswerList[index2].SubAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">
<template
v-if="item1.AnswerList[index2].SubAnswer != ''"
>
{{ item1.AnswerList[index2].SubAnswer }},回答错误
</template>
<template v-else> 未回答 </template>
</text>
</template>
</text>
</view>
<view
style="margin-top: 20rpx"
v-if="item1.AnswerList[index2].StudentScore!=''||item1.AnswerList[index2].StudentScore===0"
>
<text style="color: #8c8a94">您的得分:</text>
<text
class="isTrueAnswer"
v-if="item1.AnswerList[index2].StudentScore > 0"
>{{ item1.AnswerList[index2].StudentScore }}</text
>
<text class="isNotAnswer" v-else>{{
" class="isTrueAnswer">
{{ item1.AnswerList[index2].SubAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">
<template v-if="item1.AnswerList[index2].SubAnswer != ''">
{{ item1.AnswerList[index2].SubAnswer }},回答错误
</template>
<template v-else> 未回答 </template>
</text>
</template>
</text>
</view>
<view style="margin-top: 20rpx"
v-if="item1.AnswerList[index2].StudentScore!=''||item1.AnswerList[index2].StudentScore===0">
<text style="color: #8c8a94">您的得分:</text>
<text class="isTrueAnswer"
v-if="item1.AnswerList[index2].StudentScore > 0">{{ item1.AnswerList[index2].StudentScore }}</text>
<text class="isNotAnswer" v-else>{{
item1.AnswerList[index2].StudentScore
}}</text>
</view>
</view>
</template>
</view>
</view>
</view>
<view
class="AnswerContent"
v-if="
!isOperate &&
item1.AnswerParse
"
>
<view style="word-wrap: break-word">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
</view>
</view>
</template>
</view>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate && item1.AnswerParse">
<view style="word-wrap: break-word">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
onUnmounted,
} from "vue";
import { changeNumToHan } from "../../utils/index";
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: Number,
isLast: Boolean,
startIndex: Number,
isOperate: Boolean,
ExamStatus: Number,
},
setup(props, context) {
let { refs } = getCurrentInstance();
console.log(163, refs);
let data = reactive({
autoplay: false,
sortIndex: props.sort + 1, //大题序号
sortTotal: props.sortTotal, //总共多少道大题
data: props.paperData,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
audioTime: 999,
isPlay: true,
statusBarHeight: 0,
isOperate: props.isOperate,
ExamStatus: props.ExamStatus,
audioAction: {
method: 'pause'
}
});
data.data.DetailsList.map((item) => {
let arr = item.Title.split(" "); //按空格分段
arr.map((e) => {
if (e.indexOf("src") != -1) {
item.Src = decodeURIComponent(e.split("url=")[1].slice(0, -1));
}
});
item.QuestionContentObj.map((_item) => {
if (_item.QuestionKey === "multiple") {
_item.myAnswer = [];
} else {
_item.myAnswer = "";
}
});
});
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
}
watch(data.data, (newVal, oldVal) => {
if (newVal) {
context.emit("answerChange", newVal);
}
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//获取总时长
getTotalTime(url){
innerAudioContext.src = url;
var Inner = '';
innerAudioContext.onCanplay(() => {
innerAudioContext.duration;
let t = innerAudioContext.duration;
let Time = t
var second = parseInt(Time)
var hours = Math.floor(second / 3600)
second = second - hours * 3600
var mimute = Math.floor(second / 60)
second = second - mimute * 60
// let aa = hours + ':' + ('0' + mimute).slice(-2) + ':' + ('0' + second).slice(-2);
let TotalTime = ('0' + mimute).slice(-2) + ':' + ('0' + second).slice(-2);
return TotalTime
})
},
audioManage(url) {
innerAudioContext.src = url;
innerAudioContext.onCanplay(() => {
// 必须。可以当做是初始化时长
innerAudioContext.duration;
// 必须。不然也获取不到时长
setTimeout(() => {
let t = innerAudioContext.duration;
data.audioTime = t * 1000;
}, 100);
});
if (innerAudioContext.currentTime === innerAudioContext.duration) {
data.isPlay = true;
}
if (data.isPlay) {
innerAudioContext.play();
// refs.listenCountdown.start();
console.log("开始播放");
data.isPlay = false;
} else {
innerAudioContext.stop();
console.log("停了");
data.isPlay = true;
}
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
onUnmounted,
} from "vue";
import {
changeNumToHan
} from "../../utils/index";
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
export default {
props: {
paperData: Object,
sort: Number,
sortTotal: Number,
isLast: Boolean,
startIndex: Number,
isOperate: Boolean,
ExamStatus: Number,
},
setup(props, context) {
let {
refs
} = getCurrentInstance();
console.log(163, refs);
let data = reactive({
autoplay: false,
sortIndex: props.sort + 1, //大题序号
sortTotal: props.sortTotal, //总共多少道大题
data: props.paperData,
current: 1, //默认从第几个开始-用于从快捷菜单点入
ExamIndex: 1, //第几题
audioTime: 999,
isPlay: true,
statusBarHeight: 0,
isOperate: props.isOperate,
ExamStatus: props.ExamStatus,
audioAction: {
method: 'pause'
}
});
data.data.DetailsList.map((item) => {
let arr = item.Title.split(" "); //按空格分段
arr.map((e) => {
if (e.indexOf("src") != -1) {
item.Src = decodeURIComponent(e.split("url=")[1].slice(0, -1));
}
});
item.QuestionContentObj.map((_item) => {
if (_item.QuestionKey === "multiple") {
_item.myAnswer = [];
} else {
_item.myAnswer = "";
}
});
});
//判断是否是第一大题
if (data.sortIndex === 1) {
data.current = 0;
//从答题卡进入
if (props.startIndex) {
data.current = props.startIndex - 1;
data.ExamIndex = props.startIndex;
}
} else {
if (props.startIndex) {
data.current = props.startIndex;
data.ExamIndex = props.startIndex;
}
}
watch(data.data, (newVal, oldVal) => {
if (newVal) {
context.emit("answerChange", newVal);
}
});
let methods = {
changeNumToHan,
jumpPage() {
uni.navigateTo({
url: "/pages/exam/examPaper",
});
},
back() {
uni.navigateBack();
},
//获取总时长
getTotalTime(url) {
innerAudioContext.src = url;
var Inner = '';
innerAudioContext.onCanplay(() => {
innerAudioContext.duration;
let t = innerAudioContext.duration;
let Time = t
var second = parseInt(Time)
var hours = Math.floor(second / 3600)
second = second - hours * 3600
var mimute = Math.floor(second / 60)
second = second - mimute * 60
// let aa = hours + ':' + ('0' + mimute).slice(-2) + ':' + ('0' + second).slice(-2);
let TotalTime = ('0' + mimute).slice(-2) + ':' + ('0' + second).slice(-2);
return TotalTime
})
},
audioManage(url) {
innerAudioContext.src = url;
innerAudioContext.onCanplay(() => {
// 必须。可以当做是初始化时长
innerAudioContext.duration;
// 必须。不然也获取不到时长
setTimeout(() => {
let t = innerAudioContext.duration;
data.audioTime = t * 1000;
}, 100);
});
if (innerAudioContext.currentTime === innerAudioContext.duration) {
data.isPlay = true;
}
if (data.isPlay) {
innerAudioContext.play();
// refs.listenCountdown.start();
console.log("开始播放");
data.isPlay = false;
} else {
innerAudioContext.stop();
console.log("停了");
data.isPlay = true;
}
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange(item2, item3) {
item2.SubAnwser.map((e) => {
if (e.Name == item3.Name) {
e.IsAnswer = true;
item2.IsRes = true; //答题标记
} else {
e.IsAnswer = false;
}
});
},
// 多选
multipleChange(item2, item3) {
item3.IsAnswer = !item3.IsAnswer;
//标记已回答
item2.IsRes = item2.SubAnwser.some((e) => {
return e.IsAnswer;
});
},
AnswerChange(item) {
item.IsRes = item.SubAnwser.some((e) => {
return e.Content && e.Content != "";
});
},
onchange(e) {
innerAudioContext.stop();
innerAudioContext.onCanplay(() => {
// 必须。可以当做是初始化时长
innerAudioContext.duration;
// 必须。不然也获取不到时长
setTimeout(() => {
data.audioTime = 999;
}, 100);
});
innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange(item2, item3) {
item2.SubAnwser.map((e) => {
if (e.Name == item3.Name) {
e.IsAnswer = true;
item2.IsRes = true; //答题标记
} else {
e.IsAnswer = false;
}
});
},
// 多选
multipleChange(item2, item3) {
item3.IsAnswer = !item3.IsAnswer;
//标记已回答
item2.IsRes = item2.SubAnwser.some((e) => {
return e.IsAnswer;
});
},
AnswerChange(item) {
item.IsRes = item.SubAnwser.some((e) => {
return e.Content && e.Content != "";
});
},
onchange(e) {
innerAudioContext.stop();
innerAudioContext.onCanplay(() => {
// 必须。可以当做是初始化时长
innerAudioContext.duration;
// 必须。不然也获取不到时长
setTimeout(() => {
data.audioTime = 999;
}, 100);
});
data.isPlay = true;
data.ExamIndex = e.detail.current;
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) {
this.$emit("getAfterTopic");
}
if (e.detail.current == 0 && data.sortIndex != 1) {
this.$emit("getBeforeTopic");
}
},
};
onMounted(() => {
if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
});
onUnmounted(() => {
innerAudioContext.stop();
data.isPlay = true;
});
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
data.isPlay = true;
data.ExamIndex = e.detail.current;
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) {
this.$emit("getAfterTopic");
}
if (e.detail.current == 0 && data.sortIndex != 1) {
this.$emit("getBeforeTopic");
}
},
//点击上一题
getBeforeExam() {
data.current = data.current - 1;
},
//点击下一题
getNextExam() {
data.current = data.current + 1;
}
};
onMounted(() => {
if (props.isLast) {
if (data.sortIndex === 1) {
data.current = props.paperData.DetailsList.length - 1;
} else {
data.current = props.paperData.DetailsList.length;
}
}
data.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
});
onUnmounted(() => {
innerAudioContext.stop();
data.isPlay = true;
});
let that = methods;
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style>
.name {
height: 90rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
display: flex;
align-items: center;
justify-content: space-between;
}
<style scoped>
.AnswerBtn {
margin-top: 20rpx;
}
.clear {
clear: both
}
.AnswerBtnFirst {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border: 1px solid #00ACF9;
color: #00ACF9;
float: left;
}
.AnswerBtnSecond {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color: #fff;
float: right;
}
.name {
height: 90rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
display: flex;
align-items: center;
justify-content: space-between;
}
.ExamIndex_Box {
margin-right: 40rpx;
}
.Single_Before {
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
.ExamIndex_Box {
margin-right: 40rpx;
}
.isTrueAnswer {
color: green !important;
}
.Single_Before {
font-size: 28rpx;
font-weight: bold;
color: #da7878;
}
.isNotAnswer {
color: red !important;
}
.isTrueAnswer {
color: green !important;
}
.AnswerContent {
font-size: 30rpx;
padding: 25rpx;
background-color: #f4f4f4;
border-radius: 5px;
}
.isNotAnswer {
color: red !important;
}
.viewAnswerContent {
width: 100%;
min-height: 44rpx;
border-bottom: 1px solid #d1d1d1;
padding-bottom: 5px;
}
.AnswerContent {
font-size: 30rpx;
padding: 25rpx;
background-color: #f4f4f4;
border-radius: 5px;
}
.Exam_Total {
font-size: 25rpx;
color: gray;
}
.viewAnswerContent {
width: 100%;
min-height: 44rpx;
border-bottom: 1px solid #d1d1d1;
padding-bottom: 5px;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
.Exam_Total {
font-size: 25rpx;
color: gray;
}
.num {
font-size: 30rpx;
font-family: PingFang SC;
color: #111111;
}
.swiper-box {
height: calc(100vh - 270rpx);
box-sizing: border-box;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
}
.num {
font-size: 30rpx;
font-family: PingFang SC;
color: #111111;
}
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
}
.questionView {
overflow-y: auto;
}
.item1 {
/* margin: 25rpx 0; */
align-items: center;
}
.audioBox {
width: 120rpx;
height: 30rpx;
background: #b4ddfe;
border: 1px solid #35b4fb;
border-radius: 4rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #00acf9;
}
.questionView {
overflow-y: auto;
}
.audioBox {
width: 120rpx;
height: 30rpx;
background: #b4ddfe;
border: 1px solid #35b4fb;
border-radius: 4rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #00acf9;
}
.item2 {
box-sizing: border-box;
margin: 30rpx 0;
/* padding: 0 30rpx; */
}
.item2 {
box-sizing: border-box;
margin: 30rpx 0;
/* padding: 0 30rpx; */
}
.item3 {
padding-left: 25rpx;
margin: 20rpx 0;
}
.item3 {
padding-left: 25rpx;
margin: 20rpx 0;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.myAnswer {
background-color: #00acf9 !important;
color: #ffffff !important;
}
.chooseNum {
width: 50rpx;
height: 50rpx;
text-align: center;
line-height: 50rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseNum {
width: 50rpx;
height: 50rpx;
text-align: center;
line-height: 50rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.chooseName {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.chooseName {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.chooseName2 {
flex-grow: 1;
border-bottom: 1px solid #111;
}
.chooseName2 {
flex-grow: 1;
border-bottom: 1px solid #111;
}
.questionTitle {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.questionTitle {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.listen .van-count-down {
font-size: 22rpx !important;
color: #00acf9 !important;
}
.listen .van-count-down {
font-size: 22rpx !important;
color: #00acf9 !important;
}
.Exam_Score{
color:#999999;
font-size:28rpx;
}
.Exam_Score {
color: #999999;
font-size: 28rpx;
}
</style>
......@@ -25,7 +25,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
</view>
......@@ -61,45 +61,49 @@
</view>
</template>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin: 20rpx 0" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color: #8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore > 0">{{
item1.StudentScore
}}</text>
<text class="isNotAnswer" v-else>{{ item1.StudentScore }}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin: 20rpx 0" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color: #8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore > 0">{{
item1.StudentScore
}}</text>
<text class="isNotAnswer" v-else>{{ item1.StudentScore }}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -188,6 +192,14 @@ export default {
this.$emit("getBeforeTopic");
}
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -209,6 +221,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......
......@@ -17,7 +17,7 @@
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -29,35 +29,39 @@
</view>
</template>
<template v-else>
<view class="viewAnswerContent" style="margin-top:20px;" v-html="item1.Answer"></view>
<view class="viewAnswerContent" style="margin:20px 0;" v-html="item1.Answer"></view>
</template>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }}
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
</view>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }}
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
......@@ -150,6 +154,14 @@
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -170,6 +182,31 @@
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
padding:0 20px;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -212,7 +249,7 @@
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -17,7 +17,7 @@
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1" style="padding: 0 20px">
<view class="item1" style="padding: 0 20px" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<template v-if="item1.QuestionContentObj[1] && item1.QuestionContentObj[1].length > 0">
<view class="num">(1)</view>
......@@ -78,6 +78,10 @@
</view>
</template>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -203,6 +207,14 @@
}
return Array;
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -223,6 +235,32 @@
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
padding:0 20px;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -266,7 +304,7 @@
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -12,13 +12,11 @@
class="Exam_Total">{{ data.DetailsList.length }}</text>
</view>
</view>
<swiper class="swiper-box" :style="{
height: `calc(100vh - 300rpx - ${statusBarHeight}px)`,
}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true"
<swiper class="swiper-box" :style="{height: `calc(100vh - 300rpx - ${statusBarHeight}px)`}" :autoplay="autoplay" :current="current" @change="onchange" :skip-hidden-item-layout="true"
:disable-programmatic-animation="true">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex flex_start_center">
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
</view>
......@@ -38,33 +36,37 @@
</view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text>
<text>您的答案是:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="margin-top: 20rpx; word-wrap: break-word" class="flex" v-if="item1.AnswerParse">
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text>
<text>您的答案是:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="margin-top: 20rpx; word-wrap: break-word" class="flex" v-if="item1.AnswerParse">
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal">
<!-- 最后一页 -->
......@@ -159,7 +161,7 @@
if (data.sortIndex == 1) {
data.ExamIndex = e.detail.current + 1;
}
if (data.ExamIndex === data.data.DetailsList.length + 1) {
this.$emit("getAfterTopic");
}
......@@ -172,6 +174,14 @@
url: "/pages/exam/answerSheet",
});
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -192,6 +202,30 @@
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -206,7 +240,7 @@
.isTrueAnswer {
color: green !important;
}
.isNotAnswer {
color: red !important;
}
......@@ -219,7 +253,7 @@
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -25,7 +25,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex flex_start_center">
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
</view>
......@@ -62,43 +62,47 @@
</view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text
>您的答案是:
<template v-if="item1.StundetAnswer != ''">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{ item1.Answer }}</text
>
<text
>您的答案是:
<template v-if="item1.StundetAnswer != ''">
<text
v-if="item1.Answer == item1.StundetAnswer"
class="isTrueAnswer"
>
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer"
>{{ item1.StundetAnswer }},回答错误</text
>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view
style="margin-top: 20rpx; word-wrap: break-word"
v-if="item1.AnswerParse" class="flex"
>
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
<view
style="margin-top: 20rpx; word-wrap: break-word"
v-if="item1.AnswerParse" class="flex"
>
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal">
<!-- 最后一页 -->
......@@ -202,6 +206,14 @@ export default {
url: "/pages/exam/answerSheet",
});
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -222,6 +234,31 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
padding:0 20px;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -249,7 +286,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1" style="padding: 0 20px">
<view class="item1" style="padding: 0 20px" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -116,6 +116,10 @@
</view>
</template>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -241,6 +245,14 @@ export default {
}
return Array;
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -261,6 +273,31 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
padding:0 20px;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -302,7 +339,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......@@ -324,6 +361,7 @@ export default {
.item1 {
align-items: center;
overflow-y: auto;
}
.item2 {
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -43,28 +43,32 @@
</view>
</template>
<template v-else>
<view class="viewAnswerContent" style="margin-top:15px;" v-html="item1.Answer"></view>
<view class="viewAnswerContent" style="margin:20px 0;" v-html="item1.Answer"></view>
</template>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view class="AnswerContent" v-if="!isOperate">
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="margin-top: 20rpx; word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="margin-top: 20rpx; word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
......@@ -153,6 +157,14 @@ export default {
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam() {
data.current = data.current - 1;
},
//点击下一题
getNextExam() {
data.current = data.current + 1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -173,6 +185,31 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
padding:0 20px;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -212,7 +249,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -47,31 +47,35 @@
item1.Answer
}}</view>
</template>
</view>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -162,6 +166,14 @@ export default {
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -182,6 +194,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......@@ -226,7 +262,7 @@ export default {
}
.Single_Before {
font-size: 28rpx;
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
......
......@@ -17,7 +17,7 @@
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
</view>
......@@ -36,34 +36,38 @@
</view>
</template>
</view>
</view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{item1.Answer}}</text>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
<view class="AnswerContent" v-if="!isOperate">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{item1.Answer}}</text>
<text>
您的答案:
<template v-if="item1.StundetAnswer != ''">
<text v-if="item1.Answer == item1.StundetAnswer" class="isTrueAnswer">
{{ item1.StundetAnswer }},回答正确
</text>
<text v-else class="isNotAnswer">{{ item1.StundetAnswer }},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
</template>
</text>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view style="color: #000; display: inline-block" v-html="item1.AnswerParse"></view>
</view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -158,6 +162,14 @@
if (e.detail.current == 0 && data.sortIndex != 1) {
this.$emit("getBeforeTopic");
}
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
......@@ -179,6 +191,30 @@
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......
......@@ -24,7 +24,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -43,33 +43,37 @@
</view>
</template>
<template v-else>
<view class="viewAnswerContent">{{ item1.Answer }}</view>
<view class="viewAnswerContent" style="margin-top:30rpx;">{{ item1.Answer }}</view>
</template>
</view>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -160,6 +164,14 @@ export default {
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -180,6 +192,30 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......
......@@ -17,14 +17,17 @@
}" :autoplay="autoplay" :current="current" @change="onchange">
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view class="num readTitle" :style="{ paddingBottom: `${questionH}rpx` }"
v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
<view class="num readTitle" v-html="item1.Title"></view><text
class="Exam_Score">{{item1.Score}}</text>
</view>
<view class="questionBox" :style="{ height: `${questionH}rpx` }">
<!-- <view class="questionBox" :style="{ height: `${questionH}rpx` }">
<view class="questionTotal" @touchstart="touchstart" @touchmove="touchmove"
@touchend="touchend">本阅读理解共5小题</view>
@touchend="touchend">本阅读理解共5小题</view> -->
<view :style="{maxHeight: `calc(100vh - 450rpx - ${statusBarHeight}px)`}"
style="overflow-y: auto;">
<view style="margin:30rpx;" class="Exam_Score">本阅读理解共{{item1.QuestionContentObj.length}}小题</view>
<template v-if="isOperate">
<view class="questionView">
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
......@@ -33,13 +36,13 @@
<view style="white-space: nowrap">{{ index2 + 1 }}、({{
item2.QuestionName.slice(0, 2)
}})</view>
<view v-html="item2.SubTitle"></view>{{item2.SubScore}}
<view v-html="item2.SubTitle"></view><text class="Exam_Score">{{item2.SubScore}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view class="flex flex_start_center item3" v-if="
item2.QuestionKey === 'single' ||
item2.QuestionKey === 'judge'
item2.QuestionKey === 'judge'||item2.QuestionKey === 'single-number'
">
<view class="chooseNum" :class="{ myAnswer: item3.IsAnswer }"
@click="singerChange(item2, item3)">{{ item3.Name }}
......@@ -80,12 +83,15 @@
<view v-for="(item2, index2) in item1.QuestionContentObj" :key="index2"
class="item2">
<view class="flex questionTitle">
<view style="white-space: nowrap">{{ index2 + 1 }}、({{item2.QuestionName.slice(0, 2)}})</view>
<view v-html="item2.SubTitle"></view>{{item2.SubScore}}
<view style="white-space: nowrap">
{{ index2 + 1 }}、({{item2.QuestionName.slice(0, 2)}})
</view>
<view v-html="item2.SubTitle"></view><text class="Exam_Score">{{item2.SubScore}}</text>
</view>
<view v-for="(item3, index3) in item2.SubAnwser" :key="index3">
<!-- 单选 、判断-->
<view class="flex item3" v-if="item2.QuestionKey === 'single' || item2.QuestionKey === 'judge'">
<view class="flex item3"
v-if="item2.QuestionKey === 'single' || item2.QuestionKey === 'judge'||item2.QuestionKey === 'single-number'">
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
......@@ -94,8 +100,7 @@
</view>
<!-- 多选 -->
<view class="flex item3"
v-if="item2.QuestionKey === 'multiple'">
<view class="flex item3" v-if="item2.QuestionKey === 'multiple'">
<view class="chooseNum" :class="{ isTrueAnswer: item3.IsAnswer }">
{{ item3.Name }}
</view>
......@@ -103,49 +108,55 @@
v-html="item3.Content"></view>
</view>
<!-- 填空 -->
<view class="flex item3"
v-if="item2.QuestionKey === 'fill-in'">
<view class="flex item3" v-if="item2.QuestionKey === 'fill-in'">
<view class="chooseNum">{{ index3 + 1 }} </view>
<view v-html="item3.Content" class="chooseName"></view>
</view>
<!-- 简答 -->
<view class="flex item3"
v-if="item2.QuestionKey === 'short-answer'">
<view class="flex item3" v-if="item2.QuestionKey === 'short-answer'">
<view v-html="item3.Content" class="chooseName"></view>
</view>
</view>
<view class="AnswerContent">
<view>
<text style="color: #8c8a94">正确答案:</text>
<text class="isTrueAnswer">{{item1.QuestionAnswerList[index2].SubAnswer}}</text>
<text
class="isTrueAnswer">{{item1.QuestionAnswerList[index2].SubAnswer}}</text>
<text>您的答案:
<template v-if="item1.AnswerList && item1.AnswerList.length>0">
<text v-if="item1.QuestionAnswerList[index2].SubAnswer == item1.AnswerList[index2].SubAnswer" class="isTrueAnswer">
<text
v-if="item1.QuestionAnswerList[index2].SubAnswer == item1.AnswerList[index2].SubAnswer"
class="isTrueAnswer">
{{ item1.AnswerList[index2].SubAnswer }}
</text>
<text v-else class="isNotAnswer">{{item1.AnswerList[index2].SubAnswer}},回答错误</text>
</template>
<template v-else>
<text>未作答</text>
<text v-if="item1.AnswerList[index2].SubAnswer!=''" class="isNotAnswer">{{item1.AnswerList[index2].SubAnswer}},回答错误</text>
<text v-if="item1.AnswerList[index2].SubAnswer==''" class="isNotAnswer">未作答</text>
</template>
</text>
</view>
<view style="margin-top:20rpx;" v-if="item1.AnswerList[index2].StudentScore!=''||item1.AnswerList[index2].StudentScore===0">
<view style="margin-top:20rpx;"
v-if="item1.AnswerList[index2].StudentScore!=''||item1.AnswerList[index2].StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.AnswerList[index2].StudentScore>0">{{item1.AnswerList[index2].StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.AnswerList[index2].StudentScore}}</text>
<text class="isTrueAnswer"
v-if="item1.AnswerList[index2].StudentScore>0">{{item1.AnswerList[index2].StudentScore}}</text>
<text class="isNotAnswer"
v-else>{{item1.AnswerList[index2].StudentScore}}</text>
</view>
</view>
</view>
<view style="word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx"
<view style="word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx;display: flex;align-items: center;"
class="AnswerContent" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<text style="color: #000">{{ item1.AnswerParse }}</text>
<view style="color: #000" v-html="item1.AnswerParse"></view>
</view>
</view>
</template>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -195,7 +206,7 @@
timeOutEvent: false,
statusBarHeight: 0,
isOperate: props.isOperate,
ExamStatus:props.ExamStatus
ExamStatus: props.ExamStatus
});
//判断是否是第一大题
if (data.sortIndex === 1) {
......@@ -284,6 +295,14 @@
data.timeOutEvent = false;
clearTimeout(data.timer);
},
//点击上一题
getBeforeExam() {
data.current = data.current - 1;
},
//点击下一题
getNextExam() {
data.current = data.current + 1;
}
};
onMounted(() => {
console.log(361, data.data);
......@@ -305,6 +324,37 @@
};
</script>
<style scoped>
.AnswerBtn {
margin-top: 30rpx;
padding:0 40rpx;
}
.clear {
clear: both
}
.AnswerBtnFirst {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border: 1px solid #00ACF9;
color: #00ACF9;
float: left;
}
.AnswerBtnSecond {
width: 250rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color: #fff;
float: right;
}
.item {
/* margin-bottom: 40rpx; */
position: relative;
......@@ -322,6 +372,7 @@
box-sizing: border-box;
padding: 0 30rpx;
}
.isTrueAnswer {
color: green !important;
}
......@@ -331,7 +382,7 @@
}
.ExamIndex_Box {
margin-right: 40rpx;
margin-right: 48rpx;
}
.Exam_Total {
......@@ -350,16 +401,21 @@
font-family: PingFang SC;
color: #111111;
box-sizing: border-box;
}
.readTitle img {
max-width: 100%;
}
.Single_Before {
font-size: 30rpx;
font-weight: bold;
color: #da7878;
}
.item1 {
height: 100%;
align-items: center;
overflow-y: auto;
/* overflow-y: auto; */
box-sizing: border-box;
padding: 0 30rpx;
}
......@@ -380,7 +436,7 @@
.questionView {
height: 100%;
overflow-y: auto;
/* overflow-y: auto; */
box-sizing: border-box;
padding-bottom: 80rpx;
}
......@@ -395,15 +451,14 @@
}
.questionTitle {
font-size: 26rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.item2 {
box-sizing: border-box;
margin-bottom: 60rpx;
margin-bottom: 50rpx;
padding: 0 30rpx;
}
......@@ -419,6 +474,7 @@
.item3 {
padding-left: 25rpx;
margin: 20rpx 0;
align-items: center;
}
.chooseNum {
......@@ -462,8 +518,9 @@
border-radius: 10rpx;
font-size: 28rpx;
}
.Exam_Score{
color:#999999;
font-size:28rpx;
.Exam_Score {
color: #999999;
font-size: 28rpx;
}
</style>
......@@ -26,7 +26,7 @@
>
<swiper-item v-if="sortIndex != 1"></swiper-item>
<swiper-item v-for="(item1, index1) in data.DetailsList" :key="index1">
<view class="item1">
<view class="item1" :style="{height: `calc(100vh - 390rpx - ${statusBarHeight}px)`}">
<view class="flex">
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view><text class="Exam_Score">{{item1.Score}}</text>
......@@ -46,31 +46,35 @@
<template v-else>
<view class="viewAnswerContent" v-html="item2.Answer"></view>
</template>
</view>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
<view
class="AnswerContent"
v-if="!isOperate"
style="margin-top: 30rpx"
>
<view>
您的答案:
<view class="viewAnswerContent" style="margin-top: 10px">
{{ item1.StundetAnswer }}
</view>
</view>
<view style="margin:20rpx 0;" v-if="item1.StudentScore!=''||item1.StudentScore===0">
<text style="color:#8c8a94">您的得分:</text>
<text class="isTrueAnswer" v-if="item1.StudentScore>0">{{item1.StudentScore}}</text>
<text class="isNotAnswer" v-else>{{item1.StudentScore}}</text>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view style="word-wrap: break-word" v-if="item1.AnswerParse">
<text style="color: #8c8a94">解析:</text>
<view
style="color: #000; display: inline-block"
v-html="item1.AnswerParse"
></view>
</view>
</view>
<view class="AnswerBtn clear">
<view class="AnswerBtnFirst" @click="getBeforeExam()" v-if="ExamIndex!=1||sortIndex!=1">上一题</view>
<view class="AnswerBtnSecond" v-if="sortIndex != sortTotal" @click="getNextExam()">下一题</view>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
</swiper>
......@@ -156,6 +160,14 @@ export default {
}
context.emit("answerChange", data.data);
},
//点击上一题
getBeforeExam(){
data.current = data.current-1;
},
//点击下一题
getNextExam(){
data.current = data.current+1;
}
};
onMounted(() => {
if (props.isLast) {
......@@ -176,6 +188,31 @@ export default {
};
</script>
<style scoped>
.AnswerBtn{
margin-top: 20rpx;
}
.clear{ clear:both}
.AnswerBtnFirst{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
border:1px solid #00ACF9;
color:#00ACF9;
float:left;
}
.AnswerBtnSecond{
width:250rpx;
height:60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 10rpx;
background-color: #00ACF9;
color:#fff;
float:right;
}
.name {
height: 90rpx;
font-size: 30rpx;
......
......@@ -110,9 +110,19 @@ export default {
if (res) {
if (res.Code == 1) {
data.dataList = res.Data;
let Remark = ''
if(res.Data.TotalScore>0&&res.Data.TotalScore<=60){
Remark='要加油哦'
}
if(res.Data.TotalScore>60&&res.Data.TotalScore<=90){
Remark='不错哦'
}
if(res.Data.TotalScore>90){
Remark='你好棒'
}
that.initCanvas(
res.Data.TotalScore,
res.Data.StuComment,
Remark,
res.Data.ExamScore
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment