diff --git a/front/src/views/abilityStatistics/components/ResourceAggregation.vue b/front/src/views/abilityStatistics/components/ResourceAggregation.vue index 50f850f7..45fa2333 100644 --- a/front/src/views/abilityStatistics/components/ResourceAggregation.vue +++ b/front/src/views/abilityStatistics/components/ResourceAggregation.vue @@ -314,9 +314,9 @@ const funnelPlot = (dataList) => { let arrCopy = ['0-5', '5-10', '10-15', '15-20', '20以上'] // 真实数据 dataList.sort((a, b) => { - console.log(arrCopy.indexOf(a.fanwei), arrCopy.indexOf(b.fanwei)) - return arrCopy.indexOf(b.fanwei) - arrCopy.indexOf(a.fanwei) + return Number(a.value) - Number(b.value) }) + let _arr = dataList.map(v => v.fanwei) || arrCopy; // 数据配置形成金字塔形状固定 let chartData = _arr.map((v, i) => {