/** 生产任务编辑弹窗 · 工艺库与步骤配置参考数据(会话级缓存,减少重复 editor-init 请求) */ export type ProductionTaskEditorReferenceOptions = { processCategories: Record[] sops: Record[] outputTypes: Record[] equipments: Record[] reagents: Record[] consumables: Record[] itemUnits: Record[] } export type ProductionTaskEditorReferenceCache = { processLibrary: Record[] options: ProductionTaskEditorReferenceOptions } let cachedReference: ProductionTaskEditorReferenceCache | null = null export function getCachedProductionTaskEditorReference(): ProductionTaskEditorReferenceCache | null { return cachedReference } export function setCachedProductionTaskEditorReference(data: ProductionTaskEditorReferenceCache) { cachedReference = data } export function hasCachedProductionTaskEditorReference(): boolean { return cachedReference !== null } export function clearProductionTaskEditorReferenceCache() { cachedReference = null }