agentic.ts 3.96 KB
import { gscPost} from '@/utils/gscRequest';

/**
 * 质检规则列表查询
 */
export async function inspectionRuleList(data: any) {
  try {
    const response = await gscPost('/inspectionRule/findPageInspectionRule', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检规则新增
 */
export async function addInspectionRule(data: any) {
  try {
    const response = await gscPost('/inspectionRule/addInspectionRule', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检规则列表修改
 */
export async function updateInspectionRule(data: any) {
  try {
    const response = await gscPost('/inspectionRule/updateInspectionRule', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检规则列表删除
 */
export async function deleteInspectionRule(data: any) {
  try {
    const response = await gscPost('/inspectionRule/deleteInspectionRule', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检模版列表查询
 */
export async function inspectionTemplateList(data: any) {
  try {
    const response = await gscPost('/inspectionTemplate/findPageInspectionTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检模版新增
 */
export async function addInspectionTemplate(data: any) {
  try {
    const response = await gscPost('/inspectionTemplate/saveInspectionTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检模版修改
 */
export async function updateInspectionTemplate(data: any) {
  try {
    const response = await gscPost('/inspectionTemplate/updateInspectionTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 质检模版删除
 */
export async function deleteInspectionTemplate(data: any) {
  try {
    const response = await gscPost('/inspectionTemplate/deleteInspectionTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 培训智能体列表查询
 */
export async function trainingPlanList(data: any) {
  try {
    const response = await gscPost('/trainingPlan/findPageTrainingPlan', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 培训智能体新增
 */
export async function addTrainingPlan(data: any) {
  try {
    const response = await gscPost('/trainingPlan/addTrainingPlan', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 培训智能体修改
 */
export async function updateTrainingPlan(data: any) {
  try {
    const response = await gscPost('/trainingPlan/updateTrainingPlan', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 培训智能体删除
 */
export async function deleteTrainingPlan(data: any) {
  try {
    const response = await gscPost('/trainingPlan/deleteTrainingPlan', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 培训智能体详情
 */
export async function ftrainingPlanDetail(data: any) {
  try {
    const response = await gscPost(`/trainingPlan/findTrainingPlanDetail/${data.planId}`, data);
    return response;
  } catch (error) {
    throw error;
  }
}

/**
 * 通用知识分类列表
 */
export async function generalKnowledgeList(data: any) {
  try {
    const response = await gscPost('/generalKnowledgeCategory/findCategoryWithGeneralKnowledgeList', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/*
 * 复盘智能体提示词模板查询
 */
export async function getPromptTemplate(data: any) {
  try {
    const response = await gscPost('/reviewAgentPromptTemplate/findPromptTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}

/*
 * 复盘智能体提示词模板更新
 */
export async function updatePromptTemplate(data: any) {
  try {
    const response = await gscPost('/reviewAgentPromptTemplate/updatePromptTemplate', data);
    return response;
  } catch (error) {
    throw error;
  }
}