Commit 1185e629 authored by zhengke's avatar zhengke

修改

parent 746c10a4
...@@ -2,9 +2,15 @@ ...@@ -2,9 +2,15 @@
<!-- 单选题 --> <!-- 单选题 -->
<view> <view>
<view class="item"> <view class="item">
<view class="name" <view class="name">
>{{ changeNumToHan(sort + 1) }}{{ data.GroupName }}</view <view>
> {{ changeNumToHan(sort + 1) }}{{ data.GroupName }}
<text>(共{{data.DetailsList.length}}道,{{Score}}分)</text>
</view>
<view>
<text class="Single_Before">2</text>/<text class="Exam_Total">{{data.DetailsList.length}}</text>
</view>
</view>
<swiper class="swiper-box" :autoplay="autoplay"> <swiper class="swiper-box" :autoplay="autoplay">
<swiper-item <swiper-item
v-for="(item1, index1) in data.DetailsList" v-for="(item1, index1) in data.DetailsList"
...@@ -62,6 +68,7 @@ export default { ...@@ -62,6 +68,7 @@ export default {
autoplay: false, autoplay: false,
data: props.paperData, data: props.paperData,
Score: 0
}); });
let methods = { let methods = {
...@@ -79,7 +86,19 @@ export default { ...@@ -79,7 +86,19 @@ export default {
data.data.DetailsList[index1].myAnswer = data.data.DetailsList[index1].myAnswer =
data.data.DetailsList[index1].QuestionContentObj[index2].Name; data.data.DetailsList[index1].QuestionContentObj[index2].Name;
}, },
//获取总分
getScore(){
data.Score=0;
data.data.DetailsList.forEach(x=>{
data.Score+=x.Score
})
}
}; };
onMounted(()=>{
console.log(props.paperData,'props.paperData');
that.getScore();
})
let that = methods;
return { return {
...toRefs(data), ...toRefs(data),
...methods, ...methods,
...@@ -96,6 +115,16 @@ export default { ...@@ -96,6 +115,16 @@ export default {
color: #111111; color: #111111;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
}
.Single_Before{
font-size: 28rpx;
font-weight: bold;
color:#DA7878;
}
.Exam_Total{
font-size:25rpx;
color:gray;
} }
.swiper-box { .swiper-box {
/* height: calc(100vh - 250rpx - constant(safe-area-inset-top, 40rpx)); */ /* height: calc(100vh - 250rpx - constant(safe-area-inset-top, 40rpx)); */
......
...@@ -28,11 +28,7 @@ ...@@ -28,11 +28,7 @@
<SingleChoice <SingleChoice
:paperData="item" :paperData="item"
:sort="index" :sort="index"
v-if=" v-if="item.QuestionTypeKey === 'single-number'" />
item.GroupName === '单选题(数字)' ||
item.GroupName === 'single-number'
"
/>
<MultipleChoice <MultipleChoice
:paperData="item" :paperData="item"
v-if="item.QuestionTypeKey === 'multiple'" v-if="item.QuestionTypeKey === 'multiple'"
......
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