Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
4fb562f7
Commit
4fb562f7
authored
Jun 08, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加三级菜单
parent
b57f9f00
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
+5
-1
src/main/webapp/WEB-INF/view/common/_tab.html
+13
-0
src/main/webapp/WEB-INF/view/system/role/role_assign.html
+2
-1
No files found.
src/main/java/com/stylefeng/guns/common/node/MenuNode.java
View file @
4fb562f7
package
com
.
stylefeng
.
guns
.
common
.
node
;
import
com.stylefeng.guns.common.constant.Const
;
import
com.stylefeng.guns.common.constant.state.IsMenu
;
import
com.stylefeng.guns.config.properties.GunsProperties
;
import
com.stylefeng.guns.core.util.SpringContextHolder
;
...
...
@@ -257,7 +258,7 @@ public class MenuNode implements Comparable {
public
static
List
<
MenuNode
>
clearBtn
(
List
<
MenuNode
>
nodes
)
{
ArrayList
<
MenuNode
>
noBtns
=
new
ArrayList
<
MenuNode
>();
for
(
MenuNode
node
:
nodes
)
{
if
(
node
.
getLevels
()
<
3
)
{
if
(
node
.
getIsmenu
()
==
IsMenu
.
YES
.
getCode
())
{
noBtns
.
add
(
node
);
}
}
...
...
@@ -286,8 +287,11 @@ public class MenuNode implements Comparable {
* @date 2017年2月19日 下午11:18:19
*/
public
static
List
<
MenuNode
>
buildTitle
(
List
<
MenuNode
>
nodes
)
{
List
<
MenuNode
>
clearBtn
=
clearBtn
(
nodes
);
new
MenuNode
().
buildNodeTree
(
clearBtn
);
List
<
MenuNode
>
menuNodes
=
clearLevelTwo
(
clearBtn
);
//对菜单排序
...
...
src/main/webapp/WEB-INF/view/common/_tab.html
View file @
4fb562f7
...
...
@@ -47,9 +47,22 @@
</a>
<ul
class=
"nav nav-second-level"
>
@for(subTitle in title.children){
@if(tool.isEmpty(subTitle.children)){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${subTitle.url}"
>
${subTitle.name}
</a>
</li>
@}else{
<li>
<a
href=
"#"
>
${subTitle.name}
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-third-level"
>
@for(thirdTitle in subTitle.children){
<li>
<a
class=
"J_menuItem"
href=
"${ctxPath}${thirdTitle.url}"
>
${thirdTitle.name}
</a>
</li>
@}
</ul>
</li>
@}
@}
</ul>
</li>
...
...
src/main/webapp/WEB-INF/view/system/role/role_assign.html
View file @
4fb562f7
...
...
@@ -30,7 +30,8 @@
function
initZtree
()
{
var
setting
=
{
check
:
{
enable
:
true
enable
:
true
,
chkboxType
:
{
"Y"
:
""
,
"N"
:
""
}
},
data
:
{
simpleData
:
{
...
...
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