| config.json | ●●●●● patch | view | raw | blame | history | |
| index.html | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/Widget.html | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/Widget.js | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/css/style.css | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/manifest.json | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/nls/es/strings.js | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/nls/strings.js | ●●●●● patch | view | raw | blame | history | |
| widgets/searchL/nls/zh-cn/strings.js | ●●●●● patch | view | raw | blame | history |
config.json
@@ -163,6 +163,9 @@ "height": "360px", "relativeTo": "map" } }, { "name": "搜索栏", "uri": "widgets/searchL/Widget" } ], "groups": [], index.html
@@ -209,14 +209,14 @@ <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> widgets/searchL/Widget.html
New file @@ -0,0 +1,15 @@ <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> widgets/searchL/Widget.js
New file @@ -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); } }); }); widgets/searchL/css/style.css
New file @@ -0,0 +1,94 @@ .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: 16px; 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: 16px; 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: 16px; align-items: center; justify-content: center; } .jimu-widget-searchL .input-sms1 { width: 90px; height: 35px; line-height: 40px; font-size: 16px; 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; } .jimu-widget-searchL .input-sms1::-moz-placeholder, .jimu-widget-searchL .input-sms::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #000; } .jimu-widget-searchL .input-sms1:-moz-placeholder, .jimu-widget-searchL .input-sms:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #000; } .jimu-widget-searchL .input-sms1::-ms-input-placeholder, .jimu-widget-searchL .input-sms::-ms-input-placeholder { Internet Explorer 10-11 color: #000; } widgets/searchL/manifest.json
New file @@ -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 } } widgets/searchL/nls/es/strings.js
New file @@ -0,0 +1,5 @@ define( ({ _widgetLabel: "searchL" }) ); widgets/searchL/nls/strings.js
New file @@ -0,0 +1,7 @@ define({ root: ({ _widgetLabel: "searchL" }), "es": 1, "zh-cn": 1 }); widgets/searchL/nls/zh-cn/strings.js
New file @@ -0,0 +1,5 @@ define( ({ _widgetLabel: "搜索栏" }) );