|
|
@ -1,6 +1,20 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="app-container" style="text-align:center"> |
|
|
|
<div class="app-container" style="text-align:center"> |
|
|
|
<el-form size="small" :inline="true" label-width="68px"> |
|
|
|
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent> |
|
|
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
|
|
<el-form-item label="车型"> |
|
|
|
|
|
|
|
<el-radio-group v-model="queryParams.carTypeId"> |
|
|
|
|
|
|
|
<el-radio :label="1001">小车</el-radio> |
|
|
|
|
|
|
|
<el-radio :label="1002">摩托车</el-radio> |
|
|
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="科目"> |
|
|
|
|
|
|
|
<el-radio-group v-model="queryParams.subject"> |
|
|
|
|
|
|
|
<el-radio :label="1">科一</el-radio> |
|
|
|
|
|
|
|
<el-radio :label="4">科四</el-radio> |
|
|
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
<el-form-item label="题目"> |
|
|
|
<el-form-item label="题目"> |
|
|
|
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width:400px" @keyup.enter.native="handleQuery" /> |
|
|
|
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width:400px" @keyup.enter.native="handleQuery" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -15,13 +29,13 @@ |
|
|
|
<el-table-column label="题目" align="center" prop="question" min-width="140" /> |
|
|
|
<el-table-column label="题目" align="center" prop="question" min-width="140" /> |
|
|
|
<el-table-column label="选项" align="center" min-width="140"> |
|
|
|
<el-table-column label="选项" align="center" min-width="140"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<p v-if="row.chooseA">a:{{ row.chooseA }}</p> |
|
|
|
<p v-if="row.chooseA">A:{{ row.chooseA }}</p> |
|
|
|
<p v-if="row.chooseB">b:{{ row.chooseB }}</p> |
|
|
|
<p v-if="row.chooseB">B:{{ row.chooseB }}</p> |
|
|
|
<p v-if="row.chooseC">c:{{ row.chooseC }}</p> |
|
|
|
<p v-if="row.chooseC">C:{{ row.chooseC }}</p> |
|
|
|
<p v-if="row.chooseD">d:{{ row.chooseD }}</p> |
|
|
|
<p v-if="row.chooseD">D:{{ row.chooseD }}</p> |
|
|
|
<p v-if="row.chooseE">e:{{ row.chooseE }}</p> |
|
|
|
<p v-if="row.chooseE">E:{{ row.chooseE }}</p> |
|
|
|
<p v-if="row.chooseF">f:{{ row.chooseF }}</p> |
|
|
|
<p v-if="row.chooseF">F:{{ row.chooseF }}</p> |
|
|
|
<p v-if="row.chooseG">g:{{ row.chooseG }}</p> |
|
|
|
<p v-if="row.chooseG">G:{{ row.chooseG }}</p> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="答案" align="center" prop="trueAnswer" min-width="100" /> |
|
|
|
<el-table-column label="答案" align="center" prop="trueAnswer" min-width="100" /> |
|
|
@ -31,7 +45,16 @@ |
|
|
|
<p v-if="row.subject == 4">科四</p> |
|
|
|
<p v-if="row.subject == 4">科四</p> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="是否新规" align="center" min-width="100"> |
|
|
|
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
|
|
|
{{ row.isNew ? '是' : '' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="车型" align="center" min-width="100"> |
|
|
|
|
|
|
|
<template slot-scope="{row}"> |
|
|
|
|
|
|
|
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button> |
|
|
|
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button> |
|
|
@ -65,7 +88,9 @@ export default { |
|
|
|
tableList: [], |
|
|
|
tableList: [], |
|
|
|
// 查询参数 |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
|
queryParams: { |
|
|
|
question: '' |
|
|
|
question: '', |
|
|
|
|
|
|
|
carTypeId: 1001, |
|
|
|
|
|
|
|
subject: 1 |
|
|
|
}, |
|
|
|
}, |
|
|
|
dialogVisible: false, |
|
|
|
dialogVisible: false, |
|
|
|
dialogAddVisible: false |
|
|
|
dialogAddVisible: false |
|
|
@ -87,7 +112,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
/** 搜索按钮操作 */ |
|
|
|
handleQuery() { |
|
|
|
handleQuery() { |
|
|
|
|
|
|
|
if (this.queryParams.question) { |
|
|
|
this.getList(); |
|
|
|
this.getList(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$modal.msgWarning('请输入题目'); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
/** 重置按钮操作 */ |
|
|
|
/** 重置按钮操作 */ |
|
|
|
resetQuery() { |
|
|
|
resetQuery() { |
|
|
|