若依3.3

This commit is contained in:
RuoYi
2019-03-31 12:56:04 +08:00
parent 7e67c233dc
commit 87b7e8665a
88 changed files with 1738 additions and 619 deletions

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增参数')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-add" name="form-config-add">
@@ -40,7 +41,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/config";

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html>
<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>
<head>
<th:block th:include="include :: header('参数列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -56,7 +56,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改参数')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-edit" th:object="${config}">
@@ -41,7 +42,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/config";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增部门')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dept-add">
@@ -56,7 +57,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dept";

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html>
<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>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('部门列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
@@ -44,7 +44,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('system:dept:add')}]];
var editFlag = [[${@permission.hasPermi('system:dept:edit')}]];

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改部门')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dept-edit" th:object="${dept}">
@@ -57,7 +58,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dept";

View File

@@ -1,11 +1,12 @@
<!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"/>
<head>
<th:block th:include="include :: header('部门树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
@@ -24,8 +25,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "system/dept/treeData";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增字典数据')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-add">
@@ -76,7 +77,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict/data";

View File

@@ -1,10 +1,9 @@
<!DOCTYPE html>
<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>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('字典数据列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -54,8 +53,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改字典数据')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
@@ -77,7 +78,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict/data";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增字典类型')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-add">
@@ -34,7 +35,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改字典类型')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
@@ -35,7 +36,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict";

View File

@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('字典类型列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -58,7 +57,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var listFlag = [[${@permission.hasPermi('system:dict:list')}]];

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增菜单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-menu-add">
@@ -69,7 +70,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
var prefix = ctx + "system/menu";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改菜单')" />
</head>
<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}">
@@ -70,7 +71,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
var prefix = ctx + "system/menu";

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('菜单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -45,7 +45,7 @@
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('system:menu:add')}]];
var editFlag = [[${@permission.hasPermi('system:menu:edit')}]];

View File

@@ -1,11 +1,12 @@
<!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"/>
<head>
<th:block th:include="include :: header('菜单树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
@@ -24,8 +25,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "system/menu/menuTreeData";

View File

@@ -1,9 +1,9 @@
<!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/summernote/summernote.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/summernote/summernote-bs3.css}" rel="stylesheet"/>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增通知公告')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-add">
@@ -39,9 +39,8 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script th:src="@{/ajax/libs/summernote/summernote-zh-CN.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script type="text/javascript">
var prefix = ctx + "system/notice";

View File

@@ -1,9 +1,9 @@
<!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/summernote/summernote.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/summernote/summernote-bs3.css}" rel="stylesheet"/>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改通知公告')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-edit" th:object="${notice}">
@@ -40,9 +40,8 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script th:src="@{/ajax/libs/summernote/summernote-zh-CN.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script type="text/javascript">
var prefix = ctx + "system/notice";

View File

@@ -1,9 +1,9 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
<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>
<head>
<th:block th:include="include :: header('通知公告列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -48,7 +48,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增岗位')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-add">
@@ -40,7 +41,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/post";

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改岗位')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-edit" th:object="${post}">
@@ -41,7 +42,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/post";

View File

@@ -1,10 +1,9 @@
<!DOCTYPE html>
<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>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('岗位列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -52,7 +51,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:post:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:post:remove')}]];

View File

@@ -1,8 +1,9 @@
<!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"/>
<head>
<th:block th:include="include :: header('新增角色')" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-role-add">
@@ -50,8 +51,8 @@
</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>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
var url = ctx + "system/menu/roleMenuTreeData";

View File

@@ -0,0 +1,154 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('角色用户分配')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="role-form">
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
<div class="select-list">
<ul>
<li>
登录名称:<input type="text" name="loginName"/>
</li>
<li>
手机号码:<input type="text" name="phonenumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="selectUser()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 分配用户
</a>
<a class="btn btn-danger btn-del disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
<i class="fa fa-remove"></i> 批量取消授权
</a>
<a class="btn btn-warning" onclick="closeItem()">
<i class="fa fa-reply-all"></i> 关闭
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/role/authUser";
$(function() {
var options = {
url: prefix + "/allocatedList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
queryParams: queryParams,
sortName: "createTime",
sortOrder: "desc",
modalName: "用户",
columns: [{
checkbox: true
},
{
field: 'userId',
title: '用户ID',
visible: false,
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'userName',
title: '用户名称'
},
{
field: 'email',
title: '邮箱'
},
{
field: 'phonenumber',
title: '手机'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="cancelAuthUser(\'' + row.userId + '\')"><i class="fa fa-remove"></i>取消授权</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function queryParams(params) {
return {
roleId: $("#roleId").val(),
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
}
/* 分配用户-选择用户 */
function selectUser() {
var url = prefix + '/selectUser/' + $("#roleId").val();
$.modal.open("选择用户", url);
}
/* 分配用户-批量取消授权 */
function cancelAuthUserAll(userId) {
var rows = $.table.selectFirstColumns();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
$.operate.submit(prefix + "/cancelAll", "post", "json", data);
});
}
/* 分配用户-取消授权 */
function cancelAuthUser(userId) {
$.modal.confirm("确认要取消该用户角色吗?", function() {
$.operate.post(prefix + "/cancel", { "roleId": $("#roleId").val(), "userId": userId });
})
}
</script>
</body>
</html>

View File

@@ -1,8 +1,9 @@
<!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"/>
<head>
<th:block th:include="include :: header('角色数据权限')" />
<th:block th:include="include :: ztree-css" />
</head>
<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}">
@@ -29,7 +30,7 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 特殊情况下,设置为“自定数据权限”</span>
</div>
</div>
<div class="form-group" id="roleRule" th:style="'display:' + @{(*{dataScope=='1'} ? 'none' : 'block')} + ''">
<div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dataScope=='1'} ? 'none' : 'block')} + ''">
<label class="col-sm-3 control-label">数据权限</label>
<div class="col-sm-8">
<div id="deptTrees" class="ztree"></div>
@@ -37,8 +38,8 @@
</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>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
@@ -67,7 +68,7 @@
$.ajax({
cache : true,
type : "POST",
url : ctx + "system/role/rule",
url : ctx + "system/role/authDataScope",
data : {
"roleId": roleId,
"roleName": roleName,
@@ -92,10 +93,10 @@
function dataScopeVisible(dataScope) {
if (dataScope == 2) {
$("#roleRule").show();
$("#authDataScope").show();
} else {
$._tree.checkAllNodes(false);
$("#roleRule").hide();
$("#authDataScope").hide();
}
}
</script>

View File

@@ -1,8 +1,9 @@
<!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"/>
<head>
<th:block th:include="include :: header('修改角色')" />
<th:block th:include="include :: ztree-css" />
</head>
<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}">
@@ -51,8 +52,8 @@
</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>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();

View File

@@ -1,10 +1,9 @@
<!DOCTYPE html>
<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>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('角色列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -58,7 +57,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:role:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
@@ -116,8 +115,9 @@
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 ' + editFlag + '" 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>');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="#" onclick="authDataScope(\'' + row.roleId + '\')"><i class="fa fa-check-square-o"></i>数据权限</a> ');
actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="authUser(\'' + row.roleId + '\')"><i class="fa fa-user"></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('');
}
}]
@@ -126,11 +126,17 @@
});
/* 角色管理-分配数据权限 */
function rule(roleId) {
var url = prefix + '/rule/' + roleId;
function authDataScope(roleId) {
var url = prefix + '/authDataScope/' + roleId;
$.modal.open("分配数据权限", url);
}
/* 角色管理-分配用户 */
function authUser(roleId) {
var url = prefix + '/authUser/' + roleId;
$.modal.openTab("分配用户", url);
}
/* 角色状态显示 */
function statusTools(row) {
if (row.status == 1) {

View File

@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('分配角色选择用户')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="role-form">
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
<div class="select-list">
<ul>
<li>
登录名称:<input type="text" name="loginName"/>
</li>
<li>
手机号码:<input type="text" name="phonenumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/role/authUser";
$(function() {
var options = {
url: prefix + "/unallocatedList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
queryParams: queryParams,
sortName: "createTime",
sortOrder: "desc",
modalName: "用户",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
clickToSelect: true,
rememberSelected: true,
columns: [{
checkbox: true
},
{
field: 'userId',
title: '用户ID',
visible: false,
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'userName',
title: '用户名称'
},
{
field: 'email',
title: '邮箱'
},
{
field: 'phonenumber',
title: '手机'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
}]
};
$.table.init(options);
});
function queryParams(params) {
return {
roleId: $("#roleId").val(),
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
}
/* 分配用户-选择用户-提交 */
function submitHandler() {
var rows = $.table.selectFirstColumns();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
$.operate.save(prefix + "/selectAll", data);
}
</script>
</body>
</html>

View File

@@ -1,7 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: header('新增用户')" />
</head>
<body>
<div class="form-content">
<form id="form-user-add" class="form-horizontal">
@@ -135,8 +137,8 @@
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script>
var prefix = ctx + "system/user";

View File

@@ -1,7 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: header('修改用户')" />
</head>
<body>
<div class="form-content">
<form class="form-horizontal" id="form-user-edit" th:object="${user}">
@@ -126,9 +128,9 @@
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
var prefix = ctx + "system/user";
$("#form-user-edit").validate({

View File

@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<title>用户头像修改</title>
<link th:href="@{/ajax/libs/cropbox/cropbox.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('修改用户头像')" />
<th:block th:include="include :: cropbox-css" />
</head>
<body class="white-bg">
<div class="container">
<div class="imageBox">
@@ -20,8 +21,8 @@
</div>
<div class="cropped"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: cropbox-js" />
<script type="text/javascript">
var cropper;
$(window).load(function() {
@@ -38,7 +39,7 @@ $(window).load(function() {
options.imgSrc = e.target.result;
//根据MIME判断上传的文件是不是图片类型
if((options.imgSrc).indexOf("image/")==-1){
$.modal.alertWarning("文件格式错误,请上传图片类型,如JPG,JPEGPNG后缀的文件。");
$.modal.alertWarning("文件格式错误,请上传图片类型,如JPGPNG后缀的文件。");
} else {
cropper = $('.imageBox').cropbox(options);
}

View File

@@ -1,122 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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}">
<input name="userId" type="hidden" th:field="*{userId}" />
<div class="form-group">
<label class="col-sm-3 control-label ">登录名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
</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" readonly="true" th:field="*{dept.deptName}">
</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="userName" id="userName" th:field="*{userName}">
</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="email" th:field="*{email}">
</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="phonenumber" id="phonenumber" th:field="*{phonenumber}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" id="radio1" th:field="*{sex}" name="sex" value="0">
<label for="radio1"></label>
</div>
<div class="radio-box">
<input type="radio" id="radio2" th:field="*{sex}" name="sex" value="1">
<label for="radio2"></label>
</div>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script>
$("#form-user-edit").validate({
onkeyup: false,
rules:{
userName:{
required:true,
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"email": function() {
return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"phonenumber": function() {
return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
},
messages: {
"email": {
remote: "Email已经存在"
},
"phonenumber":{
remote: "手机号码已经存在"
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>

View File

@@ -1,78 +1,277 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--360浏览器优先以webkit内核解析-->
<title>个人信息</title>
<link rel="shortcut icon" href="favicon.ico">
<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"/>
<th:block th:include="include :: header('用户个人信息')" />
<style type="text/css">
</style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row animated fadeInRight">
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>个人信息</h5>
<div class="ibox-tools">
<a class="dropdown-toggle" data-toggle="dropdown" href="profile.html#">
<i class="fa fa-edit"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="javascript:edit()">修改信息</a></li>
<li><a href="javascript:resetPwd()">修改密码</a></li>
<li><a href="javascript:avatar()">修改头像</a></li>
<body class="gray-bg" style="font: 14px Helvetica Neue, Helvetica, PingFang SC, 微软雅黑, Tahoma, Arial, sans-serif !important;">
<input id="userId" name="userId" type="hidden" th:value="${user.userId}" />
<section class="section-content">
<div class="row">
<div class="col-xs-3 pr5">
<div class="ibox float-e-margins">
<div class="ibox-title ibox-title-gray dashboard-header gray-bg">
<h5>个人资料</h5>
</div>
<div class="ibox-content">
<div class="text-center">
<p><img width="120" height="120" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}"></p>
<p><a href="javascript:avatar()">修改头像</a></p>
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item"><i class="fa fa-user"></i>
<b class="font-noraml">登录名称:</b>
<p class="pull-right">[[${user.loginName}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-phone"></i>
<b class="font-noraml">手机号码:</b>
<p class="pull-right">[[${user.phonenumber}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-group"></i>
<b class="font-noraml">所属部门:</b>
<p class="pull-right" >[[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-envelope-o"></i>
<b class="font-noraml">邮箱地址:</b>
<p class="pull-right" >[[${user.email}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-calendar"></i>
<b class="font-noraml">创建时间:</b>
<p class="pull-right" >[[${#dates.format(user.createTime, 'yyyy-MM-dd')}]]</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-xs-9" style="padding-left: 0px">
<div class="ibox float-e-margins">
<div class="ibox-title ibox-title-gray dashboard-header">
<h5>基本资料</h5>
</div>
<div class="ibox-content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#user_info" data-toggle="tab" aria-expanded="true">基本资料</a></li>
<li><a href="#modify_password" data-toggle="tab" aria-expanded="false">修改密码</a></li>
</ul>
</div>
</div>
<div class="contact-box">
<div class="col-sm-4">
<div class="text-center">
<img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}">
<div class="m-t-xs font-bold">[[${user.loginIp}]]</div>
</div>
</div>
<div class="col-sm-8">
<h3><strong>[[${user.loginName}]]</strong></h3>
<p><i class="fa fa-user"></i> [[${user.userName}]] / [[${#strings.defaultString(roleGroup,'无角色')}]]
<p><i class="fa fa-phone"></i> [[${user.phonenumber}]]</p>
<p><i class="fa fa-group"></i> [[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
<p><i class="fa fa-transgender"></i> 性别:[[${user.sex}]]</p>
<p><i class="fa fa-envelope-o"></i> [[${user.email}]]</p>
<p><i class="fa fa-calendar"></i> [[${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p>
</div>
<div class="clearfix"></div>
</a>
<div class="tab-content">
<!--用户信息-->
<div class="tab-pane active" id="user_info" th:object="${user}">
<form class="form-horizontal" id="form-user-edit">
<!--隐藏ID-->
<input name="id" id="id" type="hidden">
<div class="form-group">
<label class="col-sm-2 control-label">用户名称:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="userName" th:field="*{userName}" placeholder="请输入用户名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">手机号码:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="phonenumber" maxlength="11" th:field="*{phonenumber}" placeholder="请输入手机号码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">邮箱:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">性别:</label>
<div class="col-sm-10">
<div class="radio-box">
<input type="radio" id="radio1" th:field="*{sex}" name="sex" value="0">
<label for="radio1"></label>
</div>
<div class="radio-box">
<input type="radio" id="radio2" th:field="*{sex}" name="sex" value="1">
<label for="radio2"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitUserInfo()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</form>
</div>
<!--修改密码-->
<div class="tab-pane" id="modify_password">
<form class="form-horizontal" id="form-user-resetPwd">
<div class="form-group">
<label class="col-sm-2 control-label">旧密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="oldPassword" placeholder="请输入旧密码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">新密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="newPassword" id="newPassword" placeholder="请输入新密码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">确认密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="confirmPassword" placeholder="请确认密码">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitChangPassword()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
/*用户信息-修改*/
function edit() {
var url = ctx + 'system/user/profile/edit';
$.modal.open("修改用户", url);
}
/*用户管理-重置密码*/
function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '800', '500');
}
/*用户管理-头像*/
function avatar() {
var url = ctx + 'system/user/profile/avatar';
$.modal.open("修改头像", url);
}
/*用户信息-修改*/
$("#form-user-edit").validate({
onkeyup: false,
rules:{
userName:{
required:true,
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"email": function() {
return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"phonenumber": function() {
return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
},
messages: {
"userName": {
required: "请输入用户名称",
},
"email": {
required: "请输入邮箱",
remote: "Email已经存在"
},
"phonenumber":{
required: "请输入手机号码",
remote: "手机号码已经存在"
}
},
focusCleanup: true
});
function submitUserInfo() {
if ($.validate.form()) {
$.operate.saveModal(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
/*用户管理-修改密码*/
$("#form-user-resetPwd").validate({
onkeyup: false,
rules:{
oldPassword:{
required:true,
remote: {
url: ctx + "system/user/profile/checkPassword",
type: "get",
dataType: "json",
data: {
password: function() {
return $("input[name='oldPassword']").val();
}
}
}
},
newPassword: {
required: true,
minlength: 6,
maxlength: 20
},
confirmPassword: {
required: true,
equalTo: "#newPassword"
}
},
messages: {
oldPassword: {
required: "请输入原密码",
remote: "原密码错误"
},
newPassword: {
required: "请输入新密码",
minlength: "密码不能小于6个字符",
maxlength: "密码不能大于20个字符"
},
confirmPassword: {
required: "请再次输入新密码",
equalTo: "两次密码输入不一致"
}
},
focusCleanup: true
});
function submitChangPassword () {
if ($.validate.form("form-user-resetPwd")) {
$.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script>
</body>
</html>

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改用户密码')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-resetPwd">
@@ -33,7 +34,7 @@
</div>
</form>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script>
$("#form-user-resetPwd").validate({

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改密码')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-resetPwd">
@@ -20,7 +21,7 @@
</div>
</form>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
$("#form-user-resetPwd").validate({
rules:{

View File

@@ -1,11 +1,10 @@
<!DOCTYPE html>
<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 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"/>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('用户列表')" />
<th:block th:include="include :: layout-latest-css" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="main-content">
@@ -87,9 +86,9 @@
</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];