diff --git a/src/assets/images/icon/earthquake-line.png b/src/assets/images/icon/earthquake-line.png
new file mode 100644
index 0000000..885ee58
Binary files /dev/null and b/src/assets/images/icon/earthquake-line.png differ
diff --git a/src/assets/index.ts b/src/assets/index.ts
index f6f58e6..5af5201 100644
--- a/src/assets/index.ts
+++ b/src/assets/index.ts
@@ -15,6 +15,7 @@ export { default as schoolIcon } from '@/assets/images/icon/school.png';
export { default as bridgeIcon } from '@/assets/images/icon/bridge.png';
export { default as reservoirIcon } from '@/assets/images/icon/reservoir.png';
export { default as subwayIcon } from '@/assets/images/icon/subway.png';
+export { default as earthquakeLineIcon } from '@/assets/images/icon/earthquake-line.png';
// 图片
export { default as backgroundImage } from '@/assets/images/background-image.png';
diff --git a/src/component/rain-earthquake/LegendComponent.vue b/src/component/rain-earthquake/LegendComponent.vue
index d1e9c9f..a29e6d6 100644
--- a/src/component/rain-earthquake/LegendComponent.vue
+++ b/src/component/rain-earthquake/LegendComponent.vue
@@ -35,7 +35,10 @@
:key="`${index1}_${index2}`"
>
-
![]()
+
+
![]()
+
+
{{ item.name }}
@@ -51,12 +54,12 @@
// 接收父组件传递的属性
const props = defineProps<{
- legendList: { name: string; link: string }[];
+ legendList: { name: string; link?: string; html?: string }[];
colsNum: 1 | 2 | 3 | 4 | 6 | 8 | 12 | 24;
}>();
// 处理后图例列表
- const finalLegendList: Ref<{ name: string; link: string }[][]> = ref([]);
+ const finalLegendList: Ref<{ name: string; link?: string; html?: string }[][]> = ref([]);
// 切换图例显示状态
const changeStatus = () => {
@@ -133,6 +136,21 @@
margin-right: 8px;
}
+ .legend-item-html {
+ width: 18px;
+ height: 18px;
+ flex-shrink: 0;
+ margin-right: 8px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .legend-item-html :deep(*) {
+ width: 100%;
+ height: 100%;
+ }
+
.legend-item-text {
flex: 1;
text-align: justify;
diff --git a/src/hooks/earthquake/useEarthquakeDisasterChain.ts b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
index 2f5a1b0..2360779 100644
--- a/src/hooks/earthquake/useEarthquakeDisasterChain.ts
+++ b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
@@ -4,7 +4,21 @@ import type { PaginationType } from '@/types/common/PaginationType';
import { PointType } from '@/types/common/DisasterType';
import { useStatusStore } from '@/stores/useStatusStore';
import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
-import { debrisFlowIcon, landslideIcon, riskAreaIcon } from '@/assets';
+import {
+ debrisFlowIcon,
+ landslideIcon,
+ riskAreaIcon,
+ earthquakeLineIcon,
+ hospitalIcon,
+ dangerousSourceIcon,
+ emergencyShelterIcon,
+ firefighterIcon,
+ storePointsIcon,
+ schoolIcon,
+ bridgeIcon,
+ reservoirIcon,
+ subwayIcon,
+} from '@/assets';
import { useRightHandle } from '../rain-earthquake/useRightHandle.ts';
/**
@@ -79,9 +93,23 @@ export const useEarthquakeDisasterChain = () => {
* 图例数据
*/
const legendList = [
+ // 隐患点
{ name: '滑坡隐患点', link: landslideIcon },
{ name: '泥石流隐患点', link: debrisFlowIcon },
{ name: '风险区域', link: riskAreaIcon },
+ // 断裂带
+ { name: '断裂带', link: earthquakeLineIcon },
+ // 承灾体
+ { name: '医院', link: hospitalIcon },
+ { name: '危险源', link: dangerousSourceIcon },
+ { name: '避难所', link: emergencyShelterIcon },
+ { name: '消防站', link: firefighterIcon },
+ { name: '储备点', link: storePointsIcon },
+ { name: '学校', link: schoolIcon },
+ { name: '地铁站', link: subwayIcon },
+ // 基础设施
+ { name: '桥梁', link: bridgeIcon },
+ { name: '水库', link: reservoirIcon },
];
// ================左侧按钮================================
diff --git a/src/hooks/rainstorm/useRainDisasterChain.ts b/src/hooks/rainstorm/useRainDisasterChain.ts
index b52cbe5..82a9c2f 100644
--- a/src/hooks/rainstorm/useRainDisasterChain.ts
+++ b/src/hooks/rainstorm/useRainDisasterChain.ts
@@ -9,6 +9,15 @@ import {
landslideIcon,
riskAreaIcon,
waterLoggingIcon,
+ hospitalIcon,
+ dangerousSourceIcon,
+ emergencyShelterIcon,
+ firefighterIcon,
+ storePointsIcon,
+ schoolIcon,
+ bridgeIcon,
+ reservoirIcon,
+ subwayIcon,
} from '@/assets';
import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
import { useRightHandle } from '../rain-earthquake/useRightHandle.ts';
@@ -87,11 +96,23 @@ export const useRainDisasterChain = () => {
* 图例数据
*/
const legendList = [
+ // 隐患点
{ name: '滑坡隐患点', link: landslideIcon },
{ name: '泥石流隐患点', link: debrisFlowIcon },
{ name: '山洪隐患点', link: flashFloodIcon },
{ name: '内涝隐患点', link: waterLoggingIcon },
{ name: '风险区域', link: riskAreaIcon },
+ // 承灾体
+ { name: '医院', link: hospitalIcon },
+ { name: '危险源', link: dangerousSourceIcon },
+ { name: '避难所', link: emergencyShelterIcon },
+ { name: '消防站', link: firefighterIcon },
+ { name: '储备点', link: storePointsIcon },
+ { name: '学校', link: schoolIcon },
+ { name: '地铁站', link: subwayIcon },
+ // 基础设施
+ { name: '桥梁', link: bridgeIcon },
+ { name: '水库', link: reservoirIcon },
];
// ================左侧按钮================================