From ad47f33d1681dc4dc4f5cd292346f489e236958b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 19 Apr 2022 14:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/organization/studentStatistics/examStatistic.vue | 3 ++- src/views/organization/studentStatistics/index.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/organization/studentStatistics/examStatistic.vue b/src/views/organization/studentStatistics/examStatistic.vue index db2b89d46..7a748f473 100644 --- a/src/views/organization/studentStatistics/examStatistic.vue +++ b/src/views/organization/studentStatistics/examStatistic.vue @@ -54,7 +54,7 @@ export default { legend: {orient: 'vertical',left: 'left',top:'65px'}, series: [ { - data:[], + data:[{value:0,name:''}], label:{show:false}, radius: '60%', top:'60px', @@ -82,6 +82,7 @@ export default { hour=Math.floor(allcount/3600); minu=Math.floor((allcount%3600)/60); seconds=Math.floor((allcount%3600)%60); + if(timeList.length==0){realList=[{value:0,name:''}]} option.title[0].subtext="总时长: "+hour+'时'+minu+"分"+seconds+'秒'; option.series[0].data=realList; option && this.myChart1 && this.myChart1.setOption(option); diff --git a/src/views/organization/studentStatistics/index.vue b/src/views/organization/studentStatistics/index.vue index 0457934ee..fa0a85ae8 100644 --- a/src/views/organization/studentStatistics/index.vue +++ b/src/views/organization/studentStatistics/index.vue @@ -81,7 +81,7 @@ export default { // http://2i38984j47.qicp.vip/doc/UserExamController.html series: [ { - data:[], + data:[{value:0,name:''}], label:{show:false}, showEmptyCircle:true, radius: '60%', @@ -116,6 +116,7 @@ export default { realList.push({value:eachItem.duration,name:realtName}); } }) + if(timeList.length==0){realList=[{value:0,name:''}]} let option=this.myChart3.getOption(); option.series[0].data=realList; let hour=0;