Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lxyl-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
lxyl-vue
Commits
b43465d1
Commit
b43465d1
authored
Jan 17, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ROUTER POWER REWRiTING=>FILTER HASMKID=TRUE
parent
9930a6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
permission.js
src/store/modules/permission.js
+5
-4
No files found.
src/store/modules/permission.js
View file @
b43465d1
...
...
@@ -115,9 +115,10 @@ const permission = {
/* 权限路由*/
/* */
function
filter
(
data
)
{
var
newData
=
data
.
filter
(
(
item
)
=>
{
let
hasMkid
=
fals
e
let
hasMkid
=
tru
e
asymenus
.
forEach
(
e
=>
{
if
((
e
.
mkid
==
item
.
meta
.
mkid
)
||
(
item
.
meta
.
mkid
==
'test'
))
{
item
.
meta
.
icon
=
e
.
icon
...
...
@@ -140,6 +141,7 @@ const permission = {
let
newPowerRoutes
=
filter
(
powerRoutes
)
let
newCommonList
=
filter
(
commonList
.
list
)
let
newErpList
=
filter
(
erpList
.
list
)
/* 转化菜单格式*/
let
delArr
=
[]
let
newmenus
=
[]
...
...
@@ -154,7 +156,6 @@ const permission = {
res
.
data
=
dynamicRouter
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
],
asymenus
)
||
[...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
]
console
.
log
(
res
.
data
,
'router finally'
)
/* 重置首页路由*/
// let hompePage = treeToList([...newCommonList,...newErpList,...newPowerRoutes]).filter(item=>item.mkid==localStorage.getItem('homeMkid'))
let
ttlist
=
treeToList
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
])
...
...
@@ -222,10 +223,10 @@ const permission = {
constantRoutes
.
push
(
newHome
)
}
/*
*/
// res.data=[...newCommonList,...newErpList,...newPowerRoutes]
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment