refactor(ui): 优化数据加载逻辑和缓存处理
- 移除不必要的初始化数据加载,保留关键数据请求 - 重构产品/原材料信息组件,改用计算属性替代watch - 分批加载产品/原材料数据,避免大请求阻塞 - 为数据加载添加loading状态提示 - 优化统计面板数据加载方式,改为顺序请求
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user