运营驾驶舱修改部分

This commit is contained in:
2026-03-27 11:12:13 +08:00
parent b85ceb2542
commit 05fe91618c
13 changed files with 672 additions and 44 deletions

View File

@@ -39,7 +39,7 @@ export default {
return {
// 图表样式配置项,可以抽离出来方便管理
chartConfig: {
manageCost: {
'管理费用': {
name: '管理费用',
lineColor: 'rgba(11, 88, 255, .5)',
itemColor: 'rgba(11, 88, 255, .5)',
@@ -49,7 +49,7 @@ export default {
{ offset: 1, color: 'rgba(18, 255, 245, 0)' },
]
},
saleCost: {
'销售费用': {
name: '销售费用',
lineColor: 'rgba(54, 181, 138, .5)',
itemColor: 'rgba(54, 181, 138, .5)',
@@ -59,7 +59,7 @@ export default {
{ offset: 1, color: 'rgba(18, 255, 245, 0)' },
]
},
financeCost: {
'财务费用': {
name: '财务费用',
lineColor: 'rgba(255, 132, 0, .5)',
itemColor: 'rgba(255, 132, 0, .5)',
@@ -78,7 +78,7 @@ export default {
// 从 cost.line 中获取任意一个有数据的键的 keys 作为 X 轴
const lineData = this.line || {};
const firstKey = Object.keys(lineData)[0];
return firstKey ? Object.keys(lineData[firstKey]) : [];
return firstKey ? Object.keys(lineData[firstKey].real) : [];
},
// 动态生成 series 数据
chartSeries() {
@@ -94,7 +94,7 @@ export default {
return Object.keys(this.chartConfig).map(key => {
const config = this.chartConfig[key];
// 确保数据顺序和 X 轴一致
const dataValues = xAxisKeys.map(date => lineData[key] ? lineData[key][date] : 0);
const dataValues = xAxisKeys.map(date => lineData[key] ? lineData[key].real[date] : 0);
return {
name: config.name,