A 2022-07-14 22:08:34 +08:00
commit 5614ef750c
1 changed files with 53 additions and 52 deletions

View File

@ -54,18 +54,19 @@ export default {
methods: {
//
getOption() {
//
let isAllZero = this.dataList.every(item => {
// console.log(item,"item")
return item.value == 0
})
console.log(isAllZero,"isAllZero")
let option=null
if(isAllZero==true){
for(let i =0;i<this.dataList.length;i++){
this.dataList[i].name = this.dataList[i].name+" 已完成工作项:"+this.dataList[i].value+"项"
console.log(isAllZero, "isAllZero")
let option = null
if (isAllZero == true) {
for (let i = 0; i < this.dataList.length; i++) {
this.dataList[i].name = this.dataList[i].name + " 已完成工作项:" + this.dataList[i].value + "项"
}
console.log(this.dataList,"this.dataListgroup")
console.log(this.dataList, "this.dataListgroup")
option = {
tooltip: {
trigger: 'item'
@ -113,9 +114,9 @@ export default {
}
]
};
}else{
for(let i =0;i<this.dataList.length;i++){
this.dataList[i].name = this.dataList[i].name+""+this.dataList[i].value+"人"
} else {
for (let i = 0; i < this.dataList.length; i++) {
this.dataList[i].name = this.dataList[i].name + "" + this.dataList[i].value + "人"
}
option = {
tooltip: {
@ -183,7 +184,7 @@ export default {
//
updateEcharts() {
this.myChart.setOption(this.getOption(), true);
console.log( this.dataList," this.dataList")
console.log(this.dataList, " this.dataList")
}
}
}