소스 검색

更新 路由

wzh 3 년 전
부모
커밋
925c6a1db3
2개의 변경된 파일10개의 추가작업 그리고 16개의 파일을 삭제
  1. 7 3
      src/main.js
  2. 3 13
      src/views/index/Index.vue

+ 7 - 3
src/main.js

@@ -33,10 +33,14 @@ router.beforeEach(async (to, from, next) => {
       let path = store.state?.menuData[0]?.items[0].path;
       if (0 === to.matched.length) {
         next("/");
-      } else if (to.path == "/login" || to.path == "/") {
+      } else if (to.path == "/login") {
         next("/");
       } else if (rolePermission?.indexOf(to.meta.code) == -1) {
-        next("/");
+        if (to.path == "/") {
+          next();
+        } else {
+          next("/");
+        }
       } else {
         next();
       }
@@ -44,7 +48,7 @@ router.beforeEach(async (to, from, next) => {
       if (to.path == "/") {
         next();
       } else {
-        next();
+        next("/");
       }
     }
   } else {

+ 3 - 13
src/views/index/Index.vue

@@ -407,19 +407,9 @@ function drawPie(type) {
           },
         },
         label: {
-          normal: {
-            show: true,
-            position: "inner", // 数值显示在内部
-            formatter: "{d}%", // 格式化数值百分比输出
-          },
-        },
-        lableLine: {
-          normal: {
-            show: false,
-          },
-          emphasis: {
-            show: true,
-          },
+          show: true,
+          position: "inner", // 数值显示在内部
+          formatter: "{d}%", // 格式化数值百分比输出
         },
       },
     ],