13693261870
2024-04-02 2a1b873b4b78b508d5d53c57992e734c56619df8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
sgworld = window.external.createSgworld();
var lc = new leftCenterDatlog();
var form = null;
var element = null;
new CusScrollBar({
    contentSelector: '.scroll_cont1', //滚动内容区
    barSelector: '.scroll_bar1', //滚动条
    sliderSelector: '.scroll_slider1' //滚动滑块
});
//注意:折叠面板 依赖 element 模块,否则无法进行功能性操作
layui.use(['element', 'form'], function () {
    element = layui.element;
    form = layui.form;
    var title = localStorage.getItem("typeName");
    $(".ttitle").empty();
    if (title.length > 11) {
        title = title.substring(0, 11);
    }
    $(".ttitle").append(title);
    GetColor();
    form.on('checkbox(pYc)', function (data) {
        window.event.stopPropagation();
    });
 
    // GetYX();
});
 
var skFirst = [];
//获取一级菜单选中事件
var qxF = false;
function qx1() {
    if (qxF == false) {
        qxF = true;
        var checkItem = $("input:checkbox[name='title']");
        checkItem.each(function (index, item) {
            $(item).attr('checked', true);
        });
        form.render();
    } else {
        qxF = false;
        var checkItem = $("input:checkbox[name='title']");
        checkItem.each(function (index, item) {
            $(item).removeAttr('checked');
        });
        form.render();
    }
}
 
//获取二级菜单选中事件
var qxS = false;
var skSecond = [];
function qx2() {
    if (qxS == false) {
        qxS = true;
        var checkItem = $("input:checkbox[name='message']");
        checkItem.each(function (index, item) {
            $(item).attr('checked', true);
            //var tname = $(item).attr('title');
            //skSecond.push(tname);
        });
        form.render();
    } else {
        qxS = false;
        var checkItem = $("input:checkbox[name='message']");
        checkItem.each(function (index, item) {
            $(item).removeAttr('checked');
        });
        form.render();
    }
}
 
 
var url = getRootPath();
//确定菜单
function sure() {
    var second = "";
    var checkSecond = $("input:checkbox[name='message']:checked");
    $.each(checkSecond, function (index, value) {
        second += value.title + "*";
    });
    second.substring(0, second.length - 1);
    if (second == "") {
        window.external.closeDialog("右中");
 
    } else {
        window.external.createBorderDialog("右中", url + "legend.html?sk=" + second, lc.width, lc.height, lc.top, lc.left, lc.bottom, lc.right);
    }
}
 
 
//获取文本框数值
function GetColor() {
    var TableName = localStorage.getItem("type");
    var TableColor = GetCmpareTable(TableName);
    //var TableColor = "colorQHSD";
    $.ajax({
        url: "../../../Ashx/DataQH.ashx",
        type: "post",
        data: { Action: "GetColor", colorTable: TableColor },
        dataType: "json",
        async: false,
        success: function (result) {
            var html = "";
            var h1 = "";
            // alert(result);
            $.each(result, function (index, value) {
                html += '<div class="layui-colla-item"><div class="layui-colla-title"><div class="lct"><input type="checkbox" name="title" ' +
                +'"lay-skin="primary" title="' + value.Name + '" lay-filter="pYc" value="rgb(' + value.R + ',' + value.G + ',' + value.B + ')" ></div></div></div>';
            })
            // alert(html);
            $(".scroll_cont1").empty();
            $(".scroll_cont1").append(html);
            form.render();
            element.render();
        }
    });
}
 
//加载影像数据
function GetYX() {
    var Tname = sgworld.ProjectTree.GetItemName(sgworld.ProjectTree.GetNextItem(sgworld.ProjectTree.FindItem(localStorage.getItem("pathName")), 11));
    var layer = sgworld.Creator.CreateFeatureLayer('Layer',
        'Server=http://118.213.95.33:8091/geoserver/qhddy/ows?service=WFS&version=1.0.0;User=admin;Password=qhsddywfs;WFSVersion:1.0.0;LayerName=' + Tname + ';TEPlugName=WFS;',
        '');
    layer.DataSourceInfo.Attributes.ImportAll = true;
    layer.Streaming = true;
    layer.load();
    layer.FeatureGroups.Item(0).SetProperty('Line Opacity', 0);
    layer.FeatureGroups.Item(0).SetProperty('Fill Color', '[YiJi]');
    layer.FeatureGroups.Item(0).SetProperty('Fill Opacity', 1);
    layer.FeatureGroups.Item(0).SetProperty('Altitude Method', 12);
    sgworld.Navigate.FlyTo(layer);
}