From d1b572d63b7d15f3243e17fe793f3d080ff03255 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 16 Jun 2021 11:52:40 +0800
Subject: [PATCH] 搜索细节调整,弹框字体,行点击定位

---
 widgets/searchL/Widget.js |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/widgets/searchL/Widget.js b/widgets/searchL/Widget.js
index 768de2c..b3793d0 100644
--- a/widgets/searchL/Widget.js
+++ b/widgets/searchL/Widget.js
@@ -56,6 +56,7 @@
 				$(".searchImg").click(function () {
 					that.getInputData();
 					topic.publish('getLegendsData', that.searchDatas);
+					that.addOneEntitys.removeAll();
 					if (typeof that.searchDatas == 'string') {
 						var han = /^[\u4e00-\u9fa5]+$/;
 						if (han.test(that.searchDatas) || that.searchDatas == '  ') {
@@ -102,8 +103,9 @@
 				$("#local_data").keyup(function (e) {
 					// console.log(e);
 					that.getInputData();
-					topic.publish('getLegendsData', that.searchDatas);
 					if (e.keyCode == 13 && typeof that.searchDatas == 'string') {
+						topic.publish('getLegendsData', that.searchDatas);
+						that.addOneEntitys.removeAll();
 						var han = /^[\u4e00-\u9fa5]+$/;
 						if (han.test(that.searchDatas) || that.searchDatas == '  ') {
 							that.getData(0, that.searchDatas);
@@ -135,6 +137,7 @@
 			},
 			getData: function (index, val) {
 				val = val == '  ' ? '' : val;
+
 				var d = $('.searchLMain').find('.layui-tab-item').hide;
 				var that = this,
 					url = `http://171.34.76.171:8880/pyh-wetResource/monitorRecords/queryMonitorData?name=${val}&start&limit&type=${index}`
@@ -398,6 +401,9 @@
 								that.goOnPosition([obj.data.lon, obj.data.lat], 1, obj.data);
 							}
 						});
+						table.on('row(test)', function (obj) {
+							that.goOnPosition([obj.data.lon, obj.data.lat], 1, obj.data);
+						});
 					}
 					if (data1 != 1) {
 
@@ -473,6 +479,9 @@
 								that.goOnPosition([obj.data.lon, obj.data.lat], 2, obj.data);
 							}
 						});
+						table.on('row(test1)', function (obj) {
+							that.goOnPosition([obj.data.lon, obj.data.lat], 2, obj.data);
+						});
 					}
 					if (data2 != 1) {
 
@@ -525,6 +534,9 @@
 								that.goOnPosition([obj.data.lon, obj.data.lat], 3, obj.data);
 							}
 						});
+						table.on('row(test2)', function (obj) {
+							that.goOnPosition([obj.data.lon, obj.data.lat], 3, obj.data);
+						});
 					}
 					// that.addTitle();
 					//…

--
Gitblit v1.9.3