diff --git a/src/assets/img/admin/Vector.png b/src/assets/img/admin/Vector.png new file mode 100644 index 0000000..3ba3f40 Binary files /dev/null and b/src/assets/img/admin/Vector.png differ diff --git a/src/assets/img/admin/Vector1.png b/src/assets/img/admin/Vector1.png new file mode 100644 index 0000000..1792fba Binary files /dev/null and b/src/assets/img/admin/Vector1.png differ diff --git a/src/views/dashboard/console/index.vue b/src/views/dashboard/console/index.vue index be9ac9f..2065de7 100644 --- a/src/views/dashboard/console/index.vue +++ b/src/views/dashboard/console/index.vue @@ -17,53 +17,73 @@
-
-

总体情况

-
-
-
{{statisticswholedata.totals}}
-
总单数
-
-
-
{{statisticswholedata.channelCount}}
-
渠道总数
-
-
-
{{statisticswholedata.todayCount}}
-
今日录单
-
-
-
{{statisticswholedata.releaseCount}}
-
发布人总数
-
-
-
{{statisticswholedata.countryCount}}
-
国家总数
-
-
-
{{statisticswholedata.trackCount}}
-
跟单人总数
+
+ +
+

总体情况

+
+
+
{{ statisticswholedata.totals }}
+
总单数
+
+
+
{{ statisticswholedata.channelCount }}
+
渠道总数
+
+
+
{{ statisticswholedata.todayCount }}
+
今日录单
+
+
+
{{ statisticswholedata.releaseCount }}
+
发布人总数
+
+
+
{{ statisticswholedata.countryCount }}
+
国家总数
+
+
+
{{ statisticswholedata.trackCount }}
+
跟单人总数
+
+
+ +
+ +
+
+
-
-
-

询单计数

-
- - - - - +
+ +
+
+

询单计数

+
+ + + + + +
+
+
+ +
+ +
+
+
-
@@ -76,23 +96,47 @@
-
-

各渠道计数

-
+
+ + +
+ +
+
+

各渠道计数

+
+
+
+ +
+ +
-
-

每日录单

-
+
+
+ +
+ +
+

每日录单

+
+
+ +
+ +
-
-
-

跟单人计数

+ +
+
+

跟单人计数

+
+
-
-
+
@@ -103,7 +147,11 @@ import worldGeoJson from '@/assets/geo/world.json' import { manageService } from '@/api/adminApi' defineOptions({ name: 'DataStatistics' }) - + // 图表显示状态 + const showallChart = ref(true) + const showchannelChart = ref(true) + const showPublisherChart = ref(true) + const showOrdersChart = ref(true) // Define interfaces for the data structures interface CountryData { name: string @@ -191,7 +239,49 @@ weekday: 'long' }) } - + // 切换发布人图表显示状态 + function togglePublisherChart() { + showPublisherChart.value = !showPublisherChart.value + if (showPublisherChart.value) { + nextTick(() => { + setTimeout(() => { + initPublisherChart(inquirycountdata) + // 关键:强制resize一次,确保图表自适应容器 + setTimeout(() => { + publisherChart?.resize() + }, 50) + }, 100) + }) + } + } + function toggleshowchannelChart() { + showchannelChart.value = !showchannelChart.value + if (showchannelChart.value) { + nextTick(() => { + setTimeout(() => { + initChannelChart(channelcountdata) + // 关键:强制resize一次,确保图表自适应容器 + setTimeout(() => { + channelChart?.resize() + }, 50) + }, 100) + }) + } + } + function toggleOrdersChart() { + showOrdersChart.value = !showOrdersChart.value + if (showOrdersChart.value) { + nextTick(() => { + setTimeout(() => { + initDailyOrdersChart(daycountdata) + // 关键:强制resize一次,确保图表自适应容器 + setTimeout(() => { + dailyOrdersChart?.resize() + }, 50) + }, 100) + }) + } + } // 切换跟单人图表显示状态 function toggleFollowUpChart() { showFollowUpChart.value = !showFollowUpChart.value @@ -1005,6 +1095,65 @@