| | |
| | | export default { |
| | | start: 'Continue testing', |
| | | submission: 'submit', |
| | | down: 'download', |
| | | down: 'download report', |
| | | lastQuestion: 'Last', |
| | | nextQuestion: 'Next', |
| | | recommendedTime: 'Recommended Time:', |
| | |
| | | export default { |
| | | start: 'Continue testing', |
| | | submission: 'submit', |
| | | down: 'download', |
| | | down: 'download report', |
| | | lastQuestion: 'Last', |
| | | nextQuestion: 'Next', |
| | | recommendedTime: 'Recommended Time:', |
| | |
| | | export default { |
| | | start: '继续测试', |
| | | submission: ' 提交', |
| | | down: '下载', |
| | | down: '下载报告', |
| | | lastQuestion: '回到上一题', |
| | | nextQuestion: '下一题', |
| | | recommendedTime: '建议时间:', |
| | |
| | | if (_this.reportTemplateId.trim() === '' || _this.reportTemplateId.trim() === null) { |
| | | examPaperApi.selectTokenId(_this.memberToken).then(re => { |
| | | if (re.response.finish === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg') } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.setReportTemplateId(re.response.reportTemplateId) |
| | | demographyApi.queryLangList(_this.memberToken, _this.reportTemplateId).then(function (result) { |
| | |
| | | // 已经答完了不能答题 |
| | | examPaperApi.selectTokenId(_this.paraMemberToken).then(re => { |
| | | if (re.response.finish === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg') } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.paraMemberToken } }) |
| | | } else if (re.response.status !== '1') { |
| | | _this.$router.push({ path: '/exam/exception', query: { name: '', content: _this.statusInfo[re.response.status] } }) |
| | | } else { |
| | |
| | | let _this = this |
| | | examPaperAnswerApi.answerSubmit(this.answer, _this.memberToken).then(re => { |
| | | if (re.code === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.$message.error(re.message + '/exam/finish') |
| | | } |
| | |
| | | let _this = this |
| | | examPaperAnswerApi.answerSubmit(this.answer, _this.memberToken).then(re => { |
| | | if (re.code === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.$message.error(re.message) |
| | | } |
| | |
| | | <el-main class="align-center"> |
| | | <H1 v-if="content!==null && content.trim()!==''">{{content}}</H1> |
| | | <H1 v-else>{{$t('finishMsg')}}</H1> |
| | | <el-button type="danger" :disabled="downDisable" @click="downReport" round>{{$t('down')}}</el-button> |
| | | <el-button type="danger" v-if ="downDisable" @click="downReport" round>{{$t('down')}}</el-button> |
| | | </el-main> |
| | | </el-container> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import examPaperApi from '@/api/examPaper' |
| | | import {mapState} from "vuex"; |
| | | export default { |
| | | data () { |
| | | return { |
| | | name: this.$route.query.name, |
| | | content: this.$route.query.content, |
| | | downDisable: true, |
| | | tokenId: this.$route.query.tokenId, |
| | | downDisable: false, |
| | | downUrl: '' |
| | | } |
| | | }, |
| | | created () { |
| | | let _this = this |
| | | examPaperApi.selectTesterReport(_this.memberToken).then(re => { |
| | | // 查询报告文件名 |
| | | examPaperApi.selectTesterReport(_this.tokenId).then(re => { |
| | | if (re.code === 0) { |
| | | _this.downDisable = false |
| | | _this.downUrl = re.msg |
| | | _this.downDisable = true |
| | | // 设置下载路径 |
| | | _this.downUrl = '/api/exam/paper/download?fileName=' + re.msg + '&delete=false' |
| | | console.log(re) |
| | | } else { |
| | | console.log(re) |
| | |
| | | beforeDestroy () { |
| | | }, |
| | | methods: { |
| | | // 下载报告 |
| | | downReport: function () { |
| | | let _this = this |
| | | examPaperApi.down(_this.downUrl) |
| | | window.open(_this.downUrl) |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', { memberToken: state => state.memberToken }) |
| | | } |
| | | } |
| | | </script> |
| | |
| | | let answerSubmit = _this.getSubmitAnswerValue() |
| | | examPaperAnswerApi.answerSubmit(answerSubmit, _this.memberToken).then(re => { |
| | | if (re.code === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.$message.error(re.message + '/exam/finish') |
| | | } |
| | |
| | | } |
| | | |
| | | if (_this.isForFinish(i)) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg') } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.memberToken } }) |
| | | } |
| | | } |
| | | // 如果上一题不是本段,则不能返回上一段 |
| | |
| | | examPaperAnswerApi.answerSubmit(answerSubmit, _this.memberToken).then(re => { |
| | | loading.close() |
| | | if (re.code === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.$message.error(re.message + '/exam/finish') |
| | | } |