From a0477a18df27efa55bcdae7f69da651ca1543747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Tue, 26 Nov 2024 14:55:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=8E=A8=E9=80=81=E5=88=86?= =?UTF-8?q?=E5=80=BC=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classTask/container/classOverview/timeAnalyse.vue | 8 ++++++-- src/renderer/src/views/classTask/teachClassTask.vue | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/views/classTask/container/classOverview/timeAnalyse.vue b/src/renderer/src/views/classTask/container/classOverview/timeAnalyse.vue index 815ee6b..75a79d5 100644 --- a/src/renderer/src/views/classTask/container/classOverview/timeAnalyse.vue +++ b/src/renderer/src/views/classTask/container/classOverview/timeAnalyse.vue @@ -151,8 +151,12 @@ const getXValue = () => { }; 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(() => { initChart(); diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue index fb44c02..c84d588 100644 --- a/src/renderer/src/views/classTask/teachClassTask.vue +++ b/src/renderer/src/views/classTask/teachClassTask.vue @@ -680,7 +680,7 @@ const handleClassOverviewOpen = (type) =>{ const allTeacherRating = allTopic.reduce((acc, cur) => acc + cur.teacherRating, 0) rightAnswer > 0?item.scoingRate = (score/allTeacherRating * 100).toFixed(0):item.scoingRate = '' - item.getScore = score + item.getScore = allTeacherRating }else{ item.scoingRate = '' item.getScore = 0 -- 2.44.0.windows.1