|
|
|
@ -2,22 +2,41 @@
|
|
|
|
|
<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" />
|
|
|
|
|
</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="alarmTypeInfo()" 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 id="alarmtypeId" type="hidden" name="alarmtypeId"/>
|
|
|
|
|
<div class="select-list">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<label>传感器:</label>
|
|
|
|
|
<input type="text" name="sensorId"/>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>报警类型:</label>
|
|
|
|
|
<input type="text" name="alarmtypeId"/>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<label>是否启用:</label>
|
|
|
|
@ -55,14 +74,41 @@
|
|
|
|
|
</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" />
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
|
var editFlag = [[${@permission.hasPermi('base:alarmInfo:edit')}]];
|
|
|
|
|
var removeFlag = [[${@permission.hasPermi('base:alarmInfo:remove')}]];
|
|
|
|
|
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
|
|
|
|
var prefix = ctx + "base/alarmInfo";
|
|
|
|
|
|
|
|
|
|
$(()=>{
|
|
|
|
|
if(typeof(Storage) == 'undefined'){
|
|
|
|
|
alert('对不起,您的浏览器不支持 web 存储。')
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
var panehHidden = false;
|
|
|
|
|
if ($(this).width() < 769) {
|
|
|
|
|
panehHidden = true;
|
|
|
|
|
}
|
|
|
|
|
$('body').layout({ initClosed: panehHidden, west__size: 185 });
|
|
|
|
|
// 回到顶部绑定
|
|
|
|
|
if ($.fn.toTop !== undefined) {
|
|
|
|
|
var opt = {
|
|
|
|
|
win:$('.ui-layout-center'),
|
|
|
|
|
doc:$('.ui-layout-center')
|
|
|
|
|
};
|
|
|
|
|
$('#scroll-up').toTop(opt);
|
|
|
|
|
}
|
|
|
|
|
queryAlarmInfoList();
|
|
|
|
|
queryalarmTypeTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function queryAlarmInfoList() {
|
|
|
|
|
var options = {
|
|
|
|
|
url: prefix + "/list",
|
|
|
|
|
createUrl: prefix + "/add",
|
|
|
|
@ -79,12 +125,12 @@
|
|
|
|
|
visible: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'sensorId',
|
|
|
|
|
title: '传感器编号'
|
|
|
|
|
field: 'sensorName',
|
|
|
|
|
title: '传感器'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'alarmtypeId',
|
|
|
|
|
title: '报警类型编号'
|
|
|
|
|
field: 'alarmTypeName',
|
|
|
|
|
title: '报警类型'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'maxValue',
|
|
|
|
@ -101,22 +147,6 @@
|
|
|
|
|
return $.table.selectDictLabel(enableFlagDatas, value);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createBy',
|
|
|
|
|
title: '创建人'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createTime',
|
|
|
|
|
title: '创建时间'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'updateBy',
|
|
|
|
|
title: '更新人'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'updateTime',
|
|
|
|
|
title: '更新时间'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
align: 'center',
|
|
|
|
@ -129,7 +159,50 @@
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
$.table.init(options);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function queryalarmTypeTree()
|
|
|
|
|
{
|
|
|
|
|
var url = ctx + "base/alarmType/treeData";
|
|
|
|
|
var options = {
|
|
|
|
|
url: url,
|
|
|
|
|
expandLevel: 2,
|
|
|
|
|
onClick : zOnClick
|
|
|
|
|
};
|
|
|
|
|
$.tree.init(options);
|
|
|
|
|
|
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
|
$("#alarmtypeId").val(treeNode.id);
|
|
|
|
|
$.table.search();
|
|
|
|
|
|
|
|
|
|
var num = new Object;
|
|
|
|
|
num.cp_keynum ="alarmType";
|
|
|
|
|
num.cp_num_value = treeNode.id+"/"+treeNode.name;
|
|
|
|
|
var str = JSON.stringify(num); // 将对象转换为字符串
|
|
|
|
|
localStorage.setItem(num.cp_keynum,str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#btnExpand').click(function() {
|
|
|
|
|
$._tree.expandAll(true);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnCollapse').show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnCollapse').click(function() {
|
|
|
|
|
$._tree.expandAll(false);
|
|
|
|
|
$(this).hide();
|
|
|
|
|
$('#btnExpand').show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#btnRefresh').click(function() {
|
|
|
|
|
queryMonitorTree();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function alarmTypeInfo() {
|
|
|
|
|
var url = ctx + "base/alarmType";
|
|
|
|
|
$.modal.openTab("报警类型", url);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|