Преглед изворни кода

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

刘恒 пре 2 година
родитељ
комит
23f9e37a78
1 измењених фајлова са 16 додато и 17 уклоњено
  1. 16 17
      src/pages/personnelManage/front/teammanage.vue

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

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