CJJ
2018-11-30 af003e94990143664f3df0b0ea59b9fab5f94167
gx_tieta/WebRoot/mobil/ele-param.html
@@ -146,7 +146,7 @@
         <div data-role="navbar">
            <ul>
              <li><a href="index.html" target="_top" data-role="button" data-icon="home" data-transition="slide">首页</a></li>
              <li><a href="batt-infor-conf-temp.html" target="_top" data-role="button" data-icon="plus" data-transition="slide">新建</a></li>
              <li><a id="newbatt" target="_top" data-role="button" data-icon="plus" data-transition="slide">新建</a></li>
            </ul>
         </div>      
      </div>   
@@ -170,11 +170,14 @@
 <script type="text/javascript">
          /* 获取点击的是哪个按钮   */
          function getButIndex(t){
             console.warn($(t).attr("but-index"));
             //console.warn($(t).attr("but-index"));
             var index = $(t).attr("but-index");
               setcookiedit(index);
             return ;
         }
    $('document').ready(function(){panel.show();});    
 
    var arr=new Array();      //当前表格td数据
    var arrTd=new Array();      //当前表格td数据
    var tblCon = $('.tbl-container');
    var Page = {
      pageSize:20,             //每页的行数
@@ -189,6 +192,15 @@
    $("#delete").click(function(){
        window.location.href="batt-infor-conf-delete.html";   
    });
     $("#newbatt").click(function(){
        var currentlength = Math.floor(arrTd.length/34);
        if(currentlength<Page.pageSize){
           setcookieCreat(currentlength-1);
        }else{
           setcookieCreat(Page.pageSize-1);
        }
        window.location.href="batt-infor-conf-temp.html";
    });
    var arrTh = [ '机房编号', '省', '城市','区县','机房名称','设备名称','机房IP','FBS设备ID(重要)','FBS设备IP(重要)','子网掩码','网关','FBS设备名称','FBS电池索引(0-3)','电池组ID','机房内电池组编号','电池组名称','浮充电压阀值(V)','离线电压阀值(V)','浮充电流阀值(A)','单体数量','标称容量(AH)','标称单体电压(V)','标称单体内阻(mΩ)','标称单体电导','单体电压次低偏移量(V)','负载电流(A)','最大核容电流(A)','基站号码','电池品牌','电池型号','电池生产日期','投入使用日期','安装人员','配置操作'];
   dataArr = [];
    var startTime = "1980-01-01";
@@ -202,8 +214,40 @@
         searchBattLife();
      });
    });
       function setcookiedit(index){
             var arrcookie = new Array();
               for(var i=0;i<33;i++){//共34项,最后一项为按钮,不必SET进数据
                  var value = Math.floor(34*index);
                  //console.info(value);
                  value = Math.floor(value+i);
                  //console.info(value);
                  arrcookie.push(arrTd[value]);
               }
               var json=window.JSON.stringify(arrcookie);
               setCookie("eleparm",json);  //这里setcookie,若有上一条cookie则清空上一笔
       }
       function setcookieCreat(index){
             var arrcookie = new Array();
               for(var i=0;i<33;i++){//共34项,最后一项为按钮,不必SET进数据
                  var value = Math.floor(34*index);
                  //console.info(value);
                  value = Math.floor(value+i);
                if(i==13){//新建功能,电池组ID默认为当页最后一个电池组ID号加1
                   var groupid = Math.floor(arrTd[value]+1);
                   console.info(groupid);
                   arrcookie.push(groupid);
                }else{
                     //console.info(value);
                     arrcookie.push(arrTd[value]);
                  }
               }
               arrcookie.push("new");
               //console.info(arrcookie);
               var json=window.JSON.stringify(arrcookie);
               setCookie("eleparm",json);  //这里setcookie,若有上一条cookie则清空上一笔
       }
   // 查询内容
      function searchBattLife(){
         var temp = createSearchParam();
@@ -326,7 +370,7 @@
                 if(i == 0){
                    arr.push({
                       val:"",
                       txt:"全部(共"+data.sum+"个)",
                       txt:"全部(共"+data.sum+"个)",
                    });
                 }else{
                    arr.push({