|
|
@ -25,17 +25,17 @@ |
|
|
|
<ATooltip title="放大" |
|
|
|
<ATooltip title="放大" |
|
|
|
placement="bottom" |
|
|
|
placement="bottom" |
|
|
|
:arrowPointAtCenter="true"> |
|
|
|
:arrowPointAtCenter="true"> |
|
|
|
<a-button @click=""> |
|
|
|
<a-button :disabled="mapState.defaultZoom >= 9" @click="handleMapZoomIn"> |
|
|
|
<Icon icon="fa6-solid:magnifying-glass-plus" size="13"/> |
|
|
|
<Icon icon="fa6-solid:magnifying-glass-plus" size="13"/> |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</ATooltip> |
|
|
|
</ATooltip> |
|
|
|
<a-button> |
|
|
|
<a-button> |
|
|
|
{{ Math.ceil(mapState.defaultZoom * 10 * 10) + "%" }} |
|
|
|
{{ Math.ceil(mapState.defaultZoom * 10 * 1.1) + "%" }} |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
<ATooltip title="缩小" |
|
|
|
<ATooltip title="缩小" |
|
|
|
placement="bottom" |
|
|
|
placement="bottom" |
|
|
|
:arrowPointAtCenter="true"> |
|
|
|
:arrowPointAtCenter="true"> |
|
|
|
<a-button @click=""> |
|
|
|
<a-button :disabled="mapState.defaultZoom <= 0" @click="handleMapZoomOut"> |
|
|
|
<Icon icon="fa6-solid:magnifying-glass-minus" size="13"/> |
|
|
|
<Icon icon="fa6-solid:magnifying-glass-minus" size="13"/> |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</ATooltip> |
|
|
|
</ATooltip> |
|
|
@ -100,7 +100,7 @@ |
|
|
|
import AButton from "/@/components/Button/src/BasicButton.vue"; |
|
|
|
import AButton from "/@/components/Button/src/BasicButton.vue"; |
|
|
|
import { Icon } from '/@/components/Icon'; |
|
|
|
import { Icon } from '/@/components/Icon'; |
|
|
|
import { useUserStore } from "/@/store/modules/user"; |
|
|
|
import { useUserStore } from "/@/store/modules/user"; |
|
|
|
import { split } from 'lodash-es'; |
|
|
|
import { split, divide, subtract } from 'lodash-es'; |
|
|
|
import componentSetting from '/@/settings/componentSetting'; |
|
|
|
import componentSetting from '/@/settings/componentSetting'; |
|
|
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
@ -123,7 +123,10 @@ |
|
|
|
orgList: MapCommonType[]; |
|
|
|
orgList: MapCommonType[]; |
|
|
|
mapTask: Recordable[]; |
|
|
|
mapTask: Recordable[]; |
|
|
|
mapLogisticPoint: Recordable[]; |
|
|
|
mapLogisticPoint: Recordable[]; |
|
|
|
mapConfig: Recordable; |
|
|
|
mapConfig: { |
|
|
|
|
|
|
|
amapKey: string; |
|
|
|
|
|
|
|
options: Recordable; |
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const mapProps = defineProps({ |
|
|
|
const mapProps = defineProps({ |
|
|
@ -177,8 +180,9 @@ |
|
|
|
viewMode:'3D', |
|
|
|
viewMode:'3D', |
|
|
|
resizeEnable: true, |
|
|
|
resizeEnable: true, |
|
|
|
center: split((userStore.getUserInfo.mapCenter || mapDesigner.mapCenter), ',', 2), |
|
|
|
center: split((userStore.getUserInfo.mapCenter || mapDesigner.mapCenter), ',', 2), |
|
|
|
zoom: 17, |
|
|
|
zoom: mapDesigner.defaultZoom, |
|
|
|
keyboardEnable: true |
|
|
|
keyboardEnable: true, |
|
|
|
|
|
|
|
zooms: [2, 20] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -263,6 +267,9 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
map.on('zoomchange', ctx => { |
|
|
|
|
|
|
|
mapState.defaultZoom = subtract(divide(map.getZoom(),2), 1); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 医检机构集群标记点 |
|
|
|
// 医检机构集群标记点 |
|
|
|
orgMarkerCluster = new AMap.MarkerCluster(map, [], { |
|
|
|
orgMarkerCluster = new AMap.MarkerCluster(map, [], { |
|
|
@ -410,9 +417,9 @@ |
|
|
|
radius: 14000, |
|
|
|
radius: 14000, |
|
|
|
borderWeight: 3, |
|
|
|
borderWeight: 3, |
|
|
|
strokeColor: '#3600ff', |
|
|
|
strokeColor: '#3600ff', |
|
|
|
strokeOpacity: 0.2, |
|
|
|
strokeOpacity: 0, |
|
|
|
strokeWeight: 6, |
|
|
|
strokeWeight: 6, |
|
|
|
fillOpacity: 0.4, |
|
|
|
fillOpacity: 0, |
|
|
|
strokeStyle: 'dashed', |
|
|
|
strokeStyle: 'dashed', |
|
|
|
strokeDasharray: [8, 8], |
|
|
|
strokeDasharray: [8, 8], |
|
|
|
fillColor: '#1791fc', |
|
|
|
fillColor: '#1791fc', |
|
|
@ -422,7 +429,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
// todo: 修改 |
|
|
|
// todo: 修改 |
|
|
|
|
|
|
|
|
|
|
|
// 构造路线导航类 |
|
|
|
// 构造路线导航类` |
|
|
|
driving = new AMap.Driving({ |
|
|
|
driving = new AMap.Driving({ |
|
|
|
map: map, |
|
|
|
map: map, |
|
|
|
panel: instance.refs.mapPanel |
|
|
|
panel: instance.refs.mapPanel |
|
|
@ -522,10 +529,21 @@ |
|
|
|
mapPointOpenModal(true, { driving }); |
|
|
|
mapPointOpenModal(true, { driving }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 处理地图放大 */ |
|
|
|
|
|
|
|
function handleMapZoomIn() { |
|
|
|
|
|
|
|
map.zoomIn(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 处理地图缩小 */ |
|
|
|
|
|
|
|
function handleMapZoomOut() { |
|
|
|
|
|
|
|
map.zoomOut(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理地图重置 */ |
|
|
|
/** 处理地图重置 */ |
|
|
|
function handleMapReset() { |
|
|
|
function handleMapReset() { |
|
|
|
// 清除地图扫描圈 |
|
|
|
// 清除地图 |
|
|
|
map.remove(scanCourierUserCircleRange || {}); |
|
|
|
map.resize(); |
|
|
|
|
|
|
|
map.clearMap(); |
|
|
|
// 清除表单数据 |
|
|
|
// 清除表单数据 |
|
|
|
formElRef.value.resetFields(); |
|
|
|
formElRef.value.resetFields(); |
|
|
|
formElRef.value.clearValidate(); |
|
|
|
formElRef.value.clearValidate(); |
|
|
@ -533,7 +551,8 @@ |
|
|
|
mapState.mapTask = []; |
|
|
|
mapState.mapTask = []; |
|
|
|
mapState.mapLogisticPoint = []; |
|
|
|
mapState.mapLogisticPoint = []; |
|
|
|
// 重置地图画布 |
|
|
|
// 重置地图画布 |
|
|
|
map.setZoomAndCenter(17, mapState.mapConfig.center); |
|
|
|
map.setZoomAndCenter(mapState.mapConfig.options.zoom, mapState.mapConfig.options.center); |
|
|
|
|
|
|
|
mapState.defaultZoom = mapState.mapConfig.options.zoom; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|