Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3d076a77
authored
2025-07-14 14:42:54 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改嵌入菜单路径
1 parent
4a6a6a8a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
src/layouts/components/SubSidebar/index.vue
src/router/modules/dataMeta.ts
src/store/modules/menu.ts
src/store/modules/route.ts
src/layouts/components/SubSidebar/index.vue
View file @
3d076a7
...
...
@@ -19,9 +19,9 @@ function onSidebarScroll(e: Event) {
const
defaultMenuActive
=
computed
(()
=>
{
let
path
=
route
.
meta
.
activeMenu
||
route
.
path
;
let
sideMenus
=
menuStore
.
sidebarMenus
;
let
isSide
=
sideMenus
.
some
(
s
=>
s
.
path
===
path
||
s
.
children
?.
some
(
c
=>
path
===
`
${
s
.
path
}
/
${
c
.
path
}
`
)
||
(
path
.
includes
(
'/data-meta
/report'
)
&&
s
.
path
?.
includes
(
'/data-meta
/report'
)));
let
isSide
=
sideMenus
.
some
(
s
=>
s
.
path
===
path
||
s
.
children
?.
some
(
c
=>
path
===
`
${
s
.
path
}
/
${
c
.
path
}
`
)
||
(
path
.
includes
(
'/data-meta
s/report'
)
&&
s
.
path
?.
includes
(
'/data-metas
/report'
)));
if
(
isSide
)
{
if
(
path
.
includes
(
'/data-meta/report'
))
{
if
(
path
.
includes
(
'/data-meta
s
/report'
))
{
let
index
=
route
.
fullPath
.
indexOf
(
"?"
);
if
(
index
>
-
1
)
{
let
params
=
route
.
fullPath
.
substring
(
index
+
1
);
...
...
src/router/modules/dataMeta.ts
View file @
3d076a7
...
...
@@ -134,7 +134,7 @@ const routes: RouteRecordRaw[] = [
],
},
{
path
:
'/data-meta/report'
,
path
:
'/data-meta
s
/report'
,
component
:
Layout
,
meta
:
{
title
:
'报表查看'
,
...
...
@@ -151,13 +151,13 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
,
activeMenu
:
'/data-meta/report/budgetDataIndex'
,
activeMenu
:
'/data-meta
s
/report/budgetDataIndex'
,
},
}
]
},
{
path
:
'/data-meta/reports'
,
path
:
'/data-meta
s
/reports'
,
component
:
Layout
,
meta
:
{
title
:
'资源目录'
,
...
...
@@ -174,7 +174,7 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
,
activeMenu
:
'/data-meta/reports/iframePage'
,
activeMenu
:
'/data-meta
s
/reports/iframePage'
,
},
},
{
...
...
@@ -187,13 +187,13 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
,
activeMenu
:
'/data-meta/reports/portraitMaps'
,
activeMenu
:
'/data-meta
s
/reports/portraitMaps'
,
},
}
]
},
{
path
:
'/data-meta/reports'
,
path
:
'/data-meta
s
/reports'
,
component
:
Layout
,
meta
:
{
title
:
'资源目录'
,
...
...
@@ -210,7 +210,7 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
,
activeMenu
:
'/data-meta/reports/iframePage'
,
activeMenu
:
'/data-meta
s
/reports/iframePage'
,
},
}
]
...
...
src/store/modules/menu.ts
View file @
3d076a7
...
...
@@ -174,7 +174,7 @@ const useMenuStore = defineStore(
else
{
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
const
findIndex
=
allMenus
.
value
.
findIndex
(
item
=>
item
.
children
.
some
(
r
=>
{
if
((
data
==
"/data-meta
/reports/iframePage"
||
data
==
'/data-meta/reports/portraitMaps'
||
data
==
"/data-meta/report/budgetDataIndex"
)
&&
r
.
path
?.
includes
(
'/data-meta
/report'
))
{
if
((
data
==
"/data-meta
s/reports/iframePage"
||
data
==
'/data-metas/reports/portraitMaps'
||
data
==
"/data-metas/report/budgetDataIndex"
)
&&
r
.
path
?.
includes
(
'/data-metas
/report'
))
{
return
true
;
}
if
(
data
==
"/data-meta/portraitMap"
&&
r
.
path
?.
includes
(
'/data-meta/portraitMap'
))
{
...
...
src/store/modules/route.ts
View file @
3d076a7
...
...
@@ -157,7 +157,7 @@ const useRouteStore = defineStore(
};
}
r
=
routes
.
find
((
route
:
any
)
=>
{
return
route
.
path
===
path
||
route
.
path
===
m
.
path
||
`/
${
route
.
path
}
`
===
m
.
path
||
((
path
.
includes
(
'budgetDataIndex'
)
&&
path
.
includes
(
'/data-meta
/report'
)
&&
route
.
path
.
includes
(
'/data-meta/report'
))
||
(
path
.
includes
(
'iframePage'
)
&&
path
.
includes
(
'/data-meta/report'
))
||
(
path
.
includes
(
'portraitMaps'
)
&&
path
.
includes
(
'/data-meta
/report'
))
||
(
path
.
includes
(
'/data-meta/portraitMap'
)
&&
route
.
path
.
includes
(
'/data-meta/portraitMap'
)));
return
route
.
path
===
path
||
route
.
path
===
m
.
path
||
`/
${
route
.
path
}
`
===
m
.
path
||
((
path
.
includes
(
'budgetDataIndex'
)
&&
path
.
includes
(
'/data-meta
s/report'
)
&&
route
.
path
.
includes
(
'/data-metas/report'
))
||
(
path
.
includes
(
'iframePage'
)
&&
path
.
includes
(
'/data-metas/report'
))
||
(
path
.
includes
(
'portraitMaps'
)
&&
path
.
includes
(
'/data-metas
/report'
))
||
(
path
.
includes
(
'/data-meta/portraitMap'
)
&&
route
.
path
.
includes
(
'/data-meta/portraitMap'
)));
});
if
(
r
&&
(
path
.
includes
(
'budgetDataIndex'
)
||
path
.
includes
(
'iframePage'
))
||
path
.
includes
(
'portraitMap'
))
{
r
.
path
=
path
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment