算法分析界面完成

This commit is contained in:
mmc
2026-05-21 14:50:28 +08:00
parent eee617ca83
commit 7cb9148aaa
2 changed files with 378 additions and 106 deletions

View File

@@ -1,15 +1,15 @@
import request from '../request';
// 检测服务 Base URL
const DETECT_BASE = 'http://50.50.50.117:10101';
const DETECT_BASE = 'http://47.100.102.7:10101';
// 热成像分割服务 Base URL
const SEGMENT_BASE = 'http://50.50.50.117:10102';
const SEGMENT_BASE = 'http://47.100.102.7:10102';
/**
* 获取检测模型列表
*/
export function getDetectModels() {
return fetch(`${DETECT_BASE}/api/v1/detect/models`).then(res => res.json());
return fetch(`${DETECT_BASE}/api/v1/detect/models`).then(res => res.json());
}
/**
@@ -17,24 +17,24 @@ export function getDetectModels() {
* @param formData 包含 files, inputType, modelAlias, conf, iou, imgsz, device, maxDet, vidStride
*/
export function submitDetectJob(formData: FormData) {
return fetch(`${DETECT_BASE}/api/v1/detect/jobs`, {
method: 'POST',
body: formData
}).then(res => res.json());
return fetch(`${DETECT_BASE}/api/v1/detect/jobs`, {
method: 'POST',
body: formData
}).then(res => res.json());
}
/**
* 查询检测任务状态
*/
export function getDetectJobStatus(jobId: string) {
return fetch(`${DETECT_BASE}/api/v1/detect/jobs/${jobId}`).then(res => res.json());
return fetch(`${DETECT_BASE}/api/v1/detect/jobs/${jobId}`).then(res => res.json());
}
/**
* 查询检测结果
*/
export function getDetectJobResult(jobId: string) {
return fetch(`${DETECT_BASE}/api/v1/detect/jobs/${jobId}/result`).then(res => res.json());
return fetch(`${DETECT_BASE}/api/v1/detect/jobs/${jobId}/result`).then(res => res.json());
}
/**
@@ -42,15 +42,15 @@ export function getDetectJobResult(jobId: string) {
* @param formData 包含 thermal_file, array_mask_file, panel_geojson_file, threshold_c, min_area_px, max_regions, open_k, close_k, shrink_in, include_panel_segments
*/
export function submitSegmentationAnalyze(formData: FormData) {
return fetch(`${SEGMENT_BASE}/api/v1/segmentation/analyze`, {
method: 'POST',
body: formData
}).then(res => res.json());
return fetch(`${SEGMENT_BASE}/api/v1/segmentation/analyze`, {
method: 'POST',
body: formData
}).then(res => res.json());
}
/**
* 获取热成像分析报告历史
*/
export function getSegmentationHistory() {
return fetch(`${SEGMENT_BASE}/api/v1/segmentation/analyses/report`).then(res => res.json());
return fetch(`${SEGMENT_BASE}/api/v1/segmentation/analyses/report`).then(res => res.json());
}