| | |
| | | classs: 'profileAnalysis-tool', |
| | | img: './images/addL/剖面分析.png' |
| | | } |
| | | // , {//做好静态, |
| | | // name: '建造实体', |
| | | // classs: 'modelDiagram-tool', |
| | | // img: './images/addL/pdpx.png' |
| | | // } |
| | | , {//做好静态, |
| | | name: '建造实体', |
| | | classs: 'modelDiagram-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | // , {//https://blog.csdn.net/supermapsupport/article/details/100134590 |
| | | // //需要iServer发布成三维服务 |
| | | // name: '坡度分析', |
| | |
| | | classs: 'digTheEarth-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | // , {//方量分析//做好 |
| | | // name: '方量分析', |
| | | // classs: 'volumeAnalysis-tool', |
| | | // img: './images/addL/pdpx.png' |
| | | // } |
| | | , {//方量分析//做好 |
| | | name: '方量分析', |
| | | classs: 'volumeAnalysis-tool', |
| | | img: './images/addL/pdpx.png' |
| | | }, |
| | | {//通视分析 |
| | | name: '通视分析', |
| | | classs: 'throughSee-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | ]; |
| | | |
| | | that.beginSpatialAnalysis(domHtmls); |
| | |
| | | , {//空间查询 |
| | | name: '空间查询', |
| | | classs: 'spatialQuery-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , {//多边形裁剪 |
| | | name: '多边形裁剪', |
| | | classs: 'polygonClipping-tool', |
| | | img: './images/addL/pdpx.png' |
| | | }, |
| | | {//通视分析 |
| | | name: '通视分析', |
| | | classs: 'throughSee-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , |
| | |
| | | topic.publish('beginSpatialQuery', 'beginSpatialQuery'); |
| | | }) |
| | | |
| | | // var datas = [//layui舍弃 |
| | | // { |
| | | // title: '默认:天地图影像' |
| | | // // , child: [ |
| | | // // { |
| | | // // title: 'menu item 3-2-1' |
| | | // // , id: 105 |
| | | // // } |
| | | // // ] |
| | | // } |
| | | // ] |
| | | // // that.beginRool(datas); |
| | | // that.datas = datas; |
| | | // // 注册添加工具事件--规定操作图层 |
| | | // topic.subscribe("addSelectLayerTool", lang.hitch(this, this.addSelectLayerTool)); |
| | | // // 注册删除工具事件--规定操作图层 |
| | | // topic.subscribe("removeSelectLayerTool", lang.hitch(this, this.removeSelectLayerTool)); |
| | | //多边形裁剪 |
| | | $('.polygonClipping-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | $(".jimu-widget-polygonClipping").show(); |
| | | topic.publish('beginpolygonClipping', 'beginpolygonClipping'); |
| | | }) |
| | | |
| | | //通视分析 |
| | | $('.throughSee-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | $(".jimu-widget-throughSee").show(); |
| | | topic.publish('beginthroughSee', 'beginthroughSee'); |
| | | }) |
| | | |
| | | |
| | | $('.SelectLayerTool').click(() => { |
| | | $('#SelectLayerToolItem').toggle(); |
| | |
| | | } |
| | | }, |
| | | removeItemS: function (item, obj) { |
| | | // console.log('r1') |
| | | console.log(obj, 'r1') |
| | | 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 + 's') { |
| | | $(liList[i]).remove(); |
| | | var dom = $('.SelectLayerTool').attr("title"); |
| | | console.log(dom == obj.title, this.liClick) |
| | | if (dom == obj.title) { |
| | | this.liClick('默认:天地图影像', '默认:天地图影像'); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }, |
| | | removeTiltS: function (item, obj) { |
| | | console.log(obj, 'r2') |
| | | // console.log('r2') |
| | | 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 + 's') { |
| | | $(liList[i]).remove(); |
| | | var dom = $('.SelectLayerTool').attr("title"); |
| | | if (dom == obj.title) { |
| | | this.liClick('默认:天地图影像', '默认:天地图影像'); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | // datas: [],//layui舍弃 |
| | | // addSelectLayerTool: function (num, val) { |
| | | // console.log(num, val); |
| | | // var that = this |
| | | // , d = that.datas; |
| | | // //三维数据处理 添加全部 9 添加时删除 10 删除全部 6 //添加单个 9 添加时删除 10 删除全部 6 |
| | | // // var sanwei = {}; |
| | | // // if (num == 9) { |
| | | // // sanwei.title = '三维倾斜数据' |
| | | // // } |
| | | // // d.push({ |
| | | // // title: val.title |
| | | // // }) |
| | | // // that.beginRool(that.datas); |
| | | // beginRool: function (data) { |
| | | // //选择图层Layui |
| | | // layui.use(['dropdown', 'util', 'layer', 'table'], function () { |
| | | // var dropdown = layui.dropdown |
| | | // , layer = layui.layer; |
| | | // dropdown.render({ |
| | | // elem: '.SelectLayerTool' |
| | | // , data: data |
| | | // , click: function (obj) { |
| | | // layer.tips('选择了:' + obj.title, this.elem, { tips: [1, '#5FB878'] }); |
| | | // var dom = $('.SelectLayerTool'); |
| | | // dom.empty(); |
| | | // var str = `${obj.title} <i class="layui-icon layui-icon-down layui-font-12"></i>` |
| | | // dom.append(str); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // }, |
| | | // removeSelectLayerTool: function (num, val) { |
| | | // console.log(num, val) |
| | | // }, |
| | | beginRool: function (data) { |
| | | //选择图层Layui |
| | | layui.use(['dropdown', 'util', 'layer', 'table'], function () { |
| | | var dropdown = layui.dropdown |
| | | , layer = layui.layer; |
| | | dropdown.render({ |
| | | elem: '.SelectLayerTool' |
| | | , data: data |
| | | , click: function (obj) { |
| | | layer.tips('选择了:' + obj.title, this.elem, { tips: [1, '#5FB878'] }); |
| | | var dom = $('.SelectLayerTool'); |
| | | dom.empty(); |
| | | var str = `${obj.title} <i class="layui-icon layui-icon-down layui-font-12"></i>` |
| | | dom.append(str); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | closeToolBox: function (item) { |
| | | if (item != this.name) { |
| | | $('.tool-y-box').hide(); |
| | |
| | | $(".jimu-widget-spatialQuery").hide(); |
| | | topic.publish('closesSpatialQuery'); |
| | | } |
| | | |
| | | //关闭多边形裁剪 |
| | | if ($(".jimu-widget-polygonClipping").is(":visible")) {//判断是否隐藏 |
| | | $(".jimu-widget-polygonClipping").hide(); |
| | | topic.publish('closespolygonClipping'); |
| | | } |
| | | //关闭通视分析 |
| | | if ($(".jimu-widget-throughSee").is(":visible")) {//判断是否隐藏 |
| | | $(".jimu-widget-throughSee").hide(); |
| | | // topic.publish('closesthroughSee'); |
| | | } |
| | | |
| | | }, |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | | // var domHtmls = [ |
| | | // { |
| | | // name: '可视分析', |
| | | // classs: 'visibleArea-tool' |
| | | // }, { |
| | | // name: '剖面分析', |
| | | // classs: 'profileAnalysis-tool' |
| | | // }, { |
| | | // name: '坡度分析', |
| | | // classs: 'slope-tool' |
| | | // }, |
| | | // ]; |
| | | // var dom = $('#spatialAnalysis-main'); |
| | | // var str = ''; |
| | | // for (var k in domHtmls) { |
| | | // str += `<li class="${domHtmls[k].classs}"><i></i> <span>${domHtmls[k].name}</span></li>` |
| | | // } |
| | | // dom.replaceWith(str); |
| | | }, |
| | | |
| | | onClose: function () { |