add - 配电柜实时监控。

worktree-temp-progress-bar-color
yinq 2 weeks ago
parent c3253dcec6
commit a240f20257

@ -66,6 +66,9 @@ public class T_W_TemperturedataController extends BaseController
case 41:
url = "/NoiseRealTimeMonitor";
break;
case 42:
url = "/DistributionCabinetMonitor";
break;
default:
break;
}

@ -0,0 +1,233 @@
<!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 :: layout-latest-css"/>
<th:block th:include="include :: ztree-css"/>
<th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-grid"></i> 测控点信息
</div>
<div class="box-tools pull-right">
<a type="button" class="btn btn-box-tool" href="#" onclick="dept()" title="测控点信息"><i
class="fa fa-edit"></i></a>
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i
class="fa fa-chevron-up"></i></button>
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i
class="fa fa-chevron-down"></i></button>
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新"><i class="fa fa-refresh"></i>
</button>
</div>
</div>
<div class="ui-layout-content">
<div id="tree" class="ztree"></div>
</div>
</div>
</div>
<div class="ui-layout-center">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<input type="hidden" id="monitorId" name="monitorId">
<div class="select-list">
<ul>
<li class="select-time">
<label style="width: auto">采集时间:</label><input type="text" style="width: 150px"
class="form-control" id="laydate-demo-3"
placeholder="开始时间"
name="params[beginCollectTime]"/>
<span>-</span>
<input type="text" class="form-control" id="laydate-demo-4" style="width: 150px"
placeholder="结束时间" name="params[endCollectTime]"/>
</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-warning" onclick="$.table.exportExcel()"
shiro:hasPermission="system:TempertureData: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>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:TempertureData:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:TempertureData:remove')}]];
var prefix = ctx + "system/TempertureData";
let iotType = [[${iotType}]];
$(function () {
var panehHidden = false;
if ($(this).width() < 769) {
panehHidden = true;
}
$('body').layout({initClosed: panehHidden, west__size: 245});
queryUserList();
queryDeptTree();
});
function queryUserList() {
var options = {
url: prefix + "/list?confirmPersonID=1",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "配电柜实施监控",
columns: [{
checkbox: true
},
{
field: 'objid',
title: '编号',
visible: false
},
{
field: 'monitorId',
title: '测控点编号',
visible: false
},
{
field: 'monitorName',
title: '测控点名称'
},
{
field: 'monitorAddr',
title: '测控点位置'
},
{
field: 'collectTime',
title: '采集时间'
},
{
field: 'tempreture',
title: '温度(℃)'
},
{
field: 'humidity',
title: '湿度(%RH',
visible: false
},
{
field: 'illuminance',
title: '照度',
visible: false
},
{
field: 'noise',
title: '噪声',
visible: false
},
{
field: 'concentration',
title: '硫化氢浓度',
visible: false
},
{
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.objid + '\')"><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.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
},
visible: false
}]
};
$.table.init(options);
}
//动力环境
let monitorType = 99;
if (iotType == 2) {
//变电室
monitorType = 100;
} else if (iotType == 3) {
//冷却循环水
monitorType = 101;
}
function queryDeptTree() {
var url = ctx + "system/Monitor/treeData?monitorType=" + 16;
var options = {
url: url,
expandLevel: 1,
onClick: zOnClick
};
$.tree.init(options);
function zOnClick(event, treeId, treeNode) {
$("#monitorId").val(treeNode.id);
/*alert(treeNode.id)*/
$.table.search();
}
}
$('#btnExpand').click(function () {
$._tree.expandAll(true);
$(this).hide();
$('#btnCollapse').show();
});
$('#btnCollapse').click(function () {
$._tree.expandAll(false);
$(this).hide();
$('#btnExpand').show();
});
$('#btnRefresh').click(function () {
queryDeptTree();
});
/* 测控点信息 */
function dept() {
var url = ctx + "system/Monitor?id=4";
$.modal.openTab("测控点信息", url);
}
layui.use('laydate', function () {
var laydate = layui.laydate;
laydate.render({
elem: '#laydate-demo-3',
type: 'datetime',
trigger: 'click'
});
laydate.render({
elem: '#laydate-demo-4',
type: 'datetime',
trigger: 'click'
});
});
</script>
</body>
</html>
Loading…
Cancel
Save