代码调整

This commit is contained in:
joylink_cuiweidong 2022-04-15 15:26:12 +08:00
parent f876c33603
commit e5240b10ca
4 changed files with 64 additions and 48 deletions

View File

@ -74,3 +74,12 @@ export function getClassGradeStatistic(orgId, examId) {
method: 'get' method: 'get'
}); });
} }
/** 查询组织学生单次考试成绩曲线 */
export function getStuGradeStatistic() {
return request({
url: `/api/userExam/curve/personal`,
method: 'get'
});
}

View File

@ -73,7 +73,7 @@ export default {
this.$router.push({ path: `/info/organization` }); this.$router.push({ path: `/info/organization` });
}, },
handleStatistics(){ handleStatistics(){
this.$router.push({ path: `/info/gradeStatistics` }); this.$router.push({ path: `/info/studentStatistics` });
} }
} }
}; };

View File

@ -45,6 +45,7 @@ export default {
return { return {
orgId:'', orgId:'',
myChart1:null, myChart1:null,
myChart2:null,
userNameList:[], userNameList:[],
gradeList:[], gradeList:[],
classList:[], classList:[],

View File

@ -1,41 +1,16 @@
<template> <template>
<div> <div>
<!-- <div class="title_content">{{ $route.query.name + ' 成绩统计' }}</div> <div class="student_title_content">{{ '统计信息' }}</div>
<el-button type="text" style="position: fixed;right: 20px;top: 70px;" @click="back">返回</el-button> <div class="statisticChart">
<div class="gradeStatisticPane"> <div id="mychart1" class="statisticChartLeft" />
<el-form <div id="mychart2" class="statisticChartCenter" />
ref="queryForm" <div id="mychart3" class="statisticChartRight" />
size="small" </div>
style="padding-top: 18px;"
>
<el-form-item prop="orgId" label="班级:" :required="false">
<el-select
ref="orgId"
v-model="orgId"
:clearable="false"
:placeholder="$t('global.choose')"
filterable
@change="onChange"
>
<el-option
v-for="option in classList"
:key="option['value']"
:label="option['label']"
:value="option['value']"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="statisticChart">
<div id="mychart1" class="statisticChartLeft" />
<div id="mychart2" class="statisticChartRight" />
</div> -->
</div> </div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
// import { getClassGradeStatistic } from '@/api/management/userexam'; import { getStuGradeStatistic } from '@/api/management/userexam';
// import { getClassListUnPage } from '@/api/company'; // import { getClassListUnPage } from '@/api/company';
// import { getExamLessonDetail } from '@/api/management/exam'; // import { getExamLessonDetail } from '@/api/management/exam';
// import localStore from 'storejs'; // import localStore from 'storejs';
@ -43,43 +18,74 @@ export default {
name: 'StudentStatistics', name: 'StudentStatistics',
data() { data() {
return { return {
myChart1:null,
myChart2:null,
myChart3:null,
title:{
show:true,
textAlign:'center',
left:'50%',
top:'5px',
textStyle:{
color:'#f00'
}
},
// text:'',
} }
}, },
async created() { async created() {
this.initChart()
}, },
methods: { methods: {
initChart(){
var chartDom1 = document.getElementById('mychart1');
this.myChart1 = echarts.init(chartDom1);
var chartDom2 = document.getElementById('mychart2');
this.myChart2 = echarts.init(chartDom2);
var chartDom3 = document.getElementById('mychart3');
this.myChart3 = echarts.init(chartDom3);
let option1={
title: Object.assign({text:'教学时长统计'},this.title),
}
let option2={
title: Object.assign({text:'考试成绩统计'},this.title),
}
let option3={
title: Object.assign({text:'仿真时长统计'},this.title),
}
option1 && this.myChart1 && this.myChart1.setOption(option1);
option2 && this.myChart2 && this.myChart2.setOption(option2);
option3 && this.myChart3 && this.myChart3.setOption(option3);
}
} }
}; };
</script> </script>
<style scoped> <style scoped>
.title_content { .student_title_content {
width: 100%; width: 100%;
margin: 20px 0 30px; margin: 20px 0 30px;
text-align: center; text-align: left;
font-size: 24px; font-size: 22px;
font-weight: bold; padding-left: 30px;
} }
.gradeStatisticPane{
margin: 0 auto;
width: 300px;
}
.statisticChart{ .statisticChart{
/* margin-left: 50%; */
/* transform: translateX(-50%); */
width:90%; width:90%;
display: flex; display: flex;
margin-left:5%; margin-left:5%;
} }
.statisticChartLeft{ .statisticChartLeft{
width: 50%; width: 30%;
display: inline-block; display: inline-block;
height: 700px; height: 700px;
/* border:1px #ccc solid */ /* border:1px #ccc solid */
} }
.statisticChartCenter{
width: 40%;
display: inline-block;
height: 700px;
}
.statisticChartRight{ .statisticChartRight{
width: 50%; width: 30%;
display: inline-block; display: inline-block;
height: 700px; height: 700px;
/* border:1px #ccc solid */ /* border:1px #ccc solid */