From 1d132e13bf1db96c9a0eef2c90179ad88d302f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Fri, 21 Apr 2023 10:02:40 +0800 Subject: [PATCH] nexttick=>settimeout --- src/views/responseManagement/userResponse/index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 6966b0a..26a9ca0 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -172,7 +172,7 @@ const handleClick = (tab, event) => { state.selectName = tab.props.name; getTableData(); }; - +let controller=true const MapPage = defineAsyncComponent({ loader:() =>import('/@/components/Map.vue'), delay: 200, @@ -226,15 +226,16 @@ const onHandleSizeChange = (val) => { getTableData(); }; const onOpenEditRole = (type, row) => { + //深拷贝 state.edit = JSON.parse(JSON.stringify(row)); state.dialogVisible = true; - nextTick(() => { + setTimeout(() => { state.radio = "1" // mapRef.value.mapOperations.removeAll() //赋值地图范围,并且可以修改点或者区域 if(state.wktPoint){ - mapRef.value.mapOperations.removeLayer( state.wktPoint) + mapRef.value.mapOperations.removeLayer(state.wktPoint) } state.wktPoint= mapRef.value.mapOperations.wktParseToMap(row.geometry) // mapRef.value.mapOperations.on("click", (res)=>{ @@ -243,8 +244,7 @@ const onOpenEditRole = (type, row) => { // mapRef.value.mapOperations.addInteractMarker(res.latlng.lat, res.latlng.lng) // }) mapEvents('1') - }); - + },100); }; const mapEvents = (ev)=>{ if(ev == '1'){