| | |
| | | $('.left-navigation-bar-but').click(() => { |
| | | this.changeImg = !this.changeImg; |
| | | if (this.changeImg) { |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xzuo.png"); //打开 |
| | | $('.l-n-b-b-img').attr("src", "./images/addL/xzuo.png"); //打开 |
| | | $('.jimu-widget-LeftNavigationBar').css({ |
| | | 'left': '0px' |
| | | }); |
| | |
| | | 'left': '260px' |
| | | }); |
| | | } else { |
| | | $('.l-n-b-b-img').attr("src", "../../images/addL/xyou.png"); //关闭 |
| | | $('.l-n-b-b-img').attr("src", "./images/addL/xyou.png"); //关闭 |
| | | $('.jimu-widget-LeftNavigationBar').css({ |
| | | 'left': '-250px' |
| | | }); |
| | |
| | | |
| | | } |
| | | |
| | | var keyId = this.getUrlKeyId("serviceId"); |
| | | |
| | | if (keyId && keyId != "") { |
| | | for (var i = 0; i < data.length; i++) { |
| | | |
| | | if (data[i].id == keyId) { |
| | | data[i].checked = true |
| | | } |
| | | |
| | | for (var j = 0; j < data[i].children.length; j++) { |
| | | |
| | | if (data[i].children[j].id == keyId) { |
| | | data[i].children[j].checked = true |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | this.data = data; |
| | |
| | | // console.log(obj.data.id, '--', obj.checked, obj); //得到当前点击的节点数据 |
| | | // console.log(obj.checked); //得到当前节点的展开状态:open、close、normal |
| | | // console.log(obj.elem); //得到当前节点元素 |
| | | var keyId = that.getUrlKeyId("serviceId"); |
| | | |
| | | if (obj.data.children && obj.data.children.length > 0) { |
| | | |
| | |
| | | }); |
| | | }); |
| | | } else { |
| | | |
| | | obj.data.children.forEach(item => { |
| | | $.ajax({ |
| | | url: item.src + '/maps.json', |
| | |
| | | url: res[0].path, |
| | | })); |
| | | that[item.id].alpha = item.alpha |
| | | |
| | | if (keyId && keyId != "") { |
| | | that[item.id].getViewableRectangle().then(function (rectangle) { |
| | | return that.map.camera.flyTo({ |
| | | destination: rectangle |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | url: res[0].path, |
| | | })); |
| | | that[obj.data.id].alpha = obj.data.alpha |
| | | |
| | | if (keyId && keyId != "") { |
| | | that[obj.data.id].getViewableRectangle().then(function (rectangle) { |
| | | return that.map.camera.flyTo({ |
| | | destination: rectangle |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | |
| | |
| | | }] |
| | | }], |
| | | }], |
| | | getUrlKeyId: function (name) { |
| | | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); |
| | | var r = window.location.search.substr(1).match(reg); |
| | | if (r != null) return decodeURI(r[2]); |
| | | return null; |
| | | }, |
| | | destroy: function () { |
| | | //销毁的时候触发 |
| | | //todo |