Browse Source

fix: 修复plugin-layout加载统计模块路由path拼接错误

lanjianrong 4 years ago
parent
commit
cf728f1d8c
3 changed files with 9 additions and 9 deletions
  1. 1 0
      .gitignore
  2. 8 8
      config/routes.js
  3. 0 1
      src/access.ts

+ 1 - 0
.gitignore

@@ -19,6 +19,7 @@ yarn-error.log
 .idea
 yarn.lock
 package-lock.json
+pnpm-lock.yaml
 *bak
 .vscode
 

+ 8 - 8
config/routes.js

@@ -173,7 +173,7 @@ export default [
     ]
   },
   {
-    path: 'statistic',
+    path: '/statistic',
     name: 'statistic',
     icon: 'icon-tongji',
     routes: [
@@ -182,7 +182,7 @@ export default [
         redirect: '/statistic/product'
       },
       {
-        path: 'product',
+        path: '/statistic/product',
         name: 'product',
         icon: 'icon-chanpinxiaoshou',
         routes: [
@@ -191,28 +191,28 @@ export default [
             redirect: '/statistic/product/usage'
           },
           {
-            path: 'usage',
+            path: '/statistic/product/usage',
             name: 'usage',
             component: './Statistic/Product/SoftwareUsage',
             access: 'authRouteFilter',
             validatePerm: true
           },
           {
-            path: 'aggregate',
+            path: '/statistic/product/aggregate',
             name: 'aggregate',
             component: './Statistic/Product/InvoiceAggregate',
             access: 'authRouteFilter',
             validatePerm: true
           },
           {
-            path: 'trends',
+            path: '/statistic/product/trends',
             name: 'trends',
             component: './Statistic/Product/InvoiceTrends',
             access: 'authRouteFilter',
             validatePerm: true
           },
           {
-            path: 'receivables',
+            path: '/statistic/product/receivables',
             name: 'receivables',
             component: './Statistic/Product/InvoiceReceivables',
             access: 'authRouteFilter'
@@ -220,7 +220,7 @@ export default [
         ]
       },
       {
-        path: 'customer',
+        path: '/statistic/customer',
         name: 'customer',
         icon: 'icon-kehushuju',
         routes: [
@@ -229,7 +229,7 @@ export default [
             redirect: '/statistic/customer/additions'
           },
           {
-            path: 'additions',
+            path: '/statistic/customer/additions',
             name: 'additions',
             component: './Statistic/Customer/CustomerAdditions',
             access: 'authRouteFilter'

+ 0 - 1
src/access.ts

@@ -9,7 +9,6 @@ export default function (initialState) {
       return true
     }
     const name = route.path?.match(/\/(\w*)\//)?.[1]
-    // console.log(route)
 
     if (name && permData[name] && permData[name]?.length) {
       return true