From e2ca120ce17355241d1d64d6bff54a7d5d5af7e6 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期四, 01 十一月 2018 10:13:55 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whychdw@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/eleAnalyse.jsp | 131 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 107 insertions(+), 24 deletions(-) diff --git a/gx_tieta/WebRoot/eleAnalyse.jsp b/gx_tieta/WebRoot/eleAnalyse.jsp index 29e5c4d..352499e 100644 --- a/gx_tieta/WebRoot/eleAnalyse.jsp +++ b/gx_tieta/WebRoot/eleAnalyse.jsp @@ -14,6 +14,7 @@ <link href="css/basic.css" type="text/css" rel="stylesheet" /> <link href="css/analyse.css" type="text/css" rel="stylesheet"> <link href="css/query.css" type="text/css" rel="stylesheet"> + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="js/echarts.js"></script> <script type="text/javascript" src="js/eleAnalyse.js"></script> <script type="text/javascript" src="js/frame.js"></script> @@ -59,6 +60,8 @@ <td>鐪�</td> <!-- 甯� --> <td>甯�</td> + <!-- 鍖�/鍘� --> + <td>鍖�/鍘�</td> <!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� --> <td><s:text name="Computer_site"/></td> <!-- 钃勭數姹犵粍 --> @@ -87,6 +90,10 @@ </td> <td> <select id="city" name="bd.binf.StationName2"> + </select> + </td> + <td> + <select id="county" name="bd.binf.StationName5"> </select> </td> <td> @@ -233,6 +240,7 @@ <!--椤佃剼鍐呭--> </body> <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"); @@ -305,7 +313,9 @@ } // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + var filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){ data=data.result; @@ -333,10 +343,16 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -361,27 +377,82 @@ }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){ @@ -411,20 +482,24 @@ // 鏍规嵁鏈烘埧鍚嶇О鏌ヨ鐢垫睜缁� $('#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'):''; // 鏋勯�犳煡璇㈡潯浠� var tmp = { StationName1:$("#station_name1").val(), StationName2:$("#city").val(), + StationName5:$("#county").val(), StationName: $("#station_name").val(), StationId: stationid }; - + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } //var station_name1=$("#station_name1 option:selected").val(); //var station_name=$("#station_name option:selected").val(); @@ -455,6 +530,8 @@ }else{ $("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>'); } + + layer.close(filterLoad); }); } @@ -468,6 +545,24 @@ }); createPictable(); + + //鐐瑰嚮鏇茬嚎閫夋嫨澶嶉�夋瀵硅〃鏍煎唴鐨勫閫夋鍏ㄩ儴閫変腑 + $('#tabEchartCon .tbFixed').on('click','table thead input',function(){ + if($(this).is(':checked')) + { + console.info($('#tabEchartCon .secCured table tbody input[type="checkbox"]').length); + $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',true); + }else{ + console.info(false); + $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',false); + } + }); + + $('#tabEchartCon .left .secCurve').on('click', 'input[type="checkbox"]', function(){ + createPicByTable(); + createMyTable(tbl_data); + }); + //鐢熸垚鏇茬嚎琛ㄦ牸閫夐」 function createPictable(){ var ArrLineTh=["<s:text name='BatteryID'/>","<input type='checkbox' checked='checked'/><s:text name='Curve_to_choose'/>"]; /* 鐢垫睜缁処D 鏇茬嚎閫夋嫨 */ @@ -482,21 +577,8 @@ } createCard($('#tabEchartCon .tbFixed'),ArrLineTh,ArrLineTd); createCard($('#tabEchartCon .secCurve'),ArrLineTh,ArrLineTd); - //鐐瑰嚮鏇茬嚎閫夋嫨澶嶉�夋瀵硅〃鏍煎唴鐨勫閫夋鍏ㄩ儴閫変腑 - $('#tabEchartCon .tbFixed').on('click','table thead input',function(){ - if($(this).is(':checked')) - { - console.info($('#tabEchartCon .secCured table tbody input[type="checkbox"]').length); - $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',true); - }else{ - console.info(false); - $('#tabEchartCon .secCured table tbody input[type="checkbox"]').prop('checked',false); - } - }); - $('#tabEchartCon .left .secCurve input[type="checkbox"]').click(function(){ - createPicByTable(); - createMyTable(tbl_data); - }); + + setTblWidth($('#tabEchartCon .tbFixed'), $('#tabEchartCon .secCurve')); } @@ -951,6 +1033,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