Replace the monolithic useQueryToolData composable and nested Vue component tree with a modular architecture: useLotResolve, useLotLineage, useLotDetail, and useEquipmentQuery. Introduce ECharts TreeChart (LR orthogonal layout) for lot lineage visualization with multi-select support, subtree expansion, zoom/pan, and serial number normalization. Add unified LineageEngine backend with split descendant traversal and leaf serial number queries. Archive the query-tool-rewrite openspec change and sync delta specs to main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
74 lines
2.5 KiB
JavaScript
74 lines
2.5 KiB
JavaScript
function createNativeLoader(componentLoader, styleLoaders = []) {
|
|
let styleBootstrapPromise = null;
|
|
|
|
return async () => {
|
|
if (!styleBootstrapPromise) {
|
|
styleBootstrapPromise = Promise.all(styleLoaders.map((loadStyle) => loadStyle())).catch((error) => {
|
|
styleBootstrapPromise = null;
|
|
throw error;
|
|
});
|
|
}
|
|
await styleBootstrapPromise;
|
|
return componentLoader();
|
|
};
|
|
}
|
|
|
|
const NATIVE_MODULE_LOADERS = Object.freeze({
|
|
'/wip-overview': createNativeLoader(
|
|
() => import('../wip-overview/App.vue'),
|
|
[() => import('../wip-overview/style.css')],
|
|
),
|
|
'/wip-detail': createNativeLoader(
|
|
() => import('../wip-detail/App.vue'),
|
|
[() => import('../wip-detail/style.css')],
|
|
),
|
|
'/hold-overview': createNativeLoader(
|
|
() => import('../hold-overview/App.vue'),
|
|
[() => import('../wip-shared/styles.css'), () => import('../hold-overview/style.css')],
|
|
),
|
|
'/hold-detail': createNativeLoader(
|
|
() => import('../hold-detail/App.vue'),
|
|
[() => import('../hold-detail/style.css')],
|
|
),
|
|
'/hold-history': createNativeLoader(
|
|
() => import('../hold-history/App.vue'),
|
|
[() => import('../wip-shared/styles.css'), () => import('../hold-history/style.css')],
|
|
),
|
|
'/resource': createNativeLoader(
|
|
() => import('../resource-status/App.vue'),
|
|
[() => import('../resource-shared/styles.css'), () => import('../resource-status/style.css')],
|
|
),
|
|
'/resource-history': createNativeLoader(
|
|
() => import('../resource-history/App.vue'),
|
|
[() => import('../resource-shared/styles.css'), () => import('../resource-history/style.css')],
|
|
),
|
|
'/qc-gate': createNativeLoader(
|
|
() => import('../qc-gate/App.vue'),
|
|
[() => import('../qc-gate/style.css')],
|
|
),
|
|
'/job-query': createNativeLoader(
|
|
() => import('../job-query/App.vue'),
|
|
[() => import('../resource-shared/styles.css'), () => import('../job-query/style.css')],
|
|
),
|
|
'/excel-query': createNativeLoader(
|
|
() => import('../excel-query/App.vue'),
|
|
[() => import('../excel-query/style.css')],
|
|
),
|
|
'/query-tool': createNativeLoader(
|
|
() => import('../query-tool/App.vue'),
|
|
[() => import('../resource-shared/styles.css')],
|
|
),
|
|
'/tmtt-defect': createNativeLoader(
|
|
() => import('../tmtt-defect/App.vue'),
|
|
[() => import('../tmtt-defect/style.css')],
|
|
),
|
|
'/tables': createNativeLoader(
|
|
() => import('../tables/App.vue'),
|
|
[() => import('../tables/style.css')],
|
|
),
|
|
});
|
|
|
|
export function getNativeModuleLoader(route) {
|
|
return NATIVE_MODULE_LOADERS[String(route || '').trim()] || null;
|
|
}
|