Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
3 files modified
1 files added
| | |
| | | }); |
| | | |
| | | $('#left-navigation-bar-main-search').click(() => { //搜索事件 |
| | | leftSearchItemLayer() |
| | | }) |
| | | |
| | | $(".jimu-widget-LeftNavigationBar input[type='search']").bind('input propertychange', function () { |
| | | //做一些事情 |
| | | var val = $(this).val(); |
| | | |
| | | if (val == '') { |
| | | that.changeData(that.dataAllArray, val); //重写数据 |
| | | layui.use('tree', function () { |
| | | layui.tree.reload('demoId1', { |
| | | data: that.data |
| | | }); |
| | | |
| | | var jqDom = $("#left-tree-list > .layui-tree > div"); |
| | | |
| | | for (var i = 0; i < jqDom.length; i++) { |
| | | if ($(jqDom[i]).text().indexOf("三维倾斜数据") != -1) { |
| | | $(jqDom[i]).find('.layui-btn-group').remove() |
| | | } |
| | | |
| | | var textList = $(jqDom[i]).find('.layui-tree-txt'); |
| | | |
| | | for (var j = 0; j < textList.length; j++) { |
| | | $(textList[j]).attr('title', $(textList[j]).text()) |
| | | |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | |
| | | $(".jimu-widget-LeftNavigationBar input[type='search']").keyup(function (e) { |
| | | if (e.keyCode == 13) { |
| | | leftSearchItemLayer() |
| | | } |
| | | }) |
| | | |
| | | $(".jimu-widget-LeftNavigationBar .tree-layer-opcity .close").click(function () { |
| | | $(".jimu-widget-LeftNavigationBar .tree-layer-opcity").stop().hide(); |
| | | }) |
| | | |
| | | function leftSearchItemLayer() { |
| | | var val = $('#left-navigation-bar-main-input').val(); |
| | | if (val != '') { |
| | | var clearOur = () => { |
| | |
| | | useit(that.data); |
| | | }) |
| | | |
| | | } else {} |
| | | }) |
| | | |
| | | $(".jimu-widget-LeftNavigationBar input[type='search']").bind('input propertychange', function () { |
| | | //做一些事情 |
| | | var val = $(this).val(); |
| | | |
| | | if (val == '') { |
| | | that.changeData(that.dataAllArray, val); //重写数据 |
| | | layui.use('tree', function () { |
| | | layui.tree.reload('demoId1', { |
| | | data: that.data |
| | | }); |
| | | |
| | | var jqDom = $("#left-tree-list > .layui-tree > div"); |
| | | |
| | | for (var i = 0; i < jqDom.length; i++) { |
| | | if ($(jqDom[i]).text().indexOf("三维倾斜数据") != -1) { |
| | | $(jqDom[i]).find('.layui-btn-group').remove() |
| | | } |
| | | |
| | | var textList = $(jqDom[i]).find('.layui-tree-txt'); |
| | | |
| | | for (var j = 0; j < textList.length; j++) { |
| | | $(textList[j]).attr('title', $(textList[j]).text()) |
| | | |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | |
| | | $(".jimu-widget-LeftNavigationBar .tree-layer-opcity .close").click(function () { |
| | | $(".jimu-widget-LeftNavigationBar .tree-layer-opcity").stop().hide(); |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | closeToolBox: function (item) {}, |
| | |
| | | |
| | | } else { |
| | | |
| | | if (that[a.id]) { |
| | | if (that[a.id]) { |
| | | that.map.imageryLayers.remove(that[a.id]); |
| | | } |
| | | |
| | |
| | | b[k].children = []; |
| | | b[k].who = 'father'; |
| | | inits(d[k].children, b[k].children) |
| | | } |
| | | } |
| | | } |
| | | |
| | | }; |
| | |
| | | if (obj.checked == true) { |
| | | |
| | | if (obj.data.model) { |
| | | that.map.scene.globe.depthTestAgainstTerrain = false; |
| | | var host = that.returnStr(obj.data.src).host; |
| | | var scene = that.map.scene; |
| | | var partOfUrl = that.returnStr(obj.data.src).partOfUrl; |
| | | //添加S3M图层服务 |
| | | that[obj.data.id] = scene.open(host + partOfUrl); |
| | | //定位到场景 |
| | | |
| | | |
| | | Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) { |
| | | // var sname = scenes[0].name; |
| | | // Cesium.loadJson(host + partOfUrl + '/scenes/' + sname + '.json').then(function (jsonData) { |
| | |
| | | var data = res.data.data; |
| | | // console.log(data, 99999); |
| | | that.beginLayuiDropdown(data) |
| | | |
| | | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | beginLayuiDropdown: function (data) { |
| | | var that = this; |
| | | var d = []; |
| | | for (var k in data) { |
| | | d.push({ |
| | | var obj = { |
| | | title: data[k].name, |
| | | id: data[k].id |
| | | }) |
| | | id: data[k].id, |
| | | } |
| | | if (data[k].seviceUrl) { |
| | | obj.src = data[k].seviceUrl |
| | | } |
| | | d.push(obj) |
| | | |
| | | |
| | | } |
| | | layui.use(['dropdown', 'util', 'layer', 'table'], function () { |
| | | var dropdown = layui.dropdown |
| | |
| | | //点击事件 |
| | | // layer.tips('点击了:' + obj.title, this.elem, { tips: [1, '#5FB878'] }) |
| | | var str = obj.title; |
| | | |
| | | $('.jimu-widget-instructions').find('.instructions-title').empty().append(str); |
| | | |
| | | if (that[obj.id]) { |
| | | that.map.imageryLayers.remove(that[obj.id]); |
| | | } |
| | | |
| | | if (obj.src) { |
| | | $.ajax({ |
| | | url: res.data[i].seviceUrl + '/maps.json', |
| | | type: 'get', |
| | | dataType: 'JSON', |
| | | success: function (result) { |
| | | console.log(res.data[i]) |
| | | |
| | | |
| | | that[res.data[i].id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({ |
| | | url: result[0].path, |
| | | })); |
| | | that[res.data[i].id].alpha = 1 |
| | | |
| | | } |
| | | }) |
| | | } else { |
| | | |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | | var layer = layui.layer //弹层 |
| | | // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 }); |
| | | layer.tips('暂无该服务', '.jimu-widget-instructions', { |
| | | tips: [2, '#FF5722'] |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }); |
| | | }); |
| New file |
| | |
| | | { |
| | | "code": "200", |
| | | "data": [{ |
| | | "id": "1", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "余干康山候鸟县级自然保护区" |
| | | }, |
| | | { |
| | | "id": "2", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "东鄱阳湖国家湿地公园" |
| | | }, |
| | | { |
| | | "id": "3", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "鄱阳湖南矶湿地国家级自然保护区" |
| | | }, |
| | | { |
| | | "id": "4", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "鄱阳湖国家级自然保护区" |
| | | }, |
| | | { |
| | | "id": "6", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "都昌候鸟省级自然保护区" |
| | | }, |
| | | { |
| | | "id": "7", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "庐山星湖湾省级湿地公园" |
| | | }, |
| | | { |
| | | "id": "8", |
| | | "seviceUrl": "http://171.34.76.172:8090/iserver/services/map-PYHBHD_BJ/rest", |
| | | "NAME": "都昌北鄱阳湖省级湿地公园" |
| | | }, |
| | | { |
| | | "id": "9", |
| | | "seviceUrl": "", |
| | | "NAME": "五星白鹤保护小区" |
| | | } |
| | | ], |
| | | "success": true, |
| | | "message": "查询成功" |
| | | } |
| | |
| | | } |
| | | } else { |
| | | if (that.searchDatas[0] && that.searchDatas[1]) { |
| | | that.map.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees(Number(lng), Number(lat), Number(gaodu)) |
| | | destination: Cesium.Cartesian3.fromDegrees(Number(that.searchDatas[0]), Number(that.searchDatas[1]), Number(8000)) |
| | | |
| | | }); |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | |
| | | that.map.entities.removeAll(); |
| | | }) |
| | | |
| | | $("#local_data").keyup(function (e) { |
| | | console.log(e); |
| | | that.getInputData(); |
| | | if (e.keyCode == 13 && typeof that.searchDatas == 'string') { |
| | | var han = /^[\u4e00-\u9fa5]+$/; |
| | | if (han.test(that.searchDatas) || that.searchDatas == ' ') { |
| | | that.getData(0, that.searchDatas); |
| | | $('.searchLMain').show(); |
| | | $('.searchLMain').find('ul.layui-tab-title li:eq(0)').addClass('layui-this').siblings().removeClass('layui-this'); |
| | | $('.searchLMain').find('div.layui-tab-content > div.layui-tab-item:eq(0)').addClass('layui-show').siblings().removeClass('layui-show'); |
| | | |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | | var layer = layui.layer //弹层 |
| | | // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 }); |
| | | layer.tips('请先填写关键字', '.searchImg', { |
| | | tips: [2, '#FF5722'] |
| | | }); |
| | | }) |
| | | $('.searchLMain').hide(); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getInputData: function () { |
| | | if (this.states == 'one') { |