Compare commits

..

2 Commits

Author SHA1 Message Date
yangws a147c60d78 Merge pull request 'fix:推送分值丢失问题;' (#420) from yangws into main
Reviewed-on: #420
2024-11-26 14:56:06 +08:00
小杨 a0477a18df fix:推送分值丢失问题; 2024-11-26 14:55:02 +08:00
2 changed files with 7 additions and 3 deletions

View File

@ -151,8 +151,12 @@ const getXValue = () => {
}; };
watch(() => useOverview.tableList, () => { watch(() => useOverview.tableList, () => {
expectedDuration.value = useOverview.tableList.map(item => (Number(item.timelength) * 60 / useOverview.allData.length).toFixed(2)); const time = useOverview.tableList.map(item => Number(item.timelength))
const avatarTime = time.reduce((acc, cur) => {
return acc + cur
},0) / time.length
expectedDuration.value = useOverview.allData.map(() => (Number(avatarTime) * 60 / useOverview.allData.length).toFixed(2));
// //
nextTick(() => { nextTick(() => {
initChart(); initChart();

View File

@ -680,7 +680,7 @@ const handleClassOverviewOpen = (type) =>{
const allTeacherRating = allTopic.reduce((acc, cur) => acc + cur.teacherRating, 0) const allTeacherRating = allTopic.reduce((acc, cur) => acc + cur.teacherRating, 0)
rightAnswer > 0?item.scoingRate = (score/allTeacherRating * 100).toFixed(0):item.scoingRate = '' rightAnswer > 0?item.scoingRate = (score/allTeacherRating * 100).toFixed(0):item.scoingRate = ''
item.getScore = score item.getScore = allTeacherRating
}else{ }else{
item.scoingRate = '' item.scoingRate = ''
item.getScore = 0 item.getScore = 0