Commit ef0252b5 authored by zhengke's avatar zhengke

修改

parent 4f23c371
......@@ -23,7 +23,7 @@
</view>
</view>
</view>
<view class="submitBox">
<view class="submitBox" v-if="!isShowJx">
<view class="submit" @click="savePaper">立即提交</view>
</view>
<van-toast id="van-toast" />
......@@ -47,15 +47,17 @@
export default {
props: {
paperData: Array,
saveId: Number
saveId: Number,
isShowJx: Boolean
},
setup(props, ctx) {
let data = reactive({
questionList: props.paperData,
saveMsg: {
Id: props.saveId,
ExamDetailsList: []
}
ExamDetailsList: [],
},
isShowJx:props.isShowJx
});
let methods = {
chooseTopic(index) {
......
......@@ -9,10 +9,22 @@
</view>
<view v-for="(item2, index2) in dataObj.QuestionContentObj" :key="index2"
class="flex item2 flex_start_center">
<view class="chooseNum" :class="{ 'isMyChoose': item2.ShowName==dataObj.StudentAnswer[0]}"
@click="change(dataObj, item2)">{{ item2.ShowName }}
</view>
<view class="chooseName" @click="change(dataObj, item2)" v-html="item2.Content"></view>
<template v-if="!isShowJx">
<view class="chooseNum" :class="{ 'isMyChoose': item2.ShowName==dataObj.StudentAnswer[0]}"
@click="change(dataObj, item2)">{{ item2.ShowName }}
</view>
<view class="chooseName" @click="change(dataObj, item2)" v-html="item2.Content"></view>
</template>
<template v-else>
<view class="chooseNum"
:class="{ 'isRightAnswer': item2.ShowName==dataObj.Answer,'isNotRightAnswer':getErrorAnswer(dataObj,item2.ShowName) }">
{{ item2.ShowName }}
</view>
<view class="chooseName"
:class="{ 'isRightText': item2.ShowName==dataObj.Answer,'isNotAnswer':getErrorAnswer(dataObj,item2.ShowName) }"
v-html="item2.Content">
</view>
</template>
</view>
<view class="AnswerContent" v-if="isShowJx">
<view>
......@@ -31,8 +43,7 @@
</template>
</text>
</view>
<view style="margin-top: 20rpx; word-wrap: break-word" v-if="dataObj.AnswerParse"
class="flex">
<view style="margin-top: 20rpx; word-wrap: break-word" v-if="dataObj.AnswerParse" class="flex">
<text style="color: #8c8a94;flex-shrink: 0;">解析:</text>
<view style="color: #000" v-html="dataObj.AnswerParse"></view>
</view>
......@@ -69,9 +80,17 @@
});
let UserInfo = uni.getStorageSync('userInfo');
let methods = {
change(item1,item2){
change(item1, item2) {
item1.StudentAnswer[0] = item2.Name;
context.emit("answerChange", data.dataObj);
},
//判断是否为正确答案
getErrorAnswer(item1, Number) {
if (item1.StudentAnswer[0] != item1.QuestionAnswerList[0]) {
if (item1.StudentAnswer[0] == Number) {
return true
}
}
}
};
onMounted(() => {
......@@ -87,11 +106,20 @@
};
</script>
<style scoped>
.isTrueAnswer {
color: green !important;
}
.isRightAnswer{
background-color: green;
color:#fff!important;
}
.isRightText{
color:green!important;
}
.isNotRightAnswer{
background-color: red!important;
color:#fff!important;
}
.isNotAnswer {
color: red !important;
}
......@@ -101,6 +129,8 @@
padding: 25rpx;
background-color: #f4f4f4;
border-radius: 5px;
max-height: 515rpx;
overflow: auto;
}
.swiper-box {
......@@ -114,7 +144,7 @@
}
.item {
margin-top:180rpx;
margin-top: 180rpx;
}
.item1 {
......@@ -140,19 +170,22 @@
color: #111111;
flex-shrink: 0;
}
.isMyChoose{
.isMyChoose {
background-color: #4C50E7;
color:#fff;
color: #fff;
}
.chooseName {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
}
.Exam_Score{
color:#999999;
font-size:28rpx;
.Exam_Score {
color: #999999;
font-size: 28rpx;
flex-shrink: 0;
}
</style>
......@@ -26,7 +26,7 @@
</swiper-item>
</swiper>
</view>
<answer v-if="isShowAnswer" :paperData="dataList" @hideAnswer="hideAnswer" :saveId="saveId" @chooseTopic="jumpTopic"></answer>
<answer v-if="isShowAnswer" :paperData="dataList" @hideAnswer="hideAnswer" :saveId="saveId" :isShowJx="isShowJx" @chooseTopic="jumpTopic"></answer>
</view>
</template>
......@@ -93,7 +93,9 @@
}
},
getList() {
data.msg.StudentId = UserInfo.AccountId;
if(data.isShowJx){
data.msg.StudentId = UserInfo.AccountId;
}
GetAppBankDetails(data.msg).then(res => {
if (res) {
if (res.Code == 1) {
......@@ -162,6 +164,7 @@
// 1开始考试 2产看解析
if(options.Type==1){
this.getStart();
this.msg.StudentId='';
this.isShowJx=false;
}
if(options.Type==2){
......
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