|
@@ -273,7 +273,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- this.coursePropertyId = this.$route.params.id;
|
|
|
+ // this.coursePropertyId = this.$route.params.id;
|
|
|
this.searchProperty();
|
|
|
},
|
|
|
mounted() {
|
|
@@ -384,10 +384,25 @@ export default {
|
|
|
this.courseProperty = JSON.parse(coursePropertyStorge);
|
|
|
this.getCourses(this.courseProperty.courseId);
|
|
|
}
|
|
|
+ // this.$http
|
|
|
+ // .get(QUESTION_API + "/property/all/" + this.coursePropertyId)
|
|
|
+ // .then((response) => {
|
|
|
+ // this.treeData = response.data;
|
|
|
+ // for (var i = 0; i < this.treeData.length; i++) {
|
|
|
+ // var property = this.treeData[i];
|
|
|
+ // this.ids.push(property.id);
|
|
|
+ // }
|
|
|
+ // this.loading = false;
|
|
|
+ // });
|
|
|
this.$http
|
|
|
- .get(QUESTION_API + "/property/all/" + this.coursePropertyId)
|
|
|
+ .post(
|
|
|
+ QUESTION_API +
|
|
|
+ "/property/all/by/course?courseId=" +
|
|
|
+ this.$route.params.id
|
|
|
+ )
|
|
|
.then((response) => {
|
|
|
- this.treeData = response.data;
|
|
|
+ this.coursePropertyId = response.data.coursePropertyId;
|
|
|
+ this.treeData = response.data.propertys;
|
|
|
for (var i = 0; i < this.treeData.length; i++) {
|
|
|
var property = this.treeData[i];
|
|
|
this.ids.push(property.id);
|