Browse Source

fix: 地图点击显示信息弹窗事件优化

zhangying 9 months ago
parent
commit
77c3fadd87

+ 2 - 0
vue/src/views/dataMap/companyDataMap.vue

@@ -679,6 +679,8 @@ const checkCompanyChange = async (company: any, funE: any) => {
     }
     nowCheckCompany.value = JSON.parse(JSON.stringify(data));
   }
+  // 关闭地图上的其他信息弹窗
+  (map as any).closeInfoWindow();
   // 设置中心点到企业位置
   if (company.longitude && company.latitude) {
     // 设置中心点

+ 2 - 0
vue/src/views/dataMap/jobUserDataMap.vue

@@ -421,6 +421,8 @@ function checkJobUser(jobUser: any) {
   jobHuntList.value = [];
   jobHuntTotal.value = 0;
   getJobHunt();
+  // 关闭地图上的其他信息弹窗
+  (map as any).closeInfoWindow();
   if (jobUser.longitude && jobUser.latitude) {
     // 设置地图中心点
     (map as any).centerAndZoom(new T.LngLat(jobUser.longitude, jobUser.latitude), (map as any).getZoom());

+ 3 - 1
vue/src/views/dataMap/siteDataMap.vue

@@ -450,7 +450,9 @@ function checkSite(site: any) {
   findSiteDataCount(site.siteID).then((result: any) => {
     siteDataCount.value = result;
   })
-  nowCheckSite.value = JSON.parse(JSON.stringify(site))
+  nowCheckSite.value = JSON.parse(JSON.stringify(site));
+  // 关闭地图上的其他信息弹窗
+  (map as any).closeInfoWindow();
   if (site.siteLongitude && site.siteLatitude) {
     // 设置地图中心点
     (map as any).centerAndZoom(new T.LngLat(site.siteLongitude, site.siteLatitude), (map as any).getZoom());