{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\bizComponents\\eipControl\\EipMap.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\bizComponents\\eipControl\\EipMap.vue","mtime":1675071991475},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport VueAMap from \"vue-amap\"; //高德地图插件\n\nVueAMap.initAMapApiLoader({\n  // 高德的key\n  key: \"1f8f479e9b787974efaa9bda1bf8ef92\",\n  // 插件集合\n  plugin: [\"AMap.Autocomplete\", \"AMap.PlaceSearch\", \"AMap.Scale\", \"AMap.OverView\", \"AMap.ToolBar\", \"AMap.MapType\", \"AMap.PolyEditor\", \"AMap.CircleEditor\", \"AMap.Geolocation\", \"AMap.Autocomplete\", \"AMap.PlaceSearch\"],\n  // 默认高德 sdk 版本为 1.4.4\n  v: \"1.4.4\"\n});\nimport utils from \"@/components/bizComponents/utils.js\";\nexport default {\n  name: \"eip-map\",\n  props: [\"heightMap\", \"addressMap\"],\n  data: function data() {\n    var self = this;\n    return {\n      mapCenter: [121.59996, 31.197646],\n      markers: [],\n      address: \"\",\n      zoom: 12,\n      resizeEnable: true,\n      lng: 0,\n      lat: 0,\n      loaded: false,\n      searchOption: {\n        //poi搜索条件  默认全国\n        city: \"全国\",\n        citylimit: false //是否限制城市内搜索\n\n      },\n      plugin: []\n    };\n  },\n  methods: {\n    onSearchResult: function onSearchResult(pois) {\n      var latSum = 0;\n      var lngSum = 0;\n\n      if (pois.length > 0) {\n        //获取选择的地址经纬度\n        this.mapCenter = [pois[0].lng, pois[0].lat];\n\n        if (this.markers.length > 0 && this.markers[0][0] != this.mapCenter[0] && this.markers[0][1] != this.mapCenter[1]) {\n          this.markers = []; //清空经纬度\n\n          this.markers.push([pois[0].lng, pois[0].lat]);\n        } else if (this.markers.length == 0) {\n          this.markers.push([pois[0].lng, pois[0].lat]);\n        } //判断地图返回的地址是否有绑定的字段\n\n\n        if (this.addressMap) {\n          var pInst = utils.getOnlineFormInstance(this); //赋值给绑定的字段\n\n          utils.setValueByPath(pInst, this.addressMap, pois[0].address + \".\" + pois[0].name, null);\n        }\n      }\n    }\n  },\n  mounted: function mounted() {\n    var self = this;\n    setTimeout(function () {\n      self.plugin = [\"AMap.Scale\", \"AMap.ToolBar\", \"AMap.Autocomplete\", {\n        enableHighAccuracy: true,\n        //是否使用高精度定位，默认:true\n        timeout: 10000,\n        //超过10秒后停止定位，默认：5s\n        buttonPosition: \"RB\",\n        //定位按钮的停靠位置\n        buttonOffset: new AMap.Pixel(5, 10),\n        //定位按钮与设置的停靠位置的偏移量，默认：Pixel(10, 20)\n        zoomToAccuracy: true,\n        //定位成功后是否自动调整地图视野到定位点\n        markerOptions: {\n          //自定义定位点样式，同Marker的Options\n          offset: new AMap.Pixel(-18, -36),\n          content: '<img src=\"https://a.amap.com/jsapi_demos/static/resource/img/user.png\" style=\"width:36px;height:36px\"/>'\n        },\n        showCircle: true,\n        //是否显示定位精度圈\n        circleOptions: {\n          //定位精度圈的样式\n          strokeColor: \"#0093FF\",\n          noSelect: true,\n          strokeOpacity: 0.5,\n          strokeWeight: 1,\n          fillColor: \"#02B0FF\",\n          fillOpacity: 0.25\n        },\n        extensions: \"all\",\n        pName: \"Geolocation\",\n        events: {\n          init: function init(o) {\n            if (!self.address) {\n              // o 是高德地图定位插件实例  获取当前位置\n              o.getCurrentPosition(function (status, result) {\n                if (result && result.position) {\n                  self.lng = result.position.lng;\n                  self.lat = result.position.lat;\n                  self.center = [self.lng, self.lat];\n                  self.loaded = true;\n                  self.$nextTick();\n                }\n              });\n            }\n          }\n        }\n      }, {\n        //poi搜索插件\n        pName: \"PlaceSearch\",\n        events: {\n          init: function init(o) {\n            if (self.address) {\n              var placeSearch = new AMap.PlaceSearch({\n                city: \"全国\"\n              });\n              placeSearch.search(self.address, function (status, result) {\n                if (result.info == \"OK\") {\n                  self.mapCenter = [result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat];\n                  self.markers.push([result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat]);\n                }\n              });\n            }\n          }\n        }\n      }]; //判断地图返回的地址是否有绑定的字段\n\n      if (self.addressMap) {\n        var pInst = utils.getOnlineFormInstance(self); //获取绑定字段的值\n\n        self.address = utils.getValueByPath(pInst, self.addressMap, null);\n      }\n    }, 500);\n  }\n};",null]}