liuyg
2021-06-16 d1b572d63b7d15f3243e17fe793f3d080ff03255
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();
               //…