|
@@ -68,7 +68,7 @@ import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
-import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import { getTeacher, getEmployeeOrgan, getMusicGroupAllClass } from "@/api/buildTeam";
|
|
|
|
|
|
export default {
|
|
|
components: { pagination },
|
|
@@ -105,22 +105,30 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
// 获取分部
|
|
|
- if (!isInit) {
|
|
|
+ if (!this.isInit) {
|
|
|
this.init();
|
|
|
}
|
|
|
|
|
|
},
|
|
|
activated () {
|
|
|
- if (!isInit) {
|
|
|
+ if (!this.isInit) {
|
|
|
this.init();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
init () {
|
|
|
- this.init = true;
|
|
|
- this.init = false;
|
|
|
+ this.isInit = true;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- getList () { }
|
|
|
+ getList () {
|
|
|
+ getMusicGroupAllClass().then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.isInit = false;
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.rules.total = res.data.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|