web-component-gallery 1.3.2 → 1.3.4

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
@@ -8703,7 +8703,7 @@ eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source cod
8703
8703
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8704
8704
 
8705
8705
  "use strict";
8706
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: () => (/* binding */ AmapDrawProps),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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\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 /** 地图存储商店 */\n amapStore: 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 async mounted() {\n this.amapStore = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\n this.amap = this.amapStore.initMap(this.drawEl);\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 this.amapStore.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 this.amapStore.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 this.amapStore.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 async 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: await this.amapStore.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 this.amapStore.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 /** 如若没挂载layers属性则退出 */\n if (!this.amapStore || !this.amap) return;\n const drawLayersItem = async (drawItem, type, i = 0) => {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n if (longitude && latitude || range) {\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = await this.amapStore.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 this.amapStore.AMap.Polyline(options) : new this.amapStore.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 */ const __WEBPACK_DEFAULT_EXPORT__ = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
8706
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: () => (/* binding */ AmapDrawProps),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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\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 /** 地图存储商店 */\n amapStore: 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 amapType: 0,\n /** 卫星图 */\n amapSatellite: null\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 async mounted() {\n this.amapStore = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\n this.amap = this.amapStore.initMap(this.drawEl);\n this.amapSatellite = new this.amapStore.AMap.TileLayer.Satellite();\n this.amap.add(this.amapSatellite);\n this.amapSatellite.hide();\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 this.amapStore.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 this.amapStore.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 this.amapStore.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 async 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: await this.amapStore.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 this.amapStore.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 /** 如若没挂载layers属性则退出 */\n if (!this.amapStore || !this.amap) return;\n const drawLayersItem = async (drawItem, type, i = 0) => {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n if (longitude && latitude || range) {\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = await this.amapStore.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 this.amapStore.AMap.Polyline(options) : new this.amapStore.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 onLayersSwitch(key) {\n this.amapType = key;\n this.amapType ? this.amapSatellite.show() : this.amapSatellite.hide();\n }\n },\n render(h) {\n const amapLayers = ['电子', '卫星'];\n const {\n drawEl,\n drawIcon,\n amapType,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose,\n onLayersSwitch\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 }), h(\"div\", {\n \"class\": \"AmapDraw__Layers\"\n }, [amapLayers.map((layer, i) => h(\"span\", {\n \"key\": i,\n \"class\": i === amapType && 'LayersActive',\n \"on\": {\n \"click\": () => onLayersSwitch(i)\n }\n }, [i === amapType, layer]))])]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
8707
8707
 
8708
8708
  /***/ }),
8709
8709
 
@@ -8791,7 +8791,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
8791
8791
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8792
8792
 
8793
8793
  "use strict";
8794
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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_map_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ant-design-vue/es/descriptions */ \"./node_modules/ant-design-vue/es/descriptions/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Filter.js */ \"./plugins/utils/Filter.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/descriptions/index.less\");\n\n\n\n\n\n\nconst {\n Item: DescriptionsItem\n} = ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\nconst descDefaultAttrs = {\n size: 'middle',\n bordered: true\n};\nconst DescriptionsProps = {\n title: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].string,\n column: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].number, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object]).def(3),\n descDetails: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object,\n descSettings: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].array,\n descAttrs: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object\n};\nconst renderContent = (h, item, details) => {\n const CustomTag = item.type === 'file' && _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"] || 'span';\n const data = item.hasOwnProperty('multiProps') ? item.multiProps.map(propsItem => (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[propsItem], 'Array')).flat() : (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[item.props], 'Array');\n const props = {\n data,\n astrictH: 104\n };\n return h(CustomTag, {\n \"props\": {\n ...props\n }\n }, [item.customRender && item.customRender(details[item.props], details) || details[item.props] || '暂无']);\n};\nconst DescriptionsList = {\n name: 'Descriptions',\n props: DescriptionsProps,\n render(h, content) {\n const {\n title,\n column,\n descAttrs,\n descDetails,\n descSettings,\n $slots,\n $scopedSlots\n } = this;\n return h(\"div\", {\n \"class\": \"Descriptions\",\n \"ref\": \"Descriptions\"\n }, [h(ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n \"attrs\": {\n \"title\": title,\n \"column\": column,\n ...{\n ...descDefaultAttrs,\n ...descAttrs\n }\n }\n }, [descSettings.map((descItem, key) => {\n return h(DescriptionsItem, {\n \"key\": key,\n \"attrs\": {\n \"span\": descItem.span ?? 1\n }\n }, [h(\"div\", {\n \"slot\": \"label\"\n }, [$slots[`${descItem.props}Lable`] ?? descItem.label]), $scopedSlots[`${descItem.props}`] ? $scopedSlots[`${descItem.props}`](descDetails) : renderContent(h, descItem, descDetails)]);\n })])]);\n },\n mounted() {\n window.addEventListener('resize', this.setDescContentWidth());\n },\n methods: {\n setDescContentWidth() {\n const elementG = this.$refs.Descriptions.querySelectorAll('.ant-descriptions-item-content');\n const width = document.querySelector('.ant-descriptions-row').offsetWidth;\n const labelWidth = document.querySelector('.ant-descriptions-item-label').offsetWidth;\n const {\n column,\n descSettings\n } = this;\n for (let i = 0; i < elementG.length; i++) {\n const contentWidth = (descSettings[i].span ? width * (descSettings[i].span / column) : width / column) - labelWidth + 'px';\n const element = elementG[i];\n element.style = `\n width: ${contentWidth};\n min-width: ${contentWidth};\n max-width: ${contentWidth};\n `;\n }\n }\n }\n};\nDescriptionsList.install = function (Vue) {\n Vue.component('DescriptionsList', DescriptionsList);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DescriptionsList);\n\n//# sourceURL=webpack://mui/./plugins/lib/descriptions/index.jsx?");
8794
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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_map_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ant-design-vue/es/descriptions */ \"./node_modules/ant-design-vue/es/descriptions/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Filter.js */ \"./plugins/utils/Filter.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/descriptions/index.less\");\n\n\n\n\n\n\nconst {\n Item: DescriptionsItem\n} = ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\nconst descDefaultAttrs = {\n size: 'middle',\n bordered: true\n};\nconst DescriptionsProps = {\n title: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].string,\n column: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].number, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object]).def(3),\n descDetails: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object,\n descSettings: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].array,\n descAttrs: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object\n};\nconst renderContent = (h, item, details) => {\n const CustomTag = item.type === 'file' && _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"] || 'span';\n const data = item.hasOwnProperty('multiProps') ? item.multiProps.map(propsItem => (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[propsItem], 'Array')).flat() : (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[item.props], 'Array');\n const props = {\n data,\n astrictH: 104\n };\n return h(CustomTag, {\n \"props\": {\n ...props\n }\n }, [(item.customRender && item.customRender(details[item.props], details) || details[item.props]) ?? '暂无']);\n};\nconst DescriptionsList = {\n name: 'Descriptions',\n props: DescriptionsProps,\n render(h, content) {\n const {\n title,\n column,\n descAttrs,\n descDetails,\n descSettings,\n $slots,\n $scopedSlots\n } = this;\n return h(\"div\", {\n \"class\": \"Descriptions\",\n \"ref\": \"Descriptions\"\n }, [h(ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n \"attrs\": {\n \"title\": title,\n \"column\": column,\n ...{\n ...descDefaultAttrs,\n ...descAttrs\n }\n }\n }, [descSettings.map((descItem, key) => {\n return h(DescriptionsItem, {\n \"key\": key,\n \"attrs\": {\n \"span\": descItem.span ?? 1\n }\n }, [h(\"div\", {\n \"slot\": \"label\"\n }, [$slots[`${descItem.props}Lable`] ?? descItem.label]), $scopedSlots[`${descItem.props}`] ? $scopedSlots[`${descItem.props}`](descDetails) : renderContent(h, descItem, descDetails)]);\n })])]);\n },\n mounted() {\n window.addEventListener('resize', this.setDescContentWidth());\n },\n methods: {\n setDescContentWidth() {\n const elementG = this.$refs.Descriptions.querySelectorAll('.ant-descriptions-item-content');\n const width = document.querySelector('.ant-descriptions-row').offsetWidth;\n const labelWidth = document.querySelector('.ant-descriptions-item-label').offsetWidth;\n const {\n column,\n descSettings\n } = this;\n for (let i = 0; i < elementG.length; i++) {\n const contentWidth = (descSettings[i].span ? width * (descSettings[i].span / column) : width / column) - labelWidth + 'px';\n const element = elementG[i];\n element.style = `\n width: ${contentWidth};\n min-width: ${contentWidth};\n max-width: ${contentWidth};\n `;\n }\n }\n }\n};\nDescriptionsList.install = function (Vue) {\n Vue.component('DescriptionsList', DescriptionsList);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DescriptionsList);\n\n//# sourceURL=webpack://mui/./plugins/lib/descriptions/index.jsx?");
8795
8795
 
8796
8796
  /***/ }),
8797
8797
 
@@ -9076,7 +9076,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
9076
9076
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
9077
9077
 
9078
9078
  "use strict";
9079
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".AmapDraw {\\n position: relative;\\n}\\n.AmapDraw__Search {\\n top: 8px;\\n left: 8px;\\n z-index: 1;\\n position: absolute;\\n}\\n.AmapDraw #AmapDraw {\\n width: 100%;\\n min-height: 304px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-2.use%5B2%5D");
9079
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* 布局( 纯为了不想多写一行 */\\n/* 正方体盒子 */\\n/* 滚动条样式 */\\n/* 文字换行省略(默认1行)*/\\n/* flex布局 */\\n/* flex排版方式 */\\n/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\\n/* stylelint-disable no-duplicate-selectors */\\n/* stylelint-disable */\\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\\n.AmapDraw {\\n position: relative;\\n}\\n.AmapDraw__Search {\\n top: 8px;\\n left: 8px;\\n z-index: 1;\\n position: absolute;\\n}\\n.AmapDraw__Layers {\\n z-index: 1;\\n right: 16px;\\n bottom: 16px;\\n position: absolute;\\n background: #fff;\\n width: 32px;\\n height: 120px;\\n display: flex;\\n gap: 0;\\n flex-direction: column;\\n}\\n.AmapDraw__Layers span {\\n flex: 1;\\n cursor: pointer;\\n font-size: 15px;\\n color: rgba(255, 255, 255, 0.7);\\n letter-spacing: 0.2em;\\n writing-mode: vertical-rl;\\n display: flex;\\n gap: 0;\\n flex-direction: row;\\n flex-wrap: wrap;\\n align-items: center;\\n justify-content: center;\\n}\\n.AmapDraw__Layers .LayersActive {\\n color: #fff;\\n border: 1px solid #1890ff;\\n box-sizing: border-box;\\n box-shadow: 0px 0px 16px 0px #1890ff inset;\\n}\\n.AmapDraw #AmapDraw {\\n width: 100%;\\n min-height: 304px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-2.use%5B2%5D");
9080
9080
 
9081
9081
  /***/ }),
9082
9082
 
package/dist/index.umd.js CHANGED
@@ -8703,7 +8703,7 @@ eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source cod
8703
8703
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8704
8704
 
8705
8705
  "use strict";
8706
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: () => (/* binding */ AmapDrawProps),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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\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 /** 地图存储商店 */\n amapStore: 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 async mounted() {\n this.amapStore = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\n this.amap = this.amapStore.initMap(this.drawEl);\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 this.amapStore.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 this.amapStore.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 this.amapStore.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 async 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: await this.amapStore.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 this.amapStore.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 /** 如若没挂载layers属性则退出 */\n if (!this.amapStore || !this.amap) return;\n const drawLayersItem = async (drawItem, type, i = 0) => {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n if (longitude && latitude || range) {\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = await this.amapStore.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 this.amapStore.AMap.Polyline(options) : new this.amapStore.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 */ const __WEBPACK_DEFAULT_EXPORT__ = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
8706
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AmapDrawProps: () => (/* binding */ AmapDrawProps),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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\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 /** 地图存储商店 */\n amapStore: 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 amapType: 0,\n /** 卫星图 */\n amapSatellite: null\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 async mounted() {\n this.amapStore = await (0,_method_AMap_js__WEBPACK_IMPORTED_MODULE_6__.getAMapInstance)();\n this.amap = this.amapStore.initMap(this.drawEl);\n this.amapSatellite = new this.amapStore.AMap.TileLayer.Satellite();\n this.amap.add(this.amapSatellite);\n this.amapSatellite.hide();\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 this.amapStore.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 this.amapStore.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 this.amapStore.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 async 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: await this.amapStore.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 this.amapStore.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 /** 如若没挂载layers属性则退出 */\n if (!this.amapStore || !this.amap) return;\n const drawLayersItem = async (drawItem, type, i = 0) => {\n let layersItem = null;\n const {\n longitude,\n latitude,\n range\n } = drawItem;\n if (longitude && latitude || range) {\n const setOptions = {\n extData: `draw${type}${i}`,\n ...this.drawOptions\n };\n if (type == 'point') {\n layersItem = await this.amapStore.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 this.amapStore.AMap.Polyline(options) : new this.amapStore.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 onLayersSwitch(key) {\n this.amapType = key;\n this.amapType ? this.amapSatellite.show() : this.amapSatellite.hide();\n }\n },\n render(h) {\n const amapLayers = ['电子', '卫星'];\n const {\n drawEl,\n drawIcon,\n amapType,\n buttonProps,\n isExhibition,\n AmapDrawClear,\n searchChoose,\n onLayersSwitch\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 }), h(\"div\", {\n \"class\": \"AmapDraw__Layers\"\n }, [amapLayers.map((layer, i) => h(\"span\", {\n \"key\": i,\n \"class\": i === amapType && 'LayersActive',\n \"on\": {\n \"click\": () => onLayersSwitch(i)\n }\n }, [i === amapType, layer]))])]);\n }\n};\nAmapDraw.install = function (Vue) {\n Vue.component('AmapDraw', AmapDraw);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AmapDraw);\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.jsx?");
8707
8707
 
8708
8708
  /***/ }),
8709
8709
 
@@ -8791,7 +8791,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
8791
8791
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8792
8792
 
8793
8793
  "use strict";
8794
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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_map_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ant-design-vue/es/descriptions */ \"./node_modules/ant-design-vue/es/descriptions/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Filter.js */ \"./plugins/utils/Filter.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/descriptions/index.less\");\n\n\n\n\n\n\nconst {\n Item: DescriptionsItem\n} = ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\nconst descDefaultAttrs = {\n size: 'middle',\n bordered: true\n};\nconst DescriptionsProps = {\n title: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].string,\n column: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].number, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object]).def(3),\n descDetails: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object,\n descSettings: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].array,\n descAttrs: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object\n};\nconst renderContent = (h, item, details) => {\n const CustomTag = item.type === 'file' && _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"] || 'span';\n const data = item.hasOwnProperty('multiProps') ? item.multiProps.map(propsItem => (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[propsItem], 'Array')).flat() : (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[item.props], 'Array');\n const props = {\n data,\n astrictH: 104\n };\n return h(CustomTag, {\n \"props\": {\n ...props\n }\n }, [item.customRender && item.customRender(details[item.props], details) || details[item.props] || '暂无']);\n};\nconst DescriptionsList = {\n name: 'Descriptions',\n props: DescriptionsProps,\n render(h, content) {\n const {\n title,\n column,\n descAttrs,\n descDetails,\n descSettings,\n $slots,\n $scopedSlots\n } = this;\n return h(\"div\", {\n \"class\": \"Descriptions\",\n \"ref\": \"Descriptions\"\n }, [h(ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n \"attrs\": {\n \"title\": title,\n \"column\": column,\n ...{\n ...descDefaultAttrs,\n ...descAttrs\n }\n }\n }, [descSettings.map((descItem, key) => {\n return h(DescriptionsItem, {\n \"key\": key,\n \"attrs\": {\n \"span\": descItem.span ?? 1\n }\n }, [h(\"div\", {\n \"slot\": \"label\"\n }, [$slots[`${descItem.props}Lable`] ?? descItem.label]), $scopedSlots[`${descItem.props}`] ? $scopedSlots[`${descItem.props}`](descDetails) : renderContent(h, descItem, descDetails)]);\n })])]);\n },\n mounted() {\n window.addEventListener('resize', this.setDescContentWidth());\n },\n methods: {\n setDescContentWidth() {\n const elementG = this.$refs.Descriptions.querySelectorAll('.ant-descriptions-item-content');\n const width = document.querySelector('.ant-descriptions-row').offsetWidth;\n const labelWidth = document.querySelector('.ant-descriptions-item-label').offsetWidth;\n const {\n column,\n descSettings\n } = this;\n for (let i = 0; i < elementG.length; i++) {\n const contentWidth = (descSettings[i].span ? width * (descSettings[i].span / column) : width / column) - labelWidth + 'px';\n const element = elementG[i];\n element.style = `\n width: ${contentWidth};\n min-width: ${contentWidth};\n max-width: ${contentWidth};\n `;\n }\n }\n }\n};\nDescriptionsList.install = function (Vue) {\n Vue.component('DescriptionsList', DescriptionsList);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DescriptionsList);\n\n//# sourceURL=webpack://mui/./plugins/lib/descriptions/index.jsx?");
8794
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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_map_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ant-design-vue/es/_util/vue-types */ \"./node_modules/ant-design-vue/es/_util/vue-types/index.js\");\n/* harmony import */ var ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ant-design-vue/es/descriptions */ \"./node_modules/ant-design-vue/es/descriptions/index.js\");\n/* harmony import */ var _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../browse/index.jsx */ \"./plugins/lib/browse/index.jsx\");\n/* harmony import */ var _utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Filter.js */ \"./plugins/utils/Filter.js\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index.less */ \"./plugins/lib/descriptions/index.less\");\n\n\n\n\n\n\nconst {\n Item: DescriptionsItem\n} = ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n\nconst descDefaultAttrs = {\n size: 'middle',\n bordered: true\n};\nconst DescriptionsProps = {\n title: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].string,\n column: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].oneOfType([ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].number, ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object]).def(3),\n descDetails: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object,\n descSettings: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].array,\n descAttrs: ant_design_vue_es_util_vue_types__WEBPACK_IMPORTED_MODULE_6__[\"default\"].object\n};\nconst renderContent = (h, item, details) => {\n const CustomTag = item.type === 'file' && _browse_index_jsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"] || 'span';\n const data = item.hasOwnProperty('multiProps') ? item.multiProps.map(propsItem => (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[propsItem], 'Array')).flat() : (0,_utils_Filter_js__WEBPACK_IMPORTED_MODULE_3__.transferData)(details[item.props], 'Array');\n const props = {\n data,\n astrictH: 104\n };\n return h(CustomTag, {\n \"props\": {\n ...props\n }\n }, [(item.customRender && item.customRender(details[item.props], details) || details[item.props]) ?? '暂无']);\n};\nconst DescriptionsList = {\n name: 'Descriptions',\n props: DescriptionsProps,\n render(h, content) {\n const {\n title,\n column,\n descAttrs,\n descDetails,\n descSettings,\n $slots,\n $scopedSlots\n } = this;\n return h(\"div\", {\n \"class\": \"Descriptions\",\n \"ref\": \"Descriptions\"\n }, [h(ant_design_vue_es_descriptions__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n \"attrs\": {\n \"title\": title,\n \"column\": column,\n ...{\n ...descDefaultAttrs,\n ...descAttrs\n }\n }\n }, [descSettings.map((descItem, key) => {\n return h(DescriptionsItem, {\n \"key\": key,\n \"attrs\": {\n \"span\": descItem.span ?? 1\n }\n }, [h(\"div\", {\n \"slot\": \"label\"\n }, [$slots[`${descItem.props}Lable`] ?? descItem.label]), $scopedSlots[`${descItem.props}`] ? $scopedSlots[`${descItem.props}`](descDetails) : renderContent(h, descItem, descDetails)]);\n })])]);\n },\n mounted() {\n window.addEventListener('resize', this.setDescContentWidth());\n },\n methods: {\n setDescContentWidth() {\n const elementG = this.$refs.Descriptions.querySelectorAll('.ant-descriptions-item-content');\n const width = document.querySelector('.ant-descriptions-row').offsetWidth;\n const labelWidth = document.querySelector('.ant-descriptions-item-label').offsetWidth;\n const {\n column,\n descSettings\n } = this;\n for (let i = 0; i < elementG.length; i++) {\n const contentWidth = (descSettings[i].span ? width * (descSettings[i].span / column) : width / column) - labelWidth + 'px';\n const element = elementG[i];\n element.style = `\n width: ${contentWidth};\n min-width: ${contentWidth};\n max-width: ${contentWidth};\n `;\n }\n }\n }\n};\nDescriptionsList.install = function (Vue) {\n Vue.component('DescriptionsList', DescriptionsList);\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DescriptionsList);\n\n//# sourceURL=webpack://mui/./plugins/lib/descriptions/index.jsx?");
8795
8795
 
8796
8796
  /***/ }),
8797
8797
 
@@ -9076,7 +9076,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
9076
9076
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
9077
9077
 
9078
9078
  "use strict";
9079
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".AmapDraw {\\n position: relative;\\n}\\n.AmapDraw__Search {\\n top: 8px;\\n left: 8px;\\n z-index: 1;\\n position: absolute;\\n}\\n.AmapDraw #AmapDraw {\\n width: 100%;\\n min-height: 304px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-2.use%5B2%5D");
9079
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* 布局( 纯为了不想多写一行 */\\n/* 正方体盒子 */\\n/* 滚动条样式 */\\n/* 文字换行省略(默认1行)*/\\n/* flex布局 */\\n/* flex排版方式 */\\n/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\\n/* stylelint-disable no-duplicate-selectors */\\n/* stylelint-disable */\\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\\n.AmapDraw {\\n position: relative;\\n}\\n.AmapDraw__Search {\\n top: 8px;\\n left: 8px;\\n z-index: 1;\\n position: absolute;\\n}\\n.AmapDraw__Layers {\\n z-index: 1;\\n right: 16px;\\n bottom: 16px;\\n position: absolute;\\n background: #fff;\\n width: 32px;\\n height: 120px;\\n display: flex;\\n gap: 0;\\n flex-direction: column;\\n}\\n.AmapDraw__Layers span {\\n flex: 1;\\n cursor: pointer;\\n font-size: 15px;\\n color: rgba(255, 255, 255, 0.7);\\n letter-spacing: 0.2em;\\n writing-mode: vertical-rl;\\n display: flex;\\n gap: 0;\\n flex-direction: row;\\n flex-wrap: wrap;\\n align-items: center;\\n justify-content: center;\\n}\\n.AmapDraw__Layers .LayersActive {\\n color: #fff;\\n border: 1px solid #1890ff;\\n box-sizing: border-box;\\n box-shadow: 0px 0px 16px 0px #1890ff inset;\\n}\\n.AmapDraw #AmapDraw {\\n width: 100%;\\n min-height: 304px;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://mui/./plugins/lib/amap/AmapDraw.less?./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-2.use%5B2%5D");
9080
9080
 
9081
9081
  /***/ }),
9082
9082
 
@@ -50,7 +50,11 @@ const AmapDraw = {
50
50
  saveButtonProps: [
51
51
  { type: 'primary', text: '保存', event: { click: this.AmapDrawSave } },
52
52
  { text: '取消', event: { click: this.AmapDrawReset } }
53
- ]
53
+ ],
54
+ /** 地图类型 */
55
+ amapType: 0,
56
+ /** 卫星图 */
57
+ amapSatellite: null
54
58
  }
55
59
  },
56
60
  computed: {
@@ -85,6 +89,9 @@ const AmapDraw = {
85
89
  async mounted() {
86
90
  this.amapStore = await getAMapInstance()
87
91
  this.amap = this.amapStore.initMap(this.drawEl)
92
+ this.amapSatellite = new this.amapStore.AMap.TileLayer.Satellite()
93
+ this.amap.add(this.amapSatellite)
94
+ this.amapSatellite.hide()
88
95
  this.buttonProps = [].concat(this.drawButtonProps)
89
96
  this.echoDrawLayers(this.drawType)
90
97
  /** 如果有限制区域,则描绘在地图上 */
@@ -299,10 +306,18 @@ const AmapDraw = {
299
306
  }
300
307
 
301
308
  drawLayersItem(this.drawLayersInfo, drawType)
309
+ },
310
+ /** 切换地图类型 */
311
+ onLayersSwitch(key) {
312
+ this.amapType = key
313
+ this.amapType ?
314
+ this.amapSatellite.show() :
315
+ this.amapSatellite.hide()
302
316
  }
303
317
  },
304
318
  render(h) {
305
- const { drawEl, drawIcon, buttonProps, isExhibition, AmapDrawClear, searchChoose } = this
319
+ const amapLayers = ['电子', '卫星']
320
+ const { drawEl, drawIcon, amapType, buttonProps, isExhibition, AmapDrawClear, searchChoose, onLayersSwitch } = this
306
321
 
307
322
  return (
308
323
  <div class="AmapDraw">
@@ -310,6 +325,18 @@ const AmapDraw = {
310
325
  <AmapSearch {...{ props: { drawIcon, buttonProps }, on: { searchReset: AmapDrawClear, searchChoose } }} />
311
326
  )}
312
327
  <div id={drawEl} />
328
+ <div class="AmapDraw__Layers">
329
+ {amapLayers.map((layer, i) => (
330
+ <span
331
+ key={i}
332
+ class={i === amapType && 'LayersActive'}
333
+ onClick={() => onLayersSwitch(i)}
334
+ >
335
+ {i === amapType}
336
+ {layer}
337
+ </span>
338
+ ))}
339
+ </div>
313
340
  </div>
314
341
  )
315
342
  }
@@ -319,4 +346,4 @@ AmapDraw.install = function (Vue) {
319
346
  Vue.component('AmapDraw', AmapDraw)
320
347
  }
321
348
 
322
- export default AmapDraw
349
+ export default AmapDraw
@@ -1,3 +1,6 @@
1
+ @import '../style/mixins.less';
2
+ @import 'ant-design-vue/lib/style/themes/default.less';
3
+
1
4
  .AmapDraw {
2
5
  position: relative;
3
6
 
@@ -8,8 +11,35 @@
8
11
  position: absolute;
9
12
  }
10
13
 
14
+ &__Layers {
15
+ z-index: 1;
16
+ right: @padding-md;
17
+ bottom: @padding-md;
18
+ position: absolute;
19
+ background: @component-background;
20
+ .layout(32px, 120px);
21
+ .flex-layout(column);
22
+
23
+ span {
24
+ flex: 1;
25
+ cursor: pointer;
26
+ font-size: 15px;
27
+ color: fade(@white, 70%);
28
+ letter-spacing: 0.2em;
29
+ writing-mode: vertical-rl;
30
+ .flex-mixins();
31
+ }
32
+
33
+ .LayersActive {
34
+ color: @white;
35
+ border: 1px solid @primary-color;
36
+ box-sizing: border-box;
37
+ box-shadow: 0px 0px 16px 0px @primary-color inset;
38
+ }
39
+ }
40
+
11
41
  #AmapDraw {
12
- width: 100%;
13
- min-height: 304px;
42
+ width: 100%;
43
+ min-height: 304px;
14
44
  }
15
45
  }
@@ -35,7 +35,7 @@ const renderContent = (h, item, details) => {
35
35
  }
36
36
  return (
37
37
  <CustomTag {...{ props }}>
38
- { (item.customRender && item.customRender(details[item.props], details) || details[item.props]) || '暂无'}
38
+ { (item.customRender && item.customRender(details[item.props], details) || details[item.props]) ?? '暂无'}
39
39
  </CustomTag>
40
40
  )
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "基于Vue2的Web Components组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
@@ -20,7 +20,6 @@
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@amap/amap-jsapi-loader": "^1.0.1",
23
- "ant-design-vue": "1.7.8",
24
23
  "vue": "^2.6.14"
25
24
  },
26
25
  "dependencies": {
@@ -50,7 +50,11 @@ const AmapDraw = {
50
50
  saveButtonProps: [
51
51
  { type: 'primary', text: '保存', event: { click: this.AmapDrawSave } },
52
52
  { text: '取消', event: { click: this.AmapDrawReset } }
53
- ]
53
+ ],
54
+ /** 地图类型 */
55
+ amapType: 0,
56
+ /** 卫星图 */
57
+ amapSatellite: null
54
58
  }
55
59
  },
56
60
  computed: {
@@ -85,6 +89,9 @@ const AmapDraw = {
85
89
  async mounted() {
86
90
  this.amapStore = await getAMapInstance()
87
91
  this.amap = this.amapStore.initMap(this.drawEl)
92
+ this.amapSatellite = new this.amapStore.AMap.TileLayer.Satellite()
93
+ this.amap.add(this.amapSatellite)
94
+ this.amapSatellite.hide()
88
95
  this.buttonProps = [].concat(this.drawButtonProps)
89
96
  this.echoDrawLayers(this.drawType)
90
97
  /** 如果有限制区域,则描绘在地图上 */
@@ -299,10 +306,18 @@ const AmapDraw = {
299
306
  }
300
307
 
301
308
  drawLayersItem(this.drawLayersInfo, drawType)
309
+ },
310
+ /** 切换地图类型 */
311
+ onLayersSwitch(key) {
312
+ this.amapType = key
313
+ this.amapType ?
314
+ this.amapSatellite.show() :
315
+ this.amapSatellite.hide()
302
316
  }
303
317
  },
304
318
  render(h) {
305
- const { drawEl, drawIcon, buttonProps, isExhibition, AmapDrawClear, searchChoose } = this
319
+ const amapLayers = ['电子', '卫星']
320
+ const { drawEl, drawIcon, amapType, buttonProps, isExhibition, AmapDrawClear, searchChoose, onLayersSwitch } = this
306
321
 
307
322
  return (
308
323
  <div class="AmapDraw">
@@ -310,6 +325,18 @@ const AmapDraw = {
310
325
  <AmapSearch {...{ props: { drawIcon, buttonProps }, on: { searchReset: AmapDrawClear, searchChoose } }} />
311
326
  )}
312
327
  <div id={drawEl} />
328
+ <div class="AmapDraw__Layers">
329
+ {amapLayers.map((layer, i) => (
330
+ <span
331
+ key={i}
332
+ class={i === amapType && 'LayersActive'}
333
+ onClick={() => onLayersSwitch(i)}
334
+ >
335
+ {i === amapType}
336
+ {layer}
337
+ </span>
338
+ ))}
339
+ </div>
313
340
  </div>
314
341
  )
315
342
  }
@@ -319,4 +346,4 @@ AmapDraw.install = function (Vue) {
319
346
  Vue.component('AmapDraw', AmapDraw)
320
347
  }
321
348
 
322
- export default AmapDraw
349
+ export default AmapDraw
@@ -1,3 +1,6 @@
1
+ @import '../style/mixins.less';
2
+ @import 'ant-design-vue/lib/style/themes/default.less';
3
+
1
4
  .AmapDraw {
2
5
  position: relative;
3
6
 
@@ -8,8 +11,35 @@
8
11
  position: absolute;
9
12
  }
10
13
 
14
+ &__Layers {
15
+ z-index: 1;
16
+ right: @padding-md;
17
+ bottom: @padding-md;
18
+ position: absolute;
19
+ background: @component-background;
20
+ .layout(32px, 120px);
21
+ .flex-layout(column);
22
+
23
+ span {
24
+ flex: 1;
25
+ cursor: pointer;
26
+ font-size: 15px;
27
+ color: fade(@white, 70%);
28
+ letter-spacing: 0.2em;
29
+ writing-mode: vertical-rl;
30
+ .flex-mixins();
31
+ }
32
+
33
+ .LayersActive {
34
+ color: @white;
35
+ border: 1px solid @primary-color;
36
+ box-sizing: border-box;
37
+ box-shadow: 0px 0px 16px 0px @primary-color inset;
38
+ }
39
+ }
40
+
11
41
  #AmapDraw {
12
- width: 100%;
13
- min-height: 304px;
42
+ width: 100%;
43
+ min-height: 304px;
14
44
  }
15
45
  }
@@ -35,7 +35,7 @@ const renderContent = (h, item, details) => {
35
35
  }
36
36
  return (
37
37
  <CustomTag {...{ props }}>
38
- { (item.customRender && item.customRender(details[item.props], details) || details[item.props]) || '暂无'}
38
+ { (item.customRender && item.customRender(details[item.props], details) || details[item.props]) ?? '暂无'}
39
39
  </CustomTag>
40
40
  )
41
41
  }
@@ -26,7 +26,6 @@ function normalizeWebSocketUrl(url) {
26
26
  function isValidWebSocketUrl(url) {
27
27
  try {
28
28
  const { protocol, hostname } = new URL(url)
29
- console.log(protocol, hostname, '--protocol, hostname')
30
29
  return /^wss?:$/i.test(protocol) && hostname
31
30
  } catch {
32
31
  return false
@@ -61,7 +60,6 @@ const WebSocketManager = {
61
60
 
62
61
  /** 拼接时间戳及传递token */
63
62
  const finalUrl = normalizeWebSocketUrl(url) + `/${new Date().getTime()}?token=${Vue.prototype.$store.getters.token}`
64
- console.log(finalUrl, '--finalUrl')
65
63
  if (!isValidWebSocketUrl(finalUrl)) {
66
64
  throw new Error(`无效的WebSocket URL: ${finalUrl}`)
67
65
  }
@@ -26,7 +26,6 @@ function normalizeWebSocketUrl(url) {
26
26
  function isValidWebSocketUrl(url) {
27
27
  try {
28
28
  const { protocol, hostname } = new URL(url)
29
- console.log(protocol, hostname, '--protocol, hostname')
30
29
  return /^wss?:$/i.test(protocol) && hostname
31
30
  } catch {
32
31
  return false
@@ -61,7 +60,6 @@ const WebSocketManager = {
61
60
 
62
61
  /** 拼接时间戳及传递token */
63
62
  const finalUrl = normalizeWebSocketUrl(url) + `/${new Date().getTime()}?token=${Vue.prototype.$store.getters.token}`
64
- console.log(finalUrl, '--finalUrl')
65
63
  if (!isValidWebSocketUrl(finalUrl)) {
66
64
  throw new Error(`无效的WebSocket URL: ${finalUrl}`)
67
65
  }