feat(aihr): close phase two practice pilot gates

This commit is contained in:
2026-07-08 00:51:32 +08:00
parent 1d14497bc3
commit 4b10b08eeb
27 changed files with 4807 additions and 206 deletions
+20 -1
View File
@@ -36,6 +36,16 @@ export type SopSearchResponse = {
snippets: SopSnippet[];
training: string[];
records: SopRecord[];
keyPoints?: string[];
cautions?: string[];
reviewId?: number;
};
export type SopReviewResponse = {
id: number;
usable: boolean | null;
status: string;
reviewedAt: string;
};
export type SopUploadResponse = {
@@ -49,7 +59,7 @@ export type SopUploadResponse = {
snippets: SopSnippet[];
};
export function searchKnowledgeSop(data: { queryText: string; category: string; limit: number }): Promise<ApiResult<SopSearchResponse>> {
export function searchKnowledgeSop(data: { queryText: string; category: string; position?: string; source?: string; limit: number }): Promise<ApiResult<SopSearchResponse>> {
return request({
url: '/api/knowledge/search',
method: 'post',
@@ -68,6 +78,15 @@ export function uploadKnowledgeDoc(data: FormData): Promise<ApiResult<SopUploadR
});
}
export function reviewKnowledgeSop(id: number, data: { usable: boolean; reviewer?: string; note?: string }): Promise<ApiResult<SopReviewResponse>> {
return request({
url: `/api/knowledge/reviews/${id}`,
method: 'post',
data,
headers: { repeatSubmit: false }
});
}
export type UploadEnqueueResponse = {
itemId: number;
batchId: string;