mirror of
https://github.com/yangzongzhuan/RuoYi.git
synced 2025-10-19 20:17:42 +00:00
若依 2.4
This commit is contained in:
@@ -6,14 +6,13 @@
|
||||
<meta name="description" content="">
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<!-- bootstrap-table 表格插件样式 -->
|
||||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css}" rel="stylesheet"/>
|
||||
</head>
|
||||
<div th:fragment="footer">
|
||||
@@ -39,8 +38,8 @@
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=2.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=2.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
</div>
|
||||
|
@@ -12,10 +12,10 @@
|
||||
<![endif]-->
|
||||
<link th:href="@{favicon.ico}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
.nav > li:hover .dropdown-menu {display: block;}
|
||||
</style>
|
||||
@@ -136,7 +136,7 @@
|
||||
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
</body>
|
||||
|
@@ -8,11 +8,11 @@
|
||||
<meta name="keywords" content="若依管理系统">
|
||||
<meta name="description" content="RuoYi">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.css" th:href="@{css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/>
|
||||
<!--[if lt IE 9]>
|
||||
<meta http-equiv="refresh" content="0;ie.html" />
|
||||
<![endif]-->
|
||||
@@ -82,7 +82,7 @@
|
||||
<script src="../static/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<title>若依介绍</title>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
|
||||
</head>
|
||||
@@ -94,13 +94,44 @@
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v24">v2.4.0</a><code class="pull-right">2018.09.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v24" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持部门多级查询</li>
|
||||
<li>修复菜单状态查询无效</li>
|
||||
<li>支持IP地址开关</li>
|
||||
<li>支持XSS开关</li>
|
||||
<li>记录日志异步处理</li>
|
||||
<li>字典回显样式更改为下拉框</li>
|
||||
<li>菜单类型必填校验</li>
|
||||
<li>修复在线用户排序报错</li>
|
||||
<li>增加重置按钮</li>
|
||||
<li>支持注解导入数据</li>
|
||||
<li>支持弹层外区域关闭</li>
|
||||
<li>备注更换为文本区域</li>
|
||||
<li>新增角色逻辑删除</li>
|
||||
<li>新增部门逻辑删除</li>
|
||||
<li>支持部门数据权限</li>
|
||||
<li>管理员默认拥有所有授权</li>
|
||||
<li>字典数据采用分页</li>
|
||||
<li>部分细节调整优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v23">v2.3.0</a><code class="pull-right">2018.08.06</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v23" class="panel-collapse collapse in">
|
||||
<div id="v23" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持表格不分页开关控制</li>
|
||||
@@ -125,7 +156,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v22">v2.2.0</a><code class="pull-right">2018.07.23</code>
|
||||
</h5>
|
||||
@@ -149,7 +180,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v21">v2.1.0</a><code class="pull-right">2018.07.10</code>
|
||||
</h5>
|
||||
@@ -174,7 +205,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v20">v2.0.0</a><code class="pull-right">2018.07.02</code>
|
||||
</h5>
|
||||
@@ -197,7 +228,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v16">v1.1.6</a><code class="pull-right">2018.06.04</code>
|
||||
</h5>
|
||||
@@ -219,7 +250,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v15">v1.1.5</a><code class="pull-right">2018.05.28</code>
|
||||
</h5>
|
||||
@@ -241,7 +272,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v14">v1.1.4</a><code class="pull-right">2018.05.20</code>
|
||||
</h5>
|
||||
@@ -263,7 +294,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v13">v1.1.3</a><code class="pull-right">2018.05.14</code>
|
||||
</h5>
|
||||
@@ -284,7 +315,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v12">v1.1.2</a><code class="pull-right">2018.05.07</code>
|
||||
</h5>
|
||||
@@ -306,7 +337,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v11">v1.1.1</a><code class="pull-right">2018.04.23</code>
|
||||
</h5>
|
||||
@@ -325,7 +356,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v10">v1.1.0</a><code class="pull-right">2018.04.20</code>
|
||||
</h5>
|
||||
@@ -345,7 +376,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v09">v1.0.9</a><code class="pull-right">2018.04.14</code>
|
||||
</h5>
|
||||
@@ -360,7 +391,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v08">v1.0.8</a><code class="pull-right">2018.04.08</code>
|
||||
</h5>
|
||||
@@ -375,7 +406,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v07">v1.0.7</a><code class="pull-right">2018.04.04</code>
|
||||
</h5>
|
||||
@@ -390,7 +421,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v06">v1.0.6</a><code class="pull-right">2018.03.15</code>
|
||||
</h5>
|
||||
@@ -406,7 +437,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v05">v1.0.5</a><code class="pull-right">2018.03.12</code>
|
||||
</h5>
|
||||
@@ -421,7 +452,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v04">v1.0.4</a><code class="pull-right">2018.03.11</code>
|
||||
</h5>
|
||||
@@ -435,7 +466,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v03">v1.0.3</a><code class="pull-right">2018.03.08</code>
|
||||
</h5>
|
||||
@@ -449,7 +480,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v02">v1.0.2</a><code class="pull-right">2018.03.04</code>
|
||||
</h5>
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-job-add">
|
||||
@@ -39,9 +38,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行策略:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="1" /> 继续执行 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="2" /> 一次执行 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
|
||||
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="1" /> 继续执行 </label>
|
||||
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="2" /> 一次执行 </label>
|
||||
<label class="radio-box"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -68,7 +67,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "monitor/job"
|
||||
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-job-edit" th:object="${job}">
|
||||
@@ -40,9 +39,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">执行策略:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 继续执行 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 一次执行 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 继续执行 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 一次执行 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -69,7 +68,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "monitor/job"
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="deptName">
|
||||
<input class="form-control" type="text" name="deptName" id="deptName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -73,6 +73,9 @@
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"deptName" : function() {
|
||||
return $.common.trim($("#deptName").val());
|
||||
}
|
||||
@@ -105,9 +108,21 @@
|
||||
|
||||
/*部门管理-新增-选择父部门树*/
|
||||
function selectDeptTree() {
|
||||
var deptId = $("#treeId").val();
|
||||
var url = prefix + "/selectDeptTree/" + deptId;
|
||||
$.modal.open("选择部门", url, '380', '380');
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="deptName" th:field="*{deptName}">
|
||||
<input class="form-control" type="text" name="deptName" th:field="*{deptName}" id="deptName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -74,7 +74,10 @@
|
||||
dataType: "json",
|
||||
data: {
|
||||
"deptId": function() {
|
||||
return $.common.trim($("#deptId").val());
|
||||
return $("#deptId").val();
|
||||
},
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"deptName": function() {
|
||||
return $.common.trim($("#deptName").val());
|
||||
@@ -108,9 +111,21 @@
|
||||
|
||||
/*部门管理-修改-选择部门树*/
|
||||
function selectDeptTree() {
|
||||
var deptId = $("#treeId").val();
|
||||
var url = prefix + "/selectDeptTree/" + deptId;
|
||||
$.modal.open("选择部门", url, '380', '380');
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@@ -10,173 +10,38 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${dept.deptName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="search();">
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="searchNode()"> 搜索 </button>
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="javascript:" id="btnExpand">展开</a> /
|
||||
<a href="javascript:" id="btnCollapse">折叠</a>
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<div class="layui-layer-btn">
|
||||
<a class="layui-layer-btn0" th:onclick="'javascript:loadObj()'"><i class="fa fa-check"></i> 确定</a>
|
||||
<a class="layui-layer-btn1" onclick="$.modal.close()"><i class="fa fa-close"></i> 关闭</a>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
$.get(ctx + "system/dept/treeData", function(data) {
|
||||
var treeName = $("#treeName").val();
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
selectCheckNode(treeName,nodes[i]);
|
||||
}
|
||||
// 展开第二级节点
|
||||
nodes = tree.getNodesByParam("level", 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
selectCheckNode(treeName,nodes[i]);
|
||||
}
|
||||
// 展开第二级节点
|
||||
nodes = tree.getNodesByParam("level", 2);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
selectCheckNode(treeName,nodes[i]);
|
||||
}
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};
|
||||
|
||||
$(function() {
|
||||
loadTree();
|
||||
var url = ctx + "system/dept/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function selectCheckNode(treeName, node) {
|
||||
if(treeName == node.name){
|
||||
tree.selectNode(node, true);
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
tree.expandAll(true);
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
tree.expandAll(false);
|
||||
});
|
||||
|
||||
function loadObj(){
|
||||
var treeId = $("#treeId").val();
|
||||
var treeName = $("#treeName").val();
|
||||
parent.$("#treeId").val(treeId);
|
||||
parent.$("#treeName").val(treeName);
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
}
|
||||
|
||||
var lastValue = "", nodeList = [], key = $("#keyword");
|
||||
key.bind("focus", focusKey).bind("blur", blurKey).bind("change cut input propertychange", searchNode);
|
||||
key.bind("keydown", function (e){if(e.which == 13){searchNode();}});
|
||||
|
||||
function focusKey(e) {
|
||||
if (key.hasClass("empty")) {
|
||||
key.removeClass("empty");
|
||||
}
|
||||
}
|
||||
|
||||
function blurKey(e) {
|
||||
if (key.get(0).value === "") {
|
||||
key.addClass("empty");
|
||||
}
|
||||
searchNode(e);
|
||||
}
|
||||
|
||||
function searchNode() {
|
||||
var value = $.trim(key.get(0).value);
|
||||
var keyType = "name";
|
||||
if (lastValue === value) {
|
||||
return;
|
||||
}
|
||||
lastValue = value;
|
||||
var nodes = tree.getNodes();
|
||||
if (value == "") {
|
||||
showAllNode(nodes);
|
||||
return;
|
||||
}
|
||||
hideAllNode(nodes);
|
||||
nodeList = tree.getNodesByParamFuzzy(keyType, value);
|
||||
updateNodes(nodeList);
|
||||
}
|
||||
|
||||
function hideAllNode(nodes){
|
||||
var tree = $.fn.zTree.getZTreeObj("tree");
|
||||
nodes = tree.transformToArray(nodes);
|
||||
for(var i=nodes.length-1; i>=0; i--) {
|
||||
tree.hideNode(nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function showAllNode(nodes){
|
||||
nodes = tree.transformToArray(nodes);
|
||||
for(var i=nodes.length-1; i>=0; i--) {
|
||||
if(nodes[i].getParentNode()!=null){
|
||||
tree.expandNode(nodes[i],false,false,false,false);
|
||||
}else{
|
||||
tree.expandNode(nodes[i],true,true,false,false);
|
||||
}
|
||||
tree.showNode(nodes[i]);
|
||||
showAllNode(nodes[i].children);
|
||||
}
|
||||
}
|
||||
|
||||
function updateNodes(nodeList) {
|
||||
tree.showNodes(nodeList);
|
||||
for(var i=0, l=nodeList.length; i<l; i++) {
|
||||
var treeNode = nodeList[i];
|
||||
showChildren(treeNode);
|
||||
showParent(treeNode)
|
||||
}
|
||||
}
|
||||
|
||||
function showChildren(treeNode){
|
||||
if (treeNode.isParent){
|
||||
for(var idx in treeNode.children){
|
||||
var node = treeNode.children[idx];
|
||||
tree.showNode(node);
|
||||
showChildren(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
function showParent(treeNode){
|
||||
var parentNode;
|
||||
while((parentNode = treeNode.getParentNode()) != null){
|
||||
tree.showNode(parentNode);
|
||||
tree.expandNode(parentNode, true, false, false);
|
||||
treeNode = parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
function search($this) {
|
||||
$('#search').slideToggle(200);
|
||||
$('#btnShow').toggle();
|
||||
$('#btnHide').toggle();
|
||||
$('#keyword').focus();
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@@ -121,7 +121,12 @@
|
||||
|
||||
function queryParams(params) {
|
||||
return {
|
||||
dictType: $("#dictType").val()
|
||||
dictType: $("#dictType").val(),
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-menu-add">
|
||||
@@ -16,9 +15,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="radio-box"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -74,7 +73,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script>
|
||||
var prefix = ctx + "system/menu"
|
||||
$("#form-menu-add").validate({
|
||||
@@ -89,6 +87,9 @@
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"menuName" : function() {
|
||||
return $.common.trim($("#menuName").val());
|
||||
}
|
||||
@@ -146,16 +147,25 @@
|
||||
|
||||
/*菜单管理-新增-选择菜单树*/
|
||||
function selectMenuTree() {
|
||||
var menuId = $("#treeId").val();
|
||||
if(menuId > 0) {
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
$.modal.open("选择菜单", url, '380', '380');
|
||||
}
|
||||
else {
|
||||
var url = prefix + "/selectMenuTree/1";
|
||||
$.modal.open("选择菜单", url, '380', '380');
|
||||
}
|
||||
}
|
||||
var treeId = $("#treeId").val();
|
||||
var menuId = treeId > 0 ? treeId : 1;
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
var options = {
|
||||
title: '菜单选择',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-menu-edit" th:object="${menu}">
|
||||
@@ -17,9 +16,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="M" /> 目录 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="C" /> 菜单 </label>
|
||||
<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -75,11 +74,10 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script>
|
||||
var prefix = ctx + "system/menu"
|
||||
|
||||
$(document).ready(function() {
|
||||
$(function() {
|
||||
var menuType = $('input[name="menuType"]:checked').val();
|
||||
menuVisible(menuType);
|
||||
});
|
||||
@@ -99,6 +97,9 @@
|
||||
"menuId": function() {
|
||||
return $("#menuId").val();
|
||||
},
|
||||
"parentId": function() {
|
||||
return $("input[name='parentId']").val();
|
||||
},
|
||||
"menuName": function() {
|
||||
return $.common.trim($("#menuName").val());
|
||||
}
|
||||
@@ -171,6 +172,31 @@
|
||||
$.modal.alertError("主菜单不能选择");
|
||||
}
|
||||
}
|
||||
|
||||
function selectMenuTree() {
|
||||
var menuId = $("#treeId").val();
|
||||
if(menuId > 0) {
|
||||
var url = prefix + "/selectMenuTree/" + menuId;
|
||||
var options = {
|
||||
title: '菜单选择',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
else {
|
||||
$.modal.alertError("主菜单不能选择");
|
||||
}
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -62,7 +62,7 @@
|
||||
field: 'menuName',
|
||||
width: '20%',
|
||||
formatter: function(value, row, index) {
|
||||
if (row.icon == null || row == "") {
|
||||
if ($.common.isEmpty(row.icon)) {
|
||||
return row.menuName;
|
||||
} else {
|
||||
return '<i class="' + row.icon + '"></i> <span class="nav-label">' + row.menuName + '</span>';
|
||||
|
@@ -10,161 +10,38 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${menu.menuName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="search();">
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="searchNode()"> 搜索 </button>
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="javascript:" id="btnExpand">展开</a> /
|
||||
<a href="javascript:" id="btnCollapse">折叠</a>
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<div class="layui-layer-btn">
|
||||
<a class="layui-layer-btn0" th:onclick="'javascript:loadObj()'"><i class="fa fa-check"></i> 确定</a>
|
||||
<a class="layui-layer-btn1" onclick="$.modal.close()"><i class="fa fa-close"></i> 关闭</a>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
$.get(ctx + "system/menu/menuTreeData", function(data) {
|
||||
var treeName = $("#treeName").val();
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], false, false, false);
|
||||
selectCheckNode(treeName,nodes[i]);
|
||||
}
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};
|
||||
|
||||
$(function() {
|
||||
loadTree();
|
||||
var url = ctx + "system/menu/menuTreeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 1,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function selectCheckNode(treeName, node) {
|
||||
if(treeName == node.name){
|
||||
tree.selectNode(node, true);
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
tree.expandAll(true);
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
tree.expandAll(false);
|
||||
});
|
||||
|
||||
function loadObj(){
|
||||
var treeId = $("#treeId").val();
|
||||
var treeName = $("#treeName").val();
|
||||
parent.$("#treeId").val(treeId);
|
||||
parent.$("#treeName").val(treeName);
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
}
|
||||
|
||||
var lastValue = "", nodeList = [], key = $("#keyword");
|
||||
key.bind("focus", focusKey).bind("blur", blurKey).bind("change cut input propertychange", searchNode);
|
||||
key.bind("keydown", function (e){if(e.which == 13){searchNode();}});
|
||||
|
||||
function focusKey(e) {
|
||||
if (key.hasClass("empty")) {
|
||||
key.removeClass("empty");
|
||||
}
|
||||
}
|
||||
|
||||
function blurKey(e) {
|
||||
if (key.get(0).value === "") {
|
||||
key.addClass("empty");
|
||||
}
|
||||
searchNode(e);
|
||||
}
|
||||
|
||||
function searchNode() {
|
||||
var value = $.trim(key.get(0).value);
|
||||
var keyType = "name";
|
||||
if (lastValue === value) {
|
||||
return;
|
||||
}
|
||||
lastValue = value;
|
||||
var nodes = tree.getNodes();
|
||||
if (value == "") {
|
||||
showAllNode(nodes);
|
||||
return;
|
||||
}
|
||||
hideAllNode(nodes);
|
||||
nodeList = tree.getNodesByParamFuzzy(keyType, value);
|
||||
updateNodes(nodeList);
|
||||
}
|
||||
|
||||
function hideAllNode(nodes){
|
||||
var tree = $.fn.zTree.getZTreeObj("tree");
|
||||
nodes = tree.transformToArray(nodes);
|
||||
for(var i=nodes.length-1; i>=0; i--) {
|
||||
tree.hideNode(nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function showAllNode(nodes){
|
||||
nodes = tree.transformToArray(nodes);
|
||||
for(var i=nodes.length-1; i>=0; i--) {
|
||||
if(nodes[i].getParentNode()!=null){
|
||||
tree.expandNode(nodes[i],false,false,false,false);
|
||||
}else{
|
||||
tree.expandNode(nodes[i],true,true,false,false);
|
||||
}
|
||||
tree.showNode(nodes[i]);
|
||||
showAllNode(nodes[i].children);
|
||||
}
|
||||
}
|
||||
|
||||
function updateNodes(nodeList) {
|
||||
tree.showNodes(nodeList);
|
||||
for(var i=0, l=nodeList.length; i<l; i++) {
|
||||
var treeNode = nodeList[i];
|
||||
showChildren(treeNode);
|
||||
showParent(treeNode)
|
||||
}
|
||||
}
|
||||
|
||||
function showChildren(treeNode){
|
||||
if (treeNode.isParent){
|
||||
for(var idx in treeNode.children){
|
||||
var node = treeNode.children[idx];
|
||||
tree.showNode(node);
|
||||
showChildren(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
function showParent(treeNode){
|
||||
var parentNode;
|
||||
while((parentNode = treeNode.getParentNode()) != null){
|
||||
tree.showNode(parentNode);
|
||||
tree.expandNode(parentNode, true, false, false);
|
||||
treeNode = parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
function search($this) {
|
||||
$('#search').slideToggle(200);
|
||||
$('#btnShow').toggle();
|
||||
$('#btnHide').toggle();
|
||||
$('#keyword').focus();
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-add">
|
||||
@@ -59,24 +59,17 @@
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script type="text/javascript">
|
||||
// 树结构初始化加载
|
||||
var setting = {
|
||||
check:{enable:true,nocheckInherit:true,chkboxType:{"Y":"ps","N":"ps"}},
|
||||
view:{selectedMulti:false,nameIsHTML: true},
|
||||
data:{simpleData:{enable:true},key:{title:"title"}},
|
||||
callback:{
|
||||
beforeClick: function (treeId, treeNode, clickFlag) {
|
||||
var menuTrees = $.fn.zTree.getZTreeObj(treeId);
|
||||
menuTrees.checkNode(treeNode, !treeNode.checked, true, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}, menuTrees, loadTree = function(){
|
||||
$.get(ctx + "system/menu/roleMenuTreeData", function(data) {
|
||||
menuTrees = $.fn.zTree.init($("#menuTrees"), setting, data); //.expandAll(true);
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};loadTree();
|
||||
|
||||
$(function() {
|
||||
var url = ctx + "system/menu/roleMenuTreeData";
|
||||
var options = {
|
||||
id: "menuTrees",
|
||||
url: url,
|
||||
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
|
||||
expandLevel: 0
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
$("#form-role-add").validate({
|
||||
rules:{
|
||||
roleName:{
|
||||
@@ -129,26 +122,13 @@
|
||||
}
|
||||
});
|
||||
|
||||
function selectCheckeds() {
|
||||
var menuIds = "";
|
||||
var treeNodes = menuTrees.getCheckedNodes(true);
|
||||
for (var i = 0; i < treeNodes.length; i++) {
|
||||
if (0 == i) {
|
||||
menuIds = treeNodes[i].id;
|
||||
} else {
|
||||
menuIds += ("," + treeNodes[i].id);
|
||||
}
|
||||
}
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
function add() {
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
var roleKey = $("input[name='roleKey']").val();
|
||||
var roleSort = $("input[name='roleSort']").val();
|
||||
var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
|
||||
var remark = $("input[name='remark']").val();
|
||||
var menuIds = selectCheckeds();
|
||||
var menuIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
|
||||
@@ -60,23 +60,16 @@
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script type="text/javascript">
|
||||
// 树结构初始化加载
|
||||
var setting = {
|
||||
check:{enable:true,nocheckInherit:true,chkboxType:{"Y":"ps","N":"ps"}},
|
||||
view:{selectedMulti:false,nameIsHTML: true},
|
||||
data:{simpleData:{enable:true},key:{title:"title"}},
|
||||
callback:{
|
||||
beforeClick: function (treeId, treeNode, clickFlag) {
|
||||
var menuTrees = $.fn.zTree.getZTreeObj(treeId);
|
||||
menuTrees.checkNode(treeNode, !treeNode.checked, true, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}, menuTrees, loadTree = function(){
|
||||
$.get(ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val(), function(data) {
|
||||
menuTrees = $.fn.zTree.init($("#menuTrees"), setting, data); //.expandAll(true);
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};loadTree();
|
||||
$(function() {
|
||||
var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
|
||||
var options = {
|
||||
id: "menuTrees",
|
||||
url: url,
|
||||
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
|
||||
expandLevel: 0
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
$("#form-role-edit").validate({
|
||||
rules:{
|
||||
@@ -135,20 +128,7 @@
|
||||
edit();
|
||||
}
|
||||
});
|
||||
|
||||
function selectCheckeds() {
|
||||
var menuIds = "";
|
||||
var treeNodes = menuTrees.getCheckedNodes(true);
|
||||
for (var i = 0; i < treeNodes.length; i++) {
|
||||
if (0 == i) {
|
||||
menuIds = treeNodes[i].id;
|
||||
} else {
|
||||
menuIds += ("," + treeNodes[i].id);
|
||||
}
|
||||
}
|
||||
return menuIds;
|
||||
}
|
||||
|
||||
|
||||
function edit() {
|
||||
var roleId = $("input[name='roleId']").val();
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
@@ -156,7 +136,7 @@
|
||||
var roleSort = $("input[name='roleSort']").val();
|
||||
var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
|
||||
var remark = $("input[name='remark']").val();
|
||||
var menuIds = selectCheckeds();
|
||||
var menuIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
|
@@ -112,6 +112,7 @@
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-primary btn-xs ' + removeFlag + '" href="#" onclick="rule(\'' + row.roleId + '\')"><i class="fa fa-check-square-o"></i>权限</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
@@ -119,6 +120,12 @@
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/*角色管理-分配数据权限*/
|
||||
function rule(roleId) {
|
||||
var url = prefix + '/rule/' + roleId;
|
||||
$.modal.open("分配数据权限", url);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
110
src/main/resources/templates/system/role/rule.html
Normal file
110
src/main/resources/templates/system/role/rule.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
|
||||
<input id="roleId" name="roleId" type="hidden" th:field="*{roleId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">角色名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" readonly="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">权限字符:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">数据范围:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="dataScope" name="dataScope" class="form-control m-b">
|
||||
<option value="1" th:field="*{dataScope}">全部数据权限</option>
|
||||
<option value="2" th:field="*{dataScope}">自定数据权限</option>
|
||||
</select>
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 特殊情况下,设置为“自定数据权限”</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="roleRule" style="display: none">
|
||||
<label class="col-sm-3 control-label">数据权限</label>
|
||||
<div class="col-sm-8">
|
||||
<div id="deptTrees" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
var url = ctx + "system/dept/roleDeptTreeData?roleId=" + $("#roleId").val();
|
||||
var options = {
|
||||
id: "deptTrees",
|
||||
url: url,
|
||||
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
|
||||
expandLevel: 2
|
||||
};
|
||||
$.tree.init(options);
|
||||
$("#dataScope").change();
|
||||
});
|
||||
|
||||
$("#form-role-edit").validate({
|
||||
submitHandler:function(form){
|
||||
edit();
|
||||
}
|
||||
});
|
||||
|
||||
function edit() {
|
||||
var roleId = $("input[name='roleId']").val();
|
||||
var roleName = $("input[name='roleName']").val();
|
||||
var roleKey = $("input[name='roleKey']").val();
|
||||
var dataScope = $("#dataScope").val();
|
||||
var deptIds = $.tree.getCheckedNodes();
|
||||
$.ajax({
|
||||
cache : true,
|
||||
type : "POST",
|
||||
url : ctx + "system/role/rule",
|
||||
data : {
|
||||
"roleId": roleId,
|
||||
"roleName": roleName,
|
||||
"roleKey": roleKey,
|
||||
"dataScope": dataScope,
|
||||
"deptIds": deptIds
|
||||
},
|
||||
async : false,
|
||||
error : function(request) {
|
||||
$.modal.alertError("系统错误");
|
||||
},
|
||||
success : function(data) {
|
||||
$.operate.saveSuccess(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#dataScope").change(function(event){
|
||||
var dataScope = $(event.target).val();
|
||||
dataScopeVisible(dataScope);
|
||||
});
|
||||
|
||||
function dataScopeVisible(dataScope) {
|
||||
if (dataScope == 2) {
|
||||
$("#roleRule").show();
|
||||
} else {
|
||||
$._tree.checkAllNodes(false);
|
||||
$("#roleRule").hide();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-add">
|
||||
@@ -75,7 +74,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">角色:</label>
|
||||
<div class="col-sm-8">
|
||||
<label th:each="role:${roles}" class="checkbox-inline i-checks">
|
||||
<label th:each="role:${roles}" class="check-box">
|
||||
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
|
||||
</label>
|
||||
</div>
|
||||
@@ -90,7 +89,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/select/select2.js}"></script>
|
||||
<script>
|
||||
$("#form-user-add").validate({
|
||||
@@ -217,10 +215,27 @@
|
||||
/*用户管理-新增-选择部门树*/
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = treeId == null || treeId == "" ? "100" : treeId;
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
$.modal.open("选择部门", url, '380', '380');
|
||||
}
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: ctx + "system/dept/selectDeptTree/" + deptId,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-edit" th:object="${user}">
|
||||
@@ -70,7 +69,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">角色:</label>
|
||||
<div class="col-sm-8">
|
||||
<label th:each="role:${roles}" class="checkbox-inline i-checks">
|
||||
<label th:each="role:${roles}" class="check-box">
|
||||
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
|
||||
</label>
|
||||
</div>
|
||||
@@ -85,7 +84,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/select/select2.js}"></script>
|
||||
<script>
|
||||
$("#form-user-edit").validate({
|
||||
@@ -189,8 +187,25 @@
|
||||
function selectDeptTree() {
|
||||
var deptId = $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
$.modal.open("选择部门", url, '380', '380');
|
||||
}
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
height: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<meta charset="utf-8">
|
||||
<title>用户头像修改</title>
|
||||
<link href="/ajax/libs/cropbox/cropbox.css" th:href="@{/ajax/libs/cropbox/cropbox.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/cropbox/cropbox.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<input name="userId" id="userId" type="hidden" th:value="${user.userId}" />
|
||||
<div class="container">
|
||||
|
@@ -6,10 +6,10 @@
|
||||
<!--360浏览器优先以webkit内核解析-->
|
||||
<title>个人信息</title>
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<body class="gray-bg">
|
||||
|
@@ -3,8 +3,8 @@
|
||||
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/jquery-layout/jquery.layout-latest.css" th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
|
||||
<link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
|
||||
<body class="gray-bg">
|
||||
<div class="ui-layout-west">
|
||||
@@ -15,10 +15,10 @@
|
||||
<i class="fa icon-grid"></i> 组织机构
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a type="button" class="btn btn-box-tool menuItem" href="#" onclick="dept()" title="管理机构"><i class="fa fa-edit"></i></a>
|
||||
<a type="button" class="btn btn-box-tool menuItem" href="#" onclick="dept()" title="管理部门"><i class="fa fa-edit"></i></a>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新机构"><i class="fa fa-refresh"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新部门"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
@@ -87,10 +87,10 @@
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var prefix = ctx + "system/user"
|
||||
|
||||
$(document).ready(function(){
|
||||
$(function() {
|
||||
$('body').layout({ west__size: 185 });
|
||||
queryUserList();
|
||||
queryDeptTreeDaTa();
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
function queryUserList() {
|
||||
@@ -161,46 +161,39 @@
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
|
||||
function queryDeptTreeDaTa()
|
||||
|
||||
function queryDeptTree()
|
||||
{
|
||||
// 树结构初始化加载
|
||||
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
$("#deptId").val(treeNode.id);
|
||||
$("#parentId").val(treeNode.pId);
|
||||
$.table.search();
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
$.get(ctx + "system/dept/treeData", function(data) {
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data); //.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
nodes = tree.getNodesByParam("level", 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
}, null, null, "正在加载,请稍后...");
|
||||
};loadTree();
|
||||
var url = ctx + "system/dept/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function() {
|
||||
loadTree();
|
||||
});
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
$("#deptId").val(treeNode.id);
|
||||
$("#parentId").val(treeNode.pId);
|
||||
$.table.search();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
$._tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
|
||||
$('#btnCollapse').click(function() {
|
||||
$._tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
|
||||
$('#btnRefresh').click(function() {
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
/*用户管理-部门*/
|
||||
function dept() {
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<link href="/ajax/libs/datapicker/datepicker3.css" th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet"/>
|
||||
<style>
|
||||
.droppable-active{background-color:#ffe!important}.tools a{cursor:pointer;font-size:80%}.form-body .col-md-6,.form-body .col-md-12{min-height:400px}.draggable{cursor:move}
|
||||
</style>
|
||||
@@ -80,19 +80,19 @@
|
||||
</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<label class="radio-inline i-checks"><input type="radio" checked="" value="option1" id="optionsRadios1" name="optionsRadios">选项1</label>
|
||||
<label class="radio-inline i-checks"><input type="radio" value="option2" id="optionsRadios2" name="optionsRadios">选项2</label>
|
||||
<label class="radio-box"><input type="radio" checked="" value="option1" id="optionsRadios1" name="optionsRadios">选项1</label>
|
||||
<label class="radio-box"><input type="radio" value="option2" id="optionsRadios2" name="optionsRadios">选项2</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-3 control-label">复选框:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<label class="checkbox-inline i-checks">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="option1" id="inlineCheckbox1">选项1</label>
|
||||
<label class="checkbox-inline i-checks">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="option2" id="inlineCheckbox2">选项2</label>
|
||||
<label class="checkbox-inline i-checks">
|
||||
<label class="check-box">
|
||||
<input type="checkbox" value="option3" id="inlineCheckbox3">选项3</label>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user