{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/o_map.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/o_map.vue","mtime":1725957645727},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["\nimport Constant from \"@/Constant.js\";\nimport map_arcgis from \"@/components/map_arcGIS.vue\";\nimport controlHidden from \"@/assets/js/controlHidden.js\";\nexport default {\n name: \"o-map\",\n props: [\"id\"],\n components: {\n map_arcgis,\n },\n computed: {\n field: function () {\n let formData = this.$parent.findField(this.id);\n this.setValue(formData.value);\n return formData;\n },\n },\n\n mounted() {\n this.$nextTick(() => {\n let field = this.field;\n if (field.isHideType) {\n let id = this.id,\n formShowType = field.formShowType;\n controlHidden({ id, field, formShowType });\n }\n });\n },\n\n data: function () {\n return {\n Constant,\n dialogVisible: false,\n center: {\n lng: 116.404,\n lat: 39.915,\n },\n zoom: 3,\n currentStyle: \"search-frame\",\n isActive: false,\n currentMapType: \"BMAP_NORMAL_MAP\",\n mapNum: 1,\n currentLongitude: \"\",\n currentLatitude: \"\",\n keyword: \"\",\n location: \"\",\n show: false,\n markerList: [],\n markerPoint: {\n lng: \"\",\n lat: \"\",\n },\n markerAdress: \"\",\n adressTitle: \"\",\n adressContent: \"\",\n markerHidden: true,\n isWarring: false,\n };\n },\n\n methods: {\n setValue(value) {\n if (value && JSON.parse(value).length > 0) {\n this.markerList = JSON.parse(value);\n } else {\n this.markerList = [];\n }\n },\n\n onOk(index) {\n this.markerList[index].isShow = false;\n this.field.value = JSON.stringify(this.markerList);\n },\n\n onReset(index) {\n this.markerList[index].title = \"\";\n this.markerList[index].detail = \"\";\n this.$forceUpdate();\n },\n\n handler({ BMap, map }) {\n console.log({ BMap, map });\n this.center.lng = 116.404;\n this.center.lat = 39.915;\n this.zoom = 3;\n },\n\n zoomEnd(e) {\n console.log(e);\n this.zoom = e.target.getZoom();\n },\n\n //右键$t('enlarge')\n enlargeMap(e) {\n this.center = {\n lng: e.point.lng,\n lat: e.point.lat,\n };\n this.zoom = this.zoom + 2;\n if (this.zoom >= 19) {\n this.zoom = 19;\n }\n console.log(this.zoom);\n },\n\n //右键$t('shrink')\n reduceMap(e) {\n this.center = {\n lng: e.point.lng,\n lat: e.point.lat,\n };\n this.zoom = this.zoom - 2;\n if (this.zoom <= 0) {\n this.zoom = 1;\n }\n },\n\n setSign(e) {\n let mLng = e.point.lng,\n mLat = e.point.lat;\n this.setMark(mLng, mLat, (close = true));\n },\n\n cancelSign({ BMap, map }) {\n //有问题,隐藏\n this.markerHidden = false;\n },\n\n infoWindowClose(index) {\n this.markerList[index].isShow = false;\n this.$forceUpdate();\n },\n\n infoWindowOpen(index) {\n this.markerList[index].isShow = true;\n this.$forceUpdate();\n },\n\n getDbclickInfo(e) {\n let mLng = e.point.lng,\n mLat = e.point.lat;\n this.setMark(mLng, mLat);\n },\n\n setMark(mLng, mLat, close) {\n let that = this;\n let myGeo = new BMap.Geocoder();\n let p = new BMap.Point(mLng, mLat);\n myGeo.getLocation(p, function (rs) {\n let addComp = rs.addressComponents;\n let address =\n addComp.province +\n addComp.city +\n addComp.district +\n addComp.street +\n addComp.streetNumber;\n if (that.markerAdress && that.markerAdress != address) {\n that.adressTitle = \"\";\n that.adressContent = \"\";\n }\n that.markerAdress = address;\n that.markerPoint.lng = mLng;\n that.markerPoint.lat = mLat;\n that.markerHidden = true;\n\n // markerList\n let obj = {\n lat: mLat,\n lng: mLng,\n address: address,\n title: that.adressTitle,\n detail: that.adressContent,\n isShow: true,\n };\n\n that.markerList.push(obj);\n\n that.field.value = JSON.stringify(that.markerList);\n if (close == true) {\n that.show = false;\n } else {\n that.show = true;\n }\n });\n },\n\n normalMap() {\n if (this.mapNum == 2) {\n this.currentMapType = \"BMAP_NORMAL_MAP\";\n this.mapNum = 1;\n }\n },\n\n mixMap() {\n if (this.mapNum == 1) {\n this.currentMapType = \"BMAP_HYBRID_MAP\";\n this.mapNum = 2;\n }\n },\n\n searchLocation() {\n this.location = this.keyword;\n },\n\n searchBox(e) {\n this.isActive = !this.isActive;\n },\n\n changeLAL() {\n console.log(\"经纬度改变了\");\n let that = this;\n if (this.currentLongitude && this.currentLatitude) {\n (this.center = {\n lng: that.currentLongitude,\n lat: that.currentLatitude,\n }),\n (this.zoom = 15);\n }\n },\n },\n};\n",null]}