fix(storage): 修复存储操作响应类型,兼容现有使用处

This commit is contained in:
xudan 2025-10-22 17:20:43 +08:00
parent 40b1891ca1
commit 0e9c0eb037
2 changed files with 7 additions and 2 deletions

View File

@ -252,7 +252,7 @@ const handleStorageAction = async (action: string, actionName: string) => {
action, action,
location: selectedLocation.value, location: selectedLocation.value,
success: true, success: true,
}); } as any);
} catch (error) { } catch (error) {
console.error(`库位${actionName}操作失败:`, error); console.error(`库位${actionName}操作失败:`, error);
@ -262,7 +262,7 @@ const handleStorageAction = async (action: string, actionName: string) => {
location: selectedLocation.value, location: selectedLocation.value,
success: false, success: false,
message: error instanceof Error ? error.message : String(error), message: error instanceof Error ? error.message : String(error),
}); } as any);
} }
}; };

View File

@ -26,6 +26,11 @@ export interface StorageActionResponse {
layer_name: string; layer_name: string;
error: string; error: string;
}>; }>;
// 为兼容现有使用处storageActionService.ts
results?: Array<{
layer_name: string;
message: string;
}>;
}; };
} }