From d8d0f5fb17025c8ea92ef9f03ad5cc57d18b3b16 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 24 Jun 2021 09:08:54 +0800
Subject: [PATCH] xj
---
widgets/spatialAnalysis/Widget.js | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index 26fb6ba..62e479c 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/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,14 +275,14 @@
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',
appendItemS: function (item, obj, layer) {
// console.log('a1')
var that = this;
- if (item == this.fakeName) {
+ if (item == this.name) {
// $("#SelectLayerToolItemTitle .no-data").stop().hide();
var flag = true;
@@ -290,7 +290,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,15 +306,15 @@
$("#SelectLayerToolItemTitle").append(liItem);
}
- that.liClick(obj.id,obj.title);
+ that.liClick(obj.id, obj.title);
}
},
removeItemS: function (item, obj) {
// console.log('r1')
- if (item == this.fakeName) {
+ if (item == this.name) {
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();
}
}
@@ -331,7 +331,7 @@
appendTiltS: function (item, obj, layer) {
// console.log('a2')
var that = this;
- if (item == this.fakeName) {
+ if (item == this.name) {
// $("#SelectLayerToolItemTitle .no-data").stop().hide();
@@ -341,7 +341,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,15 +355,15 @@
$("#SelectLayerToolItemTitle").append(liItem);
}
- that.liClick(obj.id,obj.title);
+ that.liClick(obj.id, obj.title);
}
},
removeTiltS: function (item, obj) {
// console.log('r2')
- if (item == this.fakeName) {
+ if (item == this.name) {
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();
}
}
--
Gitblit v1.9.3