作业批阅:习题训练类型 新增客观题自动批阅逻辑更改

This commit is contained in:
白了个白 2024-10-28 10:48:51 +08:00
parent 7c9b2755f2
commit 743d8e05d3
1 changed files with 21 additions and 7 deletions

View File

@ -390,16 +390,28 @@ 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
//
teacherCriticism();
})
.catch(() => {
loading_dt_table.value = false
})
}
/**
* 自动批阅判断
* 已交 作业类型为习题训练
*/
const teacherCriticism = ()=>{
// list
if(tableRadio.value == '1'&& classWorkAnalysis.worktype == '习题训练'){
//
tableRadio.list = tableRadio.list.map((item) => { tableRadio.list = tableRadio.list.map((item) => {
return { return {
...item, ...item,
teacherRating : checkWorkType(item) teacherRating : checkWorkType(item)
} }
}) })
}) }
.catch(() => {
loading_dt_table.value = false
})
} }
const checkWorkType = (item) => { const checkWorkType = (item) => {
// //
@ -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';