From d82ab8f93cf19116782d7743f537adf6e180930b Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 18 Apr 2022 18:43:39 +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/api/management/userexam.js | 5 +-
.../studentStatistics/gradeStatistic.vue | 75 ++++++++++---------
.../organization/studentStatistics/index.vue | 16 ++--
.../studentStatistics/studentGradeStatis.vue | 12 +--
4 files changed, 53 insertions(+), 55 deletions(-)
diff --git a/src/api/management/userexam.js b/src/api/management/userexam.js
index 7dec56fc6..a72980272 100644
--- a/src/api/management/userexam.js
+++ b/src/api/management/userexam.js
@@ -76,11 +76,10 @@ export function getClassGradeStatistic(orgId, examId) {
}
/** 查询组织学生单次考试成绩曲线 */
-export function getStuGradeStatistic(params) {
+export function getStuGradeStatistic(userId) {
return request({
- url: `/api/userExam/curve/personal`,
+ url: `/api/userExam/curve/${userId}`,
method: 'get',
- params
});
}
diff --git a/src/views/organization/studentStatistics/gradeStatistic.vue b/src/views/organization/studentStatistics/gradeStatistic.vue
index d1a8f5ea5..ea3a88c3c 100644
--- a/src/views/organization/studentStatistics/gradeStatistic.vue
+++ b/src/views/organization/studentStatistics/gradeStatistic.vue
@@ -7,21 +7,21 @@ import { getStuGradeStatistic } from '@/api/management/userexam';
export default {
name: 'GradeStatistics',
props:{
- creatorId:{
- type:String,
- require:true
- },
- orgId:{
- type:String,
- require:true
- },
+ // creatorId:{
+ // type:String,
+ // require:true
+ // },
+ // orgId:{
+ // type:String,
+ // require:true
+ // },
userId:{
- type:Number,
+ type:String,
require:true
},
},
watch:{
- 'orgId':function(){
+ 'userId':function(){
this.loadData()
}
},
@@ -50,18 +50,18 @@ export default {
},
axisLine:{show:true}
},
- {
- nameLocation:'end',
- nameTextStyle:{
- align:'left',
- fontSize:14
- },
- axisLine:{show:true},
- name: '时长',
- alignTicks: true,
- type: 'value',
- // inverse: true
- },
+ // {
+ // nameLocation:'end',
+ // nameTextStyle:{
+ // align:'left',
+ // fontSize:14
+ // },
+ // axisLine:{show:true},
+ // name: '时长',
+ // alignTicks: true,
+ // type: 'value',
+ // // inverse: true
+ // },
],
}
},
@@ -76,7 +76,7 @@ export default {
xAxis: {
type: 'category',
axisLabel:{
- show :false
+ show :true
},
data:[]
},
@@ -90,14 +90,14 @@ export default {
{
name: '分数',
data:[],
- type: 'line'
- },
- {
- name:'时长',
- yAxisIndex: 1,
- data:[],
- type: 'line'
+ type: 'bar'
},
+ // {
+ // name:'时长',
+ // yAxisIndex: 1,
+ // data:[],
+ // type: 'line'
+ // },
]
}
option && this.myChart2 && this.myChart2.setOption(option);
@@ -106,12 +106,13 @@ export default {
this.loadData();
},
loadData(){
- let data={creatorId:this.creatorId,orgId:this.orgId,userId:this.userId}
- debugger
- getStuGradeStatistic(data).then(res=>{
+ // creatorId:this.creatorId,orgId:this.orgId,
+ // let data={userId:this.userId}
+ // debugger
+ getStuGradeStatistic(this.userId).then(resp=>{
const results = resp.data;
if (results) {
- const gradeList = results.results;
+ const gradeList = results;
// const gradeList = [
// {
// "id": "92",
@@ -152,16 +153,16 @@ export default {
// ];
let gradeNumList=[];
let exameNameList=[];
- let durationList=[];
+ // let durationList=[];
gradeList.forEach(item=>{
gradeNumList.push(item.score);
exameNameList.push(item.examName);
- durationList.push(item.duration);
+ // durationList.push(item.duration);
})
let option=this.myChart2.getOption();
option.xAxis[0].data=exameNameList;
option.series[0].data=gradeNumList;
- option.series[1].data=durationList;
+ // option.series[1].data=durationList;
option && this.myChart2 && this.myChart2.setOption(option);
}
}).catch(error=>{
diff --git a/src/views/organization/studentStatistics/index.vue b/src/views/organization/studentStatistics/index.vue
index b6bc8dc5e..0fe65471e 100644
--- a/src/views/organization/studentStatistics/index.vue
+++ b/src/views/organization/studentStatistics/index.vue
@@ -8,7 +8,8 @@