From 8c5024a943b9999336ac3b491b5384c43bb54d30 Mon Sep 17 00:00:00 2001
From: huangzhenbao <17818024429@163.com>
Date: Wed, 28 Jan 2026 11:10:05 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E5=B8=83?=
=?UTF-8?q?=E5=B1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mall/admin/homePage/index.uvue | 215 ++++++++++++++---------
pages/mall/admin/product-management.uvue | 1 +
2 files changed, 130 insertions(+), 86 deletions(-)
diff --git a/pages/mall/admin/homePage/index.uvue b/pages/mall/admin/homePage/index.uvue
index 98a2280e..f488d5c2 100644
--- a/pages/mall/admin/homePage/index.uvue
+++ b/pages/mall/admin/homePage/index.uvue
@@ -54,24 +54,32 @@
+
-
+
- 📊 ECharts 组合图:柱状图(订单金额) + 折线图(订单数量)
- 时间粒度:{{ selectedPeriodLabel }}
+
+ 111
@@ -146,7 +154,10 @@ const kpiData = ref({
// 图表配置
const selectedPeriod = ref('30days')
-const selectedPeriodLabel = ref('30天')
+const selectedPeriodLabel = computed((): string => {
+ const hit = chartPeriods.value.find((x) => x.value === selectedPeriod.value)
+ return hit ? hit.label : ""
+})
const chartPeriods = [
{ label: '30天', value: '30days' },
@@ -155,6 +166,12 @@ const chartPeriods = [
{ label: '年', value: 'year' }
]
+type PeriodItem = {
+ label: string
+ value: string
+}
+
+
// 方法
const formatNumber = (num: number) => {
if (num >= 10000) {
@@ -178,6 +195,8 @@ const changePeriod = (period: string) => {
// TODO: 重新加载图表数据
console.log('切换时间粒度:', period)
}
+
+