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