zdg #387
|
@ -29,7 +29,11 @@
|
|||
<div class="avatar-container">
|
||||
<div class="avatar-wrapper flex">
|
||||
<el-dropdown class="right-menu-item hover-effect" @command="handleCommand">
|
||||
<img :src="dev_api + userStore.user.avatar" class="user-avatar" style="float: left" />
|
||||
<el-image :src="dev_api + userStore.user.avatar" class="user-avatar" style="float: left">
|
||||
<template #error>
|
||||
<el-image :src="defaultUserImg" class="user-avatar" style="float: left" />
|
||||
</template>
|
||||
</el-image>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
||||
|
@ -80,6 +84,7 @@ import { updateUserInfo } from '@/api/system/user'
|
|||
import logoIco from '@/assets/images/logo.png'
|
||||
import { listEvaluation } from '@/api/classManage/index'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
import defaultUserImg from '@/assets/images/img-avatar.png'
|
||||
// import Chat from '@/utils/chat' // im 登录初始化
|
||||
// if (!Chat.imChat) Chat.init()
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ const initData = () => {
|
|||
}
|
||||
|
||||
// def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数
|
||||
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse,score:o.score }
|
||||
return { def: o, id: o.id, type: o.worktype, active: [], points, accSum, rightSum, children,hasAnswers,timeAnalyse,score:o.workScore }
|
||||
})
|
||||
if (data.length === 0) return
|
||||
useOverview.getAllData([...data])
|
||||
|
|
|
@ -79,12 +79,9 @@ watch(() => useOverview.tableList,() => {
|
|||
return acc + Number(cur.score)
|
||||
},0)
|
||||
// 平均分
|
||||
const studentList = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid))
|
||||
avatarScore.value = studentList.reduce((acc, cur) => {
|
||||
avatarScore.value = hasStudents.value.reduce((acc, cur) => {
|
||||
return acc + Number(cur.getScore)
|
||||
},0) / studentList.length
|
||||
console.log(avatarScore.value,'useOverview.tableList');
|
||||
|
||||
},0) / hasStudents.value.length
|
||||
|
||||
// 计算得分率
|
||||
getKonwledge()
|
||||
|
|
Loading…
Reference in New Issue