代码调整
This commit is contained in:
parent
f876c33603
commit
e5240b10ca
@ -74,3 +74,12 @@ export function getClassGradeStatistic(orgId, examId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询组织学生单次考试成绩曲线 */
|
||||
export function getStuGradeStatistic() {
|
||||
return request({
|
||||
url: `/api/userExam/curve/personal`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ export default {
|
||||
this.$router.push({ path: `/info/organization` });
|
||||
},
|
||||
handleStatistics(){
|
||||
this.$router.push({ path: `/info/gradeStatistics` });
|
||||
this.$router.push({ path: `/info/studentStatistics` });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -45,6 +45,7 @@ export default {
|
||||
return {
|
||||
orgId:'',
|
||||
myChart1:null,
|
||||
myChart2:null,
|
||||
userNameList:[],
|
||||
gradeList:[],
|
||||
classList:[],
|
||||
|
@ -1,41 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="title_content">{{ $route.query.name + ' 成绩统计' }}</div>
|
||||
<el-button type="text" style="position: fixed;right: 20px;top: 70px;" @click="back">返回</el-button>
|
||||
<div class="gradeStatisticPane">
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
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="student_title_content">{{ '统计信息' }}</div>
|
||||
<div class="statisticChart">
|
||||
<div id="mychart1" class="statisticChartLeft" />
|
||||
<div id="mychart2" class="statisticChartRight" />
|
||||
</div> -->
|
||||
<div id="mychart2" class="statisticChartCenter" />
|
||||
<div id="mychart3" class="statisticChartRight" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
// import { getClassGradeStatistic } from '@/api/management/userexam';
|
||||
import { getStuGradeStatistic } from '@/api/management/userexam';
|
||||
// import { getClassListUnPage } from '@/api/company';
|
||||
// import { getExamLessonDetail } from '@/api/management/exam';
|
||||
// import localStore from 'storejs';
|
||||
@ -43,43 +18,74 @@ export default {
|
||||
name: 'StudentStatistics',
|
||||
data() {
|
||||
return {
|
||||
myChart1:null,
|
||||
myChart2:null,
|
||||
myChart3:null,
|
||||
title:{
|
||||
show:true,
|
||||
textAlign:'center',
|
||||
left:'50%',
|
||||
top:'5px',
|
||||
textStyle:{
|
||||
color:'#f00'
|
||||
}
|
||||
},
|
||||
// text:'成绩分布',
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
this.initChart()
|
||||
},
|
||||
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>
|
||||
<style scoped>
|
||||
.title_content {
|
||||
.student_title_content {
|
||||
width: 100%;
|
||||
margin: 20px 0 30px;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.gradeStatisticPane{
|
||||
margin: 0 auto;
|
||||
width: 300px;
|
||||
text-align: left;
|
||||
font-size: 22px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
.statisticChart{
|
||||
/* margin-left: 50%; */
|
||||
/* transform: translateX(-50%); */
|
||||
width:90%;
|
||||
display: flex;
|
||||
margin-left:5%;
|
||||
}
|
||||
.statisticChartLeft{
|
||||
width: 50%;
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
height: 700px;
|
||||
/* border:1px #ccc solid */
|
||||
}
|
||||
.statisticChartCenter{
|
||||
width: 40%;
|
||||
display: inline-block;
|
||||
height: 700px;
|
||||
}
|
||||
.statisticChartRight{
|
||||
width: 50%;
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
height: 700px;
|
||||
/* border:1px #ccc solid */
|
||||
|
Loading…
Reference in New Issue
Block a user