添加预测概率
This commit is contained in:
+10
-4
@@ -87,12 +87,14 @@ export const $api = {
|
||||
/**
|
||||
* 根据id获取隐患点详情
|
||||
* @param id - 隐患点id
|
||||
* @param simulationId - 模拟id
|
||||
* @returns 隐患点详情
|
||||
*/
|
||||
getPointDetailById: (
|
||||
id: number
|
||||
id: number,
|
||||
simulationId: number
|
||||
): Promise<ApiResponse<XianHiddenDangerSpots>> =>
|
||||
getHiddenDangerPointDetailById(id),
|
||||
getHiddenDangerPointDetailById(id, simulationId),
|
||||
},
|
||||
|
||||
// 风险点信息
|
||||
@@ -107,10 +109,14 @@ export const $api = {
|
||||
/**
|
||||
* 根据id获取风险点详情
|
||||
* @param id - 风险点id
|
||||
* @param simulationId - 模拟id
|
||||
* @returns 风险点详情
|
||||
*/
|
||||
getPointDetailById: (id: number): Promise<ApiResponse<XianRiskSpots>> =>
|
||||
getRiskPointDetailById(id),
|
||||
getPointDetailById: (
|
||||
id: number,
|
||||
simulationId: number
|
||||
): Promise<ApiResponse<XianRiskSpots>> =>
|
||||
getRiskPointDetailById(id, simulationId),
|
||||
},
|
||||
|
||||
// 医院信息
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
import type { ApiResponse } from "@/types/ApiResponse"
|
||||
import type { XianHiddenDangerSpots } from "@/types/base/XianHiddenDangerSpots"
|
||||
import httpInstance from "@/utils/request/http"
|
||||
import type { ApiResponse } from '@/types/ApiResponse';
|
||||
import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
|
||||
import httpInstance from '@/utils/request/http';
|
||||
|
||||
/**
|
||||
* 获取隐患点基础数据
|
||||
* @param disasterType - 灾害类型(landslide, debris_flow, water_logging, flash_flood)
|
||||
* @returns 隐患点数据数组
|
||||
*/
|
||||
export const getBasePoints = (disasterType: string): Promise<ApiResponse<XianHiddenDangerSpots[]>> => {
|
||||
return httpInstance.get('/hidden-danger-spots/base-points', {
|
||||
params: {
|
||||
disasterType
|
||||
}
|
||||
})
|
||||
}
|
||||
export const getBasePoints = (
|
||||
disasterType: string
|
||||
): Promise<ApiResponse<XianHiddenDangerSpots[]>> => {
|
||||
return httpInstance.get('/hidden-danger-spots/base-points', {
|
||||
params: {
|
||||
disasterType,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据id获取隐患点详情
|
||||
* @param id - 隐患点id
|
||||
* @param simulationId - 模拟id
|
||||
* @returns 隐患点详情
|
||||
*/
|
||||
export const getPointDetailById = (id: number): Promise<ApiResponse<XianHiddenDangerSpots>> => {
|
||||
return httpInstance.get(`/hidden-danger-spots/point-detail/${id}`)
|
||||
}
|
||||
export const getPointDetailById = (
|
||||
id: number,
|
||||
simulationId: number
|
||||
): Promise<ApiResponse<XianHiddenDangerSpots>> => {
|
||||
return httpInstance.get(
|
||||
`/hidden-danger-spots/point-detail/${id}/${simulationId}`
|
||||
);
|
||||
};
|
||||
|
||||
+12
-8
@@ -1,20 +1,24 @@
|
||||
import type { ApiResponse } from "@/types/ApiResponse"
|
||||
import type { XianRiskSpots } from "@/types/base/XianRiskSpots"
|
||||
import httpInstance from "@/utils/request/http"
|
||||
import type { ApiResponse } from '@/types/ApiResponse';
|
||||
import type { XianRiskSpots } from '@/types/base/XianRiskSpots';
|
||||
import httpInstance from '@/utils/request/http';
|
||||
|
||||
/**
|
||||
* 获取风险点基础数据
|
||||
* @returns 风险点数据数组
|
||||
*/
|
||||
export const getBasePoints = (): Promise<ApiResponse<XianRiskSpots[]>> => {
|
||||
return httpInstance.get('/risk-spots/base-points')
|
||||
}
|
||||
return httpInstance.get('/risk-spots/base-points');
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据id获取风险点详情
|
||||
* @param id - 风险点id
|
||||
* @param simulationId - 模拟id
|
||||
* @returns 风险点详情
|
||||
*/
|
||||
export const getPointDetailById = (id: number): Promise<ApiResponse<XianRiskSpots>> => {
|
||||
return httpInstance.get(`/risk-spots/point-detail/${id}`)
|
||||
}
|
||||
export const getPointDetailById = (
|
||||
id: number,
|
||||
simulationId: number
|
||||
): Promise<ApiResponse<XianRiskSpots>> => {
|
||||
return httpInstance.get(`/risk-spots/point-detail/${id}/${simulationId}`);
|
||||
};
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
PointType,
|
||||
HiddenDangerPointTypeMap,
|
||||
} from '@/types/common/DisasterType.ts';
|
||||
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
|
||||
|
||||
const collapsePoints = ref<Point[]>([]);
|
||||
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
const simulationIdStore = useSimulationIdStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -79,7 +81,8 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
loadingInformationStore.collapseHiddenPoint.id
|
||||
loadingInformationStore.collapseHiddenPoint.id,
|
||||
simulationIdStore.status ? simulationIdStore.id : -1
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
PointType,
|
||||
HiddenDangerPointTypeMap,
|
||||
} from '@/types/common/DisasterType.ts';
|
||||
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
|
||||
|
||||
const debrisFlowPoints = ref<Point[]>([]);
|
||||
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
const simulationIdStore = useSimulationIdStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -79,7 +81,8 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
loadingInformationStore.debrisFlowHiddenPoint.id
|
||||
loadingInformationStore.debrisFlowHiddenPoint.id,
|
||||
simulationIdStore.status ? simulationIdStore.id : -1
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
PointType,
|
||||
HiddenDangerPointTypeMap,
|
||||
} from '@/types/common/DisasterType.ts';
|
||||
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
|
||||
|
||||
const flashFloodPoints = ref<Point[]>([]);
|
||||
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
const simulationIdStore = useSimulationIdStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -79,7 +81,8 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
loadingInformationStore.flashFloodHiddenPoint.id
|
||||
loadingInformationStore.flashFloodHiddenPoint.id,
|
||||
simulationIdStore.status ? simulationIdStore.id : -1
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
PointType,
|
||||
HiddenDangerPointTypeMap,
|
||||
} from '@/types/common/DisasterType.ts';
|
||||
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
|
||||
|
||||
const landslidePoints = ref<Point[]>([]);
|
||||
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
const simulationIdStore = useSimulationIdStore();
|
||||
|
||||
const { field, getDisasterIcon } = useHiddenPoint();
|
||||
|
||||
@@ -79,7 +81,8 @@
|
||||
}
|
||||
|
||||
const res = await $api.hiddenDangerSpots.getPointDetailById(
|
||||
loadingInformationStore.landslideHiddenPoint.id
|
||||
loadingInformationStore.landslideHiddenPoint.id,
|
||||
simulationIdStore.status ? simulationIdStore.id : -1
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
|
||||
@@ -37,12 +37,14 @@
|
||||
import { useRiskPoint } from '@/hooks/rain-earthquake/useRiskPoint.ts';
|
||||
import { LoadingResource } from '@/types/common/LoadingResourceType.ts';
|
||||
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore.ts';
|
||||
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
|
||||
|
||||
const riskPoints = ref<Point[]>([]);
|
||||
|
||||
const statusStore = useStatusStore();
|
||||
const loadingInformationStore = useLoadingInformationStore();
|
||||
const loadingResourceStore = useLoadingResourceStore();
|
||||
const simulationIdStore = useSimulationIdStore();
|
||||
|
||||
// 信息框相关配置
|
||||
const offsetX = ref(0);
|
||||
@@ -72,7 +74,8 @@
|
||||
}
|
||||
|
||||
const res = await $api.riskSpots.getPointDetailById(
|
||||
loadingInformationStore.riskPoint.id
|
||||
loadingInformationStore.riskPoint.id,
|
||||
simulationIdStore.status ? simulationIdStore.id : -1
|
||||
);
|
||||
|
||||
// 更新数据
|
||||
@@ -100,15 +103,13 @@
|
||||
(newValue: boolean) => {
|
||||
if (newValue) {
|
||||
CesiumUtilsSingleton.batchShowPrimitives(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
).ids
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.RISK_POINT)
|
||||
.ids
|
||||
);
|
||||
} else {
|
||||
CesiumUtilsSingleton.batchHidePrimitives(
|
||||
loadingResourceStore.getLoadingResource(
|
||||
LoadingResource.RISK_POINT
|
||||
).ids
|
||||
loadingResourceStore.getLoadingResource(LoadingResource.RISK_POINT)
|
||||
.ids
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export const useHiddenPoint = () => {
|
||||
* 字段映射配置
|
||||
*/
|
||||
const field = {
|
||||
probability: '预测概率',
|
||||
fieldCode: '野外编号',
|
||||
disasterName: '灾害点名称',
|
||||
position: '位置',
|
||||
|
||||
@@ -14,6 +14,7 @@ export const useRiskPoint = () => {
|
||||
* 字段映射配置
|
||||
*/
|
||||
const field = {
|
||||
probability: '预测概率',
|
||||
riskName: '风险区名称',
|
||||
unitCode: '统一编号',
|
||||
housing: '住房(间)',
|
||||
|
||||
@@ -14,4 +14,6 @@ export interface Point {
|
||||
disasterType?: string;
|
||||
/** 名称 */
|
||||
name?: string;
|
||||
/** 预测概率 */
|
||||
probability?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user