成绩统计代码调整

This commit is contained in:
joylink_cuiweidong 2022-04-18 14:40:05 +08:00
parent fc9c148753
commit 03611598e1
5 changed files with 68 additions and 28 deletions

View File

@ -172,7 +172,6 @@ const StudentManage = () => import('@/views/organization/classManage/studentMana
const DurationView = () => import('@/views/organization/classManage/durationView');
const GradeList = () => import('@/views/organization/examManage/gradeList');
const GradeStatistics = () => import('@/views/organization/examManage/gradeStatistics');
const StudentGradeStatis = () => import('@/views/organization/studentStatistics/studentGradeStatis');
const StudentStatistics = () => import('@/views/organization/studentStatistics/index');
const CreateRule = () => import('@/views/organization/ruleManage/createRule');
const TotalGrade = () => import('@/views/organization/ruleManage/totalGrade');
@ -665,11 +664,6 @@ export const publicAsyncRoute = [
component: StudentStatistics,
hidden: true
},
{
path: 'studentGradeStatis',
component: StudentGradeStatis,
hidden: true
},
{
path: 'createRule',
component: CreateRule,

View File

@ -11,6 +11,7 @@
style="width:80%;margin: 0 auto;"
/>
<create-student ref="createStudents" @refresh="refresh" />
<student-grade-Statis ref="studentGradeStatis"/>
</div>
</template>
@ -19,11 +20,13 @@ import { queryDeptInfoPaging, deleteDepartUserRelation, importCompanyMember } fr
import CreateStudent from './createStudent';
import XLSX from 'xlsx';
import { convertSheetToList } from '@/jmapNew/theme/parser/util.js';
import StudentGradeStatis from '../../studentStatistics/studentGradeStatis'
export default {
name: 'StudentManage',
components: {
CreateStudent
CreateStudent,
StudentGradeStatis
},
data() {
return {
@ -208,14 +211,7 @@ export default {
XLSX.writeFile(wb, '学生信息模板' + '.xlsx');
},
gradeStatistic(index,row){
this.$router.push({ path: '/info/studentGradeStatis',
query: {
username: row.name,
departmentId: row.departmentId,
userId: row.userId,
orgRole: row.orgRole
}
});
this.$refs.studentGradeStatis.doShow(row);
},
removeStudent(index, row) {
const _that = this;

View File

@ -6,6 +6,25 @@ import * as echarts from 'echarts';
import { getStuGradeStatistic } from '@/api/management/userexam';
export default {
name: 'GradeStatistics',
props:{
creatorId:{
type:String,
require:true
},
orgId:{
type:Number,
require:true
},
userId:{
type:Number,
require:true
},
},
watch:{
'orgId':function(){
this.loadData()
}
},
data() {
return {
myChart2:null,
@ -48,7 +67,6 @@ export default {
},
async mounted() {
this.initChart()
this.loadData()
},
methods: {
initChart(){
@ -84,8 +102,12 @@ export default {
}
option && this.myChart2 && this.myChart2.setOption(option);
},
doShow(){
this.loadData();
},
loadData(){
let data={creatorId:'',orgId:'',userId:''}
let data={creatorId:this.creatorId,orgId:this.orgId,userId:this.userId}
debugger
getStuGradeStatistic(data).then(res=>{
const results = resp.data;
if (results) {

View File

@ -8,7 +8,7 @@
<exam-statistics/>
</div>
<div class="statisticChartCenter">
<grade-statistics/>
<grade-statistics :creatorId="creatorId" :orgId="orgId" :userId="userId"/>
</div>
<div id="mychart3" class="statisticChartRight" />
</div>
@ -29,6 +29,8 @@ export default {
data() {
return {
myChart3:null,
creatorId:'',
orgId:'',
title:{
show:true,
text:'仿真时长统计',
@ -44,6 +46,12 @@ export default {
async mounted() {
this.initChart()
this.loadData();
this.orgId=parseInt(this.$store.state.user.companyId);
},
computed:{
userId(){
return parseInt(this.$store.state.user.id);
}
},
methods: {
initChart(){

View File

@ -1,11 +1,17 @@
<template>
<div>
<div class="student_title_content">{{ studentName+'统计信息' }}</div>
<el-button type="text" style="position: fixed;right: 20px;top: 70px;" @click="back">返回</el-button>
<el-dialog
class="planEdit__tool open-runplan"
:title="studentName+'统计信息'"
:visible.sync="show"
width="800px"
:before-close="doClose"
:modal="true"
:close-on-click-modal="false"
>
<div class="statisticChart">
<grade-statistics/>
<grade-statistics ref="gradeStatic" :creatorId="creatorId" :orgId="orgId" :userId="userId"/>
</div>
</div>
</el-dialog>
</template>
<script>
import GradeStatistics from './gradeStatistic.vue';
@ -14,14 +20,28 @@ export default {
components: {
GradeStatistics,
},
computed:{
studentName() {
return this.$route.query.username||'';
data(){
return {
studentName:'',
show:false,
creatorId:'',
userId:'',
orgId:'',
}
},
methods: {
back(){
this.$router.go(-1);
doShow(row){
this.show=true;
this.studentName=row.name;
this.userId=row.userId;
this.creatorId=this.$store.state.user.id;
this.$nextTick(()=>{
this.orgId=row.companyId;
})
// this.$refs.gradeStatic.doShow();
},
doClose(){
this.show=false;
}
}
}