若依 2.4

This commit is contained in:
RuoYi
2018-09-03 08:45:08 +08:00
parent a4c1912ab2
commit 4fe158fa94
112 changed files with 1687 additions and 4035 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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() {