baigl #381
|
@ -82,25 +82,25 @@
|
|||
<span style="color: #2196f3">{{scope.row.getScore || 0}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
|
||||
<el-table-column label="批阅状态" prop="rating" align="center" width="120" sortable>
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.teacherRating == 0">
|
||||
<template v-if="scope.row.rating == 0">
|
||||
<span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
|
||||
</template>
|
||||
<!-- 1-优 2-优减 3-良 4-良减 5-差 -->
|
||||
<template v-if="scope.row.teacherRating == 1"
|
||||
<template v-if="scope.row.rating == 1"
|
||||
><el-tag type="danger">完美</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 2"
|
||||
<template v-if="scope.row.rating == 2"
|
||||
><el-tag type="danger">优秀</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 3"
|
||||
<template v-if="scope.row.rating == 3"
|
||||
><el-tag type="warning">良好</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 4"
|
||||
<template v-if="scope.row.rating == 4"
|
||||
><el-tag type="info">及格</el-tag></template
|
||||
>
|
||||
<template v-if="scope.row.teacherRating == 5"
|
||||
<template v-if="scope.row.rating == 5"
|
||||
><el-tag type="info">不及格</el-tag></template
|
||||
>
|
||||
</template>
|
||||
|
@ -345,7 +345,7 @@ const getClassWorkStudentList = (rowId) => {
|
|||
}
|
||||
|
||||
// 老师批阅状态 默认0 未批改
|
||||
response.rows[i].teacherRating = 0
|
||||
response.rows[i].rating = 0
|
||||
|
||||
// 计算每个学生的得分率
|
||||
if (
|
||||
|
@ -371,21 +371,23 @@ const getClassWorkStudentList = (rowId) => {
|
|||
score += evalarray[e].score;
|
||||
evalarray[e].teacherRating = evalarray[e].score
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const allScore = evalarray.reduce((acc, cur) => acc + cur.score, 0)
|
||||
|
||||
const allTeacherRating = evalarray.reduce((acc, cur) => acc + cur.teacherRating, 0) // 老师评分
|
||||
//console.log(evalarray, 'evalarray------------------------------------')
|
||||
if (feedcount > 0) {
|
||||
// 多个题目的总得分率: 正确题数/(题目数*100)
|
||||
response.rows[i].scoingRate = ((score / allScore) * 100).toFixed(0) + '%'
|
||||
response.rows[i].getScore = score
|
||||
response.rows[i].scoingRate = ((score / allTeacherRating) * 100).toFixed(0) + '%'
|
||||
response.rows[i].getScore = allTeacherRating
|
||||
} else {
|
||||
response.rows[i].scoingRate = '0%'
|
||||
response.rows[i].getScore = 0
|
||||
}
|
||||
// 批阅状态 优良类 :注意:这里题目中的评价都是一样的,所以取第一个
|
||||
if (evalarray[0].rating != '') {
|
||||
response.rows[i].teacherRating = evalarray[0].rating
|
||||
response.rows[i].rating = evalarray[0].rating
|
||||
}
|
||||
} else {
|
||||
response.rows[i].scoingRate = '0%'
|
||||
|
@ -420,7 +422,7 @@ const teacherCriticism = ()=>{
|
|||
tableRadio.list = tableRadio.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
teacherRating : item.teacherRating || checkWorkType(item)
|
||||
rating : item.rating || checkWorkType(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -675,10 +677,11 @@ const handleClassOverviewOpen = (type) =>{
|
|||
}
|
||||
}
|
||||
})
|
||||
const allScore = allTopic.reduce((acc, cur) => {
|
||||
return acc + cur.score;
|
||||
const allTeacherRating = allTopic.reduce((acc, cur) => {
|
||||
return acc + cur.teacherRating;
|
||||
},0)
|
||||
rightAnswer > 0?item.scoingRate = (score/allScore * 100).toFixed(0):item.scoingRate = ''
|
||||
|
||||
rightAnswer > 0?item.scoingRate = (score/allTeacherRating * 100).toFixed(0):item.scoingRate = ''
|
||||
item.getScore = score
|
||||
}else{
|
||||
item.scoingRate = ''
|
||||
|
|
Loading…
Reference in New Issue