diff --git a/src/views/organization/classManage/studentManage/index.vue b/src/views/organization/classManage/studentManage/index.vue index 2fafdd24e..337c2831d 100644 --- a/src/views/organization/classManage/studentManage/index.vue +++ b/src/views/organization/classManage/studentManage/index.vue @@ -11,7 +11,7 @@ style="width:80%;margin: 0 auto;" /> - + @@ -74,14 +74,11 @@ export default { return this.$route.query.creatorId == this.$store.state.user.id; } }, - { - name: '成绩曲线', - handleClick: this.gradeStatistic, - type: 'success', - // showControl: (row) => { - // return this.$route.query.creatorId == this.$store.state.user.id; - // } - } + // { + // name: '成绩统计', + // handleClick: this.gradeStatistic, + // type: 'success', + // } ] } ], @@ -210,9 +207,9 @@ export default { XLSX.utils.book_append_sheet(wb, ws, 'file'); XLSX.writeFile(wb, '学生信息模板' + '.xlsx'); }, - gradeStatistic(index,row){ - this.$refs.studentGradeStatis.doShow(row); - }, + // gradeStatistic(index,row){ + // this.$refs.studentGradeStatis.doShow(row); + // }, removeStudent(index, row) { const _that = this; this.$confirm(`是否确认将${row.name}移出班级?`, this.$t('tip.hint'), { diff --git a/src/views/organization/studentStatistics/examStatistic.vue b/src/views/organization/studentStatistics/examStatistic.vue index baa0dc607..db2b89d46 100644 --- a/src/views/organization/studentStatistics/examStatistic.vue +++ b/src/views/organization/studentStatistics/examStatistic.vue @@ -11,7 +11,9 @@ export default { myChart2:null, title:{ show:true, - text:'教学时长统计', + subtext:'', + subtextStyle:{color:'#358ff8',fontSize:14}, + text:'学习时长统计', textAlign:'center', left:'50%', top:'5px', @@ -31,14 +33,32 @@ export default { this.myChart1 = echarts.init(chartDom1); let option1={ title: this.title, - tooltip: {trigger: 'item'}, - legend: {orient: 'vertical',left: 'left',top:'45px',orient:'horizontal'}, + tooltip: { + trigger: 'item', + formatter: function (params, ticket, callback) { + let value=params.data.value; + let hour=0; + let minu=0; + let seconds=0; + hour=Math.floor(value/3600); + minu=Math.floor((value%3600)/60); + seconds=Math.floor((value%3600)%60); + // hour=hour>9?hour:'0'+hour; + // minu=minu>9?minu:'0'+minu; + // seconds=seconds>9?seconds:'0'+seconds; + let temp=hour+'时'+minu+"分"+seconds+'秒'; + return '

'+params.data.name+': '+temp+'

' + } + }, + color:['#358ff8','#91cb74','#f7c757','#ec6566','#73c0de','#4ca273','#ee8250','#9a60b4','#ea7ccc','#59eca9'], + legend: {orient: 'vertical',left: 'left',top:'65px'}, series: [ { data:[], label:{show:false}, radius: '60%', - top:'20px', + top:'60px', + showEmptyCircle:true, type: 'pie' } ] @@ -50,10 +70,19 @@ export default { let timeList=response.data; if(timeList){ let realList=[]; + let allcount=0; timeList.forEach(eachItem=>{ + allcount+=parseInt(eachItem.duration); realList.push({value:eachItem.duration,name:eachItem.statsProjectName}); }) let option=this.myChart1.getOption(); + let hour=0; + let minu=0; + let seconds=0; + hour=Math.floor(allcount/3600); + minu=Math.floor((allcount%3600)/60); + seconds=Math.floor((allcount%3600)%60); + 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/gradeStatistic.vue b/src/views/organization/studentStatistics/gradeStatistic.vue index 8270f39c2..bd3dbe8a2 100644 --- a/src/views/organization/studentStatistics/gradeStatistic.vue +++ b/src/views/organization/studentStatistics/gradeStatistic.vue @@ -90,6 +90,7 @@ export default { { name: '分数', data:[], + barMaxWidth:'50px', type: 'bar' }, // { diff --git a/src/views/organization/studentStatistics/index.vue b/src/views/organization/studentStatistics/index.vue index 0fe65471e..0457934ee 100644 --- a/src/views/organization/studentStatistics/index.vue +++ b/src/views/organization/studentStatistics/index.vue @@ -7,24 +7,24 @@ -
+ - -
+ +