| | |
| | | <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");
|
| | | var tempindex = getCookie("eleparmindex");
|
| | | var tempnum = getCookie("eleparmnum");
|
| | | //var temp
|
| | | //console.info(temp);
|
| | | var tempgroupid = getCookie("elegroupid");
|
| | | console.info(tempgroupid);
|
| | | tempgroupid = JSON.parse(tempgroupid);
|
| | | console.info(tempindex);
|
| | | console.info(tempnum);
|
| | | temp=JSON.parse(temp);
|
| | | tempindex = JSON.parse(tempindex);
|
| | | tempnum =JSON.parse(tempnum);
|
| | | var suoyin = temp[33];
|
| | | |
| | | $(function(){creatAllView(tempindex.length)});
|
| | | </script>
|
| | | <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
| | | <style type="text/css">
|
| | |
|
| | |
| | | color: #bdbdbdc4!important;
|
| | | }
|
| | | .ui-btn-icon-right {
|
| | | padding-right: 8.5em;
|
| | | padding-right: 2em;
|
| | | }
|
| | | .hbg{
|
| | | background-color:#ddd9;
|
| | |
| | | }
|
| | | .ui-select .ui-btn select{
|
| | | width:77%;
|
| | | }
|
| | | .ptr0{
|
| | | position: absolute;
|
| | | top: 0;
|
| | | right: 0;
|
| | | margin:0!important; |
| | | }
|
| | | #newbattnum-button{
|
| | | padding: 1em 1.9em;
|
| | | }
|
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | |
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="batt-unapproved.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 data-role="collapsible" data-type="horizontal" class="ui-btn-right" style="padding-bottom:-0.7em; padding-top:-0.7em;" >
|
| | | <h1 id="alwaysRight">新建</h1>
|
| | | <div>
|
| | | <h1 class="full-width">
|
| | | <a href="" target="_top" style="text-decoration:none;">1个电池组</a>
|
| | | </h1>
|
| | | <h1 class="full-width">
|
| | | <a href="" target="_top" style="text-decoration:none;">2个电池组</a>
|
| | | </h1>
|
| | | <h1 class="full-width">
|
| | | <a href="" target="_top" style="text-decoration:none;">3个电池组</a>
|
| | | </h1>
|
| | | </div>
|
| | | </div> -->
|
| | | <fieldset data-role="controlgroup" class="ptr0" >
|
| | |
|
| | | |
| | | <select id="newbattnum" data-mini="true">
|
| | | <option value="0">新建电池组</option>
|
| | | |
| | | </select>
|
| | | |
| | | |
| | | </fieldset>
|
| | | </div>
|
| | | <!-- 主体内容 -->
|
| | | <div data-role="main">
|
| | |
| | | </div>
|
| | | </body>
|
| | |
|
| | | <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);
|
| | | }
|
| | | return $("#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; |
| | | } |
| | | |
| | | function creatBa(a){
|
| | | var battnum=4-a,
|
| | | opstring=''; |
| | | if(a>4&&battnum<=0){return false;}
|
| | | for(var i=0;i<=battnum;i++){
|
| | | |
| | | opstring+='<option value='+i+'>新建'+i+'个电池组</option>';
|
| | | }
|
| | | console.warn(opstring+'ttt'); |
| | | return $('#newbattnum').html(opstring);
|
| | | }
|
| | | var temp = getCookie("eleparm");
|
| | | var tempindex = getCookie("eleparmindex");
|
| | | var tempnum = getCookie("eleparmnum");
|
| | | //var temp
|
| | | //console.info(temp);
|
| | | var tempgroupid = getCookie("elegroupid");
|
| | | console.info(tempgroupid);
|
| | | tempgroupid = JSON.parse(tempgroupid);
|
| | | console.info(tempindex);
|
| | | console.info(tempnum);
|
| | | temp=JSON.parse(temp);
|
| | | tempindex = JSON.parse(tempindex);
|
| | | tempnum =JSON.parse(tempnum);
|
| | | var suoyin = temp[33];
|
| | | |
| | | $(function(){
|
| | | creatAllView(tempindex.length).trigger('create');
|
| | | creatBa(tempindex.length).trigger('create');
|
| | | });
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script>
|
| | | <script type="text/javascript">
|
| | | $(function () {
|
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | |
| | |
|
| | |
|
| | |
|
| | | |
| | | |
| | | $('#newbattnum').change(function(){
|
| | | var addbattnum=$('#newbattnum').val()+tempindex.length;
|
| | | console.warn(addbattnum+'hihihi');
|
| | | creatAllView(3).trigger('create');
|
| | | });
|
| | | |
| | |
|
| | | |
| | | /* 操作成功
|
| | | $('#changeSuc').popup('open');
|
| | | 操作失败
|
| | | $('#changeErr').popup('open'); */
|
| | | </script>
|
| | | |
| | | </html> |