diff --git a/zbf-ui/src/assets/images/ldr_logo.png b/zbf-ui/src/assets/images/ldr_logo.png new file mode 100644 index 0000000..a36cf88 Binary files /dev/null and b/zbf-ui/src/assets/images/ldr_logo.png differ diff --git a/zbf-ui/src/layout/components/Navbar.vue b/zbf-ui/src/layout/components/Navbar.vue index 871b183..ba93c33 100644 --- a/zbf-ui/src/layout/components/Navbar.vue +++ b/zbf-ui/src/layout/components/Navbar.vue @@ -4,8 +4,8 @@ - - 技术创新中心-{{ this.deptLabel }} + + 利德尔-技术创新中心-{{ this.deptLabel }}
@@ -157,7 +161,20 @@ export default { // { month: '三月', values: [40, 50, 60, 70] }, // 添加更多月份数据... ], - barColors: ['#4B96FF', '#41D9D9', '#de8226', '#FFC442','#c5229f','#63CF7E','#FF6384', '#36A2EB', '#FFCE56', '#4BC0C0'], + barColors: [ + { start: '#667eea', end: '#764ba2' }, // 紫色渐变 + { start: '#f093fb', end: '#f5576c' }, // 粉红渐变 + { start: '#4facfe', end: '#00f2fe' }, // 蓝青渐变 + { start: '#43e97b', end: '#38f9d7' }, // 绿青渐变 + { start: '#fa709a', end: '#fee140' }, // 橙黄渐变 + { start: '#30cfd0', end: '#330867' }, // 深蓝渐变 + { start: '#a8edea', end: '#fed6e3' }, // 粉绿渐变 + { start: '#ff6b6b', end: '#feca57' }, // 红黄渐变 + { start: '#5f27cd', end: '#341f97' }, // 深紫渐变 + { start: '#48dbfb', end: '#0abde3' }, // 亮蓝渐变 + { start: '#1dd1a1', end: '#10ac84' }, // 绿色渐变 + { start: '#ee5a6f', end: '#c44569' } // 玫瑰渐变 + ], centerNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], // maintenanceCenters: [], @@ -212,6 +229,74 @@ export default { getTooltipContent(monthData, index) { return `${this.centerNames[index]}: ${monthData.values[index]}%`; }, + // 获取通用图表配置 + getCommonChartConfig() { + return { + animation: true, + animationDuration: 1000, + animationEasing: 'cubicOut', + animationDelay: (idx) => idx * 100, + tooltip: { + trigger: 'axis', + backgroundColor: 'rgba(10, 22, 40, 0.95)', + borderColor: 'rgba(75, 150, 255, 0.5)', + borderWidth: 1, + textStyle: { + color: '#fff', + fontSize: 14 + }, + padding: [12, 16], + extraCssText: 'backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,0.6); border-radius: 8px;' + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + axisLine: { + lineStyle: { + color: 'rgba(255, 255, 255, 0.2)', + width: 1 + } + }, + axisLabel: { + color: 'rgba(255, 255, 255, 0.7)', + fontSize: 12 + }, + splitLine: { + show: false + } + }, + yAxis: { + axisLine: { + lineStyle: { + color: 'rgba(255, 255, 255, 0.2)', + width: 1 + } + }, + axisLabel: { + color: 'rgba(255, 255, 255, 0.7)', + fontSize: 12 + }, + splitLine: { + lineStyle: { + color: 'rgba(255, 255, 255, 0.08)', + type: 'dashed' + } + } + } + }; + }, + // 获取渐变色 + getGradientColor(colorIndex) { + const colors = this.barColors[colorIndex % this.barColors.length]; + return new echarts.graphic.LinearGradient(0, 1, 0, 0, [ + { offset: 0, color: colors.start }, + { offset: 1, color: colors.end } + ]); + }, async fetchData() { this.loading = true; try { @@ -362,13 +447,18 @@ export default { roundCap: true, clip: false, itemStyle: { - color: '#4B96FF' + color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [ + { offset: 0, color: '#4facfe' }, + { offset: 1, color: '#00f2fe' } + ]), + shadowBlur: 20, + shadowColor: 'rgba(79, 172, 254, 0.8)' } }, axisLine: { lineStyle: { - width: 8, - color: [[1, 'rgba(75, 150, 255, 0.1)']] + width: 10, + color: [[1, 'rgba(255, 255, 255, 0.1)']] } }, splitLine: {show: false}, @@ -382,11 +472,15 @@ export default { } }], detail: { - fontSize: 14, + fontSize: 16, color: '#fff', + fontWeight: 700, formatter: '{value}%' } - }] + }], + animation: true, + animationDuration: 2000, + animationEasing: 'elasticOut' }; chart.setOption(option); this.charts.push(chart); @@ -405,16 +499,21 @@ export default { radius: '100%', progress: { show: true, - width: 18, + width: 20, itemStyle: { - color: '#4B96FF' + color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [ + { offset: 0, color: '#4facfe' }, + { offset: 1, color: '#00f2fe' } + ]), + shadowBlur: 20, + shadowColor: 'rgba(79, 172, 254, 0.8)' } }, pointer: { show: false }, axisLine: { lineStyle: { - width: 18, - color: [[1, 'rgba(75, 150, 255, 0.1)']] + width: 20, + color: [[1, 'rgba(255, 255, 255, 0.1)']] } }, axisTick: { show: false }, @@ -424,70 +523,109 @@ export default { valueAnimation: true, formatter: '{value}%', color: '#fff', - fontSize: 24, + fontSize: 28, + fontWeight: 700, offsetCenter: [0, '20%'] }, data: [{ value: data, name: '预算使用率', title: { - offsetCenter: [0, '80%'] + offsetCenter: [0, '80%'], + color: 'rgba(255, 255, 255, 0.7)', + fontSize: 14 } }] - }] + }], + animation: true, + animationDuration: 2000, + animationEasing: 'elasticOut' }; chart.setOption(option); this.charts.push(chart); }, initMonthlyPurchaseChart() { const chart = echarts.init(this.$refs.monthlyPurchaseChart); + const commonConfig = this.getCommonChartConfig(); + const option = { + ...commonConfig, tooltip: { - trigger: 'axis' + ...commonConfig.tooltip, + axisPointer: { + type: 'shadow', + shadowStyle: { + color: 'rgba(75, 150, 255, 0.1)' + } + } }, legend: { data: ['入库金额', '出库金额'], - textStyle: { color: '#fff' } - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true + textStyle: { + color: '#fff', + fontSize: 14 + }, + itemWidth: 20, + itemHeight: 12, + itemGap: 20 }, xAxis: { + ...commonConfig.xAxis, type: 'category', data: Object.keys(this.monthlyPurchaseData), - axisLine: { - lineStyle: { color: '#ffffff30' } - }, axisLabel: { - color: '#fff', + ...commonConfig.xAxis.axisLabel, rotate: 45 } }, yAxis: { - type: 'value', - axisLine: { - lineStyle: { color: '#ffffff30' } - }, - splitLine: { - lineStyle: { color: '#ffffff10' } - }, - axisLabel: { color: '#fff' } + ...commonConfig.yAxis, + type: 'value' }, series: [ { name: '入库金额', type: 'bar', data: Object.values(this.monthlyPurchaseData).map(item => item[0][0]), - itemStyle: { color: '#4B96FF' } + barWidth: '35%', + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ + { offset: 0, color: '#667eea' }, + { offset: 1, color: '#764ba2' } + ]), + borderRadius: [8, 8, 0, 0], + shadowBlur: 10, + shadowColor: 'rgba(102, 126, 234, 0.5)', + shadowOffsetY: 3 + }, + emphasis: { + itemStyle: { + shadowBlur: 20, + shadowColor: 'rgba(102, 126, 234, 0.8)' + } + } }, { name: '出库金额', type: 'bar', data: Object.values(this.monthlyPurchaseData).map(item => item[1][0]), - itemStyle: { color: '#41D9D9' } + barWidth: '35%', + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ + { offset: 0, color: '#4facfe' }, + { offset: 1, color: '#00f2fe' } + ]), + borderRadius: [8, 8, 0, 0], + shadowBlur: 10, + shadowColor: 'rgba(79, 172, 254, 0.5)', + shadowOffsetY: 3 + }, + emphasis: { + itemStyle: { + shadowBlur: 20, + shadowColor: 'rgba(79, 172, 254, 0.8)' + } + } } ] }; @@ -496,58 +634,71 @@ export default { }, initSixMonthChart() { const chart = echarts.init(this.$refs.sixMonthChart); + const commonConfig = this.getCommonChartConfig(); const now = new Date(); const currentMonth = now.getMonth(); const months = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']; const xAxisData = Array.from({ length: 6 }, (_, i) => months[(currentMonth - i -1+ 12) % 12]); const option = { + ...commonConfig, tooltip: { - trigger: 'axis' - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true + ...commonConfig.tooltip, + axisPointer: { + type: 'cross', + lineStyle: { + color: 'rgba(255, 255, 255, 0.3)', + type: 'dashed' + } + } }, xAxis: { + ...commonConfig.xAxis, type: 'category', boundaryGap: false, - data: [...xAxisData].reverse(), - axisLine: { - lineStyle: { color: '#ffffff30' } - }, - axisLabel: { color: '#fff' } + data: [...xAxisData].reverse() }, yAxis: { - type: 'value', - axisLine: { - lineStyle: { color: '#ffffff30' } - }, - splitLine: { - lineStyle: { color: '#ffffff10' } - }, - axisLabel: { color: '#fff' } + ...commonConfig.yAxis, + type: 'value' }, series: [{ data: [...this.sixMonthData].reverse(), type: 'line', smooth: true, symbol: 'circle', - symbolSize: 8, + symbolSize: 10, + showSymbol: true, + lineStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ + { offset: 0, color: '#4facfe' }, + { offset: 1, color: '#00f2fe' } + ]), + width: 4, + shadowBlur: 15, + shadowColor: 'rgba(79, 172, 254, 0.6)', + shadowOffsetY: 5 + }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: 'rgba(75, 150, 255, 0.3)' }, - { offset: 1, color: 'rgba(75, 150, 255, 0)' } + { offset: 0, color: 'rgba(79, 172, 254, 0.5)' }, + { offset: 1, color: 'rgba(79, 172, 254, 0.05)' } ]) }, - lineStyle: { - color: '#4B96FF', - width: 3 - }, itemStyle: { - color: '#4B96FF' + color: '#fff', + borderColor: '#4facfe', + borderWidth: 3, + shadowBlur: 15, + shadowColor: 'rgba(79, 172, 254, 1)' + }, + emphasis: { + scale: true, + scaleSize: 15, + itemStyle: { + shadowBlur: 25, + shadowColor: 'rgba(79, 172, 254, 1)' + } } }] }; @@ -588,53 +739,86 @@ export default { }, initMonthlyInOutChart() { const chart = echarts.init(this.$refs.monthlyInOutChart); + const commonConfig = this.getCommonChartConfig(); + const option = { + ...commonConfig, tooltip: { - trigger: 'axis' + ...commonConfig.tooltip, + axisPointer: { + type: 'shadow', + shadowStyle: { + color: 'rgba(75, 150, 255, 0.1)' + } + } }, legend: { data: ['入库金额', '出库金额'], - textStyle: { color: '#fff' } - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true + textStyle: { + color: '#fff', + fontSize: 14 + }, + itemWidth: 20, + itemHeight: 12, + itemGap: 20 }, xAxis: { + ...commonConfig.xAxis, type: 'category', data: Object.keys(this.monthlyInOutData), - axisLine: { - lineStyle: { color: '#ffffff30' } - }, axisLabel: { - color: '#fff', + ...commonConfig.xAxis.axisLabel, rotate: 45 } }, yAxis: { - type: 'value', - axisLine: { - lineStyle: { color: '#ffffff30' } - }, - splitLine: { - lineStyle: { color: '#ffffff10' } - }, - axisLabel: { color: '#fff' } + ...commonConfig.yAxis, + type: 'value' }, series: [ { name: '入库金额', type: 'bar', data: Object.values(this.monthlyInOutData).map(item => item[1]), - itemStyle: { color: '#4B96FF' } + barWidth: '35%', + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ + { offset: 0, color: '#43e97b' }, + { offset: 1, color: '#38f9d7' } + ]), + borderRadius: [8, 8, 0, 0], + shadowBlur: 10, + shadowColor: 'rgba(67, 233, 123, 0.5)', + shadowOffsetY: 3 + }, + emphasis: { + itemStyle: { + shadowBlur: 20, + shadowColor: 'rgba(67, 233, 123, 0.8)' + } + } }, { name: '出库金额', type: 'bar', data: Object.values(this.monthlyInOutData).map(item => item[0]), - itemStyle: { color: '#41D9D9' } + barWidth: '35%', + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [ + { offset: 0, color: '#f093fb' }, + { offset: 1, color: '#f5576c' } + ]), + borderRadius: [8, 8, 0, 0], + shadowBlur: 10, + shadowColor: 'rgba(240, 147, 251, 0.5)', + shadowOffsetY: 3 + }, + emphasis: { + itemStyle: { + shadowBlur: 20, + shadowColor: 'rgba(240, 147, 251, 0.8)' + } + } } ] }; @@ -695,32 +879,82 @@ export default { })); const option = { tooltip: { - trigger: 'item' + trigger: 'item', + backgroundColor: 'rgba(10, 22, 40, 0.95)', + borderColor: 'rgba(75, 150, 255, 0.5)', + borderWidth: 1, + textStyle: { + color: '#fff', + fontSize: 14 + }, + padding: [12, 16], + extraCssText: 'backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,0.6); border-radius: 8px;', + formatter: '{b}
{c}万元 ({d}%)' }, - // legend: { - // orient: 'vertical', - // right: '5%', - // top: 'center', - // textStyle: { color: '#fff' } - // }, series: [ { type: 'pie', - radius: ['50%', '90%'], + radius: ['45%', '75%'], center: ['50%', '50%'], - data: dataArray, + roseType: 'radius', itemStyle: { - color: function(params) { - const colors = ['#4B96FF', '#41D9D9', '#63CF7E', '#FFC442', '#FF7D7D']; - return colors[params.dataIndex % colors.length]; + borderRadius: 10, + borderColor: 'rgba(10, 22, 40, 0.5)', + borderWidth: 3, + shadowBlur: 20, + shadowColor: 'rgba(0, 0, 0, 0.5)', + color: (params) => { + const gradients = [ + { start: '#667eea', end: '#764ba2' }, + { start: '#4facfe', end: '#00f2fe' }, + { start: '#43e97b', end: '#38f9d7' }, + { start: '#fa709a', end: '#fee140' }, + { start: '#30cfd0', end: '#330867' } + ]; + const idx = params.dataIndex % gradients.length; + return new echarts.graphic.LinearGradient(0, 0, 1, 1, [ + { offset: 0, color: gradients[idx].start }, + { offset: 1, color: gradients[idx].end } + ]); } }, label: { color: '#fff', - formatter: '{b}: {c}', - } + fontSize: 14, + fontWeight: 600, + formatter: '{b}\n{c}万元', + lineHeight: 20, + shadowBlur: 5, + shadowColor: 'rgba(0, 0, 0, 0.8)' + }, + labelLine: { + lineStyle: { + color: 'rgba(255, 255, 255, 0.4)', + width: 2 + }, + smooth: 0.3, + length: 20, + length2: 30 + }, + emphasis: { + scale: true, + scaleSize: 10, + itemStyle: { + shadowBlur: 35, + shadowOffsetX: 0, + shadowColor: 'rgba(0, 0, 0, 0.9)' + }, + label: { + fontSize: 16, + fontWeight: 700 + } + }, + data: dataArray } - ] + ], + animation: true, + animationDuration: 2000, + animationEasing: 'cubicOut' }; chart.setOption(option); this.charts.push(chart); @@ -808,30 +1042,104 @@ export default {