|
|
@@ -15,7 +15,7 @@
|
|
|
<div class="quesList">
|
|
|
<div class="listItem" v-for="(item, index) in dataList" :key="index">
|
|
|
<div v-if="item.type == 'SCQ'">
|
|
|
- <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 单选</el-tag></div>
|
|
|
+ <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">单选</el-tag></div>
|
|
|
<el-radio-group v-model="item.comment" class="flex-column">
|
|
|
<el-radio class="myRadio" :disabled="data.interactUserStatus == 0?false:true" v-for="(childItem, childIndex) in item.options" :key="childIndex"
|
|
|
:label="childItem.id">{{ childItem.name }}</el-radio>
|
|
|
@@ -23,15 +23,15 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-if="item.type == 'MCQ'">
|
|
|
- <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 多选</el-tag></div>
|
|
|
+ <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">多选</el-tag></div>
|
|
|
<el-checkbox-group v-model="item.comment" class="flex-column">
|
|
|
<el-checkbox class="myRadio" :disabled="data.interactUserStatus == 0?false:true" v-for="(childItem, childIndex) in item.options" :key="childIndex"
|
|
|
:label="childItem.id">{{ childItem.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
<div v-if="item.type == 'SAQ'">
|
|
|
- <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag size="small" type="danger"> 问答</el-tag></div>
|
|
|
- <el-input :disabled="data.interactUserStatus == 0?false:true" type="textarea" :rows="4" placeholder="请输入内容" v-model="item.comment"></el-input>
|
|
|
+ <div class="itemTitle">{{ index + 1 }}. {{ item.description }}<el-tag class="elTag" size="small" type="danger">问答</el-tag></div>
|
|
|
+ <el-input type="textarea" :rows="6" maxlength="200" show-word-limit placeholder="请输入内容" v-model="item.comment"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="data.interactUserStatus == 0" class="footBut">
|
|
|
@@ -76,6 +76,12 @@ export default {
|
|
|
methods: {
|
|
|
save() {
|
|
|
console.log(this.dataList);
|
|
|
+ for(var i=0;i<this.dataList.length;i++){
|
|
|
+ if(!this.dataList[i].comment){
|
|
|
+ this.$message.error('还有题目未完成,无法提交!');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
let dataList = [];
|
|
|
this.dataList.forEach(item => {
|
|
|
if (item.type == "MCQ") {
|
|
|
@@ -134,6 +140,10 @@ export default {
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.myRadio{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ white-space:normal !important;
|
|
|
margin: 10px !important;
|
|
|
}
|
|
|
.flex-column{
|
|
|
@@ -160,6 +170,9 @@ export default {
|
|
|
margin-bottom: 10px;
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
+.elTag{
|
|
|
+ margin-left: 5px;
|
|
|
+}
|
|
|
|
|
|
.userInfo {
|
|
|
width: 65px;
|