Commit 3d4ddec0 by liangzhen

初次进入页面自动打开

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