Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
2403c05b
Z
zheng
项目概览
fenghuo12
/
zheng
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zheng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2403c05b
编写于
2月 26, 2017
作者:
shuzheng5201314
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
授权改为按钮权限
上级
5b7d9e8a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
76 addition
and
0 deletion
+76
-0
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsRoleController.java
...eng/upms/server/controller/manage/UpmsRoleController.java
+9
-0
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsUserController.java
...eng/upms/server/controller/manage/UpmsUserController.java
+9
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
...-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
+29
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/user/index.jsp
...-server/src/main/webapp/WEB-INF/jsp/manage/user/index.jsp
+29
-0
未找到文件。
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsRoleController.java
浏览文件 @
2403c05b
...
...
@@ -46,6 +46,15 @@ public class UpmsRoleController extends BaseController {
return
"/manage/role/index"
;
}
@ApiOperation
(
value
=
"角色授权"
)
@RequiresPermissions
(
"upms:role:permission"
)
@RequestMapping
(
value
=
"/permission/{id}"
,
method
=
RequestMethod
.
GET
)
public
String
permission
(
@PathVariable
(
"id"
)
int
id
,
ModelMap
modelMap
)
{
UpmsRole
role
=
upmsRoleService
.
selectByPrimaryKey
(
id
);
modelMap
.
put
(
"role"
,
role
);
return
"/manage/role/permission"
;
}
@ApiOperation
(
value
=
"角色列表"
)
@RequiresPermissions
(
"upms:role:read"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
...
...
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsUserController.java
浏览文件 @
2403c05b
...
...
@@ -47,6 +47,15 @@ public class UpmsUserController extends BaseController {
return
"/manage/user/index"
;
}
@ApiOperation
(
value
=
"用户授权"
)
@RequiresPermissions
(
"upms:user:permission"
)
@RequestMapping
(
value
=
"/permission/{id}"
,
method
=
RequestMethod
.
GET
)
public
String
permission
(
@PathVariable
(
"id"
)
int
id
,
ModelMap
modelMap
)
{
UpmsUser
user
=
upmsUserService
.
selectByPrimaryKey
(
id
);
modelMap
.
put
(
"user"
,
user
);
return
"/manage/user/permission"
;
}
@ApiOperation
(
value
=
"用户列表"
)
@RequiresPermissions
(
"upms:user:read"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
...
...
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
浏览文件 @
2403c05b
...
...
@@ -21,6 +21,7 @@
<shiro:hasPermission
name=
"upms:role:create"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"createAction()"
><i
class=
"zmdi zmdi-plus"
></i>
新增角色
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:role:update"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"updateAction()"
><i
class=
"zmdi zmdi-edit"
></i>
编辑角色
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:role:delete"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"deleteAction()"
><i
class=
"zmdi zmdi-close"
></i>
删除角色
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:role:permission"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"permissionAction()"
><i
class=
"zmdi zmdi-key"
></i>
角色授权
</a></shiro:hasPermission>
</div>
<table
id=
"table"
></table>
</div>
...
...
@@ -206,6 +207,34 @@ function deleteAction() {
});
}
}
// 授权
var
permissionDialog
;
function
permissionAction
()
{
var
rows
=
$table
.
bootstrapTable
(
'
getSelections
'
);
if
(
rows
.
length
!=
1
)
{
$
.
confirm
({
title
:
false
,
content
:
'
请选择一条记录!
'
,
autoClose
:
'
cancel|3000
'
,
backgroundDismiss
:
true
,
buttons
:
{
cancel
:
{
text
:
'
取消
'
,
btnClass
:
'
waves-effect waves-button
'
}
}
});
}
else
{
permissionDialog
=
$
.
dialog
({
animationSpeed
:
300
,
title
:
'
角色授权
'
,
content
:
'
url:${basePath}/manage/role/permission/
'
+
rows
[
0
].
roleId
,
onContentReady
:
function
()
{
initMaterialInput
();
}
});
}
}
</script>
</body>
</html>
\ No newline at end of file
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/user/index.jsp
浏览文件 @
2403c05b
...
...
@@ -21,6 +21,7 @@
<shiro:hasPermission
name=
"upms:user:create"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"createAction()"
><i
class=
"zmdi zmdi-plus"
></i>
新增用户
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:user:update"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"updateAction()"
><i
class=
"zmdi zmdi-edit"
></i>
编辑用户
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:user:delete"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"deleteAction()"
><i
class=
"zmdi zmdi-close"
></i>
删除用户
</a></shiro:hasPermission>
<shiro:hasPermission
name=
"upms:user:permission"
><a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"permissionAction()"
><i
class=
"zmdi zmdi-key"
></i>
用户授权
</a></shiro:hasPermission>
</div>
<table
id=
"table"
></table>
</div>
...
...
@@ -232,6 +233,34 @@ function deleteAction() {
});
}
}
// 授权
var
permissionDialog
;
function
permissionAction
()
{
var
rows
=
$table
.
bootstrapTable
(
'
getSelections
'
);
if
(
rows
.
length
!=
1
)
{
$
.
confirm
({
title
:
false
,
content
:
'
请选择一条记录!
'
,
autoClose
:
'
cancel|3000
'
,
backgroundDismiss
:
true
,
buttons
:
{
cancel
:
{
text
:
'
取消
'
,
btnClass
:
'
waves-effect waves-button
'
}
}
});
}
else
{
permissionDialog
=
$
.
dialog
({
animationSpeed
:
300
,
title
:
'
用户授权
'
,
content
:
'
url:${basePath}/manage/user/permission/
'
+
rows
[
0
].
userId
,
onContentReady
:
function
()
{
initMaterialInput
();
}
});
}
}
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录