2026-06-17 14:23:03 +08:00
|
|
|
|
import type { ApiResponse } from '@/types/ApiResponse';
|
|
|
|
|
|
import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
|
|
|
|
|
|
import httpInstance from '@/utils/request/http';
|
2026-04-11 10:09:40 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-13 22:28:56 +08:00
|
|
|
|
* 获取隐患点基础数据
|
2026-04-28 10:05:49 +08:00
|
|
|
|
* @param disasterType - 灾害类型(landslide, debris_flow, water_logging, flash_flood)
|
2026-04-13 22:28:56 +08:00
|
|
|
|
* @returns 隐患点数据数组
|
2026-04-11 10:09:40 +08:00
|
|
|
|
*/
|
2026-06-17 14:23:03 +08:00
|
|
|
|
export const getBasePoints = (
|
|
|
|
|
|
disasterType: string
|
|
|
|
|
|
): Promise<ApiResponse<XianHiddenDangerSpots[]>> => {
|
|
|
|
|
|
return httpInstance.get('/hidden-danger-spots/base-points', {
|
|
|
|
|
|
params: {
|
|
|
|
|
|
disasterType,
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
2026-04-11 10:09:40 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据id获取隐患点详情
|
2026-04-13 22:28:56 +08:00
|
|
|
|
* @param id - 隐患点id
|
2026-06-17 14:23:03 +08:00
|
|
|
|
* @param simulationId - 模拟id
|
2026-04-11 10:09:40 +08:00
|
|
|
|
* @returns 隐患点详情
|
|
|
|
|
|
*/
|
2026-06-17 14:23:03 +08:00
|
|
|
|
export const getPointDetailById = (
|
|
|
|
|
|
id: number,
|
|
|
|
|
|
simulationId: number
|
|
|
|
|
|
): Promise<ApiResponse<XianHiddenDangerSpots>> => {
|
|
|
|
|
|
return httpInstance.get(
|
|
|
|
|
|
`/hidden-danger-spots/point-detail/${id}/${simulationId}`
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|