You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TcAssetVerificationPc/src/views/index.vue

23 lines
515 B

<template></template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {};
},
computed: {
...mapGetters(["defaultRoutes"]),
},
mounted() {
const firstRouter = this.defaultRoutes.filter(item => !item.hidden)
if(this.$store.state.user.roles.includes('unit')) {
this.$router.push('/'+firstRouter[0].children[0].path);
} else {
this.$router.push(firstRouter[0].path + "/" + firstRouter[0].children[0].path);
}
},
};
</script>
<style></style>