| | |
| | | <option value="">全部</option>
|
| | | </select>
|
| | | <p>掉站</p>
|
| | | <select id="" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | <select id="is_stand" data-mini="true">
|
| | | <option value=100>全部</option>
|
| | | <option value=1>是</option>
|
| | | <option value=0>否</option>
|
| | | </select>
|
| | | <p>实际续航时间</p>
|
| | | <select id="" data-mini="true">
|
| | | <option value="">全部</option>
|
| | | <select id="actual_timelong" data-mini="true">
|
| | | <option value=0>全部</option>
|
| | | <option value=60>实际续航时间小于1小时</option>
|
| | | <option value=120>实际续航时间小于2小时</option>
|
| | | <option value=180>实际续航时间小于3小时</option>
|
| | |
| | | $('document').ready(function(){panel.show();});
|
| | |
|
| | | var arr=new Array(); //当前表格td数据
|
| | | var tblCon = $('.tbl-container');
|
| | | var Page = {
|
| | | pageSize:10, //每页的行数
|
| | | pageCurr:1, //当前页码数
|
| | | pageAll:0,
|
| | | };
|
| | | |
| | |
|
| | | $('document').ready(function(){panel.show();}); |
| | | |
| | | var arrTh = [ '设备ID', '机房名称', '实际容量','标称容量','实际电流','实际续航时间(min)','理论续航时间(min)','是否掉站'];
|
| | | dataArr = [];
|
| | | var startTime = "1980-01-01";
|
| | |
| | | setPage();
|
| | | $("#submit").click(function(){
|
| | | Page.pageCurr=1;
|
| | | searchBadBatt();
|
| | | searchBattLife();
|
| | | });
|
| | | });
|
| | | |
| | | //查询电池信息
|
| | | function searchBadBatt(){
|
| | | loadshow();
|
| | | var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
|
| | | var temp = createSearchForm();
|
| | | console.info(stationid);
|
| | | /*var temp = {
|
| | | StationName1:$("#station_name1").val(),
|
| | | StationName2:$("#city").val(),
|
| | | StationName5: $("#county").val(),
|
| | | StationName: $("#station_name").val(),
|
| | | StationId: stationid
|
| | | };*/
|
| | | //console.info(temp);
|
| | | var json = JSON.stringify(temp);
|
| | | //console.info(json);
|
| | | arrTd = new Array();
|
| | | $.post("Batt_Maint_DealarmAction_serchByConditionNew","result="+json,function(data){
|
| | | data=eval("("+data.result+")");
|
| | | //console.info(data);
|
| | | if(data.code==1 && data.data.length>0){
|
| | | data=data.data;
|
| | | //console.info(data); |
| | | arr=new Array();
|
| | | index=0;
|
| | | for(var i=0;i<data.length;i++){
|
| | | Page.pageAll=data[i].Size;
|
| | | arr[index++]=data[i].BattGroupId; //电池组id
|
| | | arr[index++]=data[i].StationName; //机房名称
|
| | | arr[index++]=data[i].StationIp; //机房IP
|
| | | arr[index++]=data[i].BattGroupName; //电池组名称
|
| | | arr[index++]=data[i].BattGroupNum; //电池组序号
|
| | | |
| | | }
|
| | | //console.info(Page);
|
| | | createTbl(tbl, arrTh, arr);
|
| | | |
| | | }else{
|
| | | $('#searchNull').popup('open');
|
| | | Page.pageAll = 0;
|
| | | }
|
| | | setPage();
|
| | | //console.info(Page);
|
| | | loadclose(); |
| | | }).error(function(){
|
| | | loadclose();
|
| | | $('#searchErr').popup('open');
|
| | | });
|
| | | |
| | | }
|
| | | |
| | |
|
| | |
|
| | | // 查询内容
|
| | | function searchBattLife(){
|
| | | var temp = createSearchParam();
|
| | | var json = JSON.stringify(temp);
|
| | | arrTd = new Array();
|
| | | var load;
|
| | | /*if() {
|
| | | load = layer.load(1);
|
| | | }*/
|
| | | $.ajax({
|
| | | type:"post",
|
| | | url:"Batt_enduranceAction!serchByCondition",
|
| | | async:true,
|
| | | datatype:'json',
|
| | | data:"json="+json,
|
| | | success:function(data){
|
| | | console.info(data);
|
| | | var data = JSON.parse(data.result); |
| | | //layer.close(load);
|
| | | if(data.code==1&&data.data.length>0){
|
| | | data=data.data;
|
| | | var index = 0;
|
| | | var ArryTb= new Array();
|
| | | for(i=0;i<data.length;i++){
|
| | | arrTd[index++]=data[i].deviceId;
|
| | | arrTd[index++]=data[i].stationName;
|
| | | arrTd[index++]=data[i].real_cap;
|
| | | arrTd[index++]=data[i].moncapstd;
|
| | | arrTd[index++]=data[i].real_curr;
|
| | | arrTd[index++]=data[i].endurance_actual_timelong;
|
| | | arrTd[index++]=data[i].endurance_theory_timelong;
|
| | | if(data[i].is_out_stand==0){ //未掉站(绿色)
|
| | | arrTd[index++]='否';
|
| | | }
|
| | | else if(data[i].is_out_stand==1){
|
| | | arrTd[index++]='是'; |
| | | } |
| | | //arrTd[index++]=data[i].is_out_stand;
|
| | | } |
| | | Page.pageAll = data[data.length-1].page.pageAll;
|
| | | }else{
|
| | | Page.pageAll = 0;
|
| | | }
|
| | | setPage();
|
| | | //console.info(Page.pageAll); |
| | | createTbl(tblCon, arrTh, arrTd); |
| | | } |
| | | }); |
| | | }
|
| | |
|
| | | function createSearchForm(){
|
| | | var temp={
|
| | | page:{
|
| | | pageCurr:Page.pageCurr,
|
| | | pageSize:Page.pageSize,
|
| | | },
|
| | | binf:{
|
| | | page:Page,
|
| | | StationName1:$('#mainteArea').val(),
|
| | | StationName2:$('#city').val(),
|
| | | StationName5:$('#country').val(),
|
| | | StationName:$('#homeName').val()
|
| | | |
| | | |
| | | },
|
| | | |
| | | |
| | | |
| | | StationName:$('#homeName').val(),
|
| | | is_out_stand:$('#is_stand').val(), //是否掉站
|
| | | endurance_actual_timelong:$('#actual_timelong').val(), |
| | | };
|
| | | return temp;
|
| | | }
|
| | |
| | | findStationNamebyStationname1();
|
| | | });
|
| | |
|
| | | |
| | | //构造查询条件
|
| | | function createSearchParam(){
|
| | | var temp = { |
| | | page:Page,
|
| | | stationName1:$('#mainteArea').val(),
|
| | | stationName2:$('#city').val(),
|
| | | stationName5: $('#country').val(),
|
| | | stationName:$('#homeName').val(),
|
| | | is_out_stand:$('#is_stand').val(), //是否掉站
|
| | | endurance_actual_timelong:$('#actual_timelong').val(), //实际
|
| | | };
|
| | | console.info(temp);
|
| | | return temp;
|
| | | |
| | | } |
| | |
|
| | | |
| | | $(function() {
|
| | | //点击上一页
|
| | | $('.pre-page').on('click', 'a', function() {
|
| | | if(Page.pageCurr>1){
|
| | | Page.pageCurr = Page.pageCurr - 1;
|
| | | searchBadBatt();
|
| | | searchBattLife();
|
| | | }
|
| | | });
|
| | |
|
| | |
| | | var pageNum = Math.ceil(Page.pageAll/Page.pageSize);
|
| | | if(Page.pageCurr<pageNum){
|
| | | Page.pageCurr = Page.pageCurr + 1;
|
| | | searchBadBatt();
|
| | | searchBattLife();
|
| | | }
|
| | | });
|
| | | });
|