From 96a7cb605dcd16def9a62003686cdfbbe1d102ec Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 11 Jun 2021 18:08:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap

---
 widgets/LeftNavigationBar/Widget.js |   89 +++++++++++++++++++++++++-------------------
 1 files changed, 50 insertions(+), 39 deletions(-)

diff --git a/widgets/LeftNavigationBar/Widget.js b/widgets/LeftNavigationBar/Widget.js
index c9ef115..e0dcc05 100644
--- a/widgets/LeftNavigationBar/Widget.js
+++ b/widgets/LeftNavigationBar/Widget.js
@@ -61,6 +61,51 @@
 				});
 
 				$('#left-navigation-bar-main-search').click(() => { //搜索事件
+					leftSearchItemLayer()
+				})
+
+				$(".jimu-widget-LeftNavigationBar input[type='search']").bind('input propertychange', function () {
+					//做一些事情
+					var val = $(this).val();
+
+					if (val == '') {
+						that.changeData(that.dataAllArray, val); //重写数据
+						layui.use('tree', function () {
+							layui.tree.reload('demoId1', {
+								data: that.data
+							});
+
+							var jqDom = $("#left-tree-list > .layui-tree > div");
+
+							for (var i = 0; i < jqDom.length; i++) {
+								if ($(jqDom[i]).text().indexOf("三维倾斜数据") != -1) {
+									$(jqDom[i]).find('.layui-btn-group').remove()
+								}
+
+								var textList = $(jqDom[i]).find('.layui-tree-txt');
+
+								for (var j = 0; j < textList.length; j++) {
+									$(textList[j]).attr('title', $(textList[j]).text())
+
+								}
+
+							}
+						})
+					}
+
+				})
+
+				$(".jimu-widget-LeftNavigationBar input[type='search']").keyup(function (e) {
+					if (e.keyCode == 13) {
+						leftSearchItemLayer()
+					}
+				})
+
+				$(".jimu-widget-LeftNavigationBar .tree-layer-opcity .close").click(function () {
+					$(".jimu-widget-LeftNavigationBar .tree-layer-opcity").stop().hide();
+				})
+
+				function leftSearchItemLayer() {
 					var val = $('#left-navigation-bar-main-input').val();
 					if (val != '') {
 						var clearOur = () => {
@@ -119,43 +164,8 @@
 							useit(that.data);
 						})
 
-					} else {}
-				})
-
-				$(".jimu-widget-LeftNavigationBar input[type='search']").bind('input propertychange', function () {
-					//做一些事情
-					var val = $(this).val();
-
-					if (val == '') {
-						that.changeData(that.dataAllArray, val); //重写数据
-						layui.use('tree', function () {
-							layui.tree.reload('demoId1', {
-								data: that.data
-							});
-
-							var jqDom = $("#left-tree-list > .layui-tree > div");
-
-							for (var i = 0; i < jqDom.length; i++) {
-								if ($(jqDom[i]).text().indexOf("三维倾斜数据") != -1) {
-									$(jqDom[i]).find('.layui-btn-group').remove()
-								}
-
-								var textList = $(jqDom[i]).find('.layui-tree-txt');
-
-								for (var j = 0; j < textList.length; j++) {
-									$(textList[j]).attr('title', $(textList[j]).text())
-
-								}
-
-							}
-						})
 					}
-
-				})
-
-				$(".jimu-widget-LeftNavigationBar .tree-layer-opcity .close").click(function () {
-					$(".jimu-widget-LeftNavigationBar .tree-layer-opcity").stop().hide();
-				})
+				}
 			},
 
 			closeToolBox: function (item) {},
@@ -238,7 +248,7 @@
 
 							} else {
 
-								if (that[a.id]) { 
+								if (that[a.id]) {
 									that.map.imageryLayers.remove(that[a.id]);
 								}
 
@@ -250,7 +260,7 @@
 								b[k].children = [];
 								b[k].who = 'father';
 								inits(d[k].children, b[k].children)
-							} 
+							}
 						}
 
 					};
@@ -454,13 +464,14 @@
 								if (obj.checked == true) {
 
 									if (obj.data.model) {
+										that.map.scene.globe.depthTestAgainstTerrain = false;
 										var host = that.returnStr(obj.data.src).host;
 										var scene = that.map.scene;
 										var partOfUrl = that.returnStr(obj.data.src).partOfUrl;
 										//添加S3M图层服务
 										that[obj.data.id] = scene.open(host + partOfUrl);
 										//定位到场景
-										
+
 										Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
 											// var sname = scenes[0].name;
 											// Cesium.loadJson(host + partOfUrl + '/scenes/' + sname + '.json').then(function (jsonData) {

--
Gitblit v1.9.3