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