<template>
|
<div style="line-height:1.8">
|
<div v-if="qType==1" v-loading="qLoading">
|
<div class="q-title" v-html="question.title"/>
|
<div class="q-content">
|
<el-radio-group v-model="question.answer" @change="question.finished = true" >
|
<el-radio v-for="item in question.questionItemList" :key="item.prefix" :label="item.prefix" >
|
<span class="question-prefix">{{item.prefix}}.</span>
|
<span v-html="item.content" class="q-item-span-content"></span>
|
</el-radio>
|
</el-radio-group>
|
</div>
|
</div>
|
<div v-else-if="qType==2" v-loading="qLoading">
|
<div class="q-title" v-html="question.title"/>
|
<div class="q-content">
|
<el-checkbox-group v-model="question.answerList" @change="question.finished = true" >
|
<el-checkbox v-for="item in question.questionItemList" :label="item.prefix" :key="item.prefix" >
|
<span class="question-prefix">{{item.prefix}}.</span>
|
<span v-html="item.content" class="q-item-span-content"></span>
|
</el-checkbox>
|
</el-checkbox-group>
|
</div>
|
</div>
|
<div v-else-if="qType==3" v-loading="qLoading">
|
<div class="q-title" v-html="question.title" style="display: inline;margin-right: 10px"/>
|
<span style="padding-right: 10px;">(</span>
|
<el-radio-group v-model="question.answer" @change="question.finished = true" >
|
<el-radio v-for="item in question.questionItemList" :key="item.prefix" :label="item.prefix" >
|
<span v-html="item.content" class="q-item-span-content"></span>
|
</el-radio>
|
</el-radio-group>
|
<span style="padding-left: 10px;">)</span>
|
</div>
|
<div v-else-if="qType==4" v-loading="qLoading">
|
<div class="q-title" v-html="question.title"/>
|
<div>
|
<el-form-item :label="item.prefix" :key="item.prefix" v-for="item in question.questionItemList" label-width="50px" style="margin-top: 10px;margin-bottom: 10px;">
|
<el-input v-model="question.answerList[item.prefix-1]" @change="question.finished = true" />
|
</el-form-item>
|
</div>
|
</div>
|
<div v-else-if="qType === 5 || qType === 7 || qType === 8" v-loading="qLoading">
|
<div class="q-title" v-html="question.title"/>
|
<div>
|
<el-input v-model="question.answer" type="textarea" rows="5" @change="question.finished = true"/>
|
</div>
|
</div>
|
<div v-else-if="qType==6" v-loading="qLoading">
|
<div class="q-title" v-html="question.title"/>
|
<div class="q-content">
|
<!-- todo 题干行增加音频-->
|
<el-radio-group v-model="question.answer" @change="question.finished = true" >
|
<el-radio v-for="item in question.questionItemList" :key="item.prefix" :label="item.prefix" >
|
<span class="question-prefix">{{item.prefix}}.</span>
|
<audio :src="item.content" class="q-item-span-content"></audio>
|
</el-radio>
|
</el-radio-group>
|
</div>
|
</div>
|
</div>
|
|
</template>
|
|
<script>
|
export default {
|
name: 'QuestionShow',
|
props: {
|
question: {
|
type: Object,
|
default: function () {
|
return {}
|
}
|
},
|
qLoading: {
|
type: Boolean,
|
default: false
|
},
|
qType: {
|
type: Number,
|
default: 0
|
}
|
},
|
methods: {
|
}
|
}
|
</script>
|