|
|
@ -4,8 +4,7 @@
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
<title>智慧场景</title>
|
|
|
|
<th:block th:include="include :: header('智慧场景')"/>
|
|
|
|
|
|
|
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
|
|
|
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
|
|
|
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
|
|
|
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
|
|
@ -200,6 +199,16 @@
|
|
|
|
table td {
|
|
|
|
table td {
|
|
|
|
padding: 2%
|
|
|
|
padding: 2%
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.text-success {
|
|
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
border-style: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.text-danger {
|
|
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
border-style: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<script th:src="@{/js/jquery.min.js}"></script>
|
|
|
|
<script th:src="@{/js/jquery.min.js}"></script>
|
|
|
@ -209,8 +218,8 @@
|
|
|
|
<script th:src="@{/js/auto-update.js}"></script>
|
|
|
|
<script th:src="@{/js/auto-update.js}"></script>
|
|
|
|
<script th:src="@{/js/font-adjust.js}"></script>
|
|
|
|
<script th:src="@{/js/font-adjust.js}"></script>
|
|
|
|
<script th:src="@{/js/MyPage.js}"></script>
|
|
|
|
<script th:src="@{/js/MyPage.js}"></script>
|
|
|
|
<th:block th:include="include :: echarts-js"/>
|
|
|
|
|
|
|
|
<script th:inline="javascript"></script>
|
|
|
|
<script th:inline="javascript"></script>
|
|
|
|
|
|
|
|
<script th:src="@{/js/Iot-ui/MiniDialog-es5.min.js}"></script>
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body class="body-substation-1">
|
|
|
|
<body class="body-substation-1">
|
|
|
|
<div class="display-text-1" id="transformer"><span id="unitAmount">78</span></br><span
|
|
|
|
<div class="display-text-1" id="transformer"><span id="unitAmount">78</span></br><span
|
|
|
@ -293,33 +302,32 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//获取监控单元模块
|
|
|
|
//获取监控单元模块
|
|
|
|
const alertListColumns = [ '告警编号', '告警单元', '告警位置', '告警信息', '类型', '告警时间', '处理情况']
|
|
|
|
const alertListColumns = ['告警编号', '告警单元', '告警位置', '告警信息', '类型', '告警时间', '处理情况']
|
|
|
|
const alertList = new AutoScrollTable(document.getElementById("alert-list"), alertListColumns, {
|
|
|
|
const alertList = new AutoScrollTable(document.getElementById("alert-list"), alertListColumns, {
|
|
|
|
width: ['10%', '10%', '10%', '30%', '10%', '10%', '10%'],
|
|
|
|
width: ['10%', '10%', '10%', '30%', '10%', '10%', '10%'],
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
//获取告警信息
|
|
|
|
//获取告警信息
|
|
|
|
$(() => {
|
|
|
|
const alarmInfo = function () {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"),
|
|
|
|
url: "/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"),
|
|
|
|
type: "get",
|
|
|
|
type: "get",
|
|
|
|
dataType: 'JSON',
|
|
|
|
dataType: 'JSON',
|
|
|
|
success: (res) => {
|
|
|
|
success: (res) => {
|
|
|
|
console.log("告警信息:"+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?'<a class="text-success">已处理</a>':'<a onclick="alarmDispose('+value+')" class="text-danger">未处理</a>'}`]), 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 ? '<button class="text-success">已处理</button>' : '<button id="' + value.alarmuid + '" onclick="alarmDispose(this.id)" class="text-danger">未处理</button>'}`]), Object.keys(alertListColumns))
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: () => {
|
|
|
|
error: () => {
|
|
|
|
console.log("失败");
|
|
|
|
console.log("失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function resize() {
|
|
|
|
function resize() {
|
|
|
|
fontAdjust()
|
|
|
|
fontAdjust();
|
|
|
|
alertList.resize()
|
|
|
|
alarmInfo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
window.onresize = resize
|
|
|
|
window.onresize = resize
|
|
|
@ -328,8 +336,55 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const alarmDispose = function (res) {
|
|
|
|
const alarmDispose = function (res) {
|
|
|
|
console.log("ces:"+res);
|
|
|
|
$.getJSON('/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) {
|
|
|
|
|
|
|
|
alarmDisposeInfo(result);
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const alarmDisposeInfo = function (res) {
|
|
|
|
|
|
|
|
let html = `<div>
|
|
|
|
|
|
|
|
<p style="margin-top: 13px;">
|
|
|
|
|
|
|
|
<label>告警编号:${res.alarmuid}</label>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p style="margin-top: 13px;">
|
|
|
|
|
|
|
|
<label>告警信息:${"无线检测相对检测值为:" + res.minValue + "-" + res.maxValue + ",实际值为:" + res.alarmValue}</label>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p style="margin-top: 13px;">
|
|
|
|
|
|
|
|
<label>告警原因</label>
|
|
|
|
|
|
|
|
<input type="text" name="alarmReason" id="alarmReason" style="width: 70%;">
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p style="margin-top: 13px;">
|
|
|
|
|
|
|
|
<label>处理方式</label>
|
|
|
|
|
|
|
|
<input type="text" name="disposeMode" id="disposeMode" style="width: 70%;">
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dialog({
|
|
|
|
|
|
|
|
title: "告警处理",
|
|
|
|
|
|
|
|
width: 600,
|
|
|
|
|
|
|
|
content: html,
|
|
|
|
|
|
|
|
ok: {
|
|
|
|
|
|
|
|
callback: function () {
|
|
|
|
|
|
|
|
let formData = new FormData();
|
|
|
|
|
|
|
|
formData.append("alarmuid", res.alarmuid);
|
|
|
|
|
|
|
|
formData.append("disposeMode", $("#disposeMode").val());
|
|
|
|
|
|
|
|
formData.append("alarmReason", $("#alarmReason").val());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.post("/iot/wisdomScenario/disposeAlarm",
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
alarmuid: res.alarmuid,
|
|
|
|
|
|
|
|
disposeMode: $("#disposeMode").val(),
|
|
|
|
|
|
|
|
alarmReason: $("#alarmReason").val()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
function (data, status) {
|
|
|
|
|
|
|
|
alert(+status.includes("succ") ? "告警处理成功" : "告警处理失败");
|
|
|
|
|
|
|
|
alarmInfo();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
<script type="text/javascript">
|
|
|
@ -372,7 +427,7 @@
|
|
|
|
e += '<span style="border:1px solid red;background-color:#2E2F44;border-radius:5px;margin-left: 5%"> 异常 </span>';
|
|
|
|
e += '<span style="border:1px solid red;background-color:#2E2F44;border-radius:5px;margin-left: 5%"> 异常 </span>';
|
|
|
|
break
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
e += '</div><div style="text-align:center;" onclick="window.location = ' + '\'' + datas[j].unitUrl +'\'"><img src="' + datas[j].monitorunitImage + '" display="inline-block" vertical-align="middle" width="70%" ></div></li>';
|
|
|
|
e += '</div><div style="text-align:center;" onclick="window.location = ' + '\'' + datas[j].unitUrl + '\'"><img src="' + datas[j].monitorunitImage + '" display="inline-block" vertical-align="middle" width="70%" ></div></li>';
|
|
|
|
ul.append(e);
|
|
|
|
ul.append(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else { // 当超过一页时
|
|
|
|
} else { // 当超过一页时
|
|
|
@ -401,12 +456,6 @@
|
|
|
|
console.log("异常:" + e)
|
|
|
|
console.log("异常:" + e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function unitOnclick(e) {
|
|
|
|
|
|
|
|
alert(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//绘制页码
|
|
|
|
//绘制页码
|
|
|
@ -480,5 +529,14 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
|
|
|
.mini-dialog-footer {
|
|
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
height: 34px;
|
|
|
|
|
|
|
|
padding: 1px 0;
|
|
|
|
|
|
|
|
border-top: #e6e6e6 solid 1px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</html>
|