From 4e9b0e6b045536b1361946978ed49efcfeffb180 Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期三, 09 一月 2019 16:50:59 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
---
gx_tieta/WebRoot/Top.jsp | 90 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 88 insertions(+), 2 deletions(-)
diff --git a/gx_tieta/WebRoot/Top.jsp b/gx_tieta/WebRoot/Top.jsp
index d0863f8..172f767 100644
--- a/gx_tieta/WebRoot/Top.jsp
+++ b/gx_tieta/WebRoot/Top.jsp
@@ -196,6 +196,35 @@
</div>
</div>
</body>
+ <script type="text/javascript">
+ // 妫�娴嬮〉闈㈡槸鍚﹁璁块棶
+ var pageIsVisit = false;
+ ;(function($) {
+ // 闅愯棌鐨勫師鍨�
+ var hiddenProperty = 'hidden' in document ? 'hidden' :
+ 'webkitHidden' in document ? 'webkitHidden' :
+ 'mozHidden' in document ? 'mozHidden' :
+ null;
+
+ // 椤甸潰鍒濆鍖�
+ if (!document[hiddenProperty]) {
+ pageIsVisit = true;
+ }else{
+ pageIsVisit = false;
+ }
+
+
+ var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
+ var onVisibilityChange = function(){
+ if (!document[hiddenProperty]) {
+ pageIsVisit = true;
+ }else{
+ pageIsVisit = false;
+ }
+ }
+ document.addEventListener(visibilityChangeEvent, onVisibilityChange);
+ })(jQuery);
+ </script>
<script src="pages/js/base.js"></script>
<script src="pages/js/common.js"></script>
<script src="js/dev.js"></script>
@@ -243,6 +272,13 @@
//鏌ヨ钀藉悗鍗曚綋鎬绘暟
function searchlowmon(){
+
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchlowmon, 5000);
+ return;
+ }
+
$.ajax({
type: "post",
url: "BadBatt_monAction!searchNums",
@@ -263,6 +299,12 @@
//鏌ヨ鏈烘埧鍋滅數鎬绘暟
function searchpoweroffOld(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchpoweroffOld, 5000);
+ return;
+ }
+
$.ajax({
type: "post",
url: "BattPower_offAction!serchPowerOff",
@@ -283,6 +325,11 @@
//鏌ヨ鏈烘埧鍋滅數鎬绘暟
function searchpoweroff(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchpoweroff, 5000);
+ return;
+ }
$.ajax({
type: "post",
url: "Bts_station_stateAction_action_serchByState",
@@ -303,6 +350,11 @@
//鏌ヨ璁惧鍛婅鎬绘暟
function searchdevalarm(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchdevalarm, 5000);
+ return;
+ }
$.ajax({
type: "post",
url: "Batt_devalarm_dataAction!searchNums",
@@ -323,6 +375,11 @@
//鏌ヨ鏀剧數璁″垝寤惰繜鎬绘暟
function searchnotcomplan(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchnotcomplan, 5000);
+ return;
+ }
$.ajax({
type: "post",
url: "BattDischarge_planAction!searchNums",
@@ -343,6 +400,11 @@
// 鏈烘埧缁埅涓嶈冻涓暟
function searchWeakHome() {
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchWeakHome, 5000);
+ return;
+ }
$.ajax({
type: 'post'
,async: true
@@ -361,6 +423,11 @@
// 鏌ヨ鎵�鏈夌殑璁惧鏁�
searchAllDevNum();
function searchAllDevNum() {
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchAllDevNum, 5000);
+ return;
+ }
$.ajax({
type: 'post'
,async: true
@@ -384,6 +451,11 @@
// 鏌ヨ鎵�鏈夌殑鐢垫睜缁勬暟
searchAllEleGroupNum();
function searchAllEleGroupNum() {
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchAllEleGroupNum, 5000);
+ return;
+ }
$.ajax({
type: 'post'
,async: true
@@ -554,6 +626,11 @@
* 瀹炴椂鏌ヨ鍛婅淇℃伅
*/
function searchBattAndDevAlarm(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchBattAndDevAlarm, 3000);
+ return;
+ }
$.ajax({
type:"post",
url: "Battalarm_dataAction!serchTopAlmTen",
@@ -597,7 +674,12 @@
seachServerTime();
//鑾峰彇鏈嶅姟鍣ㄤ笂鐨勬椂闂�
- function seachServerTime(){
+ function seachServerTime(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(seachServerTime, 1000);
+ return;
+ }
$.ajax({
type:"post",
url: "User_infAction!searchServerTime",
@@ -716,6 +798,11 @@
//鏌ヨ鏈�杩�30鍐呯殑璁惧鍜岀數姹犲憡璀﹀苟鎾姤璇煶
function searchRecentlyAlarm(){
+ // 鍒ゆ柇椤甸潰鏄惁琚闂�
+ if(!pageIsVisit) {
+ setTimeout(searchRecentlyAlarm, 5000);
+ return;
+ }
$.ajax({
type: "post",
url: "Battalarm_dataAction!serchIn30",
@@ -1005,6 +1092,5 @@
});
}
})(jQuery);
-
</script>
</html>
--
Gitblit v1.9.1