From 68cd58de3a45d79ea241fa4d79e550217072e494 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 15 三月 2024 15:09:19 +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