shuishen
2021-06-23 9356ddd3554e1ddf8847923d0ce2eceeef8411f0
widgets/searchL/Widget.js
@@ -55,7 +55,7 @@
            $(".searchImg").click(function () {
               that.getInputData();
               topic.publish('getLegendsData', that.searchDatas);
               that.addOneEntitys.removeAll();
               if (typeof that.searchDatas == 'string') {
                  var han = /^[\u4e00-\u9fa5]+$/;
@@ -98,14 +98,13 @@
            $(".searchColce").click(function () {
               $('.searchLMain').hide();
               that.addOneEntitys.removeAll();
               topic.publish('getLegendsData', '');
               topic.publish('getLegendsData', "legends", '');
            })
            $("#local_data").keyup(function (e) {
               // console.log(e);
               that.getInputData();
               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 == '  ') {
@@ -171,10 +170,13 @@
            if (d == []) {
               if (n == 0) {
                  this.beginLayUi(d);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点");
               } else if (n == 1) {
                  this.beginLayUi(1, d);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点");
               } else if (n == 2) {
                  this.beginLayUi(1, 1, d);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "监测站点");
               }
            } else {
               var i = 1;
@@ -186,10 +188,13 @@
               var data = d;
               if (n == 0) {
                  this.beginLayUi(data);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点");
               } else if (n == 1) {
                  this.beginLayUi(1, data);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点");
               } else if (n == 2) {
                  this.beginLayUi(1, 1, data);
                        topic.publish('getLegendsData', "legends", d, "./images/addL/监测.png", "监测站点");
               }
            }
         },
@@ -199,7 +204,6 @@
            this.map.dataSources.add(dataSourceOne);
            //面板打开的时候触发
            var that = this;
            that.getData(0)
            layui.use('element', function () {
               var $ = layui.jquery
                  , element = layui.element;