From a7adbf6bf46de9ec3753d4b6cc6c8b5cc83cdcf9 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期一, 26 十一月 2018 16:03:32 +0800
Subject: [PATCH] 修改实时和历史机历卡为基站机历卡

---
 gx_tieta/WebRoot/control.jsp |  196 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 189 insertions(+), 7 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 038a294..5e1f4ce 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -120,6 +120,19 @@
     	.mr250 {
     		margin-left: -250px;
     	}
+    	.page-link {
+			cursor: pointer;
+		}
+		.page-link:hover {
+			color: #1495E7;
+		}
+		.page-link:active {
+			color: #FF0000;
+		}
+		i.fa.f-size16 {
+			font-size: 16px;
+			vertical-align: middle;
+		}
 	</style>
 	
   </head>  
@@ -251,6 +264,11 @@
 									<span class="whyc-btn-icon fa fa-signal"></span>
 									<span class="whyc-btn-txt">淇″彿璐ㄩ噺</span>
 								</a>
+								<br>
+								<a href="javascript:void(0);" id="threadInfo" class="whyc-btn whyc-btn-disabled" id="specialGraphExport">
+									<span class="whyc-btn-icon fa fa-desktop"></span>
+									<span class="whyc-btn-txt">璁惧杩涚▼</span>
+								</a>
 					        </div>
 						</div>
 					</div>
@@ -375,6 +393,10 @@
 				<tr>
 					<td><s:text name="Head"/></td>									<!-- 璐熻矗浜� -->
 					<td></td>
+				</tr>
+				<tr>
+					<td>瀹夎浜哄憳</td>									<!-- 璐熻矗浜� -->
+					<td id="installUser"></td>
 				</tr>
 			</table>
 		</div>
@@ -656,7 +678,7 @@
 						</tr>
 						<tr>
 							<th><s:text name="Booster"/><s:text name="Upper_limit"/><!-- 鍗囧帇涓婇檺 -->锛圴锛�</th>
-							<th><s:text name="Charging_current"/><!-- 鍏呯數鐢垫祦 -->锛圓锛�</th>
+							<th id="ChargeCurrSetLabel"><s:text name="Charging_current"/><!-- 鍏呯數鐢垫祦 -->锛�<span class="val-range"></span>A锛�<i class="fa fa-edit page-link f-size16" title="淇敼鍏呯數鐢垫祦鑼冨洿"></i></th>
 						</tr>
 						<tr>
 							<td><input id="DCVolHighLimit" type="text" value="0"><i class="fa fa-frown-o error-img" title="鏁版嵁鏍煎紡閿欒"></i></td>
@@ -675,7 +697,7 @@
 			</div>
 		</div>
 		<div class="popup-footer">
-			<input type="button" name="" id="btn_start_test" class="status-change-btn whyc-btn-disabled" value="鍚姩娴嬭瘯" > <!-- 鍚姩娴嬭瘯 -->
+			<input type="button" name="" id="btn_start_test" class="status-change-btn whyc-btn-disabled no-remove-disabled" value="鍚姩娴嬭瘯" > <!-- 鍚姩娴嬭瘯 -->
 			<input type="button" name="" id="btn_flush" value="璇诲彇" >					<!-- 璇诲彇 -->
 			<input type="button" name="" id="btn_ensure" class="status-change-btn whyc-btn-disabled" value="璁惧畾" >				<!-- 璁惧畾 -->
 			<!-- <input type="button" name="" id="bts_graph" value="鎷撴墤鍥�"> -->
@@ -1129,6 +1151,8 @@
 	<!-- 鏁翠綋鐨勯伄缃╁眰 -->
 	<div id="allShade"></div>
 	<div class="clear"></div>
+	<!-- iframe鏁版嵁涓存椂瀛樺偍浣嶇疆 -->
+	<div id="homeInfoIframeData"></div>
 	<!-- 寮曞叆layui妗嗘灦 -->
 	<script type="text/javascript" src="src/layui.all.js"></script>
 	<script type="text/javascript" src="pages/js/common.js"></script>
@@ -1154,6 +1178,10 @@
 	<!-- 寮曞叆鐢佃矾鍥� -->
 	<script type="text/javascript" src="js/elecircle.js"></script>
 	<script type="text/javascript" src="js/elecircle.content.js"></script>
+	<script type="text/javascript" src="pages/js/pages/homeInfo.js"></script>
+	<script type="text/html" id="setChargeCurrTpl">
+		
+	</script>
 	<script type="text/javascript">
 	var permits;
 	<%	Object obj=session.getAttribute("permits");
@@ -1264,6 +1292,69 @@
 				sysSet_popup.hidePopup();	// 闅愯棌sysSet_popup寮瑰嚭妗嗗拰閬僵灞�
 			});
 			
+			// bts闈㈡澘鍏呯數鐢垫祦缂栬緫
+			$('#ChargeCurrSetLabel .fa-edit').click(function() {
+				var batt =getBatt();
+				//console.log(batt);
+				// 璁剧疆闈㈡澘
+				layer.open({
+					type: 1
+					,title: '璁剧疆鍏呯數鐢垫祦闃�鍊�'
+					, content: '<div style="width:300px; height: 50px;"><div style="margin-top: 20px;margin-left: 8px; margin-right: 8px;">'+
+								'<input type="text" style="width: 100%; height:32px; border: 1px solid #ccc;" id="setChargeCurrVal" value="">'+
+								'</div></div>'
+					,btn:['璁剧疆', '鍙栨秷']
+					,yes: function(index) {
+						var chargeCurrVal = $('#setChargeCurrVal').val();
+						var num = Number(chargeCurrVal);
+						if(isNaN(num) || num==0) {
+							layer.msg('璇疯緭鍏ユ暟瀛�');
+							return;
+						}
+						var tmp = {
+							charge_curr_max: num
+							,BattGroupId: batt.BattGroupId
+						}; 
+						var load;
+						// 璇锋眰璁剧疆鐢垫祦鐨勫悗鍙�
+						$.ajax({
+							type: 'post'
+							,async: true
+							,url: 'BattInfAction!update_charge'
+							,data: 'json='+JSON.stringify(tmp)
+							,dataType: 'json'
+							,beforeSend: function(){
+								load = layer.load(1);
+							}
+							,success: function(res) {
+								var rs = JSON.parse(res.result);
+								// 鍏抽棴绛夊緟妗�
+								layer.close(load);
+								//console.log(rs);
+								if(rs.code == 1) {
+									// 璁剧疆寮瑰嚭妗嗕俊鎭�
+									layer.msg('璁剧疆鎴愬姛锛�');
+									layer.close(index);
+									// 鍏呯數鐢垫祦
+									$('#ChargeCurrSet').testVal('option', 'allOpts', {
+										regVal: true
+										,update: true
+										,min: 0
+										,max: num
+										,msg: '鍙栧�艰寖鍥�0~'+num+'A'
+									});
+									
+									// 璁剧疆鏂囨湰鍊�
+									$('#ChargeCurrSetLabel .val-range').text('0~'+num);
+								}else {
+									layer.msg('璁剧疆澶辫触!璇烽噸鏂拌缃�');
+								}
+							}
+							
+						});
+					} 
+				});
+			});
 			
 			// 绐楀彛澶у皬鏀瑰彉
 			$(window).resize(function() {
@@ -4428,13 +4519,15 @@
 			
 			// 鐢佃矾鎷撴墤鍥惧彸閿彍鍗�
 			var menuItems = [
-				{txt: '鏈烘埧鐘舵�佹煡璇�', cla: 'target', data:{target: 'batt-state-manage.jsp'}},
-				{txt: '鏈烘埧娴侀噺缁熻鏌ヨ', cla: 'target', data:{target: 'batt-traffic-statistics1.jsp'}},
+				{txt: '鍩虹珯鏈哄巻鍗�', cla: 'home-info-card'},
+				{txt: '鏈烘埧瀹炴椂鐘舵�佹煡璇�', cla: 'target', data:{target: 'batt-state-manage.jsp'}},
+				{txt: '璁惧娴侀噺缁熻鏌ヨ', cla: 'target', data:{target: 'batt-traffic-statistics1.jsp'}},
 				{txt: '鏈烘埧缁埅鑳藉姏鏌ヨ', cla: 'target', data: {target: 'batt-life-manage.jsp'}},
 				{txt: '璁惧鍏呮斁鐢垫ā鍧楃姸鎬�', cla:'target', data: {target: 'equip-charge-param.jsp'}},
+				{txt: '鏈烘埧鍘嗗彶浜嬩欢鏌ヨ', cla:'target', data: {target: 'batt-state-statistical.jsp'}},
 			];
 			// 缁欒〃鏍兼坊鍔犺嚜宸辩殑鍙抽敭鑿滃崟
-			$('#contai').on('mousedown','.ele-circle',function(e){
+			$('#contai').on('mousedown','.ele-circle canvas',function(e){
 				var batt = getBatt();
 				if (e.which == 3) {
 					var disX = (e || event).clientX + 10;	//鑾峰彇榧犳爣鐐瑰嚮鐨勬í鍧愭爣
@@ -4444,6 +4537,7 @@
 				}
 			});
 			
+			// 鐐瑰嚮鍙抽敭鑿滃崟璺宠浆
 			$('body').on('click', '#rightMenu .target', function() {
 				var batt = getBatt();
 				var pageName = $(this).data('data').target;
@@ -4452,8 +4546,16 @@
 				var county = batt.StationName5;
 				var home = batt.StationName;
 				var battid = batt.BattGroupId;
+				
 				// 瀹炵幇璺宠浆
 				window.open(skipUrl(pageName, province, city, county, home, battid));
+			});
+			
+			// 鐐瑰嚮鍩虹珯鏈哄巻鍗�
+			$('body').on('click', '#rightMenu .home-info-card', function() {
+				var batt = getBatt();
+				// 鏄剧ず鍩虹珯鏈哄巻鍗�
+				showHomeInfo(batt.StationId);
 			});
 			
 			// 宸ュ叿鏉℃暣浣撴牱寮�
@@ -4470,8 +4572,8 @@
 					homeid: batt.StationId,
 					battid: batt.BattGroupId
 				};
-				findBattinfByBattGroupId(batt.BattGroupId);
-				findStationInfoByStation(batt);
+				// 鏄剧ず鍩虹珯鏈哄巻鍗�
+				showHomeInfo(batt.StationId);
 				// 鏍规嵁鏁版嵁瀹氫綅
 				localSideBar(treeView, treeView.container, tmp);
 			});
@@ -4872,6 +4974,86 @@
 				//console.info(rs);
 				return rs;
 			}
+			
+			// 璁惧杩涚▼鏄剧ず
+			var threadInfoSearch = {
+				num: gprs.threadinfo,
+				dev_id:910000001 
+			};
+			
+			// 鐐瑰嚮璁惧杩涚▼鎸夐挳
+			$('#threadInfo').click(function() {
+				console.log(threadInfoSearch);
+				SendDeviceThreadInfo(threadInfoSearch,function(data){
+					searchDeviceThreadInfo({dev_id:910000001});
+				});
+			});
+			
+			
+			
+			
+			//缁橤PRS鍙戦�佹寚瀹氱殑鍛戒护锛岃幏鍙朅T杩斿洖鍊�
+			function SendDeviceThreadInfo(param,callback){
+				$.ajax({ 	
+			        type:"post", 								
+			        url: "Bts_gprs_stateAction_action_update_bts_task_inf",						
+			        async:true,				
+			        dataType:'json',
+			        data:'json='+JSON.stringify(param),		
+			        success: function(data){ 
+						var model = eval('('+data.result+')');
+						console.info(model);
+						if(callback && typeof callback == 'function'){
+							callback(model);
+						}
+		        	},error:function(e){
+		        		var model = {
+		        			code:0,
+		        			data:e,
+		        			msg:'閫氫俊澶辫触'
+		        		};
+		        		if(callback && typeof callback == 'function'){
+							callback(model);
+						}
+		        	} 				
+				});
+			}
+			
+			//鏌ヨ璁惧鐨勮繘绋嬩俊鎭�
+			function searchDeviceThreadInfo(param,callback){
+				$.ajax({ 	
+			        type:"post", 								
+			        url: "Bts_gprs_stateAction_action_serchByCondition",						
+			        async:true,				
+			        dataType:'json',
+			        data:'json='+JSON.stringify(param),		
+			        success: function(data){ 
+						var model = eval('('+data.result+')');
+						console.info(model);
+						var btsTaskInf = model.data[0].bts_task_inf;
+						layer.open({
+							title: '璁惧杩涚▼',
+							width: 380,
+							height: 450,
+							content: '<pre>'+btsTaskInf+'</pre>'
+						});
+						
+						if(callback && typeof callback == 'function'){
+							callback(model);
+						}
+		        	},error:function(e){
+		        		var model = {
+		        			code:0,
+		        			data:e,
+		        			msg:'閫氫俊澶辫触'
+		        		};
+		        		if(callback && typeof callback == 'function'){
+							callback(model);
+						}
+		        	} 				
+				});
+			}
+			
 		});
 		
 		// 鏈哄巻鍗℃ā鍧�

--
Gitblit v1.9.1