Compare commits

...

7 Commits

Author SHA1 Message Date
小杨 eaaba2b5e8 fix:价值透析数据修改; 2024-10-25 16:37:06 +08:00
zhengdegang 4816a4565b Merge pull request 'zdg' (#368) from zdg into main
Reviewed-on: #368
2024-10-25 15:29:56 +08:00
zdg 8b55ebffa5 ppt点赞优化 2024-10-25 15:28:54 +08:00
zdg 9674c68d11 修复-侧边工具 2024-10-25 15:05:25 +08:00
朱浩 906559134e Merge pull request '版本管理' (#367) from zhuhao_dev into main
Reviewed-on: #367
2024-10-25 14:35:33 +08:00
朱浩 ed3559f34f 版本管理 2024-10-25 14:34:53 +08:00
yangws f224f8b048 Merge pull request 'fix:第三方资源图片预览修改;' (#366) from yangws into main
Reviewed-on: #366
2024-10-25 13:56:58 +08:00
4 changed files with 43 additions and 68 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.18",
"version": "2.1.19",
"description": "",
"main": "./out/main/index.js",
"author": "上海交大重庆人工智能研究院",

View File

@ -20,82 +20,58 @@
<script setup>
import {ref, watch} from 'vue'
import overviewStore from '@/store/modules/overview'
import {listEntpcoursework} from '@/api/education/entpCourseWork'
const useOverview = overviewStore()
const tableData = ref([])
//id
const ids = ref('')
//
const allScore = ref(0)
//
const konwledge = ref([])
//
const getKonwledge = () => {
const getScoreRate = []
//
const ledges = []
useOverview.tableList.forEach(item => {
//
if(item.knowledgePoint){
konwledge.value.push({...JSON.parse(item.knowledgePoint),...{scoingRate:Number(item.scoingRate),point:item.point,allPoint:allScore.value}})
const title = JSON.parse(item.knowledgePoint)
//
if(!ledges.includes(title.id)){
ledges.push(title.id)
konwledge.value.push({title:title.title,allPoint:item.point,id:title.id})
}
//
if(useOverview.allData[0].hasAnswers.includes(item.studentid))
getScoreRate.push({rate:item.scoingRate,id:title.id})
}
})
tableData.value = getTableList(konwledge.value)
tableData.value = tableData.value.map(item => {
return{
//
konwledge.value.forEach(item => {
let sunRate = 0
let num = 0
getScoreRate.forEach(item2 => {
if(item.id === item2.id){
sunRate += extractedNumber(item2.rate)
num ++
}
})
const scoreRate = sunRate / num
tableData.value.push({
scoingRate:scoreRate.toFixed(2),
...item,
allPoint: allScore.value
}
point:(item.allPoint * scoreRate / 100).toFixed(2)
})
})
console.log(tableData.value,'tableData.value')
}
//
const getScore = async () => {
const scoreId = useOverview.tableList[0].entpcourseworklist
const fixedJsonString = `[${scoreId}]`;
const objects = JSON.parse(fixedJsonString);
const id = objects.map(obj => obj.id);
ids.value = id.join(',')
const res = await listEntpcoursework({ids: ids.value, pageSize: 500})
if(res.code === 200){
allScore.value = res.rows.reduce((acc, cur) => acc + cur.workScore, 0);
getKonwledge()
}
//
const extractedNumber = (score) => {
const match = score.match(/\d+/);
return match ? parseInt(match[0], 10) : null;
}
//tableList
const getTableList = (data) => {
const result = [];
data.forEach(item => {
const existingItem = result.find(i => i.id === item.id);
if (existingItem) {
// pointscoingRate
existingItem.pointTotal += parseInt(item.point);
existingItem.scoingRateTotal += parseFloat(item.scoingRate);
existingItem.count++;
} else {
//
result.push({
id: item.id,
title: item.title,
pointTotal: item.point,
scoingRateTotal: parseFloat(item.scoingRate),
count: 1
});
}
});
//
result.forEach(item => {
item.point = Math.round(item.pointTotal / item.count);
// item.scoingRate = Math.round((item.scoingRateTotal / item.count) * 100) / 100;
item.scoingRate = Math.round((item.point / allScore.value) * 100);
delete item.pointTotal;
delete item.scoingRateTotal;
delete item.count;
});
return result;
}
watch(() => useOverview.tableList,() => {
console.log(useOverview.tableList,'useOverview.tableList')
getScore()
getKonwledge()
})
</script>

View File

@ -73,9 +73,8 @@ const list = computed(() => props.data.map((o,i) => {
}))
onMounted(() => {
posBtnAll = btnRef.value.getBoundingClientRect()
hPost.value = posBtnAll.height
curNode = sessionStore.get('subject.curNode')
hPost.value = Math.round(posBtnAll.height)
curNode = sessionStore?.get?.('subject.curNode')
})
// === ===
//
@ -97,7 +96,7 @@ const clickHandel = (o, e) => {
isVisible.value = !isColse //
activeObj.value = o
const nodeH = parseInt(node.height / 2) //
topPos.value = parseInt(node.top) - posBtnAll.top + nodeH
topPos.value = Math.round(parseInt(node.top) - posBtnAll.top + nodeH)
}
emit('change', o)
}
@ -149,8 +148,8 @@ const closeActive = () =>{
--top: 30px;
--height: 40vh;
position: fixed;
inset: 50% 75px auto auto;
transform: translateY(-50%);
inset: 0 75px auto auto;
// transform: translateY(-50%);
background-color: #121212;
padding: 10px;
border-radius: 4px;

View File

@ -1,6 +1,6 @@
<template>
<div v-if="props.test">
<el-button type="primary" @click="trigger" v-tap:trigger="">点赞</el-button>
<el-button type="primary" @click="trigger(1)" v-tap:trigger="[1,'']">点赞</el-button>
<el-button type="primary" @click="trigger(2, '学生A')" v-tap:trigger="[2,'学生A']">疑惑</el-button>
</div>
<!-- 温度计-模式 -->
@ -258,11 +258,11 @@ defineExpose({ trigger })
min-width: 15px;
// height: 500px;
&.like{
background-image: linear-gradient(to top, #fef0f0, #f56c6c);
background-image: linear-gradient(to top, #d2f0cb, #2f9e44);
// animation: striped-flow 5s linear infinite;
}
&.doubt{
background-image: linear-gradient(to top, #fdf6ec, #e6a23c);
background-image: linear-gradient(to top, #ebc6c6, #ff0000);
}
}
}