添加点计数功能
This commit is contained in:
@@ -23,6 +23,8 @@ import {
|
||||
import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
|
||||
import { useRightHandle } from '../rain-earthquake/useRightHandle.ts';
|
||||
import { useLeftHandle } from '../rain-earthquake/useLeftHandle.ts';
|
||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||
|
||||
/**
|
||||
* 暴雨灾害链
|
||||
@@ -209,6 +211,7 @@ export const useRainDisasterChain = () => {
|
||||
const getControlPanel = () => {
|
||||
const statusStore = useStatusStore();
|
||||
const layerControl = useLayerControl();
|
||||
const resourceStore = useLoadingResourceStore();
|
||||
|
||||
return [
|
||||
// 灾害隐患点类别
|
||||
@@ -219,6 +222,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickLandslideHiddenPoint,
|
||||
link: landslideIcon,
|
||||
category: ControlPanelCategory.DISASTER_HAZARD,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.LANDSLIDE_HIDDEN_POINT),
|
||||
},
|
||||
{
|
||||
name: '泥石流隐患点',
|
||||
@@ -227,6 +231,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickDebrisFlowHiddenPoint,
|
||||
link: debrisFlowIcon,
|
||||
category: ControlPanelCategory.DISASTER_HAZARD,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.DEBRIS_FLOW_HIDDEN_POINT),
|
||||
},
|
||||
{
|
||||
name: '内涝隐患点',
|
||||
@@ -235,6 +240,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickWaterLoggingHiddenPoint,
|
||||
link: waterLoggingIcon,
|
||||
category: ControlPanelCategory.DISASTER_HAZARD,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.WATER_LOGGING_HIDDEN_POINT),
|
||||
},
|
||||
{
|
||||
name: '山洪隐患点',
|
||||
@@ -243,6 +249,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickFlashFloodHiddenPoint,
|
||||
link: flashFloodIcon,
|
||||
category: ControlPanelCategory.DISASTER_HAZARD,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.FLASH_FLOOD_HIDDEN_POINT),
|
||||
},
|
||||
{
|
||||
name: '风险点',
|
||||
@@ -251,6 +258,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickRiskPoint,
|
||||
link: riskAreaIcon,
|
||||
category: ControlPanelCategory.DISASTER_HAZARD,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.RISK_POINT),
|
||||
},
|
||||
// 基础设施类别
|
||||
{
|
||||
@@ -260,6 +268,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickHospital,
|
||||
link: hospitalIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.HOSPITAL),
|
||||
},
|
||||
{
|
||||
name: '危险源',
|
||||
@@ -268,6 +277,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickDangerousSource,
|
||||
link: dangerousSourceIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.DANGEROUS_SOURCE),
|
||||
},
|
||||
{
|
||||
name: '避难所',
|
||||
@@ -276,6 +286,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickEmergencyShelter,
|
||||
link: emergencyShelterIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.EMERGENCY_SHELTER),
|
||||
},
|
||||
{
|
||||
name: '消防站',
|
||||
@@ -284,6 +295,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickFireStation,
|
||||
link: firefighterIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.FIRE_STATION),
|
||||
},
|
||||
{
|
||||
name: '储备点',
|
||||
@@ -292,6 +304,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickStorePoints,
|
||||
link: storePointsIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.STORE_POINTS),
|
||||
},
|
||||
{
|
||||
name: '学校',
|
||||
@@ -300,6 +313,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickSchool,
|
||||
link: schoolIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.SCHOOL),
|
||||
},
|
||||
{
|
||||
name: '桥梁',
|
||||
@@ -308,6 +322,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickBridge,
|
||||
link: bridgeIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.BRIDGE),
|
||||
},
|
||||
{
|
||||
name: '水库',
|
||||
@@ -316,6 +331,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickReservoir,
|
||||
link: reservoirIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.RESERVOIR),
|
||||
},
|
||||
{
|
||||
name: '地铁站',
|
||||
@@ -324,6 +340,7 @@ export const useRainDisasterChain = () => {
|
||||
callback: layerControl.clickSubwayStation,
|
||||
link: subwayIcon,
|
||||
category: ControlPanelCategory.INFRASTRUCTURE,
|
||||
count: () => resourceStore.getResourceCount(LoadingResource.SUBWAY_STATION),
|
||||
},
|
||||
{
|
||||
name: '人口网格',
|
||||
|
||||
Reference in New Issue
Block a user