From 854f2b7f6876c25ec12290c8f2d39671113b35f8 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 13 十一月 2018 09:04:29 +0800
Subject: [PATCH] 更改信号强度显示的位置

---
 gx_tieta/WebRoot/control.jsp             |   18 ++++++++++++++++--
 gx_tieta/WebRoot/js/elecircle.content.js |   30 ++++++++++++++++++++++++++++--
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index f0cb385..99876f5 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -4353,6 +4353,8 @@
 			// 鐢垫睜缁�
 			treeView.ele.on('click', '.eleGroup', function() {
 				var eleGroup = $(this).data('attr');
+				var status = GLOBAL.circleStatus.status;
+				var btsOpts = GLOBAL.circleStatus.btsOpts;
 				// 鏍规嵁BattGroupId鏌ヨ鏁版嵁
 				if(BattGroupId != eleGroup.BattGroupId) {
 					BattGroupId = eleGroup.BattGroupId;
@@ -4378,7 +4380,11 @@
 					// 璐熻浇鐢垫祦
 					var loadCurr = batt.Load_curr+'A';
 					changeEleCircleOpt(eleCircle, 'loaderCurr', {name:'鏈�澶ц礋杞界數娴侊細'+loadCurr});
-					changeEleCircleOpt(eleCircle, 'signal', {isShow:false});
+					//changeEleCircleOpt(eleCircle, 'signal', {isShow:false});
+					// 鏄剧ず淇″彿寮哄害
+					status.setText('signal', '', true);
+					// 鏇存柊閰嶇疆椤圭殑鍊�
+					status.updateOpts('signal', btsOpts, {notShow: true});
 					// 鏈�澶ф牳瀹圭數娴�
 					var disCurrMax = batt.DisCurrMax+'A';
 					changeEleCircleOpt(eleCircle, 'disCurrMax', {name:'鏈�澶ф牳瀹圭數娴侊細'+disCurrMax});
@@ -4811,6 +4817,9 @@
 			// 鐐瑰嚮鏌ョ湅褰撳墠淇″彿鐨勮川閲�
 			$('#signalBtn').click(function() {
 				var batt = getBatt();
+				var status = GLOBAL.circleStatus.status;
+				var btsOpts = GLOBAL.circleStatus.btsOpts;
+				//var btsOpts = GLOBAL.circleStatus.btsOpts;
 				signalSearch.dev_id = batt.FBSDeviceId;
 				var load = layer.load(1);
 				// 璇锋眰鍚庡彴鑾峰彇淇″彿鐨勮川閲�
@@ -4836,7 +4845,12 @@
 					
 					// 鍥剧墖鎻忚堪
 					signalOpts.name = '淇″彿寮哄害锛�'+signalInfo.signal;
-					changeEleCircleOpt(eleCircle, 'signal', signalOpts);
+					//console.log(signalOpts.name);
+					// 鏄剧ず淇″彿寮哄害
+					status.setText('signal', signalOpts.name);
+					// 鏇存柊閰嶇疆椤圭殑鍊�
+					status.updateOpts('signal', btsOpts, {notShow: false});
+					//changeEleCircleOpt(eleCircle, 'signal', signalOpts);
 				});
 				
 			});
diff --git a/gx_tieta/WebRoot/js/elecircle.content.js b/gx_tieta/WebRoot/js/elecircle.content.js
index d8bd338..afcc6b0 100644
--- a/gx_tieta/WebRoot/js/elecircle.content.js
+++ b/gx_tieta/WebRoot/js/elecircle.content.js
@@ -930,6 +930,18 @@
             }
         }
     };
+    
+    // 鏇存柊閰嶇疆椤圭殑鍊�
+    _prop.updateOpts = function(name, options, update) {
+    	// 閬嶅巻閰嶇疆椤�
+        for(var i =0; i<options.length; i++) {
+        	var _opts = options[i];    // 鑾峰彇褰撳墠寰幆鐨勫彉閲�
+        	// 鏍规嵁鍚嶇О纭畾鏇存敼鐨勫唴瀹�
+            if(_opts.name == name) {
+            	$.extend(_opts, update);
+            }
+        }
+    };
     var options = [
 		{
 			name: 'workstatus',
@@ -1011,7 +1023,7 @@
 			status: 0,
 			notShow: false,
 			content: {
-				text: '閫氫俊璁℃暟:'
+				text: '閫氫俊璁℃暟锛�'
 			}
 		},
 		{
@@ -1020,16 +1032,30 @@
 			status: 0,
 			notShow: false,
 			content: {
-				text:'閫氫俊涓㈠寘鐜�:'
+				text:'閫氫俊涓㈠寘鐜囷細'
+			}
+		},
+		{
+			name: 'signal',
+			type: 'text',
+			status: 0,
+			notShow: true,
+			content:  {
+				text: '淇″彿寮哄害锛�'
 			}
 		}
     ];
     // bts9100閰嶇疆椤�
     gl.circleStatus.btsOpts = optionsBts;
     
+    // 61850鎷撴墤鍥剧姸鎬�
     var status = new Status($('#eleCircleStatus'), options);
     gl.circleStatus.status = status;
     
+    // BTS9100鎷撴墤鍥剧姸鎬�
+    var statusBts = new Status($('#eleCircleStatus'), optionsBts);
+    gl.circleStatus.statusBts = statusBts;
+    
     // 璁剧疆鍏ㄥ眬楠岃瘉璁惧绫诲瀷鐨勬鍒欒〃杈惧紡
 	var globalPattern = {
 		LD9: /^40190/,

--
Gitblit v1.9.1