物业主开发

This commit is contained in:
Zy
2026-05-08 11:30:28 +08:00
parent a8bb4e66ad
commit 1b738c0f4d
118 changed files with 2891 additions and 979 deletions

View File

@@ -65,6 +65,7 @@ import { addPoint, getPoint, listPoint, updatePoint } from '@/api/system/Inspect
import { onMounted, onUnmounted } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
import { addRoute, getRoute, updateRoute } from '@/api/system/InspectionRoute';
import { getVillageByIdAPI } from '@/api/system/community';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
@@ -201,7 +202,7 @@ const markers = ref<Record<string, any>>({});
const mouseTool = ref(null);
const drawnPolylines = ref([]); // 存所有线条
const villageid = localStorage.getItem('villageid');
onMounted(async () => {
// 获取巡检点列表
if (!routeid.value) {
@@ -225,7 +226,26 @@ onMounted(async () => {
zoom: 11,
center: [116.397428, 39.90923]
});
const villageinfo = await getVillageByIdAPI(villageid);
AMap.plugin('AMap.Geocoder', function () {
const city = villageinfo.data.city.replaceAll('/', '');
const geocoder = new AMap.Geocoder({
city: city // city 指定进行编码查询的城市支持传入城市名、adcode 和 citycode
});
const address = villageinfo.data.address;
geocoder.getLocation(address, function (status, result) {
if (status === 'complete' && result.info === 'OK') {
// result中对应详细地理坐标信息
map.value.setCenter(result.geocodes[0].location.toArray());
}
});
});
mapReady.value = true;
// 初始化绘图插件 MouseTool
AMap.plugin(['AMap.MouseTool'], () => {
mouseTool.value = new AMap.MouseTool(map.value);
@@ -419,7 +439,7 @@ onUnmounted(() => {
.item {
display: flex;
align-items: center;
margin-right: 20px;
margin-right: 15px;
margin-bottom: 10px;
font-size: 14px;
color: #606266;