|
|
@ -119,6 +119,57 @@
|
|
|
|
left: 43.1%;
|
|
|
|
left: 43.1%;
|
|
|
|
color: #e9fe01;
|
|
|
|
color: #e9fe01;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#alert-list {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 71%;
|
|
|
|
|
|
|
|
left: 3%;
|
|
|
|
|
|
|
|
width: 48%;
|
|
|
|
|
|
|
|
height: 25%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#alert-list td, #alert-list th {
|
|
|
|
|
|
|
|
padding: 0.4% 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#monitor-tabs {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 5.6%;
|
|
|
|
|
|
|
|
left: 55%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#transformer-card-group {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 13%;
|
|
|
|
|
|
|
|
left: 54.5%;
|
|
|
|
|
|
|
|
width: 44%;
|
|
|
|
|
|
|
|
height: 81%;
|
|
|
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#transformer-card-group::-webkit-scrollbar {
|
|
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#transformer-card-group .card {
|
|
|
|
|
|
|
|
width: 49%;
|
|
|
|
|
|
|
|
height: 48%;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
margin-bottom: 0.3rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#transformer-card-group .card .card-body {
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
height: 13.3rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#transformer-card-group .card img {
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
/*width: 100%;*/
|
|
|
|
|
|
|
|
height: 12rem;
|
|
|
|
|
|
|
|
left: 17%;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<script th:src="@{/js/jquery.min.js}"></script>
|
|
|
|
<script th:src="@{/js/jquery.min.js}"></script>
|
|
|
@ -150,12 +201,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div id="alert-list"></div>
|
|
|
|
<div id="alert-list"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="monitor-tabs"></div>
|
|
|
|
<div id="monitor-tabs" class="btn-group">
|
|
|
|
|
|
|
|
<button class="btn transformer-btn active" id="btn_all-transformers">全部</button>
|
|
|
|
|
|
|
|
<button class="btn transformer-btn" id="btn_transformer1">变压器1</button>
|
|
|
|
|
|
|
|
<button class="btn transformer-btn" id="btn_transformer2">变压器2</button>
|
|
|
|
|
|
|
|
<button class="btn transformer-btn" id="btn_transformer3">变压器3</button>
|
|
|
|
|
|
|
|
<button class="btn transformer-btn" id="btn_transformer4">变压器4</button>
|
|
|
|
|
|
|
|
<button class="btn transformer-btn" id="btn_transformer5">变压器5</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<iframe id="monitor-display-frame"></iframe>
|
|
|
|
<div id="transformer-card-group"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
const transformerCardGroup = document.getElementById("transformer-card-group")
|
|
|
|
|
|
|
|
function loadTransformerList(data) {
|
|
|
|
|
|
|
|
for (let entry of Object.entries(data)) {
|
|
|
|
|
|
|
|
let html = ''
|
|
|
|
|
|
|
|
html += `
|
|
|
|
|
|
|
|
<div class="card" id="transformer-card${entry[0]}">
|
|
|
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
|
|
|
<span class="card-title">${entry[1].name}</span>`
|
|
|
|
|
|
|
|
switch (entry[1].status) {
|
|
|
|
|
|
|
|
case '正常':
|
|
|
|
|
|
|
|
html += `<span class="badge bg-success status-badge">正常</span>`
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
case '异常':
|
|
|
|
|
|
|
|
html += `<span class="badge bg-danger status-badge">异常</span>`
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
html += `<span class="badge bg-light status-badge">未知</span>`
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html += `
|
|
|
|
|
|
|
|
<span class="badge bg-danger status-badge">异常</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<img src="/img/transformer.png" alt="变压器" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>`
|
|
|
|
|
|
|
|
transformerCardGroup.innerHTML += html
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const alertListColumns = ['序号', '告警信息', '类型', '告警时间', '处理情况']
|
|
|
|
|
|
|
|
const alertList = new AutoScrollTable(document.getElementById("alert-list"), alertListColumns, {
|
|
|
|
|
|
|
|
width: ['10%', '50%', '10%', '20%', '10%'],
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alertList.loadData([
|
|
|
|
|
|
|
|
['01', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-success">已处理</span>'],
|
|
|
|
|
|
|
|
['02', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-danger">未处理</span>'],
|
|
|
|
|
|
|
|
['03', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-success">已处理</span>'],
|
|
|
|
|
|
|
|
['04', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-danger">未处理</span>'],
|
|
|
|
|
|
|
|
['05', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-success">已处理</span>'],
|
|
|
|
|
|
|
|
['06', '无线检测 相对检测值为10°-20°,其值为21°-25°', '越限', '2021.01.01 10:00:00', '<span class="text-success">已处理</span>'],
|
|
|
|
|
|
|
|
], Object.keys(alertListColumns))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(() => {
|
|
|
|
|
|
|
|
loadTransformerList([
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '变压器1',
|
|
|
|
|
|
|
|
status: '正常',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '变压器2',
|
|
|
|
|
|
|
|
status: '异常',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '变压器3',
|
|
|
|
|
|
|
|
status: '正常',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: '变压器4',
|
|
|
|
|
|
|
|
status: '正常',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function resize() {
|
|
|
|
|
|
|
|
fontAdjust()
|
|
|
|
|
|
|
|
alertList.resize()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.onresize = resize
|
|
|
|
|
|
|
|
$(() => {
|
|
|
|
|
|
|
|
resize()
|
|
|
|
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
</html>
|