From 9dd3964e34f08bbb04a82f2e05f1b41de7425c48 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 20 六月 2025 15:30:16 +0800
Subject: [PATCH] 测试完成
---
src/store/modules/permission.js | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 2287665..90e3782 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -4,6 +4,8 @@
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView'
import InnerLink from '@/layout/components/InnerLink'
+import store from "@/store";
+
const permission = {
state: {
@@ -46,11 +48,32 @@
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
resolve(rewriteRoutes)
+ console.log(res.data,'璺敱鏁版嵁');
+ const result = res.data.find(item => item.name == "Followvisit");
+ Processrouting(result)
+
})
})
}
}
}
+function Processrouting(result){
+ const arrf=[];
+ const arr=store.getters.Serviceauthority;
+ console.log(result,'result');
+ console.log(arr,'arr');
+ result.children.forEach(objA => {
+ arr.forEach(objB => {
+ if (objA.meta.title === objB.label) {
+ arrf.push(objB);
+ }
+ });
+ });
+ console.log(arrf,'arrf');
+ store.commit('SET_Serviceauthority', arrf);
+
+
+}
// 閬嶅巻鍚庡彴浼犳潵鐨勮矾鐢卞瓧绗︿覆锛岃浆鎹负缁勪欢瀵硅薄
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
--
Gitblit v1.9.3