import { http } from "@/utils/http"; import type { Res } from "@/utils/http/types"; // 定义类型 export interface Question { startTime: number; topicStem: string; question: string; pptImageUrl: string; } export interface VideoKnowRes { theme: string; content: string; knowPoint: string; knowPointId: number; questionArr: Question[]; startTime: number; } export interface SenseVoiceRes { text: string; start: number; end: number; } export interface ShowTaskInfoRes { captions: SenseVoiceRes[]; captions1: SenseVoiceRes[]; videoKnows: VideoKnowRes[]; mediaUrl: string; } export interface VideoTaskWorkflow { id: number; videoTaskId: number; workflowName: string; currentStep: string; currentStepValue: number; message?: string; updateTime: string; } export interface RowRloadResult { progress: string; lastEnum: string; startTime: string; errorMessage: string; workflows: VideoTaskWorkflow[]; // 新增字段 } /** 刷新任务实时数据 */ export const RowRload = (id: any) => { return http.request("get", "/api/VideoTask/RowRload", { params: { id } }); }; /** 重试任务 (VideoSliceWorkflow) */ export const ReStart = (id: any, selectEnum: number) => { return http.request("get", "/api/VideoTask/ReStart", { params: { id, selectEnum } }); }; /** 重试任务 (TidySlideWorkflow) */ export const ReStartTidySlide = (id: any, selectEnum: number) => { return http.request("get", "/api/VideoTask/ReStartTidySlide", { params: { id, selectEnum } }); }; /** 展示数据 (VideoSliceWorkflow) */ export const ShowTaskInfo = (id: any) => { return http.request("get", "/api/VideoTask/ShowTaskInfo", { params: { id } }); }; /** 展示数据 (TidySlideWorkflow) */ export const ShowTidySlideTaskInfo = (id: any) => { return http.request("get", "/api/VideoTask/ShowTidySlideTaskInfo", { params: { id } }); }; /** 展示数据 */ export const RunningTaskList = (data: any) => { return http.request("post", "/api/VideoTask/RunningTaskList", { data }); }; /** 获取在线设备列表 */ export const GetOnlineDevices = () => { return http.request("get", "/api/VideoTask/OnlineDevices"); }; /** 展示数据 */ export const ErrorTaskList = (data: any) => { return http.request("post", "/api/VideoTask/ErrorTaskList", { data }); };