提交 ae4a660f authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改我的试题

上级 4448187d
...@@ -9,13 +9,9 @@ ...@@ -9,13 +9,9 @@
<div class="title"><slot name="title"></slot></div> <div class="title"><slot name="title"></slot></div>
<div class="tools"> <div class="tools">
<span>选择题型</span> <span>选择题型</span>
<el-radio-group v-model="questionType" @change="handleTypeChange"> <el-select v-model="questionType" placeholder="选择课程" clearable @change="handleTypeChange">
<el-radio :label="0">全部</el-radio> <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
<el-radio :label="1">单选题</el-radio> </el-select>
<el-radio :label="2">多选题</el-radio>
<el-radio :label="6">判断题</el-radio>
<el-radio :label="5">案例题</el-radio>
</el-radio-group>
</div> </div>
</div> </div>
<div class="my-question-list-bd"> <div class="my-question-list-bd">
...@@ -71,7 +67,17 @@ export default { ...@@ -71,7 +67,17 @@ export default {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
selectList: [], selectList: [],
selectId: '' selectId: '',
typeList: [
{ value: 0, label: '全部' },
{ value: 1, label: '单选题' },
{ value: 2, label: '多选题' },
{ value: 3, label: '问答题' },
{ value: 5, label: '案例题' },
{ value: 6, label: '判断题' },
{ value: 7, label: '实操题' },
{ value: 8, label: '情景题' }
]
} }
}, },
computed: { computed: {
...@@ -101,9 +107,9 @@ export default { ...@@ -101,9 +107,9 @@ export default {
api api
.getMyQuestions(params) .getMyQuestions(params)
.then(response => { .then(response => {
const { list, current_total: total } = this.requestCallback ? this.requestCallback(response) : response const { list = [], current_total: total } = this.requestCallback ? this.requestCallback(response) : response
this.total = total this.total = total
this.list = list.map(item => { this.list = list.flat().map(item => {
item.checked = false item.checked = false
return item return item
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论