From f6ec7be038914b05ebca63fae87619ab5e386424 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期三, 31 十月 2018 10:59:09 +0800 Subject: [PATCH] 历史数据管理跳转 首页地图使用默认样式 --- gx_tieta/WebRoot/index.jsp | 2 gx_tieta/WebRoot/pages/js/common.js | 7 +++ gx_tieta/WebRoot/css/dtManage.css | 2 + gx_tieta/WebRoot/dataManage.jsp | 76 +++++++++++++++++++++++++++++++------ 4 files changed, 73 insertions(+), 14 deletions(-) diff --git a/gx_tieta/WebRoot/css/dtManage.css b/gx_tieta/WebRoot/css/dtManage.css index a9ce359..4fe3b5b 100644 --- a/gx_tieta/WebRoot/css/dtManage.css +++ b/gx_tieta/WebRoot/css/dtManage.css @@ -61,6 +61,7 @@ overflow:hidden; } .tbl-header table{ + width: 100%; position:absolute; border-collapse:collapse; } @@ -85,6 +86,7 @@ overflow:scroll; } .tbl-body table{ + width: 100%; position:absolute; top:-28px; border-collapse:collapse; diff --git a/gx_tieta/WebRoot/dataManage.jsp b/gx_tieta/WebRoot/dataManage.jsp index f0f53ae..8b0a7c8 100644 --- a/gx_tieta/WebRoot/dataManage.jsp +++ b/gx_tieta/WebRoot/dataManage.jsp @@ -40,6 +40,7 @@ <tr class="fWeight"> <td>鐪�</td> <!-- 鐪� --> <td>甯�</td> <!-- 甯� --> + <td>鍖�/鍘�</td> <!-- 鍖�/鍘� --> <td><s:text name="Computer_site"/></td> <!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� --> <td><s:text name="Battery"/></td> <td><s:text name="Battery_record"/></td> <!-- 鐢垫睜娴嬭瘯璁板綍 --> @@ -58,6 +59,10 @@ </td> <td> <select id="city" name="bmd.binf.StationName2"> + </select> + </td> + <td> + <select id="county" name="bmd.binf.StationName5"> </select> </td> <td> @@ -201,6 +206,7 @@ </body> <script type="text/javascript" src="js/createTab.js"></script> <script type="text/javascript" src="js/query.js"></script> +<script type="text/javascript" src="pages/js/common.js"></script> <script type="text/javascript"> var permits; <% Object obj=session.getAttribute("permits"); @@ -367,30 +373,27 @@ //閫変腑鍙抽敭鑿滃崟涓殑[鏌ョ湅鏁版嵁]閫夐」璺宠浆鍒板巻鍙叉暟鎹煡璇㈤〉闈㈤�変腑鎸囧畾鐨勭數姹犵粍 $('#right-menu .check_data').click(function(){ - var battgroupid=0; - var stationid = 0; + var batt = {}; //console.info(Alltestdata); $('.tbl-body table tbody tr').each(function(i){ if($(this).hasClass('b8cfe5')){ - battgroupid=Alltestdata[i].binf.BattGroupId; - stationid = Alltestdata[i].binf.StationId; + batt = Alltestdata[i].binf; } - }); - $(this).attr("href","charge-test.jsp?battgroupId="+battgroupid+"&stationId="+stationid); + }); + //console.log(batt); + $(this).attr("href", skipUrl('charge-test.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName)); }); //閫変腑鍙抽敭鑿滃崟涓殑[鏌ョ湅钀藉悗鍗曚綋缁熻鏁版嵁]閫夐」璺宠浆鍒板巻鍙叉暟鎹煡璇㈤〉闈㈤�変腑鎸囧畾鐨勭數姹犵粍 $('#right-menu .check_last').click(function(){ - var battgroupid=0; - var stationid = 0; + var batt = {}; //console.info(Alltestdata); $('.tbl-body table tbody tr').each(function(i){ if($(this).hasClass('b8cfe5')){ - battgroupid = Alltestdata[i].binf.BattGroupId; - stationid = Alltestdata[i].binf.StationId; + batt = Alltestdata[i].binf; } }); - $(this).attr("href","eleAnalyse.jsp?battgroupId="+battgroupid+"&stationId="+stationid); + $(this).attr("href", skipUrl('eleAnalyse.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName)); }); //椤甸潰鍐呭鏁版嵁杩涜鎿嶄綔鐨勬晥鏋� @@ -655,9 +658,48 @@ }else { $select.text('').html('<option>鏆傛棤鍙祴甯�</option>'); } - findStationNamebyStationname1(); + findCounty(); } }); + } + + // 鏌ヨ鍖�/鍘� + function findCounty() { + var tmp = { + StationName1:$("#station_name1").val(), + StationName2:$("#city").val(), + }; + + // 鏌ヨ鍖哄幙 + $.ajax({ + type: 'post', + async: true, + url: "BattInfAction!serchStationName5", + data: "json="+JSON.stringify(tmp), + success:function(data) { + var rs = JSON.parse(data.result); + var $select = $("#county"); + if(rs.code==1){ + var _data = rs.data; + // 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁 + var optsList = []; + for(var i=0;i<_data.length;i++){ + var __data = _data[i]; + var _attr = { + StationId: __data.StationId + }; + var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr); + optsList.push(tmp); + } + + // 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃 + createOptions($select, optsList, true); + }else{ + $select.text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>'); + } + findStationNamebyStationname1(); + } + }); } //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯� @@ -667,6 +709,11 @@ //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#city').change(function(){ + findCounty(); + }); + + //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 + $('#county').change(function(){ findStationNamebyStationname1(); }); @@ -674,7 +721,8 @@ function findStationNamebyStationname1(){ var tmp = { StationName1:$("#station_name1").val(), - StationName2:$("#city").val() + StationName2:$("#city").val(), + StationName5: $("#county").val() }; //var selectvalue=$("#station_name1 option:selected").val(); //alert(selectvalue); @@ -714,6 +762,7 @@ var tmp = { StationName1:$("#station_name1").val(), StationName2:$("#city").val(), + StationName5: $("#county").val(), StationName: $("#station_name").val(), StationId: stationid }; @@ -911,6 +960,7 @@ binf:{ StationName1:$('#station_name1').val(), StationName2:$('#city').val(), + StationName5: $('#county').val(), StationName:$('#station_name').val(), BattGroupId:$('#battgroup_name').val() }, diff --git a/gx_tieta/WebRoot/index.jsp b/gx_tieta/WebRoot/index.jsp index 2ea6ec1..7d2e767 100644 --- a/gx_tieta/WebRoot/index.jsp +++ b/gx_tieta/WebRoot/index.jsp @@ -627,7 +627,7 @@ centerMapByPoint(map); // 鏍规嵁褰撳墠鐢ㄦ埛璁惧畾鐨勪綅缃樉绀轰腑蹇冪偣 map.enableScrollWheelZoom(); map.disableDoubleClickZoom(); - map.setMapStyle({style: 'grayscale'}); // 璁剧疆鍦板浘鐨勯鏍� + //map.setMapStyle({style: 'grayscale'}); // 璁剧疆鍦板浘鐨勯鏍� // 娣诲姞鍦板浘绫诲瀷鎺т欢 map.addControl(new BMap.MapTypeControl()); // 缁欏湴鍥炬坊鍔犲伐鍏锋潯(鍦板浘-鍗槦-涓夌淮)鍜屾瘮渚嬪昂鎺т欢 diff --git a/gx_tieta/WebRoot/pages/js/common.js b/gx_tieta/WebRoot/pages/js/common.js index 19ee467..2991199 100644 --- a/gx_tieta/WebRoot/pages/js/common.js +++ b/gx_tieta/WebRoot/pages/js/common.js @@ -481,6 +481,7 @@ var outerHTML = i[0].outerHTML; return outerHTML; } + //鐢熸垚闃块噷鍥炬爣鐨勫厓绱� function create_fa_font(cla, color, data) { var i = $('<i class="fa"></i>'); @@ -496,3 +497,9 @@ var outerHTML = i[0].outerHTML; return outerHTML; } + +// 鐢熸垚璺宠浆鐨勯摼鎺� +function skipUrl(page, province, city, county, home) { + var str = page+'?province='+province+'&city='+city+'&county='+county+'&home='+home; + return str; +} \ No newline at end of file -- Gitblit v1.9.1