Compare commits

..

15 Commits

Author SHA1 Message Date
小杨 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
白了个白 d65eb565e5 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-31 13:49:44 +08:00
zouyf 678f43e548 Merge pull request 'zouyf_dev' (#380) from zouyf_dev into main
Reviewed-on: #380
2024-10-31 12:36:31 +08:00
“zouyf” 8f4845a37c [逐题讲解] - 兼容填空自建题 2024-10-31 12:33:16 +08:00
白了个白 2db7d3e872 作业批改 2024-10-30 17:06:57 +08:00
“zouyf” 4c10409e07 Merge branch 'main' into zouyf_dev 2024-10-30 15:33:24 +08:00
zhengdegang 4418d1ae27 Merge pull request 'zdg' (#379) from zdg into main
Reviewed-on: #379
2024-10-30 13:55:37 +08:00
zdg fc7868afa6 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into zdg 2024-10-30 13:54:28 +08:00
zdg 1b3d226412 点赞-颜色恢复 2024-10-30 13:54:18 +08:00
zhengdegang fb5daf221f Merge pull request '点赞颜色统一 apt' (#378) from zdg into main
Reviewed-on: #378
2024-10-30 10:37:18 +08:00
zdg eca5f8f815 点赞颜色统一 apt 2024-10-30 10:36:18 +08:00
“zouyf” d845377879 Merge branch 'main' into zouyf_dev 2024-10-29 16:29:02 +08:00
“zouyf” 90d37e725b [作业批改] - 学生答题提交 2024-10-29 16:28:37 +08:00
yangws adc4f99636 Merge pull request 'fix:新增学生的得分以及修改得分率;' (#377) from yangws into main
Reviewed-on: #377
2024-10-29 14:13:33 +08:00
7 changed files with 74 additions and 43 deletions

View File

@ -71,6 +71,16 @@ export function updateClassworkeval(data) {
})
}
// 修改classworkeval
export function updateClassworkevalList(data) {
return request({
url: '/education/classworkeval/updateList',
method: 'put',
data: data
})
}
// 修改classworkdata
export function updateClassworkdata(data) {
return request({

View File

@ -147,8 +147,12 @@ const initData = () => {
})
}
else if (o.worktype == '填空题') { //
const regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
children = (o.title||'').match(regex).map((v,i) => {
let title = o.title.replace(/_{3,}/g, '_____'); //3-10线5
let regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
if (title.indexOf('_____') != -1) {
regex = /_{5}/g // <!--BA-->xxx<!--EA-->
}
children = (title||'').match(regex).map((v,i) => {
const def = `填空项 ${i+1}`
//const code = '(&emsp;)'
const code = '(略)', txt=v

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,15 @@ watch(() => useOverview.tableList,() => {
allScore.value = useOverview.allData.reduce((acc, cur) => {
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) => {
return acc + Number(cur.getScore)
},0) / studentList.length
console.log(avatarScore.value,'useOverview.tableList');
//
getKonwledge()
})
</script>

View File

@ -427,7 +427,7 @@ import useUserStore from '@/store/modules/user'
import { ref, reactive } from 'vue'
// import { Plus } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import { updateClassworkeval, updateClassworkdata, getClassworkdata } from '@/api/classTask'
import { updateClassworkeval, updateClassworkdata, getClassworkdata, updateClassworkevalList } from '@/api/classTask'
import { getTimeDate } from '@/utils/date'
import ReFilePreview from '@/components/refile-preview/index.vue'
import { quizStrToList } from '@/utils/comm';
@ -898,6 +898,21 @@ const onSubmit = () => {
// }
})
})
// let queryList = [];
// classWorkFormScore.teacherRating && classWorkFormScore.teacherRating.map((item, index) => {
// const queryParams = {
// id: item.id,
// teacherRating: item.score, //
// rating: classWorkFormScore.rating, //
// teacherremark: classWorkFormScore.teacherremark, //
// timestamp: getTimeDate() //
// }
// //console.log(queryParams);
// queryList.push(queryParams);
// })
// //console.log(queryList);
// updateClassworkevalList(queryList).then((res) => {
// })
ElMessage({
type: 'success',
message: '提交成功!'

View File

@ -224,8 +224,13 @@ const initData = () => {
})
}
else if (o.worktype == '填空题') { //
const regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
children = (o.title||'').match(regex).map((v,i) => {
//console.log('->', o.title);
let title = o.title.replace(/_{3,}/g, '_____'); //3-10线5
let regex = /<!--BA-->(.*?)<!--EA-->/g // <!--BA-->xxx<!--EA-->
if (title.indexOf('_____') != -1) {
regex = /_{5}/g // <!--BA-->xxx<!--EA-->
}
children = (title||'').match(regex).map((v,i) => {
const def = `填空项 ${i+1}`
//const code = '(&emsp;)'
const code = '(略)', txt=v

View File

@ -82,25 +82,25 @@
<span style="color: #2196f3">{{scope.row.getScore || 0}}</span>
</template>
</el-table-column>
<el-table-column label="批阅状态" prop="teacherRating" align="center" width="120" sortable>
<el-table-column label="批阅状态" prop="rating" align="center" width="120" sortable>
<template #default="scope">
<template v-if="scope.row.teacherRating == 0">
<template v-if="scope.row.rating == 0">
<span v-if="tableRadio.value==1" style="color: #2196f3">待批阅</span>
</template>
<!-- 1- 2-优减 3- 4-良减 5- -->
<template v-if="scope.row.teacherRating == 1"
<template v-if="scope.row.rating == 1"
><el-tag type="danger">完美</el-tag></template
>
<template v-if="scope.row.teacherRating == 2"
<template v-if="scope.row.rating == 2"
><el-tag type="danger">优秀</el-tag></template
>
<template v-if="scope.row.teacherRating == 3"
<template v-if="scope.row.rating == 3"
><el-tag type="warning">良好</el-tag></template
>
<template v-if="scope.row.teacherRating == 4"
<template v-if="scope.row.rating == 4"
><el-tag type="info">及格</el-tag></template
>
<template v-if="scope.row.teacherRating == 5"
<template v-if="scope.row.rating == 5"
><el-tag type="info">不及格</el-tag></template
>
</template>
@ -345,7 +345,7 @@ const getClassWorkStudentList = (rowId) => {
}
// 0
response.rows[i].teacherRating = 0
response.rows[i].rating = 0
//
if (
@ -371,21 +371,23 @@ const getClassWorkStudentList = (rowId) => {
score += evalarray[e].score;
evalarray[e].teacherRating = evalarray[e].score
}
}
}
const allScore = evalarray.reduce((acc, cur) => acc + cur.score, 0)
const allTeacherRating = evalarray.reduce((acc, cur) => acc + cur.teacherRating, 0) //
//console.log(evalarray, 'evalarray------------------------------------')
if (feedcount > 0) {
// : /*100
response.rows[i].scoingRate = ((score / allScore) * 100).toFixed(0) + '%'
response.rows[i].getScore = score
response.rows[i].scoingRate = ((score / allTeacherRating) * 100).toFixed(0) + '%'
response.rows[i].getScore = allTeacherRating
} else {
response.rows[i].scoingRate = '0%'
response.rows[i].getScore = 0
}
// :
if (evalarray[0].rating != '') {
response.rows[i].teacherRating = evalarray[0].rating
response.rows[i].rating = evalarray[0].rating
}
} else {
response.rows[i].scoingRate = '0%'
@ -420,7 +422,7 @@ const teacherCriticism = ()=>{
tableRadio.list = tableRadio.list.map((item) => {
return {
...item,
teacherRating : item.teacherRating || checkWorkType(item)
rating : item.rating || checkWorkType(item)
}
})
}
@ -675,10 +677,11 @@ const handleClassOverviewOpen = (type) =>{
}
}
})
const allScore = allTopic.reduce((acc, cur) => {
return acc + cur.score;
const allTeacherRating = allTopic.reduce((acc, cur) => {
return acc + cur.teacherRating;
},0)
rightAnswer > 0?item.scoingRate = (score/allScore * 100).toFixed(0):item.scoingRate = ''
rightAnswer > 0?item.scoingRate = (score/allTeacherRating * 100).toFixed(0):item.scoingRate = ''
item.getScore = score
}else{
item.scoingRate = ''

View File

@ -257,11 +257,11 @@ defineExpose({ trigger })
border-radius: 3px;
min-width: 15px;
// height: 500px;
&.like{
&.like{ //
background-image: linear-gradient(to top, #d2f0cb, #2f9e44);
// animation: striped-flow 5s linear infinite;
}
&.doubt{
&.doubt{ //
background-image: linear-gradient(to top, #ebc6c6, #ff0000);
}
}