山水共长天一色 3 tahun lalu
induk
melakukan
2af90cebdc

+ 6 - 0
fhKeeper/formulahousekeeper/timesheet/src/main.js

@@ -75,6 +75,12 @@ var userModules = [{role:0, modules:["工时报告","专业审核","部门审核
 //             {role:6, modules:["工时报告","工时成本统计","财务核算成本","项目报表服务","费用报销","待办任务","项目管理",,"组织架构","请假管理"]},];
 router.beforeEach((to, from, next) => {
     NProgress.start();
+    console.log('路由跳转判定',to,from,next);
+    if (to.path == '/') {
+        from.name ? next(from.path) : next('/login')
+        console.log('走判定');
+        return
+    }
     if (to.path == '/register') {
         next();
         return;

+ 6 - 8
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -79,7 +79,6 @@ import centerManage from './views/centerManage/centerManage'
 
 Vue.use(Router)
 
-let autoRoute = sessionStorage.getItem('autoRoute')
 export const fixedRouter = [
     {
         path: '/login',
@@ -106,15 +105,14 @@ export const fixedRouter = [
         name: '项目管理',
         iconCls: 'fa fa-sticky-note',
         hidden:true,
-        redirect: autoRoute,
         leaf: true,
         children: [
-            { path: '/projectInside/:id', component: projectInside, name: '任务看板' },
-            { path: '/files/:id', component: projectInside, name: '文件中心' },
-            { path: '/info/:id', component: projectInside, name: '项目概览' },
-            { path: '/summary/:id', component: projectInside, name: '数据统计' },
-            { path: '/costbaseline/:id', component: projectInside, name: '成本管理' },
-            { path: '/earning/:id', component: projectInside, name: '挣值分析' },
+            { path: 'projectInside/:id', component: projectInside, name: '任务看板' },
+            { path: 'files/:id', component: projectInside, name: '文件中心' },
+            { path: 'info/:id', component: projectInside, name: '项目概览' },
+            { path: 'summary/:id', component: projectInside, name: '数据统计' },
+            { path: 'costbaseline/:id', component: projectInside, name: '成本管理' },
+            { path: 'earning/:id', component: projectInside, name: '挣值分析' },
         ]
     },
     {