Commit 966c1ce2 by liangzhen

修改下重定向

1 parent 372c654c
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import { defaultRouter } from "@/utils/leftBarRules";
Vue.use(VueRouter) Vue.use(VueRouter)
...@@ -16,22 +17,18 @@ VueRouter.prototype.push = function push(location) { ...@@ -16,22 +17,18 @@ VueRouter.prototype.push = function push(location) {
* } * }
* *
*/ */
console.log(defaultRouter(),'默认是什么')
export const routes = [ export const routes = [
{ {
path: '/', path: '/',
name: 'main', name: 'main',
component: () => import('@/views/layout/index.vue'), component: () => import('@/views/layout/index.vue'),
redirect:'/mainLayout', redirect:defaultRouter(),
children:[ children:[
{
path:'/home',
name:"home",
component: () => import('@/views/layout/home.vue'),
},
{ {
path:'/mainLayout', path:'/mainLayout',
name:"mainLayout", name:"mainLayout",
redirect:defaultRouter(),
component: () => import('@/views/layout/mainLayout.vue'), component: () => import('@/views/layout/mainLayout.vue'),
children:[ children:[
//后评估自查 //后评估自查
......
...@@ -420,3 +420,26 @@ export function trendsRules(type) { ...@@ -420,3 +420,26 @@ export function trendsRules(type) {
} }
} }
export function defaultRouter() {
sessionStorage.setItem("author", "sgtig_weizheng");
sessionStorage.setItem("authorName",99);
let type=sessionStorage.getItem('authorName')
console.log( type,'hahaha ')
switch (type) {
case '1':
return "/mainLayout/auxiliarySelection"
break;
case '2':
return "/mainLayout/confirmRelease"
break;
case '3':
return "/mainLayout/materialAcquisition"
break;
case '99':
return "/assesszc/auxiliarySelection"
break;
}
}
...@@ -146,6 +146,7 @@ export default { ...@@ -146,6 +146,7 @@ export default {
}, },
}, },
mounted() { mounted() {
console.log('本页面路由是什么',this.$route.path)
this.handleOpen(0, ["0"]); this.handleOpen(0, ["0"]);
if ( if (
this.$route.path == "/mainLayout/Compliancefz" || this.$route.path == "/mainLayout/Compliancefz" ||
...@@ -162,7 +163,7 @@ export default { ...@@ -162,7 +163,7 @@ export default {
} }
} else { } else {
this.activeIndex = this.$route.path; this.activeIndex = this.$route.path;
console.log('第一次展开的页面',this.activeIndex)
} }
}, },
......
...@@ -154,12 +154,10 @@ export default { ...@@ -154,12 +154,10 @@ export default {
}, },
mounted() { mounted() {
// window.addEventListener("resize", this.handleResize); //进页面默认权限 直接配置刷新一直是这个了
//进页面默认权限
sessionStorage.setItem("author", "sgtig_weizheng"); // this.authority =99;
sessionStorage.setItem("authorName",99); // this.autho="sgtig_weizheng"
this.authority =99;
this.autho="sgtig_weizheng"
}, },
methods: { methods: {
handleResize() { handleResize() {
......
...@@ -23,7 +23,7 @@ module.exports = defineConfig({ ...@@ -23,7 +23,7 @@ module.exports = defineConfig({
}, },
chainWebpack: (config) => { chainWebpack: (config) => {
config.plugin('html').tap((args) => { config.plugin('html').tap((args) => {
args[0].title = '数字化架构设计与管控支撑工具' args[0].title = '数字化项目全过程管控平台'
return args return args
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!