v1.1.6 发布
This commit is contained in:
@ -20,8 +20,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectRoleList" parameterType="Role" resultMap="RoleResult">
|
||||
select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND role_name like concat(concat('%', #{searchValue}), '%') OR role_key like concat(concat('%', #{searchValue}), '%')
|
||||
<if test="roleName != null and roleName != ''">
|
||||
AND role_name like concat(concat('%', #{roleName}), '%')
|
||||
</if>
|
||||
<if test="roleKey != null and roleKey != ''">
|
||||
AND role_key like concat(concat('%', #{roleKey}), '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
@ -3631,11 +3631,11 @@ code {
|
||||
-o-border-image: none;
|
||||
border-image: none;
|
||||
border-style: solid solid none;
|
||||
border-width: 4px 0px 0;
|
||||
border-width: 0px 0px 0;
|
||||
color: inherit;
|
||||
margin-bottom: 0;
|
||||
padding: 14px 15px 7px;
|
||||
min-height: 48px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.ibox-content {
|
||||
@ -3719,7 +3719,7 @@ table.table-mail tr td {
|
||||
.ibox-tools a {
|
||||
cursor: pointer;
|
||||
margin-left: 5px;
|
||||
color: #c4c4c4;
|
||||
color: #676a6c;
|
||||
}
|
||||
|
||||
.ibox-tools a.btn-primary {
|
||||
|
59
src/main/resources/static/ruoyi/js/ry-table.js
Normal file
59
src/main/resources/static/ruoyi/js/ry-table.js
Normal file
@ -0,0 +1,59 @@
|
||||
/**
|
||||
* 表格通用方法封装处理
|
||||
* Copyright (c) 2018 ruoyi
|
||||
*/
|
||||
(function($) {
|
||||
$.extend({
|
||||
ryTable: {
|
||||
_option: {},
|
||||
_params: {},
|
||||
init: function(options) {
|
||||
$.ryTable._option = options;
|
||||
$.ryTable._params = options.queryParams == null ? $.ryTable.queryParams : options.queryParams;
|
||||
$('.bootstrap-table').bootstrapTable({
|
||||
url: options.url, // 请求后台的URL(*)
|
||||
contentType: "application/x-www-form-urlencoded", // 编码类型
|
||||
method: 'post', // 请求方式(*)
|
||||
toolbar: '#toolbar', // 工具按钮用哪个容器
|
||||
cache: false, // 是否使用缓存
|
||||
sortable: false, // 是否启用排序
|
||||
sortOrder: "asc", // 排序方式
|
||||
sortStable: true, // 设置为 true 将获得稳定的排序
|
||||
pagination: true, // 是否显示分页(*)
|
||||
sidePagination: "server", // 启用服务端分页
|
||||
pageNumber: 1, // 初始化加载第一页,默认第一页
|
||||
pageSize: 10, // 每页的记录行数(*)
|
||||
pageList: [10, 25, 50], // 可供选择的每页的行数(*)
|
||||
queryParams: $.ryTable._params, // 传递参数(*)
|
||||
columns: options.columns // 显示列信息(*)
|
||||
});
|
||||
},
|
||||
queryParams: function(params) {
|
||||
return {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order
|
||||
};
|
||||
},
|
||||
refresh: function() {
|
||||
$(".bootstrap-table").bootstrapTable('refresh', {
|
||||
url: $.ryTable._option.url
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
function default_params(params) {
|
||||
return {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order
|
||||
};
|
||||
}
|
@ -1,55 +1,77 @@
|
||||
var prefix = ctx + "system/role"
|
||||
|
||||
$(function() {
|
||||
var columns = [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'roleId',
|
||||
title: '角色编号'
|
||||
},
|
||||
{
|
||||
field: 'roleName',
|
||||
title: '角色名称'
|
||||
},
|
||||
{
|
||||
field: 'roleKey',
|
||||
title: '权限字符'
|
||||
},
|
||||
{
|
||||
field: 'roleSort',
|
||||
title: '显示顺序'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="badge badge-primary">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="badge badge-danger">禁用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createDateTimeStr',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}];
|
||||
var url = prefix + "/list";
|
||||
$.initTable(columns, url);
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
queryParams: queryParams,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'roleId',
|
||||
title: '角色编号'
|
||||
},
|
||||
{
|
||||
field: 'roleName',
|
||||
title: '角色名称'
|
||||
},
|
||||
{
|
||||
field: 'roleKey',
|
||||
title: '权限字符'
|
||||
},
|
||||
{
|
||||
field: 'roleSort',
|
||||
title: '显示顺序'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="badge badge-primary">正常</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="badge badge-danger">禁用</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createDateTimeStr',
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.ryTable.init(options);
|
||||
});
|
||||
|
||||
/*角色管理-搜索*/
|
||||
function search() {
|
||||
$('.bootstrap-table').bootstrapTable('refresh', queryParams);
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
return {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order,
|
||||
roleName: $("#roleName").val(),
|
||||
roleKey: $("#roleKey").val(),
|
||||
status: $("#status option:selected").val()
|
||||
};
|
||||
}
|
||||
|
||||
/*角色管理-新增*/
|
||||
function add() {
|
||||
var url = prefix + '/add';
|
||||
|
@ -34,8 +34,8 @@
|
||||
<script src="../static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
|
||||
<script src="../static/ajax/libs/bootstrap-table/extensions/export/tableExport.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ruoyi/js/common.js?v=1.1.5" th:src="@{/ruoyi/js/common.js?v=1.1.5}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js?v=1.1.5" th:src="@{/ruoyi/js/ry-ui.js?v=1.1.5}"></script>
|
||||
<script src="../static/ruoyi/js/common.js?v=1.1.6" th:src="@{/ruoyi/js/common.js?v=1.1.6}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js?v=1.1.6" th:src="@{/ruoyi/js/ry-ui.js?v=1.1.6}"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
</div>
|
||||
|
@ -94,13 +94,35 @@
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<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>
|
||||
</div>
|
||||
<div id="v16" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增用户列表部门列</li>
|
||||
<li>新增登录地点</li>
|
||||
<li>新增swagger</li>
|
||||
<li>修复排序数字校验</li>
|
||||
<li>优化头像上传文件类型限定为图片</li>
|
||||
<li>新增XSS过滤</li>
|
||||
<li>新增热部署提高开发效率</li>
|
||||
<li>修复treegrid居中无效</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="#v15">v1.1.5</a><code class="pull-right">2018.05.28</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v15" class="panel-collapse collapse in">
|
||||
<div id="v15" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>优化登录失败刷新验证码</li>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">部门状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dept.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dict.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_dict_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{dict.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_menu_visible')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_show_hide')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="visible" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">菜单状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_menu_visible')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_show_hide')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="visible" th:value="${dict['dictValue']}" th:field="*{menu.visible}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:checked="${dict['isDefault'] == 'Y' ? true : false}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位状态:</label>
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_post_status')}">
|
||||
<div class="col-sm-8" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<div th:each="dict : ${type}" th:class="${dict['cssClass']}">
|
||||
<input type="radio" th:id="${dict['dictCode']}" name="status" th:value="${dict['dictValue']}" th:field="*{post.status}">
|
||||
<label th:for="${dict['dictCode']}" th:text="${dict['dictLabel']}"></label>
|
||||
|
@ -3,23 +3,70 @@
|
||||
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="btn-group hidden-xs" id="toolbar" role="group">
|
||||
<button class="btn btn-outline btn-default" onclick="javascript:add()" shiro:hasPermission="system:role:add">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
<button class="btn btn-outline btn-default" onclick="javascript:batchRemove()" shiro:hasPermission="system:role:batchRemove">
|
||||
<i class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
<table class="bootstrap-table" data-mobile-responsive="true"
|
||||
data-sort-name="role_sort" data-sort-order="asc">
|
||||
</table>
|
||||
<body class="white-bg">
|
||||
<div class="row col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>角色管理</h5>
|
||||
<div class="ibox-tools">
|
||||
<a href="javascript:add()" shiro:hasPermission="system:role:add">
|
||||
<i class="fa fa-plus"></i>新增
|
||||
</a>
|
||||
<a href="javascript:batchRemove()" shiro:hasPermission="system:role:batchRemove">
|
||||
<i class="fa fa-trash-o"></i>删除
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">角色名称</button>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="roleName" placeholder="角色名称">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">权限字符</button>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="roleKey" placeholder="帐号/姓名/手机号">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">角色状态</button>
|
||||
</div>
|
||||
<select class="form-control input-s-sm inline" id="status" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
|
||||
<option value="">请选择</option>
|
||||
<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="col-lg-12 col-sm-12">
|
||||
<button type="button" class="btn btn-primary" onclick="search()" id=""><i class="fa fa-search"></i> 搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="bootstrap-table" data-mobile-responsive="true"
|
||||
data-sort-name="role_sort" data-sort-order="asc">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script src="/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
|
||||
<script src="/ajax/libs/bootstrap-table/extensions/export/tableExport.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-table.js?v=1.1.6" th:src="@{/ruoyi/js/ry-table.js?v=1.1.6}"></script>
|
||||
<script src="/ruoyi/system/role/role.js" th:src="@{/ruoyi/system/role/role.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permissionService.hasPermi('system:role:edit')}]];
|
||||
|
Reference in New Issue
Block a user