Commit b7886b4c by 胡悦

feat(ReceptionCenter): 根据渠道类型调整业绩看板布局

当用户渠道类型为9时,隐藏左侧业绩看板并调整右侧宽度
同时更新左侧菜单权限控制,渠道类型为9时隐藏学习和场景集市
1 parent d735c286
...@@ -192,7 +192,8 @@ export default { ...@@ -192,7 +192,8 @@ export default {
label: "场景集市", label: "场景集市",
icon: "scene", icon: "scene",
name: 'SceneMarket', name: 'SceneMarket',
eventCode: 'app_scene_market' eventCode: 'app_scene_market',
hidden: false
} }
] ]
let { sceneType } = uni.$storage.get("userInfo") let { sceneType } = uni.$storage.get("userInfo")
...@@ -435,13 +436,20 @@ export default { ...@@ -435,13 +436,20 @@ export default {
eventCode: 'app_scene_change' eventCode: 'app_scene_change'
}) })
}, },
// 学习中心权限获取 // 学习中心权限获取,场景集市权限
getStudyCenterPermission () { getStudyCenterPermission () {
const res = uni.$storage.get('studyCenterPermission') const userInfo = uni.$storage.get('userInfo')
const { directSaleAuth, hmzxAuth, authorizedBusinessList } = res // 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标 if (userInfo.subLoginUser.channelType == 9) {
const isYb = authorizedBusinessList && authorizedBusinessList.includes(1) // 1.延保 2.轻改 3.权益 this.tabs[2].hidden = true
if (directSaleAuth || (hmzxAuth && isYb)) { this.tabs[3].hidden = true
this.tabs[2].hidden = false return
} else {
const res = uni.$storage.get('studyCenterPermission')
const { directSaleAuth, hmzxAuth, authorizedBusinessList } = res // 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const isYb = authorizedBusinessList && authorizedBusinessList.includes(1) // 1.延保 2.轻改 3.权益
if (directSaleAuth || (hmzxAuth && isYb)) {
this.tabs[2].hidden = false
}
} }
} }
}, },
......
<template> <template>
<view class="reception-box"> <view class="reception-box">
<view :class="['record-box-content',`${showInfo || !showRecord?'hide-record':'show-record'}`]"> <view :class="['record-box-content',`${showInfo || !showRecord?'hide-record':'show-record'}`]">
<view class="left box-class"> <view class="left box-class" v-if="!onlyRight">
<view class="common-title"> <view class="common-title">
业绩看板 业绩看板
<view <view
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</view> </view>
</template> </template>
</view> </view>
<view class="right box-class"> <view class="right box-class" :class="{'only-right':onlyRight}">
<type-tab-component <type-tab-component
:typeList="typeList" :typeList="typeList"
:tabIndex.sync="tabIndex" :tabIndex.sync="tabIndex"
...@@ -184,6 +184,10 @@ export default { ...@@ -184,6 +184,10 @@ export default {
} }
}, },
computed: { computed: {
onlyRight() {
const userInfo = uni.$storage.get('userInfo')
return userInfo.subLoginUser.channelType == 9
},
showPageFlag () { showPageFlag () {
return Object.keys(this.pageData).length return Object.keys(this.pageData).length
}, },
...@@ -399,6 +403,9 @@ export default { ...@@ -399,6 +403,9 @@ export default {
width: toRpx(1358); width: toRpx(1358);
border: toRpx(2) solid #fff; border: toRpx(2) solid #fff;
box-sizing: border-box; box-sizing: border-box;
&.only-right {
width: calc(100% - #{toRpx(64)});
}
&-content { &-content {
width: 100%; width: 100%;
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!