Commit 2fdf9631 by 杨琪琪

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

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