From cf9f90feead55d2882ccd50ab4ceb19d8500c14d Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@192.168.10.25> Date: 星期五, 30 十一月 2018 13:56:09 +0800 Subject: [PATCH] 手机 电池组信息配置 修改电池组功能 --- gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html | 192 +++++++++++++++++++++++++++++++++++++++--------- gx_tieta/WebRoot/mobil/ele-param.html | 19 ++++ 2 files changed, 172 insertions(+), 39 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html index 5008a3a..45e7224 100644 --- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html +++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html @@ -49,181 +49,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,7 +241,7 @@ <tr> <td>瀹夎浜哄憳</td> <td> - <input type="text" id="" data-mini="true" /> + <input type="text" id="install_user" data-mini="true" /> </td> </tr> </tbody> @@ -274,22 +274,142 @@ <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')); }); + 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"); + 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(){ - function backpage(){window.location.href="ele-param.html";} - setTimeout(backpage,3000); - }); + editParm(); + function backpage(){window.location.href="ele-param.html";} + setTimeout(backpage,3000); + }); $("#cancel").click(function(){ window.location.href="ele-param.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("淇敼鐢垫睜缁勫け璐�!"); + } + }); + } + /* 鎿嶄綔鎴愬姛 $('#changeSuc').popup('open'); 鎿嶄綔澶辫触 diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html index bd12799..346ab23 100644 --- a/gx_tieta/WebRoot/mobil/ele-param.html +++ b/gx_tieta/WebRoot/mobil/ele-param.html @@ -170,11 +170,24 @@ <script type="text/javascript"> /* 鑾峰彇鐐瑰嚮鐨勬槸鍝釜鎸夐挳 */ function getButIndex(t){ - console.warn($(t).attr("but-index")); + //console.warn($(t).attr("but-index")); + var index = $(t).attr("but-index"); + var arrcookie = new Array(); + for(var i=0;i<33;i++){//鍏�34椤癸紝鏈�鍚庝竴椤逛负鎸夐挳锛屼笉蹇匰ET杩涙暟鎹� + var value = Math.floor(34*index); + console.info(value); + value = Math.floor(value+i); + console.info(value); + //console.info(arrTd[value]); + arrcookie.push(arrTd[value]); + } + var json=window.JSON.stringify(arrcookie); + setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗� + return $(t).attr("but-index"); } $('document').ready(function(){panel.show();}); - var arr=new Array(); //褰撳墠琛ㄦ牸td鏁版嵁 + var arrTd=new Array(); //褰撳墠琛ㄦ牸td鏁版嵁 var tblCon = $('.tbl-container'); var Page = { pageSize:20, //姣忛〉鐨勮鏁� @@ -203,7 +216,7 @@ }); }); - + // 鏌ヨ鍐呭 function searchBattLife(){ var temp = createSearchParam(); -- Gitblit v1.9.1