From 6a164ed3a382326e1f246f4629e6d2ffe276ece2 Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.29>
Date: 星期一, 15 十月 2018 14:06:15 +0800
Subject: [PATCH] 统计基站在状态

---
 gx_tieta/WebRoot/control.jsp |  144 +++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 111 insertions(+), 33 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index a06f324..62da258 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -15,6 +15,7 @@
 	<link href="css/basic.css" type="text/css" rel="stylesheet" />
 	<link href="css/control_style.css" type="text/css" rel="stylesheet" />
 	<link rel="stylesheet" href="css/BrdwMaint.css">
+	<link rel="stylesheet" href="css/common.css">
 	<link href="jqueryui/jquery-ui.css" type="text/css" rel="stylesheet" />
 	<!-- <link rel="stylesheet" type="text/css" href="css/popup.css"> -->
 	<link rel="stylesheet" type="text/css" href="css/popup-tbl.css">
@@ -126,11 +127,6 @@
 		<table>
 			<tr>
 				<td id="ele_content">
-					<!-- 鏈烘埧鏁扮數姹犵粍鏁� -->
-					<div id="mach_num">
-						<s:text name="Room_num"></s:text>:<span id="room_num"></span>;&nbsp;<s:text name="Batt_group_num"></s:text>:<span id="batt_group_num"></span>
-					 	<div style="float: right; margin-right: 5px"><i class="fa"></i></div>
-					 </div>
 					 <!--鐢垫睜缁勮彍鍗曟爮-->
 					<div id="lside">
 						
@@ -980,8 +976,6 @@
 			var winHt = $(window).height();
 			var bodyHt = $('body').height();
 			var batt_listen = $('#ele_content .batt-listen').height();
-			//console.info('*****');
-			//console.info(batt_listen);
 			var shiftHt = winHt - bodyHt;
 			var graph = $('.graph').height();
 			var lSide = $('#lside').height();
@@ -1019,29 +1013,32 @@
 			var unit = "";
 			if(lname == 'Voltage'){
 				unit ="V";
-				max = batt.MonVolStd*1.25;
+				/* max = batt.MonVolStd*1.25;
 				var tempmax = Math.max.apply( Math, array);	
 				if(tempmax > max){
 					max = tempmax*1.25;
-				}	
+				} */	
+				max = Math.max.apply( Math, array)*1.1;
 				max = max.toFixed(3);	
 			}else if(lname == 'Resistance'){
 				unit = "m惟";
-				max = (batt.MonResStd*1.25);
+				/* max = (batt.MonResStd*1.25);
 				max = 10;
 				var tempmax = Math.max.apply( Math, array)*1.25;
 				if(tempmax<max){
 					max = tempmax;
-				}
+				} */
+				max = Math.max.apply( Math, array)*1.1;
 				max = (max).toFixed(3);
 			}else if(lname == 'Temperature'){
 				unit = "鈩�";
-				max = (Math.max.apply( Math, array)*1.25).toFixed(3);
+				max = (Math.max.apply( Math, array)*1.5).toFixed(3);
 			}else if(lname == 'Conductance'){
-				max = (batt.MonSerStd*1.25).toFixed(3);
+				//max = (batt.MonSerStd*1.25).toFixed(3);
+				max = (Math.max.apply( Math, array)*1.1).toFixed(3);
 			}else if(lname == 'MonJHCurr') {
 				unit = "mA";
-				max = (Math.max.apply( Math, array)*1.25).toFixed(3);
+				max = (Math.max.apply( Math, array)*1.1).toFixed(3);
 			}
 			//console.info("max:"+max+"    min:"+min);
 			if(lname=='Resistance' || lname=='Temperature'){
@@ -1112,7 +1109,7 @@
 		}
 		
 		
-		seachAllStation();
+		//seachAllStation();
 		//鏌ヨ鎵�鏈夋満鎴�
 		function seachAllStation(){
 			$.ajax({ 	
@@ -1675,17 +1672,20 @@
 				var array = getArray(lname);
 				var batt = getBatt();
 				var min = (Math.min.apply( Math, array)*0.9).toFixed(3);
-				var max = 0 ;
+				var max = (Math.max.apply( Math, array)*1.1).toFixed(3);
 				//console.info(batt);
 				if(lname == 'Voltage'){
-					max = (batt.MonVolStd*1.25).toFixed(3);					
+					//max = (batt.MonVolStd*1.25).toFixed(3);
+					max = (Math.max.apply( Math, array)*1.1).toFixed(3);					
 				}else if(lname == 'Resistance'){
 					//max = (batt.MonResStd*1.25).toFixed(3);
-					max =10;
+					//max =10;
+					max = (Math.max.apply( Math, array)*1.1).toFixed(3);
 				}else if(lname == 'Temperature'){
-					max = (Math.max.apply( Math, array)*1.25).toFixed(3);
+					max = (Math.max.apply( Math, array)*1.5).toFixed(3);
 				}else if(lname == 'Conductance'){
-					max = (batt.MonSerStd*1.25).toFixed(3);
+					//max = (batt.MonSerStd*1.25).toFixed(3);
+					max = (Math.max.apply( Math, array)*1.1).toFixed(3);
 				}
 				//console.info("max:"+max+"   min:"+min);
 				if(lname=='Resistance' || lname=='Temperature'){
@@ -2009,16 +2009,23 @@
 		
 		//鏍规嵁褰撳墠閫変腑鐨勭數姹犵粍id鑾峰彇褰撳墠鐢垫睜缁勭殑淇℃伅
 		function getBatt(){
-			if(battinlist!=undefined && BattGroupId!=undefined){
+			/* if(battinlist!=undefined && BattGroupId!=undefined){
 				for(var i=0;i<battinlist.length;i++){
 					for(var k=0;k<battinlist[i].length;k++){
 						if(BattGroupId==battinlist[i][k].BattGroupId){
+							console.info(battinlist);
 							return battinlist[i][k];
 						}
 					}
 				}
+			} */
+			var activeFile = $('.whyc-sider-menu .sider-menu-file.active');
+			if(activeFile.length == 1) {
+				return activeFile.data('attr');
+			}else {
+				return undefined;
 			}
-			return undefined;
+			
 		}
 		
 		//灏嗘寚瀹氬垪涓殑涓巚alue鐩哥瓑鐨勫�肩殑鍗曞厓鏍煎彉涓虹孩鑹�
@@ -2673,17 +2680,6 @@
 				$(this).attr('href', 'charge-test.jsp?battgroupId='+BattGroupId+"&stationId="+batt.StationId);
 			});
 		});
-		
-		
-		$(function() {
-			$('#ele_content').resizable({
-				minWidth: 240,
-				maxWidth: 520,
-				handles: 'e',
-				edge: 10
-			});
-		});
-	
 	
 	$(function(){
 		//鍚姩鏌ヨ鐢垫睜鍏呮斁鐢电姸鎬佺殑绾跨▼
@@ -3945,6 +3941,88 @@
 			$('.confirm').hide();
 			$('.confirm-mask').hide();
 		}
+		
+		// siderbar妯″潡
+		$(function() {
+			var TreeView = GLOBAL.pages.TreeView;
+			var first = GLOBAL.pages.siderbar.first;	// 涓�绾у鑸�
+			var second = GLOBAL.pages.siderbar.second;	// 浜岀骇瀵艰埅
+			var third = GLOBAL.pages.siderbar.third;	// 涓夌骇瀵艰埅
+			var fourth = GLOBAL.pages.siderbar.fourth;	// 鍥涚骇瀵艰埅
+			var treeView = new TreeView($('#lside'));
+			$('#lside').width($('#ele_content').width());
+			treeView.setContainer();
+			// 璁剧疆瀹瑰櫒鍙嫋鍔�
+			$('#ele_content').resizable({
+				handles: 'e',
+				maxWidth: 520,
+				minWidth: 200,
+				alsoResize: $('#lside'),
+				resize:function() {
+					treeView.setContainer();
+				}
+			});
+			
+			// 鐢熸垚涓�绾у鑸�-鐪�
+			first(treeView, treeView.container);
+			
+			// 鐪�->甯�
+			treeView.ele.on('click', '.province', function() {
+				var province = $(this).data('attr');
+				second(treeView, $(this).parent(), province);
+			});
+			
+			// 甯�->鏈烘埧
+			treeView.ele.on('click', '.city', function() {
+				var city = $(this).data('attr');
+				third(treeView, $(this).parent(), city);
+			});
+			
+			battinlist = [];
+			// 鏈烘埧->鐢垫睜缁�
+			treeView.ele.on('click', '.home', function() {
+				var home = $(this).data('attr');
+				var tmp = {
+					StationName1: home.StationName1,
+					StationName2: home.StationName2,
+					StationName: home.StationName,
+					StationId: home.StationId
+				};
+				fourth(treeView, $(this).parent(), tmp);
+			});
+			
+			// 鐢垫睜缁�
+			treeView.ele.on('click', '.eleGroup', function() {
+				var eleGroup = $(this).data('attr');
+				// 鏍规嵁BattGroupId鏌ヨ鏁版嵁
+				if(BattGroupId != eleGroup.BattGroupId) {
+					BattGroupId = eleGroup.BattGroupId;
+					// 瀵笲TS9611鍋氱壒娈婄殑澶勭悊
+					var batt = getBatt();
+					//console.info(batt);
+					$('#eleCircleBtn').removeClass('hide');
+					if(regEquipType(batt.FBSDeviceId, globalPattern.BTSSreen)) {
+						var isAct = $('#eleCircleBtn').hasClass('action');
+						if(isAct) {
+							lname = 'Voltage';
+							$('#'+lname).addClass('action');
+						}
+						
+						$('#eleCircleBtn').removeClass('action').addClass('hide');
+						$('.ele-circle').hide();
+						$('.graph').show();
+						myChart.resize();
+					}
+					mygraph.ischange = 1;				//閲嶆柊缁樺埗鎷撴墤鍥�
+					
+					getBattStr();
+					searchBattAlarmParam();				//鏌ヨ鐢垫睜鍛婅鍙傛暟
+					clearInterval(time);
+					showtable();
+					time=window.setInterval("showtable()",4000);
+				}
+			});
+		});
 	</script>
 	<script type="text/javascript" src="js/Title.js"></script>
 	<script type="text/javascript" src="js/control.js"></script>

--
Gitblit v1.9.1