diff --git a/src/views/resume/femalestaff.vue b/src/views/resume/femalestaff.vue index d7a876a..5d569c8 100644 --- a/src/views/resume/femalestaff.vue +++ b/src/views/resume/femalestaff.vue @@ -313,17 +313,17 @@ export default { }, computed: { abilityEchart1VisibleComputed(){ - return this.abilityList.reduce((total,item)=>{ + return this.natureList.reduce((total,item)=>{ return total + item.value; },0)>0; }, abilityEchart2VisibleComputed(){ - return this.abilityList.length>6 && this.abilityList.slice(6).reduce((total,item)=>{ + return this.natureList.length>6 && this.natureList.slice(6).reduce((total,item)=>{ return total + item.value; },0)>0; }, natureEchartVisibleComputed(){ - return this.natureList.reduce((total,item)=>{ + return this.abilityList.reduce((total,item)=>{ return total + item.value; },0)>0; }, @@ -384,8 +384,8 @@ export default { this.abilityList = abilityList; this.user = user; this.$nextTick(() => { - this.initNengliEchart(abilityList); - this.initXinggeEchart(natureList); + this.initNengliEchart(natureList); + this.initXinggeEchart(abilityList); }); }); }, diff --git a/src/views/resume/malestaff.vue b/src/views/resume/malestaff.vue index 7e602ff..c7d3463 100644 --- a/src/views/resume/malestaff.vue +++ b/src/views/resume/malestaff.vue @@ -293,22 +293,21 @@ export default { }, computed: { abilityEchart1VisibleComputed(){ - return this.abilityList.reduce((total,item)=>{ + return this.natureList.reduce((total,item)=>{ console.log(total,item); return total + item.value; },0)>0; }, abilityEchart2VisibleComputed(){ - return this.abilityList.length>6 && this.abilityList.slice(6).reduce((total,item)=>{ + return this.natureList.length>6 && this.natureList.slice(6).reduce((total,item)=>{ return total + item.value; },0)>0; }, natureEchartVisibleComputed(){ console.log('natureEchartVisibleComputed this.natureList',this.natureList); - let total = this.natureList.reduce((total,item)=>{ + let total = this.abilityList.reduce((total,item)=>{ return total + item.value; },0); - console.log('natureEchartVisibleComputed total',total); return total>0; }, userDetail() { @@ -368,8 +367,8 @@ export default { this.abilityList = abilityList; this.user = user; this.$nextTick(() => { - this.initNengliEchart(abilityList); - this.initXinggeEchart(natureList); + this.initNengliEchart(natureList); + this.initXinggeEchart(abilityList); }); }); },