|
@@ -141,9 +141,10 @@
|
|
|
}}</text>
|
|
|
<text
|
|
|
v-if="item.isAnswer && !item.selected"
|
|
|
- class="problem-op_green"
|
|
|
+ class="problem-op problem-op_green"
|
|
|
>{{ numberToLetter(index) }}</text
|
|
|
>
|
|
|
+ <view style="width: 8px"></view>
|
|
|
<text class="problem-opAnswer">{{ item.value }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -174,7 +175,7 @@
|
|
|
>
|
|
|
</m-checkbox>
|
|
|
</m-checkbox-group>
|
|
|
- <!-- <view class="flex-center">
|
|
|
+ <view class="flex-center">
|
|
|
<van-button
|
|
|
@click="confirmMult"
|
|
|
color="#498ef5"
|
|
@@ -183,7 +184,7 @@
|
|
|
type="primary"
|
|
|
>确定</van-button
|
|
|
>
|
|
|
- </view> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view
|
|
|
v-if="
|
|
@@ -214,9 +215,10 @@
|
|
|
}}</text>
|
|
|
<text
|
|
|
v-if="item.isAnswer && !item.selected"
|
|
|
- class="problem-op_green"
|
|
|
+ class="problem-op problem-op_green"
|
|
|
>{{ numberToLetter(index) }}</text
|
|
|
>
|
|
|
+ <view style="width: 8px"></view>
|
|
|
<text class="problem-opAnswer">{{ item.value }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -335,6 +337,12 @@ export default {
|
|
|
subject: "",
|
|
|
title: "",
|
|
|
},
|
|
|
+ gsMap: {
|
|
|
+ xc: "小车",
|
|
|
+ hc: "货车",
|
|
|
+ mtc: "摩托车",
|
|
|
+ kc: "客车",
|
|
|
+ },
|
|
|
examTimer: 0,
|
|
|
examTimeUse: 0,
|
|
|
time: 45 * 60 * 1000,
|
|
@@ -419,6 +427,26 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ confirmMult() {
|
|
|
+ this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
|
|
|
+ if (
|
|
|
+ JSON.stringify(
|
|
|
+ this.problemList[this.problemListIndex].answer.split("-").sort()
|
|
|
+ ) ===
|
|
|
+ JSON.stringify(
|
|
|
+ this.problemList[this.problemListIndex].userAnswer.sort()
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ this.trueNum++;
|
|
|
+ } else {
|
|
|
+ this.falseNum++;
|
|
|
+ api.exam.studentQuestionWrong({
|
|
|
+ questionId: this.problemList[this.problemListIndex].id,
|
|
|
+ carType: this.gsMap[this.query.gs],
|
|
|
+ km: this.query.subject === "4" ? "科目四" : "科目一",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
touchStart(e) {
|
|
|
var that = this;
|
|
|
|
|
@@ -467,8 +495,8 @@ export default {
|
|
|
let score = 0;
|
|
|
let query = this.query;
|
|
|
let that = this;
|
|
|
- let scorePerQuestion = 0
|
|
|
- query.subject === "4"?scorePerQuestion=2:scorePerQuestion=1
|
|
|
+ let scorePerQuestion = 0;
|
|
|
+ query.subject === "4" ? (scorePerQuestion = 2) : (scorePerQuestion = 1);
|
|
|
this.problemList.forEach((item, index) => {
|
|
|
if (
|
|
|
typeof item.userAnswer == "object" &&
|
|
@@ -484,7 +512,9 @@ export default {
|
|
|
score = score + scorePerQuestion;
|
|
|
}
|
|
|
} else if (typeof item.userAnswer == "string") {
|
|
|
- item.answer === item.userAnswer ? (score = score + scorePerQuestion) : "";
|
|
|
+ item.answer === item.userAnswer
|
|
|
+ ? (score = score + scorePerQuestion)
|
|
|
+ : "";
|
|
|
}
|
|
|
});
|
|
|
uni.showModal({
|
|
@@ -544,6 +574,15 @@ export default {
|
|
|
"userAnswer",
|
|
|
e.detail
|
|
|
);
|
|
|
+ //错题
|
|
|
+ if (e.detail !== this.problemList[this.problemListIndex].answer) {
|
|
|
+ api.exam.studentQuestionWrong({
|
|
|
+ questionId: this.problemList[this.problemListIndex].id,
|
|
|
+ carType: this.gsMap[this.query.gs],
|
|
|
+ km: this.query.subject === "4" ? "科目四" : "科目一",
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
this.problemList[this.problemListIndex].optsArr.forEach((item, index) => {
|
|
|
if (e.detail === item.value) {
|
|
|
item.selected = true;
|
|
@@ -561,6 +600,7 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
+ this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
|
|
|
// this.problemList[this.problemListIndex].optsArr.forEach((item) => {
|
|
|
// if (e.detail.value === item.value) {
|
|
|
// item.selected = true;
|
|
@@ -726,6 +766,13 @@ export default {
|
|
|
.problem-issue {
|
|
|
font-size: 42rpx;
|
|
|
}
|
|
|
+ .problem-select {
|
|
|
+ display: flex;
|
|
|
+ align-content: center;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 15rpx;
|
|
|
+ padding-left: 30rpx;
|
|
|
+ }
|
|
|
.problem-type {
|
|
|
padding-left: 10rpx;
|
|
|
padding-right: 10rpx;
|
|
@@ -755,6 +802,17 @@ export default {
|
|
|
background: #fff;
|
|
|
box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
|
|
|
}
|
|
|
+ .problem-op_green {
|
|
|
+ width: 75rpx;
|
|
|
+ height: 75rpx;
|
|
|
+ line-height: 75rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ overflow: hidden;
|
|
|
+ background: #01c18d;
|
|
|
+
|
|
|
+ box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
|
|
|
+ }
|
|
|
.problem-op_selected {
|
|
|
background: #498ef5;
|
|
|
}
|