Commit 966c1ce2 by liangzhen

修改下重定向

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