From 68704a67b6ed449616eb015da649b182a95d3e3b Mon Sep 17 00:00:00 2001 From: wenjy Date: Wed, 6 Apr 2022 16:39:20 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=91=8A=E8=AD=A6=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E3=80=81=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E4=BF=A1=E6=81=AF=E7=82=B9=E5=87=BB=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/Iot-ui/deviceMonitor.js | 16 +++++++-- .../templates/section/substation.html | 36 +++++++++++++++++-- .../templates/section/transformer-detail.html | 1 + 3 files changed, 47 insertions(+), 6 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 d1a11b4..4ee61e7 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,12 +63,12 @@ const createDeviceModule = function (sensor,params) { break; case "image": - html += '
'; + html += '
'; /*  ${sensor['sensorStatus'] == null ? "-" : sensorStatus(sensor['sensorStatus'])}*/ html += `
${sensor.sensorName}
` html += '
'; let imgurl = sensor.imgstr.replace("D:/ruoyi/uploadPath","/profile"); - html += '' + html += '' html += '
' html += '
'; html += `

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

`; @@ -124,7 +124,17 @@ const createDeviceModule = function (sensor,params) { } const imgOnclick = function (com) { - /*$("#imgWindow").append(com)*/ + Dialog({ + title: '图像详情', + width: 600, + imageContent: { + src: com.src, + height: 480 + }, + showButton: false, + showTitle: true, + maskClose: true + }); } const collectTime = function (time){ diff --git a/ruoyi-admin/src/main/resources/templates/section/substation.html b/ruoyi-admin/src/main/resources/templates/section/substation.html index bccf0cc..d90a2ba 100644 --- a/ruoyi-admin/src/main/resources/templates/section/substation.html +++ b/ruoyi-admin/src/main/resources/templates/section/substation.html @@ -307,7 +307,7 @@ width: ['10%', '10%', '10%', '30%', '10%', '10%', '10%'], }) - //获取告警信息 + //获取告警单元模块信息 const alarmInfo = function () { $.ajax({ url: "/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"), @@ -316,7 +316,7 @@ success: (res) => { console.log("告警信息:" + res); - alertList.loadData(res.map(value => [value.alarmModuleId.substring(0, 2) + "...", value.alarmModuleText, value.sensorLocation, `${"无线检测 相对检测值为:" + value.minValue + "-" + value.maxValue + ",其值为:" + value.alarmValue}`, "超限", value.collectTime, `${value.disposeFlag == 1 ? '' : ''}`]), Object.keys(alertListColumns)) + alertList.loadData(res.map(value => [value.alarmModuleId.substring(0, 2) + "...", value.alarmModuleText, value.sensorLocation, `${"无线检测 相对检测值为:" + value.minValue + "-" + value.maxValue + ",其值为:" + value.alarmValue}`, "超限", value.collectTime, `${value.disposeFlag == 1 ? '' : ''}`]), Object.keys(alertListColumns)) }, error: () => { @@ -341,6 +341,37 @@ }) } + const disposeInfo = function (res) { + $.getJSON('/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) { + let html = `
+

+ +

+

+ +

+

+ + +

+

+ + +

+
` + + Dialog({ + title: "处理详情", + width: 600, + content: html, + ok: { + callback: function () { + } + } + }); + }) + } + const alarmDisposeInfo = function (res) { let html = `

@@ -384,7 +415,6 @@ } }); } - +