fix:修改字段名称以及统一逻辑;

This commit is contained in:
小杨 2024-10-19 17:14:21 +08:00
parent 8f91be9a4b
commit 6b63235084
5 changed files with 37 additions and 23 deletions

View File

@ -78,7 +78,7 @@ function initChart() {
return `${value}${percentage}%`; //
},
color: '#333',
fontSize: 12
fontSize: 12
}
}]
};
@ -88,12 +88,20 @@ function initChart() {
//
const showEcharts =() => {
useOverview.tableList.forEach((item,index) => {
if(item.rating === 0) return //
dataList.value.forEach((item1,index1) => {
if(item1.min <= Number(item.scoingRate) && Number(item.scoingRate) <= item1.max ){
item1.value ++
}
})
if(item.rating === 0){
dataList.value.forEach((item1,index1) => {
if(item1.min <= Number(item.scoingRate) && Number(item.scoingRate) <= item1.max ){
item1.value ++
}
})
}else{
dataList.value.forEach((item1,index1) => {
if(item1.rating == item.rating){
item1.value ++
}
})
}
})
}
watch(() => useOverview.tableList,() => {

View File

@ -65,11 +65,17 @@ const handelChange = (item) => {
}
//
const showStudents = (index) => {
console.log(useOverview.tableList,'useOverview.tableList');
leftList.value[index].stuList = useOverview.tableList.filter(item => {
if(item.rating > 0){
if(item.rating === 0){
if(leftList.value[index].min <= Number(item.scoingRate || 0) && Number(item.scoingRate || 0) <= leftList.value[index].max ){
return item
}
}else{
if(item.rating == leftList.value[index].rating){
return item
}
}
})
}

View File

@ -501,11 +501,11 @@ const classWorkFormScore = reactive({
teacherremark: '' //
})
const teacherRatingList = ref([
{ ratingKey: '1', ratingValue: '' },
{ ratingKey: '2', ratingValue: '优-' },
{ ratingKey: '3', ratingValue: '良' },
{ ratingKey: '4', ratingValue: '良-' },
{ ratingKey: '5', ratingValue: '' }
{ ratingKey: '1', ratingValue: '完美' },
{ ratingKey: '2', ratingValue: '优' },
{ ratingKey: '3', ratingValue: '良' },
{ ratingKey: '4', ratingValue: '及格' },
{ ratingKey: '5', ratingValue: '不及格' }
])
// 线
//#region

View File

@ -94,19 +94,19 @@
</template>
<!-- 1- 2-优减 3- 4-良减 5- -->
<template v-if="scope.row.teacherRating == 1"
><el-tag type="danger"></el-tag></template
><el-tag type="danger">完美</el-tag></template
>
<template v-if="scope.row.teacherRating == 2"
><el-tag type="danger">-</el-tag></template
><el-tag type="danger"></el-tag></template
>
<template v-if="scope.row.teacherRating == 3"
><el-tag type="warning"></el-tag></template
><el-tag type="warning"></el-tag></template
>
<template v-if="scope.row.teacherRating == 4"
><el-tag type="info">-</el-tag></template
><el-tag type="info">及格</el-tag></template
>
<template v-if="scope.row.teacherRating == 5"
><el-tag type="info"></el-tag></template
><el-tag type="info">不及格</el-tag></template
>
</template>
</el-table-column>

View File

@ -84,19 +84,19 @@
</template>
<!-- 1- 2-优减 3- 4-良减 5- -->
<template v-if="scope.row.teacherRating == 1"
><el-tag type="danger"></el-tag></template
><el-tag type="danger">完美</el-tag></template
>
<template v-if="scope.row.teacherRating == 2"
><el-tag type="danger">-</el-tag></template
><el-tag type="danger"></el-tag></template
>
<template v-if="scope.row.teacherRating == 3"
><el-tag type="warning"></el-tag></template
><el-tag type="warning"></el-tag></template
>
<template v-if="scope.row.teacherRating == 4"
><el-tag type="info">-</el-tag></template
><el-tag type="info">及格</el-tag></template
>
<template v-if="scope.row.teacherRating == 5"
><el-tag type="info"></el-tag></template
><el-tag type="info">不及格</el-tag></template
>
</template>
</el-table-column>