From 5f41a111e9d5d604afe49b85b594a13bb6c40737 Mon Sep 17 00:00:00 2001 From: wenjy Date: Thu, 24 Mar 2022 16:48:18 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=AE=BE=E5=A4=87=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E5=AD=97=E4=BD=93=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../static/js/Iot-ui/deviceMonitor.js | 26 +++++++++---------- .../templates/section/transformer-detail.html | 3 ++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d338a92..0c4df2b 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -73,7 +73,7 @@ spring: redis: port: 6379 password: admin123 - host: 121.36.58.109 + host: 127.0.0.1 jedis: pool: max-active: 8 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 e2144f7..d949a7a 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 @@ -47,11 +47,11 @@ const createDeviceModule = function (sensor,params) { let html = '
'; switch (sensor.datatype) { case "temperature": - html += `
${sensor.sensorName}
`; + html += `
${sensor.sensorName}
`; html += '
'; for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + html += `
${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; } html += '
'; html += '
'; @@ -64,16 +64,16 @@ const createDeviceModule = function (sensor,params) { case "image": html += '
'; - html += `
${sensor.sensorName}  ${sensor['sensorStatus'] == null ? "-" : sensorStatus(sensor['sensorStatus'])}
` + html += `
${sensor.sensorName}  ${sensor['sensorStatus'] == null ? "-" : sensorStatus(sensor['sensorStatus'])}
` html += '
'; let imgurl = sensor.imgstr.replace("D:/ruoyi/uploadPath","/profile"); html += '' html += '
' html += '
'; - html += `

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

`; + html += `

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

`; for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}

`; + html += `

${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}

`; } } html += '
'; @@ -85,11 +85,11 @@ const createDeviceModule = function (sensor,params) { break; case "smoke": - html += `
${sensor.sensorName}
`; + html += `
${sensor.sensorName}
`; html += '
'; for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + html += `
${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; } html += '
'; html += '
'; @@ -102,11 +102,11 @@ const createDeviceModule = function (sensor,params) { break; case "platen": - html += `
${sensor.sensorName}
`; + html += `
${sensor.sensorName}
`; html += '
'; for (let i=0; i${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; + html += `
${params[i].paramText+":"+(sensor[params[i].paramTitle] == null ? "-" : sensor[params[i].paramTitle])}
`; } html += '
'; html += '
'; @@ -136,16 +136,16 @@ const sensorStatus = function (status) { let result = "-"; switch (status) { case 0: - result = `在线`; + result = `在线`; break; case 1: - result = `离线`; + result = `离线`; break; case 2: - result = `告警`; + result = `告警`; break; default: - result = `异常`; + result = `异常`; break; } return result; diff --git a/ruoyi-admin/src/main/resources/templates/section/transformer-detail.html b/ruoyi-admin/src/main/resources/templates/section/transformer-detail.html index 846cc88..11ebfb4 100644 --- a/ruoyi-admin/src/main/resources/templates/section/transformer-detail.html +++ b/ruoyi-admin/src/main/resources/templates/section/transformer-detail.html @@ -364,7 +364,7 @@ left: 16.2%; border: 0px solid red; color: #00f9ff; - padding: 1em 0.5em 1em 1.5em; + padding: 1em 0.5em 1em 2.5em; align-items: flex-start; justify-content: space-around; flex-wrap: nowrap; @@ -372,6 +372,7 @@ align-content: stretch; overflow-x: hidden; overflow-y: auto; + font-size:1.5rem; } div::-webkit-scrollbar {