|
@@ -11,6 +11,9 @@
|
|
|
<el-form-item label="课程">
|
|
|
<el-select
|
|
|
v-model="searchForm.courseId"
|
|
|
+ :remote-method="getCourses4Search"
|
|
|
+ :loading="courseLoading4Search"
|
|
|
+ remote
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="请选择"
|
|
@@ -241,6 +244,7 @@ export default {
|
|
|
components: { ImportFileDialog, ModifyCard, ProgressDialog },
|
|
|
data() {
|
|
|
return {
|
|
|
+ courseLoading4Search: false,
|
|
|
loading: false,
|
|
|
courseList: [],
|
|
|
searchForm: {
|
|
@@ -290,6 +294,15 @@ export default {
|
|
|
delete window.emitResult;
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCourses4Search(query) {
|
|
|
+ this.courseLoading4Search = true;
|
|
|
+ this.$httpWithMsg
|
|
|
+ .get(QUESTION_API + "/course/query?name=" + query)
|
|
|
+ .then((response) => {
|
|
|
+ this.courseList = response.data;
|
|
|
+ this.courseLoading4Search = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
async getCoursesList() {
|
|
|
const res = await courseQueryApi();
|
|
|
this.courseList = res.data || [];
|