forked from angelo/web-retail-h5
feat(performaceEchart): 月度业绩权限控制,临时隐藏入口
This commit is contained in:
parent
899fe6aea2
commit
11938b224c
|
@ -275,7 +275,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getMonthAchieve(params)
|
const res = await getMonthAchieve(params)
|
||||||
console.log(res, '....res')
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const { total, rows } = res
|
const { total, rows } = res
|
||||||
this.total = total
|
this.total = total
|
||||||
|
|
|
@ -3,18 +3,17 @@
|
||||||
<view class="top-lists">
|
<view class="top-lists">
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in navList"
|
v-for="(item, index) in navList"
|
||||||
v-show="item.menuKey != ''"
|
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="navIndex == index ? 'styles' : ''"
|
:class="navIndex == item.index ? 'styles' : ''"
|
||||||
class="nav-view"
|
class="nav-view"
|
||||||
@click="clickHref(index)"
|
@click="clickHref(item.index)"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 业绩分布 !-->
|
<!-- 业绩分布 !-->
|
||||||
<template>
|
<template>
|
||||||
<view v-if="navIndex == 0 && navList[0].menuKey != ''">
|
<view v-if="navIndex == 0">
|
||||||
<performanceDistribution ref="performanceRef" />
|
<performanceDistribution ref="performanceRef" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,6 +31,7 @@
|
||||||
import * as api from '@/config/login.js'
|
import * as api from '@/config/login.js'
|
||||||
import * as apis from '@/config/market.js'
|
import * as apis from '@/config/market.js'
|
||||||
import { setToken } from '@/config/auth.js'
|
import { setToken } from '@/config/auth.js'
|
||||||
|
import { MEMBER_SIGN } from '@/util/common'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import placement from '@/components/distribution/placement.vue'
|
import placement from '@/components/distribution/placement.vue'
|
||||||
import placementPerformance from '@/components/distribution/placementPerformance.vue'
|
import placementPerformance from '@/components/distribution/placementPerformance.vue'
|
||||||
|
@ -86,11 +86,13 @@ export default {
|
||||||
// name: '月度业绩',
|
// name: '月度业绩',
|
||||||
// menuKey: '',
|
// menuKey: '',
|
||||||
// value: 'ConsanguinityCheck',
|
// value: 'ConsanguinityCheck',
|
||||||
|
// index: 0
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: '推荐列表',
|
name: '推荐列表',
|
||||||
menuKey: '',
|
menuKey: '',
|
||||||
value: 'recommendList',
|
value: 'recommendList',
|
||||||
|
index: 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
|
@ -122,16 +124,16 @@ export default {
|
||||||
this.query.startDate = this.getStartTime()
|
this.query.startDate = this.getStartTime()
|
||||||
this.ifDetail = val.ifDetail || '0'
|
this.ifDetail = val.ifDetail || '0'
|
||||||
// this.query.endDate = this.getEndTime()
|
// this.query.endDate = this.getEndTime()
|
||||||
this.getMenuLists()
|
// this.getMenuLists()
|
||||||
},
|
},
|
||||||
async onPullDownRefresh() {
|
async onPullDownRefresh() {
|
||||||
if (this.navIndex == 1) {
|
if (this.navIndex === 1) {
|
||||||
this.$refs.sgsyData.refresh()
|
this.$refs.sgsyData.refresh()
|
||||||
}
|
}
|
||||||
this.$refs.performanceRef.refresh()
|
this.$refs.performanceRef.refresh()
|
||||||
},
|
},
|
||||||
async onReachBottom() {
|
async onReachBottom() {
|
||||||
if (this.navIndex == 1) {
|
if (this.navIndex === 1) {
|
||||||
this.$refs.sgsyData.nextPageQuery()
|
this.$refs.sgsyData.nextPageQuery()
|
||||||
}
|
}
|
||||||
this.$refs.performanceRef.nextPage()
|
this.$refs.performanceRef.nextPage()
|
||||||
|
@ -188,18 +190,30 @@ export default {
|
||||||
this.ifDetail = '0'
|
this.ifDetail = '0'
|
||||||
},
|
},
|
||||||
getMenuLists() {
|
getMenuLists() {
|
||||||
api.menuList().then(res => {
|
this.$store.dispatch('GetInfo').then(user => {
|
||||||
res.data.forEach(item => {
|
this.userInfo = user || null
|
||||||
this.navList.forEach(items => {
|
if (user.memberSign === MEMBER_SIGN.V5_LEVEL) {
|
||||||
if (item.menuKey == items.value) {
|
this.navList.unshift({
|
||||||
items.menuKey = item.menuKey
|
name: '月度业绩',
|
||||||
|
menuKey: '',
|
||||||
|
value: 'ConsanguinityCheck',
|
||||||
|
index: 0,
|
||||||
|
})
|
||||||
|
this.navIndex = 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.marketList[0].name == item.menuKey) {
|
// api.menuList().then(res => {
|
||||||
this.marketList[0].isShow = true
|
// res.data.forEach(item => {
|
||||||
}
|
// this.navList.forEach(items => {
|
||||||
})
|
// if (item.menuKey == items.value) {
|
||||||
})
|
// items.menuKey = item.menuKey
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// if (this.marketList[0].name == item.menuKey) {
|
||||||
|
// this.marketList[0].isShow = true
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue