提交
This commit is contained in:
1 parent
4daf990fab
commit
1ca2668112
219 files changed
+29817
-20945
No files matched your search
@@ -0,0 +1,34 @@
|
||||
/** 生产任务编辑弹窗 · 工艺库与步骤配置参考数据(会话级缓存,减少重复 editor-init 请求) */
|
||||
|
||||
export type ProductionTaskEditorReferenceOptions = {
|
||||
processCategories: Record<string, any>[]
|
||||
sops: Record<string, any>[]
|
||||
outputTypes: Record<string, any>[]
|
||||
equipments: Record<string, any>[]
|
||||
reagents: Record<string, any>[]
|
||||
consumables: Record<string, any>[]
|
||||
itemUnits: Record<string, any>[]
|
||||
}
|
||||
|
||||
export type ProductionTaskEditorReferenceCache = {
|
||||
processLibrary: Record<string, any>[]
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user