Commit e90ee90c authored by 晏成浩's avatar 晏成浩

Merge branch 'feature/20201222_show_student_answer' into 'master'

Feature/20201222 show student answer See merge request !4
parents 575607aa 84fe608b
......@@ -9,27 +9,27 @@
<el-button @click="handleQuestionStop">结束答题</el-button>
<el-button type="danger" @click="$emit('question-exit',false)">退出</el-button>
</div>
<div v-if="quickResponse">
<div v-if="isShowQuickResponse" class="student-as-box">
<div v-if="isShowQuickResponse" class="quick-response-box">
<!-- <div v-if="isShowQuickResponse" class="student-as-box">-->
<div v-if="isShowQuickResponse" class="student-as-box" style="margin: 0;border-color: #42b983">
<img :src="require('@/assets/images/icon-student-avator.png')" alt="">
<div class="info-box">
<p>学生:{{ quickResponse.username }}</p>
<div class="answer-box">
<span>答案:{{quickResponse.answer}}</span>
<span>{{quickResponse.answer}}</span>
</div>
</div>
</div>
</div>
<div v-if="isShowContent" class="answer-dialog" @click="$event.stopPropagation()">
<div v-for="(item,idx) in replyList" :key="idx" class="student-as-box">
<div v-for="(item,idx) in replyList" :key="idx" class="student-as-box" :style="{borderColor:item.answer?'#42b983':'rgba(70, 131, 230, .3)'}">
<img :src="require('@/assets/images/icon-student-avator.png')" alt="">
<div class="info-box">
<p>学生:{{ item.username }}</p>
<div class="answer-box">
<span>答案:</span>
<!-- 没答案 选择题-->
<span v-if="!item.type||item.type===3">{{ item.answer || '正在答题中' }}</span>
<span v-if="!item.type||item.type!==1">{{ item.answer || '正在答题中' }}</span>
<img v-else @click="handleShowImg(item.answer)" :src="item.answer" alt="">
</div>
</div>
......@@ -63,10 +63,15 @@ export default {
console.log('answerList', this.replyList)
},
watch: {
quickResponse(newVal,oldVal) {
if (newVal) {
this.isShowContent = true
}
quickResponse: {
handler(newVal,oldVal) {
console.log('aaaaaaaaaaaa',!newVal)
if (newVal) {
this.isShowQuickResponse = true
}
},
immediate: true
}
},
methods: {
......@@ -136,6 +141,14 @@ export default {
}
}
}
.quick-response-box{
position: fixed;
top: 200px;
left: 110px;
border-radius: 20px;
background: white;
padding: 20px;
}
.answer-dialog {
position: fixed;
top: 20px;
......@@ -158,7 +171,8 @@ export default {
height: 100px;
margin-right: 10px;
border-radius: 10px;
border: 2px solid rgba(70, 131, 230, .3);
border-width: 2px;
border-style: solid;
align-items: center;
display: flex;
padding: 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment