更改团队页统计图细节

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

View File

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