Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg
This commit is contained in:
commit
674f98a53a
|
@ -29,7 +29,11 @@
|
||||||
<div class="avatar-container">
|
<div class="avatar-container">
|
||||||
<div class="avatar-wrapper flex">
|
<div class="avatar-wrapper flex">
|
||||||
<el-dropdown class="right-menu-item hover-effect" @command="handleCommand">
|
<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>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click="changePage('/profile')">个人中心</el-dropdown-item>
|
<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 logoIco from '@/assets/images/logo.png'
|
||||||
import { listEvaluation } from '@/api/classManage/index'
|
import { listEvaluation } from '@/api/classManage/index'
|
||||||
import { sessionStore } from '@/utils/store'
|
import { sessionStore } from '@/utils/store'
|
||||||
|
import defaultUserImg from '@/assets/images/img-avatar.png'
|
||||||
// import Chat from '@/utils/chat' // im 登录初始化
|
// import Chat from '@/utils/chat' // im 登录初始化
|
||||||
// if (!Chat.imChat) Chat.init()
|
// if (!Chat.imChat) Chat.init()
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ const initData = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// def: 原始题数据 type 类型 active: 选中 points: 得分率, accSum 题解答人数
|
// 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
|
if (data.length === 0) return
|
||||||
useOverview.getAllData([...data])
|
useOverview.getAllData([...data])
|
||||||
|
|
|
@ -79,12 +79,9 @@ watch(() => useOverview.tableList,() => {
|
||||||
return acc + Number(cur.score)
|
return acc + Number(cur.score)
|
||||||
},0)
|
},0)
|
||||||
// 平均分
|
// 平均分
|
||||||
const studentList = useOverview.tableList.filter(item => useOverview.allData[0].hasAnswers.includes(item.studentid))
|
avatarScore.value = hasStudents.value.reduce((acc, cur) => {
|
||||||
avatarScore.value = studentList.reduce((acc, cur) => {
|
|
||||||
return acc + Number(cur.getScore)
|
return acc + Number(cur.getScore)
|
||||||
},0) / studentList.length
|
},0) / hasStudents.value.length
|
||||||
console.log(avatarScore.value,'useOverview.tableList');
|
|
||||||
|
|
||||||
|
|
||||||
// 计算得分率
|
// 计算得分率
|
||||||
getKonwledge()
|
getKonwledge()
|
||||||
|
|
Loading…
Reference in New Issue