提交 af9eeb74 编写于 作者: tao.wu's avatar tao.wu

no message

上级 9ef13c07
<template> <template>
<div v-if="$route.name!='loginPage'"> <div v-if="$route.name!='loginPage'">
<v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header> <v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header>
<v-slidebar :authList="authList" :tokenValue="token"></v-slidebar> <v-slidebar :authList="authList" :tokenValue="token" :idType="idType"></v-slidebar>
<el-container> <el-container>
<div class="content" id="body-content"> <div class="content" id="body-content">
<transition name="router-fade" mode="out-in"> <transition name="router-fade" mode="out-in">
...@@ -146,7 +146,7 @@ export default { ...@@ -146,7 +146,7 @@ export default {
if(val!=undefined&&val!=null) { if(val!=undefined&&val!=null) {
vm.getUserAuth(val) vm.getUserAuth(val)
} }
} },
} }
} }
</script> </script>
......
...@@ -27,6 +27,7 @@ import { isNotEmptyUtils } from '../../utils/utils' ...@@ -27,6 +27,7 @@ import { isNotEmptyUtils } from '../../utils/utils'
let vm = null let vm = null
export default { export default {
props: { props: {
idType: [String,Number],
tokenValue: { tokenValue: {
type: String type: String
}, },
...@@ -81,11 +82,21 @@ export default { ...@@ -81,11 +82,21 @@ export default {
}, },
created() { created() {
vm = this; vm = this;
console.log('beforeRouteEnter===》') },
// storageIdType=2才展示随访管理模块 watch: {
const storageIdType = localStorage.getItem('storageIdType'); authList(newVal, oldVal){
console.log((storageIdType=='2')) if(!newVal.P001) { // 项目管理
const followSider = (storageIdType=='2') ? { vm.items[1].subs[1].index = 'blank'
}
if(!newVal.P002) { // 组件管理
vm.items[1].subs[0].index = 'blank'
}
if(!newVal.P003) { // 角色管理
vm.items[2].subs[0].index = 'blank'
}
},
idType(val){
const followSider = (val=='2') ? {
title: '随访管理', title: '随访管理',
icon: 'el-icon-edit-outline', icon: 'el-icon-edit-outline',
index: 'followup', index: 'followup',
...@@ -107,19 +118,7 @@ export default { ...@@ -107,19 +118,7 @@ export default {
} }
] ]
} : {}; } : {};
vm.items.push(followSider) this.items.push(followSider)
},
watch: {
authList(newVal, oldVal){
if(!newVal.P001) { // 项目管理
vm.items[1].subs[1].index = 'blank'
}
if(!newVal.P002) { // 组件管理
vm.items[1].subs[0].index = 'blank'
}
if(!newVal.P003) { // 角色管理
vm.items[2].subs[0].index = 'blank'
}
} }
}, },
methods: { methods: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册