From 417c6db1ab7698f625bcc6452c2936981fade14b Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期四, 06 十二月 2018 12:19:34 +0800 Subject: [PATCH] 打开系统设置面板检测数据的正确性 --- gx_tieta/WebRoot/control.jsp | 115 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 98 insertions(+), 17 deletions(-) diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp index 865aa6c..cc6607f 100644 --- a/gx_tieta/WebRoot/control.jsp +++ b/gx_tieta/WebRoot/control.jsp @@ -1026,7 +1026,7 @@ </tr> <tr> <th>鍗曚綋鏁版嵁鏉ユ簮绫诲瀷</th> - <th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺锛�0~2锛�</th> + <th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺锛�1~2锛�</th> </tr> <tr> <td> @@ -1074,58 +1074,60 @@ <div class="popup-title"><span>鐢垫睜鍙傛暟璁剧疆</span> <a href="javascript:;" class="close">X</a></div> <div class="popup-content"> <div class="popup-tbl"> + <input type="hidden" id="battInfo_dev_id" value=""> <!-- dev_id --> + <input type="hidden" id="battInfo_ip" value=""> <!-- IP鍦板潃 --> <table> <tbody> <tr> - <th>鏈烘埧ID</th> + <th>璁惧ID</th> <th>鏈烘埧鍚嶇О</th> </tr> <tr> - <td><input type="text" id="battInfo_home_id" readonly="readonly" value=""></td> + <td><input type="text" id="battInfo_fbs_id" readonly="readonly" value=""></td> <td><input type="text" id="battInfo_home_name" readonly="readonly" value=""></td> </tr> <tr> - <th>鐢垫睜鏍囩О瀹归噺(AH)</th> - <th>鐢垫睜鏍囩О鍐呴樆(u惟)</th> + <th>鐢垫睜鏍囩О瀹归噺锛�1~6000.0AH锛�</th> + <th>鐢垫睜鏍囩О鍐呴樆锛�1~60000u惟锛�</th> </tr> <tr> <td><input type="text" id="battInfo_nom_cap" value=""></td> <td><input type="text" id="battInfo_nom_res" value=""></td> </tr> <tr> - <th>鐢垫睜缁勬暟</th> - <th>姣忕粍鐢垫睜鍗曚綋鏁伴噺</th> + <th>鐢垫睜缁勬暟锛�1~2锛�</th> + <th>姣忕粍鐢垫睜鍗曚綋鏁伴噺锛�1~300 锛�</th> </tr> <tr> <td><input type="text" id="battInfo_batt_num" value=""></td> <td><input type="text" id="battInfo_batt_mon_num" value=""></td> </tr> <tr> - <th>鍗曚綋鏍囩О鐢靛帇锛圴锛�</th> - <th>鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛�</th> + <th>鍗曚綋鏍囩О鐢靛帇锛�0.1~20.0V锛�</th> + <th>鐢垫睜缁勭鏍囩О鐢靛帇锛�0.1~600.0V锛�</th> </tr> <tr> <td><input type="text" id="battInfo_batt_nom_vol" value=""></td> <td><input type="text" id="battInfo_group_nom_vol" value=""></td> </tr> <tr> - <th>鐢垫睜鏍囩О娓╁害锛堚剝锛�</th> - <th>鐢垫睜娴厖鐢靛帇闃�鍊硷紙V锛�</th> + <th>鐢垫睜鏍囩О娓╁害锛�0.1~60.0鈩冿級</th> + <th>鐢垫睜娴厖鐢靛帇闃�鍊硷紙0.1~60.0V锛�</th> </tr> <tr> <td><input type="text" id="battInfo_batt_nom_temp" value=""></td> <td><input type="text" id="battInfo_batt_float_vol" value=""></td> </tr> <tr> - <th>鐢垫睜娴厖鐢垫祦闃�鍊硷紙A锛�</th> - <th>鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙V锛�</th> + <th>鐢垫睜娴厖鐢垫祦闃�鍊硷紙0.1~30.0A锛�</th> + <th>鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙0.1~60.0V锛�</th> </tr> <tr> <td><input type="text" id="battInfo_batt_float_curr" value=""></td> <td><input type="text" id="battInfo_online_low_vol" value=""></td> </tr> <tr> - <th>鐢垫睜缁勮繛鎺ョ被鍨�</th> + <th>鐢垫睜缁勮繛鎺ョ被鍨�(0~1)</th> </tr> <tr> <td><input type="text" id="battInfo_batt_link_type" value=""></td> @@ -1136,7 +1138,7 @@ </div> <div class="popup-footer"> <input type="button" name="" id="battInfo_read" value="璇诲彇" > - <input type="button" name="" id="battInfo_en" class="status-change-set " value="璁剧疆" > + <input type="button" name="" id="battInfo_en" class="status-change-set whyc-btn-disabled" value="璁剧疆" > </div> </div> @@ -1247,6 +1249,7 @@ <script type="text/javascript" src="js/dischargetest/bts.js"></script> <script type="text/javascript" src="js/dischargetest/4016.js"></script> <script type="text/javascript" src="js/dischargetest/sysData.js"></script> + <script type="text/javascript" src="js/dischargetest/battData.js"></script> <script type="text/javascript" src="pages/js/pages/control-common.js"></script> <script type="text/javascript" src="pages/js/pages/siderbar.js"></script> <script type="text/javascript" src="js/rightmenu.js"></script> @@ -4830,10 +4833,10 @@ console.info(rs); if(rs.code == 1){ var data = rs.data[0]; - setSysSetData(data); // 绉婚櫎涓嶅彲鐐瑰嚮鐘舵�� initSysDataPopup(); $('#sysSet_en').removeClass('whyc-btn-disabled'); + setSysSetData(data); sysSet_popup.showPopup(); if(showSU) { noContent.showNoContent('璇诲彇鎴愬姛', true); @@ -4932,12 +4935,19 @@ $('#sysSet_secVol').val(data.MonomerOrder/10); // 浜屾涓嬬數鐢靛帇 $('#sysSet_dcdc').val(data.LoaderCount); // DCDC妯″潡鏁伴噺 $('#sysSet_sourceStyle').val(data.DtCardCount); // 鍗曚綋鏁版嵁鏉ユ簮绫诲瀷 + //var POF_BG_Boost_Cnt = data.POF_BG_Boost_Cnt?data.POF_BG_Boost_Cnt:1; $('#sysSet_bleedNum').val(data.POF_BG_Boost_Cnt); // 鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺 $('#sysSet_stopLimit').val(data.POF_BG_Boost_VolStop); // 鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄� $('#sysSet_startLimit').val(data.POF_BG_Boost_VolStart); // 鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄� + //var majorBattGroupNum = data.MajorBattGroupNum?data.MajorBattGroupNum:1; $('#sysSet_groupNum').val(data.MajorBattGroupNum); // 鐢垫睜鍚堣矾鍣ㄤ富鐢垫睜缁勭紪鍙� $('#sysSet_backLightTime').val(data.BackLightTime); // 鑳屽厜鏃堕棿 $('#sysSet_powerBreakChargeCurr').val(data.PowerBreakChargeCurr); // 鍋滅數鍏呯數鐢垫祦 + + + GLOBAL.testVal.check($('#sysSet_bleedNum'), $('#sysSet_bleedNum').data('testVal'), checkSysData); + GLOBAL.testVal.check($('#sysSet_groupNum'), $('#sysSet_groupNum').data('testVal'), checkSysData); + } // 鑾峰彇闈㈡澘淇℃伅鐨勫�� @@ -5146,9 +5156,80 @@ // 鐢垫睜鍙傛暟 + var battCMD = GLOBAL.CMD.batt; // cmd鍛戒护 + var battPopup = GLOBAL.battInfoPopup; // 鐢垫睜鍙傛暟妯″潡 + battPopup.testVal(); // 璁剧疆闈㈡澘鐨勫彇鍊艰寖鍥� $('#battInfoBtn').click(function() { - battInfo_popup.showPopup(); // 鏄剧ずbattInfo_popup寮瑰嚭妗嗗拰閬僵灞� + // 鑾峰彇鐢垫睜淇℃伅 + var batt = getBatt(); + var temp = { + dev_id: batt.FBSDeviceId + }; + + // 鏌ヨ鐢垫睜鍙傛暟闈㈡澘淇℃伅 + var load = layer.load(1); + battPopup.search(temp, batt, function(res, binf) { + layer.close(load); + battInfo_popup.showPopup(); // 鏄剧ずbattInfo_popup寮瑰嚭妗嗗拰閬僵灞� + }); + }); + + // 鐐瑰嚮璁惧畾 + $('#battInfo_en').click(function() { + if($(this).hasClass('whyc-btn-disabled')) { + return; + } + // 璁剧疆鐢垫睜鍙傛暟闈㈡澘淇℃伅 + var load = layer.load(1); + battPopup.set(function(res) { + layer.close(load); + layer.msg(res.msg); + }); + }); + + // 鐐瑰嚮璇诲彇 + $('#battInfo_read').click(function() { + var batt = getBatt(); + var temp = { + dev_id: batt.FBSDeviceId + }; + // 璁剧疆鐢垫睜鍙傛暟闈㈡澘淇℃伅 + var load = layer.load(1); + battPopup.read(function(res) { + layer.close(load); + // console.log(res); + if(res.code == 1) { + battPopup.search(temp, batt, function(res, binf) { + layer.close(load); + layer.msg('鑾峰彇鍙傛暟鎴愬姛'); + }); + }else { + layer.msg('鑾峰彇鍙傛暟澶辫触'); + } + + }); + }); + + // 鏌ヨ鐢垫睜鍙傛暟鐨勫�� + function searchBattInfo(temp, binf) { + var load = layer.load(1); + // 鏌ヨ鐢垫睜鍙傛暟 + $.ajax({ + type: 'post' + ,async: true + ,url:'Fbs9100_battparamAction_action_serchByCondition' + ,data: 'json='+JSON.stringify(temp) + ,dataType: 'json' + ,success: function(res) { + var rs = JSON.parse(res.result); + //console.log(rs); + } + ,complete: function() { + layer.close(load); + } + }); + } }); // 鏈哄巻鍗℃ā鍧� -- Gitblit v1.9.1