From f8f7f5f8da7b2b96a2a0a7536ae2cd4b6abc520a Mon Sep 17 00:00:00 2001
From: chenjingjing <chenjingjing@192.168.10.3>
Date: 星期四, 27 十二月 2018 14:20:44 +0800
Subject: [PATCH] 页面新版修改
---
gx_tieta/WebRoot/mobil/ele-param.html | 160 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 123 insertions(+), 37 deletions(-)
diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html
index 346ab23..1ceb26b 100644
--- a/gx_tieta/WebRoot/mobil/ele-param.html
+++ b/gx_tieta/WebRoot/mobil/ele-param.html
@@ -127,7 +127,7 @@
</div>
<!-- 澶撮儴鍐呭 -->
<div data-role="header" data-position="fixed">
- <a href="count-report.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="testControl.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>
<a href="javascript:panel.show();" class="ui-btn ui-corner-all ui-shadow ui-icon-grid ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;" id="screen">绛涢��</a>
</div>
@@ -146,7 +146,7 @@
<div data-role="navbar">
<ul>
<li><a href="index.html" target="_top" data-role="button" data-icon="home" data-transition="slide">棣栭〉</a></li>
- <li><a href="batt-infor-conf-temp.html" target="_top" data-role="button" data-icon="plus" data-transition="slide">鏂板缓</a></li>
+ <li><a id="newbatt" target="_top" data-role="button" data-icon="plus" data-transition="slide">鏂板缓</a></li>
</ul>
</div>
</div>
@@ -172,18 +172,8 @@
function getButIndex(t){
//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");
+ setcookiedit(index);
+ return ;
}
$('document').ready(function(){panel.show();});
@@ -199,8 +189,22 @@
$("#edit").click(function(){
window.location.href="batt-infor-conf-temp.html";
});
- $("#delete").click(function(){
- window.location.href="batt-infor-conf-delete.html";
+ $("#delete").click(function(){ //鍒犻櫎鐢垫睜缁�
+ var temp = getCookie("eleparm");
+ temp = JSON.parse(temp);
+ console.info(temp);
+ var parm = getUpdateArr(temp);
+ delBatt(parm);
+ // window.location.href="batt-infor-conf-delete.html";
+ });
+ $("#newbatt").click(function(){
+ var currentlength = Math.floor(arrTd.length/34);
+ if(currentlength<Page.pageSize){
+ setcookieCreat(currentlength-1);
+ }else{
+ setcookieCreat(Page.pageSize-1);
+ }
+ window.location.href="batt-infor-conf-temp.html";
});
var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳','閰嶇疆鎿嶄綔'];
dataArr = [];
@@ -215,7 +219,39 @@
searchBattLife();
});
});
-
+ function setcookiedit(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);
+ arrcookie.push(arrTd[value]);
+ }
+ var json=window.JSON.stringify(arrcookie);
+ setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ }
+
+ function setcookieCreat(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);
+ if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1
+ var groupid = Math.floor(arrTd[value]+1);
+ console.info(groupid);
+ arrcookie.push(groupid);
+ }else{
+ //console.info(value);
+ arrcookie.push(arrTd[value]);
+ }
+ }
+ arrcookie.push("new");
+ //console.info(arrcookie);
+ var json=window.JSON.stringify(arrcookie);
+ setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ }
// 鏌ヨ鍐呭
function searchBattLife(){
@@ -290,28 +326,78 @@
createTbl(tblCon, arrTh, arrTd);
}
});
-
-
-
- /* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */
-
- /*for(i=0;i<340;i++){
- if(i%34==33){
- //<a href="count-report.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>
- arrTd[i]='<a href="#myPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window" >淇敼鎴栧垹闄�</a>';
- console.warn(i);
- continue;
-
- }
-
- arrTd[i]=i*10;
- }
- createTbl(tblCon, arrTh, arrTd);
-
- /* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */
}
+ function getUpdateArr(temp){
+ var arr = new Array();
+ var obj = new Object();
+ obj.StationId = temp[0]; // 鏈烘埧缂栧彿
+ obj.StationName = (temp[1]+"-"+temp[2]+"-"+temp[4]+"-"+temp[5]); // 鎷兼帴鏈烘埧鍚嶇О
+ obj.StationName1 = temp[1]; // 鐪�
+ obj.StationName2 = temp[2]; // 甯�
+ obj.StationName5 = temp[3]; // 鍖�/鍘�
+ obj.StationName3 = temp[4]; // 鏈烘埧鍚嶇О
+ obj.StationName4 = temp[5]; // 璁惧鍚嶇О
+ obj.StationIp = temp[6]; //鏈烘埧ip
+ obj.FBSDeviceId = temp[7]; //璁惧id
+ obj.FbsDeviceIp = temp[8]; //璁惧ip
+ obj.FbsDeviceIp_YM = temp[9]; // 璁惧鎺╃爜
+ obj.FbsDeviceIp_WG = temp[10]; // 缃戝叧
+ obj.FBSDeviceName = temp[11]; //璁惧鍚嶇О
+ obj.GroupIndexInFBSDevice = temp[12]; //fbs璁惧绱㈠紩
+ obj.BattGroupId = temp[13]; //鐢垫睜缁刬d
+ obj.BattGroupNum = temp[14]; //鏈烘埧鍐呯數姹犵粍缂栧彿
+ obj.BattGroupName = temp[15]; //鐢垫睜缁勫悕绉�
+ obj.FloatVolLevel = temp[16]; //娴厖鐢靛帇闃�鍊�
+ obj.OfflineVolLevel = temp[17]; //绂荤嚎鐢靛帇闃�鍊�
+ obj.BattFloatCurrent = temp[18]; //娴厖鐢垫祦闃�鍊�
+ obj.MonCount = temp[19]; //鍗曚綋鏁伴噺
+ obj.MonCapStd = temp[20]; //鏍囩О瀹归噺
+ obj.MonVolStd = temp[21]; //鏍囩О鐢靛帇
+ obj.MonResStd = temp[22]; //鏍囩О鍐呴樆
+ obj.MonSerStd = temp[23]; //鏍囩О鐢靛
+ obj.MonVolLowToAvg = temp[24]; //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+
+
+ obj.Load_curr = temp[25]; //璐熻浇鐢垫祦
+ obj.DisCurrMax = temp[26]; //鏈�澶ф牳瀹圭數娴�
+ obj.station_phone = temp[27]; //鍩虹珯鍙风爜
+
+ obj.BattProducer = temp[28]; //鐢垫睜鍝佺墝
+ obj.BattModel = temp[29]; //鐢垫睜鍨嬪彿
+ obj.BattProductDate = temp[30]; //鐢垫睜鐢熶骇鏃ユ湡
+ obj.BattInUseDate = temp[31]; //鐢垫睜浣跨敤鏃ユ湡
+ obj.install_user = temp[32]; //瀹夎浜哄憳
+ arr.push(obj);
+ console.info(arr);
+ return arr;
+ }
+ //鍒犻櫎鐢垫睜缁�
+ function delBatt(temp){
+ $.ajax({
+ type: "post",
+ url: "BattInfAction!delete",
+ async:true,
+ dataType:'text',
+ data:"json="+JSON.stringify(temp),
+ success: function(data){
+ data = eval('('+data+')');
+ var model = eval('('+data.result+')');
+ console.info(model);
+ if(model.code ==1){
+ alert("鍒犻櫎鐢垫睜缁勬垚鍔�!");
+ searchBattLife();
+ }else{
+ alert("鍒犻櫎鐢垫睜缁勫け璐�!");
+ }
+ },
+ error:function(){
+ alert("鍒犻櫎鐢垫睜缁勫け璐�!");
+ }
+ });
+ }
+
function createSearchForm(){
var temp={
page:Page,
@@ -339,7 +425,7 @@
if(i == 0){
arr.push({
val:"",
- txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)",
+ txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)",
});
}else{
arr.push({
--
Gitblit v1.9.1