| | |
| | | <html lang="en">
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <title>电池组信息配置模板</title>
|
| | | <title>电池组安装提交申请</title>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1">
|
| | | <meta name="apple-mobile-web-app-capable" content="yes">
|
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
| | |
| | | <link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
|
| | | <link rel="stylesheet" type="text/css" href="css/tbl.css">
|
| | | <script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
|
| | | <script type="text/javascript" src="js/tbl.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/base.js"></script>
|
| | | <script type="text/javascript">
|
| | | function creatAllView(num){
|
| | | var allString=''
|
| | | ,i=0;
|
| | | if(num>4){return false}
|
| | | for(i=0;i<num;i++){
|
| | | allString+=creatBattView(i);
|
| | | }
|
| | | $("#battdata").html(allString); |
| | | } |
| | | |
| | | |
| | | function creatBattView(index){
|
| | | var count=index+1
|
| | | ,battTitle='<div>'+'<h1 class="hbg">'+'电池组'+count+'</h1>'+
|
| | | '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'设备索引'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select>'
|
| | | ,allOption=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>' |
| | | ,battName='<tr>'+'<td>'+'电池组名称'+'</td>'+'<td>'+'<input type="text" '+'id='+'battname'+index+' data-mini="true"'+'value='+'电池组'+count+' />'+'</td>'+'</tr>'+'</tbody>'+'</table>'+'</div>';
|
| | | return battTitle+allOption+battName; |
| | | |
| | | } |
| | | |
| | | function selectedIndex(index){
|
| | | var selected='',
|
| | | i=0;
|
| | | for(i=0;i<4;i++){ |
| | | if(i==index){selected+='<option '+'value='+i+' selected'+'>'+i+'</option>';continue;}
|
| | | selected+='<option value='+i+'>'+i+'</option>';
|
| | | |
| | | }
|
| | | |
| | | return selected; |
| | | } |
| | | var temp = getCookie("eleparm");
|
| | | //console.info(temp);
|
| | | temp=JSON.parse(temp);
|
| | | console.info(temp);
|
| | | console.info(temp[30]);
|
| | | console.info(temp[33]);
|
| | | var suoyin = temp[33];
|
| | | |
| | | $(function(){creatAllView(suoyin)});
|
| | | </script>
|
| | | <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
| | | <style type="text/css">
|
| | |
|
| | |
| | | background-color: #dddddd38!important;
|
| | | color: #bdbdbdc4!important;
|
| | | }
|
| | | .ui-btn-icon-right {
|
| | | padding-right: 8.5em;
|
| | | }
|
| | | .hbg{
|
| | | background-color:#ddd9;
|
| | | }
|
| | | #battdata {
|
| | | background-color:#dddddd54
|
| | | }
|
| | | .ui-select .ui-btn select{
|
| | | width:77%;
|
| | | }
|
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | | </head>
|
| | |
| | |
|
| | | <!-- 头部内容 -->
|
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="ele-param.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">返回</a>
|
| | | <a href="ele-param1.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">返回</a>
|
| | | <h1>电池组信息配置模板</h1>
|
| | |
|
| | | </div>
|
| | |
| | | </tbody>
|
| | | </table>
|
| | | <!-- </div> -->
|
| | | <div id="battdata">
|
| | | <!-- <div>
|
| | | <h1 class="hbg">电池组1</h1>
|
| | | <table class="layout-set"> |
| | | <tbody>
|
| | | <tr>
|
| | | <td>设备索引</td>
|
| | | <td>
|
| | | <fieldset data-role="controlgroup" data-type="horizontal"> |
| | | <select>
|
| | | <option value="">0</option>
|
| | | <option value="mon">1</option>
|
| | | <option value="mon">2</option>
|
| | | <option value="mon">3</option>
|
| | | |
| | | </select>
|
| | | </fieldset> |
| | | </td> |
| | | </tr>
|
| | | <tr>
|
| | | <td>电池组名称</td>
|
| | | <td><input type="text" id="" data-mini="true" /></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | </div> -->
|
| | | </div> |
| | | |
| | |
|
| | | </div>
|
| | |
|
| | |
| | | </div>
|
| | | </body>
|
| | |
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
|
| | | <script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
|
| | | <script type="text/javascript" src="js/tbl.js"></script>
|
| | | <script type="text/javascript" src="mobilJs/base.js"></script>
|
| | |
|
| | | <script type="text/javascript">
|
| | | $(function () {
|
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | | //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
| | | installstartdata(temp);
|
| | |
|
| | | });
|
| | | var temp = getCookie("eleparm");
|
| | | //console.info(temp);
|
| | | temp=JSON.parse(temp);
|
| | | console.info(temp);
|
| | | console.info(temp[30]);
|
| | | installstartdata(temp);
|
| | |
|
| | | getUpdateArr();
|
| | | |
| | | function installstartdata(temp){
|
| | | //$("#StationId").value=temp[0];
|
| | | //var t=document.getElementById("station_name1");
|
| | |
| | | $(function(){
|
| | | $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
|
| | | $("#sure").click(function(){
|
| | | editParm();
|
| | | function backpage(){window.location.href="ele-param.html";}
|
| | | setTimeout(backpage,3000); |
| | | });
|
| | | $("#cancel").click(function(){
|
| | | window.location.href="ele-param.html";
|
| | | });
|
| | | if(temp[33]&&temp[33]=="new"){
|
| | | addBatt();
|
| | | }else{
|
| | | editParm();
|
| | | } |
| | | // function backpage(){window.location.href="ele-param1.html";}
|
| | | // setTimeout(backpage,500); |
| | | });
|
| | | $("#cancel").click(function(){
|
| | | window.location.href="ele-param1.html";
|
| | | });
|
| | | });
|
| | | function editParm(){
|
| | | var parm = getUpdateArr();
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | function addBatt(){
|
| | | var parm = getUpdateArr(); |
| | | $.ajax({
|
| | | type: "post", |
| | | url: "BattInfAction!add", |
| | | async:true, |
| | | dataType:'text',
|
| | | data:"json="+JSON.stringify(parm), |
| | | success: function(data){ |
| | | data = eval('('+data+')');
|
| | | var model = eval('('+data.result+')');
|
| | | //console.info(model);
|
| | | if(model.code ==1){
|
| | | alert("添加电池组成功!");
|
| | | }else{
|
| | | alert("添加电池组失败!");
|
| | | } |
| | | },
|
| | | error:function(){
|
| | | alert("添加电池组发生错误!");
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | /* 操作成功
|
| | | $('#changeSuc').popup('open');
|
| | | 操作失败
|