|
@@ -297,6 +297,8 @@ export default {
|
|
this.getCourses(paperStruct.courseName);
|
|
this.getCourses(paperStruct.courseName);
|
|
this.paperStruct = paperStruct;
|
|
this.paperStruct = paperStruct;
|
|
this.paperDetailStructs = paperStruct.paperDetailStructs;
|
|
this.paperDetailStructs = paperStruct.paperDetailStructs;
|
|
|
|
+ } else {
|
|
|
|
+ this.getCourses("");
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
},
|
|
},
|
|
@@ -527,20 +529,13 @@ export default {
|
|
},
|
|
},
|
|
//查询所有课程
|
|
//查询所有课程
|
|
getCourses(query) {
|
|
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;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|