From 6be565c499f71345f585585d7f30655eca42a2dc Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 22 Mar 2024 11:26:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=BB=9F=E8=AE=A1=E5=88=86=E6=9E=90?= =?UTF-8?q?=EF=BC=9A=E4=BB=BB=E5=8A=A1=E8=BF=9B=E5=BA=A6=EF=BC=8C6?= =?UTF-8?q?=E8=BD=A6=E9=97=B4=E4=BB=A5=E5=8F=8A=E7=8E=AF=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0label=20and=20legend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/task_rate.vue | 46 +++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/views/statistics/task_rate.vue b/src/views/statistics/task_rate.vue index d9b486e6..9d60208d 100644 --- a/src/views/statistics/task_rate.vue +++ b/src/views/statistics/task_rate.vue @@ -126,13 +126,21 @@ tooltip: { trigger: 'item' }, + legend: { + top: '3', + right:'3%', + }, color:['rgb(64,158,255)','orange'], series: { name: '7车间完成率', type: 'pie', radius: ['40%', '70%'], center: ['50%', '60%'], - label: false, + label: { + show: true, + position: 'outside', + formatter: '{b} : {c} ({d}%)', + }, data: [ {value: 0, name: '已完成'}, {value: 0, name: '未完成'}, @@ -147,13 +155,21 @@ tooltip: { trigger: 'item' }, + legend: { + top: '3', + right:'3%', + }, color:['rgb(64,158,255)','orange'], series: { name: '10车间完成率', type: 'pie', radius: ['40%', '70%'], center: ['50%', '60%'], - label: false, + label: { + show: true, + position: 'outside', + formatter: '{b} : {c} ({d}%)', + }, data: [ {value: 0, name: '已完成'}, {value: 0, name: '未完成'}, @@ -167,13 +183,35 @@ tooltip: { trigger: 'item' }, + legend: { + top: '3', + right:'3%', + }, color:['rgb(64,158,255)','orange'], series: { name: '6车间完成率', type: 'pie', radius: ['40%', '70%'], center: ['50%', '60%'], - label: false, + label: { + show: true, + position: 'outside', + formatter: '{b} : {c} ({d}%)', + }, + // labelLayout: { + // verticalAlign: "bottom", + // // dy: 10, + // align: "left", + // dx: -10, + // }, + // labelLine: { + // // length: 10, + // // length2: 30, + // lineStyle: { + // color: 'rgb(64,158,255)', + // type: "dashed", + // }, + // }, data: [ {value: 0, name: '已完成'}, {value: 0, name: '未完成'}, @@ -281,7 +319,7 @@ that.option3.series.data[1].value = 0; let obj={}; obj.page = 0; - obj.mgroup__belong_dept__name = '6车间'; + obj.mtask_utask__mgroup__belong_dept__name = '6车间'; obj.start_date__gte = this.start_date; obj.end_date__lte = this.end_date; await that.$API.pm.utask.list.req( obj).then((res) => {