|
|
@@ -19,18 +19,14 @@ function getBreadcrumb() {
|
|
|
let matched = route.matched.filter(item => item.meta && item.meta.title);
|
|
|
const first = matched[0]
|
|
|
|
|
|
- // ===================== 【核心:子系统不显示首页】 =====================
|
|
|
- const isSubSystem = route.path.startsWith(first.path);
|
|
|
-
|
|
|
- // const currentPath = route.path
|
|
|
- // const allRoutes = permissionStore.sidebarRouters
|
|
|
- // const prefix = currentPath.split('/')[1]
|
|
|
-
|
|
|
- // 只有【不是子系统】时,才添加首页
|
|
|
- if (!isDashboard(first) && !isSubSystem) {
|
|
|
- matched = [{path: '/index', meta: {title: '首页'}}].concat(matched)
|
|
|
+ if (!first) {
|
|
|
+ levelList.value = []
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
+ // ===================== 【核心:子系统与总后台各自只显示自己的层级】 =====================
|
|
|
+ const isSubSystem = route.path.startsWith(first.path);
|
|
|
+
|
|
|
// ===================== 【核心:彻底隔离子系统 / 总后台】 =====================
|
|
|
if (isSubSystem) {
|
|
|
// 子系统:只保留子系统路由,过滤总后台
|
|
|
@@ -45,14 +41,6 @@ function getBreadcrumb() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function isDashboard(route) {
|
|
|
- const name = route && route.name
|
|
|
- if (!name) {
|
|
|
- return false
|
|
|
- }
|
|
|
- return ['Index', 'MainAdminHome'].includes(name.trim())
|
|
|
-}
|
|
|
-
|
|
|
function handleLink(item) {
|
|
|
const {redirect, path} = item
|
|
|
if (redirect) {
|