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 @@ ...@@ -9,27 +9,27 @@
<el-button @click="handleQuestionStop">结束答题</el-button> <el-button @click="handleQuestionStop">结束答题</el-button>
<el-button type="danger" @click="$emit('question-exit',false)">退出</el-button> <el-button type="danger" @click="$emit('question-exit',false)">退出</el-button>
</div> </div>
<div v-if="quickResponse"> <div v-if="isShowQuickResponse" class="quick-response-box">
<div v-if="isShowQuickResponse" class="student-as-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=""> <img :src="require('@/assets/images/icon-student-avator.png')" alt="">
<div class="info-box"> <div class="info-box">
<p>学生:{{ quickResponse.username }}</p> <p>学生:{{ quickResponse.username }}</p>
<div class="answer-box"> <div class="answer-box">
<span>答案:{{quickResponse.answer}}</span> <span>{{quickResponse.answer}}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-if="isShowContent" class="answer-dialog" @click="$event.stopPropagation()"> <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=""> <img :src="require('@/assets/images/icon-student-avator.png')" alt="">
<div class="info-box"> <div class="info-box">
<p>学生:{{ item.username }}</p> <p>学生:{{ item.username }}</p>
<div class="answer-box"> <div class="answer-box">
<span>答案:</span> <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=""> <img v-else @click="handleShowImg(item.answer)" :src="item.answer" alt="">
</div> </div>
</div> </div>
...@@ -63,10 +63,15 @@ export default { ...@@ -63,10 +63,15 @@ export default {
console.log('answerList', this.replyList) console.log('answerList', this.replyList)
}, },
watch: { watch: {
quickResponse(newVal,oldVal) { quickResponse: {
if (newVal) { handler(newVal,oldVal) {
this.isShowContent = true console.log('aaaaaaaaaaaa',!newVal)
}
if (newVal) {
this.isShowQuickResponse = true
}
},
immediate: true
} }
}, },
methods: { methods: {
...@@ -136,6 +141,14 @@ export default { ...@@ -136,6 +141,14 @@ export default {
} }
} }
} }
.quick-response-box{
position: fixed;
top: 200px;
left: 110px;
border-radius: 20px;
background: white;
padding: 20px;
}
.answer-dialog { .answer-dialog {
position: fixed; position: fixed;
top: 20px; top: 20px;
...@@ -158,7 +171,8 @@ export default { ...@@ -158,7 +171,8 @@ export default {
height: 100px; height: 100px;
margin-right: 10px; margin-right: 10px;
border-radius: 10px; border-radius: 10px;
border: 2px solid rgba(70, 131, 230, .3); border-width: 2px;
border-style: solid;
align-items: center; align-items: center;
display: flex; display: flex;
padding: 10px; 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