科学实验:批改优化

This commit is contained in:
白了个白 2024-12-20 17:16:57 +08:00
parent f7a3aa6e53
commit 7aa75794dc
1 changed files with 26 additions and 22 deletions

View File

@ -709,29 +709,33 @@ const acceptParams = async (params) => {
} else { } else {
// //
if (params.studentObj.worktype == '常规作业' || params.studentObj.worktype == '科学实验') { if (params.studentObj.worktype == '常规作业' || params.studentObj.worktype == '科学实验') {
try { if(params.studentObj.worktype == '常规作业'){
// datacontent TODO try {
const res = await getClassworkdata(params.studentObj.id); // datacontent TODO
if(res.data.datacontent != ''){ const res = await getClassworkdata(params.studentObj.id);
const teachWorkFileList = JSON.parse(res.data.datacontent); if(res.data.datacontent != ''){
console.log(teachWorkFileList, '老师filelist-------------') const teachWorkFileList = JSON.parse(res.data.datacontent);
teachWorkFileList && console.log(teachWorkFileList, '老师filelist-------------')
teachWorkFileList.forEach((item) => { teachWorkFileList &&
if ( teachWorkFileList.forEach((item) => {
item.name.indexOf('jpg') > -1 || if (
item.name.indexOf('jpeg') > -1 || item.name.indexOf('jpg') > -1 ||
item.name.indexOf('png') > -1 item.name.indexOf('jpeg') > -1 ||
) { item.name.indexOf('png') > -1
teachImageList.value.push(item) ) {
} else { teachImageList.value.push(item)
teachFileList.value.push(item) } else {
} teachFileList.value.push(item)
}) }
teacherFeedContentList.value.push(teachWorkFileList) })
} teacherFeedContentList.value.push(teachWorkFileList)
}
} catch (error) { } catch (error) {
console.error('Invalid JSON:', error) console.error('Invalid JSON:', error)
}
}else{
// TODO 2024-12-20
} }
params.studentQuizAllList.forEach((item) => { params.studentQuizAllList.forEach((item) => {