新增日志菜单
This commit is contained in:
parent
8c537b782a
commit
edbc02bbaf
@ -0,0 +1,14 @@
|
|||||||
|
package ink.wgink.interfaces.user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: IUserDetailCheckService
|
||||||
|
* @Description: 登录业务检查
|
||||||
|
* @Author: wanggeng
|
||||||
|
* @Date: 2021/3/1 10:50 上午
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
public interface IUserDetailCheckService {
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package ink.wgink.login.base.controller.route.log;
|
||||||
|
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: LogRouteController
|
||||||
|
* @Description: 日志
|
||||||
|
* @Author: wanggeng
|
||||||
|
* @Date: 2021/3/1 10:41 上午
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "日志")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/log")
|
||||||
|
public class LogRouteController {
|
||||||
|
|
||||||
|
@GetMapping("list-department-adjustment")
|
||||||
|
public ModelAndView listDepartmentAdjustment() {
|
||||||
|
return new ModelAndView("log/list-department-adjustment");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list-department-user-adjustment")
|
||||||
|
public ModelAndView listDepartmentUserAdjustment() {
|
||||||
|
return new ModelAndView("log/list-department-user-adjustment");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list-login-log")
|
||||||
|
public ModelAndView listLoginLog() {
|
||||||
|
return new ModelAndView("log/list-login-log");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list-user-adjustment")
|
||||||
|
public ModelAndView listUserAdjustment() {
|
||||||
|
return new ModelAndView("log/list-user-adjustment");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -8,6 +8,7 @@ import ink.wgink.interfaces.position.IPositionUserBaseService;
|
|||||||
import ink.wgink.interfaces.role.IRoleMenuBaseService;
|
import ink.wgink.interfaces.role.IRoleMenuBaseService;
|
||||||
import ink.wgink.interfaces.role.IRolePermissionBaseService;
|
import ink.wgink.interfaces.role.IRolePermissionBaseService;
|
||||||
import ink.wgink.interfaces.role.IRoleUserBaseService;
|
import ink.wgink.interfaces.role.IRoleUserBaseService;
|
||||||
|
import ink.wgink.interfaces.user.IUserDetailCheckService;
|
||||||
import ink.wgink.login.base.exceptions.UserAuthenticationException;
|
import ink.wgink.login.base.exceptions.UserAuthenticationException;
|
||||||
import ink.wgink.login.base.manager.ConfigManager;
|
import ink.wgink.login.base.manager.ConfigManager;
|
||||||
import ink.wgink.pojo.bos.LoginUser;
|
import ink.wgink.pojo.bos.LoginUser;
|
||||||
@ -41,7 +42,7 @@ import java.util.*;
|
|||||||
* @Version: 1.0
|
* @Version: 1.0
|
||||||
**/
|
**/
|
||||||
@Service
|
@Service
|
||||||
public class UserDetailServiceImpl implements UserDetailsService {
|
public class UserDetailServiceImpl implements UserDetailsService, IUserDetailCheckService {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(UserDetailServiceImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(UserDetailServiceImpl.class);
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}}</span> 变更了用户名为 <span class="layui-badge layui-bg-cyan" :title="'原用户名:'+ userAdjustment.oldValue" style="cursor:pointer;">{{userAdjustment.newValue}}</span>
|
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}}</span> 变更了用户名为 <span class="layui-badge layui-bg-cyan" :title="'原用户名:'+ userAdjustment.oldValue" style="cursor:pointer;">{{userAdjustment.newValue}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="userAdjustment.updateType == 'password'">
|
<td v-if="userAdjustment.updateType == 'password'">
|
||||||
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}} 修改了密码</span>
|
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}}</span> 修改了密码
|
||||||
</td>
|
</td>
|
||||||
<td v-if="userAdjustment.updateType == 'restPassword'">
|
<td v-if="userAdjustment.updateType == 'restPassword'">
|
||||||
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}}</span> 重置了密码为 <span class="layui-badge layui-bg-cyan">{{userAdjustment.newValue}}</span>
|
<span class="layui-badge layui-bg-blue"><i class="fa fa-user-circle-o"></i> {{userAdjustment.userName}}</span> 重置了密码为 <span class="layui-badge layui-bg-cyan">{{userAdjustment.newValue}}</span>
|
||||||
|
@ -174,9 +174,7 @@
|
|||||||
title: '修改密码',
|
title: '修改密码',
|
||||||
width: '400px',
|
width: '400px',
|
||||||
height: '290px',
|
height: '290px',
|
||||||
onClose: function() {
|
onClose: function() {}
|
||||||
window.location.href = 'oauth/logout';
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,188 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item">
|
||||||
|
<select id="adjustmentType">
|
||||||
|
<option value="" selected>调整类型</option>
|
||||||
|
<option value="split">拆分</option>
|
||||||
|
<option value="merge">合并</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var common = layui.common;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var tableUrl = 'api/log/listpage/department-adjustment';
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
table.render({
|
||||||
|
elem: '#dataTable',
|
||||||
|
id: 'dataTable',
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
|
height: $win.height() - 90,
|
||||||
|
limit: 20,
|
||||||
|
limits: [20, 40, 60, 80, 100, 200],
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'oldDepartmentName', width: 150, title: '原机构名称', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'newDepartmentName', width: 150, title: '新机构名称', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'adjustmentType', width: 100, title: '调整类型', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
if(rowData === 'split') {
|
||||||
|
return '<span class="layui-badge">拆分</span>';
|
||||||
|
}
|
||||||
|
if(rowData === 'merge') {
|
||||||
|
return '<span class="layui-badge layui-bg-orange">合并</span>';
|
||||||
|
}
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'creatorName', width: 150, title: '操作人', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtCreate', width: 180, title: '操作时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
],
|
||||||
|
page: true,
|
||||||
|
parseData: function(data) {
|
||||||
|
return {
|
||||||
|
'code': 0,
|
||||||
|
'msg': '',
|
||||||
|
'count': data.total,
|
||||||
|
'data': data.rows
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(currentPage) {
|
||||||
|
table.reload('dataTable', {
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
where: {
|
||||||
|
keywords: $('#keywords').val(),
|
||||||
|
adjustmentType: $('#adjustmentType').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
height: $win.height() - 90,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化日期
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#startTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTable();
|
||||||
|
initDate();
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
// 事件 - 搜索
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
reloadTable(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,188 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item">
|
||||||
|
<select id="adjustmentType">
|
||||||
|
<option value="" selected>调整类型</option>
|
||||||
|
<option value="join">加入</option>
|
||||||
|
<option value="leave">离开</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var common = layui.common;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var tableUrl = 'api/log/listpage/department-user-adjustment';
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
table.render({
|
||||||
|
elem: '#dataTable',
|
||||||
|
id: 'dataTable',
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
|
height: $win.height() - 90,
|
||||||
|
limit: 20,
|
||||||
|
limits: [20, 40, 60, 80, 100, 200],
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'userName', width: 150, title: '用户', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'departmentName', width: 150, title: '调整部门', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'adjustmentType', width: 100, title: '调整类型', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
if(rowData === 'join') {
|
||||||
|
return '<span class="layui-badge layui-bg-green">加入</span>';
|
||||||
|
}
|
||||||
|
if(rowData === 'leave') {
|
||||||
|
return '<span class="layui-badge">离开</span>';
|
||||||
|
}
|
||||||
|
return '错误';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'creatorName', width: 100, title: '修改人', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtCreate', width: 180, title: '修改时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
page: true,
|
||||||
|
parseData: function(data) {
|
||||||
|
return {
|
||||||
|
'code': 0,
|
||||||
|
'msg': '',
|
||||||
|
'count': data.total,
|
||||||
|
'data': data.rows
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(currentPage) {
|
||||||
|
table.reload('dataTable', {
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
where: {
|
||||||
|
keywords: $('#keywords').val(),
|
||||||
|
adjustmentType: $('#adjustmentType').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
height: $win.height() - 90,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化日期
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#startTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTable();
|
||||||
|
initDate();
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
// 事件 - 搜索
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
reloadTable(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
181
login-base/src/main/resources/templates/log/list-login-log.html
Normal file
181
login-base/src/main/resources/templates/log/list-login-log.html
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item">
|
||||||
|
<select id="loginType">
|
||||||
|
<option value="" selected>登录类型</option>
|
||||||
|
<option value="1">用户名 + 密码</option>
|
||||||
|
<option value="2">用户名 + 密码 + UKey</option>
|
||||||
|
<option value="3">UKey</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var common = layui.common;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var tableUrl = 'api/log/listpage/login-log';
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
table.render({
|
||||||
|
elem: '#dataTable',
|
||||||
|
id: 'dataTable',
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
|
height: $win.height() - 90,
|
||||||
|
limit: 20,
|
||||||
|
limits: [20, 40, 60, 80, 100, 200],
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'creatorName', width: 150, title: '登录用户', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtCreate', width: 180, title: '登录时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'loginAddress', width: 150, title: '登录地址', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'loginType', width: 200, title: '登录类型', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
if(rowData == '1') {
|
||||||
|
return '<span class="layui-badge layui-bg-blue">用户名</span> + <span class="layui-badge layui-bg-green">密码</span>';
|
||||||
|
} else if(rowData == '2') {
|
||||||
|
return '<span class="layui-badge layui-bg-blue">用户名</span> + <span class="layui-badge layui-bg-green">密码</span> + <span class="layui-badge layui-bg-black">UKey</span>';
|
||||||
|
} else if(rowData == '3') {
|
||||||
|
return '<span class="layui-badge layui-bg-black">UKey</span>';
|
||||||
|
}
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
],
|
||||||
|
page: true,
|
||||||
|
parseData: function(data) {
|
||||||
|
return {
|
||||||
|
'code': 0,
|
||||||
|
'msg': '',
|
||||||
|
'count': data.total,
|
||||||
|
'data': data.rows
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(currentPage) {
|
||||||
|
table.reload('dataTable', {
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
where: {
|
||||||
|
keywords: $('#keywords').val(),
|
||||||
|
loginType: $('#loginType').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
height: $win.height() - 90,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化日期
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#startTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTable();
|
||||||
|
initDate();
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
// 事件 - 搜索
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
reloadTable(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,210 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline layui-form search-item">
|
||||||
|
<select id="updateType">
|
||||||
|
<option value="" selected>修改类型</option>
|
||||||
|
<option value="username">用户名</option>
|
||||||
|
<option value="password">密码</option>
|
||||||
|
<option value="restPassword">重置密码</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var common = layui.common;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var tableUrl = 'api/log/listpage/user-adjustment';
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
table.render({
|
||||||
|
elem: '#dataTable',
|
||||||
|
id: 'dataTable',
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
|
height: $win.height() - 90,
|
||||||
|
limit: 20,
|
||||||
|
limits: [20, 40, 60, 80, 100, 200],
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'userName', width: 150, title: '用户', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'oldValue', width: 150, title: '原值', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'newValue', width: 150, title: '新值', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'updateType', width: 100, title: '修改类型', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
if(rowData === 'username') {
|
||||||
|
return '<span class="layui-badge layui-bg-green">用户名</span>'
|
||||||
|
}
|
||||||
|
if(rowData === 'password') {
|
||||||
|
return '<span class="layui-badge layui-bg-blue">密码</span>'
|
||||||
|
}
|
||||||
|
if(rowData === 'restPassword') {
|
||||||
|
return '<span class="layui-badge layui-bg-cyan">重置密码</span>'
|
||||||
|
}
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'creatorName', width: 150, title: '修改人', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtCreate', width: 180, title: '修改时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'updateReason', width: 200, title: '修改原因', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
],
|
||||||
|
page: true,
|
||||||
|
parseData: function(data) {
|
||||||
|
return {
|
||||||
|
'code': 0,
|
||||||
|
'msg': '',
|
||||||
|
'count': data.total,
|
||||||
|
'data': data.rows
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(currentPage) {
|
||||||
|
table.reload('dataTable', {
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
where: {
|
||||||
|
keywords: $('#keywords').val(),
|
||||||
|
updateType: $('#updateType').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
height: $win.height() - 90,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化日期
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#startTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTable();
|
||||||
|
initDate();
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
// 事件 - 搜索
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
reloadTable(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -9,6 +9,7 @@ import ink.wgink.interfaces.permission.IPermissionCheckService;
|
|||||||
import ink.wgink.interfaces.position.IPositionCheckService;
|
import ink.wgink.interfaces.position.IPositionCheckService;
|
||||||
import ink.wgink.interfaces.role.IRoleCheckService;
|
import ink.wgink.interfaces.role.IRoleCheckService;
|
||||||
import ink.wgink.interfaces.user.IUserCheckService;
|
import ink.wgink.interfaces.user.IUserCheckService;
|
||||||
|
import ink.wgink.interfaces.user.IUserDetailCheckService;
|
||||||
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
import ink.wgink.pojo.dtos.menu.MenuDTO;
|
||||||
import ink.wgink.module.menu.dao.IMenuDao;
|
import ink.wgink.module.menu.dao.IMenuDao;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
@ -55,6 +56,8 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
private IPermissionCheckService permissionCheckService;
|
private IPermissionCheckService permissionCheckService;
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
private IRoleCheckService roleCheckService;
|
private IRoleCheckService roleCheckService;
|
||||||
|
@Autowired(required = false)
|
||||||
|
private IUserDetailCheckService userDetailCheckService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
@ -97,7 +100,8 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
}
|
}
|
||||||
initSystemManage(params, menuId);
|
initSystemManage(params, menuId);
|
||||||
initUserPermissionManage(params, menuId);
|
initUserPermissionManage(params, menuId);
|
||||||
initPermissionManager(params, menuId);
|
initPermissionManage(params, menuId);
|
||||||
|
initLogManage(params, menuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSystemManage(Map<String, Object> params, String menuParentId) {
|
private void initSystemManage(Map<String, Object> params, String menuParentId) {
|
||||||
@ -404,7 +408,7 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
* @param params
|
* @param params
|
||||||
* @param menuParentId
|
* @param menuParentId
|
||||||
*/
|
*/
|
||||||
private void initPermissionManager(Map<String, Object> params, String menuParentId) {
|
private void initPermissionManage(Map<String, Object> params, String menuParentId) {
|
||||||
if (permissionCheckService == null && roleCheckService == null) {
|
if (permissionCheckService == null && roleCheckService == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -581,4 +585,156 @@ public class ServiceMenuStartUp implements ApplicationRunner {
|
|||||||
menuDao.save(params);
|
menuDao.save(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志管理
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
private void initLogManage(Map<String, Object> params, String menuParentId) {
|
||||||
|
if (userDetailCheckService == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LOG.debug("初始化菜单:日志管理");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "00010004");
|
||||||
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
|
String menuId;
|
||||||
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
params.put("menuParentId", menuParentId);
|
||||||
|
params.put("menuName", "日志管理");
|
||||||
|
params.put("menuSummary", "日志管理");
|
||||||
|
params.put("menuUrl", "javascript:void(0);");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-history");
|
||||||
|
params.put("menuOrder", "4");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
} else {
|
||||||
|
menuId = menuDTO.getMenuId();
|
||||||
|
}
|
||||||
|
|
||||||
|
initLoginLogManage(params, menuId);
|
||||||
|
initUserAdjustmentManage(params, menuId);
|
||||||
|
initDepartmentAdjustmentManage(params, menuId);
|
||||||
|
initDepartmentUserAdjustmentManage(params, menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录日志
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
private void initLoginLogManage(Map<String, Object> params, String menuParentId) {
|
||||||
|
LOG.debug("初始化菜单:登录日志");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100040001");
|
||||||
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
|
String menuId;
|
||||||
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
params.put("menuParentId", menuParentId);
|
||||||
|
params.put("menuName", "登录日志");
|
||||||
|
params.put("menuSummary", "登录日志");
|
||||||
|
params.put("menuUrl", "/route/log/list-login-log");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-history");
|
||||||
|
params.put("menuOrder", "1");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户调整
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
private void initUserAdjustmentManage(Map<String, Object> params, String menuParentId) {
|
||||||
|
LOG.debug("初始化菜单:用户调整");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100040002");
|
||||||
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
|
String menuId;
|
||||||
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
params.put("menuParentId", menuParentId);
|
||||||
|
params.put("menuName", "用户调整");
|
||||||
|
params.put("menuSummary", "用户调整");
|
||||||
|
params.put("menuUrl", "/route/log/list-user-adjustment");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-history");
|
||||||
|
params.put("menuOrder", "2");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门调整
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
private void initDepartmentAdjustmentManage(Map<String, Object> params, String menuParentId) {
|
||||||
|
LOG.debug("初始化菜单:部门调整");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100040003");
|
||||||
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
|
String menuId;
|
||||||
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
params.put("menuParentId", menuParentId);
|
||||||
|
params.put("menuName", "部门调整");
|
||||||
|
params.put("menuSummary", "部门调整");
|
||||||
|
params.put("menuUrl", "/route/log/list-department-adjustment");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-history");
|
||||||
|
params.put("menuOrder", "3");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门用户调整
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @param menuParentId
|
||||||
|
*/
|
||||||
|
private void initDepartmentUserAdjustmentManage(Map<String, Object> params, String menuParentId) {
|
||||||
|
LOG.debug("初始化菜单:部门用户调整");
|
||||||
|
params.remove("menuId");
|
||||||
|
params.put("menuCode", "000100040004");
|
||||||
|
MenuDTO menuDTO = menuDao.getSimple(params);
|
||||||
|
String menuId;
|
||||||
|
if (menuDTO == null) {
|
||||||
|
menuId = UUIDUtil.getUUID();
|
||||||
|
params.put("menuId", menuId);
|
||||||
|
params.put("menuParentId", menuParentId);
|
||||||
|
params.put("menuName", "部门用户调整");
|
||||||
|
params.put("menuSummary", "部门用户调整");
|
||||||
|
params.put("menuUrl", "/route/log/list-department-user-adjustment");
|
||||||
|
params.put("menuType", "1");
|
||||||
|
params.put("menuIcon", "fa-icon-color-white fa fa-history");
|
||||||
|
params.put("menuOrder", "4");
|
||||||
|
params.put("menuStatus", "0");
|
||||||
|
params.put("openType", "1");
|
||||||
|
menuDao.save(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -66,15 +66,12 @@
|
|||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
top.restAjax.put(top.restAjax.path('api/user/update-password', []), formData.field, null, function(code, data) {
|
top.restAjax.put(top.restAjax.path('api/user/update-password', []), formData.field, null, function(code, data) {
|
||||||
var layerIndex = top.dialog.msg('修改成功,继续修改?窗口关闭后,需重新登录系统', {
|
var layerIndex = top.dialog.msg('修改成功,请重新登录系统', {
|
||||||
time: 0,
|
time: 0,
|
||||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
btn: [top.dataMessage.button.yes],
|
||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
yes: function(index) {
|
yes: function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
window.location.reload();
|
|
||||||
},
|
|
||||||
btn2: function() {
|
|
||||||
closeBox();
|
closeBox();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user