liuyg
2021-06-28 3597dfbb9e33ab955d259df876d72a99dc817d2a
widgets/LeftNavigationBar/Widget.js
@@ -3,16 +3,16 @@
// 模块描述:显示坐标
///////////////////////////////////////////////////////////////////////////
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,
@@ -102,13 +102,13 @@
                    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') {
@@ -159,7 +159,7 @@
                }
            },
            closeToolBox: function (item) {},
            closeToolBox: function (item) { },
            onOpen: function () {
                //面板打开的时候触发 (when open this panel trigger)
@@ -331,7 +331,7 @@
            },
            begin: function (data) {
                var that = this;
                window.mySanweiShujuOpens = {};//全局scene.open资源
                var a = null;
                layui.use(function () {
@@ -343,7 +343,7 @@
                    tree.render({
                        elem: '#left-tree-list' //默认是点击节点可进行收缩
                            ,
                        ,
                        data: data,
                        id: 'demoId1',
                        showCheckbox: true, //是否显示复选框
@@ -388,6 +388,9 @@
                                            that[item.id] = scene.open(host + partOfUrl, undefined, {
                                                autoSetView: false //不自动定位
                                            });
                                            window.mySanweiShujuOpens[item.id] = that[item.id];
                                            // console.log(222)
                                            topic.publish('appendTilt', 'Layermanagement', item);
                                            topic.publish('appendTiltS', 'spatialAnalysis', item);
                                            topic.publish('addLayersLegends', 'legends', item);
@@ -431,6 +434,7 @@
                                                        destination: rectangle
                                                    });
                                                });
                                                // console.log(444)
                                                topic.publish('appendItem', 'Layermanagement', item, that[item.id]);
                                                topic.publish('appendItemS', 'spatialAnalysis', item, that[item.id]);
                                                topic.publish('addLayersLegends', 'legends', item);
@@ -441,7 +445,7 @@
                                                    dataType: 'JSON',
                                                    success: function (res) {
                                                        // console.log(111)
                                                        that[item.id] = that.map.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
                                                            url: res[0].path,
                                                        }));
@@ -461,9 +465,6 @@
                                    }
                                } else {
@@ -514,6 +515,8 @@
                                        that[obj.data.id] = scene.open(host + partOfUrl, undefined, {
                                            autoSetView: false //不自动定位
                                        });
                                        window.mySanweiShujuOpens[obj.data.id] = that[obj.data.id];
                                        topic.publish('appendTilt', 'Layermanagement', obj.data);
                                        topic.publish('appendTiltS', 'spatialAnalysis', obj.data);
                                        topic.publish('addLayersLegends', 'legends', obj.data);
@@ -552,6 +555,7 @@
                                                    destination: rectangle
                                                });
                                            });
                                            // console.log(555)
                                            topic.publish('appendItem', 'Layermanagement', obj.data, that[obj.data.id]);
                                            topic.publish('appendItemS', 'spatialAnalysis', obj.data, that[obj.data.id]);
                                            topic.publish('addLayersLegends', 'legends', obj.data);
@@ -703,15 +707,15 @@
                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: '北深渊',