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
01a6325f
Commit
01a6325f
authored
Nov 10, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页查询逻辑
parent
0376a437
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
26 deletions
+41
-26
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
+12
-2
src/main/webapp/WEB-INF/system/user/user.html
+2
-2
src/main/webapp/assets/modular/system/user/user.js
+27
-22
No files found.
src/main/java/cn/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
01a6325f
...
...
@@ -191,9 +191,19 @@ public class UserMgrController extends BaseController {
@Permission
@ResponseBody
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestParam
(
required
=
false
)
String
timeLimit
,
@RequestParam
(
required
=
false
)
Integer
deptid
)
{
//拼接查询条件
String
beginTime
=
""
;
String
endTime
=
""
;
if
(
ToolUtil
.
isNotEmpty
(
timeLimit
))
{
String
[]
split
=
timeLimit
.
split
(
" - "
);
beginTime
=
split
[
0
];
endTime
=
split
[
1
];
}
if
(
ShiroKit
.
isAdmin
())
{
List
<
Map
<
String
,
Object
>>
users
=
userService
.
selectUsers
(
null
,
name
,
beginTime
,
endTime
,
deptid
);
return
new
UserWarpper
(
users
).
wrap
();
...
...
src/main/webapp/WEB-INF/system/user/user.html
View file @
01a6325f
...
...
@@ -10,7 +10,7 @@
</div>
</div>
</div>
<div
class=
"col-lg-10 col-sm-9"
>
<div
class=
"col-lg-10 col-sm-9"
id=
"userManagerPage"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"card card-outline-info m-b-10"
>
...
...
@@ -24,7 +24,7 @@
<div
class=
"col-md-3"
>
<div
class=
"input-group condition-button"
>
<span
class=
"input-group-addon"
>
用户名称
</span>
<input
type=
"text"
class=
"form-control"
id=
"name
"
placeholder=
"账号/姓名/手机号"
autocomplete=
"off"
>
<input
v-model=
"name"
type=
"text"
class=
"form-control
"
placeholder=
"账号/姓名/手机号"
autocomplete=
"off"
>
</div>
</div>
<div
class=
"col-md-3"
>
...
...
src/main/webapp/assets/modular/system/user/user.js
View file @
01a6325f
...
...
@@ -6,7 +6,10 @@ var MgrUser = {
seItem
:
null
,
//选中的条目
table
:
null
,
layerIndex
:
-
1
,
deptid
:
0
condition
:
{
name
:
""
,
deptId
:
""
}
};
/**
...
...
@@ -48,8 +51,8 @@ MgrUser.openAddMgr = function () {
this
.
layerIndex
=
layer
.
open
({
type
:
2
,
title
:
'添加管理员'
,
area
:
[
'800px'
,
'580px'
],
//宽高
fix
:
false
,
//不固定
area
:
[
'800px'
,
'580px'
],
fix
:
false
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/mgr/user_add'
});
...
...
@@ -63,7 +66,7 @@ MgrUser.openChangeUser = function () {
this
.
layerIndex
=
layer
.
open
({
type
:
2
,
title
:
'编辑管理员'
,
area
:
[
'800px'
,
'500px'
],
//宽高
area
:
[
'800px'
,
'500px'
],
fix
:
false
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/mgr/user_edit?userId='
+
this
.
seItem
.
id
...
...
@@ -79,9 +82,8 @@ MgrUser.roleAssign = function () {
this
.
layerIndex
=
layer
.
open
({
type
:
2
,
title
:
'角色分配'
,
area
:
[
'300px'
,
'400px'
],
//宽高
fix
:
false
,
//不固定
maxmin
:
true
,
area
:
[
'300px'
,
'400px'
],
fix
:
false
,
content
:
Feng
.
ctxPath
+
'/mgr/role_assign?userId='
+
this
.
seItem
.
id
});
}
...
...
@@ -92,8 +94,7 @@ MgrUser.roleAssign = function () {
*/
MgrUser
.
delMgrUser
=
function
()
{
if
(
this
.
check
())
{
var
operation
=
function
(){
var
operation
=
function
()
{
var
userId
=
MgrUser
.
seItem
.
id
;
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/mgr/delete"
,
function
()
{
Feng
.
success
(
"删除成功!"
);
...
...
@@ -105,13 +106,12 @@ MgrUser.delMgrUser = function () {
ajax
.
start
();
};
Feng
.
confirm
(
"是否删除用户"
+
MgrUser
.
seItem
.
account
+
"?"
,
operation
);
Feng
.
confirm
(
"是否删除用户"
+
MgrUser
.
seItem
.
account
+
"?"
,
operation
);
}
};
/**
* 冻结用户账户
* @param userId
*/
MgrUser
.
freezeAccount
=
function
()
{
if
(
this
.
check
())
{
...
...
@@ -165,34 +165,39 @@ MgrUser.resetPwd = function () {
}
};
MgrUser
.
resetSearch
=
function
()
{
$
(
"#name"
).
val
(
""
);
$
(
"#beginTime"
).
val
(
""
);
$
(
"#endTime"
).
val
(
""
);
MgrUser
.
search
();
};
/**
* 点击查询按钮
*/
MgrUser
.
search
=
function
()
{
var
queryData
=
{};
queryData
[
'deptid'
]
=
MgrUser
.
depti
d
;
queryData
[
'name'
]
=
$
(
"#name"
).
val
()
;
queryData
[
'deptid'
]
=
MgrUser
.
condition
.
deptI
d
;
queryData
[
'name'
]
=
MgrUser
.
condition
.
name
;
queryData
[
'timeLimit'
]
=
$
(
"#timeLimit"
).
val
();
MgrUser
.
table
.
refresh
({
query
:
queryData
});
};
/**
* 选择部门时
*/
MgrUser
.
onClickDept
=
function
(
e
,
treeId
,
treeNode
)
{
MgrUser
.
depti
d
=
treeNode
.
id
;
MgrUser
.
condition
.
deptI
d
=
treeNode
.
id
;
MgrUser
.
search
();
};
$
(
function
()
{
MgrUser
.
app
=
new
Vue
({
el
:
'#userManagerPage'
,
data
:
MgrUser
.
condition
});
var
defaultColunms
=
MgrUser
.
initColumn
();
var
table
=
new
BSTable
(
"managerTable"
,
"/mgr/list"
,
defaultColunms
);
table
.
setPaginationType
(
"client"
);
MgrUser
.
table
=
table
.
init
();
var
ztree
=
new
$ZTree
(
"deptTree"
,
"/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