修改权限显示

dev
夜笙歌 1 year ago
parent 71d7663982
commit 15425636aa

@ -2,7 +2,7 @@
<div> <div>
<div class="title">智慧物联监控平台</div> <div class="title">智慧物联监控平台</div>
<div> <div>
<div :class="`menu ${nowMenu==='1'? 'menuClick' :''}`" style="left: 2%" @click="toLink('index')"> <div :class="`menu ${nowMenu==='1'? 'menuClick' :''}`" style="left: 2%" @click="toLink('index')" v-if="isIndex">
<span> <span>
监控主页 监控主页
</span> </span>
@ -52,7 +52,8 @@ export default {
data() { data() {
return { return {
selectSecnesList: [], selectSecnesList: [],
name: '智慧场景' name: '智慧场景',
isIndex : true
} }
}, },
props: { props: {
@ -63,6 +64,11 @@ export default {
}, },
mounted() { mounted() {
if(this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')){
this.isIndex = true
}else{
this.isIndex = false
}
this.setSelectSecnes() this.setSelectSecnes()
if (this.$route.name === 'SmartScene') { if (this.$route.name === 'SmartScene') {
if (this.$route.query?.name) { if (this.$route.query?.name) {

@ -14,7 +14,11 @@ export default {
}, },
methods: { methods: {
goto() { goto() {
this.$router.push({path: "/board/index"}); if(this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')){
this.$router.push({path: "/board/index"});
}else{
this.$router.push({path:'/broad/smartScene'})
}
} }
} }
} }

Loading…
Cancel
Save