From 2547b628698dcaf6835876c2b237180455125bee Mon Sep 17 00:00:00 2001 From: wenjy Date: Thu, 21 Apr 2022 15:32:02 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=AE=BE=E5=A4=87=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E4=B8=8D=E5=90=8C=E7=B1=BB=E5=9E=8B=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/Iot-ui/deviceMonitor.js | 73 ++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/js/Iot-ui/deviceMonitor.js b/ruoyi-admin/src/main/resources/static/js/Iot-ui/deviceMonitor.js index 43468ed..b9dc4a8 100644 --- a/ruoyi-admin/src/main/resources/static/js/Iot-ui/deviceMonitor.js +++ b/ruoyi-admin/src/main/resources/static/js/Iot-ui/deviceMonitor.js @@ -63,9 +63,23 @@ const createDeviceModule = function (sensor,params) { $("#sensor-card-group").append(html); break; + case "humiture": + html += `
${sensor.sensorName}
`; + + html += '
'; + for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + } + html += ''; + html += '
'; + html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; + html += '
'; + + $("#sensor-card-group").append(html); + break; + case "image": html += '
'; - /*  ${sensor['sensorStatus'] == null ? "-" : sensorStatus(sensor['sensorStatus'])}*/ html += `
${sensor.sensorName}
` html += '
'; let imgurl = sensor.imgstr.replace("D:/ruoyi/uploadPath","/profile"); @@ -95,12 +109,55 @@ const createDeviceModule = function (sensor,params) { } html += '
'; html += '
'; - //html+=`

${sensor['sensorStatus'] == null ? "-" : sensorStatus(sensor['sensorStatus'])}

`; html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; html += '
'; $("#sensor-card-group").append(html); break; + + case "doormagnetic": + html += `
${sensor.sensorName}
`; + + html += '
'; + for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + } + html += '
'; + html += '
'; + html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; + html += '
'; + + $("#sensor-card-group").append(html); + break; + + case "vibration": + html += `
${sensor.sensorName}
`; + + html += '
'; + for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + } + html += ''; + html += '
'; + html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; + html += '
'; + + $("#sensor-card-group").append(html); + break; + + case "waterlogging": + html += `
${sensor.sensorName}
`; + + html += '
'; + for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + } + html += ''; + html += '
'; + html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; + html += '
'; + + $("#sensor-card-group").append(html); break; case "platen": @@ -120,6 +177,18 @@ const createDeviceModule = function (sensor,params) { break; default: + html += `
${sensor.sensorName}
`; + + html += '
'; + for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + } + html += ''; + html += '
'; + html+=`

${sensor['collectTime'] == null ? "-" : collectTime(sensor['collectTime'])}

`; + html += '
'; + + $("#sensor-card-group").append(html); break; } }