修复切换展示顺序,完成率不一起切换的问题
This commit is contained in:
@@ -83,7 +83,7 @@ export default {
|
||||
name,
|
||||
real: factory.reals[index],
|
||||
target: factory.targets[index],
|
||||
rate: factory.rate[index],
|
||||
rate: factory.rates[index],
|
||||
diff: factory.diff[index],
|
||||
flag: factory.flags[index]
|
||||
}));
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
{ offset: 1, color: 'rgba(40, 138, 255, 0)' }
|
||||
])
|
||||
},
|
||||
data: data.rate || [],
|
||||
data: data.rates || [],
|
||||
symbol: 'circle',
|
||||
symbolSize: 6
|
||||
},
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
diff: [], // 对应差值数组
|
||||
targets: [], // 预算值数组
|
||||
reals: [], // 实际值数组
|
||||
rate: [], // 完成率数组
|
||||
rates: [], // 完成率数组
|
||||
flags: [] // 完成状态数组(0/1)
|
||||
// baseIndexes: []// 对应levelId(序号)数组
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
const initTopBarData = {
|
||||
locations: [], diff: [], targets: [], reals: [], rate: [], flags: []
|
||||
};
|
||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rates: [], flags: [] };
|
||||
|
||||
if (!Array.isArray(this.monData) || this.monData.length === 0) {
|
||||
this.chartData = { topBarData: initTopBarData, barData: initBarData };
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
barData.diff.push(item.diffValue || 0);
|
||||
barData.targets.push(item.targetValue || 0);
|
||||
barData.reals.push(item.value || 0);
|
||||
barData.rate.push(item.proportion || 0);
|
||||
barData.rates.push(item.proportion || 0);
|
||||
barData.flags.push(item.completed ? 1 : 0);
|
||||
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
diff: [], // 对应差值数组
|
||||
targets: [], // 预算值数组
|
||||
reals: [], // 实际值数组
|
||||
rate: [], // 完成率数组
|
||||
rates: [], // 完成率数组
|
||||
flags: [] // 完成状态数组(0/1)
|
||||
// baseIndexes: []// 对应levelId(序号)数组
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
const initTopBarData = {
|
||||
locations: [], diff: [], targets: [], reals: [], rate: [], flags: []
|
||||
};
|
||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] };
|
||||
const initBarData = { locations: [], diff: [], targets: [], reals: [], rates: [], flags: [] };
|
||||
|
||||
if (!Array.isArray(this.totalData) || this.totalData.length === 0) {
|
||||
this.chartData = { topBarData: initTopBarData, barData: initBarData };
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
barData.diff.push(item.diffValue || 0);
|
||||
barData.targets.push(item.targetValue || 0);
|
||||
barData.reals.push(item.value || 0);
|
||||
barData.rate.push(item.proportion || 0);
|
||||
barData.rates.push(item.proportion || 0);
|
||||
barData.flags.push(item.completed ? 1 : 0);
|
||||
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user