From 6f725dbb137cfe45babb8be7f740c1febc206c5c Mon Sep 17 00:00:00 2001 From: SunCheng Date: Sat, 14 Feb 2026 12:58:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B6=E5=85=A5?= =?UTF-8?q?=E9=A2=84=E7=AE=97=E8=AE=A1=E7=AE=97=E5=92=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AD=98=E6=AC=BE=E8=AE=A1=E5=88=92=E6=98=8E=E7=BB=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题1:修复收入预算实际金额计算 - 在 BudgetRepository.cs 中修复 SelectedCategories.Split 逻辑 - 添加 StringSplitOptions.RemoveEmptyEntries 和 StringSplitOptions.TrimEntries 参数 - 添加单元测试验证修复 问题2:添加存款计划明细按钮和弹窗 - 在 BudgetCard.vue 中添加 'show-detail' emit - 为存款计划卡片(category === 2)添加明细按钮 - 在 SavingsBudgetContent.vue 中实现明细弹窗 - 弹窗显示:收入预算、支出预算、计划存款公式、存款结果 问题3:统一卡片样式 - 修复 BudgetChartAnalysis.vue 的卡片样式 - 使用 16px 圆角、增强阴影和边框 --- Repository/BudgetRepository.cs | 4 +- Web/src/components/Budget/BudgetCard.vue | 20 +- .../budgetV2/modules/SavingsBudgetContent.vue | 280 +++++++++++++++++- .../Repository/BudgetRepositoryTest.cs | 60 +++- 4 files changed, 356 insertions(+), 8 deletions(-) diff --git a/Repository/BudgetRepository.cs b/Repository/BudgetRepository.cs index edeeda4..7982f9f 100644 --- a/Repository/BudgetRepository.cs +++ b/Repository/BudgetRepository.cs @@ -1,4 +1,4 @@ -namespace Repository; +namespace Repository; public interface IBudgetRepository : IBaseRepository { @@ -16,7 +16,7 @@ public class BudgetRepository(IFreeSql freeSql) : BaseRepository(f if (!string.IsNullOrEmpty(budget.SelectedCategories)) { - var categoryList = budget.SelectedCategories.Split(','); + var categoryList = budget.SelectedCategories.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); query = query.Where(t => categoryList.Contains(t.Classify)); } diff --git a/Web/src/components/Budget/BudgetCard.vue b/Web/src/components/Budget/BudgetCard.vue index 0f5951f..bd614dc 100644 --- a/Web/src/components/Budget/BudgetCard.vue +++ b/Web/src/components/Budget/BudgetCard.vue @@ -1,4 +1,4 @@ - +