12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <div>
- <div>
- <v-nav v-if="qq"></v-nav>
- </div>
- <div>
- <v-nav1 v-if="qq2"></v-nav1>
- </div>
- <!-- <div>
- <el-card>
- <v-nav2></v-nav2>
- </el-card>
- </div> -->
- </div>
- </template>
- <script>
- import navs from "@/views/index-frist";
- import navs1 from "@/views/index-list";
- import { EventBus } from '@/util/event-bus.js'
- import { getUserProfile } from "@/api/system/user";
- // import indexList from "./index";
- export default {
- data() {
- return {
- qq: false,
- qq2: true,
- user: {},
- };
- },
- components: {
- "v-nav": navs,
- "v-nav1": navs1,
- // "v-nav2": navs2,
- },
- created() {
- // var sscDomain = document.location.hostname;
- // getUserProfile(sscDomain).then((response) => {
- // this.user = response.data;
- // if (response.data.userName == "admin") {
- // this.qq = true;
- // this.qq2 = false;
- // } else {
- // this.qq = false;
- // this.qq2 = true;
- // }
- // });
- var children = [];
- this.$store.state.permission.routes.map((item) => {
- if (this.$route.matched[0] && item.alwaysShow && this.$route.matched[0].path == item.path) {
- children = item.children
- }
- });
- if(children && children.length != 0){
- EventBus.$emit('on-click-higher', {children: children, basepath: this.$route.matched[0].path})
- }
- },
- mounted() {},
- methods: {},
- };
- </script>
|