...
|
...
|
@@ -27,10 +27,10 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function |
|
|
}
|
|
|
});
|
|
|
|
|
|
// //按钮搜索
|
|
|
// $('#heartbeatQueryBtn').unbind().on('click',function (e) {
|
|
|
// reloadTable();
|
|
|
// })
|
|
|
//按钮搜索
|
|
|
$('#heartbeatQueryBtn').unbind().on('click',function (e) {
|
|
|
reloadTable();
|
|
|
})
|
|
|
|
|
|
|
|
|
// 渲染表格
|
...
|
...
|
@@ -63,10 +63,12 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function |
|
|
}, {
|
|
|
field: 'currTime', title: '最近心跳时间', align: 'center',sort: true,
|
|
|
templet: function (d) {
|
|
|
var durationVal = $('[name="durationVal"]').val();
|
|
|
if(!durationVal || durationVal == '' || durationVal == null){
|
|
|
durationVal = 10;
|
|
|
}
|
|
|
var beatTime = new Date(d.currTime);
|
|
|
var time = new Date();
|
|
|
time.setMinutes(time.getMinutes() - 10);
|
|
|
if (time > beatTime) {
|
|
|
if (d.between > parseInt(durationVal)) {
|
|
|
return `<div class="red">${beatTime.format("yyyy-MM-dd HH:mm:ss")}</div>`
|
|
|
} else {
|
|
|
return `<div>${beatTime.format("yyyy-MM-dd HH:mm:ss")}</div>`
|
...
|
...
|
@@ -85,7 +87,7 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function |
|
|
heartbeatTable.reload({
|
|
|
where: {
|
|
|
access_token: accessToken,
|
|
|
keyword: $('#condition-heartbeat-name').val(),
|
|
|
keyword: $('#condition-heartbeat-name').val()
|
|
|
},
|
|
|
page: {
|
|
|
curr: 1
|
...
|
...
|
@@ -93,4 +95,4 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function |
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
}); |
...
|
...
|
|