添加预测概率
This commit is contained in:
@@ -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}`
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user