| | |
| | | <table class="layout-set">
|
| | | <tbody>
|
| | | <tr>
|
| | | <td>机房编号</td>
|
| | | <td>
|
| | | <input type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>FBS设备ID(重要)</td>
|
| | | <td>
|
| | | <input type="text" id="FBSDeviceId" class="unable" data-mini="true" onfocus="this.blur()"/>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>FBS设备IP(重要)</td>
|
| | | <td>
|
| | | <input type="text" id="FbsDeviceIp" class="unable" data-mini="true" onfocus="this.blur()" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>电池组ID</td>
|
| | | <td>
|
| | | <input type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" onfocus="this.blur()" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <input type="hidden" type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
|
| | | |
| | | <input type="hidden" type="text" id="FBSDeviceId" class="unable" data-mini="true" />
|
| | | |
| | | <input type="hidden" type="text" id="FbsDeviceIp" class="unable" data-mini="true" />
|
| | | |
| | | <input type="hidden" type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" />
|
| | |
|
| | | <td>省</td>
|
| | | <td>
|
| | | <input type="text" id="mainteArea" class="unable" data-mini="true" onfocus="this.blur()"/>
|
| | |
| | | ,battNum='<tr>'+'<td>'+'*单体数量'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select '+ 'id='+'MonCount'+index+'>'
|
| | | ,battNumOpt=selectedNum(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
|
| | | ,MonVolStd='<tr>'+'<td>'+'*标称单体电压(V)'+'</td>'+'<td>'+'<input type="text" '+'id='+'MonVolStd'+index+' data-mini="true"'+' class="unable" '+'/>'+'</td>'+'</tr>'
|
| | | ,nomCap='<tr>'+'<td>'+'*标称容量(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+'>'+creatMonCapOpt()+'</select>'
|
| | | ,nomCap='<tr>'+'<td>'+'*标称容量(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+'>'+creatMonCapOpt(index)+'</select>'
|
| | | +'</fieldset>'+'</td>'+'</tr>'
|
| | | ,battIndex='<tr>'+'<input type="hidden" '+'id='+'battindex'+index+' data-mini="true"'+'value='+count+' />'+'</tr>'
|
| | | ,battName='<tr>'+'<input type="hidden" '+'id='+'battname'+index+' data-mini="true"'+'value='+'电池组'+count+' />'+'</tr>'+'</tbody>'+'</table>'+'</div>';
|
| | |
| | | $(function(){
|
| | | creatAllView(temp.length).trigger('create');
|
| | | //creatMonCapOpt(temp.length);
|
| | | setMonVolStd(temp.length);
|
| | | setchangedMonVolStd(temp.length);
|
| | | creatBa(temp.length).trigger('create');
|
| | |
|
| | | });
|
| | |
| | | //console.info(dev_id);
|
| | | document.getElementById("FBSDeviceId").value = dev_id;
|
| | | var ip = getDevIp(dev_id);
|
| | | //console.info(ip);
|
| | | console.info(ip);
|
| | | document.getElementById("FbsDeviceIp").value = ip;
|
| | | }else{
|
| | | alert("groupid生成失败");
|
| | |
| | | }
|
| | |
|
| | | function prefixInteger(num, length) {
|
| | | return (num/Math.pow(3,length)).toFixed(length).substr(2);
|
| | | return (Array(length).join('0') + num).slice(-length);
|
| | | }
|
| | | |
| | | function creatBa(a){
|
| | | var battnum=4-a,
|
| | | opstring='';
|
| | |
| | | document.getElementById("OfflineVolLevel").value = data.OfflineVolLevel;
|
| | | document.getElementById("BattFloatCurrent").value = data.BattFloatCurrent;
|
| | | //document.getElementById("MonCount").value = data.MonCount;
|
| | | //document.getElementById("MonCapStd").value = data.MonCapStd;
|
| | | |
| | | //document.getElementById("MonCapStd").value = data.MonCapStd; |
| | | document.getElementById("MonResStd").value = data.MonResStd;
|
| | | document.getElementById("MonSerStd").value = data.MonSerStd;
|
| | | document.getElementById("MonVolLowToAvg").value = data.MonVolLowToAvg;
|
| | |
| | | });
|
| | |
|
| | | function nullOrn(){
|
| | | |
| | | return true;
|
| | | |
| | | |
| | | return true; |
| | | }
|
| | |
|
| | | function editBatt(){//
|
| | |
| | | var model =data;
|
| | | if(model.code ==1){
|
| | | alert("修改成功");
|
| | | window.location.href="batt-unapproved.html"
|
| | | window.location.href="batt-unapproved-index.html"
|
| | | }else{
|
| | | alert("修改失败!");
|
| | | window.location.href="batt-unapproved.html"
|
| | | window.location.href="batt-unapproved-index.html"
|
| | | }
|
| | | },
|
| | | error:function(){
|
| | | alert("修改电池组失败!");
|
| | | //window.location.href="batt-unapproved.html"
|
| | | //window.location.href="batt-unapproved.html" 详情列表
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | creatAllView(addbattnum).trigger('create');
|
| | | creatBattGroupId(addbattnum);
|
| | | });
|
| | | function creatMonCapOpt(suoyin){
|
| | | /*function creatMonCapOpt(suoyin){
|
| | | var optionStr,allString;
|
| | |
|
| | | for(var i=1;i<11;i++){
|
| | |
| | | return allString;
|
| | |
|
| | |
|
| | | }
|
| | | function setMonVolStd(suoyin){
|
| | | }*/
|
| | | |
| | | function creatMonCapOpt(index){
|
| | | var selected='',
|
| | | i=0;
|
| | | var battproducer = ["50","100","150","200","250","300","350","400","450","500","1000"];
|
| | | selected+= '<option '+'value='+temp[index].binf.MonCapStd+'>'+temp[index].binf.MonCapStd+'</option>';
|
| | | for(var i=0;i<battproducer.length;i++){
|
| | | if(temp[index].binf.MonCapStd!=battproducer[i]){
|
| | | selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>'; |
| | | } |
| | | }
|
| | | return selected; |
| | | } |
| | | function setchangedMonVolStd(suoyin){
|
| | | for(var u=0;u<suoyin;u++){
|
| | | var id='';
|
| | | id='#MonCount'+u;
|