|
|
@ -2,8 +2,33 @@
|
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<th:block th:include="include :: header('设备参数列表')" />
|
|
|
|
<th:block th:include="include :: header('设备参数列表')" />
|
|
|
|
|
|
|
|
<th:block th:include="include :: layout-latest-css"/>
|
|
|
|
|
|
|
|
<th:block th:include="include :: ztree-css"/>
|
|
|
|
</head>
|
|
|
|
</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="monitorUnitInfo()" 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="container-div">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 search-collapse">
|
|
|
|
<div class="col-sm-12 search-collapse">
|
|
|
@ -57,14 +82,41 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<th:block th:include="include :: footer" />
|
|
|
|
<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">
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var editFlag = [[${@permission.hasPermi('base:deviceParam:edit')}]];
|
|
|
|
var editFlag = [[${@permission.hasPermi('base:deviceParam:edit')}]];
|
|
|
|
var removeFlag = [[${@permission.hasPermi('base:deviceParam:remove')}]];
|
|
|
|
var removeFlag = [[${@permission.hasPermi('base:deviceParam:remove')}]];
|
|
|
|
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
|
|
|
var enableFlagDatas = [[${@dict.getType('enable_flag')}]];
|
|
|
|
var prefix = ctx + "base/deviceParam";
|
|
|
|
var prefix = ctx + "base/deviceParam";
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$(() => {
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
queryDeviceParamsList();
|
|
|
|
|
|
|
|
queryMonitorTree();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function queryDeviceParamsList() {
|
|
|
|
var options = {
|
|
|
|
var options = {
|
|
|
|
url: prefix + "/list",
|
|
|
|
url: prefix + "/list",
|
|
|
|
createUrl: prefix + "/add",
|
|
|
|
createUrl: prefix + "/add",
|
|
|
@ -76,12 +128,12 @@
|
|
|
|
checkbox: true
|
|
|
|
checkbox: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: 'ObjId',
|
|
|
|
field: 'objId',
|
|
|
|
title: '主键标识',
|
|
|
|
title: '主键标识',
|
|
|
|
visible: false
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: 'deviceId',
|
|
|
|
field: 'monitorunitName',
|
|
|
|
title: '设备标识'
|
|
|
|
title: '设备标识'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -120,14 +172,56 @@
|
|
|
|
align: 'center',
|
|
|
|
align: 'center',
|
|
|
|
formatter: function(value, row, index) {
|
|
|
|
formatter: function(value, row, index) {
|
|
|
|
var actions = [];
|
|
|
|
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-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>');
|
|
|
|
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('');
|
|
|
|
return actions.join('');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$.table.init(options);
|
|
|
|
$.table.init(options);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function queryMonitorTree() {
|
|
|
|
|
|
|
|
let url = ctx + "base/monitorUnitInfo/treeData";
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
|
|
|
url: url,
|
|
|
|
|
|
|
|
expandLevel: 2,
|
|
|
|
|
|
|
|
onClick: zOnClick
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$.tree.init(options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
|
|
|
|
$("#monitorunitId").val(treeNode.id);
|
|
|
|
|
|
|
|
$.table.search();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var num = new Object;
|
|
|
|
|
|
|
|
num.cp_keynum = "deviceParam_MonitorUnit";
|
|
|
|
|
|
|
|
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 monitorUnitInfo() {
|
|
|
|
|
|
|
|
var url = ctx + "base/monitorUnitInfo";
|
|
|
|
|
|
|
|
$.modal.openTab("监控单元", url);
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</html>
|