Commit 3d4ddec0 by liangzhen

初次进入页面自动打开

1 parent 1deb6c0a
......@@ -21,7 +21,7 @@ export const routes = [
path: '/',
name: 'main',
component: () => import('@/views/layout/index.vue'),
// redirect:'/mainLayout/auxiliarySelection',
redirect:'/mainLayout',
children:[
{
......
......@@ -116,29 +116,37 @@ export default {
this.$router.push({
path: "/mainLayout/auxiliarySelection",
});
this.activeIndex = "/mainLayout/auxiliarySelection"
} else if (newVal == 2) {
this.menuList = trendsRules(2);
this.$router.push({
path: "/mainLayout/confirmRelease",
});
this.activeIndex = "/mainLayout/confirmRelease"
// this.$refs.kzMenu.activeIndex= "/mainLayout/materialAcquisition"
} else if (newVal == 3) {
this.menuList = trendsRules(3);
this.$router.push({
path: "/mainLayout/materialAcquisition",
});
this.activeIndex = "/mainLayout/materialAcquisition"
// this.$refs.kzMenu.activeIndex= "/mainLayout/materialAcquisition"
} else if (newVal == 99) {
this.menuList = trendsRules(99);
this.$router.push({
path: "/assesszc/auxiliarySelection",
});
this.activeIndex = '/assesszc/auxiliarySelection'
// this.$refs.kzMenu.activeIndex='/assesszc/auxiliarySelection'
}
this.$refs.kzMenu.activeIndex = this.$route.path;
console.log('不是来了么',this.$route.path)
// this.activeIndex = this.$route.path;
// this.$refs.kzMenu.activeIndex = this.$route.path;
console.log('获取权限后的页面',this.$refs.kzMenu.activeIndex)
},
},
mounted() {
console.log("重新来了么");
this.handleOpen(0, ["0"]);
console.log("333333", this.$route.query);
if (
this.$route.path == "/mainLayout/Compliancefz" ||
this.$route.path == "/mainLayout/Compliance"
......@@ -154,6 +162,7 @@ export default {
}
} else {
this.activeIndex = this.$route.path;
console.log('第一次展开的页面',this.activeIndex)
}
},
......
......@@ -155,8 +155,11 @@ export default {
},
mounted() {
// window.addEventListener("resize", this.handleResize);
//进页面默认权限
sessionStorage.setItem("author", "sgtig_weizheng");
sessionStorage.setItem("authorName",99);
this.authority =99;
this.autho="sgtig_weizheng"
},
methods: {
handleResize() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!