|
@@ -420,6 +420,30 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.selectTypeByOid();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selectTypeByOid() {
|
|
|
+ let params = {
|
|
|
+ oid: this.oid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "selectTypeByOid", params)
|
|
|
+ .then((res) => {
|
|
|
+ for (var i = 0; i < res.data[0].length; i++) {
|
|
|
+ for (var j = 0; j < res.data[1].length; j++) {
|
|
|
+ if (res.data[0][i].id == res.data[1][j].pid) {
|
|
|
+ if (!this.CourseTypeJson[res.data[0][i].id]) {
|
|
|
+ this.CourseTypeJson[res.data[0][i].id] = [];
|
|
|
+ }
|
|
|
+ this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$forceUpdate();
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|