| | |
| | | <div class="fg-panel-header">筛选</div>
|
| | | <div class="fg-panel-content">
|
| | | <fieldset data-role="controlgroup">
|
| | | <p>维护区</p>
|
| | | <select id="privince" data-mini="true">
|
| | | <option value="">全部</option> |
| | | </select>
|
| | | <p>机房名称</p>
|
| | | <p>省</p>
|
| | | <select id="mainteArea" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>市</p>
|
| | | <select id="city" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>电池组名称</p>
|
| | | <select id="battgroup_name" data-mini="true">
|
| | | <p>区/县</p>
|
| | | <select id="country" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | </select>
|
| | | <p>机房站点</p>
|
| | | <select id="homeName" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>蓄电池组</p>
|
| | | <select id="battgroup_name" data-mini="true">
|
| | | <option value="0">全部</option>
|
| | | </select>
|
| | | <p>电池状态</p>
|
| | | <select id="eleStatus" data-mini="true">
|
| | | <option value="100">全部</option>
|
| | |
| | | var temp={
|
| | | binf:{
|
| | | num:$('#eleStatus').val(), //电池状态
|
| | | StationName:$('#city').val(), //机房名
|
| | | StationName1:$('#privince').val(), //维护区
|
| | | BattGroupId:$('#battgroup_name').val(), //电池组名称
|
| | | StationName1:$('#mainteArea').val(),
|
| | | StationName2:$('#city').val(),
|
| | | StationName5: $('#country').val(),
|
| | | StationName:$('#homeName').val(),
|
| | | BattGroupId:$('#battgroup_name').val(),
|
| | | },
|
| | | page:{
|
| | | pageSize:Page.pageSize, //页面大小
|
| | |
| | | min_num = value;
|
| | | return day_num+"天"+hour_num+"小时"+min_num+"分";
|
| | | }
|
| | | |
| | | //点击筛选弹出选择框时,查询维护区中的枢纽类型(尝试加载就返回数据)
|
| | | //页面加载时查询省
|
| | | $.post("BattInfAction_serchByStation",null,function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | console.info(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=$("#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()
|
| | | };
|
| | | //console.info(data);
|
| | | // 请求获取当前省下的市
|
| | | $.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();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | if(data.code==1 && data.data.length>0){
|
| | | var $select=$("#privince");
|
| | | $select.text("");
|
| | | for(var i=0;i<=data.data.length;i++){
|
| | | $option=$("<option></option>");
|
| | | if(i==0){
|
| | | $option.html("全部(共"+data.sum+"节)"); |
| | | $option.attr("value", ""); |
| | | $select.siblings('span').text($option.text()); |
| | | }else{
|
| | | $option.text(data.data[i-1].StationName1);
|
| | | $option.attr("value",data.data[i-1].StationName1); |
| | | } |
| | | $select.append($option);
|
| | | } |
| | | } |
| | | findStationNamebyStationname1();
|
| | | });
|
| | | |
| | | //当维护区的值变换时更新机房站点
|
| | | $('#privince').change(function(){ |
| | | findStationNamebyStationname1();
|
| | | });
|
| | | |
| | | //根据维护区查询站点
|
| | | function findStationNamebyStationname1(){
|
| | | var selectvalue=$("#privince option:selected").val();
|
| | | //alert(selectvalue);
|
| | | $.post("BattInfAction_serchByStationName","bif.StationName1="+selectvalue,function(data){
|
| | | data=data.result;
|
| | | data=eval("("+data+")");
|
| | | console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | var $select = $("#city");
|
| | | $select.text("");
|
| | | for(var i=0;i<data.data.length;i++){
|
| | | var $option=$("<option></option>");
|
| | | $option.text(data.data[i].StationName);
|
| | | $option.attr("value",data.data[i].StationName);
|
| | | if(i==0){
|
| | | //$option.html("全部(共"+data.sum+"种)"); |
| | | //$option.attr("value", "");
|
| | | $select.siblings('span').text($option.text()); |
| | | }else{
|
| | | |
| | | } |
| | | $select.append($option);
|
| | | }
|
| | | }
|
| | | findserchByBattGroupNamebystationname();
|
| | | });
|
| | | }
|
| | | //当市改变时更新区/县
|
| | | 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].StationName,
|
| | | stationid:data.data[i-1].StationId,
|
| | | txt:data.data[i-1].StationName3,
|
| | | });
|
| | | }
|
| | | }
|
| | | //console.info(111111111111111);
|
| | | updataSelStation($Ostation_name1, arr);
|
| | | }
|
| | | |
| | | findserchByBattGroupNamebystationname(); |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //根据机房获取电池组 |
| | | function findserchByBattGroupNamebystationname(){
|
| | | var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
|
| | | |
| | | var data = {
|
| | | StationName1: $("#mainteArea").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#country").val(),
|
| | | StationName: $("#homeName").val(),
|
| | | StationId: stationid
|
| | | };
|
| | |
|
| | | $("#city").on('change',function(){
|
| | | //console.info(data);
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "BattInfAction!serchBattByStation", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(data), |
| | | success: function(data){
|
| | | data = data.result;
|
| | | data = eval("("+data+")");
|
| | | //console.warn();
|
| | | //console.info(data);
|
| | | //console.info(data.code); |
| | | if(data.code==1&&data.data.length>0){
|
| | | var $Ostation_name1=$("#battgroup_name");
|
| | | $Ostation_name1.text("");
|
| | | var arr = new Array();
|
| | | for(var i=0;i<=data.data.length;i++)
|
| | | {
|
| | | if(i == 0){
|
| | | arr.push({
|
| | | val:0,
|
| | | txt:"全部(共"+data.data.length+"个)",
|
| | | });
|
| | | }else{
|
| | | arr.push({
|
| | | val:data.data[i-1].BattGroupId,
|
| | | txt:data.data[i-1].BattGroupName,
|
| | | });
|
| | | }
|
| | | }
|
| | | updataSel($Ostation_name1, arr);
|
| | | }
|
| | | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | //当省改变时更新市
|
| | | $('#mainteArea').change(function(){
|
| | | findCity(); |
| | | });
|
| | | //当市改变时改变区/县
|
| | | $('#city').change(function(){
|
| | | findCounty(); |
| | | });
|
| | | //当区/县改变时改变机房
|
| | | $('#country').change(function(){
|
| | | findStationNamebyStationname1(); |
| | | }); |
| | | //当机房改变时,更新电池组 |
| | | $('#homeName').change(function(){
|
| | | findserchByBattGroupNamebystationname();
|
| | | });
|
| | | |
| | | //根据维护区和机房查询蓄电池组
|
| | | function findserchByBattGroupNamebystationname(){
|
| | | var station_name1=$("#privince option:selected").val();
|
| | | var station_name=$("#city option:selected").val();
|
| | | $.post("BattInfAction_serchByBattGroupName","bif.StationName1="+station_name1+"&bif.StationName="+station_name,function(data){
|
| | | data=data.result;
|
| | | //console.info(data);
|
| | | data=eval("("+data+")");
|
| | | //console.info(data.data.length); |
| | | if(data.code==1 && data.data.length>0){ |
| | | var $Obattgroup_name = $("#battgroup_name");
|
| | | $Obattgroup_name.text("");
|
| | | for(var i=0;i<=data.data.length;i++){
|
| | | var $option = $("<option></option>");
|
| | | if(i!=0){
|
| | | $option.text(data.data[i-1].BattGroupName+"-"+data.data[i-1].MonCount+"节");
|
| | | $option.attr("value",data.data[i-1].BattGroupId);
|
| | | }else{
|
| | | $option.html("全部(共"+data.sum+"种)"); |
| | | $option.attr("value", "0");
|
| | | $Obattgroup_name.siblings('span').text($option.text()); |
| | | }
|
| | | $Obattgroup_name.append($option);
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | |
| | | //设置页面的跳转链接
|
| | | function setPage(){
|
| | | if(Page.pageCurr <= 1){
|