运营驾驶舱对接
This commit is contained in:
@@ -87,11 +87,14 @@ export default {
|
||||
|
||||
// 如果没有 X 轴数据,则返回空数组
|
||||
if (xAxisKeys.length === 0) {
|
||||
return [];
|
||||
return {};
|
||||
}
|
||||
let obj = {
|
||||
unit:'万元',
|
||||
series:[]
|
||||
}
|
||||
|
||||
// 遍历配置项,生成 series
|
||||
return Object.keys(this.chartConfig).map(key => {
|
||||
obj.series = Object.keys(this.chartConfig).map(key => {
|
||||
const config = this.chartConfig[key];
|
||||
// 确保数据顺序和 X 轴一致
|
||||
const dataValues = xAxisKeys.map(date => lineData[key] ? lineData[key].real[date] : 0);
|
||||
@@ -114,6 +117,7 @@ export default {
|
||||
data: dataValues
|
||||
};
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
|
||||
Reference in New Issue
Block a user