班级管理柱状图90%完成

This commit is contained in:
30404 2024-06-26 14:27:21 +08:00
parent f32368661b
commit 17bd97c9dc
1 changed files with 9 additions and 1 deletions

View File

@ -18,6 +18,8 @@
const [name,setname]=useState('') const [name,setname]=useState('')
const click=()=>{ const click=()=>{
console.log(selectedSubject);
console.log(ID);
console.log(studentScores); console.log(studentScores);
} }
const teacher_ID=localStorage.getItem('islogin') const teacher_ID=localStorage.getItem('islogin')
@ -57,9 +59,14 @@
name: studentInfo[3], // 4 name: studentInfo[3], // 4
score: studentInfo[5], // 6 score: studentInfo[5], // 6
}); });
// scores
if (scores.length > 3) {
scores.shift();
} }
} }
} }
}
setStudentScores(scores); setStudentScores(scores);
}); });
}, [selectedSubject]); }, [selectedSubject]);
@ -85,6 +92,7 @@
}) })
setTestScore(Find_details_Src.data['TestScore']) setTestScore(Find_details_Src.data['TestScore'])
setStudentScores([]) setStudentScores([])
setSelectedSubject()
}catch{ }catch{
alert('Find_details') alert('Find_details')
} }