From bb65f33c9fdff40844f17e95e3e75aed2b42bda2 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 25 十月 2018 14:47:33 +0800
Subject: [PATCH] 修改内容

---
 gx_tieta/WebRoot/control.jsp |  203 ++++++++++++++++++++++++--------------------------
 1 files changed, 99 insertions(+), 104 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 692e91d..ee80a7c 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -254,14 +254,14 @@
 	<div id="right_menu">
 		<ul>
 			<li><a href="javascript:"><s:text name="Check_the_battery_card"></s:text></a></li>										<!-- 鏌ョ湅鐢垫睜缁勬満鍘嗗崱 -->
-			<li><a href="upload.jsp" target="_blank"><s:text name="Upload_FBO/IDC_data"></s:text></a></li>							<!-- 涓婁紶'FBO/IDC'鏁版嵁 -->
-			<li><a href="uploadresis.jsp" target="_blank"><s:text name="Upload_resistance_conductivity_data"></s:text></a></li>		<!-- 涓婁紶鐢甸樆鐢靛鏁版嵁 -->
+			<!-- <li><a href="upload.jsp" target="_blank"><s:text name="Upload_FBO/IDC_data"></s:text></a></li> -->							<!-- 涓婁紶'FBO/IDC'鏁版嵁 -->
+			<!-- <li><a href="uploadresis.jsp" target="_blank"><s:text name="Upload_resistance_conductivity_data"></s:text></a></li> -->		<!-- 涓婁紶鐢甸樆鐢靛鏁版嵁 -->
 			<li><a href="eleBrdwMaint.jsp" target="_blank"><s:text name="Batt_failure_maintenance_record_query" /></a></li>			<!-- 鐢垫睜鏁呴殰缁存姢璁板綍鏌ヨ -->
 			<li><a href="javascript:targetBattReport();"><s:text name="Battery_statistical_analysis_queries"></s:text></a></li>		<!-- 鐢垫睜缁熻鍒嗘瀽鏌ヨ-->
 			<!--<li><a href="eleMonomer.jsp"><s:text name="Batt_statistical_analysis_query"></s:text></a></li>				 		      鐢垫睜鍗曚綋缁熻鍒嗘瀽鏌ヨ -->
 						
 			<li style="display:none;"><a href="javascript:"><s:text name="Search_engine_or_the_batt_group"></s:text></a></li>		<!-- 鎼滅储鏈烘埧鎴栫數姹犵粍-->
-			<li><a href="javascript:" id="all_show"><s:text name="Expand_all"></s:text></a></li>									<!-- 鍏ㄩ儴灞曞紑 -->
+			<!-- <li><a href="javascript:" id="all_show"><s:text name="Expand_all"></s:text></a></li> -->									<!-- 鍏ㄩ儴灞曞紑 -->
 			<li><a href="javascript:" id="all_hide"><s:text name="Collapse_all"></s:text></a></li>									<!-- 鍏ㄩ儴鏀剁缉 -->
 		</ul>
 	</div>
@@ -286,10 +286,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>
@@ -863,7 +863,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;			//鐢垫睜鐢靛鏁扮粍
@@ -1325,15 +1325,17 @@
 			
 		}); */
 		
-		//灞忚斀娴忚鍣ㄥ彸閿彍鍗曞姛鑳�
+			//灞忚斀娴忚鍣ㄥ彸閿彍鍗曞姛鑳�
 	       $(document).ready(function(){
-	       	document.oncontextmenu=function(){
-	    		return false;
-	    	};
+		       // 灞忚斀#lside鐨勫彸閿彍鍗�
+		       	document.oncontextmenu=function(){
+		    		return false;
+		    	};
 	       });
 	       // 鑿滃崟鏍忛紶鏍囧彸閿彍鍗曟樉绀�
 	       $(document).ready(function(){
-	       	$('.thr').mousedown(function(e){
+	       	$('#ele_content').on('mousedown', '.eleGroup', function(e){
+	       		alert(123);
 	       		//鍒╃敤jquery鐨勬柟寮忚幏鍙栧綋鍓嶇偣鍑荤殑鏄惁鏄彸閿�
 	       		if(e.which==3)
 	       		{
@@ -2708,16 +2710,23 @@
 				//console.info(model);
 				if(model.code == 1){
 					for(var i = 0;i<model.data.length;i++){
-						if(model.data[i].batt_test_type == 3){
+						var _data = model.data[i];
+						if(_data.batt_test_type == 3){
 							arr.push({
-								note:model.data[i].note,
-								val:model.data[i].BattGroupId,
+								note:_data.note,
+								val:_data.BattGroupId,
+								province: _data.stationName1,
+								city: _data.stationName2,
+								home: _data.stationName,
 								isCharge:0
 							});
-						}else if(model.data[i].batt_test_type == 2){
+						}else if(_data.batt_test_type == 2){
 							arr.push({
-								note: model.data[i].note,
-								val:model.data[i].BattGroupId,
+								note: _data.note,
+								val: _data.BattGroupId,
+								province: _data.stationName1,
+								city: _data.stationName2,
+								home: _data.stationName,
 								isCharge:1
 							});
 						}
@@ -2733,35 +2742,10 @@
 		});
 	}
 	
-	//鐢熸垚鍏呮斁鐢电洃娴嬫ā鍧楀唴瀹�
-	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++;
-			}
-			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() {
-		var batt_list = $('#ele_content .batt-listen .batt-list');
-		batt_list.on('click', 'a', function(){
-			batt_list.find('a').removeClass('active');
-			$(this).addClass('active');			
-			locationBattPos($(this).attr('note'), $(this).attr('value'));
-		});
+		
 	});
 	function BattlocationById(battid){
 		if(battid!=undefined){
@@ -2885,16 +2869,7 @@
 				
 			});
 		});
-		//鍏ㄩ儴鏀剁缉
-		$('#all_hide').click(function(){
-			$('.fir').next().slideUp();
-			//$('.sec').next().slideUp();
-			$("#lside").scrollTop(0);
-			$(".arrow").removeClass("up");
-			$(".arrow").addClass("down");
-			$(".mark").text("+");
-			$(".mark").removeClass("black");
-		});
+		
 	});
 	
 	// 鏄剧ず鐢垫睜鎬绘暟
@@ -3027,51 +3002,8 @@
 	 }
 	 
 	 // 鏍规嵁鏈烘埧id鍜岀數姹犵粍id瀹氫綅
-	 function locationBattPos(stationid, battId) {
-	 	var _firTag = $('#lside .fir[name="'+stationid+'"]');
-	 	
-	 	if(_firTag.next('ul').length == 0) {
-	 		addLoadingToMenu(stationid);	// 娣诲姞鏁版嵁鍔犺浇绛夊緟
-		 	$.ajax({ 	
-		        type: "post", 				
-		        url: "BattInfAction!serchBattByStation",				
-		        async:true,				
-		        dataType:'text',
-		        data:"json = "+JSON.stringify({
-		        	StationId:stationid
-		        }),	
-		        success: function(data){							        	
-					data = eval('('+data+')');
-					var model = eval('('+data.result+')');
-					removeLoadingMenu(stationid);	// 绉婚櫎鏁版嵁鍔犺浇绛夊緟
-					if(model.code == 1){
-						//console.info(model.data);
-						battinlist.push(model.data);
-						createLsideSec(model.data, battId);
-					}
-	        	},
-	        	error:function(){
-	        		
-	        	} 				
-			}); 
-	 	}else {
-	 		var _ul = _firTag.next();
-	 		_ul.slideDown();
-	 		_ul.find('.thr').each(function() {
-	 			if($(this).attr('id') == battId) {
-		 			$('#lside a').css('background-color', "");
-					$(this).css('background-color', '#9bbaf3');
-					BattGroupId = battId;
-					location.hash = '#'+battId;
-					location.hash = "";
-				}
-	 		});
-	 		getBattStr();
-	 		searchBattAlarmParam();			//鏌ヨ鐢垫睜鍛婅鍙傛暟
-	 		clearInterval(time);
-			showtable();
-			time=window.setInterval("showtable()",4000);
-	 	}
+	 function locationBattPos(info) {
+	 	console.log(info);
 	 }
 	 
 	 // 鍚戦〉闈㈢殑宸︿晶娣诲姞鍔犺浇绛夊緟
@@ -3102,7 +3034,7 @@
 	 function getBattStr() {
 	 	var battInfo = getBatt();
 	 	//console.info(battInfo);
-	 	var battStr = battInfo.StationName+'-'+battInfo.BattGroupName;
+	 	var battStr = battInfo.StationName+'-'+battInfo.BattGroupName+'-鏍囩О瀹归噺'+battInfo.MonCapStd+'AH';
 	 	$('#address_infor').text(battStr);
 	 }
 	 
@@ -3385,7 +3317,8 @@
 					searchBtsBattInfoByStation(temp);	// 鏌ヨ鏈烘埧淇℃伅
 					searchBTSTestParam({
 						num: CMD_BTS_GetDischargeParm,
-						dev_id: batt.FBSDeviceId
+						dev_id: batt.FBSDeviceId,
+						TestCmd: 0
 					});
 					BTS_popup.showPopup();
 					
@@ -3461,7 +3394,8 @@
 			$('#btn_flush').click(function (){
 				var temp = {
 					dev_id:$('#dev_id').val(),
-					num:CMD_BTS_GetDischargeParm
+					num:CMD_BTS_GetDischargeParm,
+					TestCmd: 0
 				};
 				searchBTSTestParam(temp);
 			});
@@ -3486,7 +3420,8 @@
 				// 鏋勯�犲惎鍔ㄦ潯浠�
 				var temp = {
 					num: CMD_BTS_Start,
-					dev_id: $('#dev_id').val()
+					dev_id: $('#dev_id').val(),
+					TestCmd: $('#discharge_type').val()
 				};
 				sendCmdToBTSDev(temp);
 			});
@@ -3952,6 +3887,7 @@
 			var second = GLOBAL.pages.siderbar.second;	// 浜岀骇瀵艰埅
 			var third = GLOBAL.pages.siderbar.third;	// 涓夌骇瀵艰埅
 			var fourth = GLOBAL.pages.siderbar.fourth;	// 鍥涚骇瀵艰埅
+			var localSideBar = GLOBAL.pages.siderbar.localSideBar;	// 瀹氫綅鏈烘埧
 			var treeView = new TreeView($('#lside'));
 			$('#lside').width($('#ele_content').width());
 			treeView.setContainer();
@@ -4018,6 +3954,14 @@
 					}
 					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);
@@ -4025,6 +3969,57 @@
 					time=window.setInterval("showtable()",4000);
 				}
 			});
+			
+			// 鍙抽敭鑿滃崟鏄剧ず
+			treeView.ele.on('mousedown', '.eleGroup', function(e) {
+				//鍒╃敤jquery鐨勬柟寮忚幏鍙栧綋鍓嶇偣鍑荤殑鏄惁鏄彸閿�
+	       		if(e.which==3)
+	       		{
+	       			BattGroupId=$(this).attr("id");
+	       			var disX=(e||event).clientX+10;			//寰楀埌榧犳爣鐐瑰嚮X鐨勪綅缃�
+		  			var disY=(e||event).clientY+10;			//寰楀埌榧犳爣鐐瑰嚮Y鐨勪綅缃�
+		  			var scrollY=$(window).scrollTop();		//鑾峰彇娴忚鍣ㄦ粴鍔ㄧ殑楂樺害
+					console.log(scrollY);
+		  			var oRightMenu=document.getElementById("right_menu");
+		  			
+		  			$(this).click();
+		  			
+		  			//鏄剧ず鑿滃崟鍐呭
+		  			$("#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';
+		  			
+		  			setPosition($("#right_menu"),disX, disY);
+		  			
+	       		}
+			});
+			
+			//鍏ㄩ儴鏀剁缉
+			$('#all_hide').click(function(){
+				treeView.ele.find('li').removeClass('sider-menu-open');
+			});
+			
+			// 鐢垫睜鍏呮斁鐢垫暟鎹洃鎺�
+			var batt_list = $('#ele_content .batt-listen .batt-list');
+			batt_list.on('click', 'a', function(){
+				batt_list.find('a').removeClass('active');
+				$(this).addClass('active');
+				var battInfo = $(this).parent().data('attr');	
+				
+				var tmp = {
+					province: battInfo.province,
+					city: battInfo.city,
+					home: battInfo.home,
+					homeid: battInfo.note,
+					battid: battInfo.val
+				}
+				
+				localSideBar(treeView, treeView.container, tmp);
+			});
 		});
 	</script>
 	<script type="text/javascript" src="js/Title.js"></script>

--
Gitblit v1.9.1