zhanmingkan
2022-05-16 c8a1a20ba1ca73bef0cc3bbac652014367d05d75
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="UTF-8">
    <title>淹没分析</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2599272_671fgrsk7ev.css">
    <link href="../../libs/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="../../libs/jquery/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="../../libs/layui/layui.js"></script>
 
    <style> 
        .floordiv {
            color: white;
            /* overflow-x: hidden;
            overflow-y: auto;
            padding: 0; */
        }
 
        .mt-label {
            height: 30px;
            color: white;
            width: 100px;
            float: left;
            margin-left: 10px;
            line-height: 30px;
            font-size: 12px;
        }
 
        .mt-content {
            height: 30px;
            color: white;
            width: 250px;
            float: left;
            /* margin-left: 10px; */
        }
 
        .mt-row {
            height: 30px;
            margin-top: 10px;
        }
 
        .form-control {
            /* display: block; */
            width: 206px;
            height: 20px;
            padding: 4px 12px;
            font-size: 14px;
            line-height: 1.6;
            background-color: #2c3238;
            opacity: 0.8;
            color: #fff;
            background-image: none;
            border: 0px solid #e4eaec;
            border-radius: 3px;
            -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
            box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
            -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
            -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
            -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
        }
 
        .mybtn-blue {
            color: #fff;
            background-color: #1E9FFF;
            border-color: #1E9FFF;
        }
        .mybtn-yellow {
            color: #fff;
            background-color: #FFB800;
            border-color: #FFB800;
        }
 
        .mybtn-green {
            color: #fff;
            background-color: #009688;
            border-color: #009688;
        }
        .mybtn-red {
            color: #fff;
            background-color: #FF5722;
            border-color: #FF5722;
        }
        
    </style>
</head>
 
<body>
    <div class="floordiv">
        <div class="mt-row">
            <div class="mt-label">分析区域:</div>
            <div class="mt-content">
                <button type="button" class="layui-btn layui-btn-normal mybtn-blue  layui-btn-sm" onclick="drawPoly()">绘制范围</button>
                <button type="button" class="layui-btn layui-btn-normal mybtn-red  layui-btn-sm" onclick="reDraw()">重新绘制</button>
                <button type="button" class="layui-btn layui-btn-normal  mybtn-yellow layui-btn-sm" onclick="clearEffect()">清除效果</button>
            </div>
        </div>
        <div class="mt-row">
            <div class="mt-label">
                最小高度(米):
            </div>
            <div class="mt-content">
                <input type="number" id="minHeight" autocomplete="off" class="form-control" value="0">
            </div>
        </div>
        <div class="mt-row">
            <div class="mt-label">
                最大高度(米):
            </div>
            <div class="mt-content">
 
                <input type="number" id="maxHeight" autocomplete="off" class="form-control" value="100">
            </div>
        </div>
        <div class="mt-row">
            <div class="mt-label">
                淹没速度(m/s):
            </div>
            <div class="mt-content">
                <input type="number" id="speed" autocomplete="off" class="form-control" value="10">
            </div>
        </div>
        <div class="mt-row">
            <button type="button" style="margin-left: 110px;" class="layui-btn mybtn-blue layui-btn-sm"
                onclick="start()"><i class="iconfont icon-kaishi"></i>开始</button>
            <button type="button" class="layui-btn mybtn-yellow  layui-btn-sm" onclick="stop()"><i class="iconfont icon-jieshu"></i>停止</button>
        </div>
        <div class="mt-row">
            <div style="margin-left: 15px;color: lightgray;">注:左键点击开始绘制,右键点击结束。</div>
        </div>
    </div>
 
    <script>
 
        function drawPoly() {
            parent.sub_analysis_draw();
        };
        function reDraw() {
            parent.sub_analysis_draw();
        }
        function clearEffect() {
            parent.sub_analysis_clear();
        };
        function start() {
            var max = parseInt(document.getElementById('maxHeight').value);
            var min = parseInt(document.getElementById('minHeight').value);
            var speed = parseFloat(document.getElementById('speed').value);
            // var max = 1000,min=200,speed = 10;
            parent.sub_analysis_drawClear();
            parent.sub_analysis_start(max, min, speed);
        };
        function stop() {
            parent.sub_analysis_stop();
        }
    </script>
</body>
 
</html>