From c64604f401a006cbb76539416abdbc843a258809 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 03 Jun 2021 10:03:38 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap

---
 config.json                          |    3 
 widgets/searchL/manifest.json        |   17 ++
 index.html                           |  110 ++++++------
 widgets/searchL/nls/es/strings.js    |    5 
 widgets/searchL/Widget.js            |  173 +++++++++++++++++++++
 widgets/searchL/nls/zh-cn/strings.js |    5 
 widgets/searchL/nls/strings.js       |    7 
 widgets/searchL/Widget.html          |   18 ++
 widgets/searchL/css/style.css        |  106 +++++++++++++
 9 files changed, 389 insertions(+), 55 deletions(-)

diff --git a/config.json b/config.json
index 9b57b51..78cd021 100644
--- a/config.json
+++ b/config.json
@@ -162,6 +162,9 @@
           "height": "360px",
           "relativeTo": "map"
         }
+      }, {
+        "name": "搜索栏",
+        "uri": "widgets/searchL/Widget"
       }
     ],
     "groups": [],
diff --git a/index.html b/index.html
index 54e99b6..54b7bac 100644
--- a/index.html
+++ b/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML>
 <html>
-
+ 
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
@@ -22,7 +22,7 @@
         * {
             box-sizing: border-box;
         }
-
+ 
         body,
         html {
             width: 100%;
@@ -33,32 +33,32 @@
             padding: 0;
             overflow: hidden;
         }
-
+ 
         .cesium-viewer-navigationContainer {
             top: 90px !important;
         }
-
+ 
         .cesium-performanceDisplay {
             position: relative;
             right: 250px;
         }
-
+ 
         .jimu-leading-margin1 {
             padding-left: 10px;
         }
-
+ 
         .cesium-baseLayerPicker-dropDown {
             width: 220px !important;
         }
-
+ 
         #main-loading {
             width: 100%;
             height: 100%;
             text-align: center;
             overflow: hidden;
         }
-
-
+ 
+ 
         #main-loading #ie-note {
             position: absolute;
             top: 0;
@@ -67,7 +67,7 @@
             right: 0;
             margin: auto;
         }
-
+ 
         #main-loading #ie-note {
             width: 586px;
             height: 253px;
@@ -76,14 +76,14 @@
             font-size: 14px;
             color: #596679;
         }
-
+ 
         #ie-note .hint-title {
             height: 40px;
             line-height: 48px;
             text-align: left;
             font-weight: bold;
         }
-
+ 
         #ie-note .hint-img {
             background-image: url('images/hint.png');
             background-position: left;
@@ -95,25 +95,25 @@
             line-height: 30px;
             font-weight: bold;
         }
-
+ 
         #ie-note span {
             display: block;
             line-height: 14px;
         }
-
+ 
         #main-page {
             display: none;
             width: 100%;
             height: 100%;
             position: relative;
         }
-
+ 
         #jimu-layout-manager {
             width: 100%;
             height: 100%;
             position: absolute;
         }
-
+ 
         .index_query {
             position: absolute;
             left: 45%;
@@ -121,7 +121,7 @@
             z-index: 999;
             width: 260px;
         }
-
+ 
         #mh_query li {
             list-style: none;
             padding-bottom: 5px;
@@ -132,9 +132,9 @@
             line-height: 20px;
             color: #ffffff;
             cursor: pointer;
-
+ 
         }
-
+ 
         #mh_query {
             width: 100%;
             background: rgba(31, 39, 48, .7);
@@ -144,7 +144,7 @@
             overflow: auto;
             z-index: 999;
         }
-
+ 
         .input-sm {
             width: 260px;
             height: 35px;
@@ -161,26 +161,26 @@
             background-color: rgba(63, 72, 84, .7);
             border: none;
         }
-
+ 
         input::-webkit-input-placeholder {
             color: #fff;
         }
-
+ 
         .input_img {
             position: absolute;
             right: 0;
             height: 35px;
             cursor: pointer;
         }
-
+ 
         .cesium-viewer-toolbar {
             top: 55px !important;
             right: -23333333333370px !important;
             width: 80px;
             height: 30px;
-
+ 
         }
-
+ 
         .cesium-viewer-toolbar .cesium-baseLayerPicker-dropDown {
             position: fixed !important;
             top: 98px !important;
@@ -190,7 +190,7 @@
     </style>
     <link rel="stylesheet" type="text/css" href="jimu.js/loading/loading.css"/>
 </head>
-
+ 
 <body class="claro jimu-main-font">
 <div id="main-loading">
     <div id="app-loading"></div>
@@ -199,29 +199,29 @@
         <div class="hint-title">Error</div>
         <div class="hint-img">Your browser is currently not supported.</div>
         <p class="hint-text">
-					<span>
+                    <span>
             推荐chorome浏览器
           </span>
         </p>
     </div>
 </div>
-
+ 
 <div id="main-page">
     <div id="jimu-layout-manager"></div>
-
-    <div class="index_query">
+ 
+    <!-- <div class="index_query">
         <div>
             <input id="local_data" autocomplete="off" data-provide="typeahead" type="text" class="input-sm"
                    placeholder="输入关键字以搜索"/>
             <img class="input_img" src="images/query.png">
         </div>
         <div id="mh_query"></div>
-    </div>
-
+    </div> -->
+ 
 </div>
 <script src="env.js"></script>
-
-
+ 
+ 
 <script type="text/javascript" src="simpleLoader.js"></script>
 <!-- <script type="module">
     window.CESIUM_BASE_URL = 'http://localhost:8081/gzsw3D/libs/Source';
@@ -230,13 +230,13 @@
   </script> -->
 <script type="text/javascript" src="init.js"></script>
 <!-- <script>
-
+ 
     var indData = [];
-
+ 
     //搜索点击事件
     $(".input_img").click(function () {
         var query = $("#local_data").val();
-
+ 
         var data = {
             "queryMode": "SqlQuery",
             "bounds": {"leftBottom": {"x": 0, "y": 0}, "rightTop": {"x": 100, "y": 100}},
@@ -258,20 +258,20 @@
             "keywords": "",
             "spatialQueryMode": "INTERSECT"
         };
-
+ 
         var datas = JSON.stringify(data);
-
-
+ 
+ 
         $.ajax({
             url: 'http://61.131.223.3:8090/iserver/services/map-WLPOI/rest/maps/WLPOI/queryResults.json?returnPostAction=true&getMethodForm=true&returnContent=true',
             data: datas,
             type: "POST",
             success: function success(res) {
-
+ 
                 var dataList = [];
-
+ 
                 var index = 0;
-
+ 
                 for (var i = 0; i < res.recordsets.length; i++) {
                     for (var j = 0; j < res.recordsets[i].features.length; j++) {
                         var data = {};
@@ -290,15 +290,15 @@
                             data.x = res.recordsets[i].features[j].fieldValues[4];
                             data.y = res.recordsets[i].features[j].fieldValues[5];
                         }
-
+ 
                         dataList.push(data);
                     }
                 }
-
+ 
                 indData = dataList;
-
+ 
                 window.viewer.entities.removeAll();
-
+ 
                 $("#mh_query").html("");
                 if (query == "") {
                     $("#mh_query").html("");
@@ -310,15 +310,15 @@
                     addPoint(indData);
                 }
                 $("#mh_query").append(html);
-
+ 
                 //添加景点li点击事件,地图定位
                 $('#mh_query li').click(function () {
                     // var selectItem = this.innerText.trim();
                     // selectItem = selectItem.split("、")[1];
                     var ids = $(this).attr("id");
-
+ 
                     $("#mh_query").html("");
-
+ 
                     window.viewer.camera.flyTo({
                         destination: Cesium.Cartesian3.fromDegrees(Number(indData[ids].x), Number(indData[ids].y), 500)
                     });
@@ -326,7 +326,7 @@
             }
         });
     });
-
+ 
     function addPoint(result) {
         for (var i = 0; i < result.length; i++) {
             var imgs = "./widgets/Scenic/img/street.png";
@@ -355,7 +355,7 @@
             // } else if (result[i].ckey == "other") {
             //     imgs = "./widgets/Scenic/img/other.png";
             // }
-
+ 
             window.viewer.entities.add({
                 id: result[i].id + "jd",
                 position: Cesium.Cartesian3.fromDegrees(Number(result[i].x), Number(result[i].y), 0),
@@ -382,10 +382,10 @@
                 }
             });
         }
-
+ 
     }
-
-
+ 
+ 
 </script> -->
 </body>
 </html>
\ No newline at end of file
diff --git a/widgets/searchL/Widget.html b/widgets/searchL/Widget.html
new file mode 100644
index 0000000..ddc93a9
--- /dev/null
+++ b/widgets/searchL/Widget.html
@@ -0,0 +1,18 @@
+<div>
+	<div id="i-f-gjz" class="input-font"
+		style="border-radius: 5px 0 0px 5px;width:4.7rem;background-color: #3E9FFC;color: #fff;">关键字</div>
+	<div id="i-f-zb" class="input-font" style="width:3.5rem">坐标</div>
+	<!-- <input type="text" placeholder="输入关键字以搜索" class="input-sm /> -->
+	<input id="local_data" autocomplete="off" data-provide="typeahead" type="text" class="input-sms"
+		placeholder="输入关键字以搜索" />
+	<div id="inputTwo">
+		<input id="local_data1" autocomplete="off" data-provide="typeahead" type="text" class="input-sms1"
+			placeholder="输入经度" />
+		<input id="local_data2" autocomplete="off" data-provide="typeahead" type="text" class="input-sms1"
+			placeholder="输入纬度" />
+	</div>
+	<img class="input_img" src="images/query.png">
+	<div class="searchLMain">
+		1111
+	</div>
+</div>
\ No newline at end of file
diff --git a/widgets/searchL/Widget.js b/widgets/searchL/Widget.js
new file mode 100644
index 0000000..3c6bffa
--- /dev/null
+++ b/widgets/searchL/Widget.js
@@ -0,0 +1,173 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright © 2019 zhongsong. All Rights Reserved.
+// 模块描述:显示坐标
+///////////////////////////////////////////////////////////////////////////
+define([
+	'dojo/_base/declare',
+	'dojo/_base/lang',
+	'dojo/_base/array',
+	'dojo/_base/html',
+	'dojo/topic',
+	'jimu/BaseWidget',
+	'jimu/utils',
+	'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
+	'libs/zTree_v3/js/jquery.ztree.all'
+],
+	function (declare,
+		lang,
+		array,
+		html,
+		topic,
+		BaseWidget,
+		aspect,
+		string,
+		utils
+	) {
+		return declare([BaseWidget], {
+			baseClass: 'jimu-widget-searchL',
+			name: 'searchL',
+			layers: {},
+			startup: function () {
+
+				//关键词&&坐标
+				$("#i-f-gjz").click(function () {
+					console.log("gjz");
+					$("#i-f-zb").css({ 'backgroundColor': '#fff', 'color': '#000' });
+					$("#i-f-gjz").css({ 'backgroundColor': '#3E9FFC', 'color': '#fff' });
+					$("#inputTwo").css({ 'display': 'none' });
+					$("#local_data").css({ 'display': 'inline-block' });
+				})
+				$("#i-f-zb").click(function () {
+					console.log("zb");
+					$("#i-f-gjz").css({ 'backgroundColor': '#fff', 'color': '#000' });
+					$("#i-f-zb").css({ 'backgroundColor': '#3E9FFC', 'color': '#fff' });
+					$("#local_data").css({ 'display': 'none' });
+					$("#inputTwo").css({ 'display': 'inline-block' });
+				})
+
+				// 暴露在外的接口
+				// topic.subscribe("closeTool", lang.hitch(this, this.closeToolBox));
+				// this.inherited(arguments);
+				// $('.tool-bar .tool-btn span').click(function () {
+				// 	topic.publish('closeMap', this.name);
+				// 	topic.publish('closeZtree', this.name);
+				// 	$('.tool-y-box').toggle();
+				// })
+
+
+				// 查询定位
+				// $('.location-tool').click(function () {
+				// 	$('.jimu-widget-Location').show();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-Sign').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+
+
+				// 图上量算
+				// $('.measure-tool').click(function () {
+				// 	$('.jimu-widget-Location').hide();
+				// 	$('.jimu-widget-Measurement').show();
+				// 	$('.jimu-widget-Sign').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+
+				// 我的标记
+				// $('.sign-tool').click(function () {
+				// 	topic.publish('openSign', 'Sign');
+				// 	$('.jimu-widget-Location').hide();
+				// 	$('.jimu-widget-Sign').show();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+
+				// 卷帘对比
+				// $('.rolling-tool').click(function () {
+				// 	topic.publish('openRolling', 'Rolling');
+				// 	$('.jimu-widget-Location').hide();
+				// 	$('.jimu-widget-Rolling').show();
+				// 	$('#widgets_Rolling_Widget_17').show();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle();
+				// })
+
+				// 坐标定位
+				// $('.CoorPosition-tool').click(function () {
+				// 	$('.jimu-widget-CoorPosition').show();
+				// 	$('.jimu-widget-Location').hide();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.jimu-widget-Sign').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+
+				// 地图打印
+				// $('.MapPrinting-tool').click(function () {
+				// 	$('.jimu-widget-Location').hide();
+				// 	$('.jimu-widget-MapPrinting').show();
+				// 	$('.jimu-widget-CoorPosition').hide();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.jimu-widget-Sign').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+
+				// 路线导航
+				// $('.RouteNavigate-tool').click(function () {
+				// 	$('.jimu-widget-RouteNavigate').show();
+				// 	$('.jimu-widget-MapPrinting').hide();
+				// 	$('.jimu-widget-CoorPosition').hide();
+				// 	$('.jimu-widget-Measurement').hide();
+				// 	$('.jimu-widget-Sign').hide();
+				// 	$('.jimu-widget-FlyRoute').hide();
+				// 	$('.jimu-widget-DynamicRiver').hide();
+				// 	$('.tool-y-box').toggle()
+				// })
+			},
+
+			closeToolBox: function (item) {
+				// if (item != this.name) {
+				// 	$('.tool-y-box').hide();
+				// }
+			},
+
+			onOpen: function () {
+				//面板打开的时候触发 (when open this panel trigger)
+			},
+
+			onClose: function () {
+				//面板关闭的时候触发 (when this panel is closed trigger)
+			},
+
+			onMinimize: function () {
+				this.resize();
+			},
+
+			onMaximize: function () {
+				this.resize();
+			},
+
+			resize: function () {
+
+			},
+
+
+			destroy: function () {
+				//销毁的时候触发
+				//todo
+				//do something before this func
+				this.inherited(arguments);
+			}
+
+		});
+	});
\ No newline at end of file
diff --git a/widgets/searchL/css/style.css b/widgets/searchL/css/style.css
new file mode 100644
index 0000000..d77d5c5
--- /dev/null
+++ b/widgets/searchL/css/style.css
@@ -0,0 +1,106 @@
+.jimu-widget-searchL {
+  position: fixed;
+  font-size: 14px;
+  height: 35px !important;
+  line-height: 32px;
+  width: 300px !important;
+  top: 20px !important;
+  left: calc(50% - 150px) !important;
+  /* left: calc(100%-300); */
+  /* 240px */
+  background: rgba(255, 255, 255, 1);
+  color: #000;
+  border-right: 1px solid #000;
+  border-radius: 6px 6px 6px 6px;
+  text-align: center;
+  /* cursor: pointer; */
+  z-index: 10 !important;
+  display: flex;
+  align-items: center;
+}
+
+.jimu-widget-searchL .input-font {
+  /* width: 3rem; */
+  height: 35px;
+  /* color: #fff; */
+  display: flex;
+  font-size: 14px;
+  align-items: center;
+  justify-content: center;
+  border-right: 1px solid rgba(0, 0, 0, .2);
+}
+
+.jimu-widget-searchL .input-sms {
+  width: 260px;
+  height: 35px;
+  line-height: 40px;
+  font-size: 14px;
+  text-indent: 8px;
+  outline: 0;
+  float: left;
+  border: none;
+  /* box-shadow: 0 2px 6px #3a3c42; */
+  border-top-left-radius: 2px;
+  border-bottom-left-radius: 2px;
+  color: #000;
+  /* background-color: rgba(63, 72, 84, .7); */
+  border: none;
+  border-radius: 0px 5px 5px 0px;
+}
+
+.jimu-widget-searchL #inputTwo {
+  display: none;
+  width: 260px;
+  height: 35px;
+  font-size: 14px;
+  align-items: center;
+  justify-content: center;
+}
+
+.jimu-widget-searchL .input-sms1 {
+  width: 90px;
+  height: 35px;
+  line-height: 40px;
+  font-size: 14px;
+  text-indent: 8px;
+  outline: 0;
+  float: left;
+  border: none;
+  /* box-shadow: 0 2px 6px #3a3c42; */
+  border-top-left-radius: 2px;
+  border-bottom-left-radius: 2px;
+  color: #000;
+  /* background-color: rgba(63, 72, 84, .7); */
+  border: none;
+  /* border-radius: 0px 5px 5px 0px; */
+}
+
+.jimu-widget-searchL .input-sms1::-webkit-input-placeholder, .jimu-widget-searchL .input-sms::-webkit-input-placeholder {
+  color: #000;
+  font-size: 14px;
+}
+
+.jimu-widget-searchL .input-sms1::-moz-placeholder, .jimu-widget-searchL .input-sms::-moz-placeholder {
+  /* Mozilla Firefox 19+ */
+  color: #000;
+  font-size: 14px;
+}
+
+.jimu-widget-searchL .input-sms1:-moz-placeholder, .jimu-widget-searchL .input-sms:-moz-placeholder {
+  /* Mozilla Firefox 4 to 18 */
+  color: #000;
+  font-size: 14px;
+}
+
+.jimu-widget-searchL .input-sms1::-ms-input-placeholder, .jimu-widget-searchL .input-sms::-ms-input-placeholder {
+  color: #000;
+  font-size: 14px;
+}
+.jimu-widget-searchL .searchLMain {
+  position: fixed;
+  right: 0;
+  top: 0;
+  width: 400px;
+  height: 600px;
+  background-color: aliceblue;
+}
\ No newline at end of file
diff --git a/widgets/searchL/manifest.json b/widgets/searchL/manifest.json
new file mode 100644
index 0000000..d86f5a6
--- /dev/null
+++ b/widgets/searchL/manifest.json
@@ -0,0 +1,17 @@
+{
+  "name": "searchL",
+  "2D": true,
+  "3D": true,
+  "platform": "HTML",
+  "version": "2.10",
+  "wabVersion": "2.10",
+  "author": "yuanjy",
+  "description": "",
+  "copyright": "",
+  "license": "",
+  "properties": {
+    "hasConfig": false,
+    "inPanel": false,
+    "hasVersionManager": false
+  }
+}
\ No newline at end of file
diff --git a/widgets/searchL/nls/es/strings.js b/widgets/searchL/nls/es/strings.js
new file mode 100644
index 0000000..4cf0b87
--- /dev/null
+++ b/widgets/searchL/nls/es/strings.js
@@ -0,0 +1,5 @@
+define(
+   ({
+    _widgetLabel: "searchL"
+  })
+);
\ No newline at end of file
diff --git a/widgets/searchL/nls/strings.js b/widgets/searchL/nls/strings.js
new file mode 100644
index 0000000..461bde8
--- /dev/null
+++ b/widgets/searchL/nls/strings.js
@@ -0,0 +1,7 @@
+define({
+  root: ({
+    _widgetLabel: "searchL"
+  }),
+  "es": 1,
+  "zh-cn": 1
+});
\ No newline at end of file
diff --git a/widgets/searchL/nls/zh-cn/strings.js b/widgets/searchL/nls/zh-cn/strings.js
new file mode 100644
index 0000000..6a74ad6
--- /dev/null
+++ b/widgets/searchL/nls/zh-cn/strings.js
@@ -0,0 +1,5 @@
+define(
+   ({
+    _widgetLabel: "搜索栏"
+  })
+);
\ No newline at end of file

--
Gitblit v1.9.3