From 2fe250ece8de95b3f70172fe5b45793ab6a3084a Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期五, 18 一月 2019 17:30:50 +0800 Subject: [PATCH] 未审批可更改 --- gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html | 328 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 282 insertions(+), 46 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html index 1b9f8c8..327889b 100644 --- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html +++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html @@ -2,7 +2,7 @@ <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"> @@ -11,6 +11,55 @@ <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"> @@ -29,6 +78,18 @@ 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> @@ -37,7 +98,7 @@ <!-- 澶撮儴鍐呭 --> <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> @@ -49,181 +110,181 @@ <tr> <td>鏈烘埧缂栧彿</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="StationId" data-mini="true" /> </td> </tr> <tr> <td>鐪�</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="station_name1" data-mini="true" /> </td> </tr> <tr> <td>鍩庡競</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="city" data-mini="true" /> </td> </tr> <tr> <td>鍖哄幙</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="county" data-mini="true" /> </td> </tr> <tr> <td>鏈烘埧鍚嶇О</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="StationName3" data-mini="true" /> </td> </tr> <tr> <td>璁惧鍚嶇О</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="StationName4" data-mini="true" /> </td> </tr> <tr> <td>鏈烘埧IP</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="StationIp" data-mini="true" /> </td> </tr> <tr> <td>FBS璁惧ID(閲嶈)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="FBSDeviceId" data-mini="true" /> </td> </tr> <tr> <td>FBS璁惧IP(閲嶈)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="FbsDeviceIp" data-mini="true" /> </td> </tr> <tr> <td>瀛愮綉鎺╃爜</td> <td> - <input type="text" id="" class="unable" data-mini="true" value="456"/> + <input type="text" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/> </td> </tr> <tr> <td>缃戝叧</td> <td> - <input type="text" id="" class="unable" data-mini="true" value="456"/> + <input type="text" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/> </td> </tr> <tr> <td>FBS璁惧鍚嶇О</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="FBSDeviceName" data-mini="true" /> </td> </tr> <tr> <td>FBS鐢垫睜绱㈠紩(0-3)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="GroupIndexInFBSDevice" data-mini="true" /> </td> </tr> <tr> <td>鐢垫睜缁処D</td> <td> - <input type="text" readonly unselectable="on" value="123" id="" class="uncheck" data-mini="true" /> + <input type="text" readonly unselectable="on" value="123" id="BattGroupId" class="uncheck" data-mini="true" /> </td> </tr> <tr> <td>鏈烘埧鍐呯數姹犵粍缂栧彿</td> <td> - <input type="text" readonly unselectable="on" value="123" id="" class="uncheck" data-mini="true" /> + <input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="uncheck" data-mini="true" /> </td> </tr> <tr> <td>鐢垫睜缁勫悕绉�</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="BattGroupName" data-mini="true" /> </td> </tr> <tr> <td>娴厖鐢靛帇闃�鍊�(V)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="FloatVolLevel" data-mini="true" /> </td> </tr> <tr> <td>绂荤嚎鐢靛帇闃�鍊�(V)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="OfflineVolLevel" data-mini="true" /> </td> </tr> <tr> <td>娴厖鐢垫祦闃�鍊�(A)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="BattFloatCurrent" data-mini="true" /> </td> </tr> <tr> <td>鍗曚綋鏁伴噺</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonCount" data-mini="true" /> </td> </tr> <tr> <td>鏍囩О瀹归噺(AH)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonCapStd" data-mini="true" /> </td> </tr> <tr> <td>鏍囩О鍗曚綋鐢靛帇(V)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonVolStd" data-mini="true" /> </td> </tr> <tr> <td>鏍囩О鍗曚綋鍐呴樆(m惟)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonResStd" data-mini="true" /> </td> </tr> <tr> <td>鏍囩О鍗曚綋鐢靛</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonSerStd" data-mini="true" /> </td> </tr> <tr> <td>鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="MonVolLowToAvg" data-mini="true" /> </td> </tr> <tr> <td>璐熻浇鐢垫祦(A)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="Load_curr" data-mini="true" /> </td> </tr> <tr> <td>鏈�澶ф牳瀹圭數娴�(A)</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="DisCurrMax" data-mini="true" /> </td> </tr> <tr> <td>鍩虹珯鍙风爜</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="station_phone" data-mini="true" /> </td> </tr> <tr> <td>鐢垫睜鍝佺墝</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="BattProducer" data-mini="true" /> </td> </tr> <tr> <td>鐢垫睜鍨嬪彿</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="BattModel" data-mini="true" /> </td> </tr> <tr> @@ -241,12 +302,40 @@ <tr> <td>瀹夎浜哄憳</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="install_user" data-mini="true" /> </td> </tr> </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> @@ -254,37 +343,184 @@ <div data-role="navbar"> <ul> <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">纭畾</a></li> - <li><a href="" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li> + <li><a href="" id="cancel" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li> </ul> </div> </div> <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b"> <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a> - <a href="" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check" >鎻愪氦</a> - <a href="" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete" >鏀惧純</a> + <a href="" data-rel="back" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check" >鎻愪氦</a> + <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete" >鏀惧純</a> </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')); + //setTimes($("#startTestrecord"),'2000-01-01'); + //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd')); + installstartdata(temp); }); + + function installstartdata(temp){ + //$("#StationId").value=temp[0]; + //var t=document.getElementById("station_name1"); + document.getElementById("StationId").value = temp[0]; + document.getElementById("station_name1").value = temp[1]; + document.getElementById("city").value = temp[2]; //甯� + document.getElementById("county").value = temp[3]; //鍖哄幙 + document.getElementById("StationName3").value = temp[4]; //鏈烘埧鍚嶇О + document.getElementById("StationName4").value = temp[5]; //璁惧鍚嶇О + document.getElementById("StationIp").value = temp[6]; //璁惧IP + document.getElementById("FBSDeviceId").value = temp[7]; + document.getElementById("FbsDeviceIp").value = temp[8]; + document.getElementById("FbsDeviceIp_YM").value = temp[9]; + document.getElementById("FbsDeviceIp_WG").value = temp[10]; + document.getElementById("FBSDeviceName").value = temp[11]; + document.getElementById("GroupIndexInFBSDevice").value = temp[12]; + document.getElementById("BattGroupId").value = temp[13]; + document.getElementById("BattGroupNum").value = temp[14]; + document.getElementById("BattGroupName").value = temp[15]; + document.getElementById("FloatVolLevel").value = temp[16]; + document.getElementById("OfflineVolLevel").value = temp[17]; + document.getElementById("BattFloatCurrent").value = temp[18]; + document.getElementById("MonCount").value = temp[19]; + document.getElementById("MonCapStd").value = temp[20]; + document.getElementById("MonVolStd").value = temp[21]; + document.getElementById("MonResStd").value = temp[22]; + document.getElementById("MonSerStd").value = temp[23]; + document.getElementById("MonVolLowToAvg").value = temp[24]; + document.getElementById("Load_curr").value = temp[25]; + document.getElementById("DisCurrMax").value = temp[26]; + document.getElementById("station_phone").value = temp[27]; + document.getElementById("BattProducer").value = temp[28]; + document.getElementById("BattModel").value = temp[29]; + //document.getElementById("startTestrecord").value = temp[30]; + //document.getElementById("endTestrecord").value = temp[31]; + setTimes($("#startTestrecord"),temp[30]); + setTimes($("#endTestrecord"),temp[31]); + document.getElementById("install_user").value = temp[32]; + } + + + // 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁� + function getUpdateArr(){ + var arr = new Array(); + var obj = new Object(); + obj.StationId = $("#StationId").val(); // 鏈烘埧缂栧彿 + obj.StationName = ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()); // 鎷兼帴鏈烘埧鍚嶇О + obj.StationName1 = $("#station_name1").val(); // 鐪� + obj.StationName2 = $("#city").val(); // 甯� + obj.StationName5 = $("#county").val(); // 鍖�/鍘� + obj.StationName3 = $("#StationName3").val(); // 鏈烘埧鍚嶇О + obj.StationName4 = $("#StationName4").val(); // 璁惧鍚嶇О + obj.StationIp = $("#StationIp").val(); //鏈烘埧ip + obj.FBSDeviceId = $("#FBSDeviceId").val(); //璁惧id + obj.FbsDeviceIp = $("#FbsDeviceIp").val(); //璁惧ip + obj.FbsDeviceIp_YM = $("#FbsDeviceIp_YM").val(); // 璁惧鎺╃爜 + obj.FbsDeviceIp_WG = $("#FbsDeviceIp_WG").val(); // 缃戝叧 + obj.FBSDeviceName = $("#FBSDeviceName").val(); //璁惧鍚嶇О + obj.GroupIndexInFBSDevice = $("#GroupIndexInFBSDevice").val(); //fbs璁惧绱㈠紩 + obj.BattGroupId = $("#BattGroupId").val(); //鐢垫睜缁刬d + obj.BattGroupNum = $("#BattGroupNum").val(); //鏈烘埧鍐呯數姹犵粍缂栧彿 + obj.BattGroupName = $("#BattGroupName").val(); //鐢垫睜缁勫悕绉� + obj.FloatVolLevel = $("#FloatVolLevel").val(); //娴厖鐢靛帇闃�鍊� + obj.OfflineVolLevel = $("#OfflineVolLevel").val(); //绂荤嚎鐢靛帇闃�鍊� + obj.BattFloatCurrent = $("#BattFloatCurrent").val(); //娴厖鐢垫祦闃�鍊� + obj.MonCount = $("#MonCount").val(); //鍗曚綋鏁伴噺 + obj.MonCapStd = $("#MonCapStd").val(); //鏍囩О瀹归噺 + obj.MonVolStd = $("#MonVolStd").val(); //鏍囩О鐢靛帇 + obj.MonResStd = $("#MonResStd").val(); //鏍囩О鍐呴樆 + obj.MonSerStd = $("#MonSerStd").val(); //鏍囩О鐢靛 + obj.MonVolLowToAvg = $("#MonVolLowToAvg").val(); //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲� + + + obj.Load_curr = $("#Load_curr").val(); //璐熻浇鐢垫祦 + obj.DisCurrMax = $("#DisCurrMax").val(); //鏈�澶ф牳瀹圭數娴� + obj.station_phone = $("#station_phone").val(); //鍩虹珯鍙风爜 + + obj.BattProducer = $("#BattProducer").val(); //鐢垫睜鍝佺墝 + obj.BattModel = $("#BattModel").val(); //鐢垫睜鍨嬪彿 + obj.BattProductDate = $("#startTestrecord").val(); //鐢垫睜鐢熶骇鏃ユ湡 + obj.BattInUseDate = $("#endTestrecord").val(); //鐢垫睜浣跨敤鏃ユ湡 + obj.install_user = $("#install_user").val(); //瀹夎浜哄憳 + arr.push(obj); + console.info(arr); + return arr; + } + </script> <script type="text/javascript"> $(function(){ $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck"); $("#sure").click(function(){ - window.location.href="index.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(); + $.ajax({ + type: "post", + url: "BattInfAction!update", + 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("淇敼鐢垫睜缁勫け璐�!"); + } + }); + } + 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'); + 鎿嶄綔澶辫触 + $('#changeErr').popup('open'); */ </script> </html> \ No newline at end of file -- Gitblit v1.9.1