refactor(ui): 优化数据加载逻辑和缓存处理
- 移除不必要的初始化数据加载,保留关键数据请求 - 重构产品/原材料信息组件,改用计算属性替代watch - 分批加载产品/原材料数据,避免大请求阻塞 - 为数据加载添加loading状态提示 - 优化统计面板数据加载方式,改为顺序请求
This commit is contained in:
@@ -144,12 +144,12 @@ export default {
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||
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');
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(() => { });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user