refactor(ui): 优化数据加载逻辑和缓存处理

- 移除不必要的初始化数据加载,保留关键数据请求
- 重构产品/原材料信息组件,改用计算属性替代watch
- 分批加载产品/原材料数据,避免大请求阻塞
- 为数据加载添加loading状态提示
- 优化统计面板数据加载方式,改为顺序请求
This commit is contained in:
砂糖
2025-11-15 14:11:12 +08:00
parent 62340519d1
commit e24f0f77eb
8 changed files with 197 additions and 126 deletions

View File

@@ -14,12 +14,12 @@ export default {
created() {
// 应用启动时全局初始化分类数据
if (this.$store.getters.token) {
this.$store.dispatch('category/getCategoryList');
// this.$store.dispatch('category/getCategoryList');
this.$store.dispatch('category/getProductMap');
this.$store.dispatch('category/getRawMaterialMap');
this.$store.dispatch('category/getBomMap');
this.$store.dispatch('finance/getFinancialAccounts');
this.$store.dispatch('craft/getProcessList');
// this.$store.dispatch('category/getBomMap');
// this.$store.dispatch('finance/getFinancialAccounts');
// this.$store.dispatch('craft/getProcessList');
}
},
metaInfo() {