From ca3854730d3309f067075d1f0ce59ddf3e890699 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 27 九月 2018 09:00:13 +0800
Subject: [PATCH] 修改显示10条内容

---
 gx_tieta/WebRoot/index.jsp          |    2 +-
 gx_tieta/WebRoot/ele-param.jsp      |    3 ++-
 gx_tieta/WebRoot/dataManage.jsp     |   47 +++++++++++++++++++++++++++++++++++++++++++++--
 gx_tieta/WebRoot/pages/css/base.css |    3 ++-
 4 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/gx_tieta/WebRoot/dataManage.jsp b/gx_tieta/WebRoot/dataManage.jsp
index 38b5024..ad612e4 100644
--- a/gx_tieta/WebRoot/dataManage.jsp
+++ b/gx_tieta/WebRoot/dataManage.jsp
@@ -56,6 +56,10 @@
 							</select>
 						</td>
 						<td>
+							<select id="city" name="bmd.binf.StationName2">
+							</select>
+						</td>
+						<td>
 							<select id="station_name" name="bmd.binf.StationName">
 							</select>
 						</td>
@@ -615,12 +619,51 @@
 			}else{
 				$("#station_name1").text('').html('<option>鏆傛棤鍙祴缁存姢鍖�</option>');
 			}
-			findStationNamebyStationname1();		
+			findCity();		
 		});
 	});
 	
-	//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
+	// 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯�
+	function findCity() {
+		var data = {
+			StationName1: $("#station_name1").val()
+		};
+		// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
+		$.ajax({ 	
+	        type: "post", 				
+	        url: "BattInfAction!serchStationName2",				
+	        async:true,				
+	        dataType:'json',
+	        data:"json = "+JSON.stringify(data),	
+	        success: function(data){
+	        	var rs = JSON.parse(data.result);
+	        	var $select = $("#city");
+	        	if(rs.code == 1) {
+	        		var _data= rs.data;
+	        		// 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁
+					var optsList = [];
+					for(var i=0;i<_data.length;i++){
+						var __data = _data[i];
+						var tmp = getOptionsData(__data.StationName2, __data.StationName2, __data);
+						optsList.push(tmp);
+					}
+					// 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃
+					createOptions($select, optsList, true);
+	        	}else {
+	        		$select.text('').html('<option>鏆傛棤鍙祴甯�</option>');
+	        	}
+	        	findStationNamebyStationname1();
+	        }
+	    });
+	}
+	
+	//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯�
 	$('#station_name1').change(function(){
+		findCity();
+	});
+	
+	//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
+	$('#city').change(function(){
 		findStationNamebyStationname1();
 	});
 	
diff --git a/gx_tieta/WebRoot/ele-param.jsp b/gx_tieta/WebRoot/ele-param.jsp
index e53414e..9250770 100644
--- a/gx_tieta/WebRoot/ele-param.jsp
+++ b/gx_tieta/WebRoot/ele-param.jsp
@@ -700,7 +700,8 @@
 			var json = JSON.stringify({
 				binf:{
 					StationName:$('#station_name').val(),
-					StationName1:$('#station_name1').val(),
+					StationName2:$('#city').val(),
+					StationName1:$('#station_name1').val()
 				},
 				page:Page,
 			});
diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp
index 53f5b4b..99c41b4 100644
--- a/gx_tieta/WebRoot/index.jsp
+++ b/gx_tieta/WebRoot/index.jsp
@@ -1989,7 +1989,7 @@
 				console.log(list.length);
 				allStation = new Array();
 				if(list!=undefined && list.length>0){
-					for(var i=0;i<list.length;i++){
+					for(var i=0;i<10;i++){
 						var tmp = {
 							binformation:list[i].data,
 							alarm_num:list[i].code,		//鍛婅鏁扮洰
diff --git a/gx_tieta/WebRoot/pages/css/base.css b/gx_tieta/WebRoot/pages/css/base.css
index 431c56c..7ecb202 100644
--- a/gx_tieta/WebRoot/pages/css/base.css
+++ b/gx_tieta/WebRoot/pages/css/base.css
@@ -28,7 +28,8 @@
 }
 /* ie bug锛歵h 涓嶇户鎵� text-align */
 th {
-    text-align:inherit;
+    /* text-align:inherit; */
+    text-align: center;
 }
 /* 鍘婚櫎榛樿杈规 */
 fieldset,img {

--
Gitblit v1.9.1