|
@@ -190,16 +190,20 @@
|
|
<el-form-item label="课程名称" prop="courseId">
|
|
<el-form-item label="课程名称" prop="courseId">
|
|
<el-select
|
|
<el-select
|
|
v-model="coursePropertyForm.courseId"
|
|
v-model="coursePropertyForm.courseId"
|
|
- class="dialog-input-width"
|
|
|
|
|
|
+ :remote-method="getCoursesForAdd"
|
|
|
|
+ :loading="courseAddSearch"
|
|
|
|
+ remote
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
|
|
+ class="dialog-input-width"
|
|
placeholder="请选择课程"
|
|
placeholder="请选择课程"
|
|
|
|
+ @clear="getCoursesForAdd('')"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in courseInfoSelect"
|
|
|
|
- :key="item.courseId"
|
|
|
|
- :label="item.courseInfo"
|
|
|
|
- :value="item.courseId"
|
|
|
|
|
|
+ v-for="item in courseAddList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name + '(' + item.code + ')'"
|
|
|
|
+ :value="item.id"
|
|
>
|
|
>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -303,6 +307,7 @@ import { mapState } from "vuex";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ courseAddSearch: false,
|
|
courseLoading4Search: false,
|
|
courseLoading4Search: false,
|
|
formSearch: {
|
|
formSearch: {
|
|
name: "",
|
|
name: "",
|
|
@@ -319,6 +324,7 @@ export default {
|
|
fileList: [],
|
|
fileList: [],
|
|
|
|
|
|
courseList: [],
|
|
courseList: [],
|
|
|
|
+ courseAddList: [],
|
|
loading: false,
|
|
loading: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
@@ -380,6 +386,7 @@ export default {
|
|
token: this.user.token,
|
|
token: this.user.token,
|
|
};
|
|
};
|
|
this.getCourses("");
|
|
this.getCourses("");
|
|
|
|
+ this.getCoursesForAdd("");
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -681,6 +688,15 @@ export default {
|
|
this.courseLoading4Search = false;
|
|
this.courseLoading4Search = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getCoursesForAdd(query) {
|
|
|
|
+ this.courseAddSearch = true;
|
|
|
|
+ this.$httpWithMsg
|
|
|
|
+ .get(QUESTION_API + "/course/query?name=" + query)
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.courseAddList = response.data;
|
|
|
|
+ this.courseAddSearch = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
removeItem() {
|
|
removeItem() {
|
|
sessionStorage.removeItem("course_property_name");
|
|
sessionStorage.removeItem("course_property_name");
|
|
sessionStorage.removeItem("course_property_courseId");
|
|
sessionStorage.removeItem("course_property_courseId");
|