From 43fe18b40a84b82ca5c5f1a88abb89ea168f95f5 Mon Sep 17 00:00:00 2001 From: 81041 <81041@192.168.10.23> Date: 星期一, 12 十一月 2018 10:12:26 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/dischargetest.jsp | 118 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 99 insertions(+), 19 deletions(-) diff --git a/gx_tieta/WebRoot/dischargetest.jsp b/gx_tieta/WebRoot/dischargetest.jsp index ef9044d..7df1b5a 100644 --- a/gx_tieta/WebRoot/dischargetest.jsp +++ b/gx_tieta/WebRoot/dischargetest.jsp @@ -17,6 +17,7 @@ <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome-animation.min.css"> <link rel="stylesheet" type="text/css" href="css/whyc-ui.css"> + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> <style> .confirm { z-index: 999; @@ -85,7 +86,8 @@ <thead> <tr> <th>鐪�</th> - <th>甯�<!-- 缁存姢鍖� --></th> + <th>甯�</th> + <th>鍖�/鍘�</th> <th><s:text name="Computer_site"/><!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� --></th> <th><s:text name="Battery_name"/><!-- 钃勭數姹犵粍鍚嶇О --></th> </tr> @@ -98,6 +100,10 @@ </td> <td> <select id="city"> + </select> + </td> + <td> + <select id="county"> </select> </td> <td> @@ -533,6 +539,7 @@ <script type="text/javascript" src="js/elecircle.content.js"></script> <script type="text/javascript" src="js/mypattern.js"></script> <script type="text/javascript" src="js/whyc-jqueryui.js"></script> + <script type="text/javascript" src="src/layui.all.js"></script> <script type="text/javascript"> var arrTh = new Array(); var arrTd = new Array(); @@ -1126,8 +1133,10 @@ } } - + // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + var filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("BattInfAction!serchAllStation",null,function(data){ data=data.result; @@ -1152,10 +1161,16 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -1180,7 +1195,8 @@ }else { $select.text('').html('<option>鏆傛棤鍙祴甯�</option>'); } - findStationNamebyStationname1(); + // 鏌ヨ鍖�/鍘� + findCounty(); } }); } @@ -1189,19 +1205,72 @@ //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯� $('#station_name1').change(function(){ - findCity(); + findCity(true); }); //褰撳競鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#city').change(function(){ - findStationNamebyStationname1(); + findCounty(true); }); - //鏍规嵁缁存姢鍖烘煡璇㈢珯鐐� - function findStationNamebyStationname1(){ + + //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 + $('#county').change(function(){ + findStationNamebyStationname1(true); + }); + + // 鏌ヨ鍖�/鍘� + function findCounty(isLoad) { var tmp = { StationName1:$("#station_name1").val(), - StationName2:$("#city").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(); + } + }); + } + + //鏍规嵁缁存姢鍖烘煡璇㈢珯鐐� + function findStationNamebyStationname1(isLoad){ + var tmp = { + StationName1:$("#station_name1").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){ @@ -1216,7 +1285,7 @@ var _attr = { StationId: __data.StationId }; - var tmp = getOptionsData(__data.StationName3, __data.StationName3, __data, _attr); + var tmp = getOptionsData(__data.StationName3, __data.StationName, __data, _attr); optsList.push(tmp); } @@ -1230,20 +1299,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(), - StationName3: $("#station_name").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(); @@ -1273,6 +1346,8 @@ }else{ $("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>'); } + + layer.close(filterLoad); }); } // 闅愯棌琛ㄦ牸鍔熻兘鎸夐挳鍒楄〃 @@ -1417,9 +1492,9 @@ if(regEquipType(dev_id, globalPattern.LD9) || regEquipType(dev_id, globalPattern.BTS)) { if(confirm("纭鍋滄"+dev_id+"璁惧鐨勬祴璇曞悧锛�")){ if(regEquipType(dev_id, globalPattern.LD9)){ - sendLD9DischargeParam(CMD_Stop); + sendLD9DischargeParam(CMD_Stop,true); }else if(regEquipType(dev_id, globalPattern.BTS)){ - checkDischargeParam(CMD_Stop); + checkDischargeParam(CMD_Stop,true); } } } @@ -1482,7 +1557,8 @@ loading.showLoading(); flushDischargeParam({ num:CMD_GetDischargeParm, - dev_id:$('#dev_id').val() + dev_id:$('#dev_id').val(), + TestCmd:0, }); }); @@ -1585,13 +1661,16 @@ } //鍚戝鎴风鍙戦�佹寚瀹氱殑鍛戒护 - function checkDischargeParam(cmd){ + function checkDischargeParam(cmd,stop){ var dev_id = $('#main .tbl-body tbody tr.active').find('td').eq(2).text(); loading.showLoading($('#main')); + var distype = stop?0:$('#discharge_type').val(); var param = { num:cmd, - dev_id:dev_id + dev_id:dev_id, + TestCmd:distype }; + $.ajax({ type: "post", url:"Fbs9100_setparamAction_action_serchbyDev_id", @@ -1836,6 +1915,7 @@ updateUserDevinfo(); //璁剧疆鏀剧數鍙傛暟鎴愬姛鍚庝慨鏀圭敤鎴锋坊鍔犵殑鏀剧數璁惧淇℃伅 flushDischargeParam({ num:CMD_GetDischargeParm, + TestCmd:$('#discharge_type').val(), dev_id:$('#dev_id').val() }); paramsBtn.startTest(true); -- Gitblit v1.9.1