Merge pull request 'add:表格自动批阅;' (#365) from yangws into main
Reviewed-on: #365
This commit is contained in:
commit
4b6a7918a9
|
@ -619,13 +619,13 @@ const checkWorkType = (params) => {
|
||||||
// 获取学生答题列表
|
// 获取学生答题列表
|
||||||
|
|
||||||
const score = extractedNumber(params.studentObj.scoingRate)
|
const score = extractedNumber(params.studentObj.scoingRate)
|
||||||
if(0<=score<=59){
|
if(0<=score && score<=59){
|
||||||
classWorkFormScore.rating = 5
|
classWorkFormScore.rating = 5
|
||||||
}else if(60<=score<=69){
|
}else if(60<=score && score<=69){
|
||||||
classWorkFormScore.rating = 4
|
classWorkFormScore.rating = 4
|
||||||
}else if(70<=score<=79){
|
}else if(70<=score && score<=79){
|
||||||
classWorkFormScore.rating = 3
|
classWorkFormScore.rating = 3
|
||||||
}else if(80<=score<=99){
|
}else if(80<=score && score<=99){
|
||||||
classWorkFormScore.rating = 2
|
classWorkFormScore.rating = 2
|
||||||
}else{
|
}else{
|
||||||
classWorkFormScore.rating = 1
|
classWorkFormScore.rating = 1
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
<!-- 训练报告-->
|
<!-- 训练报告-->
|
||||||
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
<div v-else-if="classWorkAnalysis.view == 'report'" style="overflow-y: scroll">
|
||||||
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
<!-- <ClassOverview :table-list="overviewData" :eval-id="courseObj.evalid"></ClassOverview> -->
|
||||||
<ClassOverview :table-list="overviewData"></ClassOverview>
|
<ClassOverview :active-data="classWorkActiveData" :table-list="overviewData"></ClassOverview>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <template #footer>
|
<!-- <template #footer>
|
||||||
|
@ -393,11 +393,46 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
|
tableRadio.list = tableRadio.list.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
teacherRating : checkWorkType(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const checkWorkType = (item) => {
|
||||||
|
//这里判断题目类型
|
||||||
|
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||||
|
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||||
|
let rating = 0
|
||||||
|
//判断题目是不是客观题
|
||||||
|
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||||
|
// 获取学生答题列表
|
||||||
|
const score = extractedNumber(item.scoingRate)
|
||||||
|
if(0<=score && score<=59){
|
||||||
|
rating = 5
|
||||||
|
}else if(60<=score && score<=69){
|
||||||
|
rating = 4
|
||||||
|
}else if(70<=score && score<=79){
|
||||||
|
rating = 3
|
||||||
|
}else if(80<=score && score<=99){
|
||||||
|
rating = 2
|
||||||
|
}else{
|
||||||
|
rating = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rating
|
||||||
|
|
||||||
|
}
|
||||||
|
// 获取百分比的数字
|
||||||
|
const extractedNumber = (score) => {
|
||||||
|
const match = score.match(/\d+/);
|
||||||
|
return match ? parseInt(match[0], 10) : null;
|
||||||
|
}
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
|
|
@ -390,11 +390,46 @@ const getClassWorkStudentList = (rowId) => {
|
||||||
tableRadio.value = '1'
|
tableRadio.value = '1'
|
||||||
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length
|
||||||
tableRadio.num1 = tableRadio.list.length
|
tableRadio.num1 = tableRadio.list.length
|
||||||
|
tableRadio.list = tableRadio.list.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
teacherRating : checkWorkType(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading_dt_table.value = false
|
loading_dt_table.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const checkWorkType = (item) => {
|
||||||
|
//这里判断题目类型
|
||||||
|
const subType = classWorkActiveData.quizlist.map(item => item.worktype)
|
||||||
|
const objectiveQuestion = ['单选题','多选题','判断题']
|
||||||
|
let rating = 0
|
||||||
|
//判断题目是不是客观题
|
||||||
|
if(subType.every(item => objectiveQuestion.includes(item))){
|
||||||
|
// 获取学生答题列表
|
||||||
|
const score = extractedNumber(item.scoingRate)
|
||||||
|
if(0<=score && score<=59){
|
||||||
|
rating = 5
|
||||||
|
}else if(60<=score && score<=69){
|
||||||
|
rating = 4
|
||||||
|
}else if(70<=score && score<=79){
|
||||||
|
rating = 3
|
||||||
|
}else if(80<=score && score<=99){
|
||||||
|
rating = 2
|
||||||
|
}else{
|
||||||
|
rating = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rating
|
||||||
|
|
||||||
|
}
|
||||||
|
// 获取百分比的数字
|
||||||
|
const extractedNumber = (score) => {
|
||||||
|
const match = score.match(/\d+/);
|
||||||
|
return match ? parseInt(match[0], 10) : null;
|
||||||
|
}
|
||||||
/** 2、查看某一个学生的学习任务完成详情*/
|
/** 2、查看某一个学生的学习任务完成详情*/
|
||||||
const getStudentClassWorkDataDetail = (row) => {
|
const getStudentClassWorkDataDetail = (row) => {
|
||||||
// 这里取出的是学生完成情况
|
// 这里取出的是学生完成情况
|
||||||
|
|
Loading…
Reference in New Issue