提交 5afd5ef8 authored 作者: lhh's avatar lhh

update

上级 894858fc
......@@ -2,7 +2,16 @@
<el-dialog title="添加考试" v-bind="$attrs" v-on="$listeners" width="400px" :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules">
<el-form-item prop="exams_id">
<el-select v-model="form.exams_id" multiple filterable placeholder="请选择考试" style="width: 100%">
<el-select
v-model="form.exams_id"
filterable
remote
reserve-keyword
multiple
:remote-method="remoteMethod"
placeholder="请选择考试"
style="width: 100%"
>
<el-option v-for="item in list" :key="item.exam_id" :value="item.exam_id" :label="item.name"></el-option>
</el-select>
</el-form-item>
......@@ -35,10 +44,13 @@ export default {
this.searchClassExam()
},
methods: {
remoteMethod(q) {
this.searchClassExam(q)
},
// 获取添加考试列表
searchClassExam() {
searchClassExam(q) {
// 调用接口
searchClassExam({ id: this.classId }).then(res => {
searchClassExam({ id: this.classId, q: q }).then(res => {
this.list = res.data
})
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论