diff --git a/ruoyi-admin/src/main/resources/static/img/card.png b/ruoyi-admin/src/main/resources/static/img/card.png new file mode 100644 index 0000000..06ecbf9 Binary files /dev/null and b/ruoyi-admin/src/main/resources/static/img/card.png differ diff --git a/ruoyi-admin/src/main/resources/static/img/dg.png b/ruoyi-admin/src/main/resources/static/img/dg.png new file mode 100644 index 0000000..7de912f Binary files /dev/null and b/ruoyi-admin/src/main/resources/static/img/dg.png differ diff --git a/ruoyi-admin/src/main/resources/static/img/dj.png b/ruoyi-admin/src/main/resources/static/img/dj.png new file mode 100644 index 0000000..71ebf20 Binary files /dev/null and b/ruoyi-admin/src/main/resources/static/img/dj.png differ 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 e489f1c..9db06ed 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html +++ b/ruoyi-admin/src/main/resources/templates/system/TVibrationsensorData/RealTimeMonitor.html @@ -8,10 +8,50 @@ @@ -134,6 +214,10 @@ let time1 = null + function formatValue(value) { + return (value === null || value === undefined || value === "") ? "-" : value; + } + function queryDeptTree() { var url = ctx + "system/Monitor/treeData?monitorType=" + 20; var options = { @@ -160,14 +244,20 @@ data.forEach((v, k) => { var isOver = (v.isThreshold === 1 || v.isThreshold === '1'); var redStyle = isOver ? 'color:#d9534f;font-weight:700;' : ''; + var cardImg = ctx + "img/card.png"; + var sensorImg = ctx + "img/dj.png"; let html = ` -
-
${v.monitorName}
-
${v.collectTime}
- -
速度:${v.speed}mm/s
-
位移:${v.displacement}um
-
温度:${v.temperature}℃
+
+
${formatValue(v.monitorName)}
+
+
振动传感器
+
+
${formatValue(v.collectTime)}
+
速度:${formatValue(v.speed)}mm/s
+
位移:${formatValue(v.displacement)}um
+
温度:${formatValue(v.temperature)}℃
+
+
` $("#chartDivs").append(html) diff --git a/ruoyi-admin/src/main/resources/templates/system/TempertureData/DistributionCabinetMonitor.html b/ruoyi-admin/src/main/resources/templates/system/TempertureData/DistributionCabinetMonitor.html index f7d748f..476f176 100644 --- a/ruoyi-admin/src/main/resources/templates/system/TempertureData/DistributionCabinetMonitor.html +++ b/ruoyi-admin/src/main/resources/templates/system/TempertureData/DistributionCabinetMonitor.html @@ -8,10 +8,50 @@ @@ -138,13 +218,20 @@ function renderMonitorCards(data) { $("#chartDivs").html(""); data.forEach(function (v) { + var cardImg = ctx + "img/card.png"; + var cabinetImg = ctx + "img/dg.png"; var html = "" - + "
" - + "
" + (v.monitorName || v.monitorId || "-") + "
" - + "
" + formatValue(v.collectTime) + "
" - + "
最低温度(湿度):" + formatValue(v.humidity) + "%RH
" - + "
最高温度(照度):" + formatValue(v.illuminance) + "
" - + "
平均温度(温度):" + formatValue(v.tempreture) + "℃
" + + "
" + + "
" + (v.monitorName || v.monitorId || "-") + "
" + + "
" + + "
\"配电柜\"
" + + "
" + + "
" + formatValue(v.collectTime) + "
" + + "
最低温度:" + formatValue(v.humidity) + "℃
" + + "
最高温度:" + formatValue(v.illuminance) + "℃
" + + "
平均温度:" + formatValue(v.tempreture) + "℃
" + + "
" + + "
" + "
"; $("#chartDivs").append(html); }); @@ -185,6 +272,7 @@ time1 = setInterval(intervalFun, 10000); } } + function getCheckedMonitorIds() { var treeObj = $.fn.zTree.getZTreeObj("tree"); if (!treeObj) {