From 63d9ecbf93cf5b3582a8f7e08702fceeb1cc7b22 Mon Sep 17 00:00:00 2001
From: LiJun <LiJun@192.168.10.12>
Date: 星期五, 26 十月 2018 14:20:01 +0800
Subject: [PATCH] 机房实时状态查询时未设置选中的查看异常状态时不查询没有异常的机房实时状态信息

---
 gx_tieta/WebRoot/control.jsp |  208 +++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 172 insertions(+), 36 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 312a61f..f2bd975 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -113,6 +113,12 @@
     	.w400 {
     		width: 400px;
     	}
+    	.w500 {
+    		width: 500px;
+    	}
+    	.mr250 {
+    		margin-left: -250px;
+    	}
 	</style>
 	
   </head>  
@@ -127,6 +133,13 @@
 		<table>
 			<tr>
 				<td id="ele_content">
+					<div class="siderbar-tools">
+						<div class="siderbar-tools-right">
+							<i class="fa fa-file-text-o" title="鏈哄巻鍗�" id="siderbarToolsCard"></i>
+							<i class="fa fa-search" title="鏌ヨ鏈烘埧" id="siderbarToolsSearch"></i>
+							<i class="fa fa-outdent" title="鍏ㄩ儴鏀剁缉" id="siderbarToolsHide"></i>
+						</div>
+					</div>
 					 <!--鐢垫睜缁勮彍鍗曟爮-->
 					<div id="lside">
 						
@@ -286,10 +299,10 @@
 					<td><s:text name="Computer_room_IP"/></td>				<!-- 鏈烘埧IP -->
 					<td id="StationIP"></td>
 				</tr>
-				<!-- <tr>
-					<td><s:text name="Batt_group"/>ID</td>								鐢垫睜缁処D
+				<tr>
+					<td><s:text name="Batt_group"/>ID</td>								<!-- 鐢垫睜缁処D -->
 					<td id="batt_group_id"></td>
-				</tr> -->
+				</tr>
 				<tr>
 					<td><s:text name="Battery_name"/></td>					<!-- 鐢垫睜缁勫悕绉� -->
 					<td id="BattGroupName"></td>
@@ -802,6 +815,32 @@
 		</div>
 	</div>
 	
+	<!-- 瀵艰埅瀹氫綅  -->
+	<div class="popup w500 mr250" id="localNav">
+		<div class="popup-title"><span>鏈烘埧鏌ヨ</span><a href="javascript:;" class="close">X</a></div>
+		<div class="popup-content">
+			<div class="popup-tbl">
+				<table>
+					<tbody>
+						<tr>
+							<th>鏈烘埧鍚嶇О/鏈烘埧id</th>
+						</tr>
+						<tr>
+							<td>
+								<input name="popupHomeName" id="popupHomeName" type="text">
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</div>
+		</div>
+		
+		<div class="popup-footer">
+			<input type="button" name="" id="localNav_en" class="status-change-btn" value="纭畾" > <!-- 纭畾 -->
+			<input type="button" name="" class="close" value="鍙栨秷" >				<!-- 鍙栨秷 -->
+		</div>
+	</div>
+	
 	<!-- 鏈�澶у唴闃诲崟浣� -->
 	<div class="confirm">
 		<div class="confirm-header"><span>鏈�澶у唴闃诲崟浣擄紙鍓�10锛�</span><a href="javascript:closeConfirm();" class="close">X</a></div>
@@ -863,7 +902,7 @@
 		
 		//var eMenuWidth = $('#echarts_menu').width();
 		//$('#echarts_menu').width(eMenuWidth);
-		var isnotshowvalue=false;			//鏄惁鏄剧ず鏌辩姸鍊�
+		var isnotshowvalue=true;			//鏄惁鏄剧ず鏌辩姸鍊�
 		var mon_res_list;			//鐢垫睜鍐呴樆鏁扮粍
 		var mon_vol_list;			//鐢垫睜鐢靛帇鏁扮粍
 		var mon_ser_list;			//鐢垫睜鐢靛鏁扮粍
@@ -905,6 +944,7 @@
 		var equip61850_popup = new Popup($('#equip61850'));
 		var BTS_popup = new Popup($('#bts'));
 		var equip4016_popup = new Popup($('#equip4016'));
+		var localNav = new Popup($('#localNav'));
 		// 鍏呮斁鐢靛脊鍑烘璁剧疆
 		$(function() {
 			// 鍒濆鍖朙D9鍏呮斁鐢靛脊鍑烘
@@ -927,12 +967,18 @@
 				equip4016_popup.hidePopup();	// 闅愯棌61850寮瑰嚭妗嗗拰閬僵灞�
 			});
 			
+			// 鍒濆鍖杔ocalNav寮瑰嚭妗�
+			$('#localNav').find('.close').bind('click', function() {
+				localNav.hidePopup();	// 闅愯棌localNav寮瑰嚭妗嗗拰閬僵灞�
+			});
+			
 			// 绐楀彛澶у皬鏀瑰彉
 			$(window).resize(function() {
 				LD9_popup.hidePopup();	// 闅愯棌LD9寮瑰嚭妗嗗拰閬僵灞�
 				equip61850_popup.hidePopup();	// 闅愯棌61850寮瑰嚭妗嗗拰閬僵灞�
 				BTS_popup.hidePopup();	// 闅愯棌bts寮瑰嚭妗嗗拰閬僵灞�
 				equip4016_popup.hidePopup();	// 闅愯棌4016寮瑰嚭妗嗗拰閬僵灞�
+				localNav.hidePopup();
 			});
 		});
 		//鍒濆鍖栨煴鐘跺浘
@@ -1439,6 +1485,7 @@
 					data = eval("("+data+")");
 					var model = eval("("+data.result+")");
 					//console.log(model);
+					
 					var outTime = 2*60;				//璁惧瓒呮椂鏃堕棿(2鍒嗛挓)
 					var isOutTime = true;			//閫氳涓柇		鍒ゆ柇璁惧鏄惁閫氳涓柇    true:涓柇    false:姝e父
 					var batt = getBatt();			//鑾峰彇褰撳墠閫変腑鐨勭數姹犵粍
@@ -1450,6 +1497,8 @@
 					}else {
 						_str = GLOBAL.circleStatus.BTSCircle(batt, model, mygraph, updateEleCircle);
 					}
+					//console.log(mygraph);
+					//debugger;
 					if(model.code == 1) {
 						var nowTime = new Date().getTime();		//褰撳墠鏃堕棿
 						var record = new Date(model.data[0].record_datetime).getTime();
@@ -2742,29 +2791,7 @@
 		});
 	}
 	
-	//鐢熸垚鍏呮斁鐢电洃娴嬫ā鍧楀唴瀹�
-	function createBattListen(ele, list) {
-		ele.text("");
-		var discharge_num = 0;
-		var charge_num = 0;
-		var ul = $('<ul></ul>');
-		for(var i = 0; i < list.length; i++) {
-			var li = "";
-			if(list[i].isCharge) {
-				li = $('<li><a href="javascript:;" class="batt-charge" value="'+list[i].val+'" note="'+list[i].note+'">'+list[i].val+'鐢垫睜缁勫厖鐢垫祴璇�!</a></li>');
-				charge_num++;
-			}else {
-				li = $('<li><a href="javascript:;" class="batt-discharge" value="'+list[i].val+'" note="'+list[i].note+'">'+list[i].val+'鐢垫睜缁勬斁鐢垫祴璇�!</a></li>');
-				discharge_num++;
-			}
-			
-			li.data('attr', list[i]);
-			ul.append(li);
-		}
-		$('#ele_content .batt-listen .count-num').find('span').eq(0).text(discharge_num);
-		$('#ele_content .batt-listen .count-num').find('span').eq(1).text(charge_num);
-		ele.append(ul);
-	}
+	
 	// 鐐瑰嚮鐢垫睜鍏呮斁鐢电洃娴嬪垪琛ㄨЕ鍙戜簨浠�
 	$(function() {
 		
@@ -3339,7 +3366,8 @@
 					searchBtsBattInfoByStation(temp);	// 鏌ヨ鏈烘埧淇℃伅
 					searchBTSTestParam({
 						num: CMD_BTS_GetDischargeParm,
-						dev_id: batt.FBSDeviceId
+						dev_id: batt.FBSDeviceId,
+						TestCmd: 0
 					});
 					BTS_popup.showPopup();
 					
@@ -3371,7 +3399,8 @@
 				if(regEquipType(batt.FBSDeviceId, globalPattern.BTS)) {
 					var temp = {
 						num: CMD_BTS_Stop,
-						dev_id: batt.FBSDeviceId
+						dev_id: batt.FBSDeviceId,
+						TestCmd: 0
 					};
 					// 鏄剧ず鏄惁鍋滄娴嬭瘯
 					myConfirm.show({
@@ -3415,7 +3444,8 @@
 			$('#btn_flush').click(function (){
 				var temp = {
 					dev_id:$('#dev_id').val(),
-					num:CMD_BTS_GetDischargeParm
+					num:CMD_BTS_GetDischargeParm,
+					TestCmd: 0
 				};
 				searchBTSTestParam(temp);
 			});
@@ -3440,7 +3470,8 @@
 				// 鏋勯�犲惎鍔ㄦ潯浠�
 				var temp = {
 					num: CMD_BTS_Start,
-					dev_id: $('#dev_id').val()
+					dev_id: $('#dev_id').val(),
+					TestCmd: $('#discharge_type').val()
 				};
 				sendCmdToBTSDev(temp);
 			});
@@ -3899,6 +3930,14 @@
 			$('.confirm-mask').hide();
 		}
 		
+		// 鏈烘埧瀹氫綅闈㈡澘鏁版嵁鏌ヨ
+		$(function() {
+			
+			
+		});
+		
+		
+		
 		// siderbar妯″潡
 		$(function() {
 			var TreeView = GLOBAL.pages.TreeView;
@@ -3973,9 +4012,19 @@
 					}
 					mygraph.ischange = 1;				//閲嶆柊缁樺埗鎷撴墤鍥�
 					
+					
+					// 璐熻浇鐢垫祦
+					var loadCurr = batt.Load_curr+'A';
+					changeEleCircleOpt(eleCircle, 'loaderCurr', {name:'鏈�澶ц礋杞界數娴侊細'+loadCurr});
+					
+					// 鏈�澶ф牳瀹圭數娴�
+					var disCurrMax = batt.DisCurrMax+'A';
+					changeEleCircleOpt(eleCircle, 'disCurrMax', {name:'鏈�澶ф牳瀹圭數娴侊細'+disCurrMax});
+					
 					getBattStr();
 					searchBattAlarmParam();				//鏌ヨ鐢垫睜鍛婅鍙傛暟
 					clearInterval(time);
+					mygraph.graphtype = 4;
 					showtable();
 					time=window.setInterval("showtable()",4000);
 				}
@@ -3989,8 +4038,8 @@
 	       			BattGroupId=$(this).attr("id");
 	       			var disX=(e||event).clientX+10;			//寰楀埌榧犳爣鐐瑰嚮X鐨勪綅缃�
 		  			var disY=(e||event).clientY+10;			//寰楀埌榧犳爣鐐瑰嚮Y鐨勪綅缃�
-		  			var scrollY=$("body").scrollTop();		//鑾峰彇娴忚鍣ㄦ粴鍔ㄧ殑楂樺害
-				
+		  			var scrollY=$(window).scrollTop();		//鑾峰彇娴忚鍣ㄦ粴鍔ㄧ殑楂樺害
+					//console.log(scrollY);
 		  			var oRightMenu=document.getElementById("right_menu");
 		  			
 		  			$(this).click();
@@ -3999,9 +4048,10 @@
 		  			$("#right_menu").show();
 		  			$("#right_menu .more_menu").hide();
 		  			$("#right_menu .angle").hide();
+		  			//console.log(disX+"***"+disY);
 		  			//浣胯彍鍗曡窡闅忛紶鏍囦綅缃�
-		  			oRightMenu.style.left=disX+'px';
-		  			oRightMenu.style.top=disY+scrollY+'px';
+		  			oRightMenu.style.left= disX+'px';
+		  			oRightMenu.style.top= disY+scrollY+'px';
 		  			
 		  			setPosition($("#right_menu"),disX, disY);
 		  			
@@ -4013,6 +4063,47 @@
 				treeView.ele.find('li').removeClass('sider-menu-open');
 			});
 			
+			// 宸ュ叿鏉℃暣浣撴牱寮�
+			$('.siderbar-tools').tooltip();
+			
+			// 宸ュ叿鏉�-鏈哄巻鍗�
+			$('#siderbarToolsCard').click(function(){
+				var batt = getBatt();
+				var tmp = {
+					province: batt.StationName1,
+					city: batt.StationName2,
+					home: batt.StationName,
+					homeid: batt.StationId,
+					battid: batt.BattGroupId
+				};
+				findBattinfByBattGroupId(batt.BattGroupId);
+				// 鏍规嵁鏁版嵁瀹氫綅
+				localSideBar(treeView, treeView.container, tmp);
+			});
+			
+			// 宸ュ叿鏉�-鍏ㄩ儴鏀剁缉
+			$('#siderbarToolsHide').click(function(){
+				treeView.ele.find('li').removeClass('sider-menu-open');
+			});
+			
+			// 宸ュ叿鏉�-鏌ヨ
+			$('#siderbarToolsSearch').click(function(){
+				localNav.homeInfo = undefined;
+				$('#popupHomeName').val('');
+				localNav.showPopup();
+			});
+			
+			// 鐐瑰嚮闈㈡澘鐨勭‘瀹氭寜閽�
+			$('#localNav_en').click(function() {
+				// 瀹氫綅
+				if(localNav.homeInfo) {
+					localNav.hidePopup();
+					localSideBar(treeView, treeView.container, localNav.homeInfo);
+				}else {
+					
+				}
+			});
+			 
 			// 鐢垫睜鍏呮斁鐢垫暟鎹洃鎺�
 			var batt_list = $('#ele_content .batt-listen .batt-list');
 			batt_list.on('click', 'a', function(){
@@ -4026,10 +4117,55 @@
 					home: battInfo.home,
 					homeid: battInfo.note,
 					battid: battInfo.val
-				}
+				};
 				
 				localSideBar(treeView, treeView.container, tmp);
 			});
+			
+			// 鏌ヨ鏈烘埧骞舵洿鏂皊ource
+			var homeSource = [];
+			findHome();
+			
+			// 瀹氫箟鏈烘埧鏌ヨ淇℃伅
+			$( "#popupHomeName" ).autocomplete({
+				source: homeSource,
+				select: function(event, ui) {
+					localNav.homeInfo = ui.item;	// 璁剧疆鏈烘埧淇℃伅鍐呭
+				}
+			});
+			
+			// 鏌ヨ鏈烘埧
+			function findHome() {
+				var tmp = {
+					StationName1:'',
+					StationName2: ''
+				};
+				
+				// 鏌ヨ灏嗕俊鎭�
+				$.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(result){
+					var rs = JSON.parse(result.result);
+					if(rs.code==1){
+						homeSource = [];
+						var data = rs.data;
+						for(var i=0; i<data.length; i++) {
+							var _data = data[i];
+							var tmp = {
+								label: _data.StationName+'('+_data.StationId+')',
+								province: _data.StationName1,
+								city: _data.StationName2,
+								home: _data.StationName,
+								homeid: _data.StationId,
+								battid: undefined
+							};
+							
+							// 娣诲姞鍒拌祫婧�
+							homeSource.push(tmp);
+						}
+						$( "#popupHomeName" ).autocomplete('option', 'source', homeSource);
+					}
+				});
+			}
+			
 		});
 	</script>
 	<script type="text/javascript" src="js/Title.js"></script>

--
Gitblit v1.9.1