北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-04-15 cf96a99679dfe756bb0bc1d2f153bfce3cdf89bc
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
<!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">
            .iptline1 {
                position: absolute;
                top: 9px;
                right: -30px;
                font-weight: bold !important;
            }
            
            .layui-input {
                background-color: white;
            }
            
            .layui-form-label {
                font-weight: bold !important;
                font-size: 15px;
            }
            
            .layui-form {
                margin-top: 10px;
            }
            
            .layui-input-block {
                margin-left: 100px;
                min-height: 36px;
            }
        </style>
    </head>
 
    <body>
 
        <form class="layui-form" action="">
            <!-- <div class="layui-form-item" style=" width: 280px;  margin-top: 10px!important; ">
 
                <label class="layui-form-label" style="margin-left: -26px; width:100px; ">开挖长度:</label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="pass" autocomplete="off" placeholder="请输入开挖长度" class="layui-input">
                    <span class="iptline1">(米)</span>
                </div>
            </div>
 
            <div class="layui-form-item" style="width:280px; margin-top: 6px; ">
                <label class="layui-form-label" style="margin-left: -26px; width:100px; ">开挖宽度:</label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="pass" autocomplete="off" placeholder="请输入开挖宽度" class="layui-input">
                    <span class="iptline1">(米)</span>
                </div>
            </div> -->
 
            <div class="layui-form-item" style="width: 280px; margin-top: 6px;">
                <label class="layui-form-label " style="margin-left:-26px; width:100px;">开挖深度</label>
                <div class="layui-input-inline">
                    <input id ="deep" value="100" type="text" lay-verify="pass" autocomplete="off" placeholder="请输入开挖深度" class="layui-input ">
                    <span class="iptline1">(米)</span>
                </div>
            </div>
 
            <div class="layui-form-item" style=" font-weight: bold; margin-top: 6px!important; ">
                <div class="layui-input-block">
 
                    <button type="button" id ="drawDig" class="layui-btn" lay-submit lay-filter="formDemo">绘制区域</button>
                    <button type="button" id ="clearAll" class="layui-btn" lay-submit lay-filter="formDemo">清除</button>
 
                </div>
            </div>
 
        </form>
        <!-- <script src="../../js/Analysis/Quantityexcavation.js"></script> -->
        <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();
            $('#drawDig').on('click', function(){
                if(isNaN(deepVal)){
                    parent.layui.use('layer', function(){
                        var layer = parent.layui.layer;
                        layer.msg('请输入数字');
                    });      
                }else{
                    parent.Excavation = parent.sgworld.Analysis.TerrainExcavation(deepVal);
                }
                // return false;
            })
            $('#clearAll').on('click', function(){
                parent.Excavation && parent.Excavation.clear();
                parent.Excavation = undefined;
            })
        </script>
    </body>
 
</html>