| | |
| | | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
| | | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | |
| | | <script src="/hxzkoa/hxzk/assets/js/loader.js"></script> |
| | | |
| | | <!-- BEGIN GLOBAL MANDATORY STYLES --> |
| | | <link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap" rel="stylesheet"> |
| | | <link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap" |
| | | rel="stylesheet"> |
| | | <link href="/hxzkoa/hxzk/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/assets/css/main.css" rel="stylesheet" type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" |
| | | type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/assets/css/structure.css" rel="stylesheet" type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/plugins/highlight/styles/monokai-sublime.css" rel="stylesheet" type="text/css" /> |
| | | <link href="/hxzkoa/hxzk/plugins/highlight/styles/monokai-sublime.css" rel="stylesheet" |
| | | type="text/css" /> |
| | | <link rel="stylesheet" |
| | | href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css"> |
| | | <link rel="stylesheet" |
| | | href="http://api.map.baidu.com/library/SearchInfoWindow/1.4/src/SearchInfoWindow_min.css"> |
| | | <!-- END GLOBAL MANDATORY STYLES --> |
| | | |
| | | <!-- BEGIN PAGE LEVEL PLUGINS/CUSTOM STYLES --> |
| | |
| | | <link rel="stylesheet" type="text/css" href="/hxzkoa/hxzk/plugins/table/datatable/custom_dt_html5.css"> |
| | | <link rel="stylesheet" type="text/css" href="/hxzkoa/hxzk/plugins/table/datatable/dt-global_style.css"> |
| | | <style> |
| | | body { |
| | | margin: 0px; |
| | | width: 100%; |
| | | min-width: 1500px; |
| | | max-width: 100%; |
| | | height: 100%; |
| | | background-color: #F0F0F0; |
| | | } |
| | | |
| | | #head { |
| | | background-color: #FFFF00; |
| | | width: 100%; |
| | | height: 100px; |
| | | } |
| | | |
| | | #center { |
| | | background-color: #00FFFF; |
| | | width: 100%; |
| | | min-height: 100%; |
| | | } |
| | | |
| | | #foot { |
| | | background-color: #FF00FF; |
| | | width: 100%; |
| | | height: 100px; |
| | | } |
| | | |
| | | .panel-head{ |
| | | font-size: 1rem; color: rgba(255,255,255,.7); line-height: 2rem; text-align: center; |
| | | font-size: 1rem; |
| | | color: rgba(255, 255, 255, .7); |
| | | line-height: 2rem; |
| | | text-align: center; |
| | | background: linear-gradient(rgb(0,20,30), rgb(0,40,70)); |
| | | border: 2px solid rgba(0,90,120,.3); |
| | | } |
| | | .table-bordered td, .table-bordered th { border: 1px solid #ebedf2; } |
| | | |
| | | .table-bordered td, |
| | | .table-bordered th { |
| | | border: 1px solid #ebedf2; |
| | | } |
| | | |
| | | .canvasWrap {width: 100%; height: 100%} |
| | | .mark_list{ position: absolute; top: 20px; right: 10px; } |
| | | .canvasWrap { |
| | | width: 100%; |
| | | height: 100% |
| | | } |
| | | |
| | | .mark_list { |
| | | position: absolute; |
| | | top: 20px; |
| | | right: 10px; |
| | | } |
| | | |
| | | .mark_list li{ |
| | | float: left; |
| | | width: 100px; |
| | |
| | | background: #fff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .mark_list li:hover{ |
| | | background: #009a8f; |
| | | color:#fff; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | |
| | | <body class="alt-menu sidebar-noneoverflow"> |
| | | |
| | | <!-- BEGIN LOADER --> |
| | | <div id="load_screen"> <div class="loader"> <div class="loader-content"> |
| | | <div id="load_screen"> |
| | | <div class="loader"> |
| | | <div class="loader-content"> |
| | | <div class="spinner-grow align-self-center"></div> |
| | | </div></div></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- END LOADER --> |
| | | <div class="border-left" style="opacity:0.4;float:left;position:absolute;z-index:1;left:120px;height:20px;"><img alt="" src="/hxzkoa/resources/images/border.png" class="img-left"></div> |
| | | <div class="border-right" style="opacity:0.4;float:right;position:absolute;z-index:2;right:120px;"><img alt="" src="/hxzkoa/resources/images/border2.png" class="img-right"></div> |
| | | <div class="border-left" |
| | | style="opacity: 0.4; float: left; position: absolute; z-index: 1; left: 120px; height: 20px;"> |
| | | <img alt="" src="/hxzkoa/resources/images/border.png" class="img-left"> |
| | | </div> |
| | | <div class="border-right" |
| | | style="opacity: 0.4; float: right; position: absolute; z-index: 2; right: 120px;"> |
| | | <img alt="" src="/hxzkoa/resources/images/border2.png" class="img-right"> |
| | | </div> |
| | | <!-- BEGIN NAVBAR --> |
| | | <div class="login-page"></div> |
| | | <!-- END NAVBAR --> |
| | |
| | | <div class="table-responsive mb-4 mt-4" style="height:600px;"> |
| | | <div style="width:20%;height:600px;float:left"> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"> |
| | | <label for="exampleFormControlInput1">选择图层:</label> |
| | | <select id="chooselayer" onchange="floorChange()" class="form-control form-control-lg" style="width:60%;font-size: 12px;padding: 5px 5px"> |
| | | <option value="null">请选择</option> |
| | | <label for="exampleFormControlInput1">选择图层:</label> <select |
| | | id="chooselayer" onchange="floorChange()" |
| | | class="form-control form-control-lg" |
| | | style="width: 60%; font-size: 12px; padding: 5px 5px"> |
| | | <option value="百度地图">百度地图</option> |
| | | <c:forEach items="${floorList}" var="floor"> |
| | | <option value="${floor.floor}">${floor.floor} </option> |
| | | </c:forEach> |
| | | </select></div> |
| | | </select> |
| | | </div> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"> |
| | | <label for="exampleFormControlInput1">围栏类型:</label> |
| | | <select id="weilanleixing" class="form-control form-control-lg" style="width:60%;font-size: 12px;padding: 5px 5px"> |
| | | <label for="exampleFormControlInput1">围栏类型:</label> <select |
| | | id="weilanleixing" class="form-control form-control-lg" |
| | | style="width: 60%; font-size: 12px; padding: 5px 5px"> |
| | | <option value="考勤区域">考勤区域</option> |
| | | <option value="进入告警">进入告警</option> |
| | | <option value="出去告警">出去告警</option> |
| | |
| | | <option value="室内区域">室内区域</option> |
| | | <option value="切换区域">切换区域</option> |
| | | <option value="视频区域">视频区域</option> |
| | | </select></div> |
| | | </select> |
| | | </div> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"> |
| | | <label for="exampleFormControlInput1">关联对象:</label> |
| | | <select id="guanlianduixiang" class="form-control form-control-lg" style="width:60%;font-size: 12px;padding: 5px 5px"> |
| | | <label for="exampleFormControlInput1">关联对象:</label> <select |
| | | id="guanlianduixiang" class="form-control form-control-lg" |
| | | style="width: 60%; font-size: 12px; padding: 5px 5px"> |
| | | <option value="系统默认">系统默认</option> |
| | | <option value="测试部">测试部</option> |
| | | </select></div> |
| | | </select> |
| | | </div> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"> |
| | | <label for="exampleFormControlInput1">区域名称:</label> |
| | | <input class="form-control" type="text" id="quyumingcheng" style="width:60%;font-size: 12px;padding: 5px 5px"></div> |
| | | <label for="exampleFormControlInput1">区域名称:</label> <input |
| | | class="form-control" type="text" id="quyumingcheng" |
| | | style="width: 60%; font-size: 12px; padding: 5px 5px"> |
| | | </div> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"> |
| | | <label for="exampleFormControlInput1">围栏高度:</label> <input |
| | | class="form-control" type="text" id="fencegao" |
| | | style="width: 60%; font-size: 12px; padding: 5px 5px"> |
| | | </div> |
| | | <div style="margin-left: 20px; padding: 10px; width: 100%;display: none;" |
| | | id="xuanxingzhuang"> |
| | | <div class="custom-control custom-radio custom-control-inline"> |
| | | <input type="radio" id="矩形" name="draw_shape" class="custom-control-input" value="矩形" checked="true"> |
| | | <input type="radio" id="矩形" name="draw_shape" |
| | | class="custom-control-input" value="矩形" checked="true"> |
| | | <label class="custom-control-label" for="矩形">矩形</label> |
| | | </div> |
| | | <div class="custom-control custom-radio custom-control-inline"> |
| | | <input type="radio" id="多边形" name="draw_shape" class="custom-control-input" value="多边形"> |
| | | <label class="custom-control-label" for="多边形">多边形</label> |
| | | <input type="radio" id="多边形" name="draw_shape" |
| | | class="custom-control-input" value="多边形"> <label |
| | | class="custom-control-label" for="多边形">多边形</label> |
| | | </div> |
| | | </div> |
| | | <div style="margin-left:20px;padding:10px;width:100%;"><label for="exampleFormControlInput1">围栏颜色:</label> |
| | | <select id="fence_color" onchange="getColor()" class="form-control form-control-lg" style="width:50%;font-size: 12px;padding: 5px 5px"> |
| | | <div style="margin-left: 20px; padding: 10px; width: 100%;display: none;" id="yanseaa"> |
| | | <label for="exampleFormControlInput1">围栏颜色:</label> <select |
| | | id="fence_color" onchange="getColor()" |
| | | class="form-control form-control-lg" |
| | | style="width: 50%; font-size: 12px; padding: 5px 5px"> |
| | | <option value="红色">红色</option> |
| | | <option value="绿色">绿色</option> |
| | | <option value="蓝色">蓝色</option> |
| | | <option value="黑色">黑色</option> |
| | | <option value="白色">白色</option> |
| | | </select></div> |
| | | <div align="left" style="margin-top:20px"> |
| | | <button type="button" class="btn btn-secondary" id="begin_draw">绘制</button> |
| | | <button type="button" class="btn btn-secondary" id="save_fence">保存</button> |
| | | <button type="button" class="btn btn-secondary" id="cancel_draw">取消</button> |
| | | </select> |
| | | </div> |
| | | <div style="margin-top:20px"> |
| | | <div align="left" style="margin-top: 20px"> |
| | | <button type="button" class="btn btn-secondary" id="begin_draw" |
| | | style="display: none;">绘制</button> |
| | | <button type="button" class="btn btn-secondary" id="save_fence" |
| | | style="display: none;">保存</button> |
| | | <button type="button" class="btn btn-secondary" id="cancel_draw" |
| | | style="display: none;">取消</button> |
| | | <button type="button" class="btn btn-secondary" id="bdbaocun" |
| | | style="margin-left: 30px;" onclick="bdbaocuns()">保存</button> |
| | | <button type="button" class="btn btn-secondary" |
| | | id="bdquxiao">取消</button> |
| | | </div> |
| | | <div style="margin-top: 20px;display: none;" id="tiaofu"> |
| | | <label id="draw_hint">请点击绘制按钮开始绘制围栏</label> |
| | | </div> |
| | | </div> |
| | | <div id="wrap" style="width:78%;height:600px;float:right"> |
| | | <div id="baidumap" style="width: 78%; height: 600px; float: right"> |
| | | </div> |
| | | <div id="wrap" style="width: 78%; height: 600px; float: right;display: none;"> |
| | | <canvas id="draw"></canvas> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | <!-- END MAIN CONTAINER --> |
| | | <% |
| | | String username=(String)session.getAttribute("username"); |
| | | if(username==null || username.equals("")){ |
| | | request.getRequestDispatcher("/hxzk/login.jsp").forward(request,response); |
| | | return; |
| | | } |
| | | %> |
| | | <% String username=(String) session.getAttribute("username"); if (username==null || username.equals("")) |
| | | { request.getRequestDispatcher("/hxzk/login.jsp").forward(request, response); return; } %> |
| | | <!-- > BEGIN PAGE FUNCTION SCRIPTS --> |
| | | <script type="text/javascript"> |
| | | $(document).ready(function() { |
| | | var str = "${msg}"; |
| | | if (str != "") { |
| | | alert(str); |
| | | } |
| | | }); |
| | | |
| | | function pleasecheck() { |
| | | var inputObj = document.createElement('input') |
| | | inputObj.setAttribute('id', '_ef'); |
| | | inputObj.setAttribute('type', 'file'); |
| | | inputObj.setAttribute("style", 'visibility:hidden'); |
| | | document.body.appendChild(inputObj); |
| | | inputObj.click(); |
| | | inputObj.value;//所选文件的路径及文件名 |
| | | alert(inputObj.value); |
| | | }; |
| | | var bdzuobiao = ""; |
| | | var overlays = []; |
| | | |
| | | function pleasecheck() { |
| | | var inputObj = document.createElement('input') |
| | | inputObj.setAttribute('id', '_ef'); |
| | | inputObj.setAttribute('type', 'file'); |
| | | inputObj.setAttribute("style", 'visibility:hidden'); |
| | | document.body.appendChild(inputObj); |
| | | inputObj.click(); |
| | | inputObj.value;//所选文件的路径及文件名 |
| | | alert(inputObj.value); |
| | | }; |
| | | |
| | | function floorChange(){ |
| | | // when change floor num, the map will also change. |
| | | var select_value = document.getElementById("chooselayer").value; |
| | | |
| | | console.log(select_value); |
| | | if (select_value == "百度地图") { |
| | | document.getElementById("begin_draw").style.display = "none"; |
| | | document.getElementById("save_fence").style.display = "none"; |
| | | document.getElementById("cancel_draw").style.display = "none"; |
| | | document.getElementById("wrap").style.display = "none"; |
| | | document.getElementById("xuanxingzhuang").style.display = "none"; |
| | | document.getElementById("tiaofu").style.display = "none"; |
| | | document.getElementById("yanseaa").style.display = "none"; |
| | | document.getElementById("fencegao").style.display = ""; |
| | | document.getElementById("bdbaocun").style.display = ""; |
| | | document.getElementById("bdquxiao").style.display = ""; |
| | | document.getElementById("baidumap").style.display = ""; |
| | | } else { |
| | | document.getElementById("begin_draw").style.display = ""; |
| | | document.getElementById("save_fence").style.display = ""; |
| | | document.getElementById("cancel_draw").style.display = ""; |
| | | document.getElementById("wrap").style.display = ""; |
| | | document.getElementById("xuanxingzhuang").style.display = ""; |
| | | document.getElementById("tiaofu").style.display = ""; |
| | | document.getElementById("yanseaa").style.display = ""; |
| | | document.getElementById("fencegao").style.display = "none"; |
| | | document.getElementById("bdbaocun").style.display = "none"; |
| | | document.getElementById("bdquxiao").style.display = "none"; |
| | | document.getElementById("baidumap").style.display = "none"; |
| | | $.ajax({ |
| | | async:false, |
| | | type:'POST', |
| | |
| | | value:select_value |
| | | }, |
| | | success:function(data){ |
| | | console.log(data); |
| | | console.log(data[0].mapname); |
| | | //console.log(data); |
| | | //console.log(data[0].mapname); |
| | | imgUrl = '/hxzkoa/hxzk/image/mapfile/'+data[0].mapname; |
| | | // imgUrl = '/hxzkoa/hxzk/image/mapfile/office.jpg'; |
| | | new MarkPoints(imgUrl); |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | var overlaycomplete = function (e) { |
| | | overlays.push(e.overlay); |
| | | //覆盖物删除事件 |
| | | var removeMarker = function (e, ee, overlay) { |
| | | bm.removeOverlay(overlay); |
| | | } |
| | | if (e.overlay instanceof BMap.Polygon) { |
| | | //var pol=(BMap.Polygon)e.overlay; |
| | | var poi_arr = e.overlay.getPath(); |
| | | for (var i = 0; i < poi_arr.length; i++) { |
| | | var str2 = poi_arr[i].lng + "," + poi_arr[i].lat + ";"; |
| | | bdzuobiao += str2; |
| | | } |
| | | // var infoWindow = new BMap.InfoWindow(info); // 创建信息窗口对象 |
| | | // bm.openInfoWindow(infoWindow, poi_arr[0]); //开启信息窗口 |
| | | //alert(info); |
| | | } |
| | | |
| | | //创建右键菜单 |
| | | var markerMenu = new BMap.ContextMenu(); |
| | | markerMenu.addItem(new BMap.MenuItem('删除', removeMarker.bind(e.overlay))); |
| | | e.overlay.addContextMenu(markerMenu); |
| | | }; |
| | | |
| | | function bdbaocuns() { |
| | | if(overlays.length != 1) { |
| | | alert("一次只能保存一个围栏!!!") |
| | | return; |
| | | } |
| | | var layer = document.getElementById("chooselayer").value; |
| | | var weilanleixing = document.getElementById("weilanleixing").value; |
| | | var guanlianduixiang = document.getElementById("guanlianduixiang").value; |
| | | var quyumingcheng = document.getElementById("quyumingcheng").value; |
| | | var fencegao = document.getElementById("fencegao").value; |
| | | var xingzhuang = "-"; |
| | | var yanse = getDrawColor(getColor()); |
| | | $.ajax({ |
| | | type: 'POST', |
| | | url: '/hxzkoa/sanweiFence.do', |
| | | dataType: 'json', |
| | | data: { |
| | | layer: layer, |
| | | weilanleixing: weilanleixing, |
| | | guanlianduixiang: guanlianduixiang, |
| | | quyumingcheng: quyumingcheng, |
| | | xingzhuang: xingzhuang, |
| | | yanse: yanse, |
| | | zuobiao: bdzuobiao, |
| | | fencegao: fencegao, |
| | | }, |
| | | success: function (data) { |
| | | if (data == 0) { |
| | | $("#draw_hint").html("保存成功"); |
| | | alert("保存成功!"); |
| | | } else { |
| | | $("#draw_hint").html("保存失败"); |
| | | alert("保存失败!"); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function getShape() { |
| | | var radio = document.getElementsByName("draw_shape"); |
| | | for (i=0; i < radio.length; i++){ |
| | | if (radio[i].checked) { |
| | | console.log(radio[i].value) |
| | | //console.log(radio[i].value) |
| | | return radio[i].value |
| | | } |
| | | } |
| | |
| | | return yuandian; |
| | | }; |
| | | |
| | | function getSystemSetting() { |
| | | var sysset = []; |
| | | $.ajax({ |
| | | async: false, |
| | | type: 'POST', |
| | | url: "/hxzkoa/getSysSetting_list.do", |
| | | dataType: 'json', |
| | | success: function (data) { |
| | | sysset = data; |
| | | }, |
| | | }); |
| | | return sysset; |
| | | }; |
| | | |
| | | function getTruemap(){ |
| | | var floor = document.getElementById("chooselayer").value; |
| | | var map_wl = []; |
| | |
| | | fencelist.push(data[i].zuobiao); |
| | | fencecolor.push(data[i].color); |
| | | fencename.push(data[i].name); |
| | | }} |
| | | } |
| | | } |
| | | }); |
| | | if (leixing == "zuobiao"){ |
| | | return fencelist |
| | |
| | | var points_list = _this.FenceList[m].split(",");//围栏实际坐标 |
| | | var draw_points_list = []; |
| | | var tmp_list = []; |
| | | console.log(points_list); |
| | | //console.log(points_list); |
| | | //实际坐标转成图上坐标 |
| | | for (var i=0; i<points_list.length; i++){ |
| | | if (i%2 ==0){ |
| | |
| | | _this.onmouseWheel(event); |
| | | }; |
| | | document.getElementById('begin_draw').onclick=function () { |
| | | console.log(_this.CreatLinepoints); |
| | | //console.log(_this.CreatLinepoints); |
| | | if (_this.CreatLinepoints.length==0){ |
| | | var shape_value = getShape(); |
| | | if (shape_value){ |
| | |
| | | posXY.y = (posXY.y - _this.imgY) / _this.imgScale; |
| | | now_x = posXY.x; |
| | | now_y = posXY.y; |
| | | /* console.log(now_x, now_y); |
| | | console.log("length",_this.CreatLinepoints.length); */ |
| | | /* //console.log(now_x, now_y); |
| | | //console.log("length",_this.CreatLinepoints.length); */ |
| | | if ( Math.abs(now_x-start_x)<=5 && Math.abs(now_y-start_y)<=5) { //连成闭合图形时(代替原鼠标右键) |
| | | console.log("close"); |
| | | //console.log("close"); |
| | | $("#draw_hint").html("绘制完成,请点击保存,放弃绘制请点击取消"); |
| | | _this.CreateLineColor.push(color); |
| | | |
| | |
| | | posXY.x = (posXY.x - _this.imgX) / _this.imgScale; |
| | | posXY.y = (posXY.y - _this.imgY) / _this.imgScale; |
| | | _this.CreatLinepoints.push(posXY); |
| | | console.log("add", posXY); |
| | | //console.log("add", posXY); |
| | | _this.allMarkLins.pop(); |
| | | _this.allMarkLins.push(_this.CreatLinepoints); |
| | | _this.allFenceColor.pop(); |
| | | _this.allFenceColor.push(color); |
| | | |
| | | _this.drawImg(); } |
| | | _this.drawImg(); |
| | | } |
| | | } else { |
| | | var posXY = _this.xyToCanvas(_this.canvas, event.clientX, event.clientY); |
| | | |
| | |
| | | _this.allFenceColor.pop(); |
| | | _this.allFenceColor.push(color); |
| | | |
| | | console.log(_this.CreatLinepoints,_this.CreateLineColor, _this.allMarkLins, _this.allFenceColor); |
| | | //console.log(_this.CreatLinepoints, _this.CreateLineColor, _this.allMarkLins, _this.allFenceColor); |
| | | |
| | | _this.drawImg(); |
| | | |
| | |
| | | _this.dragFlag = true; |
| | | _this.canvas.style.cursor = "normal"; |
| | | _this.drawImg(); |
| | | //console.log(_this.CreatLinepoints); |
| | | ////console.log(_this.CreatLinepoints); |
| | | return; |
| | | } |
| | | } |
| | |
| | | } else if (shape == "矩形") { |
| | | var pos1 = _this.xyToCanvas(_this.canvas, event.clientX, event.clientY); |
| | | var can = _this.context; |
| | | console.log(pos1); |
| | | //console.log(pos1); |
| | | can.clearRect(0, 0, _this.canvas.width, _this.canvas.height); |
| | | _this.drawImg(); |
| | | /*画跟随圆点*/ |
| | |
| | | var x_ratio = new Number(_this.img.naturalWidth / trueLength); |
| | | var y_ratio = new Number(_this.img.naturalHeight / trueWidth); |
| | | var zuobiao = _this.CreatLinepoints; |
| | | console.log(zuobiao); |
| | | //console.log(zuobiao); |
| | | var real_zuobiao = []; |
| | | for (i=0; i<zuobiao.length; i++){ |
| | | //var real_x = (new Number(zuobiao[i].x)) / (_this.imgScale * _this.rateNum * x_ratio); |
| | | var real_x = (new Number(zuobiao[i].x)) / (_this.rateNum * x_ratio) +x_x0; |
| | | real_x = real_x.toFixed(0); |
| | | console.log(zuobiao[i].x, real_x); |
| | | //console.log(zuobiao[i].x, real_x); |
| | | //var real_y = (new Number(zuobiao[i].y)) / (_this.imgScale * _this.rateNum * y_ratio); |
| | | var real_y = (new Number(zuobiao[i].y)) / (_this.rateNum * y_ratio) +y_y0; |
| | | real_y = real_y.toFixed(0) |
| | | real_zuobiao.push(real_x, real_y); |
| | | } |
| | | console.log(layer, weilanleixing, guanlianduixiang, quyumingcheng, xingzhuang, yanse, real_zuobiao); |
| | | //console.log(layer, weilanleixing, guanlianduixiang, quyumingcheng, xingzhuang, yanse, real_zuobiao); |
| | | var existName = getExistFence("name"); |
| | | if (existName.includes(quyumingcheng)) { |
| | | alert(quyumingcheng+"已经存在不能重复添加!") |
| | |
| | | <script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/jszip.min.js"></script> |
| | | <script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/buttons.html5.min.js"></script> |
| | | <script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/buttons.print.min.js"></script> |
| | | <script type="text/javascript" id="baidumap_api" |
| | | src="http://api.map.baidu.com/getscript?v=3.0&ak=PUftjeZCKHtEn8ZMjeAGnViSO8NBvBNm"></script> |
| | | <script type="text/javascript" |
| | | src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script> |
| | | <script type="text/javascript" |
| | | src="http://api.map.baidu.com/library/SearchInfoWindow/1.4/src/SearchInfoWindow_min.js"></script> |
| | | <script> |
| | | $(document).ready(function() { |
| | | App.init();$.ajax({async : false, type : "POST",url : "/hxzkoa/getSysSetting_list.do",data : {},dataType : "json",success:function(data){/* title = data[0].title;document.title = title; */},}); |
| | | var bm_sysSetting = getSystemSetting(); |
| | | var bm_baidu_j = bm_sysSetting[0].baidu_j;//百度地图精度 |
| | | var bm_baidu_w = bm_sysSetting[0].baidu_w;//百度地图维度 |
| | | var bm = new BMap.Map("baidumap"); // 创建Map实例 |
| | | bm.centerAndZoom(new BMap.Point(bm_baidu_j, bm_baidu_w), 12); // 初始化地图,设置中心点坐标和地图级别 |
| | | bm.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 |
| | | |
| | | var styleOptions = { |
| | | strokeColor: "rgba(255,0,0,0.3)", //边线颜色。 |
| | | fillColor: "rgba(255,0,0,0.3)", //填充颜色。当参数为空时,圆形将没有填充效果。 |
| | | strokeWeight: 3, //边线的宽度,以像素为单位。 |
| | | strokeOpacity: 0.8, //边线透明度,取值范围0 - 1。 |
| | | fillOpacity: 0.6, //填充的透明度,取值范围0 - 1。 |
| | | strokeStyle: 'solid' //边线的样式,solid或dashed。 |
| | | } |
| | | //实例化鼠标绘制工具 |
| | | var drawingManager = new BMapLib.DrawingManager(bm, { |
| | | isOpen: false, //是否开启绘制模式 |
| | | enableDrawingTool: true, //是否显示工具栏 |
| | | drawingToolOptions: { |
| | | anchor: BMAP_ANCHOR_TOP_RIGHT, //位置 |
| | | offset: new BMap.Size(5, 5), //偏离值 |
| | | drawingModes: [BMAP_DRAWING_POLYGON, BMAP_DRAWING_RECTANGLE] |
| | | }, |
| | | circleOptions: styleOptions, //圆的样式 |
| | | polylineOptions: styleOptions, //线的样式 |
| | | polygonOptions: styleOptions, //多边形的样式 |
| | | rectangleOptions: styleOptions //矩形的样式 |
| | | }); |
| | | |
| | | //添加鼠标绘制工具监听事件,用于获取绘制结果 |
| | | drawingManager.addEventListener('overlaycomplete', overlaycomplete); |
| | | }); |
| | | $('.header-page').load('/hxzkoa/hxzk/top.html');$('.login-page').load('/hxzkoa/hxzk/head.html'); |
| | | </script> |
| | |
| | | <!-- BEGIN PAGE LEVEL PLUGINS/CUSTOM SCRIPTS --> |
| | | |
| | | </body> |
| | | |
| | | </html> |