From 477bcafeb738babdb042e392e3e74bf66154ea36 Mon Sep 17 00:00:00 2001 From: wren <“porlong@qq.com”> Date: Thu, 30 Apr 2026 12:52:26 +0800 Subject: [PATCH] feat: extend DocumentType interface with code, entryModuleId, isEnabled, ruleSetIds --- app/api/files/files-upload.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/api/files/files-upload.ts b/app/api/files/files-upload.ts index 63fb455..e7cc6bd 100644 --- a/app/api/files/files-upload.ts +++ b/app/api/files/files-upload.ts @@ -126,6 +126,10 @@ export enum DocumentStatus { export interface DocumentType { id: number; name: string; + code?: string; + entryModuleId?: number; + isEnabled?: boolean; + ruleSetIds?: number[]; } // 提取结果接口 @@ -542,9 +546,13 @@ export async function getDocumentTypes(token?: string): Promise<{data: DocumentT const body = response.data; if (body?.data && Array.isArray(body.data)) { - const types: DocumentType[] = body.data.map((item: { id: number; name: string; code?: string }) => ({ + const types: DocumentType[] = body.data.map((item: { id: number; name: string; code?: string; entryModuleId?: number; isEnabled?: boolean; ruleSetIds?: number[] }) => ({ id: item.id, name: item.name, + code: item.code, + entryModuleId: item.entryModuleId, + isEnabled: item.isEnabled, + ruleSetIds: item.ruleSetIds, })); return { data: types }; }