liuyg
2021-06-23 cb8c1b31b685519b3eb897cc9d1f831ef8fcb259
widgets/spatialAnalysis/Widget.js
@@ -262,10 +262,10 @@
            topic.subscribe("appendTiltS", lang.hitch(this, this.appendTiltS));
            topic.subscribe("removeTiltS", lang.hitch(this, this.removeTiltS));
            this.liClick('默认:天地图影像','默认:天地图影像');
            this.liClick('默认:天地图影像', '默认:天地图影像');
         },
         liClick: function (itemid,name) {
         liClick: function (itemid, name) {//点击事件
            var liList = $(`[itemid='${itemid}s']`);
            // console.log(liList);
            liList.click(() => {
@@ -275,7 +275,8 @@
               dom.empty();
               var str = `${name} <i class="layui-icon layui-icon-down layui-font-12"></i>`
               dom.append(str);
               dom = $('#SelectLayerToolItem').hide();
               dom.attr("title", name);
               $('#SelectLayerToolItem').hide();
            })
         },
         fakeName: 'Layermanagement',
@@ -290,7 +291,7 @@
               // console.log(liList)
               // console.log($('#SelectLayerToolItemTitle'))
               for (var i = 0; i < liList.length; i++) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
                     flag = false
                  }
               }
@@ -306,7 +307,7 @@
                  $("#SelectLayerToolItemTitle").append(liItem);
               }
               that.liClick(obj.id,obj.title);
               that.liClick(obj.id, obj.title);
            }
         },
         removeItemS: function (item, obj) {
@@ -314,7 +315,7 @@
            if (item == this.fakeName) {
               var liList = $("#SelectLayerToolItemTitle li");
               for (var i = 0; i < liList.length; i++) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
                     $(liList[i]).remove();
                  }
               }
@@ -341,7 +342,7 @@
               for (var i = 0; i < liList.length; i++) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
                     flag = false
                  }
@@ -355,7 +356,7 @@
                  $("#SelectLayerToolItemTitle").append(liItem);
               }
               that.liClick(obj.id,obj.title);
               that.liClick(obj.id, obj.title);
            }
         },
         removeTiltS: function (item, obj) {
@@ -363,7 +364,7 @@
            if (item == this.fakeName) {
               var liList = $("#SelectLayerToolItemTitle li");
               for (var i = 0; i < liList.length; i++) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
                  if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
                     $(liList[i]).remove();
                  }
               }