多单位版国产化地质资料管理系统
zhai
2025-12-18 3c6f6c1e3016e38146a4c46be6e7b625c35591f2
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<%--
  Created by IntelliJ IDEA.
  User: WuWeichao
  Date: 2023/8/18
  Time: 16:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <meta name="viewport" charset="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>拐点坐标编辑</title>
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
    <link rel="stylesheet" href="static/styles/common.css" type="text/css">
    <link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
 
    <script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
    <script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-datagrid-dnd/datagrid-dnd.js"></script>
    <script src="static/plugins/ace/src-noconflict/ace.js" type="text/javascript"></script>
    <script src="static/plugins/jquery.redirect.js" type="text/javascript"></script>
 
    <!-- 弹窗加载组件 -->
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
    <script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
    <!-- wcp组件 -->
    <script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
 
    <!--[if lt IE 9]>
    <script type="text/javascript" src="static/plugins/json2.js"></script>
    <![endif]-->
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
    <script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
    <script type="text/javascript" src="static/scripts/gdmis/gdmis.js"></script>
 
    <script>
        var params = {
            callBack: null,
            haveSelected: ""
        };
        var index = 1;
        $(function () {
            new ResizeScroll({
                "id": "#divData",
                "height": "350"
            });
        })
 
        function doClose() { //关闭按钮事件
            var index = top.layer.getFrameIndex(window.name); //获取窗口索引
            top.layer.close(index);
        }
 
        function doAdd() {
            index++;
            var tr = "tr_" + index;
            var jd = "jd_" + index;
            var jd_d = "jd_f_" + index;
            var jd_f = "jd_f_" + index;
            var jd_m = "jd_m" + index;
            var wd = "wd_" + index;
            var wd_d = "wd_f_" + index;
            var wd_f = "wd_f_" + index;
            var wd_m = "wd_m" + index;
            var del_Tr = "del_" + index;
            var htmlStr = "" +
                "<tr id='" + tr + "'>\n" +
                "   <td class=\"tbtitle\" style=\"width: 70px;\">经度:</td>\n" +
                "   <td>" +
                "      <select id='" + jd + "' data-options=\"panelHeight:'auto'\" editable=\"false\" class=\"easyui-combobox\" style=\"width:60px\">\n" +
                "         <option value=\"E\" selected='true'>E</option>" +
                "         <option value=\"W\">W</option>" +
                "      </select></td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + jd_d + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_0\\']']\" style=\"width:60px\"/>度</td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + jd_f + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_1\\']']\" style=\"width:60px\"/>分</td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + jd_m + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_2\\']']\" style=\"width:60px\">秒</td>\n" +
                "   </td>" +
                "   <td class=\"tbtitle\" style=\"width: 70px;\">纬度:</td>\n" +
                "   <td>" +
                "      <select id='" + wd + "' data-options=\"panelHeight:'auto'\" editable=\"false\" class=\"easyui-combobox\" style=\"width:60px\">\n" +
                "         <option value=\"N\" selected='true'>N</option>" +
                "         <option value=\"S\">S</option>" +
                "      </select></td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + wd_d + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_0\\']']\" style=\"width:60px\"/>度</td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + wd_f + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_1\\']']\" style=\"width:60px\"/>分</td>" +
                "      <td><input type=\"text\" value=\"\" id= '" + wd_m + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_2\\']']\" style=\"width:60px\"/>秒</td>\n" +
                "   </td>" +
                "   <td><a id='" + del_Tr + "' href='javascript:void(0)' onclick='deleteCoordinateTr(" + index + ")'><font color='red'><em class='fa fa-trash-o'></em>删除</font></a></td>" +
                "</tr>";
            $("#tbForm").append(htmlStr);
            // if(index > 2)
            // {
            //     var count = index - 1;
            //     var delTr = "del_" + count;
            //     $("#"+delTr+"").hide();
            // }
            $.parser.parse("#" + tr);
        }
 
        function deleteCoordinateTr(num) {
            var tr = "tr_" + num;
            $("#" + tr + "").remove();
            // if(num > 2)
            // {
            //     var count = num - 1;
            //     var delTr = "del_" + count;
            //     $("#"+delTr+"").show();
            // }
            // index -- ;
        }
 
        function doSave() {
            var isValid = $('#formUser').form('validate');
            if (!isValid) {
                wcp.notify.warn('表单验证有误,请检查表单输入项!');
                return false;
            }
 
            var selectCoordinate = "";
            var firstCoordinate = "";
            var lastCoordinate = "";
            var error = "";
            var i = 0;
            $('table tr').each(function (rows, ele) {
                i++;
                var jd = "";
                var jd_d = "";
                var jd_f = "";
                var jd_m = "";
                var wd = "";
                var wd_d = "";
                var wd_f = "";
                var wd_m = "";
                var jd = $(this).children().eq(1).find('input').val();
                var jd_d = $(this).children().eq(2).find('input').val();
                var jd_f = $(this).children().eq(3).find('input').val();
                var jd_m = $(this).children().eq(4).find('input').val();
                var wd = $(this).children().eq(6).find('input').val();
                var wd_d = $(this).children().eq(7).find('input').val();
                var wd_f = $(this).children().eq(8).find('input').val();
                var wd_m = $(this).children().eq(9).find('input').val();
                switch (jd_d.length) {
                    case 0:
                        jd_d = "000";
                        break;
                    case 1:
                        jd_d = "00" + jd_d.toString();
                        break;
                    case 2:
                        jd_d = "0" + jd_d.toString();
                        break;
                    default :
                        break;
                }
                switch (jd_f.length) {
                    case 0:
                        jd_f = "00";
                        break;
                    case 1:
                        jd_f = "0" + jd_f.toString();
                        break;
                    default :
                        break;
                }
                switch (jd_m.length) {
                    case 0:
                        jd_m = "00";
                        break;
                    case 1:
                        jd_m = "0" + jd_m.toString();
                        break;
                    default :
                        break;
                }
                switch (wd_d.length) {
                    case 0:
                        wd_d = "00";
                        break;
                    case 1:
                        wd_d = "0" + wd_d.toString();
                        break;
                    default :
                        break;
                }
                switch (wd_f.length) {
                    case 0:
                        wd_f = "00";
                        break;
                    case 1:
                        wd_f = "0" + wd_f.toString();
                        break;
                    default :
                        break;
                }
                switch (wd_m.length) {
                    case 0:
                        wd_m = "00";
                        break;
                    case 1:
                        wd_m = "0" + wd_m.toString();
                        break;
                    default :
                        break;
                }
                selectCoordinate += jd + jd_d + jd_f + jd_m + "," + wd + wd_d + wd_f + wd_m + "$";
                if (i == 1) {
                    firstCoordinate = jd + jd_d + jd_f + jd_m + "," + wd + wd_d + wd_f + wd_m;
                }
                if (i == $('table tr').length) {
                    lastCoordinate = jd + jd_d + jd_f + jd_m + "," + wd + wd_d + wd_f + wd_m;
                }
            });
            selectCoordinate = selectCoordinate.substring(0, selectCoordinate.length - 1).trim();
            //判断第一个坐标必须和最后一个一样,才可确定
            if (firstCoordinate == lastCoordinate) {
                if (params.callBack && i > 0) {
                    params.callBack(selectCoordinate);
                }
                doClose();
            } else {
                wcp.notify.error("第一个坐标必须和最后一个坐标相同");
            }
        }
 
        function loadParams() {
            if (params.haveSelected.length > 0) {
                var coordinate = params.haveSelected.split('$');
                var count = 0;
                for (var i = 0; i < coordinate.length; i++) {
                    count = i + 1;
                    var coordinateStr = coordinate[i].toString();
                    var tr = "tr_" + count;
                    var jd = "jd_" + count;
                    var jd_d = "jd_d_" + count;
                    var jd_f = "jd_f_" + count;
                    var jd_m = "jd_m_" + count;
                    var wd = "wd_" + count;
                    var wd_d = "wd_d_" + count;
                    var wd_f = "wd_f_" + count;
                    var wd_m = "wd_m_" + count;
                    var del_Tr = "del_" + count;
                    if (count > 1) {
                        var htmlStr = "" +
                            "<tr id='" + tr + "'>\n" +
                            "   <td class=\"tbtitle\" style=\"width: 70px;\">经度:</td>\n" +
                            "   <td>" +
                            "      <select id='" + jd + "' data-options=\"panelHeight:'auto'\" editable=\"false\" class=\"easyui-combobox\" style=\"width:60px\">\n" +
                            "         <option value=\"E\" selected='true'>E</option>" +
                            "         <option value=\"W\">W</option>" +
                            "      </select></td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + jd_d + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_0\\']']\" style=\"width:60px\"/>度</td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + jd_f + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_1\\']']\" style=\"width:60px\"/>分</td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + jd_m + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'0_2\\']']\" style=\"width:60px\">秒</td>\n" +
                            "   </td>" +
                            "   <td class=\"tbtitle\" style=\"width: 70px;\">纬度:</td>\n" +
                            "   <td>" +
                            "      <select id='" + wd + "' data-options=\"panelHeight:'auto'\" editable=\"false\" class=\"easyui-combobox\" style=\"width:60px\">\n" +
                            "         <option value=\"N\" selected='true'>N</option>" +
                            "         <option value=\"S\">S</option>" +
                            "      </select></td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + wd_d + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_0\\']']\" style=\"width:60px\"/>度</td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + wd_f + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_1\\']']\" style=\"width:60px\"/>分</td>" +
                            "      <td><input type=\"text\" value=\"\" id= '" + wd_m + "' class=\"easyui-textbox\" data-options=\"validType:['regCoord[\\'1_2\\']']\" style=\"width:60px\"/>秒</td>\n" +
                            "   </td>" +
                            "   <td><a id='" + del_Tr + "' href='javascript:void(0)' onclick='deleteCoordinateTr(" + count + ")'><font color='red'><em class='fa fa-trash-o'></em>删除</font></a></td>" +
                            "</tr>";
                        $("#tbForm").append(htmlStr);
                        // if(count > 2)
                        // {
                        //     var count = count - 1;
                        //     var delTr = "del_" + count;
                        //     $("#"+delTr+"").hide();
                        // }
                        var targetObj = $("#" + tr).innerHtml;
                        $.parser.parse(targetObj);
                    }
                }
                //给文本框赋值
                for (var i = 0; i < coordinate.length; i++) {
                    count = i + 1;
                    var coordinateStr = coordinate[i].toString();
                    var tr = "tr_" + count;
                    var jd = "jd_" + count;
                    var jd_d = "jd_d_" + count;
                    var jd_f = "jd_f_" + count;
                    var jd_m = "jd_m_" + count;
                    var wd = "wd_" + count;
                    var wd_d = "wd_d_" + count;
                    var wd_f = "wd_f_" + count;
                    var wd_m = "wd_m_" + count;
                    var del_Tr = "del_" + count;
                    var jwdStr = coordinateStr.split(',');
                    var jdStr = jwdStr[0].toString();
                    $("#" + jd).combobox("setValue", jdStr.substring(0, 1));
                    $("#" + jd_d).textbox("setValue", jdStr.substring(1, 4));
                    $("#" + jd_f).textbox("setValue", jdStr.substring(4, 6));
                    $("#" + jd_m).textbox("setValue", jdStr.substring(6));
                    var wdStr = jwdStr[1].toString();
                    $("#" + wd + "").combobox("setValue", wdStr.substring(0, 1));
                    $("#" + wd_d + "").textbox("setValue", wdStr.substring(1, 3));
                    $("#" + wd_f + "").textbox("setValue", wdStr.substring(3, 5));
                    $("#" + wd_m + "").textbox("setValue", wdStr.substring(5));
                }
                index = coordinate.length;
            }
        }
    </script>
</head>
<body id="body" style="height: 320px">
<h4 style="color: red;padding-top: 10px;padding-left: 50px">
    请按照勘查证或任务书上的坐标顺序填写,且能闭合(第一个坐标和最后一个坐标相同)</h4>
<div class="pt-nav-list">
    <div class="pt-form">
        <form id="formUser" method="post">
            <div class="ptbody" id="divData">
                <table id="tbForm" style="width: 100%;">
                    <tr>
                        <td class="tbtitle" style="width: 70px;">经度:</td>
                        <td>
                            <select id='jd_1' data-options="panelHeight:'auto'" editable="false" class="easyui-combobox"
                                    style="width:60px">
                                <option value="E" selected='true'>E</option>
                                <option value="W">W</option>
                            </select>
                        </td>
                        <td>
                            <input type="text" value="" id="jd_d_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'0_0\']']" style="width:60px"/>度
                        </td>
                        <td>
                            <input type="text" value="" id="jd_f_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'0_1\']']" style="width:60px"/>分
                        <td>
                            <input type="text" value="" id="jd_m_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'0_2\']']" style="width:60px"/>秒
                        </td>
                        <td class="tbtitle" style="width: 70px;">纬度:</td>
                        <td>
                            <select id='wd_1' data-options="panelHeight:'auto'" editable="false" class="easyui-combobox"
                                    style="width:60px">
                                <option value="N" selected='true'>N</option>
                                <option value="S">S</option>
                            </select>
                        </td>
                        <td>
                            <input type="text" value="" id="wd_d_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'1_0\']']" style="width:60px"/>度
                        </td>
                        <td>
                            <input type="text" value="" id="wd_f_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'1_2\']']" style="width:60px"/>分
                        <td>
                            <input type="text" value="" id="wd_m_1" class="easyui-textbox"
                                   data-options="validType:['regCoord[\'1_2\']']" style="width:60px"/>秒
                        </td>
                        <td style="width: 70px;"></td>
                    </tr>
                </table>
 
            </div>
        </form>
        <div class="pt-form-btn">
            <div class="form-group">
                <button id="btnAdd" class="pt-btn pt-btn-primary" onclick="doAdd()"><i class="fa fa-plus"></i>添加坐标
                </button>
                <button id="btnSave" class="pt-btn pt-btn-primary" onclick="doSave()"><i class="fa fa-save"></i>确定
                </button>
                <button id="btnClose" class="pt-btn pt-btn-danger" onclick="doClose()"><i class="fa fa-close"></i>关闭
                </button>
            </div>
        </div>
    </div>
</div>
</body>
</html>