Explorar el Código

fix(student): 修复学生作业筛选条件缺失问题

补充了作业类型为1时的匹配条件,确保两种作业类型都能正确筛选
lsc hace 2 semanas
padre
commit
4eb83b25e3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/views/Student/index.vue

+ 1 - 1
src/views/Student/index.vue

@@ -2975,7 +2975,7 @@ const getWork = async (isUpdate = false) => {
         // 同时满足 atool === toolType 或 toolType 为空
         // return (work.ttype == '1' || (work.ttype == '2' && work.classid.includes(props.cid))) && (work.atool == toolType.value || !toolType.value)
         // work.ttype == '1'
-        const ttypeMatch = (work.ttype == '2' && work.classid && work.classid.includes(props.cid))
+        const ttypeMatch = work.ttype == '1' || (work.ttype == '2' && work.classid && work.classid.includes(props.cid))
         const toolMatch = toolType ? work.atool == toolType : true
         return ttypeMatch && toolMatch
       }).map((work: any) => {