浏览代码

14:07 05/11

11111
mo 5 年之前
父节点
当前提交
faccadfa9b
共有 2 个文件被更改,包括 18 次插入10 次删除
  1. 4 4
      src/templateList.vue
  2. 14 6
      src/views/teamBuild/teamSeting/components/setClassV2.vue

+ 4 - 4
src/templateList.vue

@@ -73,20 +73,20 @@ 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.isInit = false;
     },
     getList () { }
   }

+ 14 - 6
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -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>