|
|
|
@ -6,6 +6,7 @@
|
|
|
|
<th:block th:include="include :: ztree-css"/>
|
|
|
|
<th:block th:include="include :: ztree-css"/>
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
.chartDiv {
|
|
|
|
.chartDiv {
|
|
|
|
width: 24.5%;
|
|
|
|
width: 24.5%;
|
|
|
|
@ -131,7 +132,6 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
let time1 = null
|
|
|
|
let time1 = null
|
|
|
|
let time2 = null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function queryDeptTree() {
|
|
|
|
function queryDeptTree() {
|
|
|
|
var url = ctx + "system/Monitor/treeData?monitorType=" + 20;
|
|
|
|
var url = ctx + "system/Monitor/treeData?monitorType=" + 20;
|
|
|
|
@ -150,7 +150,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
function onCheck(event, treeId, treeNode) {
|
|
|
|
function onCheck(event, treeId, treeNode) {
|
|
|
|
const intervalFun = () => {
|
|
|
|
const intervalFun = () => {
|
|
|
|
$.post(ctx + 'system/TVibrationsensorData/realTimeMonitor', {sensorId: $.tree.getCheckedNodes()}, (e) => {
|
|
|
|
var checkedIds = getCheckedSensorIds();
|
|
|
|
|
|
|
|
$.post(ctx + 'system/TVibrationsensorData/realTimeMonitor', {sensorId: checkedIds}, (e) => {
|
|
|
|
|
|
|
|
|
|
|
|
let data = e.data || []
|
|
|
|
let data = e.data || []
|
|
|
|
// let data = [{}, {}, {}]
|
|
|
|
// let data = [{}, {}, {}]
|
|
|
|
@ -172,13 +173,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intervalFun()
|
|
|
|
intervalFun()
|
|
|
|
if (time2) {
|
|
|
|
if (time1) {
|
|
|
|
clearInterval(time2)
|
|
|
|
clearInterval(time1)
|
|
|
|
time2 = null
|
|
|
|
time1 = null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
time1 = setInterval(() => {
|
|
|
|
time1 = setInterval(() => {
|
|
|
|
intervalFun()
|
|
|
|
intervalFun()
|
|
|
|
}, 1000 * 60)
|
|
|
|
}, 10000)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
function zOnClick(event, treeId, treeNode) {
|
|
|
|
@ -373,10 +374,26 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}, 5000 * 1000)
|
|
|
|
}, 10000)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 兼容后端逗号分隔参数:将选中的树节点ID拼成 "id1,id2,id3"
|
|
|
|
|
|
|
|
function getCheckedSensorIds() {
|
|
|
|
|
|
|
|
var treeObj = $.fn.zTree.getZTreeObj("tree");
|
|
|
|
|
|
|
|
if (!treeObj) {
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var checkedNode = treeObj.getCheckedNodes(true);
|
|
|
|
|
|
|
|
var ids = [];
|
|
|
|
|
|
|
|
checkedNode.forEach(function (node) {
|
|
|
|
|
|
|
|
if (node && node.id !== undefined && node.id !== null && node.id !== "") {
|
|
|
|
|
|
|
|
ids.push(node.id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return ids.join(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
|