diff --git a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html index dcdaebc..4f16db3 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html @@ -116,6 +116,7 @@ queryDeptTree(); }); + let time1 = null function queryDeptTree() { var url = ctx + "system/Monitor/treeData?monitorType=" + 20; @@ -127,7 +128,6 @@ $.tree.init(options); function zOnClick(event, treeId, treeNode) { - console.log(treeNode) $.post(ctx + 'system/TVibrationsensorData/realTimeMonitor', {sensorId: treeNode.id}, (e) => { if (e.code === 0) { let data = e.data || [] @@ -207,6 +207,93 @@ }) } }) + + if(time1){ + clearInterval(time1) + time1 = null + } + + time1 = setInterval(()=>{ + $.post(ctx + 'system/TVibrationsensorData/realTimeMonitor', {sensorId: treeNode.id}, (e) => { + if (e.code === 0) { + let data = e.data || [] + $("#chartDivs").html('') + data.forEach((v, k) => { + let html = ` +