surprise
2024-01-15 87e98d5b5efeb7a9cf6330ae03e6dd53699b7ef1
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
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="UTF-8">
    <title>地形开挖分析</title>
    <link href="../SmartEarthSDK/Workers/layui/css/layui.css" rel="stylesheet" />
    <!-- <link rel="stylesheet" href="../../css/Analysis/AnalysisContour.css"/>-->
    <style type="text/css">
        html,
        body {
            overflow: hidden;
        }
 
        .layui-input {
            width: 96px !important;
            background-color: #fff !important;
            margin-top: 8px;
            display: inline-block;
        }
 
        .layui-form-label {
            font-weight: bold !important;
            font-size: 15px;
        }
 
        .layui-form-label {
            margin: 8px 0 0 -26px;
            width: 130px;
            text-align: left;
        }
 
        .layui-input-block {
            margin-left: 14px;
        }
 
        .layui-form-item {
            width: 98% !important;
        }
 
        .layui-btn {
            padding: 0 12px;
            margin-left: 10px;
            background-color: rgba(0, 168, 255, 0.16) !important;
        }
    </style>
</head>
 
<body>
    <form class="layui-form" action="">
        <div class="layui-form-item" style="width: 240px; margin-top: 8px;">
            <label class="layui-form-label AutoSize:=false;"
                style=" width: 90px;margin-left: 10px;margin-top: 8px;color: white;">开挖深度(米)</label>
            <div class="layui-input-inline">
                <input id="deep" value="100" type="number" lay-verify="pass" autocomplete="off" placeholder="请输入开挖深度"
                class="layui-input ">
                <button type="button" id="drawDig" class="layui-btn  layui-btn-normal" lay-submit lay-filter="formDemo">开始分析</button>
            </div>
 
        </div>
    </form>
    <script src="../jquery-2.0.3.js"></script>
    <script src="../SmartEarthSDK/Workers/layui/layui.js"></script>
    <script src="./js/Analysis.js"></script>
    <script>
        var layer = parent.layer;
        layer.msg('此功能暂不支持绘制凹多边形!');
        var deepVal = $('#deep').val();
        $('#deep').on('input propertychange', function (event) {
            deepVal = parseFloat($(this).val());
            if (!isNaN(deepVal) && parent.Excavation) {
                parent.Excavation.setDeepth(deepVal);
            }
        })
        $('#drawDig').on('click', function () {
            deepVal = parseFloat($('#deep').val());
            if (isNaN(deepVal)) {
                parent.layui.use('layer', function () {
                    var layer = parent.layui.layer;
                    layer.msg('请输入数字');
                });
            } else {
                // parent.SmartEarthPopupData.layerContainer && parent.SmartEarthPopupData.layerContainer.hide();
                parent.Excavation =parent.sgworld.drawObj = parent.sgworld.Analysis.TerrainExcavation(deepVal, {}, function () {
                    // parent.SmartEarthPopupData.layerContainer && parent.SmartEarthPopupData.layerContainer.show();
                });
            }
            // return false;
        })
        $('#clearAll').on('click', function () {
            parent.Excavation && parent.Excavation.clear();
            parent.Excavation = undefined;
        })
    </script>
</body>
 
</html>