|
|
@@ -17,9 +17,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="time-wrap yes-events">
|
|
|
- <time-line></time-line>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="warning-r right chart-wrap yes-events">
|
|
|
<chart-list
|
|
|
@@ -110,9 +107,9 @@ const warningLayers = ref({});
|
|
|
onMounted(async () => {
|
|
|
// 使用 nextTick 确保 DOM 已经渲染完成,地图容器有正确的尺寸
|
|
|
await nextTick();
|
|
|
-
|
|
|
+
|
|
|
warningMap.initMap(store.getters.userinfo.location, mapRef.value);
|
|
|
-
|
|
|
+
|
|
|
// 地图初始化后,更新地图尺寸以确保正确渲染
|
|
|
if (warningMap.kmap && warningMap.kmap.map) {
|
|
|
// 使用 setTimeout 确保地图容器尺寸已计算
|
|
|
@@ -120,7 +117,7 @@ onMounted(async () => {
|
|
|
warningMap.kmap.map.updateSize();
|
|
|
}, 0);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
alarmLayer = new AlarmLayer(warningMap.kmap);
|
|
|
staticMapLayers = new StaticMapLayers(warningMap.kmap);
|
|
|
staticMapPointLayers = new StaticMapPointLayers(warningMap.kmap);
|
|
|
@@ -184,11 +181,11 @@ onMounted(async () => {
|
|
|
warningMap.kmap.map.updateSize();
|
|
|
}
|
|
|
};
|
|
|
- window.addEventListener('resize', handleResize);
|
|
|
-
|
|
|
+ window.addEventListener("resize", handleResize);
|
|
|
+
|
|
|
// 在组件卸载时清理
|
|
|
onUnmounted(() => {
|
|
|
- window.removeEventListener('resize', handleResize);
|
|
|
+ window.removeEventListener("resize", handleResize);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -276,7 +273,7 @@ const getCommonMapData = async (firstCategory) => {
|
|
|
if (lastLevelNodes.length === 0) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (activeBaseTab.value === "物候期分布") {
|
|
|
// 等待接口返回数据
|
|
|
const lastLevelIds = lastLevelNodes.map((n) => n.originalId);
|