| | |
| | | // 模块描述:显示坐标 |
| | | /////////////////////////////////////////////////////////////////////////// |
| | | define([ |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | ], |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | |
| | | // this.begin(this.data); |
| | | var that = this; |
| | | this.getData(); |
| | | |
| | | topic.subscribe("closeNavigation", lang.hitch(this, this.closeNavigation)); |
| | | // $('.left-navigation-bar-but').click(() => { |
| | | // this.changeImg = !this.changeImg; |
| | | // if (this.changeImg) { |
| | |
| | | // }); |
| | | // } |
| | | // }) |
| | | var time = null; |
| | | $('.left-navigation-bar-but').click(() => { |
| | | this.changeImg = !this.changeImg; |
| | | if (this.changeImg) { |
| | | if (time != null) { |
| | | clearTimeout(time); |
| | | time = null; |
| | | } |
| | | // $('.l-n-b-b-img').attr("src", "./images/addL/xzuo.png"); //打开 |
| | | $('.left-navigation-bar-main').css({ |
| | | 'display': 'block', |
| | | $('.left-navigation-bar-but>div').click(() => { |
| | | topic.publish('closeTool', this.name); |
| | | topic.publish('closeMap', this.name); |
| | | $(".jimu-widget-Layermanagement .layer-list").stop().hide(); |
| | | |
| | | if ($(".jimu-widget-Layermanagement .layer-list").is(":hidden")) { |
| | | $(".jimu-widget-Layermanagement .tree-layer-opcity").stop().hide(); |
| | | } |
| | | |
| | | if ($('.left-navigation-bar-main').is(":hidden")) { |
| | | $('.left-navigation-bar-main').stop().css({ |
| | | 'width': '300px', |
| | | 'padding': '10px', |
| | | 'height': 'auto', |
| | | }); |
| | | $('.l-n-b-m-search').css({ |
| | | 'display': 'flex', |
| | | }) |
| | | $('#left-tree-list').css({ |
| | | 'display': 'block', |
| | | }) |
| | | 'height': 'auto' |
| | | }).show(); |
| | | |
| | | |
| | | } else { |
| | | // $('.l-n-b-b-img').attr("src", "./images/addL/xyou.png"); //关闭 |
| | | $('.l-n-b-m-search').css({ |
| | | 'display': 'none', |
| | | }) |
| | | $('#left-tree-list').css({ |
| | | 'display': 'none', |
| | | }) |
| | | $('.left-navigation-bar-main').css({ |
| | | $('.left-navigation-bar-main').stop().css({ |
| | | 'width': '0px', |
| | | 'padding': '0px', |
| | | 'height': '0px', |
| | | }); |
| | | if (time != null) { |
| | | clearTimeout(time); |
| | | time = null; |
| | | } |
| | | time = setTimeout(() => { |
| | | $('.left-navigation-bar-main').css({ |
| | | 'display': 'none' |
| | | }); |
| | | clearTimeout(time); |
| | | time = null; |
| | | }, 500); |
| | | }).hide(); |
| | | } |
| | | |
| | | }) |
| | | $('#l-n-b-m-search-closeOUR').click(() => { |
| | | this.changeImg = !this.changeImg; |
| | | if (!this.changeImg) { |
| | | if (time != null) { |
| | | clearTimeout(time); |
| | | time = null; |
| | | } |
| | | $('.l-n-b-m-search').css({ |
| | | 'display': 'none', |
| | | }) |
| | | $('#left-tree-list').css({ |
| | | 'display': 'none', |
| | | }) |
| | | $('.left-navigation-bar-main').css({ |
| | | 'width': '0px', |
| | | 'padding': '0px', |
| | | 'height': '0px', |
| | | }); |
| | | if (time != null) { |
| | | clearTimeout(time); |
| | | time = null; |
| | | } |
| | | time = setTimeout(() => { |
| | | $('.left-navigation-bar-main').css({ |
| | | 'display': 'none' |
| | | }); |
| | | clearTimeout(time); |
| | | time = null; |
| | | }, 500); |
| | | } |
| | | |
| | | $('.left-navigation-bar-main').stop().css({ |
| | | 'width': '0px', |
| | | 'padding': '0px', |
| | | 'height': '0px', |
| | | }).hide(); |
| | | }) |
| | | |
| | | |
| | |
| | | var val = $('#left-navigation-bar-main-input').val(); |
| | | if (val != '') { |
| | | var clearOur = () => { |
| | | let dom = $(`[data-id]`); |
| | | dom.removeClass('layui-tree-spread'); |
| | | let domDiv = dom.find('.layui-tree-pack'); |
| | | domDiv.css({ |
| | | 'display': 'none' |
| | | }) |
| | | }, |
| | | let dom = $(`[data-id]`); |
| | | dom.removeClass('layui-tree-spread'); |
| | | let domDiv = dom.find('.layui-tree-pack'); |
| | | domDiv.css({ |
| | | 'display': 'none' |
| | | }) |
| | | }, |
| | | a, useit = (d) => { |
| | | for (var k in d) { |
| | | if (d[k].who == 'father') { |
| | |
| | | } |
| | | }, |
| | | |
| | | closeToolBox: function (item) { }, |
| | | closeNavigation: function (item) { |
| | | if (item != this.name) { |
| | | |
| | | if (!$('.left-navigation-bar-main').is(":hidden")) { |
| | | $('.left-navigation-bar-main').stop().css({ |
| | | 'width': '0px', |
| | | 'padding': '0px', |
| | | 'height': '0px', |
| | | }).hide(); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | |
| | | onOpen: function () { |
| | | //面板打开的时候触发 (when open this panel trigger) |
| | |
| | | }, |
| | | begin: function (data) { |
| | | var that = this; |
| | | window.mySanweiShujuOpens = {};//全局scene.open资源 |
| | | window.mySanweiShujuOpens = {}; //全局scene.open资源 |
| | | var a = null; |
| | | |
| | | layui.use(function () { |
| | |
| | | |
| | | tree.render({ |
| | | elem: '#left-tree-list' //默认是点击节点可进行收缩 |
| | | , |
| | | , |
| | | data: data, |
| | | id: 'demoId1', |
| | | showCheckbox: true, //是否显示复选框 |
| | |
| | | title: '采集站点', |
| | | id: 1, |
| | | field: '1' |
| | | // , checked: true |
| | | , |
| | | // , checked: true |
| | | , |
| | | spread: true, |
| | | children: [{ |
| | | title: '南矶山保护区', |
| | | id: 11, |
| | | field: '1-1' |
| | | // , checked: true |
| | | , |
| | | // , checked: true |
| | | , |
| | | spread: true, |
| | | children: [{ |
| | | title: '北深渊', |