master
Peng Li 2023-02-17 18:39:53 +08:00
parent 148926a54c
commit 357c4904af
19 changed files with 2107 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RuoYi - 404</title>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="middle-box text-center animated fadeInDown">
<h1>404</h1>
<h3 class="font-bold">找不到网页!</h3>
<div class="error-desc">
对不起您正在寻找的页面不存在。尝试检查URL的错误然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
<a href="javascript:index()" class="btn btn-primary m-t">主页</a>
</div>
</div>
<script th:inline="javascript">
var ctx = [[@{/}]];
function index() {
window.top.location = ctx + "index";
}
</script>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RuoYi - 500</title>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="middle-box text-center animated fadeInDown">
<h1>500</h1>
<h3 class="font-bold">内部服务器错误!</h3>
<div class="error-desc">
服务器遇到意外事件,不允许完成请求。我们抱歉。您可以返回主页面。
<a href="javascript:index()" class="btn btn-primary m-t">主页</a>
</div>
</div>
<script th:inline="javascript">
var ctx = [[@{/}]];
function index() {
window.top.location = ctx + "index";
}
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RuoYi - 500</title>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="middle-box text-center animated fadeInDown">
<h3 class="font-bold">操作异常!</h3>
<div class="error-desc">
[[${errorMessage}]]
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RuoYi - 403</title>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="middle-box text-center animated fadeInDown">
<h1>403</h1>
<h3 class="font-bold">您没有访问权限!</h3>
<div class="error-desc">
对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面
<a href="javascript:index()" class="btn btn-outline btn-primary btn-xs">返回主页</a>
</div>
</div>
<script th:inline="javascript">
var ctx = [[@{/}]];
function index() {
window.top.location = ctx + "index";
}
</script>
</body>
</html>

View File

@ -0,0 +1,106 @@
<!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-s-add">
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<input name="name" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">sql</label>
<div class="col-sm-8">
<textarea name="squery" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">合计列:</label>
<div class="col-sm-8">
<input name="sumcol" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="sort" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">举例:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" name="sample">
<div class="summernote" id="sample"></div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "index/s"
$("#form-s-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-s-add').serialize());
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,111 @@
<!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-s-edit" th:object="${indexS}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<input name="name" th:field="*{name}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">sql</label>
<div class="col-sm-8">
<textarea name="squery" class="form-control">[[*{squery}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">合计列:</label>
<div class="col-sm-8">
<input name="sumcol" th:field="*{sumcol}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" th:field="*{unit}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="sort" th:field="*{sort}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">举例:</label>
<div class="col-sm-8">
<input type="hidden" class="form-control" th:field="*{sample}">
<div class="summernote" id="sample"></div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "index/s";
$("#form-s-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-s-edit').serialize());
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
</script>
</body>
</html>

View File

@ -0,0 +1,107 @@
<!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="formId">
<div class="select-list">
<ul>
<li>
<label>名称:</label>
<input type="text" name="name"/>
</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="$.operate.add()" shiro:hasPermission="index:s:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="index:s:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="index:s:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="index:s:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('index:s:edit')}]];
var removeFlag = [[${@permission.hasPermi('index:s:remove')}]];
var prefix = ctx + "index/s";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "基础指标",
columns: [{
checkbox: true
},
{
field: 'id',
title: 'ID',
visible: false
},
{
field: 'name',
title: '名称'
},
{
field: 'squery',
title: 'sql'
},
{
field: 'sumcol',
title: '合计列'
},
{
field: 'remark',
title: '备注'
},
{
field: 'createTime',
title: '创建时间'
},
{
field: 'updateTime',
title: '更新时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<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-v-add">
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<input name="name" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计算公式:</label>
<div class="col-sm-8">
<input name="formula" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">展示公式:</label>
<div class="col-sm-8">
<input name="formula0" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他指标:</label>
<div class="col-sm-8">
<input name="others" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年度指标:</label>
<div class="col-sm-8">
<label class="radio-box">
<input type="radio" checked="" value="0" name="year"></label>
<label class="radio-box">
<input type="radio" value="1" name="year"></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">说明:</label>
<div class="col-sm-8">
<textarea name="illustration" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "index/v"
$("#form-v-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-v-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,77 @@
<!DOCTYPE html>
<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-v-edit" th:object="${indexV}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<input name="name" th:field="*{name}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">计算公式:</label>
<div class="col-sm-8">
<input name="formula" th:field="*{formula}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">展示公式:</label>
<div class="col-sm-8">
<input name="formula0" th:field="*{formula0}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input name="unit" th:field="*{unit}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其他指标:</label>
<div class="col-sm-8">
<input name="others" th:field="*{others}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年度指标:</label>
<div class="col-sm-8">
<label class="radio-box">
<input type="radio" th:checked="*{year==0}" value="0" name="year"></label>
<label class="radio-box">
<input type="radio" th:checked="*{year==1}" value="1" name="year"></label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">说明:</label>
<div class="col-sm-8">
<textarea name="illustration" class="form-control">[[*{illustration}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "index/v";
$("#form-v-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-v-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1 @@
您没有访问任何平台公司的权限,请联系管理员!

View File

@ -0,0 +1,282 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<th:block th:include="include :: header('表格搜索')" />
<th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<p class="select-title"><B>展示指标查询</B></p>
<form id="form0">
<div class="select-list">
<ul>
<li>
公司:<select name="platformId" id="platform">
<option th:value="${p.ID}" th:each="p:${platforms}" th:text="${p.PlatformName}" th:selected="${platformId == (p.ID+'')}"></option>
</select>
</li>
<li>
项目:<select name="projectId" id="project">
<option value="">全部</option>
<option th:value="${p.ID}" th:each="p:${projects}" th:text="${p.ProjectName}" th:selected="${projectId == (p.ID+'')}"></option>
</select>
</li>
<li>
指标:<select name="index" id="ii">
<option value=""></option>
<option th:value="${i.id}" th:each="i : ${indexs}" th:selected="${i.id==indexId}" th:year="${i.year}">[[${i.name}]]</option>
</select>
</li>
<li id="year" th:style="${v!=null&&v.year==1?'':'display:none'}">
年度:<select name="year" th:with="type=${@dict.getType('sys_year')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:selected="${(year+'')==dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="dosum();"><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 search-collapse" th:if="${v!= null}">
<p class="select-title"><B>[[${v.name}]][[${value}]]&nbsp;[[${v.unit}]]</B></p>
<div class="panel panel-primary">
<div class="panel-heading">
指标说明
</div>
<div class="panel-body">
<p th:text="${v.illustration}"></p>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
指标公式
</div>
<div class="panel-body">
<p th:text="${v.formula0}"></p>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
备注
</div>
<div class="panel-body">
<p th:text="${v.remark}"></p>
</div>
</div>
<p class="select-title"><B>基础指标:</B></p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>基础指标名称</th>
<th>
说明
</th>
<th style="text-align:right">
基础指标值
</th>
<th>
举例
</th>
</tr>
</thead>
<tbody>
<tr th:each="s:${sList}">
<th class="text-nowrap" th:text="${s.name}" th:style="${s.delFlag=='1'?'color:#C88':''}"></th>
<td th:text="${s.remark}" th:style="${s.delFlag=='1'?'color:#C88':''}"></td>
<td th:text="${s.sum+' '+s.unit}" th:style="${s.delFlag=='1'?'color:#C88;text-align:right':'text-align:right'}"></td>
<td><a href="#" data-toggle="modal" th:data-target="${'#myModal'+s.id}" th:if="${!#strings.isEmpty(s.sample)}">查看</a></td>
</tr>
</tbody>
</table>
</div>
<p class="select-title"><B>底层数据:</B><a class="btn btn-primary btn-sm" onclick="exportsum();"><i class="fa fa-download"></i>&nbsp;导出</a></p>
<div class="col-sm-12">
<div class="tabs-container">
<ul class="nav nav-tabs">
<li th:each="s:${sList}" th:class="${sList[0].id==s.id?'active':''}"><a data-toggle="tab" th:href="${'#tab-'+s.id}" th:aria-expanded="${sList[0].id==s.id}" th:text="${s.name}" th:style="${s.delFlag=='1'?'color:#C88':''}"></a>
</li>
</ul>
<div class="tab-content">
<div th:each="s:${sList}" th:id="${'tab-'+s.id}" th:class="${sList[0].id==s.id?'tab-pane active':'tab-pane'}">
<div class="panel-body">
<div class="table-responsive">
<div class="pull-right">
[[${s.detail.size()}]]条
</div>
<table class="table table-bordered table-striped" th:id="${'table'+s.id}">
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal inmodal fade" th:id="${'myModal'+s.id}" tabindex="-1" role="dialog" aria-hidden="true" th:each="s:${sList}">
<div class="modal-dialog modal-lg" style="width:1400px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title" th:text="${s.name}"></h4>
</div>
<div class="modal-body" th:utext="${s.sample}">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-select-js" />
<th:block th:include="include :: jquery-cxselect-js" />
<script th:inline="javascript">
var prefix = ctx + "index/v";
function loadProject() {
var p =document.getElementById("project");
p.options.length=0;
if ($('#platform').val()!='' && $('#platform').val()!=null) {
$.post(prefix+"/listProject",
{
platformId:$('#platform').val()
},
function(result){
p.options.add(new Option("全部",""));
for (var project of result) {
p.options.add(new Option(project.ProjectName,project.ID));
}
});
}
}
function showYear() {
if ($("option:selected[year]").attr("year")==1) {
$("#year").show();
} else {
$("#year").hide();
}
}
$("#platform").change(function(){
loadProject();
});
$("#ii").change(function(){
showYear();
});
function dosum() {
if ($('#ii').val()!='' && $('#ii').val()!=null) {
$('#form0').submit();
} else {
$.modal.alertError("请选择指标");
}
}
function exportsum() {
$.modal.confirm("确定导出所有吗?", function() {
$.modal.loading("正在导出数据,请稍候...");
$.post(prefix+"/exportSum",
{
platformId:[[${platformId}]],
projectId:[[${projectId}]],
year:[[${year}]],
index:[[${v!=null?v.id:null}]],
},
function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg);
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
}
showYear();
</script>
<script th:inline="javascript" th:each="s:${sList}">
$([['#table'+${s.id}]]).bootstrapTable({
striped: true, //是否显示行间隔色
cache: false,
search: true,
searchAlign:"left",
data:[[${s.detail}]],
columns: [
{
title:'序号',
formatter: function (value, row, index) {
return index+1;
}
},
[# th:each="n:${s.keySet}"]
{
field : [[${n}]],
title : [[${n}]],
align : [[${s.getIsNum[n+'']?'right':'left'}]],
formatter: function (value, row, index) {
if (value != null) {
[# th:if="${s.getIsNum[n+'']}"]
var s=value.toString().split('.');
return s[0].replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')+(s.length>1?'.'+s[1]:'');
[/]
[# th:if="${!s.getIsNum[n+'']}"]
return "<span style='word-break:break-all'>"+value+"</span>";
[/]
} return null;
},
sortable: true
},
[/]
]
});
</script>
</body>
</html>

View File

@ -0,0 +1,110 @@
<!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="formId">
<div class="select-list">
<ul>
<li>
<label>名称:</label>
<input type="text" name="name"/>
</li>
<li>
<label>计算公式:</label>
<input type="text" name="formula"/>
</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="$.operate.add()" shiro:hasPermission="index:v:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="index:v:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="index:v:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="index:v:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('index:v:edit')}]];
var removeFlag = [[${@permission.hasPermi('index:v:remove')}]];
var prefix = ctx + "index/v";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "展示指标",
columns: [{
checkbox: true
},
{
field: 'id',
title: 'ID',
visible: false
},
{
field: 'name',
title: '名称'
},
{
field: 'formula',
title: '计算公式'
},
{
field: 'illustration',
title: '说明'
},
{
field: 'remark',
title: '备注'
},
{
field: 'createTime',
title: '创建时间'
},
{
field: 'updateTime',
title: '更新时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,184 @@
<!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="wrapper wrapper-content">
<input type="hidden" id="cacheName">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>缓存列表</h5>
<div class="ibox-tools">
<a href="javascript:getCacheNames()"><i class="fa fa-refresh"></i></a>
</div>
</div>
<div class="ibox-content">
<table class="table table-hover no-margins">
<thead>
<tr>
<th></th>
<th>缓存名称</th>
<th>操作</th>
</tr>
</thead>
<tbody id="cacheNames">
<tr th:fragment="fragment-cache-names" th:each="cacheName, stat : ${cacheNames}">
<td>[[${stat.index + 1}]]</td>
<td style="word-wrap:break-word;word-break:break-all;" th:onclick="getCacheKeys([[${cacheName}]])">[[${cacheName}]]</td>
<td style="width: 50px"><a href="#" th:onclick="clearCacheName([[${cacheName}]])" title="清空"><i class="fa fa-trash-o text-danger"></i></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>键名列表</h5>
<div class="ibox-tools">
<a href="javascript:getCacheKeys('', true)"><i class="fa fa-refresh"></i></a>
</div>
</div>
<div class="ibox-content">
<table class="table table-hover no-margins">
<thead>
<tr>
<th></th>
<th>缓存键名</th>
<th>操作</th>
</tr>
</thead>
<tbody id="cacheKyes">
<tr th:fragment="fragment-cache-kyes" th:each="cacheKey, stat : ${cacheKyes}">
<td>[[${stat.index + 1}]]</td>
<td style="word-wrap:break-word;word-break:break-all;" th:onclick="getCacheValue([[${cacheName}]], [[${cacheKey}]])">[[${cacheKey}]]</td>
<td style="width: 50px"><a href="#" th:onclick="clearCacheKey([[${cacheName}]], [[${cacheKey}]])" title="清空"><i class="fa fa-trash-o text-danger"></i></a></td>
</tr>
</tbody>
</div>
</table>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>缓存内容</h5>
<div class="ibox-tools">
<a href="javascript:clearAll()"><i class="fa fa-refresh"></i> 清理全部</a>
</div>
</div>
<div class="ibox-content">
<div class="row" id="cacheValue">
<div class="col-sm-12" th:fragment="fragment-cache-value">
<div class="form-group">
<label>缓存名称:</label>
<input type="text" class="form-control" th:value="${cacheName}">
</div>
<div class="form-group">
<label>缓存键名:</label>
<input type="text"class="form-control" th:value="${cacheKey}">
</div>
<div class="form-group">
<label>缓存内容:</label>
<textarea class="form-control" style="height: 100px">[[${cacheValue}]]</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "monitor/cache";
function getCacheNames() {
$.ajax({
type: "post",
url: prefix + "/getNames",
data: {
"fragment": 'fragment-cache-names'
},
success: function(data) {
$("#cacheNames").html(data);
$.modal.msgSuccess("刷新缓存列表成功");
}
});
}
function getCacheKeys(cacheName, isMsg) {
var _cacheName = $.common.isNotEmpty(cacheName) ? cacheName : $("#cacheName").val();
$.ajax({
type: "post",
url: prefix + "/getKeys",
data: {
"cacheName": _cacheName,
"fragment": 'fragment-cache-kyes'
},
success: function(data) {
$("#cacheKyes").html(data);
$("#cacheName").val(_cacheName);
if (isMsg) {
$.modal.msgSuccess("刷新键名列表成功");
}
}
});
}
function getCacheValue(cacheName, cacheKey) {
$.ajax({
type: "post",
url: prefix + "/getValue",
data: {
"cacheName": cacheName,
"cacheKey": cacheKey,
"fragment": 'fragment-cache-value'
},
success: function(data) {
$("#cacheValue").html(data);
}
});
}
function clearCacheName(cacheName){
$.post(prefix + "/clearCacheName", {cacheName: cacheName}, function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgSuccess("清理缓存[" + cacheName + "]成功")
getCacheKeys(cacheName);
} else {
$.modal.msgError(result.msg);
}
});
}
function clearCacheKey(cacheName, cacheKey) {
$.post(prefix + "/clearCacheKey", {cacheName: cacheName, cacheKey: cacheKey}, function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgSuccess("清理缓存[" + cacheKey + "]成功")
getCacheKeys(cacheName);
} else {
$.modal.msgError(result.msg);
}
});
}
function clearAll(){
$.get(prefix + "/clearAll", function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgSuccess("清理缓存成功")
} else {
$.modal.msgError(result.msg);
}
});
}
</script>
</html>

View File

@ -0,0 +1,133 @@
<!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="logininfor-form">
<div class="select-list">
<ul>
<li>
<label>登录地址:</label><input type="text" name="ipaddr"/>
</li>
<li>
<label>登录名称:</label><input type="text" name="loginName"/>
</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>
<li class="select-time">
<label>登录时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</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-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">
<i class="fa fa-trash"></i> 清空
</a>
<a class="btn btn-primary single disabled" onclick="unlock()" shiro:hasPermission="monitor:logininfor:unlock">
<i class="fa fa-unlock"></i> 解锁
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:logininfor:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var datas = [[${@dict.getType('sys_common_status')}]];
var prefix = ctx + "monitor/logininfor";
$(function() {
var options = {
url: prefix + "/list",
cleanUrl: prefix + "/clean",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
sortName: "loginTime",
sortOrder: "desc",
modalName: "登录日志",
escape: true,
showPageGo: true,
rememberSelected: true,
columns: [{
field: 'state',
checkbox: true
},
{
field: 'infoId',
title: '访问编号'
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'ipaddr',
title: '登录地址'
},
{
field: 'loginLocation',
title: '登录地点'
},
{
field: 'browser',
title: '浏览器'
},
{
field: 'os',
title: '操作系统'
},
{
field: 'status',
title: '登录状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'msg',
title: '操作信息'
},
{
field: 'loginTime',
title: '登录时间',
sortable: true
}]
};
$.table.init(options);
});
function unlock() {
$.operate.post(prefix + "/unlock?loginName=" + $.table.selectColumns("loginName"));
}
</script>
</body>
</html>

View File

@ -0,0 +1,152 @@
<!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="online-form">
<div class="select-list">
<ul>
<li>
登录地址:<input type="text" name="ipaddr"/>
</li>
<li>
登录名称:<input type="text" name="loginName"/>
</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-danger multiple disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
<i class="fa fa-sign-out"></i> 强退
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-export-js" />
<script th:inline="javascript">
var forceFlag = [[${@permission.hasPermi('monitor:online:forceLogout')}]];
var prefix = ctx + "monitor/online";
$(function() {
var options = {
uniqueId: "sessionId",
url: prefix + "/list",
exportUrl: prefix + "/export",
sortName: "lastAccessTime",
sortOrder: "desc",
showExport: true,
escape: true,
columns: [{
checkbox: true
},
{
title: "序号",
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{
field: 'sessionId',
title: '会话编号',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'deptName',
title: '部门名称'
},
{
field: 'ipaddr',
title: '主机'
},
{
field: 'loginLocation',
title: '登录地点'
},
{
field: 'browser',
title: '浏览器'
},
{
field: 'os',
title: '操作系统'
},
{
field: 'status',
title: '会话状态',
align: 'center',
formatter: function(value, row, index) {
if (value == 'on_line') {
return '<span class="badge badge-primary">在线</span>';
} else if (value == 'off_line') {
return '<span class="badge badge-danger">离线</span>';
}
}
},
{
field: 'startTimestamp',
title: '登录时间',
sortable: true
},
{
field: 'lastAccessTime',
title: '最后访问时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var msg = '<a class="btn btn-danger btn-xs ' + forceFlag + '" href="javascript:void(0)" onclick="forceLogout(\'' + row.sessionId + '\')"><i class="fa fa-sign-out"></i>强退</a> ';
return msg;
}
}]
};
$.table.init(options);
});
// 单条强退
function forceLogout(sessionId) {
$.modal.confirm("确定要强制选中用户下线吗?", function() {
var data = { "ids": sessionId };
$.operate.post(prefix + "/batchForceLogout", data);
})
}
// 批量强退
function batchForceLogout() {
var rows = $.table.selectColumns("sessionId");
if (rows.length == 0) {
$.modal.alertWarning("请选择要强退的用户");
return;
}
$.modal.confirm("确认要强退选中的" + rows.length + "条数据吗?", function() {
var url = prefix + "/batchForceLogout";
var data = { "ids": rows.join() };
$.operate.post(url, data);
});
}
</script>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('操作日志详细')" />
<th:block th:include="include :: jsonview-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<div class="form-group">
<label class="col-sm-2 control-label">操作模块:</label>
<div class="form-control-static" th:text="${operLog.title} + ' / ' + ${@dict.getLabel('sys_oper_type',operLog.businessType)}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">登录信息:</label>
<div class="form-control-static" th:text="${operLog.operName} + ' / ' + ${operLog.deptName} + ' / ' + ${operLog.operIp}+ ' / ' + ${operLog.operLocation}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">请求地址:</label>
<div class="form-control-static" th:text="${operLog.operUrl}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">请求方式:</label>
<div class="form-control-static" th:text="${operLog.requestMethod}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">操作方法:</label>
<div class="form-control-static" th:text="${operLog.method}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">请求参数:</label>
<div class="form-control-static"><pre id="operParam"></pre></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">返回参数:</label>
<div class="form-control-static"><pre id="jsonResult"></pre></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">状态:</label>
<div class="form-control-static" th:class="${operLog.status == 0 ? 'label label-primary' : 'label label-danger'}" th:text="${operLog.status == 0 ? '正常' : '异常'}">
</div>
</div>
<div class="form-group" th:style="'display:' + ${operLog.status == 0 ? 'none' : 'block'}">
<label class="col-sm-2 control-label">异常信息:</label>
<div class="form-control-static" th:text="${operLog.errorMsg}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
<script th:inline="javascript">
$(function() {
var operParam = [[${operLog.operParam}]];
if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
$("#operParam").JSONView(operParam);
} else {
$("#operParam").text(operParam);
}
var jsonResult = [[${operLog.jsonResult}]];
if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
$("#jsonResult").JSONView(jsonResult);
} else {
$("#jsonResult").text(jsonResult);
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,169 @@
<!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('操作日志列表')" />
<th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="operlog-form">
<div class="select-list">
<ul>
<li>
<label>系统模块: </label><input type="text" name="title"/>
</li>
<li>
<label>操作人员: </label><input type="text" name="operName"/>
</li>
<li class="select-selectpicker">
<label>操作类型: </label><select id="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</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>
<li class="select-time">
<label>操作时间: </label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<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>
</li>
</ul>
</div>
</form>
</div>
<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> 删除
</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>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-select-js" />
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
var datas = [[${@dict.getType('sys_oper_type')}]];
var prefix = ctx + "monitor/operlog";
$(function() {
var options = {
url: prefix + "/list",
cleanUrl: prefix + "/clean",
detailUrl: prefix + "/detail/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
queryParams: queryParams,
sortName: "operTime",
sortOrder: "desc",
modalName: "操作日志",
escape: true,
showPageGo: true,
rememberSelected: true,
columns: [{
field: 'state',
checkbox: true
},
{
field: 'operId',
title: '日志编号'
},
{
field: 'title',
title: '系统模块'
},
{
field: 'businessType',
title: '操作类型',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'operName',
title: '操作人员',
sortable: true
},
{
field: 'deptName',
title: '部门名称'
},
{
field: 'operIp',
title: '主机'
},
{
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>';
}
}
},
{
field: 'operTime',
title: '操作时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
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>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function queryParams(params) {
var search = $.table.queryParams(params);
search.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
return search;
}
function searchPre() {
$.table.search('operlog-form', 'bootstrap-table');
}
function resetPre() {
$("#operlog-form")[0].reset();
$("#businessTypes").selectpicker('refresh');
$.table.search('operlog-form', 'bootstrap-table');
}
</script>
</body>
</html>

View File

@ -0,0 +1,254 @@
<!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="wrapper wrapper-content">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>CPU</h5>
<div class="ibox-tools">
<a class="collapse-link"><i class="fa fa-chevron-up"></i>
</a>
<a class="close-link"><i class="fa fa-times"></i></a>
</div>
</div>
<div class="ibox-content">
<table class="table table-hover no-margins">
<thead>
<tr>
<th>属性</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>核心数</td>
<td th:text="${server.cpu.cpuNum}">0个</td>
</tr>
<tr>
<td>用户使用率</td>
<td th:text="${server.cpu.used + '%'}">0%</td>
</tr>
<tr>
<td>系统使用率</td>
<td th:text="${server.cpu.sys + '%'}">0%</td>
</tr>
<tr>
<td>当前空闲率</td>
<td th:text="${server.cpu.free + '%'}">0%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>内存</h5>
<div class="ibox-tools">
<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
<a class="close-link"><i class="fa fa-times"></i></a>
</div>
</div>
<div class="ibox-content">
<table class="table table-hover no-margins">
<thead>
<tr>
<th>属性</th>
<th>内存</th>
<th>JVM</th>
</tr>
</thead>
<tbody>
<tr>
<td>总内存</td>
<td th:text="${server.mem.total + 'G'}">0GB</td>
<td th:text="${server.jvm.total + 'M'}">0MB</td>
</tr>
<tr>
<td>已用内存</td>
<td th:text="${server.mem.used + 'G'}">0GB</td>
<td th:text="${server.jvm.used + 'M'}">0MB</td>
</tr>
<tr>
<td>剩余内存</td>
<td th:text="${server.mem.free + 'G'}">0GB</td>
<td th:text="${server.jvm.free + 'M'}">0MB</td>
</tr>
<tr>
<td>使用率</td>
<td th:class="${server.mem.usage gt 80} ? 'text-danger'">[[${server.mem.usage}]]%</td>
<td th:class="${server.jvm.usage gt 80} ? 'text-danger'">[[${server.jvm.usage}]]%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>服务器信息</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<table class="table table-hover margin bottom">
<tbody>
<tr>
<td>服务器名称</td>
<td th:text="${server.sys.computerName}">RuoYi</td>
<td>操作系统</td>
<td th:text="${server.sys.osName}">Linux</td>
</tr>
<tr>
<td>服务器IP</td>
<td th:text="${server.sys.computerIp}">127.0.0.1</td>
<td>系统架构</td>
<td th:text="${server.sys.osArch}">amd64</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Java虚拟机信息</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<table class="table table-hover margin bottom">
<tbody>
<tr>
<td>Java名称</td>
<td th:text="${server.jvm.name}">Java</td>
<td>Java版本</td>
<td th:text="${server.jvm.version}">1.8.0</td>
</tr>
<tr>
<td>启动时间</td>
<td th:text="${server.jvm.startTime}">2018-12-31 00:00:00</td>
<td>运行时长</td>
<td th:text="${server.jvm.runTime}">0天0时0分0秒</td>
</tr>
<tr>
<td colspan="1">安装路径</td>
<td colspan="3" th:text="${server.jvm.home}"></td>
</tr>
<tr>
<td colspan="1">项目路径</td>
<td colspan="3" th:text="${server.sys.userDir}"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>磁盘状态</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-12">
<table class="table table-hover margin bottom">
<thead>
<tr>
<th>盘符路径</th>
<th>文件系统</th>
<th>盘符类型</th>
<th>总大小</th>
<th>可用大小</th>
<th>已用大小</th>
<th>已用百分比</th>
</tr>
</thead>
<tbody>
<tr th:each="sysFile : ${server.sysFiles}">
<td th:text="${sysFile.dirName}">C:\</td>
<td th:text="${sysFile.sysTypeName}">NTFS</td>
<td th:text="${sysFile.typeName}">local</td>
<td th:text="${sysFile.total}">0GB</td>
<td th:text="${sysFile.free}">0GB</td>
<td th:text="${sysFile.used}">0GB</td>
<td th:class="${sysFile.usage gt 80} ? 'text-danger'">[[${sysFile.usage}]]%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<th:block th:include="include :: footer" />
<script>
$(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function() {
var div_ibox = $(this).closest("div.ibox"),
e = $(this).find("i"),
i = div_ibox.find("div.ibox-content");
i.slideToggle(200),
e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"),
div_ibox.toggleClass("").toggleClass("border-bottom"),
setTimeout(function() {
div_ibox.resize();
}, 50);
}), $(".close-link").click(function () {
var div_ibox = $(this).closest("div.ibox");
div_ibox.remove()
});
</script>
</html>

View File

@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<th:block th:include="include :: header('表单构建器')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<style>
.droppable-active{background-color:#ffe!important}.tools a{cursor:pointer;font-size:80%}.form-body .col-md-6,.form-body .col-md-12{min-height:400px}.draggable{cursor:move}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-sm-5">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>元素</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">基本</a>
</li>
<li><a href="#">其他</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="alert alert-info">
拖拽左侧的表单元素到右侧区域即可生成相应的HTML代码表单代码轻松搞定
</div>
<form role="form" class="form-horizontal m-t">
<div class="form-group draggable">
<label class="col-sm-3 control-label">文本框:</label>
<div class="col-sm-9">
<input type="text" name="" class="form-control" placeholder="请输入文本">
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">多行文本框:</label>
<div class="col-sm-9">
<textarea type="text" name="" class="form-control" placeholder="请输入文本"></textarea>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">密码框:</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="password" placeholder="请输入密码">
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">下拉框:</label>
<div class="col-sm-9">
<select class="form-control" name="">
<option>选项 1</option>
<option>选项 2</option>
<option>选项 3</option>
<option>选项 4</option>
</select>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">纯文本:</label>
<div class="col-sm-9">
<p class="form-control-static">这里是纯文字信息</p>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">单选框:
</label>
<div class="col-sm-9">
<label class="radio-box"><input type="radio" checked="" value="option1" id="optionsRadios1" name="optionsRadios">选项1</label>
<label class="radio-box"><input type="radio" value="option2" id="optionsRadios2" name="optionsRadios">选项2</label>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">复选框:</label>
<div class="col-sm-9">
<label class="check-box">
<input type="checkbox" value="option1" id="inlineCheckbox1">选项1</label>
<label class="check-box">
<input type="checkbox" value="option2" id="inlineCheckbox2">选项2</label>
<label class="check-box">
<input type="checkbox" value="option3" id="inlineCheckbox3">选项3</label>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">切换按钮:
</label>
<div class="col-sm-9">
<label class="toggle-switch switch-solid">
<input type="checkbox" id="status" checked>
<span></span>
</label>
</div>
</div>
<div class="form-group draggable">
<label class="col-sm-3 control-label">日期选择:</label>
<div class="col-sm-9">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" class="form-control" value="2018-04-20">
</div>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group draggable">
<div class="col-sm-12 col-sm-offset-3">
<button type="submit" class="btn btn-primary">提交</button>
<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
</div>
</div>
</form>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="col-sm-7">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>拖拽左侧表单元素到此区域</h5>
<div class="ibox-tools">
请选择显示的列数:
<select id="n-columns">
<option value="1">显示1列</option>
<option value="2">显示2列</option>
</select>
</div>
</div>
<div class="ibox-content">
<div class="row form-body form-horizontal m-t">
<div class="col-md-12 droppable sortable">
</div>
<div class="col-md-6 droppable sortable" style="display: none;">
</div>
<div class="col-md-6 droppable sortable" style="display: none;">
</div>
</div>
<button type="submit" class="btn btn-warning" data-clipboard-text="testing" id="copy-to-clipboard">复制代码</button>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/jquery-ui-1.10.4.min.js}"></script>
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/beautifyhtml/beautifyhtml.js}"></script>
<script type="text/javascript">
$(document).ready(function(){setup_draggable();$("#n-columns").on("change",function(){var v=$(this).val();if(v==="1"){var $col=$(".form-body .col-md-12").toggle(true);$(".form-body .col-md-6 .draggable").each(function(i,el){$(this).remove().appendTo($col)});$(".form-body .col-md-6").toggle(false)}else{var $col=$(".form-body .col-md-6").toggle(true);$(".form-body .col-md-12 .draggable").each(function(i,el){$(this).remove().appendTo(i%2?$col[1]:$col[0])});$(".form-body .col-md-12").toggle(false)}});$("#copy-to-clipboard").on("click",function(){var $copy=$(".form-body").clone().appendTo(document.body);$copy.find(".tools, :hidden").remove();$.each(["draggable","droppable","sortable","dropped","ui-sortable","ui-draggable","ui-droppable","form-body"],function(i,c){$copy.find("."+c).removeClass(c).removeAttr("style")});var html=html_beautify($copy.html());$copy.remove();$modal=get_modal(html).modal("show");$modal.find(".btn").remove();$modal.find(".modal-title").html("复制HTML代码");$modal.find(":input:first").select().focus();return false})});var setup_draggable=function(){$(".draggable").draggable({appendTo:"body",helper:"clone"});$(".droppable").droppable({accept:".draggable",helper:"clone",hoverClass:"droppable-active",drop:function(event,ui){$(".empty-form").remove();var $orig=$(ui.draggable);if(!$(ui.draggable).hasClass("dropped")){var $el=$orig.clone().addClass("dropped").css({"position":"static","left":null,"right":null}).appendTo(this);if($el.find("label").hasClass("radio-box")){$el=$el.html('<label class="col-sm-3 control-label">单选框:</label>'+'<div class="col-sm-9">'+'<label class="radio-box"><input type="radio" checked="" value="option1" id="optionsRadios1" name="optionsRadios">选项1</label>'+'<label class="radio-box"><input type="radio" value="option2" id="optionsRadios2" name="optionsRadios">选项2</label>'+"</div>")}else{if($el.find("label").hasClass("check-box")){$el=$el.html('<label class="col-sm-3 control-label">复选框:</label>'+'<div class="col-sm-9">'+'<label class="check-box">'+'<input type="checkbox" value="option1" id="inlineCheckbox1">选项1</label>'+'<label class="check-box">'+'<input type="checkbox" value="option2" id="inlineCheckbox2">选项2</label>'+'<label class="check-box">'+'<input type="checkbox" value="option3" id="inlineCheckbox3">选项3</label>'+"</div>")}}var id=$orig.find(":input").attr("id");if(id){id=id.split("-").slice(0,-1).join("-")+"-"+(parseInt(id.split("-").slice(-1)[0])+1);$orig.find(":input").attr("id",id);$orig.find("label").attr("for",id)}$('<p class="tools col-sm-12 col-sm-offset-3"> <a class="edit-link">编辑HTML<a> | <a class="remove-link">移除</a></p>').appendTo($el)}else{if($(this)[0]!=$orig.parent()[0]){var $el=$orig.clone().css({"position":"static","left":null,"right":null}).appendTo(this);$orig.remove()}}}}).sortable()};var get_modal=function(content){var modal=$('<div class="modal" style="overflow: auto;" tabindex="-1"> <div class="modal-dialog"><div class="modal-content"><div class="modal-header"><a type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</a><h4 class="modal-title">编辑HTML</h4></div><div class="modal-body ui-front"> <textarea class="form-control textarea-show-src" style="min-height: 200px; margin-bottom: 10px;font-family: Monaco, Fixed"></textarea><button class="btn btn-success">更新HTML</button></div></div></div></div>').appendTo(document.body);var doms=document.getElementsByClassName("textarea-show-src");for(var i=0;i<doms.length;i++){doms.item(i).innerHTML=content}return modal};$(document).on("click",".edit-link",function(ev){var $el=$(this).parent().parent();var $el_copy=$el.clone();var $edit_btn=$el_copy.find(".edit-link").parent().remove();var $modal=get_modal(html_beautify($el_copy.html())).modal("show");$modal.find(":input:first").focus();$modal.find(".btn-success").click(function(ev2){var html=$modal.find("textarea").val();if(!html){$el.remove()}else{$el.html(html);$edit_btn.appendTo($el)}$modal.modal("hide");return false})});$(document).on("click",".remove-link",function(ev){$(this).parent().parent().remove()});$(".input-group.date").datetimepicker({format:"yyyy-mm-dd",minView:"month",autoclose:true});
</script>
</body>
</html>