修复切换展示顺序,完成率不一起切换的问题

This commit is contained in:
2026-03-13 15:42:39 +08:00
parent 195979b3e0
commit 09c7fd1f63
3 changed files with 8 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ export default {
name, name,
real: factory.reals[index], real: factory.reals[index],
target: factory.targets[index], target: factory.targets[index],
rate: factory.rate[index], rate: factory.rates[index],
diff: factory.diff[index], diff: factory.diff[index],
flag: factory.flags[index] flag: factory.flags[index]
})); }));
@@ -144,7 +144,7 @@ export default {
{ offset: 1, color: 'rgba(40, 138, 255, 0)' } { offset: 1, color: 'rgba(40, 138, 255, 0)' }
]) ])
}, },
data: data.rate || [], data: data.rates || [],
symbol: 'circle', symbol: 'circle',
symbolSize: 6 symbolSize: 6
}, },

View File

@@ -89,7 +89,7 @@ export default {
diff: [], // 对应差值数组 diff: [], // 对应差值数组
targets: [], // 预算值数组 targets: [], // 预算值数组
reals: [], // 实际值数组 reals: [], // 实际值数组
rate: [], // 完成率数组 rates: [], // 完成率数组
flags: [] // 完成状态数组0/1 flags: [] // 完成状态数组0/1
// baseIndexes: []// 对应levelId序号数组 // baseIndexes: []// 对应levelId序号数组
} }
@@ -114,7 +114,7 @@ export default {
const initTopBarData = { const initTopBarData = {
locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] 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) { if (!Array.isArray(this.monData) || this.monData.length === 0) {
this.chartData = { topBarData: initTopBarData, barData: initBarData }; this.chartData = { topBarData: initTopBarData, barData: initBarData };
@@ -151,7 +151,7 @@ export default {
barData.diff.push(item.diffValue || 0); barData.diff.push(item.diffValue || 0);
barData.targets.push(item.targetValue || 0); barData.targets.push(item.targetValue || 0);
barData.reals.push(item.value || 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.flags.push(item.completed ? 1 : 0);
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字 // barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
} }

View File

@@ -89,7 +89,7 @@ export default {
diff: [], // 对应差值数组 diff: [], // 对应差值数组
targets: [], // 预算值数组 targets: [], // 预算值数组
reals: [], // 实际值数组 reals: [], // 实际值数组
rate: [], // 完成率数组 rates: [], // 完成率数组
flags: [] // 完成状态数组0/1 flags: [] // 完成状态数组0/1
// baseIndexes: []// 对应levelId序号数组 // baseIndexes: []// 对应levelId序号数组
} }
@@ -114,7 +114,7 @@ export default {
const initTopBarData = { const initTopBarData = {
locations: [], diff: [], targets: [], reals: [], rate: [], flags: [] 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) { if (!Array.isArray(this.totalData) || this.totalData.length === 0) {
this.chartData = { topBarData: initTopBarData, barData: initBarData }; this.chartData = { topBarData: initTopBarData, barData: initBarData };
@@ -151,7 +151,7 @@ export default {
barData.diff.push(item.diffValue || 0); barData.diff.push(item.diffValue || 0);
barData.targets.push(item.targetValue || 0); barData.targets.push(item.targetValue || 0);
barData.reals.push(item.value || 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.flags.push(item.completed ? 1 : 0);
// barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字 // barData.baseIndexes.push(Number(item.levelId) || 0); // 序号转数字
} }