diff --git a/ruoyi-admin/src/main/resources/templates/system/Monitor/TempMonitor.html b/ruoyi-admin/src/main/resources/templates/system/Monitor/TempMonitor.html index 644f7c0..94b98ca 100644 --- a/ruoyi-admin/src/main/resources/templates/system/Monitor/TempMonitor.html +++ b/ruoyi-admin/src/main/resources/templates/system/Monitor/TempMonitor.html @@ -107,8 +107,7 @@ { field: 'monitorAddr', title: '测控点位置', - align: 'left', - width: '20%' + align: 'left' }, { field: 'collectDeviceId', 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 4f16db3..039fdd9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html @@ -156,6 +156,7 @@ { name: 'Pressure', type: 'gauge', + animation: false, detail: { formatter: '{value}', offsetCenter: [0, '20%'], @@ -177,6 +178,7 @@ { name: 'Pressure', type: 'gauge', + animation: false, detail: { fontSize: 20, formatter: '{value}' @@ -242,6 +244,7 @@ { name: 'Pressure', type: 'gauge', + animation: false, detail: { formatter: '{value}', offsetCenter: [0, '20%'], @@ -263,6 +266,7 @@ { name: 'Pressure', type: 'gauge', + animation: false, detail: { fontSize: 20, formatter: '{value}' diff --git a/ruoyi-admin/src/main/resources/templates/system/TempertureData/TempertureReport.html b/ruoyi-admin/src/main/resources/templates/system/TempertureData/TempertureReport.html index fecbb13..1297d65 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TempertureData/TempertureReport.html +++ b/ruoyi-admin/src/main/resources/templates/system/TempertureData/TempertureReport.html @@ -126,6 +126,7 @@ var tempInfo = ''; for (var i = 0; i < tempData.length; i++) { tempInfo += '
'; + /* tempInfo += '
';*/ /*info += '
'+tempData[i].name+'
' border: solid 1px greenyellow;padding: 10px 10px;;*/ } $("#tempDiv").html(tempInfo); @@ -133,9 +134,12 @@ var temperatureMeterChart = echarts.init(document.getElementById(tempData[i].name)); var temperatureMeterOption = { title: { - text: tempData[i].name, + text: tempData[i].name.length > 18 ? tempData[i].name.substring(0, 15) + '\n' + tempData[i].name.substring(15) : tempData[i].name, subtext: tempData[i].refushTime, - left: 'center' + left: 'center', + textStyle: { + fontSize: 14 // 调小主标题字体大小 + } }, tooltip: { formatter: '{a}
{b} : {c}%' @@ -147,6 +151,10 @@ type: 'gauge', detail: {formatter: '{value}℃', fontSize: 16}, showSymbol: false, + animation: false, // 关闭动画 + // radius: '60%', + // startAngle: 180, // 仪表盘起始角度(默认 225) + // endAngle: 0, // 仪表盘结束角度(默认 -45) data: [{value: tempData[i].value}] } ] @@ -166,14 +174,22 @@ $("#monitorId").val(treeNode.id); var treeObj = $.fn.zTree.getZTreeObj("tree"); var checkedNode = treeObj.getCheckedNodes(); - monitorId.splice(0, monitorId.length) + monitorId.splice(0, monitorId.length); checkedNode.forEach(function (e) { monitorId.push(e.id); }); console.log("选择测控点:" + monitorId); monitorInfo = monitorId; - refreshInterval = window.setInterval(meterChart(), 3000); + // 先清除之前的定时器,避免重复创建 + if (refreshInterval) { + window.clearInterval(refreshInterval); + } + meterChart(); + // 正确方式:传递函数引用(而不是调用结果) + refreshInterval = window.setInterval(function() { + meterChart(); + }, 5000); $.table.search(); }