perf: 计划费用保存/删除性能优化
- 后端新增/api/<resource>/list轻量级列表接口 - plan_expense.js保存/删除后改为轻量刷新,不再调load() - 避免全量bootstrap+7模块渲染,只刷新费用列表 - 版本号 v1.0.0.37
This commit is contained in:
@@ -199,8 +199,10 @@ window.savePlanExpense = async function(event) {
|
||||
return;
|
||||
}
|
||||
closePlanExpModal();
|
||||
await load();
|
||||
renderPlanExpense();
|
||||
try {
|
||||
state.data.planExpense = await api("/api/planExpense/list?tenant=" + encodeURIComponent(state.tenant));
|
||||
renderPlanExpense();
|
||||
} catch (e) { /* non-critical */ }
|
||||
};
|
||||
|
||||
window.deletePlanExpItem = async function() {
|
||||
@@ -213,6 +215,8 @@ window.deletePlanExpItem = async function() {
|
||||
return;
|
||||
}
|
||||
closePlanExpModal();
|
||||
await load();
|
||||
renderPlanExpense();
|
||||
try {
|
||||
state.data.planExpense = await api("/api/planExpense/list?tenant=" + encodeURIComponent(state.tenant));
|
||||
renderPlanExpense();
|
||||
} catch (e) { /* non-critical */ }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user