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