From 743d8e05d3881527d83cf2656941dcc65822e87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Mon, 28 Oct 2024 10:48:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=89=B9=E9=98=85=EF=BC=9A?= =?UTF-8?q?=E4=B9=A0=E9=A2=98=E8=AE=AD=E7=BB=83=E7=B1=BB=E5=9E=8B=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E8=A7=82=E9=A2=98=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=89=B9=E9=98=85=E9=80=BB=E8=BE=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/teachClassTask.vue | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue index b1f7c9e..6894e54 100644 --- a/src/renderer/src/views/classTask/teachClassTask.vue +++ b/src/renderer/src/views/classTask/teachClassTask.vue @@ -390,17 +390,29 @@ const getClassWorkStudentList = (rowId) => { tableRadio.value = '1' tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length tableRadio.num1 = tableRadio.list.length - tableRadio.list = tableRadio.list.map((item) => { - return { - ...item, - teacherRating : checkWorkType(item) - } - }) + // 自动批阅判断 + teacherCriticism(); }) .catch(() => { 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 subType = classWorkActiveData.quizlist.map(item => item.worktype) @@ -408,7 +420,7 @@ const checkWorkType = (item) => { let rating = 0 //判断题目是不是客观题 if(subType.every(item => objectiveQuestion.includes(item))){ - // 获取学生答题列表 + // 获取学生答题列表 scoingRate 得分率 const score = extractedNumber(item.scoingRate) if(0<=score && score<=59){ rating = 5 @@ -551,6 +563,8 @@ const tableRadioChange = (e) => { tableRadio.value = '1'; tableRadio.num0 = classWorkAnalysis.classworkdata.length - tableRadio.list.length; tableRadio.num1 = tableRadio.list.length; + // 自动批阅判断 + teacherCriticism(); }else if(e=='0'){ tableRadio.list = classWorkAnalysis.classworkdata.filter(item => item.finishtimelength == '0') tableRadio.value = '0';