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
17806ffd
Commit
17806ffd
authored
Dec 03, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限配置页面修改
parent
14509d59
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
45 deletions
+84
-45
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
+1
-1
src/main/webapp/WEB-INF/system/role/role.html
+1
-1
src/main/webapp/WEB-INF/system/role/role_assign.html
+82
-43
No files found.
src/main/java/cn/stylefeng/guns/modular/system/controller/RoleController.java
View file @
17806ffd
...
@@ -100,7 +100,7 @@ public class RoleController extends BaseController {
...
@@ -100,7 +100,7 @@ public class RoleController extends BaseController {
}
}
/**
/**
* 跳转到
角色
分配
* 跳转到
权限
分配
*/
*/
@Permission
@Permission
@RequestMapping
(
value
=
"/role_assign/{roleId}"
)
@RequestMapping
(
value
=
"/role_assign/{roleId}"
)
...
...
src/main/webapp/WEB-INF/system/role/role.html
View file @
17806ffd
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
@}
@}
@if(shiro.hasPermission("/role/setAuthority")){
@if(shiro.hasPermission("/role/setAuthority")){
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Role.assign()"
>
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Role.assign()"
>
<i
class=
"fa fa-
remove
"
></i>
权限配置
<i
class=
"fa fa-
user-secret
"
></i>
权限配置
</button>
</button>
@}
@}
</div>
</div>
...
...
src/main/webapp/WEB-INF/system/role/role_assign.html
View file @
17806ffd
@layout("/common/_container.html"){
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
${title!"Guns管理系统"}
</title>
<meta
name=
"description"
content=
"Guns管理系统"
>
<meta
name=
"author"
content=
"stylefeng"
>
<!-- Bootstrap Core CSS -->
<link
href=
"${ctxPath}/assets/common/plugins/bootstrap/css/bootstrap.min.css"
rel=
"stylesheet"
>
<!-- Custom CSS -->
<link
href=
"${ctxPath}/assets/common/static/css/style.css"
rel=
"stylesheet"
>
<link
href=
"${ctxPath}/assets/common/static/stylefeng/feng.css"
rel=
"stylesheet"
>
<!--其他插件css-->
<link
href=
"${ctxPath}/assets/common/plugins/ztree/zTreeStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body
class=
"fix-header fix-sidebar card-no-border"
>
<div
id=
"main-wrapper"
>
<div
class=
"container-fluid"
>
<div
class=
"row p-10"
style=
"background: #f2f7f8;"
>
<ul
id=
"zTree"
class=
"ztree"
></ul>
</div>
<div
class=
"row p-10"
style=
"background: #CFD4D5;"
>
<div
style=
"float:left;margin: auto"
>
<button
class=
"btn btn-sm btn-info"
type=
"button"
id=
"saveButton"
>
<i
class=
"ace-icon fa fa-check"
></i>
保存
</button>
<button
class=
"btn btn-sm btn-danger"
type=
"button"
id=
"closeButton"
>
<i
class=
"ace-icon fa fa-close"
></i>
关闭
</button>
</div>
</div>
</div>
</div>
<!-- jquery -->
<script
src=
"${ctxPath}/assets/common/plugins/jquery/jquery.min.js"
></script>
<!-- Bootstrap tether Core JavaScript -->
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap/js/tether.min.js"
></script>
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap/js/bootstrap.min.js"
></script>
<!--Guns JavaScript -->
<script
src=
"${ctxPath}/assets/common/static/stylefeng/feng.js"
></script>
<script
src=
"${ctxPath}/assets/common/static/stylefeng/ajax-object.js"
></script>
<!-- vue -->
<script
src=
"${ctxPath}/assets/common/plugins/vue/vue.js"
></script>
<!-- 加入contextPath属性和session超时的配置 -->
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
()
{
Feng
.
addCtx
(
"${ctxPath}"
);
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
Feng
.
sessionTimeoutRegistry
();
</script>
$
(
"#btn_close"
).
bind
(
"click"
,
function
()
{
<!--其他插件js-->
parent
.
layer
.
close
(
index
);
<script
src=
"${ctxPath}/assets/common/plugins/ztree/jquery.ztree.all.min.js"
></script>
});
<script
src=
"${ctxPath}/assets/common/plugins/ztree/ztree-object.js"
></script>
<script
type=
"text/javascript"
>
$
(
"#btn_save"
).
bind
(
"click"
,
function
()
{
var
ZTreeDlg
=
{
};
$
(
function
()
{
$
(
"#saveButton"
).
bind
(
"click"
,
function
()
{
var
ids
=
Feng
.
zTreeCheckedNodes
(
"zTree"
);
var
ids
=
Feng
.
zTreeCheckedNodes
(
"zTree"
);
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/role/setAuthority"
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/role/setAuthority"
,
function
(
data
)
{
Feng
.
success
(
"分配角色成功!"
);
parent
.
Feng
.
success
(
"分配角色成功!"
);
window
.
parent
.
Role
.
table
.
refresh
();
window
.
parent
.
Role
.
table
.
refresh
();
parent
.
layer
.
close
(
i
ndex
);
parent
.
layer
.
close
(
parent
.
Role
.
layerI
ndex
);
},
function
(
data
)
{
},
function
(
data
)
{
Feng
.
error
(
"分配角色失败!"
parent
.
Feng
.
error
(
"分配角色失败!"
+
data
.
responseJSON
.
message
+
"!"
);
+
data
.
responseJSON
.
message
+
"!"
);
});
});
ajax
.
set
(
"roleId"
,
"${roleId}"
);
ajax
.
set
(
"ids"
,
ids
);
ajax
.
set
(
"ids"
,
ids
);
ajax
.
set
(
"roleId"
,
"${roleId}"
);
ajax
.
start
();
ajax
.
start
();
});
});
initZtree
();
$
(
"#closeButton"
).
bind
(
"click"
,
function
()
{
parent
.
layer
.
close
(
parent
.
Role
.
layerIndex
);
});
});
function
initZtree
()
{
var
setting
=
{
var
setting
=
{
check
:
{
check
:
{
enable
:
true
,
enable
:
true
,
chkboxType
:
{
"Y"
:
"ps"
,
"N"
:
"ps"
}
chkboxType
:
{
"Y"
:
"ps"
,
"N"
:
"ps"
}
},
},
data
:
{
data
:
{
simpleData
:
{
simpleData
:
{
...
@@ -40,36 +102,13 @@
...
@@ -40,36 +102,13 @@
}
}
};
};
var
ztree
=
new
$ZTree
(
"zTree"
,
"/menu/menuTreeListByRoleId/"
var
ztree
=
new
$ZTree
(
"zTree"
,
"/menu/menuTreeListByRoleId/${roleId}"
);
+
"${roleId}"
);
ztree
.
setSettings
(
setting
);
ztree
.
setSettings
(
setting
);
ztree
.
init
();
ztree
.
init
();
}
ZTreeDlg
.
instance
=
ztree
;
});
</script>
</script>
</body>
<!-- 配置grid -->
</html>
<div
class=
"container"
style=
"padding: 0px 10px !important;margin-top: -10px;text-align: center !important;"
>
<div
class=
"row"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
${roleName!}
</h5>
</div>
<div
class=
"ibox-content"
>
<ul
id=
"zTree"
class=
"ztree"
></ul>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<button
class=
"btn btn-sm btn-info"
type=
"button"
id=
"btn_save"
>
<i
class=
"ace-icon fa fa-check bigger-110"
></i>
保存
</button>
<button
class=
"btn btn-sm btn-danger"
type=
"button"
id=
"btn_close"
>
<i
class=
"ace-icon fa fa-close bigger-110"
></i>
关闭
</button>
</div>
</div>
</div>
@}
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