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
7e4d63a2
Commit
7e4d63a2
authored
Jun 01, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单页面新增是否是菜单字段
parent
00cfc22b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
1 deletions
+67
-1
src/main/java/com/stylefeng/guns/common/constant/state/IsMenu.java
+50
-0
src/main/java/com/stylefeng/guns/modular/system/warpper/MenuWarpper.java
+2
-0
src/main/webapp/WEB-INF/view/system/menu/menu_add.html
+4
-0
src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
+6
-0
src/main/webapp/static/modular/system/menu/menu.js
+1
-0
src/main/webapp/static/modular/system/menu/menu_info.js
+4
-1
No files found.
src/main/java/com/stylefeng/guns/common/constant/state/IsMenu.java
0 → 100644
View file @
7e4d63a2
package
com
.
stylefeng
.
guns
.
common
.
constant
.
state
;
/**
* 是否是菜单的枚举
*
* @author fengshuonan
* @date 2017年6月1日22:50:11
*/
public
enum
IsMenu
{
YES
(
1
,
"是"
),
NO
(
0
,
"不是"
);
//不是菜单的是按钮
int
code
;
String
message
;
IsMenu
(
int
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
static
String
valueOf
(
Integer
status
)
{
if
(
status
==
null
)
{
return
""
;
}
else
{
for
(
IsMenu
s
:
IsMenu
.
values
())
{
if
(
s
.
getCode
()
==
status
)
{
return
s
.
getMessage
();
}
}
return
""
;
}
}
}
src/main/java/com/stylefeng/guns/modular/system/warpper/MenuWarpper.java
View file @
7e4d63a2
package
com
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
package
com
.
stylefeng
.
guns
.
modular
.
system
.
warpper
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.constant.factory.ConstantFactory
;
import
com.stylefeng.guns.common.constant.state.IsMenu
;
import
com.stylefeng.guns.common.warpper.BaseControllerWarpper
;
import
com.stylefeng.guns.common.warpper.BaseControllerWarpper
;
import
java.util.List
;
import
java.util.List
;
...
@@ -21,6 +22,7 @@ public class MenuWarpper extends BaseControllerWarpper {
...
@@ -21,6 +22,7 @@ public class MenuWarpper extends BaseControllerWarpper {
@Override
@Override
public
void
warpTheMap
(
Map
<
String
,
Object
>
map
)
{
public
void
warpTheMap
(
Map
<
String
,
Object
>
map
)
{
map
.
put
(
"statusName"
,
ConstantFactory
.
me
().
getMenuStatusName
((
Integer
)
map
.
get
(
"status"
)));
map
.
put
(
"statusName"
,
ConstantFactory
.
me
().
getMenuStatusName
((
Integer
)
map
.
get
(
"status"
)));
map
.
put
(
"isMenuName"
,
IsMenu
.
valueOf
((
Integer
)
map
.
get
(
"ismenu"
)));
}
}
}
}
src/main/webapp/WEB-INF/view/system/menu/menu_add.html
View file @
7e4d63a2
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
clickFun=
"MenuInfoDlg.showMenuSelectTree(); return false;"
clickFun=
"MenuInfoDlg.showMenuSelectTree(); return false;"
style=
"background-color: #ffffff !important;"
style=
"background-color: #ffffff !important;"
selectFlag=
"true"
selectId=
"pcodeTreeDiv"
selectTreeId=
"pcodeTree"
selectStyle=
"width:244px !important;"
/>
selectFlag=
"true"
selectId=
"pcodeTreeDiv"
selectTreeId=
"pcodeTree"
selectStyle=
"width:244px !important;"
/>
<
#
select
id=
"ismenu"
name=
"是否是菜单"
>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
不是
</option>
</
#
select>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<
#
input
id=
"url"
name=
"请求地址"
underline=
"true"
/>
<
#
input
id=
"url"
name=
"请求地址"
underline=
"true"
/>
...
...
src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
View file @
7e4d63a2
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<div
class=
"form-horizontal"
>
<div
class=
"form-horizontal"
>
<input
type=
"hidden"
id=
"id"
value=
"${menu.id}"
>
<input
type=
"hidden"
id=
"id"
value=
"${menu.id}"
>
<input
type=
"hidden"
id=
"ismenuValue"
value=
"${menu.ismenu}"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-6 b-r"
>
<div
class=
"col-sm-6 b-r"
>
...
@@ -14,6 +15,11 @@
...
@@ -14,6 +15,11 @@
clickFun=
"MenuInfoDlg.showMenuSelectTree(); return false;"
clickFun=
"MenuInfoDlg.showMenuSelectTree(); return false;"
style=
"background-color: #ffffff !important;"
style=
"background-color: #ffffff !important;"
selectFlag=
"true"
selectId=
"pcodeTreeDiv"
selectTreeId=
"pcodeTree"
selectStyle=
"width:244px !important;"
/>
selectFlag=
"true"
selectId=
"pcodeTreeDiv"
selectTreeId=
"pcodeTree"
selectStyle=
"width:244px !important;"
/>
<
#
select
id=
"ismenu"
name=
"是否是菜单"
>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
不是
</option>
</
#
select>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<
#
input
id=
"url"
name=
"请求地址"
value=
"${menu.url}"
underline=
"true"
/>
<
#
input
id=
"url"
name=
"请求地址"
value=
"${menu.url}"
underline=
"true"
/>
...
...
src/main/webapp/static/modular/system/menu/menu.js
View file @
7e4d63a2
...
@@ -21,6 +21,7 @@ Menu.initColumn = function () {
...
@@ -21,6 +21,7 @@ Menu.initColumn = function () {
{
title
:
'请求地址'
,
field
:
'url'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'请求地址'
,
field
:
'url'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'排序'
,
field
:
'num'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'排序'
,
field
:
'num'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'层级'
,
field
:
'levels'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'层级'
,
field
:
'levels'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'是否是菜单'
,
field
:
'isMenuName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'状态'
,
field
:
'statusName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}]
{
title
:
'状态'
,
field
:
'statusName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}]
return
columns
;
return
columns
;
};
};
...
...
src/main/webapp/static/modular/system/menu/menu_info.js
View file @
7e4d63a2
...
@@ -45,7 +45,7 @@ MenuInfoDlg.close = function () {
...
@@ -45,7 +45,7 @@ MenuInfoDlg.close = function () {
* 收集数据
* 收集数据
*/
*/
MenuInfoDlg
.
collectData
=
function
()
{
MenuInfoDlg
.
collectData
=
function
()
{
this
.
set
(
'id'
).
set
(
'name'
).
set
(
'code'
).
set
(
'pcode'
).
set
(
'url'
).
set
(
'num'
).
set
(
'levels'
).
set
(
'icon'
);
this
.
set
(
'id'
).
set
(
'name'
).
set
(
'code'
).
set
(
'pcode'
).
set
(
'url'
).
set
(
'num'
).
set
(
'levels'
).
set
(
'icon'
)
.
set
(
"ismenu"
)
;
}
}
/**
/**
...
@@ -109,4 +109,7 @@ $(function () {
...
@@ -109,4 +109,7 @@ $(function () {
ztree
.
bindOnClick
(
MenuInfoDlg
.
onClickDept
);
ztree
.
bindOnClick
(
MenuInfoDlg
.
onClickDept
);
ztree
.
init
();
ztree
.
init
();
MenuInfoDlg
.
ztreeInstance
=
ztree
;
MenuInfoDlg
.
ztreeInstance
=
ztree
;
//初始化是否是菜单
$
(
"#ismenu"
).
val
(
$
(
"#ismenuValue"
).
val
());
});
});
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