CCTV 실시간 영상: - CCTVPlayer 컴포넌트 (hls.js 기반 HLS/MJPEG/MP4 재생) - 백엔드 HLS 프록시 엔드포인트 (CORS 우회, m3u8 URL 재작성) - KHOA 15개 + KBS 6개 실제 해안 CCTV 연동 - Vite dev proxy, 스트림 타입 자동 감지 유틸리티 HNS 분석: - HNS 시나리오 저장/불러오기/재계산 기능 - 물질 DB 검색 및 상세 정보 연동 - 좌표/파라미터 입력 UI 개선 - Python 확산 모델 스크립트 (hns_dispersion.py) 공통: - 3D 지도 토글, 보고서 생성 개선 - useSubMenu 훅, mapUtils 확장 - ESLint set-state-in-effect 수정 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
79 lines
2.0 KiB
TypeScript
79 lines
2.0 KiB
TypeScript
import { api } from '@common/services/api';
|
|
|
|
// ============================================================
|
|
// HNS 분석 API
|
|
// ============================================================
|
|
|
|
export interface HnsAnalysisItem {
|
|
hnsAnlysSn: number;
|
|
anlysNm: string;
|
|
acdntDtm: string | null;
|
|
locNm: string | null;
|
|
lon: number | null;
|
|
lat: number | null;
|
|
sbstNm: string | null;
|
|
spilQty: number | null;
|
|
spilUnitCd: string | null;
|
|
fcstHr: number | null;
|
|
algoCd: string | null;
|
|
critMdlCd: string | null;
|
|
windSpd: number | null;
|
|
windDir: string | null;
|
|
execSttsCd: string;
|
|
riskCd: string | null;
|
|
analystNm: string | null;
|
|
rsltData: Record<string, unknown> | null;
|
|
regDtm: string;
|
|
}
|
|
|
|
export interface CreateHnsAnalysisInput {
|
|
anlysNm: string;
|
|
acdntDtm?: string;
|
|
locNm?: string;
|
|
lon?: number;
|
|
lat?: number;
|
|
sbstNm?: string;
|
|
spilQty?: number;
|
|
spilUnitCd?: string;
|
|
fcstHr?: number;
|
|
algoCd?: string;
|
|
critMdlCd?: string;
|
|
windSpd?: number;
|
|
windDir?: string;
|
|
temp?: number;
|
|
humid?: number;
|
|
atmStblCd?: string;
|
|
analystNm?: string;
|
|
}
|
|
|
|
export async function fetchHnsAnalyses(params?: {
|
|
status?: string;
|
|
substance?: string;
|
|
search?: string;
|
|
}): Promise<HnsAnalysisItem[]> {
|
|
const response = await api.get<HnsAnalysisItem[]>('/hns/analyses', { params });
|
|
return response.data;
|
|
}
|
|
|
|
export async function fetchHnsAnalysis(sn: number): Promise<HnsAnalysisItem> {
|
|
const response = await api.get<HnsAnalysisItem>(`/hns/analyses/${sn}`);
|
|
return response.data;
|
|
}
|
|
|
|
export async function createHnsAnalysis(input: CreateHnsAnalysisInput): Promise<{ hnsAnlysSn: number }> {
|
|
const response = await api.post<{ hnsAnlysSn: number }>('/hns/analyses', input);
|
|
return response.data;
|
|
}
|
|
|
|
export async function saveHnsAnalysis(sn: number, data: {
|
|
rsltData: Record<string, unknown>;
|
|
execSttsCd?: string;
|
|
riskCd?: string;
|
|
}): Promise<void> {
|
|
await api.post(`/hns/analyses/${sn}/save`, data);
|
|
}
|
|
|
|
export async function deleteHnsAnalysis(sn: number): Promise<void> {
|
|
await api.delete(`/hns/analyses/${sn}`);
|
|
}
|