From 0f367e985d44f8470e6b15fa06b8fdf22c37c352 Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期五, 14 六月 2024 18:09:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/view/b4-inspection-item-statistics.vue | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/components/view/b4-inspection-item-statistics.vue b/src/components/view/b4-inspection-item-statistics.vue index 86e6156..4dd2176 100644 --- a/src/components/view/b4-inspection-item-statistics.vue +++ b/src/components/view/b4-inspection-item-statistics.vue @@ -129,7 +129,7 @@ }, chartData2:{ title:'浠婃棩椤圭洰鍚堟牸鐜�', - percentage:'68%', + percentage:'0', color:['#1CCAB8','#E1E4E8'], data:[ { @@ -150,16 +150,16 @@ }, chartData3:{ title:'浠婃棩椤圭洰瀹屾垚鐜�', - percentage:'68%', + percentage:'0', color:['#FBB647','#E1E4E8'], data:[ { name:'瀹屾垚', - value:'68' + value:'0' }, { name:'鏈畬鎴�', - value:'32' + value:'0' }, ] }, @@ -171,25 +171,28 @@ }, chartData4:{ title:'浠婃棩椤瑰欢鏈熺巼', - percentage:'68%', + percentage:'0', color:['#FF3838','#E1E4E8'], data:[ { name:'寤舵湡', - value:'68' + value:'0' }, { name:'鏈欢鏈�', - value:'32' + value:'0' }, ] }, loading:false, - pageData:{} + pageData:{}, + timers:null } }, mounted(){ this.init() + this.timers&&clearInterval(this.timers); + setInterval(this.init(),1000*60*5) }, methods:{ init(){ @@ -211,9 +214,9 @@ this.chartData0.yData[0].data = this.pageData.RECETENDAYS this.chartData1.yData[0].data = this.pageData.RECETENDAYS this.chartData1.yData[1].data = this.pageData.FINISHTENDAYS - this.chartData2.percentage = this.pageData.ACCEPT_RATE_TODAY*100+'%' - this.chartData3.percentage = this.pageData.FINISH_RATE_TODAY*100+'%' - this.chartData4.percentage = this.pageData.DELAY_RATE_TODAY*100+'%' + this.chartData2.percentage = (this.pageData.ACCEPT_RATE_TODAY*100).tofixed(0)+'%' + this.chartData3.percentage = (this.pageData.FINISH_RATE_TODAY*100).tofixed(0)+'%' + this.chartData4.percentage = (this.pageData.DELAY_RATE_TODAY*100).tofixed(0)+'%' this.chartData2.data[0].value = this.pageData.ACCEPT this.chartData2.data[1].value = this.pageData.FINISHE - this.pageData.ACCEPT this.loading = false; @@ -226,8 +229,9 @@ this.chartConfig2.isLoading = true this.chartConfig3.isLoading = true this.chartConfig4.isLoading = true + console.log(111111111,this.chartData2) }) - }, + }, handleData(val){ if(val){ return Math.abs(val)*100; @@ -235,6 +239,9 @@ return '0' } } + }, + deactivated(){ + this.timers&&clearInterval(this.timers); } } </script> -- Gitblit v1.9.3