From 913472fa39ae230088d97714b4e4522f064c1954 Mon Sep 17 00:00:00 2001
From: zhoulexin <544279058@qq.com>
Date: Mon, 29 Jun 2026 17:59:19 +0800
Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BC=98=E5=8C=96=E5=9B=BE?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/home/components/ChartsPanel.vue | 31 ++++++++++++-----------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/views/home/components/ChartsPanel.vue b/src/views/home/components/ChartsPanel.vue
index d5d094f..50f9925 100644
--- a/src/views/home/components/ChartsPanel.vue
+++ b/src/views/home/components/ChartsPanel.vue
@@ -77,7 +77,7 @@ function updateBarChart() {
}))
// 剩余值(9 - 实际值)— 用当前数据的浅色版本
const remainData = props.counts.map((item, idx) => ({
- value: Math.max(0, 9 - item.count),
+ value: Math.max(0, 10 - item.count),
itemStyle: { color: lightenColor(colors[idx % colors.length], 0.7), borderRadius: [4, 4, 0, 0] }
}))
@@ -88,7 +88,8 @@ function updateBarChart() {
formatter(params) {
const actual = params.find(p => p.seriesName === '实际值')
if (!actual) return ''
- return `${actual.name}
${actual.marker} 检测数: ${actual.value}/9`
+ // return `${actual.name}
${actual.marker} 检测数: ${actual.value}/9`
+ return `${actual.name}
${actual.marker} 检测数: ${actual.value}`
}
},
grid: { left: '5%', right: '5%', bottom: '5%', top: '15%', containLabel: true },
@@ -96,7 +97,7 @@ function updateBarChart() {
yAxis: {
type: 'value',
minInterval: 1,
- max: 9,
+ // max: 9,
splitLine: { lineStyle: { type: 'dashed', color: '#eee' } }
},
series: [
@@ -106,18 +107,18 @@ function updateBarChart() {
stack: 'total',
barWidth: 22,
data: actualData,
- markLine: {
- silent: true,
- symbol: 'none',
- lineStyle: { color: '#e6a23c', type: 'dashed', width: 2 },
- label: {
- formatter: '上限: 9',
- color: '#e6a23c',
- fontSize: 12,
- position: 'insideEndTop'
- },
- data: [{ yAxis: 9 }]
- }
+ // markLine: {
+ // silent: true,
+ // symbol: 'none',
+ // lineStyle: { color: '#e6a23c', type: 'dashed', width: 2 },
+ // label: {
+ // formatter: '上限: 9',
+ // color: '#e6a23c',
+ // fontSize: 12,
+ // position: 'insideEndTop'
+ // },
+ // data: [{ yAxis: 9 }]
+ // }
},
{
type: 'bar',