修改隐患点为默认组件
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
:base-points="debrisFlowPoints"
|
:base-points="debrisFlowPoints"
|
||||||
:get-disaster-icon="getDisasterIcon"
|
:get-disaster-icon="getDisasterIcon"
|
||||||
:prefix="config.prefix.debrisFlowHiddenPointId"
|
:prefix="config.prefix.debrisFlowHiddenPointId"
|
||||||
:is-default="false"
|
:is-default="true"
|
||||||
:loading-resource-field="LoadingResource.DEBRIS_FLOW_HIDDEN_POINT"
|
:loading-resource-field="LoadingResource.DEBRIS_FLOW_HIDDEN_POINT"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -37,7 +37,10 @@
|
|||||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||||
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
||||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||||
import { PointType, HiddenDangerPointTypeMap } from '@/types/common/DisasterType.ts';
|
import {
|
||||||
|
PointType,
|
||||||
|
HiddenDangerPointTypeMap,
|
||||||
|
} from '@/types/common/DisasterType.ts';
|
||||||
|
|
||||||
const debrisFlowPoints = ref<Point[]>([]);
|
const debrisFlowPoints = ref<Point[]>([]);
|
||||||
|
|
||||||
@@ -51,7 +54,9 @@
|
|||||||
const { field, getDisasterIcon } = useHiddenPoint();
|
const { field, getDisasterIcon } = useHiddenPoint();
|
||||||
|
|
||||||
// 加载泥石流隐患点数据
|
// 加载泥石流隐患点数据
|
||||||
$api.hiddenDangerSpots.getBasePoints(HiddenDangerPointTypeMap[PointType.DEBRIS_FLOW]).then((res) => {
|
$api.hiddenDangerSpots
|
||||||
|
.getBasePoints(HiddenDangerPointTypeMap[PointType.DEBRIS_FLOW])
|
||||||
|
.then((res) => {
|
||||||
debrisFlowPoints.value = res.data;
|
debrisFlowPoints.value = res.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,14 +106,16 @@
|
|||||||
if (newValue) {
|
if (newValue) {
|
||||||
// 显示泥石流隐患点
|
// 显示泥石流隐患点
|
||||||
CesiumUtilsSingleton.batchShowPrimitives(
|
CesiumUtilsSingleton.batchShowPrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.DEBRIS_FLOW_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.DEBRIS_FLOW_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 隐藏泥石流隐患点
|
// 隐藏泥石流隐患点
|
||||||
CesiumUtilsSingleton.batchHidePrimitives(
|
CesiumUtilsSingleton.batchHidePrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.DEBRIS_FLOW_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.DEBRIS_FLOW_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
:base-points="flashFloodPoints"
|
:base-points="flashFloodPoints"
|
||||||
:get-disaster-icon="getDisasterIcon"
|
:get-disaster-icon="getDisasterIcon"
|
||||||
:prefix="config.prefix.flashFloodHiddenPointId"
|
:prefix="config.prefix.flashFloodHiddenPointId"
|
||||||
:is-default="false"
|
:is-default="true"
|
||||||
:loading-resource-field="LoadingResource.FLASH_FLOOD_HIDDEN_POINT"
|
:loading-resource-field="LoadingResource.FLASH_FLOOD_HIDDEN_POINT"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -37,7 +37,10 @@
|
|||||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||||
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
||||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||||
import { PointType, HiddenDangerPointTypeMap } from '@/types/common/DisasterType.ts';
|
import {
|
||||||
|
PointType,
|
||||||
|
HiddenDangerPointTypeMap,
|
||||||
|
} from '@/types/common/DisasterType.ts';
|
||||||
|
|
||||||
const flashFloodPoints = ref<Point[]>([]);
|
const flashFloodPoints = ref<Point[]>([]);
|
||||||
|
|
||||||
@@ -51,7 +54,9 @@
|
|||||||
const { field, getDisasterIcon } = useHiddenPoint();
|
const { field, getDisasterIcon } = useHiddenPoint();
|
||||||
|
|
||||||
// 加载山洪隐患点数据
|
// 加载山洪隐患点数据
|
||||||
$api.hiddenDangerSpots.getBasePoints(HiddenDangerPointTypeMap[PointType.FLASH_FLOOD]).then((res) => {
|
$api.hiddenDangerSpots
|
||||||
|
.getBasePoints(HiddenDangerPointTypeMap[PointType.FLASH_FLOOD])
|
||||||
|
.then((res) => {
|
||||||
flashFloodPoints.value = res.data;
|
flashFloodPoints.value = res.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,14 +106,16 @@
|
|||||||
if (newValue) {
|
if (newValue) {
|
||||||
// 显示山洪隐患点
|
// 显示山洪隐患点
|
||||||
CesiumUtilsSingleton.batchShowPrimitives(
|
CesiumUtilsSingleton.batchShowPrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.FLASH_FLOOD_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.FLASH_FLOOD_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 隐藏山洪隐患点
|
// 隐藏山洪隐患点
|
||||||
CesiumUtilsSingleton.batchHidePrimitives(
|
CesiumUtilsSingleton.batchHidePrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.FLASH_FLOOD_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.FLASH_FLOOD_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
:base-points="landslidePoints"
|
:base-points="landslidePoints"
|
||||||
:get-disaster-icon="getDisasterIcon"
|
:get-disaster-icon="getDisasterIcon"
|
||||||
:prefix="config.prefix.landslideHiddenPointId"
|
:prefix="config.prefix.landslideHiddenPointId"
|
||||||
:is-default="false"
|
:is-default="true"
|
||||||
:loading-resource-field="LoadingResource.LANDSLIDE_HIDDEN_POINT"
|
:loading-resource-field="LoadingResource.LANDSLIDE_HIDDEN_POINT"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -37,7 +37,10 @@
|
|||||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||||
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
||||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||||
import { PointType, HiddenDangerPointTypeMap } from '@/types/common/DisasterType.ts';
|
import {
|
||||||
|
PointType,
|
||||||
|
HiddenDangerPointTypeMap,
|
||||||
|
} from '@/types/common/DisasterType.ts';
|
||||||
|
|
||||||
const landslidePoints = ref<Point[]>([]);
|
const landslidePoints = ref<Point[]>([]);
|
||||||
|
|
||||||
@@ -51,7 +54,9 @@
|
|||||||
const { field, getDisasterIcon } = useHiddenPoint();
|
const { field, getDisasterIcon } = useHiddenPoint();
|
||||||
|
|
||||||
// 加载滑坡隐患点数据
|
// 加载滑坡隐患点数据
|
||||||
$api.hiddenDangerSpots.getBasePoints(HiddenDangerPointTypeMap[PointType.LANDSLIDE]).then((res) => {
|
$api.hiddenDangerSpots
|
||||||
|
.getBasePoints(HiddenDangerPointTypeMap[PointType.LANDSLIDE])
|
||||||
|
.then((res) => {
|
||||||
landslidePoints.value = res.data;
|
landslidePoints.value = res.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,14 +106,16 @@
|
|||||||
if (newValue) {
|
if (newValue) {
|
||||||
// 显示滑坡隐患点
|
// 显示滑坡隐患点
|
||||||
CesiumUtilsSingleton.batchShowPrimitives(
|
CesiumUtilsSingleton.batchShowPrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.LANDSLIDE_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.LANDSLIDE_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 隐藏滑坡隐患点
|
// 隐藏滑坡隐患点
|
||||||
CesiumUtilsSingleton.batchHidePrimitives(
|
CesiumUtilsSingleton.batchHidePrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.LANDSLIDE_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.LANDSLIDE_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 加载内涝隐患点 -->
|
<!-- 加载内涝隐患点 -->
|
||||||
<LoadingPoints
|
<LoadingPoints
|
||||||
v-if="useStatusStore().appLoadingCompleted && waterLoggingPoints.length > 0"
|
v-if="
|
||||||
|
useStatusStore().appLoadingCompleted && waterLoggingPoints.length > 0
|
||||||
|
"
|
||||||
:base-points="waterLoggingPoints"
|
:base-points="waterLoggingPoints"
|
||||||
:get-disaster-icon="getDisasterIcon"
|
:get-disaster-icon="getDisasterIcon"
|
||||||
:prefix="config.prefix.waterLoggingHiddenPointId"
|
:prefix="config.prefix.waterLoggingHiddenPointId"
|
||||||
:is-default="false"
|
:is-default="true"
|
||||||
:loading-resource-field="LoadingResource.WATER_LOGGING_HIDDEN_POINT"
|
:loading-resource-field="LoadingResource.WATER_LOGGING_HIDDEN_POINT"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -37,7 +39,10 @@
|
|||||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||||
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint.ts';
|
||||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||||
import { PointType, HiddenDangerPointTypeMap } from '@/types/common/DisasterType.ts';
|
import {
|
||||||
|
PointType,
|
||||||
|
HiddenDangerPointTypeMap,
|
||||||
|
} from '@/types/common/DisasterType.ts';
|
||||||
|
|
||||||
const waterLoggingPoints = ref<Point[]>([]);
|
const waterLoggingPoints = ref<Point[]>([]);
|
||||||
|
|
||||||
@@ -51,7 +56,9 @@
|
|||||||
const { field, getDisasterIcon } = useHiddenPoint();
|
const { field, getDisasterIcon } = useHiddenPoint();
|
||||||
|
|
||||||
// 加载内涝隐患点数据
|
// 加载内涝隐患点数据
|
||||||
$api.hiddenDangerSpots.getBasePoints(HiddenDangerPointTypeMap[PointType.WATER_LOGGING]).then((res) => {
|
$api.hiddenDangerSpots
|
||||||
|
.getBasePoints(HiddenDangerPointTypeMap[PointType.WATER_LOGGING])
|
||||||
|
.then((res) => {
|
||||||
waterLoggingPoints.value = res.data;
|
waterLoggingPoints.value = res.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,14 +108,16 @@
|
|||||||
if (newValue) {
|
if (newValue) {
|
||||||
// 显示内涝隐患点
|
// 显示内涝隐患点
|
||||||
CesiumUtilsSingleton.batchShowPrimitives(
|
CesiumUtilsSingleton.batchShowPrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.WATER_LOGGING_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.WATER_LOGGING_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 隐藏内涝隐患点
|
// 隐藏内涝隐患点
|
||||||
CesiumUtilsSingleton.batchHidePrimitives(
|
CesiumUtilsSingleton.batchHidePrimitives(
|
||||||
useLoadingResourceStore().getLoadingResource(LoadingResource.WATER_LOGGING_HIDDEN_POINT)
|
useLoadingResourceStore().getLoadingResource(
|
||||||
.ids
|
LoadingResource.WATER_LOGGING_HIDDEN_POINT
|
||||||
|
).ids
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user