From 1cc02108ea150ce39e3a5c0668b9ba13d5b066ac Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@192.168.10.25>
Date: 星期五, 30 十一月 2018 15:56:51 +0800
Subject: [PATCH] 手机 电池组信息配置,新建跳转页面缓存
---
gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html | 25 ++++++++++++
gx_tieta/WebRoot/mobil/ele-param.html | 56 ++++++++++++++++++++-------
2 files changed, 65 insertions(+), 16 deletions(-)
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
index 45e7224..bd88a3d 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
@@ -409,7 +409,30 @@
}
});
}
-
+ 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');
鎿嶄綔澶辫触
diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html
index 346ab23..c2b66bd 100644
--- a/gx_tieta/WebRoot/mobil/ele-param.html
+++ b/gx_tieta/WebRoot/mobil/ele-param.html
@@ -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();});
@@ -202,6 +192,11 @@
$("#delete").click(function(){
window.location.href="batt-infor-conf-delete.html";
});
+ $("#newbatt").click(function(){
+ console.info(Page.pageSize);
+ 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 = [];
var startTime = "1980-01-01";
@@ -215,7 +210,38 @@
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]);
+ }
+ }
+ //console.info(arrcookie);
+ var json=window.JSON.stringify(arrcookie);
+ setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ }
// 鏌ヨ鍐呭
function searchBattLife(){
@@ -339,7 +365,7 @@
if(i == 0){
arr.push({
val:"",
- txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)",
+ txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)",
});
}else{
arr.push({
--
Gitblit v1.9.1