From 840e6dbac99e230bc348746a9b768a01e3c18a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=AF=9A?= Date: Sat, 27 Dec 2025 22:34:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/styles/common.css | 5 +++ Web/src/views/BillAnalysisView.vue | 2 +- Web/src/views/StatisticsView.vue | 56 ++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/Web/src/styles/common.css b/Web/src/styles/common.css index 2f2dee1..c6251de 100644 --- a/Web/src/styles/common.css +++ b/Web/src/styles/common.css @@ -142,6 +142,11 @@ background-color: transparent; } +/* 禁止在导航栏上进行拖动操作 */ +.page-container-flex :deep(.van-nav-bar) { + touch-action: none; +} + /* 修复表单字段过长时的换行显示 */ :deep(.van-field__control) { word-break: break-all; diff --git a/Web/src/views/BillAnalysisView.vue b/Web/src/views/BillAnalysisView.vue index 3605f10..f52f2c0 100644 --- a/Web/src/views/BillAnalysisView.vue +++ b/Web/src/views/BillAnalysisView.vue @@ -8,7 +8,7 @@ @click-left="onClickLeft" /> -
+
+ +
+
+

不计收支分类统计

+ {{ noneCategories.length }}类 +
+ +
+
+
+
+
+ {{ category.classify || '未分类' }} + {{ category.count }}笔 +
+
+
+
¥{{ formatMoney(category.amount) }}
+
{{ category.percent }}%
+
+ +
+
+
+
@@ -332,6 +362,7 @@ const monthlyData = ref({ // 分类数据 const expenseCategories = ref([]) const incomeCategories = ref([]) +const noneCategories = ref([]) // 趋势数据 const trendData = ref([]) @@ -518,6 +549,22 @@ const fetchCategoryData = async () => { percent: item.percent })) } + + // 获取不计收支分类 + const noneResponse = await getCategoryStatistics({ + year: currentYear.value, + month: currentMonth.value, + type: 2 // 不计收支 + }) + + if (noneResponse.success && noneResponse.data) { + noneCategories.value = noneResponse.data.map(item => ({ + classify: item.classify, + amount: item.amount, + count: item.count, + percent: item.percent + })) + } } catch (error) { console.error('获取分类数据失败:', error) showToast('获取分类数据失败') @@ -918,6 +965,15 @@ onActivated(() => { color: #51cf66; } +/* 不计收支颜色 */ +.none-color { + background-color: #909399; +} + +.none-text { + color: #909399; +} + .expense-color { background-color: #ff6b6b; }