web-component-gallery 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/amap.umd.js
CHANGED
|
@@ -8711,10 +8711,10 @@ eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source cod
|
|
|
8711
8711
|
/*!***************************************!*\
|
|
8712
8712
|
!*** ./plugins/lib/amap/AmapDraw.jsx ***!
|
|
8713
8713
|
\***************************************/
|
|
8714
|
-
/***/ (function(
|
|
8714
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8715
8715
|
|
|
8716
8716
|
"use strict";
|
|
8717
|
-
eval("__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: function() { return /* binding */ AmapDrawProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.every.js */ \"./node_modules/core-js/modules/es.iterator.every.js\");\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _AmapDraw_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AmapDraw.less */ \"./plugins/lib/amap/AmapDraw.less\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__]);\n_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n\n\n\n\nconst amap = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\nconst {\n AMap,\n methods,\n layers\n} = amap;\n\nconst AmapDrawProps = {\n /** drawEl为地图容器实例名称 */\n drawEl: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('AmapDraw'),\n /** drawType为绘制类型\r\n * 可选值(point点 | line线 | polygon面)\r\n */\n drawType: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('point'),\n /** 绘制图标 (只在point类型下生效 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].any.def('http://api.qxfnkj.com:8090/poi/poi-marker-default.png'),\n /** drawCount为绘制物绘制个数 */\n drawCount: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].number.def(1),\n /** drawOptions为绘制物配置项 */\n drawOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** drawInfo为绘制物信息 */\n drawInfo: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].array]),\n /** drawInfoAll为所有不同类型绘制物信息(用于回显地图图层)\r\n * 格式: { point: ([]||{}), line: ([]||{}) }\r\n */\n drawInfoAll: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object,\n /** 限制区域 */\n drawLimitArea: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string]),\n /** 限制区域样式配置 */\n drawLimitAreaOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** 是否为纯地图展示数据 */\n isExhibition: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].bool.def(false)\n};\nconst AmapDraw = {\n name: 'AmapDraw',\n props: AmapDrawProps,\n data() {\n return {\n amap: null,\n drawArea: null,\n drawLayers: null,\n drawMouseTool: null,\n buttonProps: [],\n drawButtonProps: [{\n type: 'primary',\n text: '绘制',\n event: {\n click: this.AmapDraw\n }\n }, {\n text: '清除',\n event: {\n click: this.AmapDrawClear\n }\n }],\n saveButtonProps: [{\n type: 'primary',\n text: '保存',\n event: {\n click: this.AmapDrawSave\n }\n }, {\n text: '取消',\n event: {\n click: this.AmapDrawReset\n }\n }]\n };\n },\n computed: {\n drawLayersInfo: {\n get() {\n return this.drawInfo;\n },\n set(newValue) {\n this.$emit('getAMapLayersInfo', newValue);\n }\n }\n },\n watch: {\n drawInfo: {\n handler(newVal, oldVal) {\n const newValue = this.drawLayersInfo;\n newVal && this.echoDrawLayers(this.drawType);\n },\n deep: true\n },\n drawInfoAll(newValue) {\n newValue && this.echoDrawLayers();\n },\n drawOptions(newValue) {\n /** 检测options覆盖物配置是否更改,更改后要同步到地图上 */\n Object.keys(newValue).length && this.setOverlayOptions(newValue);\n },\n drawLimitArea(newValue) {\n newValue && this.setDrawLimitArea();\n }\n },\n mounted() {\n this.amap = amap.initMap({\n el: this.drawEl\n });\n this.buttonProps = [].concat(this.drawButtonProps);\n this.echoDrawLayers(this.drawType);\n /** 如果有限制区域,则描绘在地图上 */\n this.drawLimitArea && this.setDrawLimitArea();\n },\n destroyed() {\n this.AmapDrawClear();\n },\n methods: {\n /** 绘制 */\n AmapDraw() {\n this.buttonProps = [].concat(this.saveButtonProps);\n this.drawMouseTool = new AMap.MouseTool(this.amap);\n this.AmapDrawClear();\n this.setDrawLayers(this.drawType);\n this.drawMouseTool.on('draw', ({\n obj\n }) => {\n if (this.drawArea && !this[`is${this.drawType}InRing`](obj)) return this.amap.remove(obj), this.$message.error('未在范围内描绘!');\n /** 暂未支持一次性绘制多个 */\n this.drawCount > 1 ? (this.drawLayers = this.drawLayers || [], this.drawLayers.push(obj)) : this.drawLayers = obj;\n if (this.drawLayers && (this.drawLayers.length == this.drawCount || this.drawCount == 1)) {\n return this.drawMouseTool.close();\n }\n });\n },\n /** 清空绘制 / 清空搜索 */\n AmapDrawClear() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && this.amap.remove(layerItem));\n // this.amap.clearMap()\n this.drawLayers = null;\n this.drawLayersInfo = {};\n },\n /** 保存当前绘制 */\n AmapDrawSave() {\n this.assignDrawLayers(this.drawType);\n this.buttonProps = [].concat(this.drawButtonProps);\n },\n /** 取消当前绘制 */\n AmapDrawReset() {\n this.buttonProps = [].concat(this.drawButtonProps);\n this.AmapDrawClear();\n },\n /** 搜索地址 */\n searchChoose(searchMarker, searchInfo) {\n this.AmapDrawClear();\n searchMarker.setMap(this.amap);\n this.amap.setZoomAndCenter(15, searchMarker.getPosition());\n this.drawType == 'point' && (this.drawLayersInfo = searchInfo);\n // this.$emit('getAMapLayersInfo', this.drawLayersInfo)\n },\n /** 检测覆盖物配置信息并同步 */\n setOverlayOptions(options) {\n if (!this.drawLayers) return;\n this.drawCount > 1 ? this.drawLayers.forEach(drawItem => drawItem.setOptions(options)) : this.drawLayers.setOptions(options);\n },\n /** 绘制限定区域 */\n setDrawLimitArea() {\n let areaRange = [];\n try {\n areaRange = JSON.parse(this.drawLimitArea);\n } catch {\n areaRange = this.drawLimitArea;\n }\n this.drawArea && this.amap.remove(this.drawArea);\n /** 判断目前地图上存在的所绘制覆盖物是否在限制范围内 */\n this.setMapArea(areaRange);\n this.judgeOverlays();\n },\n /** 绘制地图区域范围 */\n setMapArea(jurisdictionRange) {\n this.drawArea = new AMap.Polygon({\n map: this.amap,\n path: jurisdictionRange,\n extData: 'Area',\n strokeWeight: 6,\n ...this.drawLimitAreaOptions\n });\n const {\n lng,\n lat\n } = this.drawArea.getBounds().getCenter();\n this.amap.setZoomAndCenter(15, [lng, lat]);\n },\n /** 判断一个线段是否在面内 */\n islineInRing(polyline) {\n const paths = polyline.getPath();\n return paths.every(pointItem => this.ispointInRing(pointItem));\n },\n /** 判断一个点是否在面内 */\n ispointInRing(point) {\n let position;\n try {\n position = point.getPosition();\n } catch {\n position = point;\n }\n return AMap.GeometryUtil.isPointInRing(position, this.drawArea.getPath());\n },\n /** 判断地图上所覆盖物是否在限制范围内 */\n judgeOverlays() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && !this[`is${this.drawType}InRing`](layerItem) && this.removeOverlay(layerItem));\n },\n /** 清除单个覆盖物(或 不符合区域范围的覆盖物 */\n removeOverlay(layerItem) {\n this.amap.remove(layerItem);\n this.$message.error('未在区域范围内,请重新描绘!');\n try {\n const i = this.drawLayers.findIndex(layer => layer.getExtData() == layerItem.getExtData());\n this.drawLayers.splice(i, 1);\n } catch {\n this.drawLayers = null;\n this.drawLayersInfo = {};\n }\n },\n /** 根据类型处理不同数据 */\n setDrawLayers(drawType) {\n const type = {\n point: 'marker',\n line: 'polyline',\n polygon: 'polygon'\n };\n\n /** 图层基础配置 */\n const drawOptions = drawType == 'point' ? {\n anchor: 'bottom-center',\n icon: layers.setIcon(this.drawIcon)\n } : {\n strokeWeight: 8\n };\n this.drawMouseTool[type[drawType]]({\n ...drawOptions,\n ...this.drawOptions\n });\n },\n /** 赋值不同图层数据 */\n assignDrawLayers(drawType) {\n if (drawType == 'point') {\n const {\n lng,\n lat\n } = this.drawLayers.getPosition();\n const position = {\n longitude: lng,\n latitude: lat\n };\n methods.getMapAddress(position, address => {\n this.drawLayersInfo = {\n ...position,\n ...address\n };\n });\n return;\n }\n const range = this.drawLayers.getPath().map(({\n lng,\n lat\n }) => [lng, lat]);\n this.drawLayersInfo = {\n range\n };\n },\n /** 回显不同类型图层 */\n echoDrawLayers(drawType) {\n const drawLayersItem = (drawItem, type, i = 0) => {\n // && drawItem.latitude && drawItem.longitude 忘记当时为什么加这个了 后续在想\n if (drawItem && this.amap) {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = layers.setMarker(this.drawIcon, {\n position: [longitude, latitude],\n ...setOptions\n });\n } else {\n const options = {\n path: range,\n strokeWeight: 8,\n ...setOptions\n };\n layersItem = type == 'line' ? new AMap.Polyline(options) : new AMap.Polygon(options);\n }\n layersItem.setMap(this.amap);\n this.amap.setFitView();\n }\n };\n if (!this.isExhibition) {\n drawLayersItem(this.drawLayersInfo, drawType);\n return;\n }\n if (this.drawInfoAll) {\n for (let key in this.drawInfoAll) {\n const isArray = Array.isArray(this.drawInfoAll[key]);\n isArray ? this.drawInfoAll[key].forEach((drawItem, i) => {\n drawLayersItem(drawItem, key, i);\n }) : drawLayersItem(this.drawInfoAll[key], key);\n }\n return;\n }\n drawLayersItem(this.drawLayersInfo, drawType);\n }\n },\n render(h) {\n const {\n drawEl,\n drawIcon,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose\n } = this;\n return h(\"div\", {\n \"class\": \"AmapDraw\"\n }, [!isExhibition && h(_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n \"props\": {\n ...{\n drawIcon,\n buttonProps\n }\n },\n \"on\": {\n ...{\n searchReset: AmapDrawClear,\n searchChoose\n }\n }\n }), h(\"div\", {\n \"attrs\": {\n \"id\": drawEl\n }\n })]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapDraw);\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } }, 1);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
|
|
8717
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: function() { return /* binding */ AmapDrawProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.every.js */ \"./node_modules/core-js/modules/es.iterator.every.js\");\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _AmapDraw_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AmapDraw.less */ \"./plugins/lib/amap/AmapDraw.less\");\n\n\n\n\n\n\n\n\nconst amap = (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\nconst {\n AMap,\n methods,\n layers\n} = amap;\n\nconst AmapDrawProps = {\n /** drawEl为地图容器实例名称 */\n drawEl: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('AmapDraw'),\n /** drawType为绘制类型\r\n * 可选值(point点 | line线 | polygon面)\r\n */\n drawType: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('point'),\n /** 绘制图标 (只在point类型下生效 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].any.def('http://api.qxfnkj.com:8090/poi/poi-marker-default.png'),\n /** drawCount为绘制物绘制个数 */\n drawCount: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].number.def(1),\n /** drawOptions为绘制物配置项 */\n drawOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** drawInfo为绘制物信息 */\n drawInfo: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].array]),\n /** drawInfoAll为所有不同类型绘制物信息(用于回显地图图层)\r\n * 格式: { point: ([]||{}), line: ([]||{}) }\r\n */\n drawInfoAll: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object,\n /** 限制区域 */\n drawLimitArea: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string]),\n /** 限制区域样式配置 */\n drawLimitAreaOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** 是否为纯地图展示数据 */\n isExhibition: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].bool.def(false)\n};\nconst AmapDraw = {\n name: 'AmapDraw',\n props: AmapDrawProps,\n data() {\n return {\n amap: null,\n drawArea: null,\n drawLayers: null,\n drawMouseTool: null,\n buttonProps: [],\n drawButtonProps: [{\n type: 'primary',\n text: '绘制',\n event: {\n click: this.AmapDraw\n }\n }, {\n text: '清除',\n event: {\n click: this.AmapDrawClear\n }\n }],\n saveButtonProps: [{\n type: 'primary',\n text: '保存',\n event: {\n click: this.AmapDrawSave\n }\n }, {\n text: '取消',\n event: {\n click: this.AmapDrawReset\n }\n }]\n };\n },\n computed: {\n drawLayersInfo: {\n get() {\n return this.drawInfo;\n },\n set(newValue) {\n this.$emit('getAMapLayersInfo', newValue);\n }\n }\n },\n watch: {\n drawInfo: {\n handler(newVal, oldVal) {\n const newValue = this.drawLayersInfo;\n newVal && this.echoDrawLayers(this.drawType);\n },\n deep: true\n },\n drawInfoAll(newValue) {\n newValue && this.echoDrawLayers();\n },\n drawOptions(newValue) {\n /** 检测options覆盖物配置是否更改,更改后要同步到地图上 */\n Object.keys(newValue).length && this.setOverlayOptions(newValue);\n },\n drawLimitArea(newValue) {\n newValue && this.setDrawLimitArea();\n }\n },\n mounted() {\n this.amap = amap.initMap({\n el: this.drawEl\n });\n this.buttonProps = [].concat(this.drawButtonProps);\n this.echoDrawLayers(this.drawType);\n /** 如果有限制区域,则描绘在地图上 */\n this.drawLimitArea && this.setDrawLimitArea();\n },\n destroyed() {\n this.AmapDrawClear();\n },\n methods: {\n /** 绘制 */\n AmapDraw() {\n this.buttonProps = [].concat(this.saveButtonProps);\n this.drawMouseTool = new AMap.MouseTool(this.amap);\n this.AmapDrawClear();\n this.setDrawLayers(this.drawType);\n this.drawMouseTool.on('draw', ({\n obj\n }) => {\n if (this.drawArea && !this[`is${this.drawType}InRing`](obj)) return this.amap.remove(obj), this.$message.error('未在范围内描绘!');\n /** 暂未支持一次性绘制多个 */\n this.drawCount > 1 ? (this.drawLayers = this.drawLayers || [], this.drawLayers.push(obj)) : this.drawLayers = obj;\n if (this.drawLayers && (this.drawLayers.length == this.drawCount || this.drawCount == 1)) {\n return this.drawMouseTool.close();\n }\n });\n },\n /** 清空绘制 / 清空搜索 */\n AmapDrawClear() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && this.amap.remove(layerItem));\n // this.amap.clearMap()\n this.drawLayers = null;\n this.drawLayersInfo = {};\n },\n /** 保存当前绘制 */\n AmapDrawSave() {\n this.assignDrawLayers(this.drawType);\n this.buttonProps = [].concat(this.drawButtonProps);\n },\n /** 取消当前绘制 */\n AmapDrawReset() {\n this.buttonProps = [].concat(this.drawButtonProps);\n this.AmapDrawClear();\n },\n /** 搜索地址 */\n searchChoose(searchMarker, searchInfo) {\n this.AmapDrawClear();\n searchMarker.setMap(this.amap);\n this.amap.setZoomAndCenter(15, searchMarker.getPosition());\n this.drawType == 'point' && (this.drawLayersInfo = searchInfo);\n // this.$emit('getAMapLayersInfo', this.drawLayersInfo)\n },\n /** 检测覆盖物配置信息并同步 */\n setOverlayOptions(options) {\n if (!this.drawLayers) return;\n this.drawCount > 1 ? this.drawLayers.forEach(drawItem => drawItem.setOptions(options)) : this.drawLayers.setOptions(options);\n },\n /** 绘制限定区域 */\n setDrawLimitArea() {\n let areaRange = [];\n try {\n areaRange = JSON.parse(this.drawLimitArea);\n } catch {\n areaRange = this.drawLimitArea;\n }\n this.drawArea && this.amap.remove(this.drawArea);\n /** 判断目前地图上存在的所绘制覆盖物是否在限制范围内 */\n this.setMapArea(areaRange);\n this.judgeOverlays();\n },\n /** 绘制地图区域范围 */\n setMapArea(jurisdictionRange) {\n this.drawArea = new AMap.Polygon({\n map: this.amap,\n path: jurisdictionRange,\n extData: 'Area',\n strokeWeight: 6,\n ...this.drawLimitAreaOptions\n });\n const {\n lng,\n lat\n } = this.drawArea.getBounds().getCenter();\n this.amap.setZoomAndCenter(15, [lng, lat]);\n },\n /** 判断一个线段是否在面内 */\n islineInRing(polyline) {\n const paths = polyline.getPath();\n return paths.every(pointItem => this.ispointInRing(pointItem));\n },\n /** 判断一个点是否在面内 */\n ispointInRing(point) {\n let position;\n try {\n position = point.getPosition();\n } catch {\n position = point;\n }\n return AMap.GeometryUtil.isPointInRing(position, this.drawArea.getPath());\n },\n /** 判断地图上所覆盖物是否在限制范围内 */\n judgeOverlays() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && !this[`is${this.drawType}InRing`](layerItem) && this.removeOverlay(layerItem));\n },\n /** 清除单个覆盖物(或 不符合区域范围的覆盖物 */\n removeOverlay(layerItem) {\n this.amap.remove(layerItem);\n this.$message.error('未在区域范围内,请重新描绘!');\n try {\n const i = this.drawLayers.findIndex(layer => layer.getExtData() == layerItem.getExtData());\n this.drawLayers.splice(i, 1);\n } catch {\n this.drawLayers = null;\n this.drawLayersInfo = {};\n }\n },\n /** 根据类型处理不同数据 */\n setDrawLayers(drawType) {\n const type = {\n point: 'marker',\n line: 'polyline',\n polygon: 'polygon'\n };\n\n /** 图层基础配置 */\n const drawOptions = drawType == 'point' ? {\n anchor: 'bottom-center',\n icon: layers.setIcon(this.drawIcon)\n } : {\n strokeWeight: 8\n };\n this.drawMouseTool[type[drawType]]({\n ...drawOptions,\n ...this.drawOptions\n });\n },\n /** 赋值不同图层数据 */\n assignDrawLayers(drawType) {\n if (drawType == 'point') {\n const {\n lng,\n lat\n } = this.drawLayers.getPosition();\n const position = {\n longitude: lng,\n latitude: lat\n };\n methods.getMapAddress(position, address => {\n this.drawLayersInfo = {\n ...position,\n ...address\n };\n });\n return;\n }\n const range = this.drawLayers.getPath().map(({\n lng,\n lat\n }) => [lng, lat]);\n this.drawLayersInfo = {\n range\n };\n },\n /** 回显不同类型图层 */\n echoDrawLayers(drawType) {\n const drawLayersItem = (drawItem, type, i = 0) => {\n // && drawItem.latitude && drawItem.longitude 忘记当时为什么加这个了 后续在想\n if (drawItem && this.amap) {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = layers.setMarker(this.drawIcon, {\n position: [longitude, latitude],\n ...setOptions\n });\n } else {\n const options = {\n path: range,\n strokeWeight: 8,\n ...setOptions\n };\n layersItem = type == 'line' ? new AMap.Polyline(options) : new AMap.Polygon(options);\n }\n layersItem.setMap(this.amap);\n this.amap.setFitView();\n }\n };\n if (!this.isExhibition) {\n drawLayersItem(this.drawLayersInfo, drawType);\n return;\n }\n if (this.drawInfoAll) {\n for (let key in this.drawInfoAll) {\n const isArray = Array.isArray(this.drawInfoAll[key]);\n isArray ? this.drawInfoAll[key].forEach((drawItem, i) => {\n drawLayersItem(drawItem, key, i);\n }) : drawLayersItem(this.drawInfoAll[key], key);\n }\n return;\n }\n drawLayersItem(this.drawLayersInfo, drawType);\n }\n },\n render(h) {\n const {\n drawEl,\n drawIcon,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose\n } = this;\n return h(\"div\", {\n \"class\": \"AmapDraw\"\n }, [!isExhibition && h(_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n \"props\": {\n ...{\n drawIcon,\n buttonProps\n }\n },\n \"on\": {\n ...{\n searchReset: AmapDrawClear,\n searchChoose\n }\n }\n }), h(\"div\", {\n \"attrs\": {\n \"id\": drawEl\n }\n })]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
|
|
8718
8718
|
|
|
8719
8719
|
/***/ }),
|
|
8720
8720
|
|
|
@@ -8722,10 +8722,10 @@ eval("__webpack_require__.a(module, async function (__webpack_handle_async_depen
|
|
|
8722
8722
|
/*!**********************************************************!*\
|
|
8723
8723
|
!*** ./plugins/lib/amap/components/AmapSearch/index.jsx ***!
|
|
8724
8724
|
\**********************************************************/
|
|
8725
|
-
/***/ (function(
|
|
8725
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8726
8726
|
|
|
8727
8727
|
"use strict";
|
|
8728
|
-
eval("__webpack_require__.
|
|
8728
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapSearchProps: function() { return /* binding */ AmapSearchProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../index */ \"./plugins/lib/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/amap/components/AmapSearch/index.less\");\n\n\n\n\n\n\nconst {\n ASelectCustom\n} = _index__WEBPACK_IMPORTED_MODULE_2__.FormComp;\nconst {\n methods,\n layers\n} = (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_3__.getAMapInstance)();\nconst AmapSearchProps = {\n /** 搜索后绘制图标 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__[\"default\"].any,\n buttonProps: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__[\"default\"].array.def([])\n};\nconst AmapSearch = {\n name: 'AmapSearch',\n props: AmapSearchProps,\n data() {\n return {\n searchMarker: null,\n addressValue: undefined,\n selectOptions: []\n };\n },\n methods: {\n /** 选择地址 */\n changeHandle() {\n if (!this.addressValue) return this.$emit('searchReset', this.searchMarker), this.searchMarker = null;\n const {\n label,\n location\n } = this.selectOptions.find(({\n id\n }) => id == this.addressValue);\n const searchInfo = {\n longitude: location.lng,\n latitude: location.lat,\n address: label\n };\n this.searchMarker = layers.setMarker(this.drawIcon, {\n position: [location.lng, location.lat]\n });\n this.$emit('searchChoose', this.searchMarker, searchInfo);\n },\n /** 根据搜索框搜索地址 */\n searchHandle(keyword) {\n methods.getMapSearch(keyword, addressOptions => {\n this.selectOptions = addressOptions;\n });\n }\n },\n render(h) {\n const {\n selectOptions,\n changeHandle,\n searchHandle,\n buttonProps\n } = this;\n const props = {\n valueKey: 'id',\n labelKey: 'label',\n options: selectOptions,\n placeholder: '请输入目的地进行搜索'\n };\n return h(\"div\", {\n \"class\": \"AmapDraw__Search\"\n }, [h(ASelectCustom, {\n \"props\": {\n ...props\n },\n \"on\": {\n ...{\n change: changeHandle,\n search: searchHandle\n }\n },\n \"model\": {\n value: this.addressValue,\n callback: $$v => {\n this.addressValue = $$v;\n }\n }\n }), buttonProps && h(_index__WEBPACK_IMPORTED_MODULE_2__.Button, {\n \"attrs\": {\n \"buttonProps\": buttonProps\n },\n \"class\": \"AmapDraw__Search__Button\"\n })]);\n }\n};\nAmapSearch.install = function (Vue) {\n Vue.component('AmapSearch', AmapSearch);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapSearch);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/components/AmapSearch/index.jsx?");
|
|
8729
8729
|
|
|
8730
8730
|
/***/ }),
|
|
8731
8731
|
|
|
@@ -8733,10 +8733,10 @@ eval("__webpack_require__.a(module, async function (__webpack_handle_async_depen
|
|
|
8733
8733
|
/*!***********************************!*\
|
|
8734
8734
|
!*** ./plugins/lib/amap/index.js ***!
|
|
8735
8735
|
\***********************************/
|
|
8736
|
-
/***/ (function(
|
|
8736
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8737
8737
|
|
|
8738
8738
|
"use strict";
|
|
8739
|
-
eval("__webpack_require__.
|
|
8739
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDraw: function() { return /* reexport safe */ _AmapDraw_jsx__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _AmapDraw_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AmapDraw.jsx */ \"./plugins/lib/amap/AmapDraw.jsx\");\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* 地图打点 */\n\n\n/* 地图搜索 */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n AmapSearch: _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/index.js?");
|
|
8740
8740
|
|
|
8741
8741
|
/***/ }),
|
|
8742
8742
|
|
|
@@ -8876,10 +8876,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
8876
8876
|
/*!******************************!*\
|
|
8877
8877
|
!*** ./plugins/lib/index.js ***!
|
|
8878
8878
|
\******************************/
|
|
8879
|
-
/***/ (function(
|
|
8879
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8880
8880
|
|
|
8881
8881
|
"use strict";
|
|
8882
|
-
eval("__webpack_require__.
|
|
8882
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapComp: function() { return /* reexport safe */ _amap__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; },\n/* harmony export */ AmapDraw: function() { return /* reexport safe */ _amap__WEBPACK_IMPORTED_MODULE_13__.AmapDraw; },\n/* harmony export */ Avatar: function() { return /* reexport safe */ _avatar__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ Brower: function() { return /* reexport safe */ _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; },\n/* harmony export */ Button: function() { return /* reexport safe */ _button__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ DateTime: function() { return /* reexport safe */ _dateTime__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ DescriptionsList: function() { return /* reexport safe */ _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; },\n/* harmony export */ Directory: function() { return /* reexport safe */ _tree__WEBPACK_IMPORTED_MODULE_7__.Directory; },\n/* harmony export */ FormComp: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ IframePage: function() { return /* reexport safe */ _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ Modal: function() { return /* reexport safe */ _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ Model: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__.Model; },\n/* harmony export */ MultiTab: function() { return /* reexport safe */ _multiTab__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ Search: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__.Search; },\n/* harmony export */ SvgIcon: function() { return /* reexport safe */ _svgIcon__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ Table: function() { return /* reexport safe */ _table__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */ Tree: function() { return /* reexport safe */ _tree__WEBPACK_IMPORTED_MODULE_7__.Tree; },\n/* harmony export */ Weather: function() { return /* reexport safe */ _weather__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./table */ \"./plugins/lib/table/index.js\");\n/* harmony import */ var _form__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./form */ \"./plugins/lib/form/index.js\");\n/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./button */ \"./plugins/lib/button/index.js\");\n/* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./avatar */ \"./plugins/lib/avatar/index.js\");\n/* harmony import */ var _svgIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgIcon */ \"./plugins/lib/svgIcon/index.js\");\n/* harmony import */ var _tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree */ \"./plugins/lib/tree/index.js\");\n/* harmony import */ var _dateTime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dateTime */ \"./plugins/lib/dateTime/index.js\");\n/* harmony import */ var _weather__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./weather */ \"./plugins/lib/weather/index.js\");\n/* harmony import */ var _multiTab__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./multiTab */ \"./plugins/lib/multiTab/index.js\");\n/* harmony import */ var _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./iframe/index.jsx */ \"./plugins/lib/iframe/index.jsx\");\n/* harmony import */ var _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modal/index.jsx */ \"./plugins/lib/modal/index.jsx\");\n/* harmony import */ var _amap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./amap */ \"./plugins/lib/amap/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./descriptions/index.jsx */ \"./plugins/lib/descriptions/index.jsx\");\n\n\n// 按需引入ant-design-vue必要指令组件\n// import './lazy_use'\n\n// 将组件库中定义的所有组件引入并导出\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst components = {\n Table: _table__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Model: _form__WEBPACK_IMPORTED_MODULE_3__.Model,\n Search: _form__WEBPACK_IMPORTED_MODULE_3__.Search,\n FormComp: _form__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n Button: _button__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n Avatar: _avatar__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n SvgIcon: _svgIcon__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n Tree: _tree__WEBPACK_IMPORTED_MODULE_7__.Tree,\n Directory: _tree__WEBPACK_IMPORTED_MODULE_7__.Directory,\n DateTime: _dateTime__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n Weather: _weather__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n MultiTab: _multiTab__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n IframePage: _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n Modal: _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n AmapComp: _amap__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n AmapDraw: _amap__WEBPACK_IMPORTED_MODULE_13__.AmapDraw,\n Brower: _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n DescriptionsList: _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__[\"default\"]\n};\nconst install = function (Vue) {\n if (install.installed) return;\n Object.keys(components).forEach(component => {\n Vue.component(components[component].name, components[component]);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n install,\n ...components\n});\n\n//# sourceURL=webpack://mui/./plugins/lib/index.js?");
|
|
8883
8883
|
|
|
8884
8884
|
/***/ }),
|
|
8885
8885
|
|
|
@@ -12143,75 +12143,6 @@ eval("__webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modul
|
|
|
12143
12143
|
/******/ }
|
|
12144
12144
|
/******/
|
|
12145
12145
|
/************************************************************************/
|
|
12146
|
-
/******/ /* webpack/runtime/async module */
|
|
12147
|
-
/******/ !function() {
|
|
12148
|
-
/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
|
|
12149
|
-
/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
|
|
12150
|
-
/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
|
|
12151
|
-
/******/ var resolveQueue = function(queue) {
|
|
12152
|
-
/******/ if(queue && queue.d < 1) {
|
|
12153
|
-
/******/ queue.d = 1;
|
|
12154
|
-
/******/ queue.forEach(function(fn) { fn.r--; });
|
|
12155
|
-
/******/ queue.forEach(function(fn) { fn.r-- ? fn.r++ : fn(); });
|
|
12156
|
-
/******/ }
|
|
12157
|
-
/******/ }
|
|
12158
|
-
/******/ var wrapDeps = function(deps) { return deps.map(function(dep) {
|
|
12159
|
-
/******/ if(dep !== null && typeof dep === "object") {
|
|
12160
|
-
/******/ if(dep[webpackQueues]) return dep;
|
|
12161
|
-
/******/ if(dep.then) {
|
|
12162
|
-
/******/ var queue = [];
|
|
12163
|
-
/******/ queue.d = 0;
|
|
12164
|
-
/******/ dep.then(function(r) {
|
|
12165
|
-
/******/ obj[webpackExports] = r;
|
|
12166
|
-
/******/ resolveQueue(queue);
|
|
12167
|
-
/******/ }, function(e) {
|
|
12168
|
-
/******/ obj[webpackError] = e;
|
|
12169
|
-
/******/ resolveQueue(queue);
|
|
12170
|
-
/******/ });
|
|
12171
|
-
/******/ var obj = {};
|
|
12172
|
-
/******/ obj[webpackQueues] = function(fn) { fn(queue); };
|
|
12173
|
-
/******/ return obj;
|
|
12174
|
-
/******/ }
|
|
12175
|
-
/******/ }
|
|
12176
|
-
/******/ var ret = {};
|
|
12177
|
-
/******/ ret[webpackQueues] = function() {};
|
|
12178
|
-
/******/ ret[webpackExports] = dep;
|
|
12179
|
-
/******/ return ret;
|
|
12180
|
-
/******/ }); };
|
|
12181
|
-
/******/ __webpack_require__.a = function(module, body, hasAwait) {
|
|
12182
|
-
/******/ var queue;
|
|
12183
|
-
/******/ hasAwait && ((queue = []).d = -1);
|
|
12184
|
-
/******/ var depQueues = new Set();
|
|
12185
|
-
/******/ var exports = module.exports;
|
|
12186
|
-
/******/ var currentDeps;
|
|
12187
|
-
/******/ var outerResolve;
|
|
12188
|
-
/******/ var reject;
|
|
12189
|
-
/******/ var promise = new Promise(function(resolve, rej) {
|
|
12190
|
-
/******/ reject = rej;
|
|
12191
|
-
/******/ outerResolve = resolve;
|
|
12192
|
-
/******/ });
|
|
12193
|
-
/******/ promise[webpackExports] = exports;
|
|
12194
|
-
/******/ promise[webpackQueues] = function(fn) { queue && fn(queue), depQueues.forEach(fn), promise["catch"](function() {}); };
|
|
12195
|
-
/******/ module.exports = promise;
|
|
12196
|
-
/******/ body(function(deps) {
|
|
12197
|
-
/******/ currentDeps = wrapDeps(deps);
|
|
12198
|
-
/******/ var fn;
|
|
12199
|
-
/******/ var getResult = function() { return currentDeps.map(function(d) {
|
|
12200
|
-
/******/ if(d[webpackError]) throw d[webpackError];
|
|
12201
|
-
/******/ return d[webpackExports];
|
|
12202
|
-
/******/ }); }
|
|
12203
|
-
/******/ var promise = new Promise(function(resolve) {
|
|
12204
|
-
/******/ fn = function() { resolve(getResult); };
|
|
12205
|
-
/******/ fn.r = 0;
|
|
12206
|
-
/******/ var fnQueue = function(q) { q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))); };
|
|
12207
|
-
/******/ currentDeps.map(function(dep) { dep[webpackQueues](fnQueue); });
|
|
12208
|
-
/******/ });
|
|
12209
|
-
/******/ return fn.r ? promise : getResult();
|
|
12210
|
-
/******/ }, function(err) { (err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue); });
|
|
12211
|
-
/******/ queue && queue.d < 0 && (queue.d = 0);
|
|
12212
|
-
/******/ };
|
|
12213
|
-
/******/ }();
|
|
12214
|
-
/******/
|
|
12215
12146
|
/******/ /* webpack/runtime/compat get default export */
|
|
12216
12147
|
/******/ !function() {
|
|
12217
12148
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
package/dist/index.umd.js
CHANGED
|
@@ -8711,10 +8711,10 @@ eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source cod
|
|
|
8711
8711
|
/*!***************************************!*\
|
|
8712
8712
|
!*** ./plugins/lib/amap/AmapDraw.jsx ***!
|
|
8713
8713
|
\***************************************/
|
|
8714
|
-
/***/ (function(
|
|
8714
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8715
8715
|
|
|
8716
8716
|
"use strict";
|
|
8717
|
-
eval("__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: function() { return /* binding */ AmapDrawProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.every.js */ \"./node_modules/core-js/modules/es.iterator.every.js\");\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _AmapDraw_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AmapDraw.less */ \"./plugins/lib/amap/AmapDraw.less\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__]);\n_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n\n\n\n\nconst amap = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\nconst {\n AMap,\n methods,\n layers\n} = amap;\n\nconst AmapDrawProps = {\n /** drawEl为地图容器实例名称 */\n drawEl: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('AmapDraw'),\n /** drawType为绘制类型\r\n * 可选值(point点 | line线 | polygon面)\r\n */\n drawType: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('point'),\n /** 绘制图标 (只在point类型下生效 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].any.def('http://api.qxfnkj.com:8090/poi/poi-marker-default.png'),\n /** drawCount为绘制物绘制个数 */\n drawCount: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].number.def(1),\n /** drawOptions为绘制物配置项 */\n drawOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** drawInfo为绘制物信息 */\n drawInfo: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].array]),\n /** drawInfoAll为所有不同类型绘制物信息(用于回显地图图层)\r\n * 格式: { point: ([]||{}), line: ([]||{}) }\r\n */\n drawInfoAll: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object,\n /** 限制区域 */\n drawLimitArea: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string]),\n /** 限制区域样式配置 */\n drawLimitAreaOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** 是否为纯地图展示数据 */\n isExhibition: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].bool.def(false)\n};\nconst AmapDraw = {\n name: 'AmapDraw',\n props: AmapDrawProps,\n data() {\n return {\n amap: null,\n drawArea: null,\n drawLayers: null,\n drawMouseTool: null,\n buttonProps: [],\n drawButtonProps: [{\n type: 'primary',\n text: '绘制',\n event: {\n click: this.AmapDraw\n }\n }, {\n text: '清除',\n event: {\n click: this.AmapDrawClear\n }\n }],\n saveButtonProps: [{\n type: 'primary',\n text: '保存',\n event: {\n click: this.AmapDrawSave\n }\n }, {\n text: '取消',\n event: {\n click: this.AmapDrawReset\n }\n }]\n };\n },\n computed: {\n drawLayersInfo: {\n get() {\n return this.drawInfo;\n },\n set(newValue) {\n this.$emit('getAMapLayersInfo', newValue);\n }\n }\n },\n watch: {\n drawInfo: {\n handler(newVal, oldVal) {\n const newValue = this.drawLayersInfo;\n newVal && this.echoDrawLayers(this.drawType);\n },\n deep: true\n },\n drawInfoAll(newValue) {\n newValue && this.echoDrawLayers();\n },\n drawOptions(newValue) {\n /** 检测options覆盖物配置是否更改,更改后要同步到地图上 */\n Object.keys(newValue).length && this.setOverlayOptions(newValue);\n },\n drawLimitArea(newValue) {\n newValue && this.setDrawLimitArea();\n }\n },\n mounted() {\n this.amap = amap.initMap({\n el: this.drawEl\n });\n this.buttonProps = [].concat(this.drawButtonProps);\n this.echoDrawLayers(this.drawType);\n /** 如果有限制区域,则描绘在地图上 */\n this.drawLimitArea && this.setDrawLimitArea();\n },\n destroyed() {\n this.AmapDrawClear();\n },\n methods: {\n /** 绘制 */\n AmapDraw() {\n this.buttonProps = [].concat(this.saveButtonProps);\n this.drawMouseTool = new AMap.MouseTool(this.amap);\n this.AmapDrawClear();\n this.setDrawLayers(this.drawType);\n this.drawMouseTool.on('draw', ({\n obj\n }) => {\n if (this.drawArea && !this[`is${this.drawType}InRing`](obj)) return this.amap.remove(obj), this.$message.error('未在范围内描绘!');\n /** 暂未支持一次性绘制多个 */\n this.drawCount > 1 ? (this.drawLayers = this.drawLayers || [], this.drawLayers.push(obj)) : this.drawLayers = obj;\n if (this.drawLayers && (this.drawLayers.length == this.drawCount || this.drawCount == 1)) {\n return this.drawMouseTool.close();\n }\n });\n },\n /** 清空绘制 / 清空搜索 */\n AmapDrawClear() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && this.amap.remove(layerItem));\n // this.amap.clearMap()\n this.drawLayers = null;\n this.drawLayersInfo = {};\n },\n /** 保存当前绘制 */\n AmapDrawSave() {\n this.assignDrawLayers(this.drawType);\n this.buttonProps = [].concat(this.drawButtonProps);\n },\n /** 取消当前绘制 */\n AmapDrawReset() {\n this.buttonProps = [].concat(this.drawButtonProps);\n this.AmapDrawClear();\n },\n /** 搜索地址 */\n searchChoose(searchMarker, searchInfo) {\n this.AmapDrawClear();\n searchMarker.setMap(this.amap);\n this.amap.setZoomAndCenter(15, searchMarker.getPosition());\n this.drawType == 'point' && (this.drawLayersInfo = searchInfo);\n // this.$emit('getAMapLayersInfo', this.drawLayersInfo)\n },\n /** 检测覆盖物配置信息并同步 */\n setOverlayOptions(options) {\n if (!this.drawLayers) return;\n this.drawCount > 1 ? this.drawLayers.forEach(drawItem => drawItem.setOptions(options)) : this.drawLayers.setOptions(options);\n },\n /** 绘制限定区域 */\n setDrawLimitArea() {\n let areaRange = [];\n try {\n areaRange = JSON.parse(this.drawLimitArea);\n } catch {\n areaRange = this.drawLimitArea;\n }\n this.drawArea && this.amap.remove(this.drawArea);\n /** 判断目前地图上存在的所绘制覆盖物是否在限制范围内 */\n this.setMapArea(areaRange);\n this.judgeOverlays();\n },\n /** 绘制地图区域范围 */\n setMapArea(jurisdictionRange) {\n this.drawArea = new AMap.Polygon({\n map: this.amap,\n path: jurisdictionRange,\n extData: 'Area',\n strokeWeight: 6,\n ...this.drawLimitAreaOptions\n });\n const {\n lng,\n lat\n } = this.drawArea.getBounds().getCenter();\n this.amap.setZoomAndCenter(15, [lng, lat]);\n },\n /** 判断一个线段是否在面内 */\n islineInRing(polyline) {\n const paths = polyline.getPath();\n return paths.every(pointItem => this.ispointInRing(pointItem));\n },\n /** 判断一个点是否在面内 */\n ispointInRing(point) {\n let position;\n try {\n position = point.getPosition();\n } catch {\n position = point;\n }\n return AMap.GeometryUtil.isPointInRing(position, this.drawArea.getPath());\n },\n /** 判断地图上所覆盖物是否在限制范围内 */\n judgeOverlays() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && !this[`is${this.drawType}InRing`](layerItem) && this.removeOverlay(layerItem));\n },\n /** 清除单个覆盖物(或 不符合区域范围的覆盖物 */\n removeOverlay(layerItem) {\n this.amap.remove(layerItem);\n this.$message.error('未在区域范围内,请重新描绘!');\n try {\n const i = this.drawLayers.findIndex(layer => layer.getExtData() == layerItem.getExtData());\n this.drawLayers.splice(i, 1);\n } catch {\n this.drawLayers = null;\n this.drawLayersInfo = {};\n }\n },\n /** 根据类型处理不同数据 */\n setDrawLayers(drawType) {\n const type = {\n point: 'marker',\n line: 'polyline',\n polygon: 'polygon'\n };\n\n /** 图层基础配置 */\n const drawOptions = drawType == 'point' ? {\n anchor: 'bottom-center',\n icon: layers.setIcon(this.drawIcon)\n } : {\n strokeWeight: 8\n };\n this.drawMouseTool[type[drawType]]({\n ...drawOptions,\n ...this.drawOptions\n });\n },\n /** 赋值不同图层数据 */\n assignDrawLayers(drawType) {\n if (drawType == 'point') {\n const {\n lng,\n lat\n } = this.drawLayers.getPosition();\n const position = {\n longitude: lng,\n latitude: lat\n };\n methods.getMapAddress(position, address => {\n this.drawLayersInfo = {\n ...position,\n ...address\n };\n });\n return;\n }\n const range = this.drawLayers.getPath().map(({\n lng,\n lat\n }) => [lng, lat]);\n this.drawLayersInfo = {\n range\n };\n },\n /** 回显不同类型图层 */\n echoDrawLayers(drawType) {\n const drawLayersItem = (drawItem, type, i = 0) => {\n // && drawItem.latitude && drawItem.longitude 忘记当时为什么加这个了 后续在想\n if (drawItem && this.amap) {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = layers.setMarker(this.drawIcon, {\n position: [longitude, latitude],\n ...setOptions\n });\n } else {\n const options = {\n path: range,\n strokeWeight: 8,\n ...setOptions\n };\n layersItem = type == 'line' ? new AMap.Polyline(options) : new AMap.Polygon(options);\n }\n layersItem.setMap(this.amap);\n this.amap.setFitView();\n }\n };\n if (!this.isExhibition) {\n drawLayersItem(this.drawLayersInfo, drawType);\n return;\n }\n if (this.drawInfoAll) {\n for (let key in this.drawInfoAll) {\n const isArray = Array.isArray(this.drawInfoAll[key]);\n isArray ? this.drawInfoAll[key].forEach((drawItem, i) => {\n drawLayersItem(drawItem, key, i);\n }) : drawLayersItem(this.drawInfoAll[key], key);\n }\n return;\n }\n drawLayersItem(this.drawLayersInfo, drawType);\n }\n },\n render(h) {\n const {\n drawEl,\n drawIcon,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose\n } = this;\n return h(\"div\", {\n \"class\": \"AmapDraw\"\n }, [!isExhibition && h(_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n \"props\": {\n ...{\n drawIcon,\n buttonProps\n }\n },\n \"on\": {\n ...{\n searchReset: AmapDrawClear,\n searchChoose\n }\n }\n }), h(\"div\", {\n \"attrs\": {\n \"id\": drawEl\n }\n })]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapDraw);\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } }, 1);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
|
|
8717
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: function() { return /* binding */ AmapDrawProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.every.js */ \"./node_modules/core-js/modules/es.iterator.every.js\");\n/* harmony import */ var core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_every_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _AmapDraw_less__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AmapDraw.less */ \"./plugins/lib/amap/AmapDraw.less\");\n\n\n\n\n\n\n\n\nconst amap = (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\nconst {\n AMap,\n methods,\n layers\n} = amap;\n\nconst AmapDrawProps = {\n /** drawEl为地图容器实例名称 */\n drawEl: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('AmapDraw'),\n /** drawType为绘制类型\r\n * 可选值(point点 | line线 | polygon面)\r\n */\n drawType: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string.def('point'),\n /** 绘制图标 (只在point类型下生效 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].any.def('http://api.qxfnkj.com:8090/poi/poi-marker-default.png'),\n /** drawCount为绘制物绘制个数 */\n drawCount: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].number.def(1),\n /** drawOptions为绘制物配置项 */\n drawOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** drawInfo为绘制物信息 */\n drawInfo: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].array]),\n /** drawInfoAll为所有不同类型绘制物信息(用于回显地图图层)\r\n * 格式: { point: ([]||{}), line: ([]||{}) }\r\n */\n drawInfoAll: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object,\n /** 限制区域 */\n drawLimitArea: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].string]),\n /** 限制区域样式配置 */\n drawLimitAreaOptions: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].object.def({}),\n /** 是否为纯地图展示数据 */\n isExhibition: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_8__[\"default\"].bool.def(false)\n};\nconst AmapDraw = {\n name: 'AmapDraw',\n props: AmapDrawProps,\n data() {\n return {\n amap: null,\n drawArea: null,\n drawLayers: null,\n drawMouseTool: null,\n buttonProps: [],\n drawButtonProps: [{\n type: 'primary',\n text: '绘制',\n event: {\n click: this.AmapDraw\n }\n }, {\n text: '清除',\n event: {\n click: this.AmapDrawClear\n }\n }],\n saveButtonProps: [{\n type: 'primary',\n text: '保存',\n event: {\n click: this.AmapDrawSave\n }\n }, {\n text: '取消',\n event: {\n click: this.AmapDrawReset\n }\n }]\n };\n },\n computed: {\n drawLayersInfo: {\n get() {\n return this.drawInfo;\n },\n set(newValue) {\n this.$emit('getAMapLayersInfo', newValue);\n }\n }\n },\n watch: {\n drawInfo: {\n handler(newVal, oldVal) {\n const newValue = this.drawLayersInfo;\n newVal && this.echoDrawLayers(this.drawType);\n },\n deep: true\n },\n drawInfoAll(newValue) {\n newValue && this.echoDrawLayers();\n },\n drawOptions(newValue) {\n /** 检测options覆盖物配置是否更改,更改后要同步到地图上 */\n Object.keys(newValue).length && this.setOverlayOptions(newValue);\n },\n drawLimitArea(newValue) {\n newValue && this.setDrawLimitArea();\n }\n },\n mounted() {\n this.amap = amap.initMap({\n el: this.drawEl\n });\n this.buttonProps = [].concat(this.drawButtonProps);\n this.echoDrawLayers(this.drawType);\n /** 如果有限制区域,则描绘在地图上 */\n this.drawLimitArea && this.setDrawLimitArea();\n },\n destroyed() {\n this.AmapDrawClear();\n },\n methods: {\n /** 绘制 */\n AmapDraw() {\n this.buttonProps = [].concat(this.saveButtonProps);\n this.drawMouseTool = new AMap.MouseTool(this.amap);\n this.AmapDrawClear();\n this.setDrawLayers(this.drawType);\n this.drawMouseTool.on('draw', ({\n obj\n }) => {\n if (this.drawArea && !this[`is${this.drawType}InRing`](obj)) return this.amap.remove(obj), this.$message.error('未在范围内描绘!');\n /** 暂未支持一次性绘制多个 */\n this.drawCount > 1 ? (this.drawLayers = this.drawLayers || [], this.drawLayers.push(obj)) : this.drawLayers = obj;\n if (this.drawLayers && (this.drawLayers.length == this.drawCount || this.drawCount == 1)) {\n return this.drawMouseTool.close();\n }\n });\n },\n /** 清空绘制 / 清空搜索 */\n AmapDrawClear() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && this.amap.remove(layerItem));\n // this.amap.clearMap()\n this.drawLayers = null;\n this.drawLayersInfo = {};\n },\n /** 保存当前绘制 */\n AmapDrawSave() {\n this.assignDrawLayers(this.drawType);\n this.buttonProps = [].concat(this.drawButtonProps);\n },\n /** 取消当前绘制 */\n AmapDrawReset() {\n this.buttonProps = [].concat(this.drawButtonProps);\n this.AmapDrawClear();\n },\n /** 搜索地址 */\n searchChoose(searchMarker, searchInfo) {\n this.AmapDrawClear();\n searchMarker.setMap(this.amap);\n this.amap.setZoomAndCenter(15, searchMarker.getPosition());\n this.drawType == 'point' && (this.drawLayersInfo = searchInfo);\n // this.$emit('getAMapLayersInfo', this.drawLayersInfo)\n },\n /** 检测覆盖物配置信息并同步 */\n setOverlayOptions(options) {\n if (!this.drawLayers) return;\n this.drawCount > 1 ? this.drawLayers.forEach(drawItem => drawItem.setOptions(options)) : this.drawLayers.setOptions(options);\n },\n /** 绘制限定区域 */\n setDrawLimitArea() {\n let areaRange = [];\n try {\n areaRange = JSON.parse(this.drawLimitArea);\n } catch {\n areaRange = this.drawLimitArea;\n }\n this.drawArea && this.amap.remove(this.drawArea);\n /** 判断目前地图上存在的所绘制覆盖物是否在限制范围内 */\n this.setMapArea(areaRange);\n this.judgeOverlays();\n },\n /** 绘制地图区域范围 */\n setMapArea(jurisdictionRange) {\n this.drawArea = new AMap.Polygon({\n map: this.amap,\n path: jurisdictionRange,\n extData: 'Area',\n strokeWeight: 6,\n ...this.drawLimitAreaOptions\n });\n const {\n lng,\n lat\n } = this.drawArea.getBounds().getCenter();\n this.amap.setZoomAndCenter(15, [lng, lat]);\n },\n /** 判断一个线段是否在面内 */\n islineInRing(polyline) {\n const paths = polyline.getPath();\n return paths.every(pointItem => this.ispointInRing(pointItem));\n },\n /** 判断一个点是否在面内 */\n ispointInRing(point) {\n let position;\n try {\n position = point.getPosition();\n } catch {\n position = point;\n }\n return AMap.GeometryUtil.isPointInRing(position, this.drawArea.getPath());\n },\n /** 判断地图上所覆盖物是否在限制范围内 */\n judgeOverlays() {\n this.amap.getAllOverlays().forEach(layerItem => layerItem.getExtData() != 'Area' && !this[`is${this.drawType}InRing`](layerItem) && this.removeOverlay(layerItem));\n },\n /** 清除单个覆盖物(或 不符合区域范围的覆盖物 */\n removeOverlay(layerItem) {\n this.amap.remove(layerItem);\n this.$message.error('未在区域范围内,请重新描绘!');\n try {\n const i = this.drawLayers.findIndex(layer => layer.getExtData() == layerItem.getExtData());\n this.drawLayers.splice(i, 1);\n } catch {\n this.drawLayers = null;\n this.drawLayersInfo = {};\n }\n },\n /** 根据类型处理不同数据 */\n setDrawLayers(drawType) {\n const type = {\n point: 'marker',\n line: 'polyline',\n polygon: 'polygon'\n };\n\n /** 图层基础配置 */\n const drawOptions = drawType == 'point' ? {\n anchor: 'bottom-center',\n icon: layers.setIcon(this.drawIcon)\n } : {\n strokeWeight: 8\n };\n this.drawMouseTool[type[drawType]]({\n ...drawOptions,\n ...this.drawOptions\n });\n },\n /** 赋值不同图层数据 */\n assignDrawLayers(drawType) {\n if (drawType == 'point') {\n const {\n lng,\n lat\n } = this.drawLayers.getPosition();\n const position = {\n longitude: lng,\n latitude: lat\n };\n methods.getMapAddress(position, address => {\n this.drawLayersInfo = {\n ...position,\n ...address\n };\n });\n return;\n }\n const range = this.drawLayers.getPath().map(({\n lng,\n lat\n }) => [lng, lat]);\n this.drawLayersInfo = {\n range\n };\n },\n /** 回显不同类型图层 */\n echoDrawLayers(drawType) {\n const drawLayersItem = (drawItem, type, i = 0) => {\n // && drawItem.latitude && drawItem.longitude 忘记当时为什么加这个了 后续在想\n if (drawItem && this.amap) {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = layers.setMarker(this.drawIcon, {\n position: [longitude, latitude],\n ...setOptions\n });\n } else {\n const options = {\n path: range,\n strokeWeight: 8,\n ...setOptions\n };\n layersItem = type == 'line' ? new AMap.Polyline(options) : new AMap.Polygon(options);\n }\n layersItem.setMap(this.amap);\n this.amap.setFitView();\n }\n };\n if (!this.isExhibition) {\n drawLayersItem(this.drawLayersInfo, drawType);\n return;\n }\n if (this.drawInfoAll) {\n for (let key in this.drawInfoAll) {\n const isArray = Array.isArray(this.drawInfoAll[key]);\n isArray ? this.drawInfoAll[key].forEach((drawItem, i) => {\n drawLayersItem(drawItem, key, i);\n }) : drawLayersItem(this.drawInfoAll[key], key);\n }\n return;\n }\n drawLayersItem(this.drawLayersInfo, drawType);\n }\n },\n render(h) {\n const {\n drawEl,\n drawIcon,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose\n } = this;\n return h(\"div\", {\n \"class\": \"AmapDraw\"\n }, [!isExhibition && h(_components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n \"props\": {\n ...{\n drawIcon,\n buttonProps\n }\n },\n \"on\": {\n ...{\n searchReset: AmapDrawClear,\n searchChoose\n }\n }\n }), h(\"div\", {\n \"attrs\": {\n \"id\": drawEl\n }\n })]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
|
|
8718
8718
|
|
|
8719
8719
|
/***/ }),
|
|
8720
8720
|
|
|
@@ -8722,10 +8722,10 @@ eval("__webpack_require__.a(module, async function (__webpack_handle_async_depen
|
|
|
8722
8722
|
/*!**********************************************************!*\
|
|
8723
8723
|
!*** ./plugins/lib/amap/components/AmapSearch/index.jsx ***!
|
|
8724
8724
|
\**********************************************************/
|
|
8725
|
-
/***/ (function(
|
|
8725
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8726
8726
|
|
|
8727
8727
|
"use strict";
|
|
8728
|
-
eval("__webpack_require__.
|
|
8728
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapSearchProps: function() { return /* binding */ AmapSearchProps; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../index */ \"./plugins/lib/index.js\");\n/* harmony import */ var _method_AMap_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../method/AMap.js */ \"./plugins/method/AMap.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/amap/components/AmapSearch/index.less\");\n\n\n\n\n\n\nconst {\n ASelectCustom\n} = _index__WEBPACK_IMPORTED_MODULE_2__.FormComp;\nconst {\n methods,\n layers\n} = (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_3__.getAMapInstance)();\nconst AmapSearchProps = {\n /** 搜索后绘制图标 */\n drawIcon: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__[\"default\"].any,\n buttonProps: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_5__[\"default\"].array.def([])\n};\nconst AmapSearch = {\n name: 'AmapSearch',\n props: AmapSearchProps,\n data() {\n return {\n searchMarker: null,\n addressValue: undefined,\n selectOptions: []\n };\n },\n methods: {\n /** 选择地址 */\n changeHandle() {\n if (!this.addressValue) return this.$emit('searchReset', this.searchMarker), this.searchMarker = null;\n const {\n label,\n location\n } = this.selectOptions.find(({\n id\n }) => id == this.addressValue);\n const searchInfo = {\n longitude: location.lng,\n latitude: location.lat,\n address: label\n };\n this.searchMarker = layers.setMarker(this.drawIcon, {\n position: [location.lng, location.lat]\n });\n this.$emit('searchChoose', this.searchMarker, searchInfo);\n },\n /** 根据搜索框搜索地址 */\n searchHandle(keyword) {\n methods.getMapSearch(keyword, addressOptions => {\n this.selectOptions = addressOptions;\n });\n }\n },\n render(h) {\n const {\n selectOptions,\n changeHandle,\n searchHandle,\n buttonProps\n } = this;\n const props = {\n valueKey: 'id',\n labelKey: 'label',\n options: selectOptions,\n placeholder: '请输入目的地进行搜索'\n };\n return h(\"div\", {\n \"class\": \"AmapDraw__Search\"\n }, [h(ASelectCustom, {\n \"props\": {\n ...props\n },\n \"on\": {\n ...{\n change: changeHandle,\n search: searchHandle\n }\n },\n \"model\": {\n value: this.addressValue,\n callback: $$v => {\n this.addressValue = $$v;\n }\n }\n }), buttonProps && h(_index__WEBPACK_IMPORTED_MODULE_2__.Button, {\n \"attrs\": {\n \"buttonProps\": buttonProps\n },\n \"class\": \"AmapDraw__Search__Button\"\n })]);\n }\n};\nAmapSearch.install = function (Vue) {\n Vue.component('AmapSearch', AmapSearch);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AmapSearch);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/components/AmapSearch/index.jsx?");
|
|
8729
8729
|
|
|
8730
8730
|
/***/ }),
|
|
8731
8731
|
|
|
@@ -8733,10 +8733,10 @@ eval("__webpack_require__.a(module, async function (__webpack_handle_async_depen
|
|
|
8733
8733
|
/*!***********************************!*\
|
|
8734
8734
|
!*** ./plugins/lib/amap/index.js ***!
|
|
8735
8735
|
\***********************************/
|
|
8736
|
-
/***/ (function(
|
|
8736
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8737
8737
|
|
|
8738
8738
|
"use strict";
|
|
8739
|
-
eval("__webpack_require__.
|
|
8739
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDraw: function() { return /* reexport safe */ _AmapDraw_jsx__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _AmapDraw_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AmapDraw.jsx */ \"./plugins/lib/amap/AmapDraw.jsx\");\n/* harmony import */ var _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/AmapSearch/index.jsx */ \"./plugins/lib/amap/components/AmapSearch/index.jsx\");\n/* 地图打点 */\n\n\n/* 地图搜索 */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n AmapSearch: _components_AmapSearch_index_jsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/index.js?");
|
|
8740
8740
|
|
|
8741
8741
|
/***/ }),
|
|
8742
8742
|
|
|
@@ -8876,10 +8876,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
|
|
|
8876
8876
|
/*!******************************!*\
|
|
8877
8877
|
!*** ./plugins/lib/index.js ***!
|
|
8878
8878
|
\******************************/
|
|
8879
|
-
/***/ (function(
|
|
8879
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8880
8880
|
|
|
8881
8881
|
"use strict";
|
|
8882
|
-
eval("__webpack_require__.
|
|
8882
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapComp: function() { return /* reexport safe */ _amap__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; },\n/* harmony export */ AmapDraw: function() { return /* reexport safe */ _amap__WEBPACK_IMPORTED_MODULE_13__.AmapDraw; },\n/* harmony export */ Avatar: function() { return /* reexport safe */ _avatar__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ Brower: function() { return /* reexport safe */ _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; },\n/* harmony export */ Button: function() { return /* reexport safe */ _button__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ DateTime: function() { return /* reexport safe */ _dateTime__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ DescriptionsList: function() { return /* reexport safe */ _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; },\n/* harmony export */ Directory: function() { return /* reexport safe */ _tree__WEBPACK_IMPORTED_MODULE_7__.Directory; },\n/* harmony export */ FormComp: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ IframePage: function() { return /* reexport safe */ _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ Modal: function() { return /* reexport safe */ _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ Model: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__.Model; },\n/* harmony export */ MultiTab: function() { return /* reexport safe */ _multiTab__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ Search: function() { return /* reexport safe */ _form__WEBPACK_IMPORTED_MODULE_3__.Search; },\n/* harmony export */ SvgIcon: function() { return /* reexport safe */ _svgIcon__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ Table: function() { return /* reexport safe */ _table__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */ Tree: function() { return /* reexport safe */ _tree__WEBPACK_IMPORTED_MODULE_7__.Tree; },\n/* harmony export */ Weather: function() { return /* reexport safe */ _weather__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./table */ \"./plugins/lib/table/index.js\");\n/* harmony import */ var _form__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./form */ \"./plugins/lib/form/index.js\");\n/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./button */ \"./plugins/lib/button/index.js\");\n/* harmony import */ var _avatar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./avatar */ \"./plugins/lib/avatar/index.js\");\n/* harmony import */ var _svgIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgIcon */ \"./plugins/lib/svgIcon/index.js\");\n/* harmony import */ var _tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree */ \"./plugins/lib/tree/index.js\");\n/* harmony import */ var _dateTime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./dateTime */ \"./plugins/lib/dateTime/index.js\");\n/* harmony import */ var _weather__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./weather */ \"./plugins/lib/weather/index.js\");\n/* harmony import */ var _multiTab__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./multiTab */ \"./plugins/lib/multiTab/index.js\");\n/* harmony import */ var _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./iframe/index.jsx */ \"./plugins/lib/iframe/index.jsx\");\n/* harmony import */ var _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modal/index.jsx */ \"./plugins/lib/modal/index.jsx\");\n/* harmony import */ var _amap__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./amap */ \"./plugins/lib/amap/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./descriptions/index.jsx */ \"./plugins/lib/descriptions/index.jsx\");\n\n\n// 按需引入ant-design-vue必要指令组件\n// import './lazy_use'\n\n// 将组件库中定义的所有组件引入并导出\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst components = {\n Table: _table__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Model: _form__WEBPACK_IMPORTED_MODULE_3__.Model,\n Search: _form__WEBPACK_IMPORTED_MODULE_3__.Search,\n FormComp: _form__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n Button: _button__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n Avatar: _avatar__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n SvgIcon: _svgIcon__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n Tree: _tree__WEBPACK_IMPORTED_MODULE_7__.Tree,\n Directory: _tree__WEBPACK_IMPORTED_MODULE_7__.Directory,\n DateTime: _dateTime__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n Weather: _weather__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n MultiTab: _multiTab__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n IframePage: _iframe_index_jsx__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n Modal: _modal_index_jsx__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n AmapComp: _amap__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n AmapDraw: _amap__WEBPACK_IMPORTED_MODULE_13__.AmapDraw,\n Brower: _browse_index_jsx__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n DescriptionsList: _descriptions_index_jsx__WEBPACK_IMPORTED_MODULE_15__[\"default\"]\n};\nconst install = function (Vue) {\n if (install.installed) return;\n Object.keys(components).forEach(component => {\n Vue.component(components[component].name, components[component]);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n install,\n ...components\n});\n\n//# sourceURL=webpack://mui/./plugins/lib/index.js?");
|
|
8883
8883
|
|
|
8884
8884
|
/***/ }),
|
|
8885
8885
|
|
|
@@ -12143,75 +12143,6 @@ eval("__webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modul
|
|
|
12143
12143
|
/******/ }
|
|
12144
12144
|
/******/
|
|
12145
12145
|
/************************************************************************/
|
|
12146
|
-
/******/ /* webpack/runtime/async module */
|
|
12147
|
-
/******/ !function() {
|
|
12148
|
-
/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
|
|
12149
|
-
/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
|
|
12150
|
-
/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
|
|
12151
|
-
/******/ var resolveQueue = function(queue) {
|
|
12152
|
-
/******/ if(queue && queue.d < 1) {
|
|
12153
|
-
/******/ queue.d = 1;
|
|
12154
|
-
/******/ queue.forEach(function(fn) { fn.r--; });
|
|
12155
|
-
/******/ queue.forEach(function(fn) { fn.r-- ? fn.r++ : fn(); });
|
|
12156
|
-
/******/ }
|
|
12157
|
-
/******/ }
|
|
12158
|
-
/******/ var wrapDeps = function(deps) { return deps.map(function(dep) {
|
|
12159
|
-
/******/ if(dep !== null && typeof dep === "object") {
|
|
12160
|
-
/******/ if(dep[webpackQueues]) return dep;
|
|
12161
|
-
/******/ if(dep.then) {
|
|
12162
|
-
/******/ var queue = [];
|
|
12163
|
-
/******/ queue.d = 0;
|
|
12164
|
-
/******/ dep.then(function(r) {
|
|
12165
|
-
/******/ obj[webpackExports] = r;
|
|
12166
|
-
/******/ resolveQueue(queue);
|
|
12167
|
-
/******/ }, function(e) {
|
|
12168
|
-
/******/ obj[webpackError] = e;
|
|
12169
|
-
/******/ resolveQueue(queue);
|
|
12170
|
-
/******/ });
|
|
12171
|
-
/******/ var obj = {};
|
|
12172
|
-
/******/ obj[webpackQueues] = function(fn) { fn(queue); };
|
|
12173
|
-
/******/ return obj;
|
|
12174
|
-
/******/ }
|
|
12175
|
-
/******/ }
|
|
12176
|
-
/******/ var ret = {};
|
|
12177
|
-
/******/ ret[webpackQueues] = function() {};
|
|
12178
|
-
/******/ ret[webpackExports] = dep;
|
|
12179
|
-
/******/ return ret;
|
|
12180
|
-
/******/ }); };
|
|
12181
|
-
/******/ __webpack_require__.a = function(module, body, hasAwait) {
|
|
12182
|
-
/******/ var queue;
|
|
12183
|
-
/******/ hasAwait && ((queue = []).d = -1);
|
|
12184
|
-
/******/ var depQueues = new Set();
|
|
12185
|
-
/******/ var exports = module.exports;
|
|
12186
|
-
/******/ var currentDeps;
|
|
12187
|
-
/******/ var outerResolve;
|
|
12188
|
-
/******/ var reject;
|
|
12189
|
-
/******/ var promise = new Promise(function(resolve, rej) {
|
|
12190
|
-
/******/ reject = rej;
|
|
12191
|
-
/******/ outerResolve = resolve;
|
|
12192
|
-
/******/ });
|
|
12193
|
-
/******/ promise[webpackExports] = exports;
|
|
12194
|
-
/******/ promise[webpackQueues] = function(fn) { queue && fn(queue), depQueues.forEach(fn), promise["catch"](function() {}); };
|
|
12195
|
-
/******/ module.exports = promise;
|
|
12196
|
-
/******/ body(function(deps) {
|
|
12197
|
-
/******/ currentDeps = wrapDeps(deps);
|
|
12198
|
-
/******/ var fn;
|
|
12199
|
-
/******/ var getResult = function() { return currentDeps.map(function(d) {
|
|
12200
|
-
/******/ if(d[webpackError]) throw d[webpackError];
|
|
12201
|
-
/******/ return d[webpackExports];
|
|
12202
|
-
/******/ }); }
|
|
12203
|
-
/******/ var promise = new Promise(function(resolve) {
|
|
12204
|
-
/******/ fn = function() { resolve(getResult); };
|
|
12205
|
-
/******/ fn.r = 0;
|
|
12206
|
-
/******/ var fnQueue = function(q) { q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))); };
|
|
12207
|
-
/******/ currentDeps.map(function(dep) { dep[webpackQueues](fnQueue); });
|
|
12208
|
-
/******/ });
|
|
12209
|
-
/******/ return fn.r ? promise : getResult();
|
|
12210
|
-
/******/ }, function(err) { (err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue); });
|
|
12211
|
-
/******/ queue && queue.d < 0 && (queue.d = 0);
|
|
12212
|
-
/******/ };
|
|
12213
|
-
/******/ }();
|
|
12214
|
-
/******/
|
|
12215
12146
|
/******/ /* webpack/runtime/compat get default export */
|
|
12216
12147
|
/******/ !function() {
|
|
12217
12148
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
package/lib/amap/AmapDraw.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import AmapSearch from './components/AmapSearch/index.jsx'
|
|
|
2
2
|
import PropTypes from 'ant-design-vue/es/_util/vue-types'
|
|
3
3
|
import { getAMapInstance } from '../../method/AMap.js'
|
|
4
4
|
|
|
5
|
-
const amap =
|
|
5
|
+
const amap = getAMapInstance()
|
|
6
6
|
const { AMap, methods, layers } = amap
|
|
7
7
|
|
|
8
8
|
import './AmapDraw.less'
|
|
@@ -5,7 +5,7 @@ import {getAMapInstance} from '../../../../method/AMap.js'
|
|
|
5
5
|
import './index.less'
|
|
6
6
|
|
|
7
7
|
const { ASelectCustom } = FormComp
|
|
8
|
-
const { methods, layers } =
|
|
8
|
+
const { methods, layers } = getAMapInstance()
|
|
9
9
|
|
|
10
10
|
export const AmapSearchProps = {
|
|
11
11
|
/** 搜索后绘制图标 */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import AmapSearch from './components/AmapSearch/index.jsx'
|
|
|
2
2
|
import PropTypes from 'ant-design-vue/es/_util/vue-types'
|
|
3
3
|
import { getAMapInstance } from '../../method/AMap.js'
|
|
4
4
|
|
|
5
|
-
const amap =
|
|
5
|
+
const amap = getAMapInstance()
|
|
6
6
|
const { AMap, methods, layers } = amap
|
|
7
7
|
|
|
8
8
|
import './AmapDraw.less'
|
|
@@ -5,7 +5,7 @@ import {getAMapInstance} from '../../../../method/AMap.js'
|
|
|
5
5
|
import './index.less'
|
|
6
6
|
|
|
7
7
|
const { ASelectCustom } = FormComp
|
|
8
|
-
const { methods, layers } =
|
|
8
|
+
const { methods, layers } = getAMapInstance()
|
|
9
9
|
|
|
10
10
|
export const AmapSearchProps = {
|
|
11
11
|
/** 搜索后绘制图标 */
|