From 137910cf4fc73a3a2787a3a02718f1e1f637c368 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期五, 14 六月 2024 16:01:17 +0800 Subject: [PATCH] bug修改 --- src/views/safetyReview/projectManage/components/mapLocation.vue | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/views/safetyReview/projectManage/components/mapLocation.vue b/src/views/safetyReview/projectManage/components/mapLocation.vue index 50790c8..dcb20b3 100644 --- a/src/views/safetyReview/projectManage/components/mapLocation.vue +++ b/src/views/safetyReview/projectManage/components/mapLocation.vue @@ -60,8 +60,8 @@ mapLocationVisible: false, zoom: 7, center: { - lng: '87.62472586600425', - lat: '43.82743324701045' + lng: '116.42585576793277', + lat: '39.88973394962104' }, keyword:'', location: '' @@ -80,13 +80,23 @@ } const openMapLocation=(longitude,latitude)=>{ - state.longitude = longitude - state.latitude = latitude - state.zoom = 13 - state.center = { - lng: longitude, - lat: latitude + if(longitude != ""){ + state.longitude = longitude + state.latitude = latitude + state.zoom = 13 + state.center = { + lng: longitude, + lat: latitude + } + }else { + + state.zoom = 7 + state.center = { + lng: '87.61552721758208', + lat: '43.839018284106565' + } } + state.mapLocationVisible = true } -- Gitblit v1.9.2