From 0afa84e6de17cda97792f3acd114fffa552ee163 Mon Sep 17 00:00:00 2001
From: 81041 <81041@DESKTOP-025NVD9>
Date: 星期四, 03 一月 2019 16:15:03 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/index.jsp |   56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 6fcf891..45bb7c7 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -801,12 +801,14 @@
 	}
 	
 	//闇�瑕佸疄鏃舵煡璇㈢殑鏂规硶
-	function Repeatoperation(){		
-		searchBattmaintrecords();
-		searchUserTask();		
-		searchAnnounceall();
-		searchTestsCale();
-		
+	function Repeatoperation(){	
+		// 鍒ゆ柇椤甸潰鏄惁姝e湪琚闂�
+		if(pageIsVisit) {
+			searchBattmaintrecords();
+			searchUserTask();		
+			searchAnnounceall();
+			searchTestsCale();
+		}	
 		setTimeout(Repeatoperation,10000);
 	}
 	
@@ -940,6 +942,13 @@
 		if($('#content .warn-pie').length==0){
 			return;
 		}
+		
+		// 鍒ゆ柇椤甸潰鏄惁琚闂�
+		if(!pageIsVisit) {
+			setTimeout(searchalarm_data, 10000);
+			return;
+		}
+		
 		//鐢熸垚鐢垫睜鍛婅鐜囬ゼ鐘跺浘
 		var $warn=$('#content .pie-con .warn-pie');	//鑾峰彇鍛婅瀹瑰櫒鐨刯query瀵硅薄
 		if($warn.length!=0){
@@ -1051,6 +1060,12 @@
 			return;
 		}
 		
+		// 鍒ゆ柇椤甸潰鏄惁琚闂�
+		if(!pageIsVisit) {
+			setTimeout(searchmaintByMap, 10000);
+			return;
+		}
+		
 		// 鍒ゆ柇鏄惁涓篍charts瀵硅薄
 		var isEcharts = isObject(brdnPie)?true:false;
 		
@@ -1123,6 +1138,13 @@
 		if($('#content .repair-pie').length==0){
 			return;
 		}
+		
+		// 鍒ゆ柇椤甸潰鏄惁琚闂�
+		if(!pageIsVisit) {
+			setTimeout(searchBatt_maint_inf, 10000);
+			return;
+		}
+		
 		// 鍒ゆ柇鏄惁涓篍charts瀵硅薄
 		var isEcharts = isObject(repairPie)?true:false;
 		if(!isEcharts) {
@@ -1178,6 +1200,13 @@
 		if($('#content .health-pie').length==0){		
 			return;
 		}
+		
+		// 鍒ゆ柇椤甸潰鏄惁琚闂�
+		if(!pageIsVisit) {
+			setTimeout(searchGood, 10000);
+			return;
+		}
+		
 		//鐢熸垚鐢垫睜鍋ュ悍鐜�
 		var $health=$('#content .pie-con .health-pie');	//鑾峰彇鏁呴殰瀹瑰櫒鐨刯query瀵硅薄
 		if($health.length!=0){
@@ -1228,6 +1257,12 @@
 	var endurPie;
 	function searchEndurHome() {
 		if($('#content .endur-pie').length==0){
+			return;
+		}
+		
+		// 鍒ゆ柇椤甸潰鏄惁琚闂�
+		if(!pageIsVisit) {
+			setTimeout(searchEndurHome, 10000);
 			return;
 		}
 		
@@ -1840,7 +1875,7 @@
 		var powercut = mapImgDesc.find('.badge-powercut');	// 鍋滅數鏈烘埧
 		var normal = mapImgDesc.find('.badge-normal');		// 姝e父鏈烘埧
 		var weak = mapImgDesc.find('.badge-xuhang');			// 缁埅涓嶈冻3灏忔椂鏈烘埧
-		console.log(warn.length);
+		// console.log(warn.length);
 		//  璇锋眰鍚庡彴鏁版嵁
 		$.ajax({
 			type: 'post'
@@ -2632,6 +2667,13 @@
 		var bmap = GLOBAL.BMap;		// BMap鐨勫懡鍚嶇┖闂�
 		var updateStationData = [];
 		
+		// 鍒ゆ柇鏄惁琚闂�
+		if(!pageIsVisit) {
+			// 鍏抽棴骞舵坊鍔犲欢鏃舵墽琛�
+        	clearInterval(updateTimeout);
+        	updateTimeout = setTimeout(updateStation, 4000);
+		}
+		
 		if(isLoad) {
 			updateLoad = layer.load(1);
 		}

--
Gitblit v1.9.1