|
|
|
@ -26,12 +26,12 @@ |
|
|
|
|
open-type="redirect" |
|
|
|
|
v-for="(item, index) in questions" |
|
|
|
|
:class="{ blue: item.is_correct }" |
|
|
|
|
:url="`/pages/topic/question_detail?test_id=${test_id}&e_id=${record_id}&is_analysis=${is_analysis}&index=${index}&txamination_time=${txamination_time}&exam_time=${duration}`" |
|
|
|
|
:url="`/pages/topic/question_detail?test_id=${test_id}&special_id=${special_id}&e_id=${record_id}&is_analysis=${is_analysis}&index=${index}&txamination_time=${txamination_time}&exam_time=${duration}`" |
|
|
|
|
>{{ index + 1 }}</navigator |
|
|
|
|
> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="footer"> |
|
|
|
|
<view v-if="!check_analysis" class="footer"> |
|
|
|
|
<view class="btn" @click="submit">提交考试</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -72,15 +72,19 @@ export default { |
|
|
|
|
loading: false, |
|
|
|
|
is_analysis: 0, |
|
|
|
|
txamination_time: 0, |
|
|
|
|
special_id: 0, |
|
|
|
|
check_analysis: 0, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad({ test_id, record_id, is_analysis, index, txamination_time }) { |
|
|
|
|
onLoad({ test_id, record_id, is_analysis, index, txamination_time, special_id, check_analysis }) { |
|
|
|
|
const exam_time = this.$util.getStorage(`exam_time${test_id}`); |
|
|
|
|
if (exam_time) { |
|
|
|
|
this.exam_time = parseInt(exam_time); |
|
|
|
|
} |
|
|
|
|
this.test_id = test_id; |
|
|
|
|
this.record_id = record_id; |
|
|
|
|
this.special_id = special_id; |
|
|
|
|
this.check_analysis = check_analysis; |
|
|
|
|
this.is_analysis = parseInt(is_analysis); |
|
|
|
|
if (index) { |
|
|
|
|
this.index = parseInt(index); |
|
|
|
@ -139,6 +143,7 @@ export default { |
|
|
|
|
try { |
|
|
|
|
const { data, code, msg } = await submitTestPaper({ |
|
|
|
|
examination_id: this.record_id, |
|
|
|
|
special_id: this.special_id, |
|
|
|
|
type: 2, |
|
|
|
|
duration: this.duration, |
|
|
|
|
}); |
|
|
|
@ -149,7 +154,7 @@ export default { |
|
|
|
|
this.$util.removeStorage("exam_time"); |
|
|
|
|
// this.is_analysis = 1; |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: `/pages/topic/question_result?test_id=${this.test_id}&is_analysis=${this.is_analysis}`, |
|
|
|
|
url: `/pages/topic/question_result?test_id=${this.test_id}&special_id=${this.special_id}&is_analysis=${this.is_analysis}`, |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.$util.showMsg(msg); |
|
|
|
|