|
@ -1,5 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="content" id="brushQuestions"> |
|
|
|
|
|
|
|
|
<view id="brushQuestions"> |
|
|
|
|
|
<view class="content"> |
|
|
<view class="row row1"> |
|
|
<view class="row row1"> |
|
|
<view class="userInfoBox"> |
|
|
<view class="userInfoBox"> |
|
|
<view class="examNo"> |
|
|
<view class="examNo"> |
|
@ -15,7 +16,7 @@ |
|
|
<view class="avatar"> |
|
|
<view class="avatar"> |
|
|
<image src="@/static/images/avatarbg.png" mode=""></image> |
|
|
<image src="@/static/images/avatarbg.png" mode=""></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="txt">用户:{{ phone }}</view> |
|
|
|
|
|
|
|
|
<view class="txt">用户: <text style="margin-top: 10rpx;">{{ phone }}</text></view> |
|
|
<!-- <view class="txt">性别:男</view> --> |
|
|
<!-- <view class="txt">性别:男</view> --> |
|
|
<view class="txt">类型:{{ usecarStore.carInfo.carTypeName}}</view> |
|
|
<view class="txt">类型:{{ usecarStore.carInfo.carTypeName}}</view> |
|
|
<view class="txt">科目:科目{{ usecarStore.carInfo.stepType==1?'一': '四'}}</view> |
|
|
<view class="txt">科目:科目{{ usecarStore.carInfo.stepType==1?'一': '四'}}</view> |
|
@ -32,25 +33,34 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="answer flex-b"> |
|
|
<view class="answer flex-b"> |
|
|
<view class="lab">您的答案:{{ curOption.answer }}</view> |
|
|
|
|
|
|
|
|
<view class="lab">您的答案: |
|
|
|
|
|
<text v-if="questionBank.types==3">{{ curOption.answer=='true'?'A':'B'}}</text> |
|
|
|
|
|
<text v-else>{{ curOption.answer}}</text> |
|
|
|
|
|
</view> |
|
|
<view class="rightSelect flex"> |
|
|
<view class="rightSelect flex"> |
|
|
<view class="lab">选项:</view> |
|
|
<view class="lab">选项:</view> |
|
|
<view class="optio flex" v-for="(item,index) in questionBank.optionArr" > |
|
|
<view class="optio flex" v-for="(item,index) in questionBank.optionArr" > |
|
|
<view class="optionItem" :class="{ active: curOption.answer.includes(item.key)}" @click="chooseOption(item)">{{item.key}}</view> |
|
|
|
|
|
|
|
|
<view class="optionItem" :class="{ active: curOption.answer?.includes(item.key)}" @click="chooseOption(item)">{{item.key}}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="rightBox"> |
|
|
<view class="rightBox"> |
|
|
<!-- 右边盒子 --> |
|
|
<!-- 右边盒子 --> |
|
|
<table style="width: 100%;height: 100%;"> |
|
|
|
|
|
|
|
|
<table style="width: 100%;height: 100%;" v-if="ansCard.length"> |
|
|
<tr> |
|
|
<tr> |
|
|
<th class="blueItem br">题目</th> |
|
|
<th class="blueItem br">题目</th> |
|
|
<th v-for="(item,index) in 10" class="blueItem br">{{index+1}}列</th> |
|
|
|
|
|
|
|
|
<th v-for="(item,index) in usecarStore.carInfo.stepType==1?10:5" class="blueItem br">{{index+1}}列</th> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr v-for="(item,index) in 10"> |
|
|
|
|
|
|
|
|
<tr v-for="(item,index) in ansCard"> |
|
|
<td class="blueItem bb">{{index+1}}行</td> |
|
|
<td class="blueItem bb">{{index+1}}行</td> |
|
|
<td v-for="(item2,index2) in 10" class="ansItem">{{ item2 }}</td> |
|
|
|
|
|
|
|
|
<td v-for="(item2,index2) in item" class="ansItem" :class="{green: item2.answer==item2.answerMy}" @click="ansCardClick(item2)"> |
|
|
|
|
|
<text v-if="item2.types==3&&item2.answerMy" class="flex" style="justify-content: center;"> |
|
|
|
|
|
<up-icon name="checkmark" color="#55ff7f" size="18" v-if="item2.answer==item2.answerMy"></up-icon> |
|
|
|
|
|
<up-icon name="close" color="#ff0000" size="18" v-else></up-icon> |
|
|
|
|
|
</text> |
|
|
|
|
|
<text v-else>{{ item2.answerMy }}</text> |
|
|
|
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
</view> |
|
|
</view> |
|
@ -60,18 +70,18 @@ |
|
|
<view class="row row2"> |
|
|
<view class="row row2"> |
|
|
<view class="timeBox"> |
|
|
<view class="timeBox"> |
|
|
<view class="h3">考试时间</view> |
|
|
<view class="h3">考试时间</view> |
|
|
<view class="time">15:10</view> |
|
|
|
|
|
|
|
|
<view class="time"><up-count-down :time="info.totalExamTime * 60 * 1000" format="mm:ss" @finish="finishFn" ref="countDownRef"></up-count-down></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="leftTpsBox"> |
|
|
<view class="leftTpsBox"> |
|
|
<view class="card"> |
|
|
<view class="card"> |
|
|
<view class="h3">操作提示</view> |
|
|
<view class="h3">操作提示</view> |
|
|
<view class="txt">本题为单选题,请在备选答案中选择一个你认为正确的答案!</view> |
|
|
|
|
|
|
|
|
<view class="txt">本题为{{types[questionBank.types-1]}},请在备选答案中选择 {{ questionBank.types==2? '多': '一'}}个你认为正确的答案!</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="rightBtnBox"> |
|
|
<view class="rightBtnBox"> |
|
|
<view class="btn hui">上一题</view> |
|
|
|
|
|
<view class="btn hui">下一题</view> |
|
|
|
|
|
<view class="btn" @click="$goPage('/pages/exercises/examResults/examResults')">交卷</view> |
|
|
|
|
|
|
|
|
<button class="btn hui" @click="debounce(nextQuestion(-1), 500)" :class="{disable: currentIndex==0}" :disabled="currentIndex==0">上一题</button> |
|
|
|
|
|
<button class="btn hui" @click="debounce(nextQuestion(1), 500)" :class="{disable: currentIndex>=questionBankList.length-1}" :disabled="currentIndex>=questionBankList.length-1">下一题</button> |
|
|
|
|
|
<view class="btn"@click="handApaper">交 卷</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -92,15 +102,70 @@ |
|
|
</u-popup> |
|
|
</u-popup> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showCommit" mode="center" :closeable="true" round="10" @close="closeCommitPopup" > |
|
|
|
|
|
<view class="commitView"> |
|
|
|
|
|
<view class="commitTit">考试确认窗口</view> |
|
|
|
|
|
<view class="commitTxt">你当前考试答对{{yesNum}}题,答错{{ questionBankList.length-yesNum-noNum}}题,未答{{ noNum }}题。 </view> |
|
|
|
|
|
<view class="commitTxt">1、点击【确认交卷】,将提交考试成绩,考试结束。</view> |
|
|
|
|
|
<view class="commitTxt">2、点击【继续考试】,将关闭本窗口,继续考试。</view> |
|
|
|
|
|
<view class="commitBtn"> |
|
|
|
|
|
<view class="btn border" @click="submitBtnFn">确定交卷</view> |
|
|
|
|
|
<view class="btn" @click="closeCommitPopup">继续考试</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-popup> |
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showNoPass" mode="center" :closeable="true" @close="showNoPass=false" round="10" > |
|
|
|
|
|
<view class="commitView"> |
|
|
|
|
|
<view class="commitTit">考试不合格</view> |
|
|
|
|
|
<view class="commitTxt">学员、您本次成绩为{{grade}}分</view> |
|
|
|
|
|
<view class="commitTxt">考试不合格,预祝您下次顺利</view> |
|
|
|
|
|
<view class="commitBtn"> |
|
|
|
|
|
<view class="btn" @click="goBack">确定</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="djs"> |
|
|
|
|
|
<up-count-down :time="4 * 1000" format="ss" @finish="goBack" style="color: red;"></up-count-down> <view class="djsTxt"> <text style="color: red;">秒</text>自动关闭,自动回到页面</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-popup> |
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showWrong" mode="center" :closeable="true" round="10" @close="showWrongClose" > |
|
|
|
|
|
<view class="commitView"> |
|
|
|
|
|
<view class="commitTit">错题学习</view> |
|
|
|
|
|
<view class="commitTxt">{{ questionBank.title }}</view> |
|
|
|
|
|
<view class="commitTxt" v-for="(item,index) in questionBank.optionArr" > |
|
|
|
|
|
<view class="text"><text >{{item.key}}</text> {{item.text}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="rowBg"> |
|
|
|
|
|
<view class="ans">正确答案: |
|
|
|
|
|
<text v-if="questionBank.types==3">{{ questionBank.answer=='true'?'A':'B'}}</text> |
|
|
|
|
|
<text v-else>{{ questionBank.answer}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="ans blue">你的答案: |
|
|
|
|
|
<text v-if="questionBank.types==3">{{ questionBank.answerMy=='true'?'A':'B'}}</text> |
|
|
|
|
|
<text v-else>{{ questionBank.answerMy}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="commitBtn"> |
|
|
|
|
|
<view class="btn" @click="showWrongClose">继续考试</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="djs"> |
|
|
|
|
|
<view class="djsTxt">页面将在</view> <up-count-down :time="6 * 1000" format="ss" style="color: red;" @finish="showWrongClose" ></up-count-down> <view class="djsTxt"> <text style="color: red;">秒</text> 后自动关闭并返还考试主页面</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-popup> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { detectOrient } from '@/utils/utils.js' |
|
|
import { detectOrient } from '@/utils/utils.js' |
|
|
import { startExamDo, startExam } from '@/config/api.js' |
|
|
|
|
|
|
|
|
import { startExamDo, startExam, questionExam } from '@/config/api.js' |
|
|
import { ref, onMounted, nextTick } from 'vue' |
|
|
import { ref, onMounted, nextTick } from 'vue' |
|
|
|
|
|
|
|
|
|
|
|
import { debounce } from '@/uni_modules/uview-plus'; |
|
|
import { |
|
|
import { |
|
|
onLoad, |
|
|
onLoad, |
|
|
} from "@dcloudio/uni-app" |
|
|
} from "@dcloudio/uni-app" |
|
@ -112,9 +177,19 @@ |
|
|
randomNumber = options.randomNumber |
|
|
randomNumber = options.randomNumber |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const types = ref([ |
|
|
|
|
|
'单选题', |
|
|
|
|
|
'多选题', |
|
|
|
|
|
'判断题' |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
let phone = uni.getStorageSync('loginInfo')?.phone |
|
|
let phone = uni.getStorageSync('loginInfo')?.phone |
|
|
const currentNav = ref('1') |
|
|
|
|
|
|
|
|
const showCommit = ref(false) |
|
|
|
|
|
const showNoPass = ref(false) |
|
|
|
|
|
const showWrong = ref(false) |
|
|
|
|
|
|
|
|
const show = ref(false) |
|
|
const show = ref(false) |
|
|
|
|
|
|
|
|
onMounted(()=>{ |
|
|
onMounted(()=>{ |
|
|
detectOrient('#brushQuestions') |
|
|
detectOrient('#brushQuestions') |
|
|
}) |
|
|
}) |
|
@ -123,13 +198,13 @@ |
|
|
show.value = true |
|
|
show.value = true |
|
|
} |
|
|
} |
|
|
function goBack() { |
|
|
function goBack() { |
|
|
console.log('返回吧') |
|
|
|
|
|
uni.navigateBack() |
|
|
uni.navigateBack() |
|
|
} |
|
|
} |
|
|
// 请求数据 |
|
|
// 请求数据 |
|
|
const questionBank = ref({}) |
|
|
const questionBank = ref({}) |
|
|
const questionBankList = ref([]) |
|
|
const questionBankList = ref([]) |
|
|
let examInfo = ref([]) |
|
|
|
|
|
|
|
|
let ansCard = ref([]) |
|
|
|
|
|
let examInfo = ref({}) |
|
|
let currentIndex = ref(0) |
|
|
let currentIndex = ref(0) |
|
|
async function startQuestionFn() { |
|
|
async function startQuestionFn() { |
|
|
try{ |
|
|
try{ |
|
@ -145,6 +220,8 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
questionBank.value = res.questionBank[0] |
|
|
questionBank.value = res.questionBank[0] |
|
|
questionBankList.value = res.questionBank |
|
|
questionBankList.value = res.questionBank |
|
|
|
|
|
let size = usecarStore.carInfo.stepType==1?10:5 |
|
|
|
|
|
ansCard.value = chunk(questionBankList.value, size) |
|
|
initOptionArr() |
|
|
initOptionArr() |
|
|
examInfo.value = res |
|
|
examInfo.value = res |
|
|
}catch(e){ |
|
|
}catch(e){ |
|
@ -153,7 +230,23 @@ |
|
|
} |
|
|
} |
|
|
startQuestionFn() |
|
|
startQuestionFn() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 搞个二维数组来 |
|
|
|
|
|
function chunk(arr, size) { |
|
|
|
|
|
if(arr.length==0) return [] |
|
|
|
|
|
let result = [] |
|
|
|
|
|
let tmp = [] |
|
|
|
|
|
arr.forEach((item,index)=>{ |
|
|
|
|
|
if(tmp.length==0) { |
|
|
|
|
|
result.push(tmp) |
|
|
|
|
|
} |
|
|
|
|
|
item.index = index |
|
|
|
|
|
tmp.push(item) |
|
|
|
|
|
if(tmp.length==size) { |
|
|
|
|
|
tmp = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
return result |
|
|
|
|
|
} |
|
|
function initOptionArr() { |
|
|
function initOptionArr() { |
|
|
questionBank.value.optionArr = [] |
|
|
questionBank.value.optionArr = [] |
|
|
let abcd = [ |
|
|
let abcd = [ |
|
@ -177,40 +270,88 @@ |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 如果是判断题 |
|
|
// 如果是判断题 |
|
|
if(questionBank.value.types==3) { |
|
|
|
|
|
questionBank.value.optionArr[0].key1 = 'true' |
|
|
|
|
|
questionBank.value.optionArr[1].key1 = 'false' |
|
|
|
|
|
} |
|
|
|
|
|
console.log(questionBank.value.optionArr) |
|
|
|
|
|
|
|
|
// if(questionBank.value.types==3) { |
|
|
|
|
|
// questionBank.value.optionArr[0].key1 = 'true' |
|
|
|
|
|
// questionBank.value.optionArr[1].key1 = 'false' |
|
|
|
|
|
// } |
|
|
|
|
|
// console.log(questionBank.value.optionArr) |
|
|
} |
|
|
} |
|
|
// 选择答案 |
|
|
// 选择答案 |
|
|
const curOption = ref({}) |
|
|
const curOption = ref({}) |
|
|
async function chooseOption(item) { |
|
|
async function chooseOption(item) { |
|
|
|
|
|
if(questionBank.value.answerMy) return |
|
|
console.log(item) |
|
|
console.log(item) |
|
|
if(questionBank.value.types != 2) { |
|
|
if(questionBank.value.types != 2) { |
|
|
item.answer = item.key |
|
|
item.answer = item.key |
|
|
curOption.value = item |
|
|
curOption.value = item |
|
|
|
|
|
|
|
|
}else if(questionBank.value.types == 2){ |
|
|
}else if(questionBank.value.types == 2){ |
|
|
if(!curOption.value.ans) curOption.value.ans = '' |
|
|
|
|
|
if(curOption.value.ans.includes(item.key)) { |
|
|
|
|
|
curOption.value.ans = curOption.value.ans.replace(item.key, '') |
|
|
|
|
|
|
|
|
if(!curOption.value.answer) curOption.value.answer = '' |
|
|
|
|
|
if(curOption.value.answer.includes(item.key)) { |
|
|
|
|
|
curOption.value.answer = curOption.value.answer.replace(item.key, '') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
curOption.value.ans = curOption.value.ans + item.key |
|
|
|
|
|
|
|
|
curOption.value.answer = (curOption.value.answer + item.key).split('').sort().join('') |
|
|
|
|
|
|
|
|
// console.log(curOption.value.ans) |
|
|
// console.log(curOption.value.ans) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
// 下一题 |
|
|
|
|
|
async function nextQuestion(num) { |
|
|
|
|
|
|
|
|
|
|
|
// 如果有答案,给答题卡上添加 |
|
|
|
|
|
if(curOption.value.answer) { |
|
|
|
|
|
questionBank.value.answerMy = curOption.value.answer |
|
|
|
|
|
if(questionBank.value.types==3) questionBank.value.answerMy = curOption.value.answer=='A'? 'true': 'false' |
|
|
|
|
|
} |
|
|
|
|
|
// 如果答错了 并且是第一次点 |
|
|
|
|
|
if(questionBank.value.answerMy&&questionBank.value.answer != questionBank.value.answerMy&&curOption.value.isNext != 'next') { |
|
|
|
|
|
curOption.value.isNext = 'next' |
|
|
|
|
|
showWrong.value = true |
|
|
|
|
|
if (countDownRef.value) { |
|
|
|
|
|
countDownRef.value.pause(); |
|
|
|
|
|
} |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
curOption.value = {} |
|
|
|
|
|
currentIndex.value = currentIndex.value + num |
|
|
|
|
|
getQuestionFn() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
// 请求下一题 |
|
|
|
|
|
async function getQuestionFn() { |
|
|
|
|
|
console.log(currentIndex.value) |
|
|
|
|
|
questionBank.value = questionBankList.value[currentIndex.value] |
|
|
|
|
|
curOption.value = {} |
|
|
|
|
|
curOption.value.isNext = '' |
|
|
|
|
|
if(questionBank.value.answerMy) curOption.value.answer = questionBank.value.answerMy |
|
|
|
|
|
initOptionArr() |
|
|
|
|
|
} |
|
|
|
|
|
// 点击题卡片里 |
|
|
|
|
|
function ansCardClick(item) { |
|
|
|
|
|
currentIndex.value = item.index |
|
|
|
|
|
getQuestionFn() |
|
|
|
|
|
} |
|
|
|
|
|
function goOnExam() { |
|
|
|
|
|
showWrong.value = false |
|
|
} |
|
|
} |
|
|
// 交卷 |
|
|
// 交卷 |
|
|
|
|
|
let grade = ref(0) |
|
|
async function submitBtnFn() { |
|
|
async function submitBtnFn() { |
|
|
let wrongArr = questionBankList.value.filter(item=>item.yes!=1) |
|
|
|
|
|
|
|
|
// 如果是最后一题也把答案交上去 |
|
|
|
|
|
if(curOption.value.answer) questionBank.value.answerMy = curOption.value.answer |
|
|
|
|
|
let wrongArr = questionBankList.value.filter(item=>item.answer!=item.answerMy) |
|
|
let worngId = wrongArr.map(item=>item.id).join(',') |
|
|
let worngId = wrongArr.map(item=>item.id).join(',') |
|
|
|
|
|
// grade = 100分/总题数 * 做对题数 |
|
|
|
|
|
grade.value = info.value.funllScore / questionBankList.value.length * (questionBankList.value.length - wrongArr.length) |
|
|
let obj = { |
|
|
let obj = { |
|
|
"answer": null, |
|
|
"answer": null, |
|
|
"carType": usecarStore.carInfo.carType, |
|
|
"carType": usecarStore.carInfo.carType, |
|
|
"examId": examInfo.value.id, |
|
|
"examId": examInfo.value.id, |
|
|
"examType": 1, |
|
|
|
|
|
"grade": questionBankList.value.length - wrongArr.length, |
|
|
|
|
|
|
|
|
"examType": 2, |
|
|
|
|
|
"grade": grade.value, |
|
|
"isEnd": 1, |
|
|
"isEnd": 1, |
|
|
"pass": 1, |
|
|
"pass": 1, |
|
|
"sort": examInfo.value.sort, |
|
|
"sort": examInfo.value.sort, |
|
@ -220,12 +361,69 @@ |
|
|
} |
|
|
} |
|
|
const res = await startExamDo(obj) |
|
|
const res = await startExamDo(obj) |
|
|
console.log(res) |
|
|
console.log(res) |
|
|
uni.$u.toast('已交卷') |
|
|
|
|
|
|
|
|
// uni.$u.toast('已交卷') |
|
|
|
|
|
if(showCommit.value) showCommit.value = false |
|
|
|
|
|
if(grade.value<info.value.score) { |
|
|
|
|
|
showNoPass.value = true |
|
|
|
|
|
}else { |
|
|
setTimeout(()=>{ |
|
|
setTimeout(()=>{ |
|
|
uni.navigateBack() |
|
|
uni.navigateBack() |
|
|
},1500) |
|
|
},1500) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
function finishFn() { |
|
|
|
|
|
uni.$u.toast('考试时间已到,准备自动为您交卷') |
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
submitBtnFn() |
|
|
|
|
|
},1500) |
|
|
|
|
|
} |
|
|
|
|
|
// 点击交卷 |
|
|
|
|
|
const countDownRef = ref(null) |
|
|
|
|
|
const yesNum = ref(0) |
|
|
|
|
|
const noNum = ref(0) |
|
|
|
|
|
function handApaper() { |
|
|
|
|
|
// 如果是最后一题也要把题算上去 |
|
|
|
|
|
if(curOption.value.answer) questionBank.value.answerMy = curOption.value.answer |
|
|
|
|
|
|
|
|
|
|
|
yesNum.value = questionBankList.value.filter(item=>item.answer==item.answerMy).length |
|
|
|
|
|
noNum.value = questionBankList.value.filter(item=>item.answerMy==undefined).length |
|
|
|
|
|
console.log(questionBankList.value) |
|
|
|
|
|
// 不有没有做完的题 |
|
|
|
|
|
if(noNum) { |
|
|
|
|
|
showCommit.value = true |
|
|
|
|
|
if (countDownRef.value) { |
|
|
|
|
|
countDownRef.value.pause(); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
submitBtnFn() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 关闭交卷弹框 |
|
|
|
|
|
function closeCommitPopup() { |
|
|
|
|
|
showCommit.value = false |
|
|
|
|
|
if (countDownRef.value) { |
|
|
|
|
|
countDownRef.value.start(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 关闭错题弹框 |
|
|
|
|
|
function showWrongClose() { |
|
|
|
|
|
showWrong.value = false |
|
|
|
|
|
if (countDownRef.value) { |
|
|
|
|
|
countDownRef.value.start(); |
|
|
|
|
|
} |
|
|
|
|
|
curOption.value = {} |
|
|
|
|
|
currentIndex.value = currentIndex.value + 1 |
|
|
|
|
|
getQuestionFn() |
|
|
|
|
|
} |
|
|
|
|
|
// 合格标准 |
|
|
|
|
|
let info = ref({}) |
|
|
|
|
|
async function questionExamFn() { |
|
|
|
|
|
const {data:res} = await questionExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType}) |
|
|
|
|
|
info.value = res |
|
|
|
|
|
} |
|
|
|
|
|
questionExamFn() |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
@ -428,7 +626,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.rightBox { |
|
|
.rightBox { |
|
|
flex: 1; |
|
|
|
|
|
|
|
|
flex: 1.4; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
|
|
|
|
|
|
table { |
|
|
table { |
|
@ -450,9 +648,9 @@ |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
border-bottom: 1px solid #E1DFDF; |
|
|
border-bottom: 1px solid #E1DFDF; |
|
|
border-right: 1px solid #E1DFDF; |
|
|
border-right: 1px solid #E1DFDF; |
|
|
color: green; |
|
|
|
|
|
|
|
|
color: #ff0000; |
|
|
&.green { |
|
|
&.green { |
|
|
color: green; |
|
|
|
|
|
|
|
|
color: #55ff7f; |
|
|
} |
|
|
} |
|
|
&.red { |
|
|
&.red { |
|
|
color: red; |
|
|
color: red; |
|
@ -527,17 +725,25 @@ |
|
|
// justify-content: space-between; |
|
|
// justify-content: space-between; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
.btn { |
|
|
.btn { |
|
|
width: 123rpx; |
|
|
|
|
|
// padding: 0 24rpx; |
|
|
|
|
|
margin-left: 20rpx; |
|
|
|
|
|
|
|
|
width: 133rpx; |
|
|
|
|
|
margin: 0 0 0 20rpx; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
font-size: 24rpx; |
|
|
font-size: 24rpx; |
|
|
height: 60rpx; |
|
|
height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
background: #F4F4F4; |
|
|
|
|
|
border: 1px solid #E1DFDF; |
|
|
|
|
|
|
|
|
background: #3776FF; |
|
|
line-height: 60rpx; |
|
|
line-height: 60rpx; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-radius: 8rpx; |
|
|
|
|
|
&.disable { |
|
|
|
|
|
opacity: 0.4; |
|
|
|
|
|
} |
|
|
|
|
|
&.hui { |
|
|
background: #F4F4F4; |
|
|
background: #F4F4F4; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
// border: 1rpx solid #E1DFDF; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -547,7 +753,7 @@ |
|
|
|
|
|
|
|
|
.picBox { |
|
|
.picBox { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
flex: 2; |
|
|
|
|
|
|
|
|
flex: 1.8; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
border: 1px solid #F0F0F0; |
|
|
border: 1px solid #F0F0F0; |
|
|
padding: 20rpx; |
|
|
padding: 20rpx; |
|
@ -567,5 +773,89 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.commitView { |
|
|
|
|
|
width: 780rpx; |
|
|
|
|
|
// height: 400rpx; |
|
|
|
|
|
background: #FFFFFF; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
padding: 40rpx; |
|
|
|
|
|
.commitTit { |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
color: #333333; |
|
|
|
|
|
line-height: 40rpx; |
|
|
|
|
|
margin-bottom: 34rpx; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.commitTxt { |
|
|
|
|
|
font-family: PingFang SC; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
color: #333333; |
|
|
|
|
|
line-height: 42rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.rowBg { |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
height: 64rpx; |
|
|
|
|
|
background: #F4F4F4; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
margin-top: 20rpx; |
|
|
|
|
|
color: #333333; |
|
|
|
|
|
line-height: 64rpx; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding: 0 0 0 20rpx; |
|
|
|
|
|
.blue { |
|
|
|
|
|
color: #3776FF; |
|
|
|
|
|
margin-left: 30rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.commitBtn { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
margin: 50rpx 0 20rpx 0; |
|
|
|
|
|
.btn.border { |
|
|
|
|
|
background: none; |
|
|
|
|
|
color: #3776FF; |
|
|
|
|
|
border: 1px solid #3776FF; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
|
|
width: 180rpx; |
|
|
|
|
|
height: 60rpx; |
|
|
|
|
|
background: #3776FF; |
|
|
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
line-height: 60rpx; |
|
|
|
|
|
margin: 0 20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.djs { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
margin-top: 6rpx; |
|
|
|
|
|
.djsTxt { |
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
color: #999; |
|
|
|
|
|
margin: -4rpx 0 0 2rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
|
.djs { |
|
|
|
|
|
:deep .u-count-down__text { |
|
|
|
|
|
color: red !important; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |