From 11cd3824e96bbe5644b0d0720dc4260f341468c2 Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期二, 25 十二月 2018 23:04:16 +0800 Subject: [PATCH] 修改 --- gx_tieta/WebRoot/mobil/ele-param2.html | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 281 insertions(+), 6 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html index 2cdd9c7..1acfb26 100644 --- a/gx_tieta/WebRoot/mobil/ele-param2.html +++ b/gx_tieta/WebRoot/mobil/ele-param2.html @@ -15,6 +15,41 @@ <script src="js/jquery-1.8.3.js"></script> <script src="mobilJs/jquery.mobile-1.4.5.min.js"></script> <style type="text/css"> + /*瑙勫畾闈㈡澘鐨勬牱寮�*/ + .ui-panel { + width: 80%; + } + .ui-panel-dismiss{ + width: 20%; + } + .ui-panel-inner{ + padding:0 !important; + } + .ui-collapsible-heading-toggle{ + padding-left: 1em !important; + } + .panel-header{ + padding: 8px 0; + font-size: 1.2em; + text-indent: 1em; + background-color: #DFDCDC; + } + /*瑙勫畾寮�鍏崇殑浣嶇疆*/ + .ui-flipswitch { + margin-left: 0.5em; + } + + .ui-field-contain{ + padding: 0 0.6em ; + } + .ui-field-contain { + border-bottom-color: #828282; + border-bottom-color: rgba(0,0,0,.15); + border-bottom-width: 1px; + border-bottom-style: none; + } + + .checkdata{ @@ -81,9 +116,41 @@ margin-top:8em; } </style> + <link rel="stylesheet" href="css/fgpanel.css"> </head> <body > - + <div class="fg-panel"> + <form> + <div class="fg-panel-header">绛涢��</div> + <div class="fg-panel-content"> + <fieldset data-role="controlgroup"> + <p>鐪�</p> + <select id="mainteArea" data-mini="true"> + <option value="">鍏ㄩ儴</option> + <option value="">涓�鏋㈢航</option> + <option value="">浜屾灑绾�</option> + <option value="">鏋㈢航妤�</option> + </select> + <p>甯�</p> + <select id="city" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + <p>鍖�/鍘�</p> + <select id="country" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + <p>鏈烘埧绔欑偣</p> + <select id="homeName" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + + </fieldset> + </div> + <div class="fg-panel-btn"> + <a href="javascript:panel.hide(true);" id="submit" data-role="button" class="ui-btn ui-mini ui-btn-b ui-shadow">纭畾</a> + </div> + </form> + </div> <div class="abs"> <div class="rel-full"> <div class="page-header bg-gay3"> @@ -93,7 +160,7 @@ </div> <div class="layui-col-xs6 layui-col-md10 full-height line-height40">鐢宠鐢垫睜缁勫畨瑁�</div> <div class="layui-col-xs3 layui-col-md1 full-height line-height40 t-align-right t-align-right"> - <!-- <button class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="homeInfo"><i class="fa fa fa-bars mrr4"></i>鍔熻兘</button> --> + <button onclick="javascript:panel.show();" class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="screen"><i class="fa fa fa-bars mrr4"></i>绛涢��</button> </div> </div> </div> @@ -163,6 +230,7 @@ <script src="src/layui.all.js"></script> <script type="text/javascript" src="js/tbl.js"></script> <script type="text/javascript" src="mobilJs/base.js"></script> + <script type="text/javascript" src="js/panel.js"></script> <script> var iframePopup = ''; function getEditButIndex(t){ @@ -185,6 +253,17 @@ }); + + + $(document).ready(function(){ + //setPage(); + $("#submit").click(function(){ + //newbattnum; + + //Page.pageCurr=1; + SearchParam(); + }); + }); // 鎼滅储鏈烘埧鑾峰彇鐒︾偣 @@ -246,7 +325,8 @@ $('#homeLocation').off('click').on('click.cjj', function() { var homeInfo = $(this).data('homeInfo'); console.warn(homeInfo); - searchBattLife(); + var temp=createSearchParam(); + searchBattLife(temp); }); @@ -370,10 +450,24 @@ setCookie("eleparm",json); } - + function SearchParam(){ + var temp = { + page:Page, + binf:{ + StationName1:$('#mainteArea').val(), + StationName2:$('#city').val(), + StationName5: $('#country').val(), + StationName:$('#homeName').val(), + }, + }; + console.info(temp); + searchBattLife(temp) + + + } // 鏌ヨ鍐呭 - function searchBattLife(){ - var temp = createSearchParam(); + function searchBattLife(temp){ + //var temp = createSearchParam(); var json = JSON.stringify(temp); var num =new Array(); var groupId = new Array(); @@ -468,6 +562,187 @@ } + + + + //椤甸潰鍔犺浇鏃舵煡璇㈢渷 + $.post("BattInfAction_serchByStation",null,function(data){ + data = data.result; + data = eval("("+data+")"); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#mainteArea"); + $Ostation_name1.text(""); + var arr = new Array(); + for(var i=0;i<=data.data.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)", + }); + }else{ + arr.push({ + val:data.data[i-1].StationName1, + txt:data.data[i-1].StationName1, + }); + } + } + updataSel($Ostation_name1, arr); + } + findCity(); + }); + + +//褰撶渷鏀瑰彉鏃舵洿鏂板競 + function findCity(){ + var data = { + StationName1: $("#mainteArea").val() + }; + $.ajax({ + type: "post", + url: "BattInfAction!serchStationName2", + async:true, + dataType:'json', + data:"json = "+JSON.stringify(data), + success: function(data){ + data = data.result; + data = eval("("+data+")"); + //console.info(data); + //console.info(data.code); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#city"); + $Ostation_name1.text(""); + var arr = new Array(); + for(var i=0;i<=data.data.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + txt:"鍏ㄩ儴(鍏�"+data.data.length+"涓�)", + }); + }else{ + arr.push({ + val:data.data[i-1].StationName2, + txt:data.data[i-1].StationName2, + }); + } + } + updataSel($Ostation_name1, arr); + } + findCounty(); + } + }); + } + +//褰撳競鏀瑰彉鏃舵洿鏂板尯/鍘� + function findCounty(){ + var data = { + StationName1: $("#mainteArea").val(), + StationName2:$("#city").val(), + }; + //console.info(data); + $.ajax({ + type: "post", + url: "BattInfAction!serchStationName5", + async:true, + dataType:'json', + data:"json = "+JSON.stringify(data), + success: function(data){ + data = data.result; + data = eval("("+data+")"); + //console.info(data); + //console.info(data.code); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#country"); + $Ostation_name1.text(""); + var arr = new Array(); + for(var i=0;i<=data.data.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + txt:"鍏ㄩ儴(鍏�"+data.data.length+"涓�)", + }); + }else{ + arr.push({ + val:data.data[i-1].StationName5, + txt:data.data[i-1].StationName5, + }); + } + } + updataSel($Ostation_name1, arr); + } + findStationNamebyStationname1(); + } + }); + } + + //褰撳尯鍘挎洿鏂版椂鏇存柊鏈烘埧 + function findStationNamebyStationname1(){ + var data = { + StationName1: $("#mainteArea").val(), + StationName2:$("#city").val(), + StationName5:$("#country").val() + }; + //console.info(data); + $.ajax({ + type: "post", + url: "BattInfAction!serchStationName3", + async:true, + dataType:'json', + data:"json = "+JSON.stringify(data), + success: function(data){ + data = data.result; + data = eval("("+data+")"); + //console.info(data); + //console.info(data.code); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#homeName"); + $Ostation_name1.text(""); + var arr = new Array(); + for(var i=0;i<=data.data.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + stationid:"", + txt:"鍏ㄩ儴(鍏�"+data.data.length+"涓�)", + }); + }else{ + arr.push({ + val:data.data[i-1].StationName3, + stationid:data.data[i-1].StationId, + txt:data.data[i-1].StationName3, + }); + } + } + //console.info(111111111111111); + updataSelStation($Ostation_name1, arr); + } + + + } + }); + } + + + + //褰撶渷鏀瑰彉鏃舵洿鏂板競 + $('#mainteArea').change(function(){ + findCity(); + }); + //褰撳競鏀瑰彉鏃舵敼鍙樺尯/鍘� + $('#city').change(function(){ + findCounty(); + }); + //褰撳尯/鍘挎敼鍙樻椂鏀瑰彉鏈烘埧 + $('#country').change(function(){ + findStationNamebyStationname1(); + }); + + + + $(function() { //鐐瑰嚮涓婁竴椤� -- Gitblit v1.9.1