| | |
| | | window.location.href="batt-infor-unapproved-edit.html";
|
| | | });
|
| | | $("#delete").click(function(){ //删除电池组
|
| | | var temp = getCookie("eleparm");
|
| | | temp = JSON.parse(temp);
|
| | | console.info(temp);
|
| | | var parm = getUpdateArr(temp);
|
| | | var parm = battDeleteparm();
|
| | | console.info(parm);
|
| | | delBatt(parm);
|
| | | // window.location.href="batt-infor-conf-delete.html"; |
| | | window.location.href="batt-unapproved.html"; |
| | | });
|
| | |
|
| | | var arrTh = [ '机房编号', '省', '城市','区县','机房名称','设备名称','机房IP','FBS设备ID(重要)','FBS设备IP(重要)','子网掩码','网关','FBS设备名称','FBS电池索引(0-3)','电池组ID','机房内电池组编号','电池组名称','浮充电压阀值(V)','离线电压阀值(V)','浮充电流阀值(A)','单体数量','标称容量(AH)','标称单体电压(V)','标称单体内阻(mΩ)','标称单体电导','单体电压次低偏移量(V)','负载电流(A)','最大核容电流(A)','基站号码','电池品牌','电池型号','电池生产日期','投入使用日期','安装人员','操作'];
|
| | |
| | | }
|
| | |
|
| | | setPage();
|
| | | createTbl(tblCon, arrTh, arrTd);
|
| | | |
| | | createTbl(tblCon, arrTh, arrTd); |
| | | }
|
| | | });
|
| | | }
|
| | |
| | | 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]);
|
| | | }
|
| | | }
|
| | | // console.info($("#newbattnum").val());
|
| | | arrcookie.push($("#newbattnum").val());
|
| | | var id = arrcookie[0];
|
| | | console.info(id);
|
| | |
| | | var json=window.JSON.stringify(arrcookie);
|
| | | setCookie("eleparm",json); //这里setcookie,若有上一条cookie则清空上一笔
|
| | | }
|
| | | function delBatt(parm){
|
| | | $.ajax({
|
| | | type: "post", |
| | | url: "Battinf_applyAction!del", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json="+JSON.stringify(parm), |
| | | success: function(data){
|
| | | console.info(data);
|
| | | alert("删除成功");
|
| | | }
|
| | | }); |
| | | } |
| | | function battDeleteparm(){
|
| | | var arr = new Array();
|
| | | var temp = getCookie("eleparm");
|
| | | var tempindex = getCookie("eleparmindex");
|
| | | var tempnum = getCookie("eleparmnum");
|
| | | temp=JSON.parse(temp);
|
| | | tempindex = JSON.parse(tempindex);
|
| | | tempnum =JSON.parse(tempnum);
|
| | | console.info(temp);
|
| | | for(var i=0;i<tempindex.length;i++){
|
| | | //console.info(battString);
|
| | | var obj = {
|
| | | //apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
|
| | | num : tempnum[i],
|
| | | binf:{
|
| | | StationId : temp[0], // 机房编号
|
| | | StationName : (temp[1]+"-"+temp[2]+"-"+temp[4]+"-"+temp[5]), // 拼接机房名称
|
| | | StationName1 :temp[1], // 省
|
| | | StationName2 : temp[2], // 市
|
| | | StationName5 : temp[3], // 区/县
|
| | | StationName3 : temp[4], // 机房名称
|
| | | StationName4 :temp[5], // 设备名称
|
| | | StationIp : temp[6], //机房ip
|
| | | FBSDeviceId : temp[7], //设备id
|
| | | FbsDeviceIp : temp[8], //设备ip
|
| | | FbsDeviceIp_YM : temp[9], // 设备掩码
|
| | | FbsDeviceIp_WG : temp[10], // 网关
|
| | | FBSDeviceName : temp[11], //设备名称
|
| | | GroupIndexInFBSDevice : i, //fbs设备索引
|
| | | BattGroupId : temp[13], //电池组id
|
| | | BattGroupNum : temp[14], //机房内电池组编号
|
| | | BattGroupName : tempindex[i], //电池组索引
|
| | | FloatVolLevel : temp[16], //浮充电压阀值
|
| | | OfflineVolLevel : temp[17], //离线电压阀值
|
| | | BattFloatCurrent : temp[18], //浮充电流阀值
|
| | | MonCount : temp[19], //单体数量
|
| | | MonCapStd : temp[20], //标称容量
|
| | | MonVolStd : temp[21], //标称电压
|
| | | MonResStd : temp[22], //标称内阻
|
| | | MonSerStd : temp[23], //标称电导
|
| | | MonVolLowToAvg : temp[24], //单体电压次低偏移量
|
| | | |
| | | Load_curr : temp[25], //负载电流
|
| | | DisCurrMax : temp[26], //最大核容电流
|
| | | station_phone : temp[27], //基站号码
|
| | | |
| | | BattProducer : temp[28], //电池品牌
|
| | | BattModel : temp[29], //电池型号
|
| | | BattProductDate : temp[30]+" 00:00:00", //电池生产日期
|
| | | BattInUseDate : temp[31]+" 00:00:00", //电池使用日期
|
| | | install_user : temp[32], //安装人员
|
| | | }
|
| | | }
|
| | | arr.push(obj);
|
| | | }
|
| | | console.info(arr);
|
| | | return arr;
|
| | | |
| | | }
|
| | |
|
| | | $(function() {
|
| | | //点击上一页
|