Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
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
冯超鹏
laravelzh
Commits
c5776489
Commit
c5776489
authored
Jul 03, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超级管理员-用户设备管理
parent
0ec0d665
Pipeline
#76
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
SidebarItem.vue
resources/js/layout/components/Sidebar/SidebarItem.vue
+11
-1
userdevice.js
resources/js/router/modules/userdevice.js
+1
-0
No files found.
resources/js/layout/components/Sidebar/SidebarItem.vue
View file @
c5776489
<
template
>
<div
v-if=
"!item.hidden
&&item.children
"
class=
"menu-wrapper"
>
<div
v-if=
"!item.hidden
&& item.children && adminHiddenItem(item.path)
"
class=
"menu-wrapper"
>
<template
v-if=
"hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
>
<app-link
:to=
"resolvePath(onlyOneChild.path)"
>
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{'submenu-title-noDropdown':!isNest}">
...
...
@@ -68,6 +68,16 @@ export default {
},
},
methods
:
{
// 用户设备管理在超级管理员中不显示
adminHiddenItem
(
path
)
{
let
show
=
true
;
if
(
localStorage
.
getItem
(
'userOrAdmin'
)
===
'2'
)
{
if
(
path
===
'/userdevice'
)
{
show
=
false
;
}
}
return
show
;
},
hasOneShowingChild
(
children
,
parent
)
{
const
showingChildren
=
children
.
filter
(
item
=>
{
if
(
item
.
hidden
)
{
...
...
resources/js/router/modules/userdevice.js
View file @
c5776489
...
...
@@ -8,6 +8,7 @@ const userdeviceRoutes = {
meta
:
{
title
:
'用户设备管理'
,
icon
:
'device'
,
permissions
:
[
'view menu userdevice'
],
},
children
:
[
{
...
...
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