Explorar o código

fix:人员统计-详情团队管理check接口调用

刘恒 %!s(int64=2) %!d(string=hai) anos
pai
achega
23f9e37a78
Modificáronse 1 ficheiros con 16 adicións e 17 borrados
  1. 16 17
      src/pages/personnelManage/front/teammanage.vue

+ 16 - 17
src/pages/personnelManage/front/teammanage.vue

@@ -194,11 +194,13 @@ export default {
     };
   },
   watch: {
-    // $route(val) {
-    //   // console.log(val);
-    // },
+    teamTab() {
+      // console.log(val);
+      this.getList();
+    },
   },
   created() {
+    this.getTeamList();
     this.getList();
   },
   methods: {
@@ -233,33 +235,30 @@ export default {
     },
     getList() {
       this.$API.personnel
-        .getTeamList({
+        .getTeamUserList({
           userId: this.$route.query.userId,
+          pageNum: this.pageInfo.pageNum,
+          pageSize: this.pageInfo.pageSize,
           ...this.formState,
+          type: this.teamTab,
         })
         .then((res) => {
-          // console.log(res);
           if (res.data.code === 200) {
-            this.teamList = [...res.data.data.hzList];
-            // this.teamList.unshift({
-            //   totalManpower: this.$route.query.totalManpower,
-            //   totalPremium: this.$route.query.totalPremium,
-            //   orderManpower: this.$route.query.orderManpower,
-            //   teamLevel: "汇总",
-            // });
+            this.userList = [...res.data.data.records];
+            this.pageInfo.total = res.data.data.total;
           }
         });
+    },
+    getTeamList() {
       this.$API.personnel
-        .getTeamUserList({
+        .getTeamList({
           userId: this.$route.query.userId,
-          pageNum: this.pageInfo.pageNum,
-          pageSize: this.pageInfo.pageSize,
           ...this.formState,
         })
         .then((res) => {
+          // console.log(res);
           if (res.data.code === 200) {
-            this.userList = [...res.data.data.records];
-            this.pageInfo.total = res.data.data.total;
+            this.teamList = [...res.data.data.hzList];
           }
         });
     },