From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/views/dashboard/bagCodeHome/chart-options.ts | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/src/views/dashboard/bagCodeHome/chart-options.ts b/src/views/dashboard/bagCodeHome/chart-options.ts
new file mode 100644
index 0000000..045568b
--- /dev/null
+++ b/src/views/dashboard/bagCodeHome/chart-options.ts
@@ -0,0 +1,45 @@
+import type { EChartsOption } from '@vben/plugins/echarts';
+
+/** 琚嬬爜鐢熸垚瓒嬪娍鏌辩姸鍥鹃厤缃� */
+export function getBagCodeTrendChartOptions(
+ dates: string[],
+ counts: number[],
+): EChartsOption {
+ return {
+ grid: { bottom: 40, left: 50, right: 20, top: 20 },
+ legend: { bottom: 0, data: ['琚嬬爜鐢熸垚閲�'] },
+ series: [
+ {
+ barMaxWidth: 32,
+ data: counts,
+ itemStyle: { borderRadius: 4, color: '#409EFF' },
+ name: '琚嬬爜鐢熸垚閲�',
+ type: 'bar',
+ },
+ ],
+ tooltip: { axisPointer: { type: 'shadow' }, trigger: 'axis' },
+ xAxis: { axisTick: { show: false }, data: dates, type: 'category' },
+ yAxis: { minInterval: 1, type: 'value' },
+ };
+}
+
+/** 鐘舵�佸垎甯冪幆褰㈠浘閰嶇疆 */
+export function getStatusChartOptions(
+ data: Array<{ itemStyle: { color: string }; name: string; value: number }>,
+): EChartsOption {
+ return {
+ legend: { bottom: 0, type: 'scroll' },
+ series: [
+ {
+ avoidLabelOverlap: true,
+ data,
+ emphasis: { label: { fontSize: 14, fontWeight: 'bold', show: true } },
+ itemStyle: { borderColor: '#fff', borderRadius: 6, borderWidth: 2 },
+ label: { formatter: '{b}\n{c}', show: true },
+ radius: ['40%', '70%'],
+ type: 'pie',
+ },
+ ],
+ tooltip: { formatter: '{b}: {c} ({d}%)', trigger: 'item' },
+ };
+}
--
Gitblit v1.9.3