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
03f98bc5
Commit
03f98bc5
authored
Jun 05, 2017
by
Swifly
Committed by
stylefeng
Jun 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request !6 from Swifly/master
parents
c0514f8a
96768ec9
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
8 deletions
+60
-8
src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
+2
-2
src/main/java/com/stylefeng/guns/modular/system/dao/UserMgrDao.java
+1
-1
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserMgrDao.xml
+3
-0
src/main/webapp/WEB-INF/view/system/dict/dict.html
+1
-1
src/main/webapp/WEB-INF/view/system/user/user.html
+30
-3
src/main/webapp/static/css/_fstyle.css
+4
-0
src/main/webapp/static/modular/system/user/user.js
+19
-1
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
03f98bc5
...
@@ -159,8 +159,8 @@ public class UserMgrController extends BaseController {
...
@@ -159,8 +159,8 @@ public class UserMgrController extends BaseController {
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
@Permission
@Permission
@ResponseBody
@ResponseBody
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestParam
(
required
=
false
)
Integer
deptid
)
{
List
<
Map
<
String
,
Object
>>
users
=
managerDao
.
selectUsers
(
name
,
beginTime
,
endTime
);
List
<
Map
<
String
,
Object
>>
users
=
managerDao
.
selectUsers
(
name
,
beginTime
,
endTime
,
deptid
);
return
new
UserWarpper
(
users
).
warp
();
return
new
UserWarpper
(
users
).
warp
();
}
}
...
...
src/main/java/com/stylefeng/guns/modular/system/dao/UserMgrDao.java
View file @
03f98bc5
...
@@ -38,7 +38,7 @@ public interface UserMgrDao {
...
@@ -38,7 +38,7 @@ public interface UserMgrDao {
* @return
* @return
* @date 2017年2月12日 下午9:14:34
* @date 2017年2月12日 下午9:14:34
*/
*/
List
<
Map
<
String
,
Object
>>
selectUsers
(
@Param
(
"name"
)
String
name
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
Map
<
String
,
Object
>>
selectUsers
(
@Param
(
"name"
)
String
name
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"deptid"
)
Integer
deptid
);
/**
/**
* 设置用户的角色
* 设置用户的角色
...
...
src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserMgrDao.xml
View file @
03f98bc5
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
or account like CONCAT('%',#{name},'%')
or account like CONCAT('%',#{name},'%')
or name like CONCAT('%',#{name},'%'))
or name like CONCAT('%',#{name},'%'))
</if>
</if>
<if
test=
"deptid != null and deptid != 0"
>
and deptid = #{deptid}
</if>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != ''"
>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != ''"
>
and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
and (createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if>
</if>
...
...
src/main/webapp/WEB-INF/view/system/dict/dict.html
View file @
03f98bc5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"ibox-title"
>
<h5>
部门
管理
</h5>
<h5>
字典
管理
</h5>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
"ibox-content"
>
<div
class=
"row row-lg"
>
<div
class=
"row row-lg"
>
...
...
src/main/webapp/WEB-INF/view/system/user/user.html
View file @
03f98bc5
...
@@ -10,18 +10,43 @@
...
@@ -10,18 +10,43 @@
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-3"
>
<div
class=
"col-sm-3"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
组织机构
</div>
<div
class=
"panel-body dept-tree"
>
<ul
id=
"treeDemo"
class=
"ztree"
></ul>
</div>
</div>
</div>
<div
class=
"col-sm-9"
>
<div
class=
"row"
>
<div
class=
"col-sm-10"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<
#
NameCon
id=
"name"
name=
"用户名称"
placeholder=
"帐号/姓名/手机号"
/>
<
#
NameCon
id=
"name"
name=
"用户名称"
placeholder=
"帐号/姓名/手机号"
/>
</div>
</div>
<div
class=
"col-sm-3"
>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<
#
TimeCon
id=
"beginTime"
name=
"注册开始日期"
isTime=
"false"
pattern=
"YYYY-MM-DD"
/>
<
#
TimeCon
id=
"beginTime"
name=
"注册开始日期"
isTime=
"false"
pattern=
"YYYY-MM-DD"
/>
</div>
</div>
<div
class=
"col-sm-3
"
>
<div
class=
"col-sm-6
"
>
<
#
TimeCon
id=
"endTime"
name=
"注册结束日期"
isTime=
"false"
pattern=
"YYYY-MM-DD"
/>
<
#
TimeCon
id=
"endTime"
name=
"注册结束日期"
isTime=
"false"
pattern=
"YYYY-MM-DD"
/>
</div>
</div>
<div
class=
"col-sm-3"
>
</div>
</div>
<div
class=
"col-sm-2"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<
#
button
name=
"搜索"
icon=
"fa-search"
clickFun=
"MgrUser.search()"
/>
<
#
button
name=
"搜索"
icon=
"fa-search"
clickFun=
"MgrUser.search()"
/>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<
#
button
name=
"重置"
icon=
"fa-trash"
clickFun=
"MgrUser.resetSearch()"
/>
</div>
</div>
</div>
</div>
<div
class=
"hidden-xs"
id=
"managerTableToolbar"
role=
"group"
>
<div
class=
"hidden-xs"
id=
"managerTableToolbar"
role=
"group"
>
@if(shiro.hasPermission("/mgr/add")){
@if(shiro.hasPermission("/mgr/add")){
<
#
button
name=
"添加"
icon=
"fa-plus"
clickFun=
"MgrUser.openAddMgr()"
/>
<
#
button
name=
"添加"
icon=
"fa-plus"
clickFun=
"MgrUser.openAddMgr()"
/>
...
@@ -51,6 +76,8 @@
...
@@ -51,6 +76,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
src=
"${ctxPath}/static/modular/system/user/user.js"
></script>
<script
src=
"${ctxPath}/static/modular/system/user/user.js"
></script>
@}
@}
src/main/webapp/static/css/_fstyle.css
View file @
03f98bc5
...
@@ -52,3 +52,6 @@
...
@@ -52,3 +52,6 @@
max-height
:
160px
!important
;
max-height
:
160px
!important
;
-moz-user-select
:
none
!important
;
-moz-user-select
:
none
!important
;
}
}
.dept-tree
{
padding
:
10px
}
\ No newline at end of file
src/main/webapp/static/modular/system/user/user.js
View file @
03f98bc5
...
@@ -5,7 +5,8 @@ var MgrUser = {
...
@@ -5,7 +5,8 @@ var MgrUser = {
id
:
"managerTable"
,
//表格id
id
:
"managerTable"
,
//表格id
seItem
:
null
,
//选中的条目
seItem
:
null
,
//选中的条目
table
:
null
,
table
:
null
,
layerIndex
:
-
1
layerIndex
:
-
1
,
deptid
:
0
};
};
/**
/**
...
@@ -166,9 +167,18 @@ MgrUser.resetPwd = function () {
...
@@ -166,9 +167,18 @@ MgrUser.resetPwd = function () {
}
}
};
};
MgrUser
.
resetSearch
=
function
()
{
$
(
"#name"
).
val
(
""
);
$
(
"#beginTime"
).
val
(
""
);
$
(
"#endTime"
).
val
(
""
);
MgrUser
.
search
();
}
MgrUser
.
search
=
function
()
{
MgrUser
.
search
=
function
()
{
var
queryData
=
{};
var
queryData
=
{};
queryData
[
'deptid'
]
=
MgrUser
.
deptid
;
queryData
[
'name'
]
=
$
(
"#name"
).
val
();
queryData
[
'name'
]
=
$
(
"#name"
).
val
();
queryData
[
'beginTime'
]
=
$
(
"#beginTime"
).
val
();
queryData
[
'beginTime'
]
=
$
(
"#beginTime"
).
val
();
queryData
[
'endTime'
]
=
$
(
"#endTime"
).
val
();
queryData
[
'endTime'
]
=
$
(
"#endTime"
).
val
();
...
@@ -176,9 +186,17 @@ MgrUser.search = function () {
...
@@ -176,9 +186,17 @@ MgrUser.search = function () {
MgrUser
.
table
.
refresh
({
query
:
queryData
});
MgrUser
.
table
.
refresh
({
query
:
queryData
});
}
}
MgrUser
.
onClickDept
=
function
(
e
,
treeId
,
treeNode
)
{
MgrUser
.
deptid
=
treeNode
.
id
;
MgrUser
.
search
();
};
$
(
function
()
{
$
(
function
()
{
var
defaultColunms
=
MgrUser
.
initColumn
();
var
defaultColunms
=
MgrUser
.
initColumn
();
var
table
=
new
BSTable
(
"managerTable"
,
"/mgr/list"
,
defaultColunms
);
var
table
=
new
BSTable
(
"managerTable"
,
"/mgr/list"
,
defaultColunms
);
table
.
setPaginationType
(
"client"
);
table
.
setPaginationType
(
"client"
);
MgrUser
.
table
=
table
.
init
();
MgrUser
.
table
=
table
.
init
();
var
ztree
=
new
$ZTree
(
"treeDemo"
,
"/dept/tree"
);
ztree
.
bindOnClick
(
MgrUser
.
onClickDept
);
ztree
.
init
();
});
});
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