Commit 724d6f11 by 陈超

A

parent 15dd877c
...@@ -124,6 +124,7 @@ class IndexAction extends Action ...@@ -124,6 +124,7 @@ class IndexAction extends Action
$this->assign('exams_difficult', $exams_difficult); $this->assign('exams_difficult', $exams_difficult);
// 因页面上此参数使用位置较多,直接传递变量 // 因页面上此参数使用位置较多,直接传递变量
$this->assign('level', $_GET['level']); $this->assign('level', $_GET['level']);
$this->assign('review', $_GET['review']);
$this->assign('order', $order); $this->assign('order', $order);
$this->assign('module_id', $module_id); $this->assign('module_id', $module_id);
$this->assign('exams_subject_id', $cateId); $this->assign('exams_subject_id', $cateId);
......
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
<div class="reportLastBox"> <div class="reportLastBox">
<img class="reportLastBg" src="../img/reBg.png"> <img class="reportLastBg" src="../img/reBg.png">
<div class="reportLastBtns box"> <div class="reportLastBtns box">
<span class="reportLastBtn reportLastBtnL">全部解析</span> <span @click="onAll" class="reportLastBtn reportLastBtnL">全部解析</span>
<span class="reportLastBtn reportLastBtnR">错题解析</span> <span @click="onAll" class="reportLastBtn reportLastBtnR">错题解析</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -104,8 +104,14 @@ ...@@ -104,8 +104,14 @@
created:function() { created:function() {
}, },
mounted:function(){
$("#preloader").hide();
},
methods:{ methods:{
onAll: function() {
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + "{$paper['exams_paper_id']}" + "&joinType=1&preview=true"
window.location.href = url
}
} }
}) })
</script> </script>
\ No newline at end of file
...@@ -326,8 +326,8 @@ ...@@ -326,8 +326,8 @@
<div id="app"> <div id="app">
<div class="testPaperTop box"> <div class="testPaperTop box">
<p class="testPaperTop_time flex1">{{countDown}}</p> <p class="testPaperTop_time flex1">{{countDown}}</p>
<span class="testPaperTop_da">答题卡</span> <span v-show="!review" class="testPaperTop_da">答题卡</span>
<img @click="onCounting" class="testPaperTop_pau" :src="counting ? '__THEME__/img/pau.png' : '__THEME__/img/right_arrow.png'"> <img v-show="!review" @click="onCounting" class="testPaperTop_pau" :src="counting ? '__THEME__/img/pau.png' : '__THEME__/img/right_arrow.png'">
</div> </div>
<div class="testPaperBotm"> <div class="testPaperBotm">
<div class="box"> <div class="box">
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
</div> </div>
<div v-if="current > 1" class="testPaperBtns box"> <div v-if="current > 1" class="testPaperBtns box">
<p @click="onPreviousQuestion" class="testPaperBtn">上一题</p> <p @click="onPreviousQuestion" class="testPaperBtn">上一题</p>
<p @click="onNextQuestion" class="testPaperBtn testPaperBtn1">下一题 / 交卷</p> <p @click="onNextQuestion" class="testPaperBtn testPaperBtn1">{{ review ? 下一题 : (下一题 / 交卷) }}</p>
</div> </div>
<!-- 解析 --> <!-- 解析 -->
<div class="testPaperJiedaPage"> <div class="testPaperJiedaPage">
...@@ -401,6 +401,7 @@ ...@@ -401,6 +401,7 @@
current: 1, current: 1,
paperOptions: {}, paperOptions: {},
counting: true, counting: true,
review: "${review}",
countDown: "00:00:00", countDown: "00:00:00",
timeConsumed: 0, timeConsumed: 0,
expand: false, expand: false,
...@@ -494,6 +495,11 @@ ...@@ -494,6 +495,11 @@
this.paperOptions = {:json_encode($paper_options)}; this.paperOptions = {:json_encode($paper_options)};
this.initAnswerMode() this.initAnswerMode()
this.doCountDown() this.doCountDown()
if(this.review) {
this.countDown = ""
this.expand = true
}
console.log("Review = " + this.review)
console.log(this.info) console.log(this.info)
console.log(this.temp) console.log(this.temp)
console.log(this.paperOptions) console.log(this.paperOptions)
...@@ -532,7 +538,7 @@ ...@@ -532,7 +538,7 @@
} }
}, },
doCountDown: function() { doCountDown: function() {
if(!this.counting) { if(!this.counting || this.review) {
return return
} }
if(this.info.reply_time) { if(this.info.reply_time) {
...@@ -598,9 +604,14 @@ ...@@ -598,9 +604,14 @@
onNextQuestion: function() { onNextQuestion: function() {
if(this.current < this.totalQuestion) { if(this.current < this.totalQuestion) {
this.cacheQuestion() this.cacheQuestion()
if(!this.review) {
this.expand = false
}
this.current += 1 this.current += 1
} else { } else {
this.showFinish = true if(!this.review) {
this.showFinish = true
}
} }
}, },
onPreviousQuestion: function() { onPreviousQuestion: function() {
...@@ -609,6 +620,9 @@ ...@@ -609,6 +620,9 @@
} }
}, },
cacheQuestion: function() { cacheQuestion: function() {
if(this.review) {
return
}
let q = this.currentQuestion let q = this.currentQuestion
let mode = this.finished.hx_firstOf( r => { return r.qId == q.exams_question_id }) let mode = this.finished.hx_firstOf( r => { return r.qId == q.exams_question_id })
if(mode) { if(mode) {
......
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