695593266@qq.com пре 4 дана
родитељ
комит
427c0c5290
2 измењених фајлова са 9 додато и 4 уклоњено
  1. 5 0
      src/micro-app.js
  2. 4 4
      src/router/index.js

+ 5 - 0
src/micro-app.js

@@ -90,6 +90,11 @@ const microApps = [
     name: 'ehs',
     entry: '/ehs/',
     activeRule: '/page-ehs'
+  },
+  {
+    name: 'cost',
+    entry: '/cost/',
+    activeRule: '/page-cost'
   }
 ];
 

+ 4 - 4
src/router/index.js

@@ -26,7 +26,7 @@ const router = new VueRouter({
  * 路由守卫
  */
 router.beforeEach((to, from, next) => {
-  console.log(to,'to')
+  console.log(to, 'to');
 
   if (!from.path.includes(REDIRECT_PATH)) {
     NProgress.start();
@@ -99,8 +99,7 @@ router.afterEach((to) => {
   }
 });
 router.roleChange = async ({ menus, homePath, authoritiesRouter }) => {
-  const currentUser = getCurrentUser()
-
+  const currentUser = getCurrentUser();
 
   if (menus && menus.length > 0) {
     router.addRoute(getMenuRoutes([...menus, ...authoritiesRouter], homePath));
@@ -127,7 +126,8 @@ router.roleChange = async ({ menus, homePath, authoritiesRouter }) => {
         'vuex-main-data',
         'vuex-wms',
         'vuex-qms',
-        'vuex-vis'
+        'vuex-vis',
+        'vuex-cost'
       ].forEach((key) => {
         sessionStorage.removeItem(key);
       });