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