diff --git a/src/apis/video-monitor/index.ts b/src/apis/video-monitor/index.ts new file mode 100644 index 0000000..b18a5e2 --- /dev/null +++ b/src/apis/video-monitor/index.ts @@ -0,0 +1,55 @@ +import http from '@/utils/http' + +/* 分页查询 */ +export function getVideoPage(params: { + pageNo: number + pageSize: number + projectId: string + turbineId?: string +}) { + return http.get('/video-monitor/page', params ) +} + +/* 单文件上传 */ +export function uploadSingleVideo( + projectId: string, + turbineId: string, + type: string, + file: File +) { + const fd = new FormData() + fd.append('file', file) + return http.post( + `/video-monitor/${projectId}/upload?turbineId=${turbineId}&type=${type}`, + fd, + { headers: { 'Content-Type': 'multipart/form-data' } } + ) +} + +/* 批量上传 */ +export function uploadBatchVideo( + projectId: string, + turbineId: string, + type: string, + files: File[] +) { + const fd = new FormData() + files.forEach(f => fd.append('files', f)) + return http.post( + `/video-monitor/${projectId}/upload-batch?turbineId=${turbineId}&type=${type}`, + fd, + { headers: { 'Content-Type': 'multipart/form-data' } } + ) +} + +/* 删除 */ +export function deleteVideo(videoId: string) { + return http.del(`/video-monitor/${videoId}`) +} + +/* 下载 */ +export function downloadVideo(videoId: string) { + return http + .get(`/video-monitor/download/${videoId}`, { responseType: 'blob' }) + .then(blob => URL.createObjectURL(blob)) +} \ No newline at end of file diff --git a/src/components/CircularProgress/index.vue b/src/components/CircularProgress/index.vue new file mode 100644 index 0000000..230e212 --- /dev/null +++ b/src/components/CircularProgress/index.vue @@ -0,0 +1,157 @@ + + + + + + + + + + + + {{ percent }}% + {{ label }} + + + + + + + + diff --git a/src/views/operation-platform/data-processing/data-storage/components/raw-data.vue b/src/views/operation-platform/data-processing/data-storage/components/raw-data.vue index c80beb2..035a01a 100644 --- a/src/views/operation-platform/data-processing/data-storage/components/raw-data.vue +++ b/src/views/operation-platform/data-processing/data-storage/components/raw-data.vue @@ -1,407 +1,311 @@ - - + - + 上传视频 - - - - - 批量分析 - - - - - - 导出数据 - - - - - - - 风电场A区 - 风电场B区 - 风电场C区 - - - - - - - - 已完成 - 待分析 - 分析中 - 失败 - - - - 查询 - - - - - - {{ project.name }} - - - - {{ project.totalVideos }} 个视频 - - - - {{ project.completedCount }} 个已完成 - - - - {{ project.pendingCount }} 个待分析 - - - - - - - {{ unit.number }} - - 查看全部 - {{ - getAnalysisButtonText(unit.status) - }} - - - - - - - - - - - - {{ video.name }} - - {{ video.duration }} - {{ video.angle }}° - - - {{ getStatusText(video.status) }} - - - - - - - 分析进度 - {{ unit.progress }}% - - - - - - + + + + + + + + + + + 查询 + + - - - - - 项目:{{ selectedVideo.projectName }} - 机组号:{{ selectedVideo.unitNumber }} - 采集人:{{ selectedVideo.collector }} - 风速:{{ selectedVideo.windSpeed }} m/s - 转速:{{ selectedVideo.rpm }} rpm - 采集时间:{{ selectedVideo.time }} - 角度:{{ selectedVideo.angle }}° - - + + + + {{ record.type === 'clearance' ? '净空' : '形变' }} + + + + {{ record.preTreatment ? '已处理' : '未处理' }} + + + + + 预览 + 下载 + + 删除 + + - - + + + + - - 风电场A区 - 风电场B区 - 风电场C区 - + - - + + - - + + - - + + - - - - - - - - - - 选择视频 - - + + + 单文件 + 批量 + + + + + + + + + + + + + + + + + + + {{ JSON.stringify(resultJson, null, 2) }} + + + + + + +
项目:{{ selectedVideo.projectName }}
机组号:{{ selectedVideo.unitNumber }}
采集人:{{ selectedVideo.collector }}
风速:{{ selectedVideo.windSpeed }} m/s
转速:{{ selectedVideo.rpm }} rpm
采集时间:{{ selectedVideo.time }}
角度:{{ selectedVideo.angle }}°
{{ JSON.stringify(resultJson, null, 2) }}