|
|
@@ -11,9 +11,10 @@
|
|
|
|
|
|
<div class="content">
|
|
|
<div class="right_btn" v-if="errorType !== 1">
|
|
|
- <el-button size="medium" disabled
|
|
|
+ <el-button size="medium" :disabled="!canBtnClick"
|
|
|
@click="downloadDialogVisible = true; isVariation = 0">下载错题本</el-button>
|
|
|
- <el-button type="primary" size="medium" @click="downLoadPapers">下载个性化提升手册</el-button>
|
|
|
+ <el-button :disabled="!canBtnClick" type="primary" size="medium"
|
|
|
+ @click="downLoadPapers">下载个性化提升手册</el-button>
|
|
|
</div>
|
|
|
|
|
|
<Download :visible.sync="downloadDialogVisible" :examId="examId" :subjectCode="subjectCode"
|
|
|
@@ -40,7 +41,7 @@
|
|
|
:imgBase64="question.questionImg" />
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div>暂无数据</div>
|
|
|
+ <div style="color: #999;">暂无数据</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
|
@@ -114,14 +115,20 @@
|
|
|
|
|
|
<div class="content" v-if="question.parseShow && !question.answerShow">
|
|
|
<div class="flex">
|
|
|
- <div class="flex_left" style="line-height: 28px;">【知识点】</div>
|
|
|
- <div class="flex_right">
|
|
|
- <template v-if="question.knowledgePoint && question.knowledgePoint.length > 0">
|
|
|
- <template v-for="(know, index) in question.knowledgePoint">
|
|
|
- <KnowledgePoint :text="know" />
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
+ <template v-if="question.knowledgePoint && question.knowledgePoint.length > 0">
|
|
|
+ <div class="flex_left" style="line-height: 28px;">【知识点】</div>
|
|
|
+ <div class="flex_right">
|
|
|
+ <KnowledgePoint v-for="know in question.knowledgePoint" :key="know"
|
|
|
+ :text="know" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <div class="flex_left">【知识点】</div>
|
|
|
+ <div class="flex_right">
|
|
|
+ <div style="color: #999;">暂无数据</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
|
|
|
<div class="flex">
|
|
|
@@ -141,7 +148,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
|
|
- <div>暂无数据</div>
|
|
|
+ <div style="color: #999;">暂无数据</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -155,22 +162,26 @@
|
|
|
:imgBase64="question.parseImg" />
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div>暂无数据</div>
|
|
|
+ <div style="color: #999;">暂无数据</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="content" style="height: 300px;"
|
|
|
- v-if="question.answerShow && !question.parseShow">
|
|
|
+ <div class="content" v-if="question.answerShow && !question.parseShow">
|
|
|
<template v-if="question.isObjective === 1">
|
|
|
<div v-if="question.studentAnswer">{{ question.studentAnswer }}</div>
|
|
|
- <div v-else>暂无数据</div>
|
|
|
+ <div v-else style="color: #999;">暂无数据</div>
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
|
|
- <PaperImage :imageIndex="index" :scoreFontSize="20" :rtOrWrSize="10"
|
|
|
- :paperImgUrl="picUrl" :drawData="questionVOS" />
|
|
|
+ <template v-if="picUrl && questionVOS">
|
|
|
+ <div style="height: 300px;">
|
|
|
+ <PaperImage :imageIndex="index" :scoreFontSize="20" :rtOrWrSize="10"
|
|
|
+ :paperImgUrl="picUrl" :drawData="questionVOS" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div v-else style="color: #999;">暂无数据</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -292,6 +303,22 @@ export default {
|
|
|
IsVariation() {
|
|
|
return this.$store.state.question.isVariation;
|
|
|
},
|
|
|
+
|
|
|
+ canBtnClick() {
|
|
|
+ const has = this.questionList.find(question => {
|
|
|
+ return !question.questionImg && !question.questionData?.questionStem
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log('has', has)
|
|
|
+
|
|
|
+ if (has) {
|
|
|
+ this.$store.commit('question/setCanDownloanBtnClick', false)
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ this.$store.commit('question/setCanDownloanBtnClick', true)
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
@@ -362,17 +389,22 @@ export default {
|
|
|
questionId: question.questionId,
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- // question.studentAnswer = res.data.studentAnswer;
|
|
|
- const data = res.data.pageVOS[0]
|
|
|
- this.picUrl = data.picUrl;
|
|
|
- this.questionVOS = data.questionVOS.map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- samplingPosition: '{"x":195,"y":247,"page":1}'
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- console.log('questionVOS', this.questionVOS, this.picUrl);
|
|
|
+ if (res.data && res.data.pageVOS && res.data.pageVOS.length > 0) {
|
|
|
+
|
|
|
+
|
|
|
+ const data = res.data.pageVOS[0]
|
|
|
+ this.picUrl = data.picUrl;
|
|
|
+ this.questionVOS = data.questionVOS.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ samplingPosition: '{"x":195,"y":247,"page":1}'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.picUrl = null;
|
|
|
+ this.questionVOS = [];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
question.answerShow = !question.answerShow;
|
|
|
question.parseShow = false
|