|
|
@ -416,12 +416,12 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sensor-Text" id="sensor-text">
|
|
|
|
<div class="sensor-Text" id="sensor-text">
|
|
|
|
<p>设备编号:<span>10kv 主变压器001</span></p>
|
|
|
|
<!--<p>设备编号:<span>10kv 主变压器001</span></p>
|
|
|
|
<p>设备型号:<span>SC(B)10型干式电力变压器</span></p>
|
|
|
|
<p>设备型号:<span>SC(B)10型干式电力变压器</span></p>
|
|
|
|
<p>启用时间:<span>2020年1月20日</span></p>
|
|
|
|
<p>启用时间:<span>2020年1月20日</span></p>
|
|
|
|
<p>所属变电站:<span>新疆某某变电站</span></p>
|
|
|
|
<p>所属变电站:<span>新疆某某变电站</span></p>
|
|
|
|
<p>测试参数-1:<span>xxxxx</span></p>
|
|
|
|
<p>测试参数-1:<span>xxxxx</span></p>
|
|
|
|
<p>测试参数-2:<span>xxxxx</span></p>
|
|
|
|
<p>测试参数-2:<span>xxxxx</span></p>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -469,7 +469,7 @@
|
|
|
|
multiSelect: $('#chk-select-multi').is(':checked'),
|
|
|
|
multiSelect: $('#chk-select-multi').is(':checked'),
|
|
|
|
onNodeSelected: function (event, node) {
|
|
|
|
onNodeSelected: function (event, node) {
|
|
|
|
$('#selectable-output').prepend('<p>' + node.text + ' was selected</p>');
|
|
|
|
$('#selectable-output').prepend('<p>' + node.text + ' was selected</p>');
|
|
|
|
if(node.nodeId > 0){
|
|
|
|
if (node.nodeId > 0) {
|
|
|
|
monitorUnitModule(node.href);
|
|
|
|
monitorUnitModule(node.href);
|
|
|
|
sensorCollectionRefresh(node.href);
|
|
|
|
sensorCollectionRefresh(node.href);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -500,10 +500,10 @@
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(() => {
|
|
|
|
$(() => {
|
|
|
|
let unitId = getParams("id");
|
|
|
|
let unitId = getParams("id");
|
|
|
|
if( unitId != null) {
|
|
|
|
if (unitId != null) {
|
|
|
|
monitorUnitModule(unitId)
|
|
|
|
monitorUnitModule(unitId)
|
|
|
|
sensorCollectionRefresh(unitId);
|
|
|
|
sensorCollectionRefresh(unitId);
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "/iot/deviceMonitor/getFirstMonitorUnit",
|
|
|
|
url: "/iot/deviceMonitor/getFirstMonitorUnit",
|
|
|
|
type: "get",
|
|
|
|
type: "get",
|
|
|
@ -523,15 +523,19 @@
|
|
|
|
type: "get",
|
|
|
|
type: "get",
|
|
|
|
dataType: 'JSON',
|
|
|
|
dataType: 'JSON',
|
|
|
|
success: (res) => {
|
|
|
|
success: (res) => {
|
|
|
|
|
|
|
|
console.log("监控单元信息:" + res[0].deviceParams)
|
|
|
|
$('#transformer-model').html("");
|
|
|
|
$('#transformer-model').html("");
|
|
|
|
let e = '<img src="' + res[0].monitorunitImage + '" >';
|
|
|
|
let e = '<img src="' + res[0].monitorunitImage + '" >';
|
|
|
|
$("#transformer-model").append(e);
|
|
|
|
$("#transformer-model").append(e);
|
|
|
|
|
|
|
|
|
|
|
|
$('#sensor-text').html("");
|
|
|
|
$('#sensor-text').html("");
|
|
|
|
let html = '<p>设备编号:<span>' + res[0].monitorunitName + '</span></p>\n' +
|
|
|
|
let html = '<p>设备编号:<span>' + res[0].monitorunitName + '</span></p>';
|
|
|
|
' <p>设备型号:<span>' + res[0].monitorunitName + '</span></p>\n' +
|
|
|
|
if(res[0].deviceParams.length > 0){
|
|
|
|
' <p>启用时间:<span>' + formatter(res[0].createTime, "yyyy-MM-dd") + '</span></p>\n' +
|
|
|
|
res[0].deviceParams.map(x => {
|
|
|
|
' <p>所属变电站:<span>' + res[0].substationName + '</span></p>';
|
|
|
|
html += '<p>' + x.paramTitle + ':<span>' + x.paramValue + '</span></p>';
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
html += ' <p>所属变电站:<span>' + res[0].substationName + '</span></p>';
|
|
|
|
$("#sensor-text").append(html);
|
|
|
|
$("#sensor-text").append(html);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: () => {
|
|
|
|
error: () => {
|
|
|
@ -585,10 +589,10 @@
|
|
|
|
console.log(result);
|
|
|
|
console.log(result);
|
|
|
|
switch (result.type) {
|
|
|
|
switch (result.type) {
|
|
|
|
case "CMD_REPORTDATA":
|
|
|
|
case "CMD_REPORTDATA":
|
|
|
|
reportData(result);
|
|
|
|
reportData(result);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "CMD_SENSORSTATUS":
|
|
|
|
case "CMD_SENSORSTATUS":
|
|
|
|
reportStatus(result);
|
|
|
|
reportStatus(result);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -634,7 +638,7 @@
|
|
|
|
document.getElementById(result.sensorId + "collectTime").innerHTML = result['collectTime'] == null ? "-" : collectTime(result['collectTime']);
|
|
|
|
document.getElementById(result.sensorId + "collectTime").innerHTML = result['collectTime'] == null ? "-" : collectTime(result['collectTime']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//上报设备状态
|
|
|
|
//上报设备状态
|
|
|
|
const reportStatus = function(result) {
|
|
|
|
const reportStatus = function (result) {
|
|
|
|
document.getElementById(result.sensorId + "sensorStatus").innerHTML = result['sensorStatus'] == null ? "-" : sensorStatus(result['sensorStatus']);
|
|
|
|
document.getElementById(result.sensorId + "sensorStatus").innerHTML = result['sensorStatus'] == null ? "-" : sensorStatus(result['sensorStatus']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|