|
@@ -3,12 +3,22 @@
|
|
<div class="pt30 pr30 pl30 pb30">
|
|
<div class="pt30 pr30 pl30 pb30">
|
|
<div class="w-full gray-border">
|
|
<div class="w-full gray-border">
|
|
<div class="pt30 pl30 text-left font26 pb50 bg-white">
|
|
<div class="pt30 pl30 text-left font26 pb50 bg-white">
|
|
- <span
|
|
|
|
- >2.避让特种车辆使其顺利通过后,车辆应该有序回到原车道继续行驶,</span
|
|
|
|
- >
|
|
|
|
- <div>B.错误</div>
|
|
|
|
- <div>A.正确</div>
|
|
|
|
|
|
+ <span>{{ listIndex + 1 }}.{{ list[listIndex].issue }}</span>
|
|
|
|
+ <div v-if="list[listIndex].questionType === 1">
|
|
|
|
+ <div v-for="(item, index) in list[listIndex].optsArr" :key="index">
|
|
|
|
+ {{ switchIndexBySelect(index) }}.{{
|
|
|
|
+ item == "√" ? "正确" : "错误"
|
|
|
|
+ }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="list[listIndex].questionType !== 1">
|
|
|
|
+ <div v-for="(item, index) in list[listIndex].optsArr" :key="index">
|
|
|
|
+ {{ switchIndexBySelect(index) }}.{{ item }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div
|
|
<div
|
|
|
|
+ v-if="list[listIndex].isComplete && !list[listIndex].isError"
|
|
class="inline-block pl15 pr5 mt15"
|
|
class="inline-block pl15 pr5 mt15"
|
|
style="background-color: #d9ffeb"
|
|
style="background-color: #d9ffeb"
|
|
>
|
|
>
|
|
@@ -18,6 +28,22 @@
|
|
/>
|
|
/>
|
|
<span style="color: #21a65f" class="lh60"> 恭喜!回答正确!</span>
|
|
<span style="color: #21a65f" class="lh60"> 恭喜!回答正确!</span>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div
|
|
|
|
+ v-if="list[listIndex].isComplete && list[listIndex].isError"
|
|
|
|
+ class="inline-block pl15 pr15 mt15 "
|
|
|
|
+ style="background-color: rgba(255, 220, 217, 1)"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ class="inline-block w42 h42"
|
|
|
|
+ src="@/assets/img/studySkill/cry_express.png"
|
|
|
|
+ />
|
|
|
|
+ <span v-if=" list[listIndex].questionType!==3" style="color: rgba(239, 54, 41, 1)" class="lh60">
|
|
|
|
+ 正确答案是:{{switchAnswerBySelect(list[listIndex].answer,listIndex)}}</span
|
|
|
|
+ >
|
|
|
|
+ <span v-if=" list[listIndex].questionType===3" style="color: rgba(239, 54, 41, 1)" class="lh60">
|
|
|
|
+ 正确答案是:{{switchAnswerBySelect(list[listIndex].answer.split('-'),listIndex)}}</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
<div>
|
|
<div>
|
|
<div
|
|
<div
|
|
class="mt30 w88 items-center bottom-button flex h40 justify-center"
|
|
class="mt30 w88 items-center bottom-button flex h40 justify-center"
|
|
@@ -29,18 +55,40 @@
|
|
<span class="font16">读题</span>
|
|
<span class="font16">读题</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex mt15">
|
|
|
|
- <div class="w57 lh46 bottom-button mr15">√</div>
|
|
|
|
- <div class="w57 lh46 bottom-button">×</div>
|
|
|
|
|
|
+ <div v-if="list[listIndex].questionType === 1" class="flex mt15">
|
|
|
|
+ <div
|
|
|
|
+ @click="setUserAnswerAndRes(item)"
|
|
|
|
+ v-for="(item, index) in list[listIndex].optsArr"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="w57 lh46 bottom-button mr15"
|
|
|
|
+ >
|
|
|
|
+ {{ item }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="list[listIndex].questionType !== 1" class="flex mt15">
|
|
|
|
+ <div
|
|
|
|
+ @click="setUserAnswerAndRes(item)"
|
|
|
|
+ v-for="(item, index) in list[listIndex].optsArr"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="w57 lh46 bottom-button mr15"
|
|
|
|
+ >
|
|
|
|
+ {{ switchIndexBySelect(index) }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="w-full pt30">
|
|
<div class="w-full pt30">
|
|
<div class="w1200 flex justify-between mr-auto ml-auto">
|
|
<div class="w1200 flex justify-between mr-auto ml-auto">
|
|
- <div class="w120 lh46 bottom-button lh46">上一题</div>
|
|
|
|
- <div class="w120 lh46 bottom-button lh46">下一题</div>
|
|
|
|
- <div class="w120 lh46 bottom-button lh46">本题解析</div>
|
|
|
|
- <div class="w120 lh46 bottom-button lh46">语音播报</div>
|
|
|
|
|
|
+ <div @click="preProblem()" class="w120 lh46 bottom-button lh46">
|
|
|
|
+ 上一题
|
|
|
|
+ </div>
|
|
|
|
+ <div @click="nextProblem()" class="w120 lh46 bottom-button lh46">
|
|
|
|
+ 下一题
|
|
|
|
+ </div>
|
|
|
|
+ <div @click="()=>{
|
|
|
|
+ alertVisible = true
|
|
|
|
+ }" class="w120 lh46 bottom-button lh46">本题解析</div>
|
|
|
|
+ <div @click="playIssueAudio()" class="w120 lh46 bottom-button lh46">语音播报</div>
|
|
<div class="w120 lh46 bottom-button lh46">不设为错题</div>
|
|
<div class="w120 lh46 bottom-button lh46">不设为错题</div>
|
|
<div class="w120 lh46 bottom-button lh46">交卷</div>
|
|
<div class="w120 lh46 bottom-button lh46">交卷</div>
|
|
</div>
|
|
</div>
|
|
@@ -54,25 +102,34 @@
|
|
<input
|
|
<input
|
|
class="outline-none input-border w35 h30 text-center"
|
|
class="outline-none input-border w35 h30 text-center"
|
|
type="text"
|
|
type="text"
|
|
|
|
+ :value="listPageNum"
|
|
/>
|
|
/>
|
|
<div class="pr2 pl2">题</div>
|
|
<div class="pr2 pl2">题</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div>共 <span class="font-semibold">{{list.length}}</span> 题</div>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ 共 <span class="font-semibold">{{ list.length }}</span> 题
|
|
|
|
+ </div>
|
|
<div class="align-baseline">
|
|
<div class="align-baseline">
|
|
<input class="" type="checkbox" />
|
|
<input class="" type="checkbox" />
|
|
<span>答对自动跳转到下一题</span>
|
|
<span>答对自动跳转到下一题</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <div class="mr15 inline-block">
|
|
|
|
- 答对<span style="color: #21a65f">2</span>题
|
|
|
|
|
|
+ <div class="mr15 inline-block tracking5">
|
|
|
|
+ 答对<span style="color: #21a65f">{{ trueNum }}</span
|
|
|
|
+ >题
|
|
</div>
|
|
</div>
|
|
- <div class="inline-block">
|
|
|
|
- 答错<span style="color: #ef3629">2</span>题
|
|
|
|
|
|
+ <div class="inline-block tracking5">
|
|
|
|
+ 答错<span style="color: #ef3629">{{ falseNum }}</span
|
|
|
|
+ >题
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=""><span class="text-black font16">正确率100%</span></div>
|
|
<div class=""><span class="text-black font16">正确率100%</span></div>
|
|
- <div class=""><span class="text-black font16">进度 42%</span></div>
|
|
|
|
|
|
+ <div class="">
|
|
|
|
+ <span class="text-black font16"
|
|
|
|
+ >进度{{ ((trueNum + falseNum) * 100) / list.length }}%</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
<div class="flex items-center content-center">
|
|
<div class="flex items-center content-center">
|
|
<div class="mr15">
|
|
<div class="mr15">
|
|
<input class="" type="checkbox" /> <span>自动播放</span>
|
|
<input class="" type="checkbox" /> <span>自动播放</span>
|
|
@@ -82,33 +139,37 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <mProblemAlert v-model:visible="alertVisible" :content="list[listIndex].explainJs" title="题目解析"></mProblemAlert>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
-import { defineComponent, ref, } from "vue";
|
|
|
|
|
|
+import { defineComponent, ref } from "vue";
|
|
import api from "@/api";
|
|
import api from "@/api";
|
|
import { openApi } from "@/api/open/type";
|
|
import { openApi } from "@/api/open/type";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
|
|
+import { useDriverExam } from "@/hooks/exam/driverExam";
|
|
|
|
+import mProblemAlert from '@/components/mProblemAlert/index.vue'
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
setup() {
|
|
setup() {
|
|
- let list = ref<openApi.selectFreeQuestionInfoRes["rows"]>([]);
|
|
|
|
- let route = useRoute()
|
|
|
|
- api.question
|
|
|
|
- .questionInfoQlist({
|
|
|
|
- subject: Number(route.query.subject),
|
|
|
|
- classIssue:'1040',
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- res.rows.shift()
|
|
|
|
- list.value=res.rows
|
|
|
|
- console.log(res);
|
|
|
|
- });
|
|
|
|
|
|
+ let route = useRoute();
|
|
|
|
|
|
return {
|
|
return {
|
|
- list
|
|
|
|
|
|
+ alertVisible: ref(false),
|
|
|
|
+ dialogVisible: ref(false),
|
|
|
|
+ ...useDriverExam(
|
|
|
|
+ api.question.questionInfoQlist({
|
|
|
|
+ subject: Number(route.query.subject),
|
|
|
|
+ classIssue: "1040",
|
|
|
|
+ classIssueName: "",
|
|
|
|
+ isRand: "",
|
|
|
|
+ })
|
|
|
|
+ ),
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ components: {
|
|
|
|
+ mProblemAlert,
|
|
|
|
+ },
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|