|
|
@@ -7,7 +7,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
|
|
- <span><strong>KeyPoints: </strong>{{questionvo.keyPoints}}</span>
|
|
|
+ <span><strong>题目类型: </strong>{{questionvo.type}}</span>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
@@ -22,8 +22,8 @@
|
|
|
<el-tag effect="dark" style="margin-right: 2px">{{item}}</el-tag>
|
|
|
</el-tooltip>
|
|
|
</span>
|
|
|
- <span v-else>
|
|
|
- <span>no knowledgeId</span>
|
|
|
+ <span v-else>
|
|
|
+ <span><strong>KnowledgeId: </strong>null</span>
|
|
|
</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -37,7 +37,8 @@
|
|
|
<el-button type="primary" icon="el-icon-edit" circle @click="updateQuestion"></el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1">
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle @click="deleteQuestion"></el-button>
|
|
|
+ <el-button v-if="isDelete === false" type="danger" icon="el-icon-delete" circle @click="deleteQuestion"></el-button>
|
|
|
+ <el-button v-else type="success" icon="el-icon-delete" circle @click="recoverQuestion"></el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
@@ -45,27 +46,44 @@
|
|
|
<div class="bQuestion-card-body">
|
|
|
<div class="bQuestion-card-body-stem">
|
|
|
<MarkdownText :raw="'<strong>题目: </strong>'+questionvo.stem"></MarkdownText>
|
|
|
-<!-- <div v-html="markdownToHTML('<strong>题目: </strong>'+questionvo.stem)" class="markdown-content"></div>-->
|
|
|
</div>
|
|
|
|
|
|
<div class="bQuestion-card-body-options" v-if="isAll">
|
|
|
- <div v-for="(item,index) in questionvo.options">
|
|
|
- <div v-if="index === questionvo.answer" class="correct-answer">{{index}}: {{item}}</div>
|
|
|
- <div v-else>{{index}}: {{item}}</div>
|
|
|
+ <div v-for="(item,index) in questionvo.options" v-if="questionvo.type === 'choice' || questionvo.type === 'multiple_choice'">
|
|
|
+ <div v-if="questionvo.answer.split(';').indexOf(index) !== -1" class="underline-correct-answer">
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <MarkdownText :raw="index+': '+item"></MarkdownText>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-for="index in Object.keys(questionvo.blanks).length" v-if="questionvo.type === 'blank'">
|
|
|
+ <div class="correct-answer">
|
|
|
+ __{{index}}__: {{questionvo.blanks['__'+index+'__']}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="questionvo.type === 'true_false'">
|
|
|
+ <div class="correct_answer"> {{questionvo.answer}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<el-divider v-if="isAll"></el-divider>
|
|
|
|
|
|
<el-row v-if="isAll">
|
|
|
- <el-col :span="4">
|
|
|
- <span><strong>题目类型: </strong>{{questionvo.type}}</span>
|
|
|
+ <el-col v-if="questionvo.type === 'short_answer'">
|
|
|
+ <MarkdownText :raw="'<strong>正确答案: </strong>'+questionvo.answer"></MarkdownText>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row v-if="isAll">
|
|
|
+ <el-col :span="4" v-if="questionvo.type === 'choice' || questionvo.type === 'multiple_choice' || questionvo.type === 'true_false'">
|
|
|
+ <span><strong>正确答案: </strong>{{questionvo.answer}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<span><strong>题目难度: </strong>{{questionvo.weight}}/5</span>
|
|
|
</el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <span><strong>正确答案: </strong>{{questionvo.answer}}</span>
|
|
|
+ <el-col :span="16">
|
|
|
+ <span><strong>KeyPoints: </strong>{{questionvo.keyPoints}}</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
@@ -118,10 +136,8 @@
|
|
|
size="35%"
|
|
|
>
|
|
|
<QuestionUpdater :question="questionvo"/>
|
|
|
-
|
|
|
</el-drawer>
|
|
|
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -161,12 +177,12 @@
|
|
|
curNum: Number,
|
|
|
},
|
|
|
computed: {
|
|
|
-
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
isAll: false,
|
|
|
dialog: false,
|
|
|
+ isDelete: false,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -185,6 +201,7 @@
|
|
|
type: 'success',
|
|
|
message: '删除成功!'
|
|
|
});
|
|
|
+ this.isDelete = true;
|
|
|
}).catch( error => {
|
|
|
console.log(error);
|
|
|
this.$notify.error({
|
|
|
@@ -199,6 +216,7 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+
|
|
|
},
|
|
|
expand(){
|
|
|
if(!this.isAll){
|
|
|
@@ -226,6 +244,9 @@
|
|
|
map1(abbreviation){
|
|
|
return map(abbreviation);
|
|
|
},
|
|
|
+ recoverQuestion(){
|
|
|
+ alert("Delete successfully!");
|
|
|
+ },
|
|
|
toMyDate(instant){
|
|
|
let date = new Date(instant);
|
|
|
var year = date.getFullYear();
|
|
|
@@ -277,25 +298,18 @@
|
|
|
font-size: 18px;
|
|
|
}
|
|
|
|
|
|
- .correct-answer{
|
|
|
+ .underline-correct-answer{
|
|
|
font-family: "Kaiti SC";
|
|
|
font-size: 22px;
|
|
|
color: #f1939c;
|
|
|
font-weight: bold;
|
|
|
text-decoration: underline;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- .markdown-content {
|
|
|
- word-break: break-all;
|
|
|
- white-space: pre-wrap;
|
|
|
- margin-top: 16px;
|
|
|
- p {
|
|
|
- margin-bottom: 0;
|
|
|
- }
|
|
|
- img {
|
|
|
- max-width: 100%;
|
|
|
- }
|
|
|
+ .correct_answer{
|
|
|
+ font-family: "Kaiti SC";
|
|
|
+ font-size: 21px;
|
|
|
+ color: #f1939c;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
-
|
|
|
</style>
|