修改
This commit is contained in:
@@ -33,10 +33,10 @@
|
||||
|
||||
</div>
|
||||
<div class="options" v-if="item.type=='judge'">
|
||||
<div class="opt" @click="selected3('正确')" :class="item.choice=='正确'?'active':''">
|
||||
<div class="opt" @click="selected3('正确',index)" :class="item.choice=='正确'?'active':''">
|
||||
<span>正确</span>
|
||||
</div>
|
||||
<div class="opt" @click="selected3('错误')" :class="item.choice=='错误'?'active':''">
|
||||
<div class="opt" @click="selected3('错误',index)" :class="item.choice=='错误'?'active':''">
|
||||
<span>错误</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,8 +164,9 @@ function queryData(){
|
||||
userId: userInfo.value.userId,
|
||||
examPaperId:rows.value.examPaperId
|
||||
},'post',9100,header).then((resData) => {
|
||||
if(resData&&resData.code==200){
|
||||
elapsedTime.value=(rows.value.timeLimit*60)
|
||||
resData.forEach((item,i)=>{
|
||||
resData.data.forEach((item,i)=>{
|
||||
if(item.type=='multiple'){
|
||||
item.choice=[]
|
||||
}else{
|
||||
@@ -175,6 +176,7 @@ function queryData(){
|
||||
problemList.value.push({index:i+1,whether:""})
|
||||
})
|
||||
start()
|
||||
}
|
||||
});
|
||||
}else if(rows.value.types==2){
|
||||
$api.myRequest('/train/public/trainExamDash/continueExam', {
|
||||
@@ -190,11 +192,13 @@ function queryData(){
|
||||
item.submitAnswers=true
|
||||
}else{
|
||||
item.choice=[]
|
||||
item.submitAnswers=false
|
||||
}
|
||||
}else{
|
||||
if(item.choosed){
|
||||
item.choice=item.choosed;
|
||||
item.submitAnswers=true
|
||||
item.submitAnswers=false
|
||||
}else{
|
||||
item.choice=""
|
||||
}
|
||||
@@ -233,14 +237,13 @@ function submit(){
|
||||
}
|
||||
let header={
|
||||
'Authorization':Authorization.value,
|
||||
'Content-Type':"application/json"
|
||||
'Content-Type':"application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/train/public/trainExamDash/submitAnswer', parm,'post',9100,header).then((resData) => {
|
||||
if(resData&&resData.code==200){
|
||||
problemData.value[indexs].submitAnswers=true
|
||||
if(problemData.value.length==questionIndex.value){
|
||||
$api.msg('已经是最后一题了', '请仔细检查后交卷')
|
||||
|
||||
$api.msg('已经是最后一题了,请仔细检查后交卷!')
|
||||
}else{
|
||||
questionIndex.value+=1
|
||||
}
|
||||
@@ -266,18 +269,7 @@ function complete(){
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$confirm((arr.length>0?'第'+arr.join(",")+'题还未作答,':'请仔细检查试卷 ,')+'确认是否交卷?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
onpaper()
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
function onpaper(){
|
||||
@@ -290,7 +282,7 @@ function onpaper(){
|
||||
}
|
||||
let header={
|
||||
'Authorization':Authorization.value,
|
||||
'Content-Type':"application/json"
|
||||
'Content-Type':"application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/train/public/trainExamDash/submitExam', parm,'post',9100,header).then((resData) => {
|
||||
if(resData&&resData.code==200){
|
||||
@@ -371,7 +363,17 @@ function switchs(i){
|
||||
dialogVisible.value=false
|
||||
};
|
||||
function exit(){
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '直接退出是不计分的, 确定要退出吗?',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
navBack()
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user