7 lines
20 KiB
JavaScript
7 lines
20 KiB
JavaScript
|
/*!
|
||
|
* build: vue-admin-beautiful
|
||
|
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
|
||
|
* vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756
|
||
|
* time: 2024-10-10 11:14:28
|
||
|
*/
|
||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-738dd5d9","chunk-795c1891"],{"17be":function(e,t,o){"use strict";o.r(t);var a=o("f2bf");function r(e,t,o,r,l,d){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,t[0]||(t[0]=[Object(a["createElementVNode"])("div",{class:"form-layer"},[Object(a["createElementVNode"])("div",{id:"map"})],-1)]))}var l={name:"BdMap",emits:["getLatAndLng"],data(){return{map:null,local:null,mk:null,keyWords:"",longitude:"",latitude:""}},created(){""!=this.longitude&&""!=this.latitude||this.initMap()},methods:{initMap(){this.$nextTick(()=>{this.map=new BMap.Map("map");const e=""==this.longitude?"118.802":this.longitude,t=""==this.latitude?"32.064":this.latitude,o=new BMap.Point(e,t);this.map.centerAndZoom(o,18),this.map.enableScrollWheelZoom(!0),this.map.addControl(new window.BMap.NavigationControl),"118.802"!=e&&"32.064"!=t?this.handleMarker(this,o):(console.log("longitude="+e),console.log("latitude="+t),this.fixedPos())})},showMap(e){this.latitude=e.latitude,this.longitude=e.longitude,this.initMap()},fixedPos(){const e=this,t=new BMap.Geolocation;this.confirmLoading=!0,t.getCurrentPosition((function(t){if(this.getStatus()==window.BMAP_STATUS_SUCCESS){e.handleMarker(e,t.point),e.addListener(e);const o=new BMap.Geocoder;o.getLocation((function(t){e.confirmLoading=!1,t&&e.$emit("tellFatherName",t.point)}))}else e.$message.error("failed"+this.getStatus())}))},setPlace(e){this.keyWords=e,this.local=new BMap.LocalSearch(this.map,{onSearchComplete:this.searchPlace}),this.local.search(this.keyWords)},searchPlace(){if(void 0!=this.local.getResults())if(this.map.clearOverlays(),this.local.getResults().getPoi(0)){const e=this.local.getResults().getPoi(0).point;this.map.centerAndZoom(e,18),this.handleMarker(this,e),this.addListener(this,e),console.log("经度:"+e.lng+"--纬度"+e.lat),this.$emit("tellFatherName",e)}else this.$message.error("未匹配到地点!");else this.$message.error("未找到搜索结果!")},handleMarker(e,t){const o=this;e.mk=new BMap.Marker(t),e.map.addOverlay(e.mk),e.mk.enableDragging(),e.map.addEventListener("dragend",(function(e){o.$emit("tellFatherName",e.point)})),e.map.panTo(t)},addListener(e){const t=this;e.map.addEventListener("click",(function(e){t.$emit("tellFatherName",e.point),t.map.clearOverlays(),t.handleMarker(t,e.point)}))}}},d=(o("502f"),o("d959")),c=o.n(d);const n=c()(l,[["render",r],["__scopeId","data-v-702190e3"]]);t["default"]=n},"24d2":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return l})),o.d(t,"doEdit",(function(){return d})),o.d(t,"getProjectGroup",(function(){return c})),o.d(t,"selectAlarmTypeList",(function(){return n})),o.d(t,"getAlarmUser",(function(){return i})),o.d(t,"addAlarmUsers",(function(){return u})),o.d(t,"doDelete",(function(){return s})),o.d(t,"doAdd",(function(){return m})),o.d(t,"exportProject",(function(){return f}));var a=o("b775"),r=o("f121");function l(e){let t="?page="+e.page+"&size="+e.size;return e.regionCode&&(t+="®ionCode="+e.regionCode),e.name&&(t+="&name="+e.name),e.leader&&(t+="&leader="+e.leader),e.contact&&(t+="&contact="+e.contact),e.groupId&&(t+="&groupId="+e.groupId),Object(a["default"])({url:"/iot/project/select"+t,method:"get",data:e})}function d(e){return Object(a["default"])({url:"/iot/project/update",method:"post",data:e})}function c(e){return Object(a["default"])({url:"/iot/project/selectAllProjectGroup",method:"get",data:e})}function n(e){return Object(a["default"])({url:"/iot/project/selectAlarmTypeList",method:"get",data:e})}function i(e){return Object(a["default"])({url:"/iot/project/getAlarmUser?projectId="+e.projectId,method:"get",data:e})}function u(e){return Object(a["default"])({url:"/iot/project/addAlarmUsers",method:"post",data:e})}function s(e){return Object(a["default"])({url:"/iot/project/remove?",method:"post",data:e})}function m(e){return Object(a["default"])({url:"/iot/project/insert",method:"post",data:e})}function f(e){let t="?page="+e.page+"&size="+e.size;return e.regionCode&&(t+="®ionCode="+e.regionCode),e.name&&(t+="&name="+e.n
|