Files
RuoYi/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html

188 lines
6.6 KiB
HTML
Raw Normal View History

2018-07-09 08:44:52 +08:00
<!DOCTYPE html>
2019-03-31 12:56:04 +08:00
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('操作日志列表')" />
2019-05-14 12:23:59 +08:00
<th:block th:include="include :: bootstrap-select-css" />
2019-03-31 12:56:04 +08:00
</head>
2018-07-09 08:44:52 +08:00
<body class="gray-bg">
<div class="container-div">
<div class="row">
2018-10-01 21:32:01 +08:00
<div class="col-sm-12 search-collapse">
2018-07-09 08:44:52 +08:00
<form id="operlog-form">
2018-08-01 10:07:28 +08:00
<div class="select-list">
2018-07-09 08:44:52 +08:00
<ul>
2023-09-26 09:19:30 +08:00
<li>
<label>操作地址:</label><input type="text" name="operIp"/>
</li>
2018-07-09 08:44:52 +08:00
<li>
<label>系统模块: </label><input type="text" name="title"/>
2018-07-09 08:44:52 +08:00
</li>
<li>
<label>操作人员: </label><input type="text" name="operName"/>
2018-07-09 08:44:52 +08:00
</li>
2019-05-14 12:23:59 +08:00
<li class="select-selectpicker">
<label>操作类型: </label><select id="businessTypes" name="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
2018-08-23 17:06:31 +08:00
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
2018-07-09 08:44:52 +08:00
</select>
</li>
<li>
<label>操作状态:</label><select name="status" th:with="type=${@dict.getType('sys_common_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
2018-08-23 17:06:31 +08:00
<li class="select-time">
<label>操作时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间"/>
</li>
2018-07-09 08:44:52 +08:00
<li>
2019-05-14 12:23:59 +08:00
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchPre()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
2018-07-09 08:44:52 +08:00
</li>
</ul>
</div>
</form>
</div>
2019-02-28 20:52:07 +08:00
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
<i class="fa fa-remove"></i> 删除
2018-07-09 08:44:52 +08:00
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">
<i class="fa fa-trash"></i> 清空
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:operlog:export">
<i class="fa fa-download"></i> 导出
</a>
2018-07-09 08:44:52 +08:00
</div>
2018-08-23 17:06:31 +08:00
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
2018-07-09 08:44:52 +08:00
</div>
</div>
</div>
2019-03-31 12:56:04 +08:00
<th:block th:include="include :: footer" />
2019-05-14 12:23:59 +08:00
<th:block th:include="include :: bootstrap-select-js" />
2018-07-09 08:44:52 +08:00
<script th:inline="javascript">
2018-07-22 23:05:50 +08:00
var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
var datas = [[${@dict.getType('sys_oper_type')}]];
2018-10-05 19:27:24 +08:00
var prefix = ctx + "monitor/operlog";
2018-07-09 08:44:52 +08:00
$(function() {
var options = {
url: prefix + "/list",
cleanUrl: prefix + "/clean",
detailUrl: prefix + "/detail/{id}",
2018-07-09 08:44:52 +08:00
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
2020-08-07 18:36:05 +08:00
queryParams: queryParams,
2018-07-09 08:44:52 +08:00
sortName: "operTime",
sortOrder: "desc",
modalName: "操作日志",
2018-12-01 16:14:19 +08:00
escape: true,
2019-03-07 12:57:15 +08:00
showPageGo: true,
2019-03-31 12:56:04 +08:00
rememberSelected: true,
2018-07-09 08:44:52 +08:00
columns: [{
field: 'state',
2018-07-09 08:44:52 +08:00
checkbox: true
},
{
field: 'operId',
title: '日志编号'
},
{
field: 'title',
title: '系统模块',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
2018-07-09 08:44:52 +08:00
{
2018-08-18 23:51:19 +08:00
field: 'businessType',
2018-07-09 08:44:52 +08:00
title: '操作类型',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
2018-07-09 08:44:52 +08:00
}
},
{
field: 'operName',
2018-07-19 21:17:17 +08:00
title: '操作人员',
sortable: true
2018-07-09 08:44:52 +08:00
},
{
field: 'deptName',
title: '部门名称'
},
{
field: 'operIp',
2023-09-26 09:19:30 +08:00
title: '操作地址'
2018-07-09 08:44:52 +08:00
},
{
field: 'operLocation',
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>';
2018-07-09 08:44:52 +08:00
}
}
},
{
field: 'operTime',
2018-07-19 21:17:17 +08:00
title: '操作时间',
sortable: true
2018-07-09 08:44:52 +08:00
},
2023-02-16 11:57:40 +08:00
{
field: 'costTime',
title: '消耗时间',
sortable: true,
formatter: function(value, row, index) {
return $.common.sprintf("%s毫秒", value);
}
},
2018-07-09 08:44:52 +08:00
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
2019-05-13 19:03:32 +08:00
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>');
2018-07-09 08:44:52 +08:00
return actions.join('');
}
}]
};
$.table.init(options);
});
2019-05-14 12:23:59 +08:00
2020-08-07 18:36:05 +08:00
function queryParams(params) {
var search = $.table.queryParams(params);
search.params = {
beginTime : beginOfTime($("#startTime").val()),
endTime : endOfTime($("#endTime").val())
};
2020-08-07 18:36:05 +08:00
search.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
return search;
}
2019-05-14 12:23:59 +08:00
function searchPre() {
2020-08-07 18:36:05 +08:00
$.table.search('operlog-form', 'bootstrap-table');
2019-05-14 12:23:59 +08:00
}
function resetPre() {
resetDate();
2020-03-23 09:02:04 +08:00
$("#operlog-form")[0].reset();
2019-05-14 12:23:59 +08:00
$("#businessTypes").selectpicker('refresh');
2023-11-25 15:43:28 +08:00
$.table.search('operlog-form', 'bootstrap-table', 1);
2019-05-14 12:23:59 +08:00
}
2018-07-09 08:44:52 +08:00
</script>
</body>
</html>