修改跳转

dev
夜笙歌 1 year ago
parent fa205327e6
commit 110c0eaa57

@ -5,6 +5,7 @@
</template> </template>
<script> <script>
import {selectSecnes} from '@/api/board/nav'
export default { export default {
name: 'RuoYiGit', name: 'RuoYiGit',
data() { data() {
@ -14,14 +15,14 @@ export default {
}, },
methods: { methods: {
goto() { goto() {
console.log(this.$store.state.user.permissions)
console.log(this.$store.state.user.permissions.includes('business:monitor:index'))
console.log( this.$store.state.user.permissions.includes('*:*:*'))
console.log( this.$store.state.user.permissions.filter(e=>e.includes('business:monitor')))
if (this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')) { if (this.$store.state.user.permissions.includes('business:monitor:index') || this.$store.state.user.permissions.includes('*:*:*')) {
this.$router.push({path: "/board/index"}); this.$router.push({path: "/board/index"});
} else { } else {
this.$router.push({path: '/board/smartScene'}) selectSecnes().then((e)=>{
let data = e.data.find(e=> e.defaultFlag === '1')
this.$router.push({path: '/board/'+data.router+'?name='+data.sceneName})
})
// this.$router.push({path: '/board/smartScene'})
} }
} }
} }

Loading…
Cancel
Save