Browse Source

总部移动端筛选全国数据

zhujindu 7 months ago
parent
commit
0643870c67
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/views/historicalVisit/historAllVisit.vue

+ 3 - 4
src/views/historicalVisit/historAllVisit.vue

@@ -472,10 +472,13 @@ export default {
         if (isFirstrequest) {
         if (isFirstrequest) {
           if (this.powerGrade == 5) {
           if (this.powerGrade == 5) {
             this.companyList = [{ deptName: '全部公司', deptId: '' }].concat(res.data.company);
             this.companyList = [{ deptName: '全部公司', deptId: '' }].concat(res.data.company);
+            // 初始化第一次请求 公司/总部身份 不需要请求大区、销售部、业务员数据
+            this.onSearch();
           } else {
           } else {
             this.companyList = res.data.company;
             this.companyList = res.data.company;
             this.companyName = res.data.company[0].deptName;
             this.companyName = res.data.company[0].deptName;
             this.companyCode = res.data.company[0].deptId;
             this.companyCode = res.data.company[0].deptId;
+            this.getDeptInfo('dept', 'regionList');
           }
           }
         } else {
         } else {
           if (activaType == 'regionList') {
           if (activaType == 'regionList') {
@@ -530,10 +533,6 @@ export default {
         //     this.userList = [{ nickName: '全部业务员', userId: '' }].concat(res.data.user);
         //     this.userList = [{ nickName: '全部业务员', userId: '' }].concat(res.data.user);
         //   }
         //   }
         // }
         // }
-        // 初始化第一次请求
-        if (isFirstrequest) {
-          this.onSearch();
-        }
       });
       });
     },
     },
   },
   },