更改团队页统计图细节

main
wuyize 2022-07-14 23:33:13 +08:00
parent da8c9e7801
commit 8c2557697e
2 changed files with 12 additions and 46 deletions

View File

@ -58,36 +58,21 @@ export default {
//
let isAllZero = this.dataList.every(item => {
// console.log(item,"item")
return item.value == 0
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 + "人"
}
if (isAllZero === true) {
console.log(this.dataList, "this.dataListgroup")
option = {
tooltip: {
trigger: 'item'
},
//
// graphic:{
// type:'text',
// left:'27%',
// top:'50%',
// style:{
// text:'',
// textAlign:'center',
// fill:'#000',
// }
// },
series: [
{
name: '统计',
type: 'pie',
center: ['35%', '55%'],
center: ['45%', '55%'],
// radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
@ -96,6 +81,7 @@ export default {
formatter: '项目暂无进度'
},
emphasis: {
disabled: true,
label: {
show: false,
fontSize: '40',
@ -115,9 +101,6 @@ export default {
]
};
} else {
for (let i = 0; i < this.dataList.length; i++) {
this.dataList[i].name = this.dataList[i].name + "" + this.dataList[i].value + "人"
}
option = {
tooltip: {
trigger: 'item'
@ -126,7 +109,7 @@ export default {
{
name: '统计',
type: 'pie',
center: ['35%', '55%'],
center: ['45%', '55%'],
// radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
@ -155,7 +138,7 @@ export default {
type: 'scroll',
orient: 'vertical',
// right: 10,
left: '59%',
left: '80%',
// right:'50%',
top: 20,
bottom: 20,

View File

@ -58,36 +58,21 @@ export default {
//
let isAllZero = this.dataList.every(item => {
// console.log(item,"item")
return item.value == 0
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 + "项"
}
if (isAllZero === true) {
console.log(this.dataList, "this.dataListgroup")
option = {
tooltip: {
trigger: 'item'
},
//
// graphic:{
// type:'text',
// left:'27%',
// top:'50%',
// style:{
// text:'',
// textAlign:'center',
// fill:'#000',
// }
// },
series: [
{
name: '统计',
type: 'pie',
center: ['35%', '55%'],
center: ['45%', '55%'],
// radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
@ -96,6 +81,7 @@ export default {
formatter: '项目暂无进度'
},
emphasis: {
disabled:true,
label: {
show: false,
fontSize: '40',
@ -115,9 +101,6 @@ export default {
]
};
} else {
for (let i = 0; i < this.dataList.length; i++) {
this.dataList[i].name = this.dataList[i].name + " 已完成工作项:" + this.dataList[i].value + "项"
}
option = {
tooltip: {
trigger: 'item'
@ -126,7 +109,7 @@ export default {
{
name: '统计',
type: 'pie',
center: ['35%', '55%'],
center: ['45%', '55%'],
// radius: ['40%', '70%'],
avoidLabelOverlap: false,
label: {
@ -155,7 +138,7 @@ export default {
type: 'scroll',
orient: 'vertical',
// right: 10,
left: '59%',
left: '80%',
// right:'50%',
top: 20,
bottom: 20,