zhanmingkan
2022-05-14 0fc43fe898d14895c97427801293edfb3a0c5bf1
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html>
 
<head>
    <meta charset="UTF-8">
    <title>轨迹飞行</title>
    <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>
    <script type="text/javascript" src="../../assets/js/common.js"></script>
    <style>
        .romadiv {
            overflow-x: hidden;
            overflow-y: hidden;
            padding: 0;
        }
 
        .mt-table-content {
            /* margin-top: 10px; */
            height: 185px;
            color: white;
            width: 240px;
            border: 1px white solid;
            border-radius: 15px;
            /* width: 250px; */
            float: left;
            /* margin-left: 10px; */
        }
 
        .mt-table-row {
            height: 30px;
            width: 100%;
            /* margin-top: 15px; */
            border-bottom: solid 1px white;
        }
 
        .mt-table-row:last-child {
            height: 30px;
            width: 100%;
            /* margin-top: 15px; */
            border-bottom: none;
        }
 
 
        .mt-table-row-left {
            margin: 0px;
            padding-left: 10px;
            width: 100px;
            float: left;
            display: inline;
            border-right: solid 1px white;
        }
 
        .mt-table-row-right {
            margin: 0px;
            padding-left: 10px;
            float: left;
            display: inline;
            width: 118px;
            overflow: hidden;
            text-overflow:ellipsis;
            white-space: nowrap;
            /* border-bottom: solid 1px white; */
        }
 
        .mt-table-row-label {
            color: white;
            line-height: 30px;
            font-size: 12px;
        }
 
        .form-control {
            /* display: block; */
            width: 110px;
            height: 30px;
            font-size: 12px;
            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;
        }
 
        .mt-content-btn {
            width: 100%;
            height: 30px;
            line-height: 30px;
            text-align: center;
        }
 
       
        .mybtn-blue {
            color: #fff;
            background-color: #1E9FFF;
            border-color: #1E9FFF;
        }
        .mybtn-yellow {
            color: #fff;
            background-color: #FFB800;
            border-color: #FFB800;
        }
 
        .mytip {
            margin-top: 10px;
            margin-bottom: 10px;
            margin-left: 15px;
            margin-right: 10px;
            color: #fff;
            /* overflow-y:hidden; */
        }
    </style>
</head>
 
<body>
    <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
    <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    <div class="romadiv" action="">
        <div class="mt-table-content">
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">名称</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <input type="text" id="name" class="form-control" autocomplete="off" value="新路径">
                </div>
            </div>
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">漫游模型</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <select id="model" name="model" class="form-control">
                        <option value="1">无</option>
                        <option value="2">行人</option>
                        <option value="3">汽车</option>
                        <option value="4">飞机</option>
                    </select>
                </div>
            </div>
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">贴地漫游</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <input type="checkbox" checked="" id="ontheground" />
                </div>
            </div>
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">显示路线</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <input type="checkbox" checked="" id="showline" />
                </div>
            </div>
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">显示投影</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <input type="checkbox" checked="" id="projection" disabled />
                </div>
            </div>
            <div class="mt-table-row">
                <div class="mt-table-row-left mt-table-row-label">循环漫游</div>
                <div class="mt-table-row-right mt-table-row-label">
                    <input type="checkbox" checked="" id="reloop" />
                </div>
            </div>
 
 
        </div>
        <div class="mt-row">
            <div class="mytip">绘制路径单击鼠标左键确定节点,单击鼠标右键确定撤销节点,双击鼠标左键结束绘制。</div>
            <div class="mt-content-btn">
                <button type="button" class="layui-btn mybtn-blue  layui-btn-sm" onclick="confirm()">确认</button>
                <button type="button" class="layui-btn mybtn-yellow  layui-btn-sm" onclick="redraw()">重绘</button>
            </div>
        </div>
    </div>
    <script>
 
        var data = {
            'name': "",
            'lines': "",
            'modeltype': null,
            'ontheground': null,
            'showline': null,
            'projection': null,
            'reloop': null
        }
        layui.use('form', function () {
            var form = layui.form; //表单
        });
 
        var layerIndex = null;
        var listIndex = null;
        function confirm() {
            if ($('#name').val() == "") {
                data.name = '新轨迹' + new Date().format("yyyyMMddhhmmss");
            } else {
                data.name = $('#name').val();
            }
            data. modeltype = $('#model').val();
            data.ontheground = $('#ontheground').is(':checked');
            data.showline = $('#showline').is(':checked');
            data.projection = $('#projection').is(':checked');
            data.reloop = $('#reloop').is(':checked');
            if (parent.CesiumRoam.drawLines != undefined) {
                parent.roamDrawConfirm(listIndex);
                parent.layer.close(layerIndex);
            } else {
                layui.use(['layer'], function () {
                    var layer = layui.layer;
                    layer.msg('请绘制正确的轨迹');
                });
            }
        }
        function update(){
            $('#name').val(data.name);
            $('#model').val(data.modeltype);
            $('#ontheground').attr("checked",data.ontheground);
            $('#showline').attr("checked",data.showline);
            $('#projection').attr("checked",data.projection);
            $('#reloop').attr("checked",data.reloop);
        }
        function redraw() {
            parent.roamDraw();
        }
 
    </script>
</body>
 
</html>