|
@@ -23,10 +23,11 @@
|
|
|
filterable
|
|
|
:remote-method="getCourses"
|
|
|
remote
|
|
|
+ clearable
|
|
|
placeholder="请选择"
|
|
|
+ @clear="getCourses('')"
|
|
|
>
|
|
|
- <el-option key="ALL" label="请选择" value="ALL"></el-option>
|
|
|
- <el-option key label="公用" value></el-option>
|
|
|
+ <el-option label="公用" value="-1"></el-option>
|
|
|
<el-option
|
|
|
v-for="item in courseInfoSelect"
|
|
|
:key="item.courseId"
|
|
@@ -330,20 +331,13 @@ export default {
|
|
|
},
|
|
|
//查询所有课程
|
|
|
getCourses(query) {
|
|
|
- query = query.trim();
|
|
|
- if (query) {
|
|
|
- if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
|
|
|
- this.courseLoading = true;
|
|
|
- this.$http
|
|
|
- .get(QUESTION_API + "/course/query?name=" + query + "&enable=true")
|
|
|
- .then((response) => {
|
|
|
- this.courseList = response.data;
|
|
|
- this.courseLoading = false;
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.courseList = [];
|
|
|
- }
|
|
|
+ this.courseLoading = true;
|
|
|
+ this.$http
|
|
|
+ .get(QUESTION_API + "/course/query?name=" + query + "&enable=true")
|
|
|
+ .then((response) => {
|
|
|
+ this.courseList = response.data;
|
|
|
+ this.courseLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
getType(val) {
|
|
|
if (val == "ENSEMBLE") {
|
|
@@ -376,6 +370,8 @@ export default {
|
|
|
}
|
|
|
if (this.formSearch.courseName) {
|
|
|
this.getCourses(this.formSearch.courseName);
|
|
|
+ } else {
|
|
|
+ this.getCourses("");
|
|
|
}
|
|
|
this.searchPaperStructs();
|
|
|
},
|