Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-08-17 09:12:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3f20ed8d12b3d401a166f6cc1674ff8fbfbff69
b3f20ed8
1 parent
575209bf
modify
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
src/store/modules/permission.js
src/store/modules/permission.js
View file @
b3f20ed
...
...
@@ -47,26 +47,26 @@ const permission = {
return
new
Promise
((
resolve
)
=>
{
// 向后端请求路由数据
getRouters
().
then
((
res
)
=>
{
//
const newUrl = {
//
id: 24,
//
name: "et86",
//
path: "/et86",
//
hidden: false,
//
component: "allocationConfig/et86",
//
meta: {
//
title: "ET86",
//
icon: "edit",
//
permissions: "allocation:rand:list",
//
noCache: false,
//
},
//
alwaysShow: false,
//
children: null,
//
};
//
res.data.map((item) => {
//
if (item.name == "AllocationConfig") {
//
item.children.push(newUrl);
//
}
//
});
const
newUrl
=
{
id
:
24
,
name
:
"et86"
,
path
:
"/et86"
,
hidden
:
false
,
component
:
"allocationConfig/et86"
,
meta
:
{
title
:
"ET86"
,
icon
:
"edit"
,
permissions
:
"allocation:rand:list"
,
noCache
:
false
,
},
alwaysShow
:
false
,
children
:
null
,
};
res
.
data
.
map
((
item
)
=>
{
if
(
item
.
name
==
"AllocationConfig"
)
{
item
.
children
.
push
(
newUrl
);
}
});
res
.
data
=
hasPermi
.
routerPer
(
res
.
data
);
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
...
...
Please
register
or
login
to post a comment