|
|
|
@ -11,7 +11,12 @@ |
|
|
|
|
> |
|
|
|
|
<el-form-item label="所属题库" prop="cid"> |
|
|
|
|
<el-select v-model="topicForm.cid" clearable placeholder="请选择所属题库"> |
|
|
|
|
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option> |
|
|
|
|
<template v-for="(item,index) in quesBankList"> |
|
|
|
|
<el-option :key="index" :label="item.typeName" :value="item.cid"></el-option> |
|
|
|
|
<template v-for="(item1,index1) in item.secondColumn"> |
|
|
|
|
<el-option class="second" :key="index1" :label="item1.typeName" :value="item1.cid"></el-option> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="所属课程" prop="courses"> |
|
|
|
@ -51,44 +56,44 @@ |
|
|
|
|
|
|
|
|
|
<el-form-item label="选项" prop="optionA" v-if="topicForm.questionType != '填空题' && topicForm.questionType != '简答题'"> |
|
|
|
|
<template v-if="topicForm.questionType == '判断题'"> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>A</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.judgeOptionA" disabled></el-input> |
|
|
|
|
<el-radio v-model="topicForm.aisTrue" label="1">设为正确答案</el-radio> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>B</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.judgeOptionB" disabled></el-input> |
|
|
|
|
<el-radio v-model="topicForm.aisTrue" label="2">设为正确答案</el-radio> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>A</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionA"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.aisTrue">设为正确答案</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>B</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionB"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.bisTrue">设为正确答案</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>C</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionC"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.cisTrue">设为正确答案</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>D</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionD"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.disTrue">设为正确答案</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around bt"> |
|
|
|
|
<div class="input flex j-around a-center m-b-15"> |
|
|
|
|
<span>E</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionE"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.eisTrue">设为正确答案</el-checkbox> |
|
|
|
|
</div> |
|
|
|
|
<div class="input flex_around"> |
|
|
|
|
<div class="input flex j-around a-center"> |
|
|
|
|
<span>F</span> |
|
|
|
|
<el-input placeholder="请输入题目" v-model="topicForm.optionF"></el-input> |
|
|
|
|
<el-checkbox v-model="topicForm.fisTrue">设为正确答案</el-checkbox> |
|
|
|
@ -176,7 +181,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapState('user', [ |
|
|
|
|
'userId' |
|
|
|
|
'userId','clientId' |
|
|
|
|
]) |
|
|
|
|
}, |
|
|
|
|
components: { quill }, |
|
|
|
@ -245,16 +250,13 @@ export default { |
|
|
|
|
getQuesBank() { |
|
|
|
|
let data = { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 10000 |
|
|
|
|
pageSize: 10000, |
|
|
|
|
schoolId: this.clientId, |
|
|
|
|
source: 1 |
|
|
|
|
} |
|
|
|
|
this.$post(this.api.listByPage,data) |
|
|
|
|
.then(res => { |
|
|
|
|
let list = res.data.list.list |
|
|
|
|
let result = list |
|
|
|
|
list.map((n,i) => { |
|
|
|
|
result = result.concat(n.secondColumn) |
|
|
|
|
}) |
|
|
|
|
this.quesBankList = result |
|
|
|
|
this.quesBankList = res.data.list.list |
|
|
|
|
}) |
|
|
|
|
.catch(err => {}) |
|
|
|
|
}, |
|
|
|
@ -435,20 +437,12 @@ export default { |
|
|
|
|
/deep/.el-radio{ |
|
|
|
|
margin-right: 15px; |
|
|
|
|
} |
|
|
|
|
.second{ |
|
|
|
|
padding-left: 46px !important; |
|
|
|
|
} |
|
|
|
|
::v-deep .el-checkbox-group{ |
|
|
|
|
font-size: 2px; |
|
|
|
|
} |
|
|
|
|
.Upload { |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.bt { |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
} |
|
|
|
|
.flex_around { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-around; |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
.input ::v-deep .el-input { |
|
|
|
|
width: 50%; |
|
|
|
|
} |
|
|
|
|