班级管理柱状图90%完成
This commit is contained in:
parent
f32368661b
commit
17bd97c9dc
|
@ -18,6 +18,8 @@
|
|||
const [name,setname]=useState('')
|
||||
|
||||
const click=()=>{
|
||||
console.log(selectedSubject);
|
||||
console.log(ID);
|
||||
console.log(studentScores);
|
||||
}
|
||||
const teacher_ID=localStorage.getItem('islogin')
|
||||
|
@ -57,10 +59,15 @@
|
|||
name: studentInfo[3], // 假设姓名总是位于数组的第4个位置
|
||||
score: studentInfo[5], // 假设分数总是位于数组的第6个位置
|
||||
});
|
||||
// 如果 scores 数组已经有三个或更多项目,则移除数组的第一个项目
|
||||
if (scores.length > 3) {
|
||||
scores.shift();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setStudentScores(scores);
|
||||
|
||||
setStudentScores(scores);
|
||||
});
|
||||
}, [selectedSubject]);
|
||||
|
||||
|
@ -85,6 +92,7 @@
|
|||
})
|
||||
setTestScore(Find_details_Src.data['TestScore'])
|
||||
setStudentScores([])
|
||||
setSelectedSubject()
|
||||
}catch{
|
||||
alert('Find_details')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue