From 2fe250ece8de95b3f70172fe5b45793ab6a3084a Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期五, 18 一月 2019 17:30:50 +0800 Subject: [PATCH] 未审批可更改 --- gx_tieta/WebRoot/ele_statistics.jsp | 130 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 109 insertions(+), 21 deletions(-) diff --git a/gx_tieta/WebRoot/ele_statistics.jsp b/gx_tieta/WebRoot/ele_statistics.jsp index 7e7fcb1..ba40519 100644 --- a/gx_tieta/WebRoot/ele_statistics.jsp +++ b/gx_tieta/WebRoot/ele_statistics.jsp @@ -13,7 +13,7 @@ <title><s:text name="Batt_information_query"/></title> <link href="css/basic.css" type="text/css" rel="stylesheet" /> <link href="css/ele_statistics.css" type="text/css" rel="stylesheet"> - + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> </head> <body> @@ -39,6 +39,8 @@ <td>鐪�</td> <!-- 甯� --> <td>甯�</td> + <!-- 鍖�/鍘� --> + <td>鍖�/鍘�</td> <!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� --> <td><s:text name="Computer_site"/></td> <!-- 钃勭數姹犵粍 --> @@ -62,6 +64,9 @@ <td> <select id="city" name="bd.binf.StatioName2"> </select> + </td> + <td> + <select id="county" name="bd.binf.StatioName5"></select> </td> <td> <select id="station_name" name="bd.binf.StationName"> @@ -186,9 +191,9 @@ </div> <!-- 鍙抽敭鑿滃崟鍐呭 --> <div id="right-menu"> - <a href="" onclick="jumpPage()" target="_blank"><s:text name="Check_battery_test_record"/></a> <!-- 鏌ョ湅鐢垫睜娴嬭瘯璁板綍 --> - <a href="" onclick="jumpBattgroupStatic(this)" target="_blank"><s:text name="Check_battery_statistical_analysis_queries"/></a> <!-- 鏌ョ湅鐢垫睜缁勭粺璁″垎鏋愭煡璇� --> - <a href="" onclick="jumpBattmonomertatic(this)" target="_blank"><s:text name="Check_battery_monomer_record_behind"/></a> <!-- 鏌ョ湅鐢垫睜钀藉悗鍗曚綋璁板綍 --> + <a href="javascript:;" onclick="jumpPage()" target="_blank"><s:text name="Check_battery_test_record"/></a> <!-- 鏌ョ湅鐢垫睜娴嬭瘯璁板綍 --> + <a href="javascript:;" onclick="jumpBattgroupStatic(this)" target="_blank"><s:text name="Check_battery_statistical_analysis_queries"/></a> <!-- 鏌ョ湅鐢垫睜缁勭粺璁″垎鏋愭煡璇� --> + <a href="javascript:;" onclick="jumpBattmonomertatic(this)" target="_blank"><s:text name="Check_battery_monomer_record_behind"/></a> <!-- 鏌ョ湅鐢垫睜钀藉悗鍗曚綋璁板綍 --> <a href="eleBrdwMaint.jsp" target="_blank"><s:text name="Check_abnormal_battery_maintenance_record"/></a> <!-- 鏌ョ湅寮傚父鐢垫睜缁存姢璁板綍 --> </div> @@ -211,6 +216,7 @@ </body> <script type="text/javascript" src="js/ele_statistics.js"></script> <script type="text/javascript" src="js/createTab.js"></script> +<script type="text/javascript" src="src/layui.all.js"></script> <script type="text/javascript"> var permits; <% Object obj=session.getAttribute("permits"); @@ -248,15 +254,20 @@ var battinfo_list = new Array(); var formjson; $(document).ready(function(){ + $(window).resize(function() { + setTblWidth($('#tbHead'), $('#maintence_infor')); + }); + $("#container a").eq(0).click(function(){ var jsontemp = $("#search_form").serialize(); if(jsontemp != formjson){ $('#pageCurr').val(1); formjson = jsontemp; } - loading.showLoading(); + var load = layer.load(1); //console.info($("#search_form").serialize()); var temp = createSearchForm(); + console.info(temp); var json = JSON.stringify(temp); battinfo_list = new Array(); $.post("Batt_Maint_DealarmAction_serchByConditionNew","result="+json,function(data){ @@ -324,11 +335,13 @@ $('#tbHead').text(''); $('#maintence_infor').text(''); //alert(newArrTd); - //alert(ArrayTh); + //alert(ArrayTh); + //createFullTbl($('#tbHead')); createTable('tbHead','tbFixed',ArrayTh.length,ArrayTh,newArrTd); createTable('maintence_infor','eleTab',ArrayTh.length,ArrayTh,newArrTd); setTblSize($('#tbHead'), $('#maintenced_infor')); + setTblWidth($('#tbHead'), $('#maintence_infor')); //榧犳爣鐐瑰嚮琛ㄦ牸瑙﹀彂浜嬩欢 $('#maintence_infor .eleTab tbody tr').mousedown(function(e){ $('#maintence_infor .eleTab tbody tr').css('background-color',''); @@ -371,10 +384,11 @@ $('#pageCurr').val(1); $('#maintence_infor').text(''); } - loading.hideLoading(); + + layer.close(load); }).error(function(){ noContent.showNoContent("鏌ヨ澶辫触,璇锋鏌ョ綉缁滆繛鎺ワ紒"); - loading.hideLoading(); + layer.close(load); }); }); }); @@ -516,9 +530,12 @@ function jumpPage(){ if(Page!=undefined){ var batt = battinfo_list[trIndex]; - console.info(batt); + //console.info(batt); + var url = skipUrl("charge-test.jsp",batt.StationName1,batt.StationName2,batt.StationName5,batt.StationName,batt.BattGroupId); + //console.info(url); + window.open(url); //this.setAttribute("href","charge-test.jsp?battgroupId="+battgroupId); - $('#right-menu a').eq(0).attr("href","charge-test.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId); + //$('#right-menu a').eq(0).attr("href","charge-test.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId); } } @@ -528,7 +545,9 @@ var batt = battinfo_list[trIndex]; //console.info(batt); //this.setAttribute("href","charge-test.jsp?battgroupId="+battgroupId); - $(dom).attr("href","eleAnalyse.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId); + var url = skipUrl("eleAnalyse.jsp",batt.StationName1,batt.StationName2,batt.StationName5,batt.StationName,batt.BattGroupId); + window.open(url); + //$(dom).attr("href","eleAnalyse.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId); } } @@ -538,12 +557,16 @@ var batt = battinfo_list[trIndex]; //console.info(batt); //this.setAttribute("href","charge-test.jsp?battgroupId="+battgroupId); - $(dom).attr("href","eleMonomer.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId+"&battmon_num=0"); + var url = skipUrl("eleMonomer.jsp",batt.StationName1,batt.StationName2,batt.StationName5,batt.StationName,batt.BattGroupId); + window.open(url); + //$(dom).attr("href","eleMonomer.jsp?battgroupId="+batt.BattGroupId+"&stationId="+batt.StationId+"&battmon_num=0"); } } - + // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + var filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){ data=data.result; @@ -571,10 +594,15 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -599,27 +627,79 @@ }else { $select.text('').html('<option>鏆傛棤鍙祴甯�</option>'); } - findStationNamebyStationname1(); + findCounty(); } }); } + // 鏌ヨ鍖�/鍘� + function findCounty(isLoad) { + var tmp = { + StationName1:$("#station_name1").val(), + StationName2:$("#city").val(), + }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 鏌ヨ鍖哄幙 + $.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(); + } + }); + } + //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯� $('#station_name1').change(function(){ - findCity(); + findCity(true); }); //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#city').change(function(){ - findStationNamebyStationname1(); + findCounty(true); + }); + + //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 + $('#county').change(function(){ + findStationNamebyStationname1(true); }); //鏍规嵁鐪侊紝甯傛煡璇㈢珯鐐� - function findStationNamebyStationname1(){ + function findStationNamebyStationname1(isLoad){ var tmp = { StationName1:$("#station_name1").val(), - StationName2:$("#city").val() + StationName2:$("#city").val(), + StationName5: $("#county").val() }; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } //var selectvalue=$("#station_name1 option:selected").val(); //alert(selectvalue); $.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){ @@ -648,16 +728,21 @@ } $('#station_name').change(function(){ - findserchByBattGroupNamebystationname(); + findserchByBattGroupNamebystationname(true); }); //鏍规嵁鐪侊紝甯傚拰鏈烘埧鏌ヨ钃勭數姹犵粍 - function findserchByBattGroupNamebystationname(){ + function findserchByBattGroupNamebystationname(isLoad){ var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):''; + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } // 鏋勯�犳煡璇㈡潯浠� var tmp = { StationName1:$("#station_name1").val(), StationName2:$("#city").val(), + StationName5: $("#county").val(), StationName: $("#station_name").val(), StationId: stationid }; @@ -692,6 +777,8 @@ }else{ $("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>'); } + + layer.close(filterLoad); }); } @@ -909,6 +996,7 @@ binf:{ StationName1:$('#station_name1').val(), StationName2:$('#city').val(), + StationName5:$('#county').val(), StationName:$('#station_name').val(), BattGroupId:$('#battgroup_name').val(), BattProducer:$('#batt_producer').val(), -- Gitblit v1.9.1