Compare commits

...

24 Commits

Author SHA1 Message Date
白了个白 4be888e39e Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-11-04 11:27:32 +08:00
zhengdegang e79d554987 Merge pull request '优化ppt上课' (#390) from zdg into main
Reviewed-on: #390
2024-11-04 09:41:37 +08:00
zdg fbacb32940 优化ppt上课 2024-11-04 09:40:16 +08:00
zhengdegang 7d20a7ee50 Merge pull request 'zdg' (#389) from zdg into main
Reviewed-on: #389
2024-11-01 12:55:07 +08:00
zdg e494c303f0 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-11-01 12:54:12 +08:00
zdg 0fcaf3f3e7 ppt 上课优化 2024-11-01 12:54:01 +08:00
zouyf 91f43987f7 Merge pull request 'zouyf_dev' (#388) from zouyf_dev into main
Reviewed-on: #388
2024-11-01 11:22:40 +08:00
“zouyf” 9ab2c17b3e Merge branch 'main' into zouyf_dev 2024-11-01 11:22:03 +08:00
“zouyf” 21dfced02e [考试分析] - 优化获取真题 2024-11-01 11:21:40 +08:00
zhengdegang c3d6c2a57b Merge pull request 'zdg' (#387) from zdg into main
Reviewed-on: #387
2024-10-31 20:17:23 +08:00
zdg 674f98a53a Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-31 20:16:03 +08:00
zdg d4a02e85ce 自动关闭-屏蔽该功能 2024-10-31 20:15:45 +08:00
lyc 4fbd4d8f0f Merge pull request '默认用户头像' (#386) from lyc-dev into main 2024-10-31 16:54:44 +08:00
lyc 4578bbca58 默认用户头像 2024-10-31 16:55:19 +08:00
yangws 8cffee606a Merge pull request 'fix:知识点分数修改;' (#385) from yangws into main
Reviewed-on: #385
2024-10-31 16:37:26 +08:00
小杨 9e24b6111d fix:知识点分数修改; 2024-10-31 16:37:02 +08:00
yangws 0433febf06 Merge pull request 'fix:知识点得分率计算;' (#384) from yangws into main
Reviewed-on: #384
2024-10-31 16:02:13 +08:00
小杨 6370086c85 fix:知识点得分率计算; 2024-10-31 16:01:50 +08:00
zhengdegang 7da598b30e Merge pull request 'zdg' (#383) from zdg into main
Reviewed-on: #383
2024-10-31 15:07:49 +08:00
zdg eafdb718b6 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-31 15:07:16 +08:00
zdg d44516226e 上课修改 2024-10-31 15:07:04 +08:00
yangws 4afa20808c Merge pull request 'fix:知识点分数计算;' (#382) from yangws into main
Reviewed-on: #382
2024-10-31 14:08:52 +08:00
小杨 a0327ad556 fix:知识点分数计算; 2024-10-31 14:08:20 +08:00
baigl ada6659666 Merge pull request 'baigl' (#381) from baigl into main
Reviewed-on: #381
2024-10-31 13:51:22 +08:00
7 changed files with 72 additions and 49 deletions

View File

@ -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()

View File

@ -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])

View File

@ -27,7 +27,9 @@ const tableData = ref([])
const konwledge = ref([])
const hasStudents = ref([])
//
const allScore = ref([])
const allScore = ref(0)
//
const avatarScore = ref()
//
const getKonwledge = () => {
const getScoreRate = []
@ -41,7 +43,7 @@ const getKonwledge = () => {
if(!ledges.includes(title.id)){
ledges.push(title.id)
// 0
konwledge.value.push({title:title.title,allPoint:allScore.value,id:title.id})
konwledge.value.push({title:title.title,allPoint:allScore.value,id:title.id,point:avatarScore.value})
}
//
if(useOverview.allData[0].hasAnswers.includes(item.studentid))
@ -51,29 +53,12 @@ const getKonwledge = () => {
//
konwledge.value.forEach(item => {
let sunRate = 0
let num = 0
if(getScoreRate.length === 0) return
getScoreRate.forEach(item2 => {
if(item.id === item2.id){
sunRate += extractedNumber(item2.rate)
num ++
}
})
const scoreRate = sunRate / num
tableData.value.push({
scoingRate:scoreRate.toFixed(2),
scoingRate:(item.point / item.allPoint * 100).toFixed(2),
...item,
point:(item.allPoint * scoreRate / 100).toFixed(2)
})
})
}
//
const extractedNumber = (score) => {
const match = score.match(/\d+/);
return match ? parseInt(match[0], 10) : null;
}
//tableList
watch(() => useOverview.tableList,() => {
@ -93,6 +78,12 @@ watch(() => useOverview.tableList,() => {
allScore.value = useOverview.allData.reduce((acc, cur) => {
return acc + Number(cur.score)
},0)
//
avatarScore.value = hasStudents.value.reduce((acc, cur) => {
return acc + Number(cur.getScore)
},0) / hasStudents.value.length
//
getKonwledge()
})
</script>

View File

@ -161,7 +161,7 @@ const getData = async (data) => {
const params = {
eid: curNode.value.id,
workgroup: '1',
worktype: '不限',
worktype: '999', // 使
workTypeId: '0',
edusubject: curNode.value.edusubject,
edustage: curNode.value.edustage,

View File

@ -129,7 +129,7 @@ const sendHomework = (row,type) => {
}
//
const closeHomework = async() => {
ipcMsgSend('tool-sphere:set:ignore', true)
// ipcMsgSend('tool-sphere:set:ignore', true)
}

View File

@ -34,7 +34,7 @@
</div>
</template>
<script setup>
import { computed, defineProps, ref, reactive, watchEffect, onMounted } from 'vue'
import { computed, defineProps, ref, reactive, watchEffect, onMounted} from 'vue'
import { sessionStore } from '@/utils/store'
import homework from './homework.vue';
@ -49,7 +49,7 @@ const props = defineProps({
data: { //
type: Array,
default: () => [
{ label: '课件', prop: 'book', isExtra: true, icon: 'icon--kejian' },
{ label: '资源', prop: 'book', isExtra: true, icon: 'icon--kejian' },
{ label: '活动', prop: 'resource', icon: 'icon-kechengziyuan1' },
// { label: '', prop: 'interact', icon: 'icon-hudong' },
// { label: '', prop: 'win', icon: 'icon-tubiaozhizuomobanyihuifu-' },
@ -74,6 +74,7 @@ const list = computed(() => props.data.map((o,i) => {
onMounted(() => {
posBtnAll = btnRef.value.getBoundingClientRect()
hPost.value = Math.round(posBtnAll.height)
// btnRef.value.style.marginTop = -hPost.value / 2 + 'px'
curNode = sessionStore?.get?.('subject.curNode')
})
// === ===
@ -100,10 +101,13 @@ const clickHandel = (o, e) => {
}
emit('change', o)
}
const closeActive = () =>{
isVisible.value = false
if (isVisible.value) { //
isVisible.value = false
emit('change', { prop: 'close' })
}
}
defineExpose({closeActive})
</script>
<style lang="scss" scoped>
.warp{
@ -111,11 +115,17 @@ const closeActive = () =>{
position: fixed;
top: 50%;
transform: translateY(-50%);
z-index: 1;
right: 10px;
//min-height: 40vh;
min-width: 4em;
border-radius: 4em;
background-color: #121212;
background-color: rgba(18,18,18,0.3);
border-color: rgba(1, 1, 1, 0.1);
&:hover{
opacity: 1;
background-color: rgba(18,18,18,1);
border-color: rgba(1, 1, 1, 1);
}
.el-space{margin: 20px 0 0;}
.c-btn{
color: #d9dce3;

View File

@ -1,10 +1,12 @@
<template>
<div class="warp-all">
<!-- 遮罩层 -->
<div class="mask" v-show="isMask" @click="maskChange(true)"></div>
<!-- 画板 -->
<board-vue v-model="tabActive" v-show="isShow" ref="boardVueRef"></board-vue>
<!-- 侧边工具栏 -->
<side-vue v-ignore @ignore-mounted="sideMouse" @change="sideChange"></side-vue>
<side-vue ref="sideVueRef" v-ignore @ignore-mounted="sideMouse" @change="sideChange"></side-vue>
<!-- 点赞组件 -->
<upvote-vue ref="upvoteRef" type="2"></upvote-vue>
@ -13,7 +15,7 @@
<im-chat ref="imChatRef" @change="chatChange" group />
<!-- 底部工具栏 -->
<div class="tool-bottom-all"
<!-- <div class="tool-bottom-all"
@mouseenter="mouseChange(0)" @mouseleave="mouseChange(1)">
<div v-drag="{handle:'.tool-bottom-all', dragtime}"
@v-drag-start="dragtime = Date.now()">
@ -34,7 +36,7 @@
</el-segmented>
</div>
</transition>
</div>
</div> -->
</div>
</template>
@ -62,11 +64,13 @@ const isDrag = ref(false) // 开始拖拽
const dragtime = ref(0) // -
const isShow = ref(false) // -
const isOver = ref(false) //
const isOpenBook = ref(false)
const isOpenBook = ref(false) // pdf
const isMask = ref(false) //
const toolStore = useToolState() //
const boardVueRef=ref(null) // ref
const upvoteRef = ref(null) // ref
const imChatRef = ref(null) // im-chat ref
const sideVueRef = ref(null) // ref
const classObj = reactive({ //
id: route.query.reservId, // id
data: {} //
@ -83,6 +87,8 @@ const btnList = [ // 工具栏按钮列表
// { label: '', value: 'focus', icon: 'icon-jujiao' },
// { label: '', value: 'more', icon: 'icon-xiazai9' },
]
let timingSide = null // -
// === ===
onMounted(async() => {
if (!electron) return //
@ -90,7 +96,6 @@ onMounted(async() => {
// window.test1 = toolStore
getClassInfo() // ex3
resetStatus() // -
})
// ==== ===
@ -140,7 +145,8 @@ const logoHandle = (e,t) => {
// -穿
const mouseChange = (bool) => {
let resBool = false
if (bool == 0) return setIgnore(resBool) // 穿
// console.log('mouseChange:', bool, resBool)
if (!bool) return setIgnore(resBool) // 穿
if (tabActive.value == 'select') resBool = !!bool
else {
if (!isShow.value) resBool = !!bool
@ -148,12 +154,10 @@ const mouseChange = (bool) => {
const isPdf = !resBool && toolStore.isPdfWin
if (isPdf) resBool = true
}
console.log('mouseChange:', bool, resBool)
// console.log('mouseChange:', bool, resBool)
setIgnore(resBool)
}
const touchChange = (e) => {
console.log(e)
}
// im-chat: {type, data}
const chatChange = (type, data, ...args) => {
if (type == 'createGroup') { // -
@ -185,14 +189,6 @@ const setIgnore = (bool) => {ipcMsgSend('tool-sphere:set:ignore', bool)}
// : |
const resetStatus = () => {
if (toolStore.isToolWin) return // -
// -
// ipcMain?.removeHandler('tool-sphere:reset') //
// ipcMain?.handle?.('tool-sphere:reset', () => {
// setTimeout(() => {
// boardVueRef.value.handleMode(tabActive.value)
// mouseChange(1)
// }, 500)
// })
toolStore.isToolWin = true //
}
// :
@ -202,7 +198,10 @@ const sideMouse = e => {
setIgnore(false) // -穿
return
}
mouseChange(type == 'mouseleave')
//
const bool = isMask.value && type =='mouseleave'
if (bool) mouseChange(false) // 穿
else mouseChange(type == 'mouseleave')
}
// :
const sideChange = async o => {
@ -218,7 +217,11 @@ const sideChange = async o => {
isOpenBook.value = true
}
break
case 'close': //
maskChange(false)
break
case 'resource': //
isMask.value = !isMask.value
break
case 'interact': //
break
@ -255,6 +258,13 @@ const sideChange = async o => {
}
}
// -
const maskChange = (bool) => {
isMask.value = false
bool && sideVueRef.value.closeActive() //
mouseChange(true) // 穿
}
// === ===
watchEffect(() => {
if (isOver.value) return // ,
@ -274,6 +284,12 @@ watchEffect(() => {
.warp-all{
position: relative;
}
//
.mask{
position: fixed;
inset: 0;
background: rgba(1, 1, 1, 0.3);
}
//
.tool-bottom-all{
// width: 45vw;
@ -316,6 +332,7 @@ watchEffect(() => {
}
}
}
//
.a-fade-leave-active,.a-fade-enter-active{
transition: all .3s;
}