From 1c829f9177eab675b22be4d20ef2761ed1bbb423 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 15 九月 2026 16:15:48 +0800
Subject: [PATCH] refactor(layout): 调整布局样式并优化轮播卡片组件
---
src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue | 60 ++++++++++++++++++++++--------------------------------------
1 files changed, 22 insertions(+), 38 deletions(-)
diff --git a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
index 28de03b..0562fba 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/right-bottom.vue
@@ -1,7 +1,7 @@
<template>
<div>
<PanelHeader title="鐢熶骇鏍哥畻鍒嗘瀽" />
- <div class="main-panel panel-item-customers">
+ <div class="main-panel panel-item-customers bi-panel">
<div class="filters-row">
<DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
</div>
@@ -14,7 +14,7 @@
:tooltip="tooltip"
:xAxis="xAxis1"
:yAxis="yAxis1"
- :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }"
+ :options="{ backgroundColor: 'transparent', textStyle: { color: BI_COLORS.text } }"
style="height: 260px"
/>
</div>
@@ -27,19 +27,20 @@
import PanelHeader from './PanelHeader.vue'
import DateTypeSwitch from './DateTypeSwitch.vue'
import Echarts from '@/components/Echarts/echarts.vue'
+import { BI_COLORS, BI_TOOLTIP, barGradient } from '../theme.js'
-const dateType = ref(1)
+const dateType = ref(3) // 1=鍛� 2=鏈� 3=瀛e害锛岄粯璁ゅ搴�
const chartStyle = {
width: '100%',
- height: '140%',
+ height: '100%',
}
const grid = { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true }
const barLegend = {
show: true,
- textStyle: { color: '#B8C8E0' },
+ textStyle: { color: BI_COLORS.text },
data: ['瀹屾垚鏁伴噺', '宸ヨ祫閲戦', '鍚堟牸鐜�'],
}
@@ -51,17 +52,8 @@
barGap: '40%',
emphasis: { focus: 'series' },
itemStyle: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- { offset: 1, color: 'rgba(0, 164, 237, 0)' },
- { offset: 0, color: 'rgba(78, 228, 255, 1)' },
- ],
- },
+ borderRadius: [3, 3, 0, 0],
+ color: barGradient(BI_COLORS.primary),
},
data: [],
},
@@ -72,17 +64,8 @@
barWidth: 20,
emphasis: { focus: 'series' },
itemStyle: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- { offset: 1, color: 'rgba(83, 126, 245, 0.19)' },
- { offset: 0, color: 'rgba(144, 97, 248, 1)' },
- ],
- },
+ borderRadius: [3, 3, 0, 0],
+ color: barGradient(BI_COLORS.violet),
},
data: [],
},
@@ -90,42 +73,44 @@
name: '鍚堟牸鐜�',
type: 'line',
yAxisIndex: 1,
+ smooth: true,
showSymbol: true,
symbol: 'circle',
- symbolSize: 8,
- lineStyle: { color: 'rgba(90, 216, 166, 1)', width: 2 },
- itemStyle: { color: 'rgba(90, 216, 166, 1)' },
+ symbolSize: 6,
+ lineStyle: { color: BI_COLORS.amber, width: 2 },
+ itemStyle: { color: BI_COLORS.amber },
data: [],
emphasis: { focus: 'series' },
},
])
const xAxis1 = ref([
- { type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] },
+ { type: 'category', axisTick: { show: false }, axisLine: { lineStyle: { color: BI_COLORS.axisLine } }, axisLabel: { color: BI_COLORS.text }, data: [] },
])
const yAxis1 = [
{
type: 'value',
name: '鏁伴噺/閲戦',
- axisLabel: { color: '#B8C8E0' },
- nameTextStyle: { color: '#B8C8E0' },
- // splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } },
+ axisLabel: { color: BI_COLORS.text },
+ nameTextStyle: { color: BI_COLORS.text },
+ splitLine: { lineStyle: { color: BI_COLORS.splitLine } },
},
{
type: 'value',
name: '鍚堟牸鐜�(%)',
min: 0,
max: 100,
- axisLabel: { color: '#B8C8E0', formatter: '{value}%' },
- nameTextStyle: { color: '#B8C8E0' },
- splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } },
+ axisLabel: { color: BI_COLORS.text, formatter: '{value}%' },
+ nameTextStyle: { color: BI_COLORS.text },
+ splitLine: { show: false },
},
]
const tooltip = {
trigger: 'axis',
axisPointer: { type: 'cross' },
+ ...BI_TOOLTIP,
formatter(params) {
let result = params[0].axisValueLabel + '<br/>'
params.forEach((item) => {
@@ -178,7 +163,6 @@
}
.panel-item-customers {
- border: 1px solid #1a58b0;
padding: 18px;
width: 100%;
height: 449px;
--
Gitblit v1.9.3