From 57d08bdd8b425ca9f62b0ca7bc3079a3419674ca Mon Sep 17 00:00:00 2001 From: wangxiaohua <1214073490@qq.com> Date: Mon, 13 Dec 2021 17:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/http.js | 2 +- src/views/Statistics/ConsultantBrand.vue | 14 ++++++++--- src/views/Statistics/ReceptionStatistical.vue | 24 ++++++++++++------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/api/modules/http.js b/src/api/modules/http.js index abf580c..dc317f9 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -468,7 +468,7 @@ export function agentListupdate(query) { //获取楼盘下部门 export function overviewfindList(query) { return request({ - url: 'admin/dept/findList', + url: 'admin/dept/findListByUser', method:'get', params:query }) diff --git a/src/views/Statistics/ConsultantBrand.vue b/src/views/Statistics/ConsultantBrand.vue index 3b13d05..6039d72 100644 --- a/src/views/Statistics/ConsultantBrand.vue +++ b/src/views/Statistics/ConsultantBrand.vue @@ -471,19 +471,27 @@ export default { }); }, deptFindList() { + this.options=[]; // 获取团队 - this.$api.api - .deptFindList({ + this.$api.http.overviewfindList({ houseId: this.houseId, }) .then((res) => { - this.options = [ + let userinfo=JSON.parse(sessionStorage.getItem("zk-userInfo")) + if(userinfo.content.deptType==1){ + this.options.push(...res.data); + this.deptId= this.options[0].deptId + }else{ + this.options = [ { name: "全部", deptId: "", }, ]; + this.deptId=''; this.options.push(...res.data); + } + this.accountRank(); }); }, diff --git a/src/views/Statistics/ReceptionStatistical.vue b/src/views/Statistics/ReceptionStatistical.vue index f257618..d027b80 100644 --- a/src/views/Statistics/ReceptionStatistical.vue +++ b/src/views/Statistics/ReceptionStatistical.vue @@ -387,18 +387,24 @@ export default { }, deptFindList() { // 获取团队 - this.$api.api - .deptFindList({ + this.$api.http.overviewfindList({ houseId: this.houseId, }) .then((res) => { - this.options = [ - { - name: "全部", - deptId: "", - }, - ]; - this.options.push(...res.data); + let userinfo=JSON.parse(sessionStorage.getItem("zk-userInfo")) + if(userinfo.content.deptType==1){ + this.options.push(...res.data); + this.deptId= this.options[0].deptId + }else{ + this.options = [ + { + name: "全部", + deptId: "", + }, + ]; + this.options.push(...res.data); + this.deptId='' + } this.receptionStatisticsAllAccount(); this.accountRank();