Commit 2fdf9631 by 杨琪琪

ocr调用统计:均添加定时调用

parent bf499339
......@@ -176,6 +176,8 @@
var currDate = new Date().strftime('%d');
var monitorInterval = null;
var brokenLineInterval = null;
var courtCallInterval = null;
var tableInterval = null;
var datazoom_start_n = 0;
var datazoom_end_n = 100;
var datazoom_broken_start_n = 0;
......@@ -197,11 +199,7 @@
initChart('court-bar', 'Xbar', 'courtBarChart');
initChart('ocr-hardware-chart', 'Ybar', 'hardwareBarChart')
getCourtUseSum();
getCourtUseInYear();
getCourtUseInMonth();
getCourtUseInDay();
callInterval();
// 表单初始赋值
form.val('areaForm', {
isRegion: true,
......@@ -273,7 +271,6 @@
restartBrokenLineInterval();
});
getBrokenLineData();
restartBrokenLineInterval();
getServerMonitoring(true);
monitorInterval = setInterval(function () {
......@@ -337,6 +334,15 @@
}
})
// table定时,重新渲染
function refreshTable() {
tableInterval = setInterval(function () {
table.reloadData('callTable');
}, 2000)
}
refreshTable();
// 窗口大小变化监听
$(window).resize(function () {
resizeText(); // 调整字体大小
......@@ -823,6 +829,19 @@
hardwareBarChart.setOption(option);
}
function callInterval() {
getCourtUseSum();
getCourtUseInYear();
getCourtUseInMonth();
getCourtUseInDay();
courtCallInterval = setInterval(function () {
getCourtUseSum();
getCourtUseInYear();
getCourtUseInMonth();
getCourtUseInDay();
}, 5000)
}
// 页面即将销毁
$(window).on('beforeunload', function () {
if (monitorInterval) {
......@@ -831,6 +850,12 @@
if (brokenLineInterval) {
clearInterval(brokenLineInterval)
}
if (courtCallInterval) {
clearInterval(courtCallInterval)
}
if (tableInterval) {
clearInterval(tableInterval)
}
window.removeEventListener('resize', function () {
if (timeLineChart && timeLineChart.resize) {
timeLineChart.resize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment