Commit 0eec945c by fengshuonan

完善角色分配页面

parent 7587d932
@layout("/common/_tree_dialog.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">
$(function () {
Feng.addCtx("${ctxPath}");
Feng.sessionTimeoutRegistry();
</script>
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
$("#closeButton").bind("click", function () {
parent.layer.close(index);
});
<!--其他插件js-->
<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">
var ZTreeDlg = {
};
$(function () {
$("#saveButton").bind("click", function () {
var ids = Feng.zTreeCheckedNodes("zTree");
......@@ -19,12 +81,13 @@
ajax.set("roleIds", ids);
ajax.set("userId", "${userId}");
ajax.start();
parent.layer.close(parent.MgrUser.layerIndex);
});
initZtree();
});
$("#closeButton").bind("click", function () {
parent.layer.close(parent.MgrUser.layerIndex);
});
function initZtree() {
var setting = {
check: {
enable: true,
......@@ -39,9 +102,14 @@
}
}
};
var ztree = new $ZTree("zTree", "/role/roleTreeListByUserId/${userId}");
ztree.setSettings(setting);
ztree.init();
}
ZTreeDlg.instance = ztree;
});
</script>
@}
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment