|
|
|
@ -7,6 +7,8 @@ import { transformI18n } from "@/plugins/i18n";
|
|
|
|
|
import { useNav } from "@/layout/hooks/useNav";
|
|
|
|
|
import { usePermissionStoreHook } from "@/store/modules/dsPermission";
|
|
|
|
|
import { ref, computed, watch } from "vue";
|
|
|
|
|
import { constantRoutes } from "@/pages/dataScreen/router";
|
|
|
|
|
import { filterTree } from "@/pages/dataScreen/router/utils";
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const router = useRouter();
|
|
|
|
@ -17,7 +19,16 @@ const {
|
|
|
|
|
} = useNav();
|
|
|
|
|
|
|
|
|
|
const menuData = computed(() => {
|
|
|
|
|
return usePermissionStoreHook().wholeMenus;
|
|
|
|
|
// 开启动态路由缓存本地sessionStorage
|
|
|
|
|
// const key = "async-routes";
|
|
|
|
|
// const asyncRouteList = storageSession().getItem(key) as any;
|
|
|
|
|
|
|
|
|
|
// console.log(
|
|
|
|
|
// usePermissionStoreHook().wholeMenus,
|
|
|
|
|
// "usePermissionStoreHook",
|
|
|
|
|
// filterTree(constantRoutes[0].children)
|
|
|
|
|
// );
|
|
|
|
|
return filterTree(constantRoutes[0].children);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const activeName = ref(route.name || "Workbench");
|
|
|
|
|