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
b6da4907
Commit
b6da4907
authored
Apr 18, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单管理的搜索条件的完善
parent
46936c01
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
17 deletions
+16
-17
src/main/java/com/stylefeng/guns/modular/system/controller/MenuController.java
+3
-15
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/MenuDao.xml
+1
-1
src/main/webapp/WEB-INF/view/system/menu/menu.html
+1
-1
src/main/webapp/static/modular/system/menu/menu.js
+11
-0
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/MenuController.java
View file @
b6da4907
...
@@ -20,6 +20,7 @@ import org.springframework.ui.Model;
...
@@ -20,6 +20,7 @@ import org.springframework.ui.Model;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -95,21 +96,8 @@ public class MenuController extends BaseController {
...
@@ -95,21 +96,8 @@ public class MenuController extends BaseController {
*/
*/
@RequestMapping
(
value
=
"/list"
)
@RequestMapping
(
value
=
"/list"
)
@ResponseBody
@ResponseBody
public
Object
list
()
{
public
Object
list
(
@RequestParam
(
required
=
false
)
String
menuName
)
{
List
<
Map
<
String
,
Object
>>
menus
=
this
.
menuDao
.
selectMenus
(
null
);
List
<
Map
<
String
,
Object
>>
menus
=
this
.
menuDao
.
selectMenus
(
menuName
);
return
super
.
warpObject
(
new
MenuWarpper
(
menus
));
}
/**
* 获取菜单列表
*/
@RequestMapping
(
value
=
"/list/{condition}"
)
@ResponseBody
public
Object
list
(
@PathVariable
String
condition
)
{
if
(
ToolUtil
.
isEmpty
(
condition
))
{
throw
new
BussinessException
(
BizExceptionEnum
.
REQUEST_NULL
);
}
List
<
Map
<
String
,
Object
>>
menus
=
this
.
menuDao
.
selectMenus
(
condition
);
return
super
.
warpObject
(
new
MenuWarpper
(
menus
));
return
super
.
warpObject
(
new
MenuWarpper
(
menus
));
}
}
...
...
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/MenuDao.xml
View file @
b6da4907
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
from _menu
from _menu
where status = 1
where status = 1
<if
test=
"condition != null and condition != ''"
>
<if
test=
"condition != null and condition != ''"
>
and
name = #{condition}
and
(name like CONCAT('%',#{condition},'%') or code like CONCAT('%',#{condition},'%'))
</if>
</if>
</select>
</select>
...
...
src/main/webapp/WEB-INF/view/system/menu/menu.html
View file @
b6da4907
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<
#
NameCon
id=
"menuName"
name=
"菜单名称"
/>
<
#
NameCon
id=
"menuName"
name=
"菜单名称"
/>
</div>
</div>
<div
class=
"col-sm-3"
>
<div
class=
"col-sm-3"
>
<
#
button
name=
"搜索"
icon=
"fa-search"
clickFun=
"search()"
/>
<
#
button
name=
"搜索"
icon=
"fa-search"
clickFun=
"
Menu.
search()"
/>
</div>
</div>
</div>
</div>
<div
class=
"hidden-xs"
id=
"menuTableToolbar"
role=
"group"
>
<div
class=
"hidden-xs"
id=
"menuTableToolbar"
role=
"group"
>
...
...
src/main/webapp/static/modular/system/menu/menu.js
View file @
b6da4907
...
@@ -93,6 +93,17 @@ Menu.delMenu = function(){
...
@@ -93,6 +93,17 @@ Menu.delMenu = function(){
}
}
};
};
/**
* 搜索
*/
Menu
.
search
=
function
(){
var
queryData
=
{};
queryData
[
'menuName'
]
=
$
(
"#menuName"
).
val
();
Menu
.
table
.
refresh
({
query
:
queryData
});
}
$
(
function
(){
$
(
function
(){
var
defaultColunms
=
Menu
.
initColumn
();
var
defaultColunms
=
Menu
.
initColumn
();
var
table
=
new
BSTable
(
Menu
.
id
,
"/menu/list"
,
defaultColunms
);
var
table
=
new
BSTable
(
Menu
.
id
,
"/menu/list"
,
defaultColunms
);
...
...
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