Merge pull request '作业批阅:习题训练类型 新增客观题自动批阅逻辑更改' (#371) from baigl into main

Reviewed-on: #371
This commit is contained in:
baigl 2024-10-28 10:50:14 +08:00
commit 346b07e47a
1 changed files with 21 additions and 7 deletions

View File

@ -390,17 +390,29 @@ 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 { teacherCriticism();
...item,
teacherRating : checkWorkType(item)
}
})
}) })
.catch(() => { .catch(() => {
loading_dt_table.value = false loading_dt_table.value = false
}) })
} }
/**
* 自动批阅判断
* 已交 作业类型为习题训练
*/
const teacherCriticism = ()=>{
// list
if(tableRadio.value == '1'&& classWorkAnalysis.worktype == '习题训练'){
//
tableRadio.list = tableRadio.list.map((item) => {
return {
...item,
teacherRating : checkWorkType(item)
}
})
}
}
const checkWorkType = (item) => { const checkWorkType = (item) => {
// //
const subType = classWorkActiveData.quizlist.map(item => item.worktype) const subType = classWorkActiveData.quizlist.map(item => item.worktype)
@ -408,7 +420,7 @@ const checkWorkType = (item) => {
let rating = 0 let rating = 0
// //
if(subType.every(item => objectiveQuestion.includes(item))){ if(subType.every(item => objectiveQuestion.includes(item))){
// // scoingRate
const score = extractedNumber(item.scoingRate) const score = extractedNumber(item.scoingRate)
if(0<=score && score<=59){ if(0<=score && score<=59){
rating = 5 rating = 5
@ -551,6 +563,8 @@ const tableRadioChange = (e) => {
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;
//
teacherCriticism();
}else if(e=='0'){ }else if(e=='0'){
tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0') tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0')
tableRadio.value = '0'; tableRadio.value = '0';