Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multiSystem
Project
Project
Details
Activity
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
Yulun Yao
multiSystem
Commits
97a2a4cc
Commit
97a2a4cc
authored
Apr 29, 2021
by
程卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释冗余sidemenu代码(路由被权限码接管)
parent
c45cd5ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
63 deletions
+63
-63
sidemenu.vue
src/components/Layout/sidemenu.vue
+63
-63
No files found.
src/components/Layout/sidemenu.vue
View file @
97a2a4cc
...
@@ -56,70 +56,70 @@ export default {
...
@@ -56,70 +56,70 @@ export default {
},
},
},
},
mounted
(){
mounted
(){
this
.
$ajax
.
get
({
//
this.$ajax.get({
url
:
this
.
$api
.
GET_USER_INFO
,
//
url: this.$api.GET_USER_INFO,
}).
then
(
res
=>
{
//
}).then(res => {
if
(
res
.
code
==
200
)
{
//
if(res.code == 200) {
this
.
isAllPerm
=
res
.
data
.
content
.
isAllPerm
//
this.isAllPerm = res.data.content.isAllPerm
console
.
log
(
this
.
isAllPerm
)
//
console.log(this.isAllPerm)
let
menus
=
[]
//
let menus=[]
let
tempmenu
=
[]
//
let tempmenu = []
let
isLoadExtendMenu
=
this
.
$cookie
.
get
(
'customKeyEnable'
)
//
let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
for
(
let
i
=
0
;
i
<
routes
.
length
;
i
++
){
//
for(let i=0;i
<
routes
.
length
;
i
++
){
if
(
!!
routes
[
i
].
children
){
//
if(!!routes[i].children){
for
(
let
j
=
0
;
j
<
routes
[
i
].
children
.
length
;
j
++
){
//
for(let j=0;j
<
routes
[
i
].
children
.
length
;
j
++
){
if
(
!!
this
.
isAllPerm
)
{
// 超管访问
//
if(!!this.isAllPerm) { // 超管访问
if
(
!!
routes
[
i
].
children
[
j
].
meta
.
menuIcon
&&
routes
[
i
].
children
[
j
].
name
==
'systemManagement'
&&
isLoadExtendMenu
==
'false'
){
//
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let
target
=
routes
[
i
].
children
[
j
].
children
//
let target = routes[i].children[j].children
if
(
target
.
length
>
0
)
{
//
if(target.length > 0) {
for
(
let
k
=
0
;
k
<
target
.
length
;
k
++
)
{
//
for(let k = 0 ; k
<
target
.
length
;
k
++
)
{
if
(
target
[
k
].
name
==
'tbls'
)
{
//
if(target[k].name == 'tbls') {
if
(
isLoadExtendMenu
==
'true'
)
{
//
if(isLoadExtendMenu == 'true') {
tempmenu
.
push
(
target
[
k
])
//
tempmenu.push(target[k])
}
//
}
}
else
{
//
} else {
tempmenu
.
push
(
target
[
k
])
//
tempmenu.push(target[k])
}
//
}
}
//
}
}
//
}
let
lusso
=
routes
[
i
].
children
[
j
]
//
let lusso = routes[i].children[j]
lusso
.
children
=
[]
//
lusso.children = []
lusso
.
children
=
tempmenu
//
lusso.children = tempmenu
menus
.
push
(
lusso
)
//
menus.push(lusso)
}
else
if
(
!!
routes
[
i
].
children
[
j
].
meta
.
menuIcon
)
{
//
} else if (!!routes[i].children[j].meta.menuIcon) {
menus
.
push
(
routes
[
i
].
children
[
j
])
//
menus.push(routes[i].children[j])
}
//
}
}
else
if
(
!
this
.
isAllPerm
)
{
// 非超管访问
//
} else if(!this.isAllPerm) { // 非超管访问
if
(
routes
[
i
].
children
[
j
].
meta
.
isAllPerm
==
false
)
{
//
if(routes[i].children[j].meta.isAllPerm == false) {
if
(
!!
routes
[
i
].
children
[
j
].
meta
.
menuIcon
&&
routes
[
i
].
children
[
j
].
name
==
'systemManagement'
&&
isLoadExtendMenu
==
'false'
){
//
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let
target
=
routes
[
i
].
children
[
j
].
children
//
let target = routes[i].children[j].children
if
(
target
.
length
>
0
)
{
//
if(target.length > 0) {
for
(
let
k
=
0
;
k
<
target
.
length
;
k
++
)
{
//
for(let k = 0 ; k
<
target
.
length
;
k
++
)
{
if
(
target
[
k
].
name
==
'tbls'
)
{
//
if(target[k].name == 'tbls') {
if
(
isLoadExtendMenu
==
'true'
)
{
//
if(isLoadExtendMenu == 'true') {
tempmenu
.
push
(
target
[
k
])
//
tempmenu.push(target[k])
}
//
}
}
else
{
//
} else {
tempmenu
.
push
(
target
[
k
])
//
tempmenu.push(target[k])
}
//
}
}
//
}
}
//
}
let
lusso
=
routes
[
i
].
children
[
j
]
//
let lusso = routes[i].children[j]
lusso
.
children
=
[]
//
lusso.children = []
lusso
.
children
=
tempmenu
//
lusso.children = tempmenu
menus
.
push
(
lusso
)
//
menus.push(lusso)
}
else
if
(
!!
routes
[
i
].
children
[
j
].
meta
.
menuIcon
)
{
//
} else if (!!routes[i].children[j].meta.menuIcon) {
menus
.
push
(
routes
[
i
].
children
[
j
])
//
menus.push(routes[i].children[j])
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
this
.
menus
=
menus
//
this.menus=menus
}
//
}
})
//
})
},
},
computed
:
{
computed
:
{
menus
(){
menus
(){
...
...
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