From 2ab3641a5abfb328e994eca2d338b4cff6f1f84b Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Fri, 11 Mar 2022 10:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/wel.vue | 118 ++++++++++++++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 43 deletions(-) diff --git a/src/page/wel.vue b/src/page/wel.vue index a9cbf27..aa5afbd 100644 --- a/src/page/wel.vue +++ b/src/page/wel.vue @@ -1,6 +1,6 @@ @@ -1121,8 +1136,25 @@ export default { computed: { ...mapGetters(["permissions"]), - info() { + + // 获取用户信息 + userInfo() { return this.$store.state.user.userInfo + }, + // 是否楼盘后台 + isHouse() { + return this.userInfo.userRoleType == null && this.role == 3 + }, + + + // 是否系统后台 + isSystem() { + return this.role != 3 && this.userInfo.userRoleType == 1 + }, + + // 是否顾问 + isAdviser() { + return this.userInfo.userRoleType == 6 } }, @@ -1150,8 +1182,8 @@ export default { toDetail(path, params2 = "", name) { if (path == "") return; if (!this.hasRoute(name, this.$router.options.routes)) { - this.$message.error('您没有此权限,请联系管理员添加该菜单权限') - return + this.$message.error("您没有此权限,请联系管理员添加该菜单权限"); + return; } this.$router.push({ path: path, @@ -1281,12 +1313,12 @@ export default { if (this.role == 2) { this.houseRank = res.data.accountRank.avgFraction; this.companyRank = res.data.houseRank.avgFraction; - this.allHouseRank = res.data.houseRank - this.allCompanyRank = res.data.accountRank + this.allHouseRank = res.data.houseRank; + this.allCompanyRank = res.data.accountRank; } else { this.houseRank = res.data.houseRank.avgFraction || []; - this.allHouseRank = res.data.houseRank - this.allCompanyRank = res.data.companyRank + this.allHouseRank = res.data.houseRank; + this.allCompanyRank = res.data.companyRank; this.companyRank = res.data.companyRank.avgFraction || []; } }); @@ -1294,36 +1326,36 @@ export default { // 选择公司类型切换 classatec1 公司/项目 classatec2 项目/顾问 chooseCompanyRank(keys, index) { - this[keys] = index - console.log(keys) - console.log(this.role, '123891273892178937129837') + this[keys] = index; + console.log(keys); + console.log(this.role, "123891273892178937129837"); if (this.role != 2) { - if (keys == 'classatec1') { - if (index == 0) { - this.companyRank = this.allCompanyRank.receptionCount - } else { - this.companyRank = this.allCompanyRank.avgFraction - } + if (keys == "classatec1") { + if (index == 0) { + this.companyRank = this.allCompanyRank.receptionCount; + } else { + this.companyRank = this.allCompanyRank.avgFraction; + } } else { - if (index == 0) { - this.houseRank = this.allHouseRank.receptionCount - } else { - this.houseRank = this.allHouseRank.avgFraction - } + if (index == 0) { + this.houseRank = this.allHouseRank.receptionCount; + } else { + this.houseRank = this.allHouseRank.avgFraction; + } } } else { - if (keys == 'classatec1') { - if (index == 0) { - this.houseRank = this.allCompanyRank.avgFraction - } else { - this.houseRank = this.allCompanyRank.receptionCount - } + if (keys == "classatec1") { + if (index == 0) { + this.houseRank = this.allCompanyRank.avgFraction; + } else { + this.houseRank = this.allCompanyRank.receptionCount; + } } else { - if (index == 0) { - this.companyRank = this.allHouseRank.avgFraction - } else { - this.companyRank = this.allHouseRank.receptionCount - } + if (index == 0) { + this.companyRank = this.allHouseRank.avgFraction; + } else { + this.companyRank = this.allHouseRank.receptionCount; + } } } }, @@ -1460,7 +1492,7 @@ export default { this.statDateEnd = ""; this.customtime = []; this.TimetoAhoose = i; - console.log(this.role) + console.log(this.role); if (this.role == 3) { this.getgicd(); this.getindexZxllist();